]> review.fuel-infra Code Review - puppet-modules/puppet-ceilometer.git/commitdiff
Merge remote-tracking branch 'mgagne/grizzly' into lint
authorFrançois Charlier <francois.charlier@enovance.com>
Tue, 23 Apr 2013 08:51:24 +0000 (10:51 +0200)
committerFrançois Charlier <francois.charlier@enovance.com>
Tue, 23 Apr 2013 08:51:24 +0000 (10:51 +0200)
Conflicts:
manifests/db/mysql.pp
manifests/db/mysql/host_access.pp
manifests/keystone/auth.pp

Update some docs in the process

1  2 
manifests/api.pp
manifests/db/mysql.pp
manifests/db/mysql/host_access.pp
manifests/keystone/auth.pp

index f020dd9b58494952c4398c4198a7fc7276978143,5136d1886add044c2cce868127ed0b82e9f3c490..96de77729b07226e8cdbf101da8c0761430f9260
@@@ -1,20 -1,4 +1,27 @@@
- #  $enabled: should the service be enabled
- #    Optional. Defaults to true
- #  $keystone_host: keystone's admin endpoint IP/Host
- #    Optional. Defaults to 127.0.0.1
- #  $keystone_port: keystone's admin endpoint port
- #    Optional. Defaults to 35357
- #  $keystone_protocol: http/https
 +# Installs & configure the ceilometer api service
 +#
 +# == Parameters
- #  $keytone_user: user to authenticate with
++#  [*enabled*]
++#    should the service be enabled. Optional. Defaults to true
++#
++#  [*keystone_host*]
++#    keystone's admin endpoint IP/Host. Optional. Defaults to 127.0.0.1
++#
++#  [*keystone_port*]
++#    keystone's admin endpoint port. Optional. Defaults to 35357
++#
++#  [*keystone_protocol*] http/https
 +#    Optional. Defaults to https
- #  $keystone_tenant: tenant to authenticate with
++#
++#  [*keytone_user*] user to authenticate with
 +#    Optional. Defaults to ceilometer
- #  $keystone_password: password to authenticate with
++#
++#  [*keystone_tenant*] tenant to authenticate with
 +#    Optional. Defaults to services
++#
++#  [*keystone_password*] password to authenticate with
 +#    Mandatory.
