Skip to content

Commit

Permalink
Merge pull request puppetlabs#1170 from david22swan/MODULES-8684
Browse files Browse the repository at this point in the history
(MODULES-8684) - Removing private tags from Puppet Types
  • Loading branch information
eimlav authored Mar 19, 2019
2 parents 693c4d2 + 8823a54 commit 879e431
Show file tree
Hide file tree
Showing 3 changed files with 110 additions and 60 deletions.
166 changes: 110 additions & 56 deletions REFERENCE.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,25 +45,20 @@ _Private Classes_

_Public Resource types_

* [`mysql_grant`](#mysql_grant): @summary Manage a MySQL user's rights.
* [`mysql_plugin`](#mysql_plugin): Manage MySQL plugins.
* [`mysql_user`](#mysql_user): @summary Manage a MySQL user. This includes management of users password as well as privileges.

_Private Resource types_

* `mysql_database`: Manage a MySQL database.
* `mysql_datadir`: Manage MySQL datadirs with mysql_install_db OR mysqld (5.7.6 and above).
* `mysql_grant`: Manage a MySQL user's rights.
* `mysql_user`: Manage a MySQL user. This includes management of users password as well as privileges.

**Functions**

* [`mysql::password`](#mysqlpassword): Hash a string as mysql's "PASSWORD()" function would do it
* [`mysql::strip_hash`](#mysqlstrip_hash): When given a hash this function strips out all blank entries.
* [`mysql_password`](#mysql_password): A wrapper for the 4.x function 'mysql::password' to bridge the gap between
it and the 3.x function 'mysql_password'.
* [`mysql_password`](#mysql_password): Hash a string as mysql's "PASSWORD()" function would do it
* [`mysql_strip_hash`](#mysql_strip_hash): A wrapper for the 4.x function 'mysql::strip_hash' to bridge the gap between
it and the 3.x function 'mysql_strip_hash'.
* [`mysql_strip_hash`](#mysql_strip_hash): TEMPORARY FUNCTION: EXPIRES 2014-03-10 When given a hash this function strips out all blank entries.

**Tasks**

Expand Down Expand Up @@ -1050,6 +1045,51 @@ Default value: $mysql::params::exec_path

## Resource types

### mysql_grant

@summary
Manage a MySQL user's rights.

#### Properties

The following properties are available in the `mysql_grant` type.

##### `ensure`

Valid values: present, absent

The basic property that the resource should be in.

Default value: present

##### `privileges`

Privileges for user

##### `table`

Valid values: %r{.*\..*}, %r{^[0-9a-zA-Z$_]*@[\w%\.:\-/]*$}

Table to apply privileges to.

##### `user`

User to operate on.

##### `options`

Options to grant.

#### Parameters

The following parameters are available in the `mysql_grant` type.

##### `name`

namevar

Name to describe the grant.

### mysql_plugin

Manage MySQL plugins.
Expand Down Expand Up @@ -1092,95 +1132,105 @@ namevar

The name of the MySQL plugin to manage.

## Functions
### mysql_user

### mysql::password
@summary
Manage a MySQL user. This includes management of users password as well as privileges.

Type: Ruby 4.x API
#### Properties

Hash a string as mysql's "PASSWORD()" function would do it
The following properties are available in the `mysql_user` type.

#### `mysql::password(String $password)`
##### `ensure`

The mysql::password function.
Valid values: present, absent

Returns: `String` hash
The mysql password hash from the clear text password.
The basic property that the resource should be in.

##### `password`
Default value: present

Data type: `String`
##### `password_hash`

Plain text password.
Valid values: %r{\w*}

### mysql::strip_hash
The password hash of the user. Use mysql_password() for creating such a hash.

Type: Ruby 4.x API
##### `plugin`

When given a hash this function strips out all blank entries.
Valid values: %r{\w+}

#### `mysql::strip_hash(Hash $hash)`
The authentication plugin of the user.

The mysql::strip_hash function.
##### `max_user_connections`

Returns: `Hash` hash
The given hash with all blank entries removed
Valid values: %r{\d+}

##### `hash`
Max concurrent connections for the user. 0 means no (or global) limit.

Data type: `Hash`
##### `max_connections_per_hour`

Hash to be stripped
Valid values: %r{\d+}

### mysql_password
Max connections per hour for the user. 0 means no (or global) limit.

Type: Ruby 4.x API
##### `max_queries_per_hour`

A wrapper for the 4.x function 'mysql::password' to bridge the gap between
it and the 3.x function 'mysql_password'.
Valid values: %r{\d+}

#### `mysql_password(String $password)`
Max queries per hour for the user. 0 means no (or global) limit.

The mysql_password function.
##### `max_updates_per_hour`

Returns: `String` The mysql password hash from the 4.x function mysql::password.
Valid values: %r{\d+}

##### `password`
Max updates per hour for the user. 0 means no (or global) limit.

Data type: `String`
##### `tls_options`

Plain text password.
Options to that set the TLS-related REQUIRE attributes for the user.

### mysql_password
#### Parameters

Type: Ruby 3.x API
The following parameters are available in the `mysql_user` type.

##### `name`

namevar

The name of the user. This uses the 'username@hostname' or username@hostname.

## Functions

### mysql::password

Type: Ruby 4.x API

Hash a string as mysql's "PASSWORD()" function would do it

#### `mysql_password(String $password)`
#### `mysql::password(String $password)`

The mysql_password function.
The mysql::password function.

Returns: `String` the mysql password hash from the clear text password.
Returns: `String` hash
The mysql password hash from the clear text password.

##### `password`

Data type: `String`

Plain text password.

### mysql_strip_hash
### mysql::strip_hash

Type: Ruby 4.x API

A wrapper for the 4.x function 'mysql::strip_hash' to bridge the gap between
it and the 3.x function 'mysql_strip_hash'.
When given a hash this function strips out all blank entries.

#### `mysql_strip_hash(Hash $hash)`
#### `mysql::strip_hash(Hash $hash)`

The mysql_strip_hash function.
The mysql::strip_hash function.

Returns: `Hash` hash
Returns: `Hash` hash
The given hash with all blank entries removed

##### `hash`
Expand All @@ -1189,19 +1239,23 @@ Data type: `Hash`

Hash to be stripped

### mysql_strip_hash
### mysql_password

Type: Ruby 3.x API

TEMPORARY FUNCTION: EXPIRES 2014-03-10
When given a hash this function strips out all blank entries.
Hash a string as mysql's "PASSWORD()" function would do it

#### `mysql_password(String $password)`

#### `mysql_strip_hash()`
The mysql_password function.

TEMPORARY FUNCTION: EXPIRES 2014-03-10
When given a hash this function strips out all blank entries.
Returns: `String` the mysql password hash from the clear text password.

##### `password`

Returns: `Any`
Data type: `String`

Plain text password.

## Tasks

Expand Down
2 changes: 0 additions & 2 deletions lib/puppet/type/mysql_grant.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
@doc = <<-PUPPET
@summary
Manage a MySQL user's rights.
@api private
PUPPET
ensurable

Expand Down
2 changes: 0 additions & 2 deletions lib/puppet/type/mysql_user.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
@doc = <<-PUPPET
@summary
Manage a MySQL user. This includes management of users password as well as privileges.
@api private
PUPPET

ensurable
Expand Down

0 comments on commit 879e431

Please sign in to comment.