+ #
  class ceilometer::api (
    $enabled           = true,
    $keystone_host     = '127.0.0.1',
index 643c5564033df9358267e6e845eed46dbf07c6c6,64231e062b0ab4b90caed33ced9792fbefa3f8a3..93c2d9e79ba66a8fba507dd17408520b522fc105
@@@ -1,23 -1,6 +1,30 @@@
- #  $password: password to connect to the database
- #    Mandatory.
- #  $dbname: name of the database
- #    Optional. Defaults to ceilometer.
- #  $user: user to connect to the database
- #    Optional. Defaults to ceilometer.
- #  $host: the default source host user is allowed to connect from
 +# The ceilometer::db::mysql class creates a MySQL database for ceilometer.
 +# It must be used on the MySQL server
 +#
 +# == Parameters
 +#
- #  $allowed_hosts: other hosts the user is allowd to connect from
++#  [*password*]
++#    password to connect to the database. Mandatory.
++#
++#  [*dbname*]
++#    name of the database. Optional. Defaults to ceilometer.
++#
++#  [*user*]
++#    user to connect to the database. Optional. Defaults to ceilometer.
++#
++#  [*host*]
++#    the default source host user is allowed to connect from.
 +#    Optional. Defaults to 'localhost'
- #  $charset: the database charset
- #    Optional. Defaults to 'latin1'
++#
++#  [*allowed_hosts*]
++#    other hosts the user is allowd to connect from.
 +#    Optional. Defaults to undef.
++#
++#  [*charset*]
++#    the database charset. Optional. Defaults to 'latin1'
+ #
  class ceilometer::db::mysql(
 -  $password,
 +  $password      = false,
    $dbname        = 'ceilometer',
    $user          = 'ceilometer',
    $host          = 'localhost',
index cd2dac147cb52751415d066fda42c91f91791859,863af57ecb0cc68f95014a48c94d4e784eae5701..e9a802d77d3208909517a3305ef2136b56c2692e
@@@ -1,11 -1,6 +1,20 @@@
- #  * namevar: the host to allow
- #  * user: username to allow
- #  * password: user password
- #  * database: the database name
 +# Allow a user to access the ceilometer database
 +#
++# == Namevar
++#  The host to allow
++#
 +# == Parameters
++#  [*user*]
++#    username to allow
++#
++#  [*password*]
++#    user password
++#
++#  [*database*]
++#    the database name
+ #
  define ceilometer::db::mysql::host_access ($user, $password, $database)  {
    database_user { "${user}@${name}":
      password_hash => mysql_password($password),
      provider      => 'mysql',
index 37cf32f6e7f7cae88940f9046580d935fb1064a0,5593636e9b5555eba761c405d612261163164849..68f1732a5125e661c422ac8b409e6f2372dd0e73
@@@ -1,37 -1,50 +1,49 @@@
+ # == Class: ceilometer::keystone::auth
  #
- # Sets up ceilometer users, service and endpoint
+ # Configures Ceilometer user, service and endpoint in Keystone.
  #
- # == Parameters:
+ # === Parameters
  #
- #  $password: ceilometer user's password
- #    Mandatory
- #  $email: ceilometer user's email
- #    Optional.
- #  $auth_name: username
- #    Optional. Defaults to 'ceilometer'.
- #  $service_type: type of service to create.
- #    Optional. Defaults to 'metering'.
- #  $public_address: Public address for endpoint.
- #    Optional. Defaults to 127.0.0.1.
- #  $admin_address: Admin address for endpoint.
- #    Optional. Defaults to 127.0.0.1.
- #  $internal_address: Internal address for endpoint.
- #    Optional. Defaults to 127.0.0.1.
- #  $port: Port for endpoint. Needs to match ceilometer api service port.
- #    Optional. Defaults to 8777.
- #  $region: Region where endpoint is set.
- #    Optional. Defaults to 'RegionOne'.
- #  $tenant: Service tenant name.
- #    Optional. Defaults to 'services'.
- #  $public_protocol: http/https.
- #    Optional. Defaults to 'http'.
- #  $configure_endpoint: should the endpoint be created in keystone ?
- #    Optional. Defaults to true
+ # [*password*]
+ #   Password for Ceilometer user. Required.
  #
- class ceilometer::keystone::auth(
-   $password           = false,
+ # [*email*]
+ #   Email for Ceilometer user. Optional. Defaults to 'ceilometer@localhost'.
+ #
+ # [*auth_name*]
+ #   Username for Ceilometer service. Optional. Defaults to 'ceilometer'.
+ #
+ # [*configure_endpoint*]
+ #   Should Ceilometer endpoint be configured? Optional. Defaults to 'true'.
+ #
+ # [*service_type*]
+ #    Type of service. Optional. Defaults to 'metering'.
+ #
+ # [*public_address*]
+ #    Public address for endpoint. Optional. Defaults to '127.0.0.1'.
+ #
+ # [*admin_address*]
+ #    Admin address for endpoint. Optional. Defaults to '127.0.0.1'.
+ #
+ # [*internal_address*]
+ #    Internal address for endpoint. Optional. Defaults to '127.0.0.1'.
+ #
+ # [*port*]
+ #    Port for endpoint. Optional. Defaults to '8777'.
+ #
+ # [*region*]
+ #    Region for endpoint. Optional. Defaults to 'RegionOne'.
+ #
+ # [*tenant*]
+ #    Tenant for Ceilometer user. Optional. Defaults to 'services'.
+ #
+ # [*protocol*]
+ #    Protocol for public endpoint. Optional. Defaults to 'http'.
+ #
+ class ceilometer::keystone::auth (
 -  $password,
++  $password = false,
    $email              = 'ceilometer@localhost',
    $auth_name          = 'ceilometer',
 -  $configure_endpoint = true,
    $service_type       = 'metering',
    $public_address     = '127.0.0.1',
    $admin_address      = '127.0.0.1',
    $port               = '8777',
    $region             = 'RegionOne',
    $tenant             = 'services',
 -  $public_protocol    = 'http'
 +  $public_protocol    = 'http',
 +  $admin_protocol     = 'http',
 +  $internal_protocol  = 'http',
 +  $configure_endpoint = true
  ) {
  
 -  Keystone_user_role["${auth_name}@${tenant}"] ~> Service <| title == 'ceilometer-api' |>
 +  validate_string($password)
 +
 +  Keystone_user_role["${auth_name}@${tenant}"] ~>
-     Service <| name == 'ceilometer' |>
++    Service <| name == 'ceilometer-api' |>
  
    keystone_user { $auth_name:
      ensure   => present,