From aeb3c00fc5c75a2ba3e3f46836e9191965b1c37d Mon Sep 17 00:00:00 2001 From: Ryan Hefner Date: Fri, 13 Jun 2014 13:34:10 -0400 Subject: [PATCH] cinder -> manila text replace --- .fixtures.yml | 2 +- .gitreview | 2 +- Modulefile | 10 +- README.md | 104 +++++------ examples/manila_volume_with_pacemaker.pp | 24 +-- .../cinder_api_paste_ini/ini_setting.rb | 4 +- .../provider/cinder_config/ini_setting.rb | 4 +- lib/puppet/type/manila_api_paste_ini.rb | 4 +- lib/puppet/type/manila_config.rb | 4 +- manifests/api.pp | 76 ++++---- manifests/backend/eqlx.pp | 12 +- manifests/backend/glusterfs.pp | 20 +-- manifests/backend/iscsi.pp | 24 +-- manifests/backend/netapp.pp | 16 +- manifests/backend/nexenta.pp | 18 +- manifests/backend/nfs.pp | 14 +- manifests/backend/rbd.pp | 32 ++-- manifests/backend/san.pp | 10 +- manifests/backend/solidfire.pp | 14 +- manifests/backend/vmdk.pp | 20 +-- manifests/backends.pp | 8 +- manifests/backup.pp | 40 ++--- manifests/backup/ceph.pp | 14 +- manifests/backup/swift.pp | 10 +- manifests/ceilometer.pp | 10 +- manifests/client.pp | 12 +- manifests/config.pp | 22 +-- manifests/db/mysql.pp | 14 +- manifests/db/mysql/host_access.pp | 4 +- manifests/db/postgresql.pp | 12 +- manifests/db/sync.pp | 12 +- manifests/glance.pp | 14 +- manifests/init.pp | 96 +++++----- manifests/keystone/auth.pp | 34 ++-- manifests/params.pp | 46 ++--- manifests/qpid.pp | 8 +- manifests/quota.pp | 12 +- manifests/rabbitmq.pp | 12 +- manifests/scheduler.pp | 30 ++-- manifests/setup_test_volume.pp | 8 +- manifests/type.pp | 18 +- manifests/type_set.pp | 10 +- manifests/vmware.pp | 16 +- manifests/volume.pp | 30 ++-- manifests/volume/eqlx.pp | 8 +- manifests/volume/glusterfs.pp | 14 +- manifests/volume/iscsi.pp | 8 +- manifests/volume/netapp.pp | 14 +- manifests/volume/nexenta.pp | 16 +- manifests/volume/nfs.pp | 6 +- manifests/volume/rbd.pp | 12 +- manifests/volume/san.pp | 10 +- manifests/volume/solidfire.pp | 14 +- manifests/volume/vmdk.pp | 16 +- spec/classes/manila_api_spec.rb | 64 +++---- spec/classes/manila_backends_spec.rb | 20 +-- spec/classes/manila_backup_ceph_spec.rb | 40 ++--- spec/classes/manila_backup_spec.rb | 48 ++--- spec/classes/manila_backup_swift_spec.rb | 34 ++-- spec/classes/manila_ceilometer_spec.rb | 6 +- spec/classes/manila_client_spec.rb | 6 +- spec/classes/manila_db_mysql_spec.rb | 44 ++--- spec/classes/manila_db_postgresql_spec.rb | 6 +- spec/classes/manila_db_sync_spec.rb | 8 +- spec/classes/manila_glance_spec.rb | 26 +-- spec/classes/manila_keystone_auth_spec.rb | 26 +-- spec/classes/manila_params_spec.rb | 2 +- spec/classes/manila_qpid_spec.rb | 2 +- spec/classes/manila_quota_spec.rb | 22 +-- spec/classes/manila_rabbitmq_spec.rb | 2 +- spec/classes/manila_scheduler_spec.rb | 36 ++-- spec/classes/manila_setup_test_volume_spec.rb | 8 +- spec/classes/manila_spec.rb | 168 +++++++++--------- spec/classes/manila_vmware_spec.rb | 12 +- spec/classes/manila_volume_eqlx_spec.rb | 10 +- spec/classes/manila_volume_glusterfs_spec.rb | 26 +-- spec/classes/manila_volume_iscsi_spec.rb | 14 +- spec/classes/manila_volume_netapp_spec.rb | 10 +- spec/classes/manila_volume_nexenta_spec.rb | 10 +- spec/classes/manila_volume_nfs_spec.rb | 34 ++-- spec/classes/manila_volume_rbd_spec.rb | 38 ++-- spec/classes/manila_volume_san_spec.rb | 8 +- spec/classes/manila_volume_solidfire_spec.rb | 12 +- spec/classes/manila_volume_spec.rb | 10 +- spec/classes/manila_volume_vmdk_spec.rb | 40 ++--- spec/defines/manila_backend_eqlx_spec.rb | 8 +- spec/defines/manila_backend_glusterfs_spec.rb | 26 +-- spec/defines/manila_backend_iscsi_spec.rb | 16 +- spec/defines/manila_backend_netapp_spec.rb | 10 +- spec/defines/manila_backend_nexenta_spec.rb | 10 +- spec/defines/manila_backend_nfs_spec.rb | 36 ++-- spec/defines/manila_backend_rbd_spec.rb | 54 +++--- spec/defines/manila_backend_san_spec.rb | 8 +- spec/defines/manila_backend_solidfire_spec.rb | 12 +- spec/defines/manila_backend_vmdk_spec.rb | 42 ++--- spec/defines/manila_type_set_spec.rb | 8 +- spec/defines/manila_type_spec.rb | 14 +- 97 files changed, 1030 insertions(+), 1030 deletions(-) diff --git a/.fixtures.yml b/.fixtures.yml index 5f569f24..f4de6452 100644 --- a/.fixtures.yml +++ b/.fixtures.yml @@ -16,4 +16,4 @@ fixtures: 'stdlib': 'git://github.com/puppetlabs/puppetlabs-stdlib.git' 'sysctl': 'git://github.com/duritong/puppet-sysctl.git' symlinks: - 'cinder': "#{source_dir}" + 'manila': "#{source_dir}" diff --git a/.gitreview b/.gitreview index 8afd6562..bfcdf9a0 100644 --- a/.gitreview +++ b/.gitreview @@ -1,4 +1,4 @@ [gerrit] host=review.openstack.org port=29418 -project=stackforge/puppet-cinder.git +project=stackforge/puppet-manila.git diff --git a/Modulefile b/Modulefile index 2cccdcec..e6dd1b9d 100644 --- a/Modulefile +++ b/Modulefile @@ -1,11 +1,11 @@ -name 'puppetlabs-cinder' +name 'puppetlabs-manila' version '4.0.0' -source 'https://github.com/stackforge/puppet-cinder' +source 'https://github.com/stackforge/puppet-manila' author 'Puppet Labs' license 'Apache License 2.0' -summary 'Puppet Labs Cinder Module' -description 'Puppet module to install and configure the Openstack Cinder block storage service' -project_page 'https://launchpad.net/puppet-cinder' +summary 'Puppet Labs Manila Module' +description 'Puppet module to install and configure the Openstack Manila block storage service' +project_page 'https://launchpad.net/puppet-manila' dependency 'dprince/qpid', '>=1.0.0 <2.0.0' dependency 'puppetlabs/inifile', '>=1.0.0 <2.0.0' diff --git a/README.md b/README.md index 8aa7e76a..3bbce5f6 100644 --- a/README.md +++ b/README.md @@ -1,13 +1,13 @@ -cinder +manila ======= 4.0.0 - 2014.1.0 - Icehouse #### Table of Contents -1. [Overview - What is the cinder module?](#overview) +1. [Overview - What is the manila module?](#overview) 2. [Module Description - What does the module do?](#module-description) -3. [Setup - The basics of getting started with cinder](#setup) +3. [Setup - The basics of getting started with manila](#setup) 4. [Implementation - An under-the-hood peek at what the module is doing](#implementation) 5. [Limitations - OS compatibility, etc.](#limitations) 6. [Development - Guide for contributing to the module](#development) @@ -17,41 +17,41 @@ cinder Overview -------- -The cinder module is a part of [Stackforge](https://github.com/stackfoge), an effort by the Openstack infrastructure team to provide continuous integration testing and code review for Openstack and Openstack community projects not part of the core software. The module its self is used to flexibly configure and manage the block storage service for Openstack. +The manila module is a part of [Stackforge](https://github.com/stackfoge), an effort by the Openstack infrastructure team to provide continuous integration testing and code review for Openstack and Openstack community projects not part of the core software. The module its self is used to flexibly configure and manage the block storage service for Openstack. Module Description ------------------ -The cinder module is a thorough attempt to make Puppet capable of managing the entirety of cinder. This includes manifests to provision such things as keystone endpoints, RPC configurations specific to cinder, and database connections. Types are shipped as part of the cinder module to assist in manipulation of configuration files. +The manila module is a thorough attempt to make Puppet capable of managing the entirety of manila. This includes manifests to provision such things as keystone endpoints, RPC configurations specific to manila, and database connections. Types are shipped as part of the manila module to assist in manipulation of configuration files. This module is tested in combination with other modules needed to build and leverage an entire Openstack software stack. These modules can be found, all pulled together in the [openstack module](https://github.com/stackfoge/puppet-openstack). Setup ----- -**What the cinder module affects** +**What the manila module affects** -* cinder, the block storage service for Openstack. +* manila, the block storage service for Openstack. -### Installing cinder +### Installing manila - puppet module install puppetlabs/cinder + puppet module install puppetlabs/manila -### Beginning with cinder +### Beginning with manila -To utilize the cinder module's functionality you will need to declare multiple resources. The following is a modified excerpt from the [openstack module](https://github.com/stackfoge/puppet-openstack). This is not an exhaustive list of all the components needed, we recommend you consult and understand the [openstack module](https://github.com/stackforge/puppet-openstack) and the [core openstack](http://docs.openstack.org) documentation. +To utilize the manila module's functionality you will need to declare multiple resources. The following is a modified excerpt from the [openstack module](https://github.com/stackfoge/puppet-openstack). This is not an exhaustive list of all the components needed, we recommend you consult and understand the [openstack module](https://github.com/stackforge/puppet-openstack) and the [core openstack](http://docs.openstack.org) documentation. -**Define a cinder control node** +**Define a manila control node** ```puppet -class { 'cinder': - database_connection => 'mysql://cinder:secret_block_password@openstack-controller.example.com/cinder', +class { 'manila': + database_connection => 'mysql://manila:secret_block_password@openstack-controller.example.com/manila', rabbit_password => 'secret_rpc_password_for_blocks', rabbit_host => 'openstack-controller.example.com', verbose => true, } -class { 'cinder::api': +class { 'manila::api': keystone_password => $keystone_password, keystone_enabled => $keystone_enabled, keystone_user => $keystone_user, @@ -59,87 +59,87 @@ class { 'cinder::api': keystone_auth_port => $keystone_auth_port, keystone_auth_protocol => $keystone_auth_protocol, service_port => $keystone_service_port, - package_ensure => $cinder_api_package_ensure, - bind_host => $cinder_bind_host, - enabled => $cinder_api_enabled, + package_ensure => $manila_api_package_ensure, + bind_host => $manila_bind_host, + enabled => $manila_api_enabled, } -class { 'cinder::scheduler': - scheduler_driver => 'cinder.scheduler.simple.SimpleScheduler', +class { 'manila::scheduler': + scheduler_driver => 'manila.scheduler.simple.SimpleScheduler', } ``` -**Define a cinder storage node** +**Define a manila storage node** ```puppet -class { 'cinder': - database_connection => 'mysql://cinder:secret_block_password@openstack-controller.example.com/cinder', +class { 'manila': + database_connection => 'mysql://manila:secret_block_password@openstack-controller.example.com/manila', rabbit_password => 'secret_rpc_password_for_blocks', rabbit_host => 'openstack-controller.example.com', verbose => true, } -class { 'cinder::volume': } +class { 'manila::volume': } -class { 'cinder::volume::iscsi': +class { 'manila::volume::iscsi': iscsi_ip_address => '10.0.0.2', } ``` -**Define a cinder storage node with multiple backends ** +**Define a manila storage node with multiple backends ** ```puppet -class { 'cinder': - database_connection => 'mysql://cinder:secret_block_password@openstack-controller.example.com/cinder', +class { 'manila': + database_connection => 'mysql://manila:secret_block_password@openstack-controller.example.com/manila', rabbit_password => 'secret_rpc_password_for_blocks', rabbit_host => 'openstack-controller.example.com', verbose => true, } -class { 'cinder::volume': } +class { 'manila::volume': } -cinder::backend::iscsi {'iscsi1': +manila::backend::iscsi {'iscsi1': iscsi_ip_address => '10.0.0.2', } -cinder::backend::iscsi {'iscsi2': +manila::backend::iscsi {'iscsi2': iscsi_ip_address => '10.0.0.3', } -cinder::backend::iscsi {'iscsi3': +manila::backend::iscsi {'iscsi3': iscsi_ip_address => '10.0.0.4', volume_backend_name => 'iscsi', } -cinder::backend::iscsi {'iscsi4': +manila::backend::iscsi {'iscsi4': iscsi_ip_address => '10.0.0.5', volume_backend_name => 'iscsi', } -cinder::backend::rbd {'rbd-images': +manila::backend::rbd {'rbd-images': rbd_pool => 'images', rbd_user => 'images', } -# Cinder::Type requires keystone credentials -Cinder::Type { +# Manila::Type requires keystone credentials +Manila::Type { os_password => 'admin', os_tenant_name => 'admin', os_username => 'admin', os_auth_url => 'http://127.0.0.1:5000/v2.0/', } -cinder::type {'iscsi': +manila::type {'iscsi': set_key => 'volume_backend_name', set_value => ['iscsi1', 'iscsi2', 'iscsi'] } -cinder::type {'rbd': +manila::type {'rbd': set_key => 'volume_backend_name', set_value => 'rbd-images', } -class { 'cinder::backends': +class { 'manila::backends': enabled_backends => ['iscsi1', 'iscsi2', 'rbd-images'] } ``` @@ -148,22 +148,22 @@ Note: that the name passed to any backend resource must be unique accross all ba ** Using type and type_set ** -Cinder allows for the usage of type to set extended information that can be used for various reasons. We have resource provider for ``type`` and ``type_set`` Since types are rarely defined with out also setting attributes with it, the resource for ``type`` can also call ``type_set`` if you pass ``set_key`` and ``set_value`` +Manila allows for the usage of type to set extended information that can be used for various reasons. We have resource provider for ``type`` and ``type_set`` Since types are rarely defined with out also setting attributes with it, the resource for ``type`` can also call ``type_set`` if you pass ``set_key`` and ``set_value`` Implementation -------------- -### cinder +### manila -cinder is a combination of Puppet manifest and ruby code to delivery configuration and extra functionality through types and providers. +manila is a combination of Puppet manifest and ruby code to delivery configuration and extra functionality through types and providers. Limitations ------------ -* Setup of storage nodes is limited to Linux and LVM, i.e. Puppet won't configure a Nexenta appliance but nova can be configured to use the Nexenta driver with Class['cinder::volume::nexenta']. +* Setup of storage nodes is limited to Linux and LVM, i.e. Puppet won't configure a Nexenta appliance but nova can be configured to use the Nexenta driver with Class['manila::volume::nexenta']. -* The Cinder Openstack service depends on a sqlalchemy database. If you are using puppetlabs-mysql to achieve this, there is a parameter called mysql_module that can be used to swap between the two supported versions: 0.9 and 2.2. This is needed because the puppetlabs-mysql module was rewritten and the custom type names have changed between versions. +* The Manila Openstack service depends on a sqlalchemy database. If you are using puppetlabs-mysql to achieve this, there is a parameter called mysql_module that can be used to swap between the two supported versions: 0.9 and 2.2. This is needed because the puppetlabs-mysql module was rewritten and the custom type names have changed between versions. Development ----------- @@ -174,7 +174,7 @@ Developer documentation for the entire puppet-openstack project. Contributors ------------ -* https://github.com/stackforge/puppet-cinder/graphs/contributors +* https://github.com/stackforge/puppet-manila/graphs/contributors Release Notes ------------- @@ -189,10 +189,10 @@ Release Notes * Added region support. * Added support for MySQL module (>= 2.2). * Added support for Swift and Ceph backup backend. -* Added cinder::config to handle additional custom options. +* Added manila::config to handle additional custom options. * Refactored duplicate code for single and multiple backends. * Removed control exchange flag. -* Removed deprecated cinder::base class. +* Removed deprecated manila::base class. **3.1.1** @@ -200,11 +200,11 @@ Release Notes **3.1.0** -* Added default_volume_type as a Cinder API parameter. +* Added default_volume_type as a Manila API parameter. * Added parameter for endpoint procols. * Deprecated glance_api_version. * Added support for VMDK. -* Added support for Cinder multi backend. +* Added support for Manila multi backend. * Added support for https authentication endpoints. * Replaced pip with native package manager (VMDK). @@ -213,7 +213,7 @@ Release Notes * Major release for OpenStack Havana. * Added support for SolidFire. * Added support for ceilometer. -* Fixed bug for cinder-volume requirement. +* Fixed bug for manila-volume requirement. **2.2.0** @@ -228,7 +228,7 @@ Release Notes **2.1.0** -* Added configuration of Cinder quotas. +* Added configuration of Manila quotas. * Added support for NetApp direct driver backend. * Added support for ceph backend. * Added support for SQL idle timeout. @@ -242,7 +242,7 @@ Release Notes **2.0.0** * Upstream is now part of stackfoge. -* Nexenta, NFS, and SAN support added as cinder volume drivers. +* Nexenta, NFS, and SAN support added as manila volume drivers. * Postgres support added. * The Apache Qpid and the RabbitMQ message brokers available as RPC backends. * Configurability of scheduler_driver. diff --git a/examples/manila_volume_with_pacemaker.pp b/examples/manila_volume_with_pacemaker.pp index 4a38db7f..197473ba 100644 --- a/examples/manila_volume_with_pacemaker.pp +++ b/examples/manila_volume_with_pacemaker.pp @@ -1,4 +1,4 @@ -# Example: managing cinder controller services with pacemaker +# Example: managing manila controller services with pacemaker # # By setting enabled to false, these services will not be started at boot. By setting # manage_service to false, puppet will not kill these services on every run. This @@ -7,33 +7,33 @@ # # The puppet commands below would ideally be applied to at least three nodes. # -# Note that cinder-api is associated with the virtual IP address as +# Note that manila-api is associated with the virtual IP address as # it is called from external services. The remaining services connect to the # database and/or message broker independently. # # Example pacemaker resource configuration commands (configured once per cluster): # -# sudo pcs resource create cinder_vip ocf:heartbeat:IPaddr2 params ip=192.0.2.3 \ +# sudo pcs resource create manila_vip ocf:heartbeat:IPaddr2 params ip=192.0.2.3 \ # cidr_netmask=24 op monitor interval=10s # -# sudo pcs resource create cinder_api_service lsb:openstack-cinder-api -# sudo pcs resource create cinder_scheduler_service lsb:openstack-cinder-scheduler +# sudo pcs resource create manila_api_service lsb:openstack-manila-api +# sudo pcs resource create manila_scheduler_service lsb:openstack-manila-scheduler # -# sudo pcs constraint colocation add cinder_api_service with cinder_vip +# sudo pcs constraint colocation add manila_api_service with manila_vip -class { 'cinder': - database_connection => 'mysql://cinder:secret_block_password@openstack-controller.example.com/cinder', +class { 'manila': + database_connection => 'mysql://manila:secret_block_password@openstack-controller.example.com/manila', } -class { 'cinder::api': +class { 'manila::api': keystone_password => 'CINDER_PW', - keystone_user => 'cinder', + keystone_user => 'manila', enabled => false, manage_service => false, } -class { 'cinder::scheduler': - scheduler_driver => 'cinder.scheduler.simple.SimpleScheduler', +class { 'manila::scheduler': + scheduler_driver => 'manila.scheduler.simple.SimpleScheduler', enabled => false, manage_service => false, } diff --git a/lib/puppet/provider/cinder_api_paste_ini/ini_setting.rb b/lib/puppet/provider/cinder_api_paste_ini/ini_setting.rb index 26c3b528..0998a203 100644 --- a/lib/puppet/provider/cinder_api_paste_ini/ini_setting.rb +++ b/lib/puppet/provider/cinder_api_paste_ini/ini_setting.rb @@ -1,4 +1,4 @@ -Puppet::Type.type(:cinder_api_paste_ini).provide( +Puppet::Type.type(:manila_api_paste_ini).provide( :ini_setting, :parent => Puppet::Type.type(:ini_setting).provider(:ruby) ) do @@ -16,7 +16,7 @@ Puppet::Type.type(:cinder_api_paste_ini).provide( end def self.file_path - '/etc/cinder/api-paste.ini' + '/etc/manila/api-paste.ini' end # added for backwards compatibility with older versions of inifile diff --git a/lib/puppet/provider/cinder_config/ini_setting.rb b/lib/puppet/provider/cinder_config/ini_setting.rb index 6dcd9559..de54844a 100644 --- a/lib/puppet/provider/cinder_config/ini_setting.rb +++ b/lib/puppet/provider/cinder_config/ini_setting.rb @@ -1,4 +1,4 @@ -Puppet::Type.type(:cinder_config).provide( +Puppet::Type.type(:manila_config).provide( :ini_setting, :parent => Puppet::Type.type(:ini_setting).provider(:ruby) ) do @@ -16,7 +16,7 @@ Puppet::Type.type(:cinder_config).provide( end def self.file_path - '/etc/cinder/cinder.conf' + '/etc/manila/manila.conf' end # added for backwards compatibility with older versions of inifile diff --git a/lib/puppet/type/manila_api_paste_ini.rb b/lib/puppet/type/manila_api_paste_ini.rb index d895b4a3..0b8b78b8 100644 --- a/lib/puppet/type/manila_api_paste_ini.rb +++ b/lib/puppet/type/manila_api_paste_ini.rb @@ -1,9 +1,9 @@ -Puppet::Type.newtype(:cinder_api_paste_ini) do +Puppet::Type.newtype(:manila_api_paste_ini) do ensurable newparam(:name, :namevar => true) do - desc 'Section/setting name to manage from /etc/cinder/api-paste.ini' + desc 'Section/setting name to manage from /etc/manila/api-paste.ini' newvalues(/\S+\/\S+/) end diff --git a/lib/puppet/type/manila_config.rb b/lib/puppet/type/manila_config.rb index 62d38256..8ea614bb 100644 --- a/lib/puppet/type/manila_config.rb +++ b/lib/puppet/type/manila_config.rb @@ -1,9 +1,9 @@ -Puppet::Type.newtype(:cinder_config) do +Puppet::Type.newtype(:manila_config) do ensurable newparam(:name, :namevar => true) do - desc 'Section/setting name to manage from /etc/cinder/cinder.conf' + desc 'Section/setting name to manage from /etc/manila/manila.conf' newvalues(/\S+\/\S+/) end diff --git a/manifests/api.pp b/manifests/api.pp index 8a404cd6..249dd447 100644 --- a/manifests/api.pp +++ b/manifests/api.pp @@ -1,6 +1,6 @@ -# == Class: cinder::api +# == Class: manila::api # -# Setup and configure the cinder API endpoint +# Setup and configure the manila API endpoint # # === Parameters # @@ -17,7 +17,7 @@ # # [*keystone_user*] # (optional) The name of the auth user -# Defaults to cinder +# Defaults to manila # # [*keystone_auth_host*] # (optional) The keystone host @@ -32,7 +32,7 @@ # Defaults to http. # # [*os_region_name*] -# (optional) Some operations require cinder to make API requests +# (optional) Some operations require manila to make API requests # to Nova. This sets the keystone region to be used for these # requests. For example, boot-from-volume. # Defaults to undef. @@ -45,7 +45,7 @@ # leading '/' and no trailing '/'. # # [*service_port*] -# (optional) The cinder api port +# (optional) The manila api port # Defaults to 5000 # # [*package_ensure*] @@ -53,7 +53,7 @@ # Defaults to present # # [*bind_host*] -# (optional) The cinder api bind address +# (optional) The manila api bind address # Defaults to 0.0.0.0 # # [*enabled*] @@ -70,7 +70,7 @@ # # [*ratelimits_factory*] # (optional) Factory to use for ratelimiting -# Defaults to 'cinder.api.v1.limits:RateLimitingMiddleware.factory' +# Defaults to 'manila.api.v1.limits:RateLimitingMiddleware.factory' # # [*default_volume_type*] # (optional) default volume type to use. @@ -78,11 +78,11 @@ # If not configured, it produces an error when creating a volume # without specifying a type. # Defaults to 'false'. -class cinder::api ( +class manila::api ( $keystone_password, $keystone_enabled = true, $keystone_tenant = 'services', - $keystone_user = 'cinder', + $keystone_user = 'manila', $keystone_auth_host = 'localhost', $keystone_auth_port = '35357', $keystone_auth_protocol = 'http', @@ -97,35 +97,35 @@ class cinder::api ( $ratelimits = undef, $default_volume_type = false, $ratelimits_factory = - 'cinder.api.v1.limits:RateLimitingMiddleware.factory' + 'manila.api.v1.limits:RateLimitingMiddleware.factory' ) { - include cinder::params + include manila::params - Cinder_config<||> ~> Service['cinder-api'] - Cinder_api_paste_ini<||> ~> Service['cinder-api'] + Manila_config<||> ~> Service['manila-api'] + Manila_api_paste_ini<||> ~> Service['manila-api'] - if $::cinder::params::api_package { - Package['cinder-api'] -> Cinder_config<||> - Package['cinder-api'] -> Cinder_api_paste_ini<||> - Package['cinder-api'] -> Service['cinder-api'] - package { 'cinder-api': + if $::manila::params::api_package { + Package['manila-api'] -> Manila_config<||> + Package['manila-api'] -> Manila_api_paste_ini<||> + Package['manila-api'] -> Service['manila-api'] + package { 'manila-api': ensure => $package_ensure, - name => $::cinder::params::api_package, + name => $::manila::params::api_package, } } if $enabled { - Cinder_config<||> ~> Exec['cinder-manage db_sync'] + Manila_config<||> ~> Exec['manila-manage db_sync'] - exec { 'cinder-manage db_sync': - command => $::cinder::params::db_sync_command, + exec { 'manila-manage db_sync': + command => $::manila::params::db_sync_command, path => '/usr/bin', - user => 'cinder', + user => 'manila', refreshonly => true, logoutput => 'on_failure', - require => Package['cinder'], + require => Package['manila'], } if $manage_service { $ensure = 'running' @@ -136,35 +136,35 @@ class cinder::api ( } } - service { 'cinder-api': + service { 'manila-api': ensure => $ensure, - name => $::cinder::params::api_service, + name => $::manila::params::api_service, enable => $enabled, hasstatus => true, - require => Package['cinder'], + require => Package['manila'], } - cinder_config { + manila_config { 'DEFAULT/osapi_volume_listen': value => $bind_host } if $os_region_name { - cinder_config { + manila_config { 'DEFAULT/os_region_name': value => $os_region_name; } } if $keystone_auth_uri { - cinder_api_paste_ini { 'filter:authtoken/auth_uri': value => $keystone_auth_uri; } + manila_api_paste_ini { 'filter:authtoken/auth_uri': value => $keystone_auth_uri; } } else { - cinder_api_paste_ini { 'filter:authtoken/auth_uri': value => "${keystone_auth_protocol}://${keystone_auth_host}:${service_port}/"; } + manila_api_paste_ini { 'filter:authtoken/auth_uri': value => "${keystone_auth_protocol}://${keystone_auth_host}:${service_port}/"; } } if $keystone_enabled { - cinder_config { + manila_config { 'DEFAULT/auth_strategy': value => 'keystone' ; } - cinder_api_paste_ini { + manila_api_paste_ini { 'filter:authtoken/service_protocol': value => $keystone_auth_protocol; 'filter:authtoken/service_host': value => $keystone_auth_host; 'filter:authtoken/service_port': value => $service_port; @@ -177,7 +177,7 @@ class cinder::api ( } if ($ratelimits != undef) { - cinder_api_paste_ini { + manila_api_paste_ini { 'filter:ratelimit/paste.filter_factory': value => $ratelimits_factory; 'filter:ratelimit/limits': value => $ratelimits; } @@ -185,22 +185,22 @@ class cinder::api ( if $keystone_auth_admin_prefix { validate_re($keystone_auth_admin_prefix, '^(/.+[^/])?$') - cinder_api_paste_ini { + manila_api_paste_ini { 'filter:authtoken/auth_admin_prefix': value => $keystone_auth_admin_prefix; } } else { - cinder_api_paste_ini { + manila_api_paste_ini { 'filter:authtoken/auth_admin_prefix': ensure => absent; } } } if $default_volume_type { - cinder_config { + manila_config { 'DEFAULT/default_volume_type': value => $default_volume_type; } } else { - cinder_config { + manila_config { 'DEFAULT/default_volume_type': ensure => absent; } } diff --git a/manifests/backend/eqlx.pp b/manifests/backend/eqlx.pp index 74ec4e3e..e0a5e585 100644 --- a/manifests/backend/eqlx.pp +++ b/manifests/backend/eqlx.pp @@ -1,6 +1,6 @@ -# == define: cinder::backend::eqlx +# == define: manila::backend::eqlx # -# Configure the Dell EqualLogic driver for cinder. +# Configure the Dell EqualLogic driver for manila. # # === Parameters # @@ -49,7 +49,7 @@ # (optional) The maximum retry count for reconnection. # Defaults to 5 # -define cinder::backend::eqlx ( +define manila::backend::eqlx ( $san_ip, $san_login, $san_password, @@ -63,9 +63,9 @@ define cinder::backend::eqlx ( $eqlx_cli_timeout = 30, $eqlx_cli_max_retries = 5, ) { - cinder_config { + manila_config { "${name}/volume_backend_name": value => $volume_backend_name; - "${name}/volume_driver": value => 'cinder.volume.drivers.eqlx.DellEQLSanISCSIDriver'; + "${name}/volume_driver": value => 'manila.volume.drivers.eqlx.DellEQLSanISCSIDriver'; "${name}/san_ip": value => $san_ip; "${name}/san_login": value => $san_login; "${name}/san_password": value => $san_password; @@ -78,7 +78,7 @@ define cinder::backend::eqlx ( } if(str2bool($eqlx_use_chap)) { - cinder_config { + manila_config { "${name}/eqlx_chap_login": value => $eqlx_chap_login; "${name}/eqlx_chap_password": value => $eqlx_chap_password; } diff --git a/manifests/backend/glusterfs.pp b/manifests/backend/glusterfs.pp index 5121bb1a..3159479d 100644 --- a/manifests/backend/glusterfs.pp +++ b/manifests/backend/glusterfs.pp @@ -1,7 +1,7 @@ # -# == Class: cinder::backend::glusterfs +# == Class: manila::backend::glusterfs # -# Configures Cinder to use GlusterFS as a volume driver +# Configures Manila to use GlusterFS as a volume driver # # === Parameters # @@ -26,21 +26,21 @@ # # [*glusterfs_shares_config*] # (optional) The config file to store the given $glusterfs_shares. -# Defaults to '/etc/cinder/shares.conf' +# Defaults to '/etc/manila/shares.conf' # # === Examples # -# cinder::backend::glusterfs { 'myGluster': +# manila::backend::glusterfs { 'myGluster': # glusterfs_shares = ['192.168.1.1:/volumes'], # } # -define cinder::backend::glusterfs ( +define manila::backend::glusterfs ( $glusterfs_shares, $volume_backend_name = $name, $glusterfs_disk_util = false, $glusterfs_sparsed_volumes = undef, $glusterfs_mount_point_base = undef, - $glusterfs_shares_config = '/etc/cinder/shares.conf' + $glusterfs_shares_config = '/etc/manila/shares.conf' ) { if $glusterfs_disk_util { @@ -51,14 +51,14 @@ define cinder::backend::glusterfs ( file { $glusterfs_shares_config: content => "${content}\n", - require => Package['cinder'], - notify => Service['cinder-volume'] + require => Package['manila'], + notify => Service['manila-volume'] } - cinder_config { + manila_config { "${name}/volume_backend_name": value => $volume_backend_name; "${name}/volume_driver": value => - 'cinder.volume.drivers.glusterfs.GlusterfsDriver'; + 'manila.volume.drivers.glusterfs.GlusterfsDriver'; "${name}/glusterfs_shares_config": value => $glusterfs_shares_config; "${name}/glusterfs_sparsed_volumes": value => $glusterfs_sparsed_volumes; "${name}/glusterfs_mount_point_base": value => $glusterfs_mount_point_base; diff --git a/manifests/backend/iscsi.pp b/manifests/backend/iscsi.pp index cc6cb2e5..b57160da 100644 --- a/manifests/backend/iscsi.pp +++ b/manifests/backend/iscsi.pp @@ -1,5 +1,5 @@ # -# Define: cinder::backend::iscsi +# Define: manila::backend::iscsi # Parameters: # # [*volume_backend_name*] @@ -7,16 +7,16 @@ # Defaults to: $name # # -define cinder::backend::iscsi ( +define manila::backend::iscsi ( $iscsi_ip_address, $volume_backend_name = $name, - $volume_group = 'cinder-volumes', - $iscsi_helper = $::cinder::params::iscsi_helper, + $volume_group = 'manila-volumes', + $iscsi_helper = $::manila::params::iscsi_helper, ) { - include cinder::params + include manila::params - cinder_config { + manila_config { "${name}/volume_backend_name": value => $volume_backend_name; "${name}/iscsi_ip_address": value => $iscsi_ip_address; "${name}/iscsi_helper": value => $iscsi_helper; @@ -27,13 +27,13 @@ define cinder::backend::iscsi ( 'tgtadm': { package { 'tgt': ensure => present, - name => $::cinder::params::tgt_package_name, + name => $::manila::params::tgt_package_name, } if($::osfamily == 'RedHat') { - file_line { 'cinder include': + file_line { 'manila include': path => '/etc/tgt/targets.conf', - line => 'include /etc/cinder/volumes/*', + line => 'include /etc/manila/volumes/*', match => '#?include /', require => Package['tgt'], notify => Service['tgtd'], @@ -42,16 +42,16 @@ define cinder::backend::iscsi ( service { 'tgtd': ensure => running, - name => $::cinder::params::tgt_service_name, + name => $::manila::params::tgt_service_name, enable => true, - require => Class['cinder::volume'], + require => Class['manila::volume'], } } 'lioadm': { package { 'targetcli': ensure => present, - name => $::cinder::params::lio_package_name, + name => $::manila::params::lio_package_name, } } diff --git a/manifests/backend/netapp.pp b/manifests/backend/netapp.pp index 0b5a0a5e..e5779a27 100644 --- a/manifests/backend/netapp.pp +++ b/manifests/backend/netapp.pp @@ -1,6 +1,6 @@ -# == define: cinder::backend::netapp +# == define: manila::backend::netapp # -# Configures Cinder to use the NetApp unified volume driver +# Configures Manila to use the NetApp unified volume driver # Compatible for multiple backends # # === Parameters @@ -66,7 +66,7 @@ # (optional) This parameter specifies the virtual storage server (Vserver) # name on the storage cluster on which provisioning of block storage volumes # should occur. If using the NFS storage protocol, this parameter is mandatory -# for storage service catalog support (utilized by Cinder volume type +# for storage service catalog support (utilized by Manila volume type # extra_specs support). If this parameter is specified, the exports belonging # to the Vserver will only be used for provisioning in the future. Block # storage volumes on exports not belonging to the Vserver specified by @@ -101,7 +101,7 @@ # [*netapp_copyoffload_tool_path*] # (optional) This option specifies the path of the NetApp Copy Offload tool # binary. Ensure that the binary has execute permissions set which allow the -# effective user of the cinder-volume process to execute the file. +# effective user of the manila-volume process to execute the file. # Defaults to '' # # [*netapp_controller_ips*] @@ -133,7 +133,7 @@ # # === Examples # -# cinder::backend::netapp { 'myBackend': +# manila::backend::netapp { 'myBackend': # netapp_login => 'clusterAdmin', # netapp_password => 'password', # netapp_server_hostname => 'netapp.mycorp.com', @@ -150,7 +150,7 @@ # # Copyright 2014 NetApp, Inc. # -define cinder::backend::netapp ( +define manila::backend::netapp ( $netapp_login, $netapp_password, $netapp_server_hostname, @@ -174,9 +174,9 @@ define cinder::backend::netapp ( $netapp_webservice_path = '/devmgr/v2', ) { - cinder_config { + manila_config { "${volume_backend_name}/volume_backend_name": value => $volume_backend_name; - "${volume_backend_name}/volume_driver": value => 'cinder.volume.drivers.netapp.common.NetAppDriver'; + "${volume_backend_name}/volume_driver": value => 'manila.volume.drivers.netapp.common.NetAppDriver'; "${volume_backend_name}/netapp_login": value => $netapp_login; "${volume_backend_name}/netapp_password": value => $netapp_password, secret => true; "${volume_backend_name}/netapp_server_hostname": value => $netapp_server_hostname; diff --git a/manifests/backend/nexenta.pp b/manifests/backend/nexenta.pp index 48a219bd..c3d0ecad 100644 --- a/manifests/backend/nexenta.pp +++ b/manifests/backend/nexenta.pp @@ -1,6 +1,6 @@ -# == Class: cinder::backend::nexenta +# == Class: manila::backend::nexenta # -# Setups Cinder with Nexenta volume driver. +# Setups Manila with Nexenta volume driver. # # === Parameters # @@ -18,13 +18,13 @@ # Defaults to: $name # # [*nexenta_volume*] -# (optional) Pool on SA that will hold all volumes. Defaults to 'cinder'. +# (optional) Pool on SA that will hold all volumes. Defaults to 'manila'. # # [*nexenta_target_prefix*] # (optional) IQN prefix for iSCSI targets. Defaults to 'iqn:'. # # [*nexenta_target_group_prefix*] -# (optional) Prefix for iSCSI target groups on SA. Defaults to 'cinder/'. +# (optional) Prefix for iSCSI target groups on SA. Defaults to 'manila/'. # # [*nexenta_blocksize*] # (optional) Block size for volumes. Defaults to '8k'. @@ -32,19 +32,19 @@ # [*nexenta_sparse*] # (optional) Flag to create sparse volumes. Defaults to true. # -define cinder::backend::nexenta ( +define manila::backend::nexenta ( $nexenta_user, $nexenta_password, $nexenta_host, $volume_backend_name = $name, - $nexenta_volume = 'cinder', + $nexenta_volume = 'manila', $nexenta_target_prefix = 'iqn:', - $nexenta_target_group_prefix = 'cinder/', + $nexenta_target_group_prefix = 'manila/', $nexenta_blocksize = '8k', $nexenta_sparse = true ) { - cinder_config { + manila_config { "${name}/volume_backend_name": value => $volume_backend_name; "${name}/nexenta_user": value => $nexenta_user; "${name}/nexenta_password": value => $nexenta_password; @@ -54,6 +54,6 @@ define cinder::backend::nexenta ( "${name}/nexenta_target_group_prefix": value => $nexenta_target_group_prefix; "${name}/nexenta_blocksize": value => $nexenta_blocksize; "${name}/nexenta_sparse": value => $nexenta_sparse; - "${name}/volume_driver": value => 'cinder.volume.drivers.nexenta.volume.NexentaDriver'; + "${name}/volume_driver": value => 'manila.volume.drivers.nexenta.volume.NexentaDriver'; } } diff --git a/manifests/backend/nfs.pp b/manifests/backend/nfs.pp index 137f2697..7664d373 100644 --- a/manifests/backend/nfs.pp +++ b/manifests/backend/nfs.pp @@ -1,4 +1,4 @@ -# ==define cinder::backend::nfs +# ==define manila::backend::nfs # # ===Paramiters # [*volume_backend_name*] @@ -6,28 +6,28 @@ # Defaults to: $name # # -define cinder::backend::nfs ( +define manila::backend::nfs ( $volume_backend_name = $name, $nfs_servers = [], $nfs_mount_options = undef, $nfs_disk_util = undef, $nfs_sparsed_volumes = undef, $nfs_mount_point_base = undef, - $nfs_shares_config = '/etc/cinder/shares.conf', + $nfs_shares_config = '/etc/manila/shares.conf', $nfs_used_ratio = '0.95', $nfs_oversub_ratio = '1.0', ) { file {$nfs_shares_config: content => join($nfs_servers, "\n"), - require => Package['cinder'], - notify => Service['cinder-volume'] + require => Package['manila'], + notify => Service['manila-volume'] } - cinder_config { + manila_config { "${name}/volume_backend_name": value => $volume_backend_name; "${name}/volume_driver": value => - 'cinder.volume.drivers.nfs.NfsDriver'; + 'manila.volume.drivers.nfs.NfsDriver'; "${name}/nfs_shares_config": value => $nfs_shares_config; "${name}/nfs_mount_options": value => $nfs_mount_options; "${name}/nfs_disk_util": value => $nfs_disk_util; diff --git a/manifests/backend/rbd.pp b/manifests/backend/rbd.pp index d8262ac4..968bfe28 100644 --- a/manifests/backend/rbd.pp +++ b/manifests/backend/rbd.pp @@ -1,6 +1,6 @@ -# == define: cinder::backend::rbd +# == define: manila::backend::rbd # -# Setup Cinder to use the RBD driver. +# Setup Manila to use the RBD driver. # Compatible for multiple backends # # === Parameters @@ -39,12 +39,12 @@ # Defaults to '5' # # [*glance_api_version*] -# (optional) DEPRECATED: Use cinder::glance Class instead. +# (optional) DEPRECATED: Use manila::glance Class instead. # Glance API version. (Defaults to '2') # Setting this parameter cause a duplicate resource declaration -# with cinder::glance +# with manila::glance # -define cinder::backend::rbd ( +define manila::backend::rbd ( $rbd_pool, $rbd_user, $volume_backend_name = $name, @@ -57,15 +57,15 @@ define cinder::backend::rbd ( $glance_api_version = undef, ) { - include cinder::params + include manila::params if $glance_api_version { - warning('The glance_api_version parameter is deprecated, use glance_api_version of cinder::glance class instead.') + warning('The glance_api_version parameter is deprecated, use glance_api_version of manila::glance class instead.') } - cinder_config { + manila_config { "${name}/volume_backend_name": value => $volume_backend_name; - "${name}/volume_driver": value => 'cinder.volume.drivers.rbd.RBDDriver'; + "${name}/volume_driver": value => 'manila.volume.drivers.rbd.RBDDriver'; "${name}/rbd_ceph_conf": value => $rbd_ceph_conf; "${name}/rbd_user": value => $rbd_user; "${name}/rbd_pool": value => $rbd_pool; @@ -74,15 +74,15 @@ define cinder::backend::rbd ( } if $rbd_secret_uuid { - cinder_config {"${name}/rbd_secret_uuid": value => $rbd_secret_uuid;} + manila_config {"${name}/rbd_secret_uuid": value => $rbd_secret_uuid;} } else { - cinder_config {"${name}/rbd_secret_uuid": ensure => absent;} + manila_config {"${name}/rbd_secret_uuid": ensure => absent;} } if $volume_tmp_dir { - cinder_config {"${name}/volume_tmp_dir": value => $volume_tmp_dir;} + manila_config {"${name}/volume_tmp_dir": value => $volume_tmp_dir;} } else { - cinder_config {"${name}/volume_tmp_dir": ensure => absent;} + manila_config {"${name}/volume_tmp_dir": ensure => absent;} } case $::osfamily { @@ -98,12 +98,12 @@ define cinder::backend::rbd ( } # Creates an empty file if it doesn't yet exist - ensure_resource('file', $::cinder::params::ceph_init_override, {'ensure' => 'present'}) + ensure_resource('file', $::manila::params::ceph_init_override, {'ensure' => 'present'}) ensure_resource('file_line', 'set initscript env', { line => $override_line, - path => $::cinder::params::ceph_init_override, - notify => Service['cinder-volume'] + path => $::manila::params::ceph_init_override, + notify => Service['manila-volume'] }) } diff --git a/manifests/backend/san.pp b/manifests/backend/san.pp index 50a081a6..b8026752 100644 --- a/manifests/backend/san.pp +++ b/manifests/backend/san.pp @@ -1,12 +1,12 @@ -# == Class: cinder::backend::san +# == Class: manila::backend::san # -# Configures Cinder volume SAN driver. +# Configures Manila volume SAN driver. # Parameters are particular to each volume driver. # # === Parameters # # [*volume_driver*] -# (required) Setup cinder-volume to use volume driver. +# (required) Setup manila-volume to use volume driver. # # [*volume_backend_name*] # (optional) Allows for the volume_backend_name to be separate of $name. @@ -46,7 +46,7 @@ # [*ssh_min_pool_conn*] # (optional) Maximum ssh connections in the pool. # -define cinder::backend::san ( +define manila::backend::san ( $volume_driver, $volume_backend_name = $name, $san_thin_provision = true, @@ -62,7 +62,7 @@ define cinder::backend::san ( $ssh_max_pool_conn = 5 ) { - cinder_config { + manila_config { "${name}/volume_backend_name": value => $volume_backend_name; "${name}/volume_driver": value => $volume_driver; "${name}/san_thin_provision": value => $san_thin_provision; diff --git a/manifests/backend/solidfire.pp b/manifests/backend/solidfire.pp index 0fcc8516..8a4053ed 100644 --- a/manifests/backend/solidfire.pp +++ b/manifests/backend/solidfire.pp @@ -1,6 +1,6 @@ -# == Class: cinder::backend::solidfire +# == Class: manila::backend::solidfire # -# Configures Cinder volume SolidFire driver. +# Configures Manila volume SolidFire driver. # Parameters are particular to each volume driver. # # === Parameters @@ -10,8 +10,8 @@ # Defaults to: $name # # [*volume_driver*] -# (optional) Setup cinder-volume to use SolidFire volume driver. -# Defaults to 'cinder.volume.drivers.solidfire.SolidFire' +# (optional) Setup manila-volume to use SolidFire volume driver. +# Defaults to 'manila.volume.drivers.solidfire.SolidFire' # # [*san_ip*] # (required) IP address of SolidFire clusters MVIP. @@ -38,19 +38,19 @@ # (optional) Port ID to use to connect to SolidFire API. # Defaults to 443 # -define cinder::backend::solidfire( +define manila::backend::solidfire( $san_ip, $san_login, $san_password, $volume_backend_name = $name, - $volume_driver = 'cinder.volume.drivers.solidfire.SolidFire', + $volume_driver = 'manila.volume.drivers.solidfire.SolidFire', $sf_emulate_512 = true, $sf_allow_tenant_qos = false, $sf_account_prefix = '', $sf_api_port = '443' ) { - cinder_config { + manila_config { "${name}/volume_backend_name": value => $volume_backend_name; "${name}/volume_driver": value => $volume_driver; "${name}/san_ip": value => $san_ip; diff --git a/manifests/backend/vmdk.pp b/manifests/backend/vmdk.pp index ea14f696..fdc7419e 100644 --- a/manifests/backend/vmdk.pp +++ b/manifests/backend/vmdk.pp @@ -1,6 +1,6 @@ -# == define: cinder::backend::vmdk +# == define: manila::backend::vmdk # -# Configure the VMware VMDK driver for cinder. +# Configure the VMware VMDK driver for manila. # # === Parameters # @@ -36,7 +36,7 @@ # Defaults to 5. # # [*image_transfer_timeout_secs*] -# (optional) The timeout in seconds for VMDK volume transfer between Cinder and Glance. +# (optional) The timeout in seconds for VMDK volume transfer between Manila and Glance. # Defaults to 7200. # # [*wsdl_location*] @@ -46,15 +46,15 @@ # Defaults to None. # # [*volume_folder*] -# (optional) The name for the folder in the VC datacenter that will contain cinder volumes. -# Defaults to 'cinder-volumes'. +# (optional) The name for the folder in the VC datacenter that will contain manila volumes. +# Defaults to 'manila-volumes'. # -define cinder::backend::vmdk ( +define manila::backend::vmdk ( $host_ip, $host_username, $host_password, $volume_backend_name = $name, - $volume_folder = 'cinder-volumes', + $volume_folder = 'manila-volumes', $api_retry_count = 10, $max_object_retrieval = 100, $task_poll_interval = 5, @@ -62,9 +62,9 @@ define cinder::backend::vmdk ( $wsdl_location = undef ) { - cinder_config { + manila_config { "${name}/volume_backend_name": value => $volume_backend_name; - "${name}/volume_driver": value => 'cinder.volume.drivers.vmware.vmdk.VMwareVcVmdkDriver'; + "${name}/volume_driver": value => 'manila.volume.drivers.vmware.vmdk.VMwareVcVmdkDriver'; "${name}/vmware_host_ip": value => $host_ip; "${name}/vmware_host_username": value => $host_username; "${name}/vmware_host_password": value => $host_password; @@ -76,7 +76,7 @@ define cinder::backend::vmdk ( } if $wsdl_location { - cinder_config { + manila_config { "${name}/vmware_wsdl_location": value => $wsdl_location; } } diff --git a/manifests/backends.pp b/manifests/backends.pp index 7c697193..0114d26a 100644 --- a/manifests/backends.pp +++ b/manifests/backends.pp @@ -1,4 +1,4 @@ -# == Class: cinder::backends +# == Class: manila::backends # # Class to set the enabled_backends list # @@ -10,19 +10,19 @@ # Example: ['volume1', 'volume2', 'sata3'] # # Author: Andrew Woodward -class cinder::backends ( +class manila::backends ( $enabled_backends = undef, # DEPRECATED $default_volume_type = false ){ # Maybe this could be extented to dynamicly find the enabled names - cinder_config { + manila_config { 'DEFAULT/enabled_backends': value => join($enabled_backends, ','); } if $default_volume_type { - fail('The default_volume_type parameter is deprecated in this class, you should declare it in cinder::api.') + fail('The default_volume_type parameter is deprecated in this class, you should declare it in manila::api.') } } diff --git a/manifests/backup.pp b/manifests/backup.pp index a8c575a0..b96c4082 100644 --- a/manifests/backup.pp +++ b/manifests/backup.pp @@ -15,48 +15,48 @@ # License for the specific language governing permissions and limitations # under the License. # -# == Class: cinder::backup +# == Class: manila::backup # -# Setup Cinder backup service +# Setup Manila backup service # # === Parameters # # [*backup_topic*] # (optional) The topic volume backup nodes listen on. -# Defaults to 'cinder-backup' +# Defaults to 'manila-backup' # # [*backup_manager*] # (optional) Full class name for the Manager for volume backup. -# Defaults to 'cinder.backup.manager.BackupManager' +# Defaults to 'manila.backup.manager.BackupManager' # # [*backup_api_class*] # (optional) The full class name of the volume backup API class. -# Defaults to 'cinder.backup.api.API' +# Defaults to 'manila.backup.api.API' # # [*backup_name_template*] # (optional) Template string to be used to generate backup names. # Defaults to 'backup-%s' # -class cinder::backup ( +class manila::backup ( $enabled = true, $package_ensure = 'present', - $backup_topic = 'cinder-backup', - $backup_manager = 'cinder.backup.manager.BackupManager', - $backup_api_class = 'cinder.backup.api.API', + $backup_topic = 'manila-backup', + $backup_manager = 'manila.backup.manager.BackupManager', + $backup_api_class = 'manila.backup.api.API', $backup_name_template = 'backup-%s' ) { - include cinder::params + include manila::params - Cinder_config<||> ~> Service['cinder-backup'] + Manila_config<||> ~> Service['manila-backup'] - if $::cinder::params::backup_package { - Package['cinder-backup'] -> Cinder_config<||> - Package['cinder-backup'] -> Service['cinder-backup'] - package { 'cinder-backup': + if $::manila::params::backup_package { + Package['manila-backup'] -> Manila_config<||> + Package['manila-backup'] -> Service['manila-backup'] + package { 'manila-backup': ensure => $package_ensure, - name => $::cinder::params::backup_package, + name => $::manila::params::backup_package, } } @@ -66,15 +66,15 @@ class cinder::backup ( $ensure = 'stopped' } - service { 'cinder-backup': + service { 'manila-backup': ensure => $ensure, - name => $::cinder::params::backup_service, + name => $::manila::params::backup_service, enable => $enabled, hasstatus => true, - require => Package['cinder'], + require => Package['manila'], } - cinder_config { + manila_config { 'DEFAULT/backup_topic': value => $backup_topic; 'DEFAULT/backup_manager': value => $backup_manager; 'DEFAULT/backup_api_class': value => $backup_api_class; diff --git a/manifests/backup/ceph.pp b/manifests/backup/ceph.pp index 9ac208ab..6845d9fa 100644 --- a/manifests/backup/ceph.pp +++ b/manifests/backup/ceph.pp @@ -15,9 +15,9 @@ # License for the specific language governing permissions and limitations # under the License. # -# == Class: cinder::backup::ceph +# == Class: manila::backup::ceph # -# Setup Cinder to backup volumes into Ceph +# Setup Manila to backup volumes into Ceph # # === Parameters # @@ -29,7 +29,7 @@ # [*backup_ceph_user*] # (optional) The Ceph user to connect with. # Should be a valid user -# Defaults to 'cinder' +# Defaults to 'manila' # # [*backup_ceph_chunk_size*] # (optional) The chunk size in bytes that a backup will be broken into @@ -53,17 +53,17 @@ # Defaults to '0' # -class cinder::backup::ceph ( - $backup_driver = 'cinder.backup.driver.ceph', +class manila::backup::ceph ( + $backup_driver = 'manila.backup.driver.ceph', $backup_ceph_conf = '/etc/ceph/ceph.conf', - $backup_ceph_user = 'cinder', + $backup_ceph_user = 'manila', $backup_ceph_chunk_size = '134217728', $backup_ceph_pool = 'backups', $backup_ceph_stripe_unit = '0', $backup_ceph_stripe_count = '0' ) { - cinder_config { + manila_config { 'DEFAULT/backup_driver': value => $backup_driver; 'DEFAULT/backup_ceph_conf': value => $backup_ceph_conf; 'DEFAULT/backup_ceph_user': value => $backup_ceph_user; diff --git a/manifests/backup/swift.pp b/manifests/backup/swift.pp index 5b1fedfb..e64893a2 100644 --- a/manifests/backup/swift.pp +++ b/manifests/backup/swift.pp @@ -15,9 +15,9 @@ # License for the specific language governing permissions and limitations # under the License. # -# == Class: cinder::backup::swift +# == Class: manila::backup::swift # -# Setup Cinder to backup volumes into Swift +# Setup Manila to backup volumes into Swift # # === Parameters # @@ -43,8 +43,8 @@ # Defaults to '2' # -class cinder::backup::swift ( - $backup_driver = 'cinder.backup.drivers.swift', +class manila::backup::swift ( + $backup_driver = 'manila.backup.drivers.swift', $backup_swift_url = 'http://localhost:8080/v1/AUTH_', $backup_swift_container = 'volumes_backup', $backup_swift_object_size = '52428800', @@ -52,7 +52,7 @@ class cinder::backup::swift ( $backup_swift_retry_backoff = '2' ) { - cinder_config { + manila_config { 'DEFAULT/backup_driver': value => $backup_driver; 'DEFAULT/backup_swift_url': value => $backup_swift_url; 'DEFAULT/backup_swift_container': value => $backup_swift_container; diff --git a/manifests/ceilometer.pp b/manifests/ceilometer.pp index 813ea687..c798ef14 100644 --- a/manifests/ceilometer.pp +++ b/manifests/ceilometer.pp @@ -1,6 +1,6 @@ -# == Class: cinder::ceilometer +# == Class: manila::ceilometer # -# Setup Cinder to enable ceilometer can retrieve volume samples +# Setup Manila to enable ceilometer can retrieve volume samples # Ref: http://docs.openstack.org/developer/ceilometer/install/manual.html # # === Parameters @@ -11,11 +11,11 @@ # -class cinder::ceilometer ( - $notification_driver = 'cinder.openstack.common.notifier.rpc_notifier' +class manila::ceilometer ( + $notification_driver = 'manila.openstack.common.notifier.rpc_notifier' ) { - cinder_config { + manila_config { 'DEFAULT/notification_driver': value => $notification_driver; } } diff --git a/manifests/client.pp b/manifests/client.pp index 1b6ad822..900251dd 100644 --- a/manifests/client.pp +++ b/manifests/client.pp @@ -1,20 +1,20 @@ -# == Class: cinder::client +# == Class: manila::client # -# Installs Cinder python client. +# Installs Manila python client. # # === Parameters # # [*ensure*] # Ensure state for package. Defaults to 'present'. # -class cinder::client( +class manila::client( $package_ensure = 'present' ) { - include cinder::params + include manila::params - package { 'python-cinderclient': + package { 'python-manilaclient': ensure => $package_ensure, - name => $::cinder::params::client_package, + name => $::manila::params::client_package, } } diff --git a/manifests/config.pp b/manifests/config.pp index 0fa29a3e..7befdb79 100644 --- a/manifests/config.pp +++ b/manifests/config.pp @@ -1,11 +1,11 @@ -# == Class: cinder::config +# == Class: manila::config # -# This class is used to manage arbitrary cinder configurations. +# This class is used to manage arbitrary manila configurations. # # === Parameters # # [*xxx_config*] -# (optional) Allow configuration of arbitrary cinder configurations. +# (optional) Allow configuration of arbitrary manila configurations. # The value is an hash of xxx_config resources. Example: # { 'DEFAULT/foo' => { value => 'fooValue'}, # 'DEFAULT/bar' => { value => 'barValue'} @@ -18,22 +18,22 @@ # DEFAULT/bar: # value: barValue # -# [**cinder_config**] -# (optional) Allow configuration of cinder.conf configurations. +# [**manila_config**] +# (optional) Allow configuration of manila.conf configurations. # # [**api_paste_ini_config**] -# (optional) Allow configuration of /etc/cinder/api-paste.ini configurations. +# (optional) Allow configuration of /etc/manila/api-paste.ini configurations. # # NOTE: The configuration MUST NOT be already handled by this module # or Puppet catalog compilation will fail with duplicate resources. # -class cinder::config ( - $cinder_config = {}, +class manila::config ( + $manila_config = {}, $api_paste_ini_config = {}, ) { - validate_hash($cinder_config) + validate_hash($manila_config) validate_hash($api_paste_ini_config) - create_resources('cinder_config', $cinder_config) - create_resources('cinder_api_paste_ini', $api_paste_ini_config) + create_resources('manila_config', $manila_config) + create_resources('manila_api_paste_ini', $api_paste_ini_config) } diff --git a/manifests/db/mysql.pp b/manifests/db/mysql.pp index 285a5ab6..9b5eb828 100644 --- a/manifests/db/mysql.pp +++ b/manifests/db/mysql.pp @@ -3,10 +3,10 @@ # Tested versions include 0.9 and 2.2 # Defaults to '0.9' # -class cinder::db::mysql ( +class manila::db::mysql ( $password, - $dbname = 'cinder', - $user = 'cinder', + $dbname = 'manila', + $user = 'manila', $host = '127.0.0.1', $allowed_hosts = undef, $charset = 'utf8', @@ -15,10 +15,10 @@ class cinder::db::mysql ( $mysql_module = '0.9' ) { - Class['cinder::db::mysql'] -> Exec<| title == 'cinder-manage db_sync' |> + Class['manila::db::mysql'] -> Exec<| title == 'manila-manage db_sync' |> if ($mysql_module >= 2.2) { - Mysql_database[$dbname] ~> Exec<| title == 'cinder-manage db_sync' |> + Mysql_database[$dbname] ~> Exec<| title == 'manila-manage db_sync' |> mysql::db { $dbname: user => $user, @@ -30,7 +30,7 @@ class cinder::db::mysql ( } } else { - Database[$dbname] ~> Exec<| title == 'cinder-manage db_sync' |> + Database[$dbname] ~> Exec<| title == 'manila-manage db_sync' |> mysql::db { $dbname: user => $user, @@ -51,7 +51,7 @@ class cinder::db::mysql ( if $real_allowed_hosts { # TODO this class should be in the mysql namespace - cinder::db::mysql::host_access { $real_allowed_hosts: + manila::db::mysql::host_access { $real_allowed_hosts: user => $user, password => $password, database => $dbname, diff --git a/manifests/db/mysql/host_access.pp b/manifests/db/mysql/host_access.pp index ba490d34..ce7cab64 100644 --- a/manifests/db/mysql/host_access.pp +++ b/manifests/db/mysql/host_access.pp @@ -1,7 +1,7 @@ # -# Used to grant access to the cinder mysql DB +# Used to grant access to the manila mysql DB # -define cinder::db::mysql::host_access ($user, $password, $database, $mysql_module = '0.9') { +define manila::db::mysql::host_access ($user, $password, $database, $mysql_module = '0.9') { if ($mysql_module >= 2.2) { mysql_user { "${user}@${name}": password_hash => mysql_password($password), diff --git a/manifests/db/postgresql.pp b/manifests/db/postgresql.pp index 52aa15bb..975b1484 100644 --- a/manifests/db/postgresql.pp +++ b/manifests/db/postgresql.pp @@ -1,17 +1,17 @@ # -# Class that configures postgresql for cinder +# Class that configures postgresql for manila # # Requires the Puppetlabs postgresql module. -class cinder::db::postgresql( +class manila::db::postgresql( $password, - $dbname = 'cinder', - $user = 'cinder' + $dbname = 'manila', + $user = 'manila' ) { require postgresql::python - Postgresql::Db[$dbname] ~> Exec<| title == 'cinder-manage db_sync' |> - Package['python-psycopg2'] -> Exec<| title == 'cinder-manage db_sync' |> + Postgresql::Db[$dbname] ~> Exec<| title == 'manila-manage db_sync' |> + Package['python-psycopg2'] -> Exec<| title == 'manila-manage db_sync' |> postgresql::db { $dbname: user => $user, diff --git a/manifests/db/sync.pp b/manifests/db/sync.pp index 942f2521..88b2063f 100644 --- a/manifests/db/sync.pp +++ b/manifests/db/sync.pp @@ -1,14 +1,14 @@ # -class cinder::db::sync { +class manila::db::sync { - include cinder::params + include manila::params - exec { 'cinder-manage db_sync': - command => $::cinder::params::db_sync_command, + exec { 'manila-manage db_sync': + command => $::manila::params::db_sync_command, path => '/usr/bin', - user => 'cinder', + user => 'manila', refreshonly => true, - require => [File[$::cinder::params::cinder_conf], Class['cinder']], + require => [File[$::manila::params::manila_conf], Class['manila']], logoutput => 'on_failure', } } diff --git a/manifests/glance.pp b/manifests/glance.pp index a9f57078..d84a3cd1 100644 --- a/manifests/glance.pp +++ b/manifests/glance.pp @@ -15,14 +15,14 @@ # License for the specific language governing permissions and limitations # under the License. # -# == Class: cinder::glance +# == Class: manila::glance # -# Glance drive Cinder as a block storage backend to store image data. +# Glance drive Manila as a block storage backend to store image data. # # === Parameters # # [*glance_api_servers*] -# (optional) A list of the glance api servers available to cinder. +# (optional) A list of the glance api servers available to manila. # Should be an array with [hostname|ip]:port # Defaults to undef # @@ -52,7 +52,7 @@ # Defaults to undef # -class cinder::glance ( +class manila::glance ( $glance_api_servers = undef, $glance_api_version = '2', $glance_num_retries = '0', @@ -62,16 +62,16 @@ class cinder::glance ( ) { if is_array($glance_api_servers) { - cinder_config { + manila_config { 'DEFAULT/glance_api_servers': value => join($glance_api_servers, ','); } } elsif is_string($glance_api_servers) { - cinder_config { + manila_config { 'DEFAULT/glance_api_servers': value => $glance_api_servers; } } - cinder_config { + manila_config { 'DEFAULT/glance_api_version': value => $glance_api_version; 'DEFAULT/glance_num_retries': value => $glance_num_retries; 'DEFAULT/glance_api_insecure': value => $glance_api_insecure; diff --git a/manifests/init.pp b/manifests/init.pp index bd13ddcd..5680bbed 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -3,7 +3,7 @@ # [database_connection] # Url used to connect to database. # (Optional) Defaults to -# 'sqlite:////var/lib/cinder/cinder.sqlite' +# 'sqlite:////var/lib/manila/manila.sqlite' # # [database_idle_timeout] # Timeout when db connections should be reaped. @@ -46,7 +46,7 @@ # [*log_dir*] # (optional) Directory where logs should be stored. # If set to boolean false, it will not log to any directory. -# Defaults to '/var/log/cinder' +# Defaults to '/var/log/manila' # # [*use_ssl*] # (optional) Enable SSL on the API server @@ -84,10 +84,10 @@ # [sql_idle_timeout] # DEPRECATED # -class cinder ( - $database_connection = 'sqlite:////var/lib/cinder/cinder.sqlite', +class manila ( + $database_connection = 'sqlite:////var/lib/manila/manila.sqlite', $database_idle_timeout = '3600', - $rpc_backend = 'cinder.openstack.common.rpc.impl_kombu', + $rpc_backend = 'manila.openstack.common.rpc.impl_kombu', $control_exchange = 'openstack', $rabbit_host = '127.0.0.1', $rabbit_port = 5672, @@ -120,10 +120,10 @@ class cinder ( $ca_file = false, $cert_file = false, $key_file = false, - $api_paste_config = '/etc/cinder/api-paste.ini', + $api_paste_config = '/etc/manila/api-paste.ini', $use_syslog = false, $log_facility = 'LOG_USER', - $log_dir = '/var/log/cinder', + $log_dir = '/var/log/manila', $verbose = false, $debug = false, $mysql_module = '0.9', @@ -134,10 +134,10 @@ class cinder ( $sql_idle_timeout = undef, ) { - include cinder::params + include manila::params - Package['cinder'] -> Cinder_config<||> - Package['cinder'] -> Cinder_api_paste_ini<||> + Package['manila'] -> Manila_config<||> + Package['manila'] -> Manila_api_paste_ini<||> if $sql_connection { warning('The sql_connection parameter is deprecated, use database_connection instead.') @@ -174,39 +174,39 @@ class cinder ( } } - # this anchor is used to simplify the graph between cinder components by - # allowing a resource to serve as a point where the configuration of cinder begins - anchor { 'cinder-start': } + # this anchor is used to simplify the graph between manila components by + # allowing a resource to serve as a point where the configuration of manila begins + anchor { 'manila-start': } - package { 'cinder': + package { 'manila': ensure => $package_ensure, - name => $::cinder::params::package_name, - require => Anchor['cinder-start'], + name => $::manila::params::package_name, + require => Anchor['manila-start'], } - file { $::cinder::params::cinder_conf: + file { $::manila::params::manila_conf: ensure => present, - owner => 'cinder', - group => 'cinder', + owner => 'manila', + group => 'manila', mode => '0600', - require => Package['cinder'], + require => Package['manila'], } - file { $::cinder::params::cinder_paste_api_ini: + file { $::manila::params::manila_paste_api_ini: ensure => present, - owner => 'cinder', - group => 'cinder', + owner => 'manila', + group => 'manila', mode => '0600', - require => Package['cinder'], + require => Package['manila'], } - if $rpc_backend == 'cinder.openstack.common.rpc.impl_kombu' { + if $rpc_backend == 'manila.openstack.common.rpc.impl_kombu' { if ! $rabbit_password { fail('Please specify a rabbit_password parameter.') } - cinder_config { + manila_config { 'DEFAULT/rabbit_password': value => $rabbit_password, secret => true; 'DEFAULT/rabbit_userid': value => $rabbit_userid; 'DEFAULT/rabbit_virtual_host': value => $rabbit_virtual_host; @@ -216,24 +216,24 @@ class cinder ( } if $rabbit_hosts { - cinder_config { 'DEFAULT/rabbit_hosts': value => join($rabbit_hosts, ',') } - cinder_config { 'DEFAULT/rabbit_ha_queues': value => true } + manila_config { 'DEFAULT/rabbit_hosts': value => join($rabbit_hosts, ',') } + manila_config { 'DEFAULT/rabbit_ha_queues': value => true } } else { - cinder_config { 'DEFAULT/rabbit_host': value => $rabbit_host } - cinder_config { 'DEFAULT/rabbit_port': value => $rabbit_port } - cinder_config { 'DEFAULT/rabbit_hosts': value => "${rabbit_host}:${rabbit_port}" } - cinder_config { 'DEFAULT/rabbit_ha_queues': value => false } + manila_config { 'DEFAULT/rabbit_host': value => $rabbit_host } + manila_config { 'DEFAULT/rabbit_port': value => $rabbit_port } + manila_config { 'DEFAULT/rabbit_hosts': value => "${rabbit_host}:${rabbit_port}" } + manila_config { 'DEFAULT/rabbit_ha_queues': value => false } } if $rabbit_use_ssl { - cinder_config { + manila_config { 'DEFAULT/kombu_ssl_ca_certs': value => $kombu_ssl_ca_certs; 'DEFAULT/kombu_ssl_certfile': value => $kombu_ssl_certfile; 'DEFAULT/kombu_ssl_keyfile': value => $kombu_ssl_keyfile; 'DEFAULT/kombu_ssl_version': value => $kombu_ssl_version; } } else { - cinder_config { + manila_config { 'DEFAULT/kombu_ssl_ca_certs': ensure => absent; 'DEFAULT/kombu_ssl_certfile': ensure => absent; 'DEFAULT/kombu_ssl_keyfile': ensure => absent; @@ -243,13 +243,13 @@ class cinder ( } - if $rpc_backend == 'cinder.openstack.common.rpc.impl_qpid' { + if $rpc_backend == 'manila.openstack.common.rpc.impl_qpid' { if ! $qpid_password { fail('Please specify a qpid_password parameter.') } - cinder_config { + manila_config { 'DEFAULT/qpid_hostname': value => $qpid_hostname; 'DEFAULT/qpid_port': value => $qpid_port; 'DEFAULT/qpid_username': value => $qpid_username; @@ -267,15 +267,15 @@ class cinder ( } if is_array($qpid_sasl_mechanisms) { - cinder_config { + manila_config { 'DEFAULT/qpid_sasl_mechanisms': value => join($qpid_sasl_mechanisms, ' '); } } elsif $qpid_sasl_mechanisms { - cinder_config { + manila_config { 'DEFAULT/qpid_sasl_mechanisms': value => $qpid_sasl_mechanisms; } } else { - cinder_config { + manila_config { 'DEFAULT/qpid_sasl_mechanisms': ensure => absent; } } @@ -287,7 +287,7 @@ class cinder ( $default_availability_zone_real = $default_availability_zone } - cinder_config { + manila_config { 'database/connection': value => $database_connection_real, secret => true; 'database/idle_timeout': value => $database_idle_timeout_real; 'DEFAULT/verbose': value => $verbose; @@ -314,32 +314,32 @@ class cinder ( } if $log_dir { - cinder_config { + manila_config { 'DEFAULT/log_dir': value => $log_dir; } } else { - cinder_config { + manila_config { 'DEFAULT/log_dir': ensure => absent; } } # SSL Options if $use_ssl { - cinder_config { + manila_config { 'DEFAULT/ssl_cert_file' : value => $cert_file; 'DEFAULT/ssl_key_file' : value => $key_file; } if $ca_file { - cinder_config { 'DEFAULT/ssl_ca_file' : + manila_config { 'DEFAULT/ssl_ca_file' : value => $ca_file, } } else { - cinder_config { 'DEFAULT/ssl_ca_file' : + manila_config { 'DEFAULT/ssl_ca_file' : ensure => absent, } } } else { - cinder_config { + manila_config { 'DEFAULT/ssl_cert_file' : ensure => absent; 'DEFAULT/ssl_key_file' : ensure => absent; 'DEFAULT/ssl_ca_file' : ensure => absent; @@ -347,12 +347,12 @@ class cinder ( } if $use_syslog { - cinder_config { + manila_config { 'DEFAULT/use_syslog': value => true; 'DEFAULT/syslog_log_facility': value => $log_facility; } } else { - cinder_config { + manila_config { 'DEFAULT/use_syslog': value => false; } } diff --git a/manifests/keystone/auth.pp b/manifests/keystone/auth.pp index 6f8254bb..39961a7b 100644 --- a/manifests/keystone/auth.pp +++ b/manifests/keystone/auth.pp @@ -1,27 +1,27 @@ -# == Class: cinder::keystone::auth +# == Class: manila::keystone::auth # -# Configures Cinder user, service and endpoint in Keystone. +# Configures Manila user, service and endpoint in Keystone. # # === Parameters # # [*password*] -# Password for Cinder user. Required. +# Password for Manila user. Required. # # [*email*] -# Email for Cinder user. Optional. Defaults to 'cinder@localhost'. +# Email for Manila user. Optional. Defaults to 'manila@localhost'. # # [*auth_name*] -# Username for Cinder service. Optional. Defaults to 'cinder'. +# Username for Manila service. Optional. Defaults to 'manila'. # # [*auth_name_v2*] -# Username for Cinder v2 service. Optional. Defaults to 'cinder2'. +# Username for Manila v2 service. Optional. Defaults to 'manila2'. # # [*configure_endpoint*] -# Should Cinder endpoint be configured? Optional. Defaults to 'true'. +# Should Manila endpoint be configured? Optional. Defaults to 'true'. # API v1 endpoint should be enabled in Icehouse for compatibility with Nova. # # [*configure_endpoint_v2*] -# Should Cinder v2 endpoint be configured? Optional. Defaults to 'true'. +# Should Manila v2 endpoint be configured? Optional. Defaults to 'true'. # # [*service_type*] # Type of service. Optional. Defaults to 'volume'. @@ -42,13 +42,13 @@ # Port for endpoint. Optional. Defaults to '8776'. # # [*volume_version*] -# Cinder API version. Optional. Defaults to 'v1'. +# Manila API version. Optional. Defaults to 'v1'. # # [*region*] # Region for endpoint. Optional. Defaults to 'RegionOne'. # # [*tenant*] -# Tenant for Cinder user. Optional. Defaults to 'services'. +# Tenant for Manila user. Optional. Defaults to 'services'. # # [*public_protocol*] # Protocol for public endpoint. Optional. Defaults to 'http'. @@ -59,11 +59,11 @@ # [*admin_protocol*] # Protocol for admin endpoint. Optional. Defaults to 'http'. # -class cinder::keystone::auth ( +class manila::keystone::auth ( $password, - $auth_name = 'cinder', - $auth_name_v2 = 'cinderv2', - $email = 'cinder@localhost', + $auth_name = 'manila', + $auth_name_v2 = 'manilav2', + $email = 'manila@localhost', $tenant = 'services', $configure_endpoint = true, $configure_endpoint_v2 = true, @@ -80,7 +80,7 @@ class cinder::keystone::auth ( $internal_protocol = 'http' ) { - Keystone_user_role["${auth_name}@${tenant}"] ~> Service <| name == 'cinder-api' |> + Keystone_user_role["${auth_name}@${tenant}"] ~> Service <| name == 'manila-api' |> keystone_user { $auth_name: ensure => present, @@ -95,12 +95,12 @@ class cinder::keystone::auth ( keystone_service { $auth_name: ensure => present, type => $service_type, - description => 'Cinder Service', + description => 'Manila Service', } keystone_service { $auth_name_v2: ensure => present, type => $service_type_v2, - description => 'Cinder Service v2', + description => 'Manila Service v2', } if $configure_endpoint { diff --git a/manifests/params.pp b/manifests/params.pp index 9d5da31b..2b737bd9 100644 --- a/manifests/params.pp +++ b/manifests/params.pp @@ -1,43 +1,43 @@ # -class cinder::params { +class manila::params { - $cinder_conf = '/etc/cinder/cinder.conf' - $cinder_paste_api_ini = '/etc/cinder/api-paste.ini' + $manila_conf = '/etc/manila/manila.conf' + $manila_paste_api_ini = '/etc/manila/api-paste.ini' if $::osfamily == 'Debian' { - $package_name = 'cinder-common' - $client_package = 'python-cinderclient' - $api_package = 'cinder-api' - $api_service = 'cinder-api' - $backup_package = 'cinder-backup' - $backup_service = 'cinder-backup' - $scheduler_package = 'cinder-scheduler' - $scheduler_service = 'cinder-scheduler' - $volume_package = 'cinder-volume' - $volume_service = 'cinder-volume' - $db_sync_command = 'cinder-manage db sync' + $package_name = 'manila-common' + $client_package = 'python-manilaclient' + $api_package = 'manila-api' + $api_service = 'manila-api' + $backup_package = 'manila-backup' + $backup_service = 'manila-backup' + $scheduler_package = 'manila-scheduler' + $scheduler_service = 'manila-scheduler' + $volume_package = 'manila-volume' + $volume_service = 'manila-volume' + $db_sync_command = 'manila-manage db sync' $tgt_package_name = 'tgt' $tgt_service_name = 'tgt' - $ceph_init_override = '/etc/init/cinder-volume.override' + $ceph_init_override = '/etc/init/manila-volume.override' $iscsi_helper = 'tgtadm' $lio_package_name = 'targetcli' } elsif($::osfamily == 'RedHat') { - $package_name = 'openstack-cinder' - $client_package = 'python-cinderclient' + $package_name = 'openstack-manila' + $client_package = 'python-manilaclient' $api_package = false - $api_service = 'openstack-cinder-api' + $api_service = 'openstack-manila-api' $backup_package = false - $backup_service = 'openstack-cinder-backup' + $backup_service = 'openstack-manila-backup' $scheduler_package = false - $scheduler_service = 'openstack-cinder-scheduler' + $scheduler_service = 'openstack-manila-scheduler' $volume_package = false - $volume_service = 'openstack-cinder-volume' - $db_sync_command = 'cinder-manage db sync' + $volume_service = 'openstack-manila-volume' + $db_sync_command = 'manila-manage db sync' $tgt_package_name = 'scsi-target-utils' $tgt_service_name = 'tgtd' - $ceph_init_override = '/etc/sysconfig/openstack-cinder-volume' + $ceph_init_override = '/etc/sysconfig/openstack-manila-volume' $lio_package_name = 'targetcli' if $::operatingsystem == 'RedHat' and $::operatingsystemrelease >= 7 { diff --git a/manifests/qpid.pp b/manifests/qpid.pp index 6b4d2985..bcae2cfe 100644 --- a/manifests/qpid.pp +++ b/manifests/qpid.pp @@ -1,8 +1,8 @@ # -# class for installing qpid server for cinder +# class for installing qpid server for manila # # -class cinder::qpid( +class manila::qpid( $enabled = true, $user='guest', $password='guest', @@ -10,8 +10,8 @@ class cinder::qpid( $realm='OPENSTACK' ) { - # only configure cinder after the queue is up - Class['qpid::server'] -> Package<| title == 'cinder' |> + # only configure manila after the queue is up + Class['qpid::server'] -> Package<| title == 'manila' |> if ($enabled) { $service_ensure = 'running' diff --git a/manifests/quota.pp b/manifests/quota.pp index 4542d468..07e40024 100644 --- a/manifests/quota.pp +++ b/manifests/quota.pp @@ -1,6 +1,6 @@ -# == Class: cinder::quota +# == Class: manila::quota # -# Setup and configure Cinder quotas. +# Setup and configure Manila quotas. # # === Parameters # @@ -16,16 +16,16 @@ # # [*quota_driver*] # (optional) Default driver to use for quota checks. -# Defaults to 'cinder.quota.DbQuotaDriver'. +# Defaults to 'manila.quota.DbQuotaDriver'. # -class cinder::quota ( +class manila::quota ( $quota_volumes = 10, $quota_snapshots = 10, $quota_gigabytes = 1000, - $quota_driver = 'cinder.quota.DbQuotaDriver' + $quota_driver = 'manila.quota.DbQuotaDriver' ) { - cinder_config { + manila_config { 'DEFAULT/quota_volumes': value => $quota_volumes; 'DEFAULT/quota_snapshots': value => $quota_snapshots; 'DEFAULT/quota_gigabytes': value => $quota_gigabytes; diff --git a/manifests/rabbitmq.pp b/manifests/rabbitmq.pp index 1c69f355..bfce44da 100644 --- a/manifests/rabbitmq.pp +++ b/manifests/rabbitmq.pp @@ -1,6 +1,6 @@ -# == Class: cinder::rabbitmq +# == Class: manila::rabbitmq # -# Installs and manages rabbitmq server for cinder +# Installs and manages rabbitmq server for manila # # == Parameters: # @@ -30,7 +30,7 @@ # Use the default for 1.x, use 'rabbitmq' for 3.x # Defaults to 'rabbitmq::server' # -class cinder::rabbitmq( +class manila::rabbitmq( $userid = 'guest', $password = 'guest', $port = '5672', @@ -39,8 +39,8 @@ class cinder::rabbitmq( $rabbitmq_class = 'rabbitmq::server', ) { - # only configure cinder after the queue is up - Class[$rabbitmq_class] -> Anchor<| title == 'cinder-start' |> + # only configure manila after the queue is up + Class[$rabbitmq_class] -> Anchor<| title == 'manila-start' |> if ($enabled) { if $userid == 'guest' { @@ -59,7 +59,7 @@ class cinder::rabbitmq( write_permission => '.*', read_permission => '.*', provider => 'rabbitmqctl', - }->Anchor<| title == 'cinder-start' |> + }->Anchor<| title == 'manila-start' |> } $service_ensure = 'running' } else { diff --git a/manifests/scheduler.pp b/manifests/scheduler.pp index 26b1e585..c8f60cf9 100644 --- a/manifests/scheduler.pp +++ b/manifests/scheduler.pp @@ -1,30 +1,30 @@ # -class cinder::scheduler ( +class manila::scheduler ( $scheduler_driver = false, $package_ensure = 'present', $enabled = true, $manage_service = true ) { - include cinder::params + include manila::params - Cinder_config<||> ~> Service['cinder-scheduler'] - Cinder_api_paste_ini<||> ~> Service['cinder-scheduler'] - Exec<| title == 'cinder-manage db_sync' |> ~> Service['cinder-scheduler'] + Manila_config<||> ~> Service['manila-scheduler'] + Manila_api_paste_ini<||> ~> Service['manila-scheduler'] + Exec<| title == 'manila-manage db_sync' |> ~> Service['manila-scheduler'] if $scheduler_driver { - cinder_config { + manila_config { 'DEFAULT/scheduler_driver': value => $scheduler_driver; } } - if $::cinder::params::scheduler_package { - Package['cinder-scheduler'] -> Cinder_config<||> - Package['cinder-scheduler'] -> Cinder_api_paste_ini<||> - Package['cinder-scheduler'] -> Service['cinder-scheduler'] - package { 'cinder-scheduler': + if $::manila::params::scheduler_package { + Package['manila-scheduler'] -> Manila_config<||> + Package['manila-scheduler'] -> Manila_api_paste_ini<||> + Package['manila-scheduler'] -> Service['manila-scheduler'] + package { 'manila-scheduler': ensure => $package_ensure, - name => $::cinder::params::scheduler_package, + name => $::manila::params::scheduler_package, } } @@ -36,11 +36,11 @@ class cinder::scheduler ( } } - service { 'cinder-scheduler': + service { 'manila-scheduler': ensure => $ensure, - name => $::cinder::params::scheduler_service, + name => $::manila::params::scheduler_service, enable => $enabled, hasstatus => true, - require => Package['cinder'], + require => Package['manila'], } } diff --git a/manifests/setup_test_volume.pp b/manifests/setup_test_volume.pp index f8a2452d..adbecfa9 100644 --- a/manifests/setup_test_volume.pp +++ b/manifests/setup_test_volume.pp @@ -1,11 +1,11 @@ -# == Class: cinder::setup_test_volume +# == Class: manila::setup_test_volume # # Setup a volume group on a loop device for test purposes. # # === Parameters # # [*volume_name*] -# Volume group name. Defaults to 'cinder-volumes'. +# Volume group name. Defaults to 'manila-volumes'. # # [*size*] # Volume group size. Defaults to '4G'. @@ -13,8 +13,8 @@ # [*loopback_device*] # Loop device name. Defaults to '/dev/loop2'. # -class cinder::setup_test_volume( - $volume_name = 'cinder-volumes', +class manila::setup_test_volume( + $volume_name = 'manila-volumes', $size = '4G', $loopback_device = '/dev/loop2' ) { diff --git a/manifests/type.pp b/manifests/type.pp index 75b83e98..9764fc64 100644 --- a/manifests/type.pp +++ b/manifests/type.pp @@ -1,6 +1,6 @@ -# ==Define: cinder::type +# ==Define: manila::type # -# Creates cinder type and assigns backends. +# Creates manila type and assigns backends. # # === Parameters # @@ -26,7 +26,7 @@ # # Author: Andrew Woodward -define cinder::type ( +define manila::type ( $os_password, $set_key = undef, $set_value = undef, @@ -40,22 +40,22 @@ define cinder::type ( # TODO: (xarses) This should be moved to a ruby provider so that among other # reasons, the credential discovery magic can occur like in neutron. - exec {"cinder type-create ${volume_name}": - command => "cinder type-create ${volume_name}", - unless => "cinder type-list | grep ${volume_name}", + exec {"manila type-create ${volume_name}": + command => "manila type-create ${volume_name}", + unless => "manila type-list | grep ${volume_name}", environment => [ "OS_TENANT_NAME=${os_tenant_name}", "OS_USERNAME=${os_username}", "OS_PASSWORD=${os_password}", "OS_AUTH_URL=${os_auth_url}", ], - require => Package['python-cinderclient'] + require => Package['python-manilaclient'] } if ($set_value and $set_key) { - Exec["cinder type-create ${volume_name}"] -> - cinder::type_set { $set_value: + Exec["manila type-create ${volume_name}"] -> + manila::type_set { $set_value: type => $volume_name, key => $set_key, os_password => $os_password, diff --git a/manifests/type_set.pp b/manifests/type_set.pp index 6f7ecc78..f6668e60 100644 --- a/manifests/type_set.pp +++ b/manifests/type_set.pp @@ -1,4 +1,4 @@ -# ==Define: cinder::type_set +# ==Define: manila::type_set # # Assigns keys after the volume type is set. # @@ -25,7 +25,7 @@ # Author: Andrew Woodward -define cinder::type_set ( +define manila::type_set ( $type, $key, $os_password, @@ -37,15 +37,15 @@ define cinder::type_set ( # TODO: (xarses) This should be moved to a ruby provider so that among other # reasons, the credential discovery magic can occur like in neutron. - exec {"cinder type-key ${type} set ${key}=${name}": + exec {"manila type-key ${type} set ${key}=${name}": path => '/usr/bin', - command => "cinder type-key ${type} set ${key}=${name}", + command => "manila type-key ${type} set ${key}=${name}", environment => [ "OS_TENANT_NAME=${os_tenant_name}", "OS_USERNAME=${os_username}", "OS_PASSWORD=${os_password}", "OS_AUTH_URL=${os_auth_url}", ], - require => Package['python-cinderclient'] + require => Package['python-manilaclient'] } } diff --git a/manifests/vmware.pp b/manifests/vmware.pp index b254eaf2..da107258 100644 --- a/manifests/vmware.pp +++ b/manifests/vmware.pp @@ -1,4 +1,4 @@ -# ==Define: cinder::vmware +# ==Define: manila::vmware # # Creates vmdk specific disk file type & clone type. # @@ -16,37 +16,37 @@ # [*os_auth_url*] # (optional) The keystone auth url. Defaults to 'http://127.0.0.1:5000/v2.0/'. # -class cinder::vmware ( +class manila::vmware ( $os_password, $os_tenant_name = 'admin', $os_username = 'admin', $os_auth_url = 'http://127.0.0.1:5000/v2.0/' ) { - Cinder::Type { + Manila::Type { os_password => $os_password, os_tenant_name => $os_tenant_name, os_username => $os_username, os_auth_url => $os_auth_url } - cinder::type {'vmware-thin': + manila::type {'vmware-thin': set_value => 'thin', set_key => 'vmware:vmdk_type' } - cinder::type {'vmware-thick': + manila::type {'vmware-thick': set_value => 'thick', set_key => 'vmware:vmdk_type' } - cinder::type {'vmware-eagerZeroedThick': + manila::type {'vmware-eagerZeroedThick': set_value => 'eagerZeroedThick', set_key => 'vmware:vmdk_type' } - cinder::type {'vmware-full': + manila::type {'vmware-full': set_value => 'full', set_key => 'vmware:clone_type' } - cinder::type {'vmware-linked': + manila::type {'vmware-linked': set_value => 'linked', set_key => 'vmware:clone_type' } diff --git a/manifests/volume.pp b/manifests/volume.pp index 6617991e..bec1724b 100644 --- a/manifests/volume.pp +++ b/manifests/volume.pp @@ -1,24 +1,24 @@ # $volume_name_template = volume-%s -class cinder::volume ( +class manila::volume ( $package_ensure = 'present', $enabled = true, $manage_service = true ) { - include cinder::params + include manila::params - Cinder_config<||> ~> Service['cinder-volume'] - Cinder_api_paste_ini<||> ~> Service['cinder-volume'] - Exec<| title == 'cinder-manage db_sync' |> ~> Service['cinder-volume'] + Manila_config<||> ~> Service['manila-volume'] + Manila_api_paste_ini<||> ~> Service['manila-volume'] + Exec<| title == 'manila-manage db_sync' |> ~> Service['manila-volume'] - if $::cinder::params::volume_package { - Package['cinder-volume'] -> Cinder_config<||> - Package['cinder-volume'] -> Cinder_api_paste_ini<||> - Package['cinder'] -> Package['cinder-volume'] - Package['cinder-volume'] -> Service['cinder-volume'] - package { 'cinder-volume': + if $::manila::params::volume_package { + Package['manila-volume'] -> Manila_config<||> + Package['manila-volume'] -> Manila_api_paste_ini<||> + Package['manila'] -> Package['manila-volume'] + Package['manila-volume'] -> Service['manila-volume'] + package { 'manila-volume': ensure => $package_ensure, - name => $::cinder::params::volume_package, + name => $::manila::params::volume_package, } } @@ -30,11 +30,11 @@ class cinder::volume ( } } - service { 'cinder-volume': + service { 'manila-volume': ensure => $ensure, - name => $::cinder::params::volume_service, + name => $::manila::params::volume_service, enable => $enabled, hasstatus => true, - require => Package['cinder'], + require => Package['manila'], } } diff --git a/manifests/volume/eqlx.pp b/manifests/volume/eqlx.pp index 7906eefd..51897cd3 100644 --- a/manifests/volume/eqlx.pp +++ b/manifests/volume/eqlx.pp @@ -1,6 +1,6 @@ -# == define: cinder::volume::eqlx +# == define: manila::volume::eqlx # -# Configure the Dell EqualLogic driver for cinder. +# Configure the Dell EqualLogic driver for manila. # # === Parameters # @@ -45,7 +45,7 @@ # (optional) The maximum retry count for reconnection. # Defaults to 5 # -class cinder::volume::eqlx ( +class manila::volume::eqlx ( $san_ip, $san_login, $san_password, @@ -58,7 +58,7 @@ class cinder::volume::eqlx ( $eqlx_cli_timeout = 30, $eqlx_cli_max_retries = 5, ) { - cinder::backend::eqlx { 'DEFAULT': + manila::backend::eqlx { 'DEFAULT': san_ip => $san_ip, san_login => $san_login, san_password => $san_password, diff --git a/manifests/volume/glusterfs.pp b/manifests/volume/glusterfs.pp index f5de750a..47b49356 100644 --- a/manifests/volume/glusterfs.pp +++ b/manifests/volume/glusterfs.pp @@ -1,7 +1,7 @@ # -# == Class: cinder::volume::glusterfs +# == Class: manila::volume::glusterfs # -# Configures Cinder to use GlusterFS as a volume driver +# Configures Manila to use GlusterFS as a volume driver # # === Parameters # @@ -22,23 +22,23 @@ # # [*glusterfs_shares_config*] # (optional) The config file to store the given $glusterfs_shares. -# Defaults to '/etc/cinder/shares.conf' +# Defaults to '/etc/manila/shares.conf' # # === Examples # -# class { 'cinder::volume::glusterfs': +# class { 'manila::volume::glusterfs': # glusterfs_shares = ['192.168.1.1:/volumes'], # } # -class cinder::volume::glusterfs ( +class manila::volume::glusterfs ( $glusterfs_shares, $glusterfs_disk_util = false, $glusterfs_sparsed_volumes = undef, $glusterfs_mount_point_base = undef, - $glusterfs_shares_config = '/etc/cinder/shares.conf' + $glusterfs_shares_config = '/etc/manila/shares.conf' ) { - cinder::backend::glusterfs { 'DEFAULT': + manila::backend::glusterfs { 'DEFAULT': glusterfs_shares => $glusterfs_shares, glusterfs_disk_util => $glusterfs_disk_util, glusterfs_sparsed_volumes => $glusterfs_sparsed_volumes, diff --git a/manifests/volume/iscsi.pp b/manifests/volume/iscsi.pp index 4815a4dc..79f55290 100644 --- a/manifests/volume/iscsi.pp +++ b/manifests/volume/iscsi.pp @@ -1,11 +1,11 @@ # -class cinder::volume::iscsi ( +class manila::volume::iscsi ( $iscsi_ip_address, - $volume_group = 'cinder-volumes', - $iscsi_helper = $cinder::params::iscsi_helper, + $volume_group = 'manila-volumes', + $iscsi_helper = $manila::params::iscsi_helper, ) { - cinder::backend::iscsi { 'DEFAULT': + manila::backend::iscsi { 'DEFAULT': iscsi_ip_address => $iscsi_ip_address, volume_group => $volume_group, iscsi_helper => $iscsi_helper diff --git a/manifests/volume/netapp.pp b/manifests/volume/netapp.pp index c06fc555..f38d3953 100644 --- a/manifests/volume/netapp.pp +++ b/manifests/volume/netapp.pp @@ -1,6 +1,6 @@ -# == Class: cinder::volume::netapp +# == Class: manila::volume::netapp # -# Configures Cinder to use the NetApp unified volume driver +# Configures Manila to use the NetApp unified volume driver # # === Parameters # @@ -64,7 +64,7 @@ # (optional) This parameter specifies the virtual storage server (Vserver) # name on the storage cluster on which provisioning of block storage volumes # should occur. If using the NFS storage protocol, this parameter is mandatory -# for storage service catalog support (utilized by Cinder volume type +# for storage service catalog support (utilized by Manila volume type # extra_specs support). If this parameter is specified, the exports belonging # to the Vserver will only be used for provisioning in the future. Block # storage volumes on exports not belonging to the Vserver specified by @@ -99,7 +99,7 @@ # [*netapp_copyoffload_tool_path*] # (optional) This option specifies the path of the NetApp Copy Offload tool # binary. Ensure that the binary has execute permissions set which allow the -# effective user of the cinder-volume process to execute the file. +# effective user of the manila-volume process to execute the file. # Defaults to '' # # [*netapp_controller_ips*] @@ -131,7 +131,7 @@ # # === Examples # -# class { 'cinder::volume::netapp': +# class { 'manila::volume::netapp': # netapp_login => 'clusterAdmin', # netapp_password => 'password', # netapp_server_hostname => 'netapp.mycorp.com', @@ -148,7 +148,7 @@ # # Copyright 2013 NetApp, Inc. # -class cinder::volume::netapp ( +class manila::volume::netapp ( $netapp_login, $netapp_password, $netapp_server_hostname, @@ -171,7 +171,7 @@ class cinder::volume::netapp ( $netapp_webservice_path = '/devmgr/v2', ) { - cinder::backend::netapp { 'DEFAULT': + manila::backend::netapp { 'DEFAULT': netapp_login => $netapp_login, netapp_password => $netapp_password, netapp_server_hostname => $netapp_server_hostname, diff --git a/manifests/volume/nexenta.pp b/manifests/volume/nexenta.pp index 6b653d8b..fbbce90b 100644 --- a/manifests/volume/nexenta.pp +++ b/manifests/volume/nexenta.pp @@ -1,6 +1,6 @@ -# == Class: cinder::volume::nexenta +# == Class: manila::volume::nexenta # -# Setups Cinder with Nexenta volume driver. +# Setups Manila with Nexenta volume driver. # # === Parameters # @@ -14,13 +14,13 @@ # (required) IP address of Nexenta SA. # # [*nexenta_volume*] -# (optional) Pool on SA that will hold all volumes. Defaults to 'cinder'. +# (optional) Pool on SA that will hold all volumes. Defaults to 'manila'. # # [*nexenta_target_prefix*] # (optional) IQN prefix for iSCSI targets. Defaults to 'iqn:'. # # [*nexenta_target_group_prefix*] -# (optional) Prefix for iSCSI target groups on SA. Defaults to 'cinder/'. +# (optional) Prefix for iSCSI target groups on SA. Defaults to 'manila/'. # # [*nexenta_blocksize*] # (optional) Block size for volumes. Defaults to '8k'. @@ -28,18 +28,18 @@ # [*nexenta_sparse*] # (optional) Flag to create sparse volumes. Defaults to true. # -class cinder::volume::nexenta ( +class manila::volume::nexenta ( $nexenta_user, $nexenta_password, $nexenta_host, - $nexenta_volume = 'cinder', + $nexenta_volume = 'manila', $nexenta_target_prefix = 'iqn:', - $nexenta_target_group_prefix = 'cinder/', + $nexenta_target_group_prefix = 'manila/', $nexenta_blocksize = '8k', $nexenta_sparse = true ) { - cinder::backend::nexenta { 'DEFAULT': + manila::backend::nexenta { 'DEFAULT': nexenta_user => $nexenta_user, nexenta_password => $nexenta_password, nexenta_host => $nexenta_host, diff --git a/manifests/volume/nfs.pp b/manifests/volume/nfs.pp index 53edc2d5..e67e80cb 100644 --- a/manifests/volume/nfs.pp +++ b/manifests/volume/nfs.pp @@ -1,16 +1,16 @@ # -class cinder::volume::nfs ( +class manila::volume::nfs ( $nfs_servers = [], $nfs_mount_options = undef, $nfs_disk_util = undef, $nfs_sparsed_volumes = undef, $nfs_mount_point_base = undef, - $nfs_shares_config = '/etc/cinder/shares.conf', + $nfs_shares_config = '/etc/manila/shares.conf', $nfs_used_ratio = '0.95', $nfs_oversub_ratio = '1.0', ) { - cinder::backend::nfs { 'DEFAULT': + manila::backend::nfs { 'DEFAULT': nfs_servers => $nfs_servers, nfs_mount_options => $nfs_mount_options, nfs_disk_util => $nfs_disk_util, diff --git a/manifests/volume/rbd.pp b/manifests/volume/rbd.pp index 2a3e2248..349251b9 100644 --- a/manifests/volume/rbd.pp +++ b/manifests/volume/rbd.pp @@ -1,6 +1,6 @@ -# == Class: cinder::volume::rbd +# == Class: manila::volume::rbd # -# Setup Cinder to use the RBD driver. +# Setup Manila to use the RBD driver. # # === Parameters # @@ -34,12 +34,12 @@ # Defaults to '5' # # [*glance_api_version*] -# (optional) DEPRECATED: Use cinder::glance Class instead. +# (optional) DEPRECATED: Use manila::glance Class instead. # Glance API version. (Defaults to '2') # Setting this parameter cause a duplicate resource declaration -# with cinder::glance +# with manila::glance # -class cinder::volume::rbd ( +class manila::volume::rbd ( $rbd_pool, $rbd_user, $rbd_ceph_conf = '/etc/ceph/ceph.conf', @@ -51,7 +51,7 @@ class cinder::volume::rbd ( $glance_api_version = undef, ) { - cinder::backend::rbd { 'DEFAULT': + manila::backend::rbd { 'DEFAULT': rbd_pool => $rbd_pool, rbd_user => $rbd_user, rbd_ceph_conf => $rbd_ceph_conf, diff --git a/manifests/volume/san.pp b/manifests/volume/san.pp index a787cd94..4cc673ad 100644 --- a/manifests/volume/san.pp +++ b/manifests/volume/san.pp @@ -1,12 +1,12 @@ -# == Class: cinder::volume::san +# == Class: manila::volume::san # -# Configures Cinder volume SAN driver. +# Configures Manila volume SAN driver. # Parameters are particular to each volume driver. # # === Parameters # # [*volume_driver*] -# (required) Setup cinder-volume to use volume driver. +# (required) Setup manila-volume to use volume driver. # # [*san_thin_provision*] # (optional) Use thin provisioning for SAN volumes? Defaults to true. @@ -42,7 +42,7 @@ # [*ssh_min_pool_conn*] # (optional) Maximum ssh connections in the pool. # -class cinder::volume::san ( +class manila::volume::san ( $volume_driver, $san_thin_provision = true, $san_ip = undef, @@ -57,7 +57,7 @@ class cinder::volume::san ( $ssh_max_pool_conn = 5 ) { - cinder::backend::san { 'DEFAULT': + manila::backend::san { 'DEFAULT': volume_driver => $volume_driver, san_thin_provision => $san_thin_provision, san_ip => $san_ip, diff --git a/manifests/volume/solidfire.pp b/manifests/volume/solidfire.pp index e461dfbd..0af5a858 100644 --- a/manifests/volume/solidfire.pp +++ b/manifests/volume/solidfire.pp @@ -1,13 +1,13 @@ -# == Class: cinder::volume::solidfire +# == Class: manila::volume::solidfire # -# Configures Cinder volume SolidFire driver. +# Configures Manila volume SolidFire driver. # Parameters are particular to each volume driver. # # === Parameters # # [*volume_driver*] -# (optional) Setup cinder-volume to use SolidFire volume driver. -# Defaults to 'cinder.volume.drivers.solidfire.SolidFire' +# (optional) Setup manila-volume to use SolidFire volume driver. +# Defaults to 'manila.volume.drivers.solidfire.SolidFire' # # [*san_ip*] # (required) IP address of SolidFire clusters MVIP. @@ -34,18 +34,18 @@ # (optional) Port ID to use to connect to SolidFire API. # Defaults to 443 # -class cinder::volume::solidfire( +class manila::volume::solidfire( $san_ip, $san_login, $san_password, - $volume_driver = 'cinder.volume.drivers.solidfire.SolidFire', + $volume_driver = 'manila.volume.drivers.solidfire.SolidFire', $sf_emulate_512 = true, $sf_allow_tenant_qos = false, $sf_account_prefix = '', $sf_api_port = '443' ) { - cinder::backend::solidfire { 'DEFAULT': + manila::backend::solidfire { 'DEFAULT': san_ip => $san_ip, san_login => $san_login, san_password => $san_password, diff --git a/manifests/volume/vmdk.pp b/manifests/volume/vmdk.pp index f9a6b10c..9f5fc670 100644 --- a/manifests/volume/vmdk.pp +++ b/manifests/volume/vmdk.pp @@ -1,6 +1,6 @@ -# == define: cinder::volume::vmdk +# == define: manila::volume::vmdk # -# Configure the VMware VMDK driver for cinder. +# Configure the VMware VMDK driver for manila. # # === Parameters # @@ -32,7 +32,7 @@ # Defaults to 5. # # [*image_transfer_timeout_secs*] -# (optional) The timeout in seconds for VMDK volume transfer between Cinder and Glance. +# (optional) The timeout in seconds for VMDK volume transfer between Manila and Glance. # Defaults to 7200. # # [*wsdl_location*] @@ -42,15 +42,15 @@ # Defaults to None. # # [*volume_folder*] -# (optional) The name for the folder in the VC datacenter that will contain cinder volumes. -# Defaults to 'cinder-volumes'. +# (optional) The name for the folder in the VC datacenter that will contain manila volumes. +# Defaults to 'manila-volumes'. # -class cinder::volume::vmdk( +class manila::volume::vmdk( $host_ip, $host_username, $host_password, - $volume_folder = 'cinder-volumes', + $volume_folder = 'manila-volumes', $api_retry_count = 10, $max_object_retrieval = 100, $task_poll_interval = 5, @@ -58,7 +58,7 @@ class cinder::volume::vmdk( $wsdl_location = undef ) { - cinder::backend::vmdk { 'DEFAULT': + manila::backend::vmdk { 'DEFAULT': host_ip => $host_ip, host_username => $host_username, host_password => $host_password, diff --git a/spec/classes/manila_api_spec.rb b/spec/classes/manila_api_spec.rb index f2797e40..223e7b65 100644 --- a/spec/classes/manila_api_spec.rb +++ b/spec/classes/manila_api_spec.rb @@ -1,6 +1,6 @@ require 'spec_helper' -describe 'cinder::api' do +describe 'manila::api' do let :req_params do {:keystone_password => 'foo'} @@ -14,58 +14,58 @@ describe 'cinder::api' do req_params end - it { should contain_service('cinder-api').with( + it { should contain_service('manila-api').with( 'hasstatus' => true, 'ensure' => 'running' )} - it 'should configure cinder api correctly' do - should contain_cinder_config('DEFAULT/auth_strategy').with( + it 'should configure manila api correctly' do + should contain_manila_config('DEFAULT/auth_strategy').with( :value => 'keystone' ) - should contain_cinder_config('DEFAULT/osapi_volume_listen').with( + should contain_manila_config('DEFAULT/osapi_volume_listen').with( :value => '0.0.0.0' ) - should contain_cinder_config('DEFAULT/default_volume_type').with( + should contain_manila_config('DEFAULT/default_volume_type').with( :ensure => 'absent' ) - should contain_cinder_api_paste_ini('filter:authtoken/service_protocol').with( + should contain_manila_api_paste_ini('filter:authtoken/service_protocol').with( :value => 'http' ) - should contain_cinder_api_paste_ini('filter:authtoken/service_host').with( + should contain_manila_api_paste_ini('filter:authtoken/service_host').with( :value => 'localhost' ) - should contain_cinder_api_paste_ini('filter:authtoken/service_port').with( + should contain_manila_api_paste_ini('filter:authtoken/service_port').with( :value => '5000' ) - should contain_cinder_api_paste_ini('filter:authtoken/auth_protocol').with( + should contain_manila_api_paste_ini('filter:authtoken/auth_protocol').with( :value => 'http' ) - should contain_cinder_api_paste_ini('filter:authtoken/auth_host').with( + should contain_manila_api_paste_ini('filter:authtoken/auth_host').with( :value => 'localhost' ) - should contain_cinder_api_paste_ini('filter:authtoken/auth_port').with( + should contain_manila_api_paste_ini('filter:authtoken/auth_port').with( :value => '35357' ) - should contain_cinder_api_paste_ini('filter:authtoken/auth_admin_prefix').with( + should contain_manila_api_paste_ini('filter:authtoken/auth_admin_prefix').with( :ensure => 'absent' ) - should contain_cinder_api_paste_ini('filter:authtoken/admin_tenant_name').with( + should contain_manila_api_paste_ini('filter:authtoken/admin_tenant_name').with( :value => 'services' ) - should contain_cinder_api_paste_ini('filter:authtoken/admin_user').with( - :value => 'cinder' + should contain_manila_api_paste_ini('filter:authtoken/admin_user').with( + :value => 'manila' ) - should contain_cinder_api_paste_ini('filter:authtoken/admin_password').with( + should contain_manila_api_paste_ini('filter:authtoken/admin_password').with( :value => 'foo', :secret => true ) - should contain_cinder_api_paste_ini('filter:authtoken/auth_uri').with( + should contain_manila_api_paste_ini('filter:authtoken/auth_uri').with( :value => 'http://localhost:5000/' ) - should_not contain_cinder_config('DEFAULT/os_region_name') + should_not contain_manila_config('DEFAULT/os_region_name') end end @@ -74,7 +74,7 @@ describe 'cinder::api' do req_params.merge({'os_region_name' => 'MyRegion'}) end it 'should configure the region for nova' do - should contain_cinder_config('DEFAULT/os_region_name').with( + should contain_manila_config('DEFAULT/os_region_name').with( :value => 'MyRegion' ) end @@ -84,8 +84,8 @@ describe 'cinder::api' do let :params do req_params.merge({'default_volume_type' => 'foo'}) end - it 'should configure the default volume type for cinder' do - should contain_cinder_config('DEFAULT/default_volume_type').with( + it 'should configure the default volume type for manila' do + should contain_manila_config('DEFAULT/default_volume_type').with( :value => 'foo' ) end @@ -95,8 +95,8 @@ describe 'cinder::api' do let :params do req_params.merge({'keystone_auth_uri' => 'http://foo.bar:8080/v2.0/'}) end - it 'should configure cinder auth_uri correctly' do - should contain_cinder_api_paste_ini('filter:authtoken/auth_uri').with( + it 'should configure manila auth_uri correctly' do + should contain_manila_api_paste_ini('filter:authtoken/auth_uri').with( :value => 'http://foo.bar:8080/v2.0/' ) end @@ -106,8 +106,8 @@ describe 'cinder::api' do let :params do req_params.merge({'bind_host' => '192.168.1.3'}) end - it 'should configure cinder api correctly' do - should contain_cinder_config('DEFAULT/osapi_volume_listen').with( + it 'should configure manila api correctly' do + should contain_manila_config('DEFAULT/osapi_volume_listen').with( :value => '192.168.1.3' ) end @@ -122,7 +122,7 @@ describe 'cinder::api' do } end - it { should contain_cinder_api_paste_ini('filter:authtoken/auth_admin_prefix').with( + it { should contain_manila_api_paste_ini('filter:authtoken/auth_admin_prefix').with( :value => keystone_auth_admin_prefix )} end @@ -144,7 +144,7 @@ describe 'cinder::api' do } end - it { expect { should contain_cinder_api_paste_ini('filter:authtoken/auth_admin_prefix') }.to \ + it { expect { should contain_manila_api_paste_ini('filter:authtoken/auth_admin_prefix') }.to \ raise_error(Puppet::Error, /validate_re\(\): "#{keystone_auth_admin_prefix}" does not match/) } end end @@ -154,10 +154,10 @@ describe 'cinder::api' do req_params.merge({'enabled' => false}) end it 'should stop the service' do - should contain_service('cinder-api').with_ensure('stopped') + should contain_service('manila-api').with_ensure('stopped') end it 'should contain db_sync exec' do - should_not contain_exec('cinder-manage db_sync') + should_not contain_exec('manila-manage db_sync') end end @@ -166,7 +166,7 @@ describe 'cinder::api' do req_params.merge({'manage_service' => false}) end it 'should not change the state of the service' do - should contain_service('cinder-api').without_ensure + should contain_service('manila-api').without_ensure end end @@ -175,7 +175,7 @@ describe 'cinder::api' do req_params.merge({ :ratelimits => '(GET, "*", .*, 100, MINUTE);(POST, "*", .*, 200, MINUTE)' }) end - it { should contain_cinder_api_paste_ini('filter:ratelimit/limits').with( + it { should contain_manila_api_paste_ini('filter:ratelimit/limits').with( :value => '(GET, "*", .*, 100, MINUTE);(POST, "*", .*, 200, MINUTE)' )} end diff --git a/spec/classes/manila_backends_spec.rb b/spec/classes/manila_backends_spec.rb index de990d02..42eb9ea2 100644 --- a/spec/classes/manila_backends_spec.rb +++ b/spec/classes/manila_backends_spec.rb @@ -15,12 +15,12 @@ # License for the specific language governing permissions and limitations # under the License. # -# Unit tests for cinder::backends class +# Unit tests for manila::backends class # require 'spec_helper' -describe 'cinder::backends' do +describe 'manila::backends' do let :default_params do {} @@ -30,13 +30,13 @@ describe 'cinder::backends' do {} end - shared_examples_for 'cinder backends' do + shared_examples_for 'manila backends' do let :p do default_params.merge(params) end - context 'configure cinder with default parameters' do + context 'configure manila with default parameters' do before :each do params.merge!( :enabled_backends => ['lowcost', 'regular', 'premium'], @@ -44,12 +44,12 @@ describe 'cinder::backends' do ) end - it 'configures cinder.conf with default params' do - should contain_cinder_config('DEFAULT/enabled_backends').with_value(p[:enabled_backends].join(',')) + it 'configures manila.conf with default params' do + should contain_manila_config('DEFAULT/enabled_backends').with_value(p[:enabled_backends].join(',')) end end - context 'configure cinder with a default volume type' do + context 'configure manila with a default volume type' do before :each do params.merge!( :enabled_backends => ['foo', 'bar'], @@ -58,7 +58,7 @@ describe 'cinder::backends' do end it 'should fail to configure default volume type' do - expect { subject }.to raise_error(Puppet::Error, /The default_volume_type parameter is deprecated in this class, you should declare it in cinder::api./) + expect { subject }.to raise_error(Puppet::Error, /The default_volume_type parameter is deprecated in this class, you should declare it in manila::api./) end end @@ -69,7 +69,7 @@ describe 'cinder::backends' do { :osfamily => 'Debian' } end - it_configures 'cinder backends' + it_configures 'manila backends' end context 'on RedHat platforms' do @@ -77,7 +77,7 @@ describe 'cinder::backends' do { :osfamily => 'RedHat' } end - it_configures 'cinder backends' + it_configures 'manila backends' end end diff --git a/spec/classes/manila_backup_ceph_spec.rb b/spec/classes/manila_backup_ceph_spec.rb index bedd7cdc..c0cf2748 100644 --- a/spec/classes/manila_backup_ceph_spec.rb +++ b/spec/classes/manila_backup_ceph_spec.rb @@ -15,16 +15,16 @@ # License for the specific language governing permissions and limitations # under the License. # -# Unit tests for cinder::ceph class +# Unit tests for manila::ceph class # require 'spec_helper' -describe 'cinder::backup::ceph' do +describe 'manila::backup::ceph' do let :default_params do { :backup_ceph_conf => '/etc/ceph/ceph.conf', - :backup_ceph_user => 'cinder', + :backup_ceph_user => 'manila', :backup_ceph_chunk_size => '134217728', :backup_ceph_pool => 'backups', :backup_ceph_stripe_unit => '0', @@ -35,19 +35,19 @@ describe 'cinder::backup::ceph' do {} end - shared_examples_for 'cinder backup with ceph' do + shared_examples_for 'manila backup with ceph' do let :p do default_params.merge(params) end - it 'configures cinder.conf' do - should contain_cinder_config('DEFAULT/backup_driver').with_value('cinder.backup.driver.ceph') - should contain_cinder_config('DEFAULT/backup_ceph_conf').with_value(p[:backup_ceph_conf]) - should contain_cinder_config('DEFAULT/backup_ceph_user').with_value(p[:backup_ceph_user]) - should contain_cinder_config('DEFAULT/backup_ceph_chunk_size').with_value(p[:backup_ceph_chunk_size]) - should contain_cinder_config('DEFAULT/backup_ceph_pool').with_value(p[:backup_ceph_pool]) - should contain_cinder_config('DEFAULT/backup_ceph_stripe_unit').with_value(p[:backup_ceph_stripe_unit]) - should contain_cinder_config('DEFAULT/backup_ceph_stripe_count').with_value(p[:backup_ceph_stripe_count]) + it 'configures manila.conf' do + should contain_manila_config('DEFAULT/backup_driver').with_value('manila.backup.driver.ceph') + should contain_manila_config('DEFAULT/backup_ceph_conf').with_value(p[:backup_ceph_conf]) + should contain_manila_config('DEFAULT/backup_ceph_user').with_value(p[:backup_ceph_user]) + should contain_manila_config('DEFAULT/backup_ceph_chunk_size').with_value(p[:backup_ceph_chunk_size]) + should contain_manila_config('DEFAULT/backup_ceph_pool').with_value(p[:backup_ceph_pool]) + should contain_manila_config('DEFAULT/backup_ceph_stripe_unit').with_value(p[:backup_ceph_stripe_unit]) + should contain_manila_config('DEFAULT/backup_ceph_stripe_count').with_value(p[:backup_ceph_stripe_count]) end context 'when overriding default parameters' do @@ -60,12 +60,12 @@ describe 'cinder::backup::ceph' do params.merge!(:backup_ceph_stripe_count => '67') end it 'should replace default parameters with new values' do - should contain_cinder_config('DEFAULT/backup_ceph_conf').with_value(p[:backup_ceph_conf]) - should contain_cinder_config('DEFAULT/backup_ceph_user').with_value(p[:backup_ceph_user]) - should contain_cinder_config('DEFAULT/backup_ceph_chunk_size').with_value(p[:backup_ceph_chunk_size]) - should contain_cinder_config('DEFAULT/backup_ceph_pool').with_value(p[:backup_ceph_pool]) - should contain_cinder_config('DEFAULT/backup_ceph_stripe_unit').with_value(p[:backup_ceph_stripe_unit]) - should contain_cinder_config('DEFAULT/backup_ceph_stripe_count').with_value(p[:backup_ceph_stripe_count]) + should contain_manila_config('DEFAULT/backup_ceph_conf').with_value(p[:backup_ceph_conf]) + should contain_manila_config('DEFAULT/backup_ceph_user').with_value(p[:backup_ceph_user]) + should contain_manila_config('DEFAULT/backup_ceph_chunk_size').with_value(p[:backup_ceph_chunk_size]) + should contain_manila_config('DEFAULT/backup_ceph_pool').with_value(p[:backup_ceph_pool]) + should contain_manila_config('DEFAULT/backup_ceph_stripe_unit').with_value(p[:backup_ceph_stripe_unit]) + should contain_manila_config('DEFAULT/backup_ceph_stripe_count').with_value(p[:backup_ceph_stripe_count]) end end end @@ -75,7 +75,7 @@ describe 'cinder::backup::ceph' do { :osfamily => 'Debian' } end - it_configures 'cinder backup with ceph' + it_configures 'manila backup with ceph' end context 'on RedHat platforms' do @@ -83,7 +83,7 @@ describe 'cinder::backup::ceph' do { :osfamily => 'RedHat' } end - it_configures 'cinder backup with ceph' + it_configures 'manila backup with ceph' end end diff --git a/spec/classes/manila_backup_spec.rb b/spec/classes/manila_backup_spec.rb index 0f632ccb..1a5c5b03 100644 --- a/spec/classes/manila_backup_spec.rb +++ b/spec/classes/manila_backup_spec.rb @@ -15,18 +15,18 @@ # License for the specific language governing permissions and limitations # under the License. # -# Unit tests for cinder::backup class +# Unit tests for manila::backup class # require 'spec_helper' -describe 'cinder::backup' do +describe 'manila::backup' do let :default_params do { :enable => true, - :backup_topic => 'cinder-backup', - :backup_manager => 'cinder.backup.manager.BackupManager', - :backup_api_class => 'cinder.backup.api.API', + :backup_topic => 'manila-backup', + :backup_manager => 'manila.backup.manager.BackupManager', + :backup_api_class => 'manila.backup.api.API', :backup_name_template => 'backup-%s' } end @@ -34,33 +34,33 @@ describe 'cinder::backup' do {} end - shared_examples_for 'cinder backup' do + shared_examples_for 'manila backup' do let :p do default_params.merge(params) end - it { should contain_class('cinder::params') } + it { should contain_class('manila::params') } - it 'installs cinder backup package' do + it 'installs manila backup package' do if platform_params.has_key?(:backup_package) - should contain_package('cinder-backup').with( + should contain_package('manila-backup').with( :name => platform_params[:backup_package], :ensure => 'present' ) - should contain_package('cinder-backup').with_before(/Cinder_config\[.+\]/) - should contain_package('cinder-backup').with_before(/Service\[cinder-backup\]/) + should contain_package('manila-backup').with_before(/Manila_config\[.+\]/) + should contain_package('manila-backup').with_before(/Service\[manila-backup\]/) end end - it 'ensure cinder backup service is running' do - should contain_service('cinder-backup').with('hasstatus' => true) + it 'ensure manila backup service is running' do + should contain_service('manila-backup').with('hasstatus' => true) end - it 'configures cinder.conf' do - should contain_cinder_config('DEFAULT/backup_topic').with_value(p[:backup_topic]) - should contain_cinder_config('DEFAULT/backup_manager').with_value(p[:backup_manager]) - should contain_cinder_config('DEFAULT/backup_api_class').with_value(p[:backup_api_class]) - should contain_cinder_config('DEFAULT/backup_name_template').with_value(p[:backup_name_template]) + it 'configures manila.conf' do + should contain_manila_config('DEFAULT/backup_topic').with_value(p[:backup_topic]) + should contain_manila_config('DEFAULT/backup_manager').with_value(p[:backup_manager]) + should contain_manila_config('DEFAULT/backup_api_class').with_value(p[:backup_api_class]) + should contain_manila_config('DEFAULT/backup_name_template').with_value(p[:backup_name_template]) end context 'when overriding backup_name_template' do @@ -68,7 +68,7 @@ describe 'cinder::backup' do params.merge!(:backup_name_template => 'foo-bar-%s') end it 'should replace default parameter with new value' do - should contain_cinder_config('DEFAULT/backup_name_template').with_value(p[:backup_name_template]) + should contain_manila_config('DEFAULT/backup_name_template').with_value(p[:backup_name_template]) end end end @@ -79,11 +79,11 @@ describe 'cinder::backup' do end let :platform_params do - { :backup_package => 'cinder-backup', - :backup_service => 'cinder-backup' } + { :backup_package => 'manila-backup', + :backup_service => 'manila-backup' } end - it_configures 'cinder backup' + it_configures 'manila backup' end context 'on RedHat platforms' do @@ -92,10 +92,10 @@ describe 'cinder::backup' do end let :platform_params do - { :backup_service => 'cinder-backup' } + { :backup_service => 'manila-backup' } end - it_configures 'cinder backup' + it_configures 'manila backup' end end diff --git a/spec/classes/manila_backup_swift_spec.rb b/spec/classes/manila_backup_swift_spec.rb index dae1bd61..26c13943 100644 --- a/spec/classes/manila_backup_swift_spec.rb +++ b/spec/classes/manila_backup_swift_spec.rb @@ -15,12 +15,12 @@ # License for the specific language governing permissions and limitations # under the License. # -# Unit tests for cinder::backup::swift class +# Unit tests for manila::backup::swift class # require 'spec_helper' -describe 'cinder::backup::swift' do +describe 'manila::backup::swift' do let :default_params do { :backup_swift_url => 'http://localhost:8080/v1/AUTH_', @@ -34,18 +34,18 @@ describe 'cinder::backup::swift' do {} end - shared_examples_for 'cinder backup with swift' do + shared_examples_for 'manila backup with swift' do let :p do default_params.merge(params) end - it 'configures cinder.conf' do - should contain_cinder_config('DEFAULT/backup_driver').with_value('cinder.backup.drivers.swift') - should contain_cinder_config('DEFAULT/backup_swift_url').with_value(p[:backup_swift_url]) - should contain_cinder_config('DEFAULT/backup_swift_container').with_value(p[:backup_swift_container]) - should contain_cinder_config('DEFAULT/backup_swift_object_size').with_value(p[:backup_swift_object_size]) - should contain_cinder_config('DEFAULT/backup_swift_retry_attempts').with_value(p[:backup_swift_retry_attempts]) - should contain_cinder_config('DEFAULT/backup_swift_retry_backoff').with_value(p[:backup_swift_retry_backoff]) + it 'configures manila.conf' do + should contain_manila_config('DEFAULT/backup_driver').with_value('manila.backup.drivers.swift') + should contain_manila_config('DEFAULT/backup_swift_url').with_value(p[:backup_swift_url]) + should contain_manila_config('DEFAULT/backup_swift_container').with_value(p[:backup_swift_container]) + should contain_manila_config('DEFAULT/backup_swift_object_size').with_value(p[:backup_swift_object_size]) + should contain_manila_config('DEFAULT/backup_swift_retry_attempts').with_value(p[:backup_swift_retry_attempts]) + should contain_manila_config('DEFAULT/backup_swift_retry_backoff').with_value(p[:backup_swift_retry_backoff]) end context 'when overriding default parameters' do @@ -57,11 +57,11 @@ describe 'cinder::backup::swift' do params.merge!(:backup_swift_retry_backoff => '56') end it 'should replace default parameters with new values' do - should contain_cinder_config('DEFAULT/backup_swift_url').with_value(p[:backup_swift_url]) - should contain_cinder_config('DEFAULT/backup_swift_container').with_value(p[:backup_swift_container]) - should contain_cinder_config('DEFAULT/backup_swift_object_size').with_value(p[:backup_swift_object_size]) - should contain_cinder_config('DEFAULT/backup_swift_retry_attempts').with_value(p[:backup_swift_retry_attempts]) - should contain_cinder_config('DEFAULT/backup_swift_retry_backoff').with_value(p[:backup_swift_retry_backoff]) + should contain_manila_config('DEFAULT/backup_swift_url').with_value(p[:backup_swift_url]) + should contain_manila_config('DEFAULT/backup_swift_container').with_value(p[:backup_swift_container]) + should contain_manila_config('DEFAULT/backup_swift_object_size').with_value(p[:backup_swift_object_size]) + should contain_manila_config('DEFAULT/backup_swift_retry_attempts').with_value(p[:backup_swift_retry_attempts]) + should contain_manila_config('DEFAULT/backup_swift_retry_backoff').with_value(p[:backup_swift_retry_backoff]) end end end @@ -71,7 +71,7 @@ describe 'cinder::backup::swift' do { :osfamily => 'Debian' } end - it_configures 'cinder backup with swift' + it_configures 'manila backup with swift' end context 'on RedHat platforms' do @@ -79,7 +79,7 @@ describe 'cinder::backup::swift' do { :osfamily => 'RedHat' } end - it_configures 'cinder backup with swift' + it_configures 'manila backup with swift' end end diff --git a/spec/classes/manila_ceilometer_spec.rb b/spec/classes/manila_ceilometer_spec.rb index e1b52a10..03de836b 100644 --- a/spec/classes/manila_ceilometer_spec.rb +++ b/spec/classes/manila_ceilometer_spec.rb @@ -1,11 +1,11 @@ require 'spec_helper' -describe 'cinder::ceilometer' do +describe 'manila::ceilometer' do describe 'with default parameters' do it 'contains default values' do - should contain_cinder_config('DEFAULT/notification_driver').with( - :value => 'cinder.openstack.common.notifier.rpc_notifier') + should contain_manila_config('DEFAULT/notification_driver').with( + :value => 'manila.openstack.common.notifier.rpc_notifier') end end end diff --git a/spec/classes/manila_client_spec.rb b/spec/classes/manila_client_spec.rb index 77b51ced..27ee6589 100644 --- a/spec/classes/manila_client_spec.rb +++ b/spec/classes/manila_client_spec.rb @@ -1,7 +1,7 @@ require 'spec_helper' -describe 'cinder::client' do - it { should contain_package('python-cinderclient').with_ensure('present') } +describe 'manila::client' do + it { should contain_package('python-manilaclient').with_ensure('present') } let :facts do {:osfamily => 'Debian'} end @@ -9,6 +9,6 @@ describe 'cinder::client' do let :params do {:package_ensure => 'latest'} end - it { should contain_package('python-cinderclient').with_ensure('latest') } + it { should contain_package('python-manilaclient').with_ensure('latest') } end end diff --git a/spec/classes/manila_db_mysql_spec.rb b/spec/classes/manila_db_mysql_spec.rb index 3603357a..d0f6c33c 100644 --- a/spec/classes/manila_db_mysql_spec.rb +++ b/spec/classes/manila_db_mysql_spec.rb @@ -1,6 +1,6 @@ require 'spec_helper' -describe 'cinder::db::mysql' do +describe 'manila::db::mysql' do let :req_params do {:password => 'pw', @@ -19,8 +19,8 @@ describe 'cinder::db::mysql' do let :params do req_params end - it { should contain_mysql__db('cinder').with( - :user => 'cinder', + it { should contain_mysql__db('manila').with( + :user => 'manila', :password => 'pw', :host => '127.0.0.1', :charset => 'utf8' @@ -29,49 +29,49 @@ describe 'cinder::db::mysql' do describe "overriding allowed_hosts param to array" do let :params do { - :password => 'cinderpass', + :password => 'manilapass', :allowed_hosts => ['127.0.0.1','%'] } end - it {should_not contain_cinder__db__mysql__host_access("127.0.0.1").with( - :user => 'cinder', - :password => 'cinderpass', - :database => 'cinder' + it {should_not contain_manila__db__mysql__host_access("127.0.0.1").with( + :user => 'manila', + :password => 'manilapass', + :database => 'manila' )} - it {should contain_cinder__db__mysql__host_access("%").with( - :user => 'cinder', - :password => 'cinderpass', - :database => 'cinder' + it {should contain_manila__db__mysql__host_access("%").with( + :user => 'manila', + :password => 'manilapass', + :database => 'manila' )} end describe "overriding allowed_hosts param to string" do let :params do { - :password => 'cinderpass2', + :password => 'manilapass2', :allowed_hosts => '192.168.1.1' } end - it {should contain_cinder__db__mysql__host_access("192.168.1.1").with( - :user => 'cinder', - :password => 'cinderpass2', - :database => 'cinder' + it {should contain_manila__db__mysql__host_access("192.168.1.1").with( + :user => 'manila', + :password => 'manilapass2', + :database => 'manila' )} end describe "overriding allowed_hosts param equals to host param " do let :params do { - :password => 'cinderpass2', + :password => 'manilapass2', :allowed_hosts => '127.0.0.1' } end - it {should_not contain_cinder__db__mysql__host_access("127.0.0.1").with( - :user => 'cinder', - :password => 'cinderpass2', - :database => 'cinder' + it {should_not contain_manila__db__mysql__host_access("127.0.0.1").with( + :user => 'manila', + :password => 'manilapass2', + :database => 'manila' )} end end diff --git a/spec/classes/manila_db_postgresql_spec.rb b/spec/classes/manila_db_postgresql_spec.rb index 93296ae1..46dfa1c1 100644 --- a/spec/classes/manila_db_postgresql_spec.rb +++ b/spec/classes/manila_db_postgresql_spec.rb @@ -1,6 +1,6 @@ require 'spec_helper' -describe 'cinder::db::postgresql' do +describe 'manila::db::postgresql' do let :req_params do {:password => 'pw'} @@ -17,8 +17,8 @@ describe 'cinder::db::postgresql' do let :params do req_params end - it { should contain_postgresql__db('cinder').with( - :user => 'cinder', + it { should contain_postgresql__db('manila').with( + :user => 'manila', :password => 'pw' ) } end diff --git a/spec/classes/manila_db_sync_spec.rb b/spec/classes/manila_db_sync_spec.rb index 906d4391..6806748a 100644 --- a/spec/classes/manila_db_sync_spec.rb +++ b/spec/classes/manila_db_sync_spec.rb @@ -1,14 +1,14 @@ require 'spec_helper' -describe 'cinder::db::sync' do +describe 'manila::db::sync' do let :facts do {:osfamily => 'Debian'} end - it { should contain_exec('cinder-manage db_sync').with( - :command => 'cinder-manage db sync', + it { should contain_exec('manila-manage db_sync').with( + :command => 'manila-manage db sync', :path => '/usr/bin', - :user => 'cinder', + :user => 'manila', :refreshonly => true, :logoutput => 'on_failure' ) } diff --git a/spec/classes/manila_glance_spec.rb b/spec/classes/manila_glance_spec.rb index 64bf89a5..20059d2f 100644 --- a/spec/classes/manila_glance_spec.rb +++ b/spec/classes/manila_glance_spec.rb @@ -15,12 +15,12 @@ # License for the specific language governing permissions and limitations # under the License. # -# Unit tests for cinder::glance class +# Unit tests for manila::glance class # require 'spec_helper' -describe 'cinder::glance' do +describe 'manila::glance' do let :default_params do { :glance_api_version => '2', @@ -33,32 +33,32 @@ describe 'cinder::glance' do {} end - shared_examples_for 'cinder with glance' do + shared_examples_for 'manila with glance' do let :p do default_params.merge(params) end - it 'configures cinder.conf with default params' do - should contain_cinder_config('DEFAULT/glance_api_version').with_value(p[:glance_api_version]) - should contain_cinder_config('DEFAULT/glance_num_retries').with_value(p[:glance_num_retries]) - should contain_cinder_config('DEFAULT/glance_api_insecure').with_value(p[:glance_api_insecure]) + it 'configures manila.conf with default params' do + should contain_manila_config('DEFAULT/glance_api_version').with_value(p[:glance_api_version]) + should contain_manila_config('DEFAULT/glance_num_retries').with_value(p[:glance_num_retries]) + should contain_manila_config('DEFAULT/glance_api_insecure').with_value(p[:glance_api_insecure]) end - context 'configure cinder with one glance server' do + context 'configure manila with one glance server' do before :each do params.merge!(:glance_api_servers => '10.0.0.1:9292') end it 'should configure one glance server' do - should contain_cinder_config('DEFAULT/glance_api_servers').with_value(p[:glance_api_servers]) + should contain_manila_config('DEFAULT/glance_api_servers').with_value(p[:glance_api_servers]) end end - context 'configure cinder with two glance servers' do + context 'configure manila with two glance servers' do before :each do params.merge!(:glance_api_servers => ['10.0.0.1:9292','10.0.0.2:9292']) end it 'should configure two glance servers' do - should contain_cinder_config('DEFAULT/glance_api_servers').with_value(p[:glance_api_servers].join(',')) + should contain_manila_config('DEFAULT/glance_api_servers').with_value(p[:glance_api_servers].join(',')) end end end @@ -68,7 +68,7 @@ describe 'cinder::glance' do { :osfamily => 'Debian' } end - it_configures 'cinder with glance' + it_configures 'manila with glance' end context 'on RedHat platforms' do @@ -76,7 +76,7 @@ describe 'cinder::glance' do { :osfamily => 'RedHat' } end - it_configures 'cinder with glance' + it_configures 'manila with glance' end end diff --git a/spec/classes/manila_keystone_auth_spec.rb b/spec/classes/manila_keystone_auth_spec.rb index 7e20cdbc..70e1827d 100644 --- a/spec/classes/manila_keystone_auth_spec.rb +++ b/spec/classes/manila_keystone_auth_spec.rb @@ -1,6 +1,6 @@ require 'spec_helper' -describe 'cinder::keystone::auth' do +describe 'manila::keystone::auth' do let :req_params do {:password => 'pw'} @@ -14,35 +14,35 @@ describe 'cinder::keystone::auth' do it 'should contain auth info' do - should contain_keystone_user('cinder').with( + should contain_keystone_user('manila').with( :ensure => 'present', :password => 'pw', - :email => 'cinder@localhost', + :email => 'manila@localhost', :tenant => 'services' ) - should contain_keystone_user_role('cinder@services').with( + should contain_keystone_user_role('manila@services').with( :ensure => 'present', :roles => 'admin' ) - should contain_keystone_service('cinder').with( + should contain_keystone_service('manila').with( :ensure => 'present', :type => 'volume', - :description => 'Cinder Service' + :description => 'Manila Service' ) - should contain_keystone_service('cinderv2').with( + should contain_keystone_service('manilav2').with( :ensure => 'present', :type => 'volumev2', - :description => 'Cinder Service v2' + :description => 'Manila Service v2' ) end - it { should contain_keystone_endpoint('RegionOne/cinder').with( + it { should contain_keystone_endpoint('RegionOne/manila').with( :ensure => 'present', :public_url => 'http://127.0.0.1:8776/v1/%(tenant_id)s', :admin_url => 'http://127.0.0.1:8776/v1/%(tenant_id)s', :internal_url => 'http://127.0.0.1:8776/v1/%(tenant_id)s' ) } - it { should contain_keystone_endpoint('RegionOne/cinderv2').with( + it { should contain_keystone_endpoint('RegionOne/manilav2').with( :ensure => 'present', :public_url => 'http://127.0.0.1:8776/v2/%(tenant_id)s', :admin_url => 'http://127.0.0.1:8776/v2/%(tenant_id)s', @@ -66,7 +66,7 @@ describe 'cinder::keystone::auth' do ) end - it { should contain_keystone_endpoint('RegionThree/cinder').with( + it { should contain_keystone_endpoint('RegionThree/manila').with( :ensure => 'present', :public_url => 'https://10.0.42.1:4242/v42/%(tenant_id)s', :admin_url => 'https://10.0.42.2:4242/v42/%(tenant_id)s', @@ -83,8 +83,8 @@ describe 'cinder::keystone::auth' do :configure_endpoint_v2 => false ) end - it { should_not contain_keystone_endpoint('RegionOne/cinder') } - it { should_not contain_keystone_endpoint('RegionOne/cinderv2') } + it { should_not contain_keystone_endpoint('RegionOne/manila') } + it { should_not contain_keystone_endpoint('RegionOne/manilav2') } end end diff --git a/spec/classes/manila_params_spec.rb b/spec/classes/manila_params_spec.rb index 306ce181..32a73c62 100644 --- a/spec/classes/manila_params_spec.rb +++ b/spec/classes/manila_params_spec.rb @@ -1,6 +1,6 @@ require 'spec_helper' -describe 'cinder::params' do +describe 'manila::params' do let :facts do {:osfamily => 'Debian'} diff --git a/spec/classes/manila_qpid_spec.rb b/spec/classes/manila_qpid_spec.rb index 0ace3209..0a79e3f8 100644 --- a/spec/classes/manila_qpid_spec.rb +++ b/spec/classes/manila_qpid_spec.rb @@ -1,6 +1,6 @@ require 'spec_helper' -describe 'cinder::qpid' do +describe 'manila::qpid' do let :facts do {:puppetversion => '2.7', diff --git a/spec/classes/manila_quota_spec.rb b/spec/classes/manila_quota_spec.rb index ecbc2d97..993bd0f9 100644 --- a/spec/classes/manila_quota_spec.rb +++ b/spec/classes/manila_quota_spec.rb @@ -1,17 +1,17 @@ require 'spec_helper' -describe 'cinder::quota' do +describe 'manila::quota' do describe 'with default parameters' do it 'contains default values' do - should contain_cinder_config('DEFAULT/quota_volumes').with( + should contain_manila_config('DEFAULT/quota_volumes').with( :value => 10) - should contain_cinder_config('DEFAULT/quota_snapshots').with( + should contain_manila_config('DEFAULT/quota_snapshots').with( :value => 10) - should contain_cinder_config('DEFAULT/quota_gigabytes').with( + should contain_manila_config('DEFAULT/quota_gigabytes').with( :value => 1000) - should contain_cinder_config('DEFAULT/quota_driver').with( - :value => 'cinder.quota.DbQuotaDriver') + should contain_manila_config('DEFAULT/quota_driver').with( + :value => 'manila.quota.DbQuotaDriver') end end @@ -22,14 +22,14 @@ describe 'cinder::quota' do :quota_gigabytes => 100000 } end it 'contains overrided values' do - should contain_cinder_config('DEFAULT/quota_volumes').with( + should contain_manila_config('DEFAULT/quota_volumes').with( :value => 1000) - should contain_cinder_config('DEFAULT/quota_snapshots').with( + should contain_manila_config('DEFAULT/quota_snapshots').with( :value => 1000) - should contain_cinder_config('DEFAULT/quota_gigabytes').with( + should contain_manila_config('DEFAULT/quota_gigabytes').with( :value => 100000) - should contain_cinder_config('DEFAULT/quota_driver').with( - :value => 'cinder.quota.DbQuotaDriver') + should contain_manila_config('DEFAULT/quota_driver').with( + :value => 'manila.quota.DbQuotaDriver') end end end diff --git a/spec/classes/manila_rabbitmq_spec.rb b/spec/classes/manila_rabbitmq_spec.rb index 3fcfd7a0..c48eaf49 100644 --- a/spec/classes/manila_rabbitmq_spec.rb +++ b/spec/classes/manila_rabbitmq_spec.rb @@ -1,6 +1,6 @@ require 'spec_helper' -describe 'cinder::rabbitmq' do +describe 'manila::rabbitmq' do let :facts do { :puppetversion => '2.7', diff --git a/spec/classes/manila_scheduler_spec.rb b/spec/classes/manila_scheduler_spec.rb index 4ce066a0..9a1a1b46 100644 --- a/spec/classes/manila_scheduler_spec.rb +++ b/spec/classes/manila_scheduler_spec.rb @@ -1,6 +1,6 @@ require 'spec_helper' -describe 'cinder::scheduler' do +describe 'manila::scheduler' do describe 'on debian platforms' do @@ -10,19 +10,19 @@ describe 'cinder::scheduler' do describe 'with default parameters' do - it { should contain_class('cinder::params') } + it { should contain_class('manila::params') } - it { should contain_package('cinder-scheduler').with( - :name => 'cinder-scheduler', + it { should contain_package('manila-scheduler').with( + :name => 'manila-scheduler', :ensure => 'present', - :before => 'Service[cinder-scheduler]' + :before => 'Service[manila-scheduler]' ) } - it { should contain_service('cinder-scheduler').with( - :name => 'cinder-scheduler', + it { should contain_service('manila-scheduler').with( + :name => 'manila-scheduler', :enable => true, :ensure => 'running', - :require => 'Package[cinder]', + :require => 'Package[manila]', :hasstatus => true ) } end @@ -30,13 +30,13 @@ describe 'cinder::scheduler' do describe 'with parameters' do let :params do - { :scheduler_driver => 'cinder.scheduler.filter_scheduler.FilterScheduler', + { :scheduler_driver => 'manila.scheduler.filter_scheduler.FilterScheduler', :package_ensure => 'present' } end - it { should contain_cinder_config('DEFAULT/scheduler_driver').with_value('cinder.scheduler.filter_scheduler.FilterScheduler') } - it { should contain_package('cinder-scheduler').with_ensure('present') } + it { should contain_manila_config('DEFAULT/scheduler_driver').with_value('manila.scheduler.filter_scheduler.FilterScheduler') } + it { should contain_package('manila-scheduler').with_ensure('present') } end describe 'with manage_service false' do @@ -45,7 +45,7 @@ describe 'cinder::scheduler' do } end it 'should not change the state of the service' do - should contain_service('cinder-scheduler').without_ensure + should contain_service('manila-scheduler').without_ensure end end end @@ -59,23 +59,23 @@ describe 'cinder::scheduler' do describe 'with default parameters' do - it { should contain_class('cinder::params') } + it { should contain_class('manila::params') } - it { should contain_service('cinder-scheduler').with( - :name => 'openstack-cinder-scheduler', + it { should contain_service('manila-scheduler').with( + :name => 'openstack-manila-scheduler', :enable => true, :ensure => 'running', - :require => 'Package[cinder]' + :require => 'Package[manila]' ) } end describe 'with parameters' do let :params do - { :scheduler_driver => 'cinder.scheduler.filter_scheduler.FilterScheduler' } + { :scheduler_driver => 'manila.scheduler.filter_scheduler.FilterScheduler' } end - it { should contain_cinder_config('DEFAULT/scheduler_driver').with_value('cinder.scheduler.filter_scheduler.FilterScheduler') } + it { should contain_manila_config('DEFAULT/scheduler_driver').with_value('manila.scheduler.filter_scheduler.FilterScheduler') } end end end diff --git a/spec/classes/manila_setup_test_volume_spec.rb b/spec/classes/manila_setup_test_volume_spec.rb index 42209548..e51fc90d 100644 --- a/spec/classes/manila_setup_test_volume_spec.rb +++ b/spec/classes/manila_setup_test_volume_spec.rb @@ -1,15 +1,15 @@ require 'spec_helper' -describe 'cinder::setup_test_volume' do +describe 'manila::setup_test_volume' do it { should contain_package('lvm2').with( :ensure => 'present' ) } it 'should contain volume creation execs' do - should contain_exec('/bin/dd if=/dev/zero of=cinder-volumes bs=1 count=0 seek=4G') - should contain_exec('/sbin/losetup /dev/loop2 cinder-volumes') + should contain_exec('/bin/dd if=/dev/zero of=manila-volumes bs=1 count=0 seek=4G') + should contain_exec('/sbin/losetup /dev/loop2 manila-volumes') should contain_exec('/sbin/pvcreate /dev/loop2') - should contain_exec('/sbin/vgcreate cinder-volumes /dev/loop2') + should contain_exec('/sbin/vgcreate manila-volumes /dev/loop2') end end diff --git a/spec/classes/manila_spec.rb b/spec/classes/manila_spec.rb index fca0d316..c57cb1b0 100644 --- a/spec/classes/manila_spec.rb +++ b/spec/classes/manila_spec.rb @@ -1,5 +1,5 @@ require 'spec_helper' -describe 'cinder' do +describe 'manila' do let :req_params do {:rabbit_password => 'guest', :database_connection => 'mysql://user:password@host/database'} end @@ -13,75 +13,75 @@ describe 'cinder' do req_params end - it { should contain_class('cinder::params') } + it { should contain_class('manila::params') } it { should contain_class('mysql::python') } it 'should contain default config' do - should contain_cinder_config('DEFAULT/rpc_backend').with( - :value => 'cinder.openstack.common.rpc.impl_kombu' + should contain_manila_config('DEFAULT/rpc_backend').with( + :value => 'manila.openstack.common.rpc.impl_kombu' ) - should contain_cinder_config('DEFAULT/control_exchange').with( + should contain_manila_config('DEFAULT/control_exchange').with( :value => 'openstack' ) - should contain_cinder_config('DEFAULT/rabbit_password').with( + should contain_manila_config('DEFAULT/rabbit_password').with( :value => 'guest', :secret => true ) - should contain_cinder_config('DEFAULT/rabbit_host').with( + should contain_manila_config('DEFAULT/rabbit_host').with( :value => '127.0.0.1' ) - should contain_cinder_config('DEFAULT/rabbit_port').with( + should contain_manila_config('DEFAULT/rabbit_port').with( :value => '5672' ) - should contain_cinder_config('DEFAULT/rabbit_hosts').with( + should contain_manila_config('DEFAULT/rabbit_hosts').with( :value => '127.0.0.1:5672' ) - should contain_cinder_config('DEFAULT/rabbit_ha_queues').with( + should contain_manila_config('DEFAULT/rabbit_ha_queues').with( :value => false ) - should contain_cinder_config('DEFAULT/rabbit_virtual_host').with( + should contain_manila_config('DEFAULT/rabbit_virtual_host').with( :value => '/' ) - should contain_cinder_config('DEFAULT/rabbit_userid').with( + should contain_manila_config('DEFAULT/rabbit_userid').with( :value => 'guest' ) - should contain_cinder_config('database/connection').with( + should contain_manila_config('database/connection').with( :value => 'mysql://user:password@host/database', :secret => true ) - should contain_cinder_config('database/idle_timeout').with( + should contain_manila_config('database/idle_timeout').with( :value => '3600' ) - should contain_cinder_config('DEFAULT/verbose').with( + should contain_manila_config('DEFAULT/verbose').with( :value => false ) - should contain_cinder_config('DEFAULT/debug').with( + should contain_manila_config('DEFAULT/debug').with( :value => false ) - should contain_cinder_config('DEFAULT/storage_availability_zone').with( + should contain_manila_config('DEFAULT/storage_availability_zone').with( :value => 'nova' ) - should contain_cinder_config('DEFAULT/default_availability_zone').with( + should contain_manila_config('DEFAULT/default_availability_zone').with( :value => 'nova' ) - should contain_cinder_config('DEFAULT/api_paste_config').with( - :value => '/etc/cinder/api-paste.ini' + should contain_manila_config('DEFAULT/api_paste_config').with( + :value => '/etc/manila/api-paste.ini' ) - should contain_cinder_config('DEFAULT/log_dir').with(:value => '/var/log/cinder') + should contain_manila_config('DEFAULT/log_dir').with(:value => '/var/log/manila') end - it { should contain_file('/etc/cinder/cinder.conf').with( - :owner => 'cinder', - :group => 'cinder', + it { should contain_file('/etc/manila/manila.conf').with( + :owner => 'manila', + :group => 'manila', :mode => '0600', - :require => 'Package[cinder]' + :require => 'Package[manila]' ) } - it { should contain_file('/etc/cinder/api-paste.ini').with( - :owner => 'cinder', - :group => 'cinder', + it { should contain_file('/etc/manila/api-paste.ini').with( + :owner => 'manila', + :group => 'manila', :mode => '0600', - :require => 'Package[cinder]' + :require => 'Package[manila]' ) } end @@ -91,12 +91,12 @@ describe 'cinder' do end it 'should contain many' do - should_not contain_cinder_config('DEFAULT/rabbit_host') - should_not contain_cinder_config('DEFAULT/rabbit_port') - should contain_cinder_config('DEFAULT/rabbit_hosts').with( + should_not contain_manila_config('DEFAULT/rabbit_host') + should_not contain_manila_config('DEFAULT/rabbit_port') + should contain_manila_config('DEFAULT/rabbit_hosts').with( :value => 'rabbit1:5672,rabbit2:5672' ) - should contain_cinder_config('DEFAULT/rabbit_ha_queues').with( + should contain_manila_config('DEFAULT/rabbit_ha_queues').with( :value => true ) end @@ -108,12 +108,12 @@ describe 'cinder' do end it 'should contain many' do - should_not contain_cinder_config('DEFAULT/rabbit_host') - should_not contain_cinder_config('DEFAULT/rabbit_port') - should contain_cinder_config('DEFAULT/rabbit_hosts').with( + should_not contain_manila_config('DEFAULT/rabbit_host') + should_not contain_manila_config('DEFAULT/rabbit_port') + should contain_manila_config('DEFAULT/rabbit_hosts').with( :value => 'rabbit1:5672' ) - should contain_cinder_config('DEFAULT/rabbit_ha_queues').with( + should contain_manila_config('DEFAULT/rabbit_ha_queues').with( :value => true ) end @@ -125,25 +125,25 @@ describe 'cinder' do { :database_connection => 'mysql://user:password@host/database', :qpid_password => 'guest', - :rpc_backend => 'cinder.openstack.common.rpc.impl_qpid' + :rpc_backend => 'manila.openstack.common.rpc.impl_qpid' } end - it { should contain_cinder_config('database/connection').with_value('mysql://user:password@host/database') } - it { should contain_cinder_config('DEFAULT/rpc_backend').with_value('cinder.openstack.common.rpc.impl_qpid') } - it { should contain_cinder_config('DEFAULT/qpid_hostname').with_value('localhost') } - it { should contain_cinder_config('DEFAULT/qpid_port').with_value('5672') } - it { should contain_cinder_config('DEFAULT/qpid_username').with_value('guest') } - it { should contain_cinder_config('DEFAULT/qpid_password').with_value('guest').with_secret(true) } - it { should contain_cinder_config('DEFAULT/qpid_reconnect').with_value(true) } - it { should contain_cinder_config('DEFAULT/qpid_reconnect_timeout').with_value('0') } - it { should contain_cinder_config('DEFAULT/qpid_reconnect_limit').with_value('0') } - it { should contain_cinder_config('DEFAULT/qpid_reconnect_interval_min').with_value('0') } - it { should contain_cinder_config('DEFAULT/qpid_reconnect_interval_max').with_value('0') } - it { should contain_cinder_config('DEFAULT/qpid_reconnect_interval').with_value('0') } - it { should contain_cinder_config('DEFAULT/qpid_heartbeat').with_value('60') } - it { should contain_cinder_config('DEFAULT/qpid_protocol').with_value('tcp') } - it { should contain_cinder_config('DEFAULT/qpid_tcp_nodelay').with_value(true) } + it { should contain_manila_config('database/connection').with_value('mysql://user:password@host/database') } + it { should contain_manila_config('DEFAULT/rpc_backend').with_value('manila.openstack.common.rpc.impl_qpid') } + it { should contain_manila_config('DEFAULT/qpid_hostname').with_value('localhost') } + it { should contain_manila_config('DEFAULT/qpid_port').with_value('5672') } + it { should contain_manila_config('DEFAULT/qpid_username').with_value('guest') } + it { should contain_manila_config('DEFAULT/qpid_password').with_value('guest').with_secret(true) } + it { should contain_manila_config('DEFAULT/qpid_reconnect').with_value(true) } + it { should contain_manila_config('DEFAULT/qpid_reconnect_timeout').with_value('0') } + it { should contain_manila_config('DEFAULT/qpid_reconnect_limit').with_value('0') } + it { should contain_manila_config('DEFAULT/qpid_reconnect_interval_min').with_value('0') } + it { should contain_manila_config('DEFAULT/qpid_reconnect_interval_max').with_value('0') } + it { should contain_manila_config('DEFAULT/qpid_reconnect_interval').with_value('0') } + it { should contain_manila_config('DEFAULT/qpid_heartbeat').with_value('60') } + it { should contain_manila_config('DEFAULT/qpid_protocol').with_value('tcp') } + it { should contain_manila_config('DEFAULT/qpid_tcp_nodelay').with_value(true) } end describe 'with qpid rpc and no qpid_sasl_mechanisms' do @@ -151,11 +151,11 @@ describe 'cinder' do { :database_connection => 'mysql://user:password@host/database', :qpid_password => 'guest', - :rpc_backend => 'cinder.openstack.common.rpc.impl_qpid' + :rpc_backend => 'manila.openstack.common.rpc.impl_qpid' } end - it { should contain_cinder_config('DEFAULT/qpid_sasl_mechanisms').with_ensure('absent') } + it { should contain_manila_config('DEFAULT/qpid_sasl_mechanisms').with_ensure('absent') } end describe 'with qpid rpc and qpid_sasl_mechanisms string' do @@ -164,11 +164,11 @@ describe 'cinder' do :database_connection => 'mysql://user:password@host/database', :qpid_password => 'guest', :qpid_sasl_mechanisms => 'PLAIN', - :rpc_backend => 'cinder.openstack.common.rpc.impl_qpid' + :rpc_backend => 'manila.openstack.common.rpc.impl_qpid' } end - it { should contain_cinder_config('DEFAULT/qpid_sasl_mechanisms').with_value('PLAIN') } + it { should contain_manila_config('DEFAULT/qpid_sasl_mechanisms').with_value('PLAIN') } end describe 'with qpid rpc and qpid_sasl_mechanisms array' do @@ -177,11 +177,11 @@ describe 'cinder' do :database_connection => 'mysql://user:password@host/database', :qpid_password => 'guest', :qpid_sasl_mechanisms => [ 'DIGEST-MD5', 'GSSAPI', 'PLAIN' ], - :rpc_backend => 'cinder.openstack.common.rpc.impl_qpid' + :rpc_backend => 'manila.openstack.common.rpc.impl_qpid' } end - it { should contain_cinder_config('DEFAULT/qpid_sasl_mechanisms').with_value('DIGEST-MD5 GSSAPI PLAIN') } + it { should contain_manila_config('DEFAULT/qpid_sasl_mechanisms').with_value('DIGEST-MD5 GSSAPI PLAIN') } end describe 'with SSL enabled' do @@ -196,11 +196,11 @@ describe 'cinder' do end it do - should contain_cinder_config('DEFAULT/rabbit_use_ssl').with_value('true') - should contain_cinder_config('DEFAULT/kombu_ssl_ca_certs').with_value('/path/to/ssl/ca/certs') - should contain_cinder_config('DEFAULT/kombu_ssl_certfile').with_value('/path/to/ssl/cert/file') - should contain_cinder_config('DEFAULT/kombu_ssl_keyfile').with_value('/path/to/ssl/keyfile') - should contain_cinder_config('DEFAULT/kombu_ssl_version').with_value('SSLv3') + should contain_manila_config('DEFAULT/rabbit_use_ssl').with_value('true') + should contain_manila_config('DEFAULT/kombu_ssl_ca_certs').with_value('/path/to/ssl/ca/certs') + should contain_manila_config('DEFAULT/kombu_ssl_certfile').with_value('/path/to/ssl/cert/file') + should contain_manila_config('DEFAULT/kombu_ssl_keyfile').with_value('/path/to/ssl/keyfile') + should contain_manila_config('DEFAULT/kombu_ssl_version').with_value('SSLv3') end end @@ -216,11 +216,11 @@ describe 'cinder' do end it do - should contain_cinder_config('DEFAULT/rabbit_use_ssl').with_value('false') - should contain_cinder_config('DEFAULT/kombu_ssl_ca_certs').with_ensure('absent') - should contain_cinder_config('DEFAULT/kombu_ssl_certfile').with_ensure('absent') - should contain_cinder_config('DEFAULT/kombu_ssl_keyfile').with_ensure('absent') - should contain_cinder_config('DEFAULT/kombu_ssl_version').with_ensure('absent') + should contain_manila_config('DEFAULT/rabbit_use_ssl').with_value('false') + should contain_manila_config('DEFAULT/kombu_ssl_ca_certs').with_ensure('absent') + should contain_manila_config('DEFAULT/kombu_ssl_certfile').with_ensure('absent') + should contain_manila_config('DEFAULT/kombu_ssl_keyfile').with_ensure('absent') + should contain_manila_config('DEFAULT/kombu_ssl_version').with_ensure('absent') end end @@ -229,7 +229,7 @@ describe 'cinder' do req_params end - it { should contain_cinder_config('DEFAULT/use_syslog').with_value(false) } + it { should contain_manila_config('DEFAULT/use_syslog').with_value(false) } end describe 'with syslog enabled' do @@ -239,8 +239,8 @@ describe 'cinder' do }) end - it { should contain_cinder_config('DEFAULT/use_syslog').with_value(true) } - it { should contain_cinder_config('DEFAULT/syslog_log_facility').with_value('LOG_USER') } + it { should contain_manila_config('DEFAULT/use_syslog').with_value(true) } + it { should contain_manila_config('DEFAULT/syslog_log_facility').with_value('LOG_USER') } end describe 'with syslog enabled and custom settings' do @@ -251,13 +251,13 @@ describe 'cinder' do }) end - it { should contain_cinder_config('DEFAULT/use_syslog').with_value(true) } - it { should contain_cinder_config('DEFAULT/syslog_log_facility').with_value('LOG_LOCAL0') } + it { should contain_manila_config('DEFAULT/use_syslog').with_value(true) } + it { should contain_manila_config('DEFAULT/syslog_log_facility').with_value('LOG_LOCAL0') } end describe 'with log_dir disabled' do let(:params) { req_params.merge!({:log_dir => false}) } - it { should contain_cinder_config('DEFAULT/log_dir').with_ensure('absent') } + it { should contain_manila_config('DEFAULT/log_dir').with_ensure('absent') } end describe 'with amqp_durable_queues disabled' do @@ -265,7 +265,7 @@ describe 'cinder' do req_params end - it { should contain_cinder_config('DEFAULT/amqp_durable_queues').with_value(false) } + it { should contain_manila_config('DEFAULT/amqp_durable_queues').with_value(false) } end describe 'with amqp_durable_queues enabled' do @@ -275,7 +275,7 @@ describe 'cinder' do }) end - it { should contain_cinder_config('DEFAULT/amqp_durable_queues').with_value(true) } + it { should contain_manila_config('DEFAULT/amqp_durable_queues').with_value(true) } end describe 'with postgresql' do @@ -286,7 +286,7 @@ describe 'cinder' do } end - it { should contain_cinder_config('database/connection').with( + it { should contain_manila_config('database/connection').with( :value => 'postgresql://user:drowssap@host/database', :secret => true ) } @@ -306,9 +306,9 @@ describe 'cinder' do } end - it { should contain_cinder_config('DEFAULT/ssl_ca_file').with_value('/path/to/ca') } - it { should contain_cinder_config('DEFAULT/ssl_cert_file').with_value('/path/to/cert') } - it { should contain_cinder_config('DEFAULT/ssl_key_file').with_value('/path/to/key') } + it { should contain_manila_config('DEFAULT/ssl_ca_file').with_value('/path/to/ca') } + it { should contain_manila_config('DEFAULT/ssl_cert_file').with_value('/path/to/cert') } + it { should contain_manila_config('DEFAULT/ssl_key_file').with_value('/path/to/key') } end describe 'with SSL socket options set to false' do @@ -322,9 +322,9 @@ describe 'cinder' do } end - it { should contain_cinder_config('DEFAULT/ssl_ca_file').with_ensure('absent') } - it { should contain_cinder_config('DEFAULT/ssl_cert_file').with_ensure('absent') } - it { should contain_cinder_config('DEFAULT/ssl_key_file').with_ensure('absent') } + it { should contain_manila_config('DEFAULT/ssl_ca_file').with_ensure('absent') } + it { should contain_manila_config('DEFAULT/ssl_cert_file').with_ensure('absent') } + it { should contain_manila_config('DEFAULT/ssl_key_file').with_ensure('absent') } end describe 'with SSL socket options set wrongly configured' do diff --git a/spec/classes/manila_vmware_spec.rb b/spec/classes/manila_vmware_spec.rb index 70561362..c1b9ba64 100644 --- a/spec/classes/manila_vmware_spec.rb +++ b/spec/classes/manila_vmware_spec.rb @@ -1,6 +1,6 @@ require 'spec_helper' -describe 'cinder::vmware' do +describe 'manila::vmware' do let :params do {:os_password => 'asdf', @@ -11,23 +11,23 @@ describe 'cinder::vmware' do describe 'with defaults' do it 'should create vmware special types' do - should contain_cinder__type('vmware-thin').with( + should contain_manila__type('vmware-thin').with( :set_key => 'vmware:vmdk_type', :set_value => 'thin') - should contain_cinder__type('vmware-thick').with( + should contain_manila__type('vmware-thick').with( :set_key => 'vmware:vmdk_type', :set_value => 'thick') - should contain_cinder__type('vmware-eagerZeroedThick').with( + should contain_manila__type('vmware-eagerZeroedThick').with( :set_key => 'vmware:vmdk_type', :set_value => 'eagerZeroedThick') - should contain_cinder__type('vmware-full').with( + should contain_manila__type('vmware-full').with( :set_key => 'vmware:clone_type', :set_value => 'full') - should contain_cinder__type('vmware-linked').with( + should contain_manila__type('vmware-linked').with( :set_key => 'vmware:clone_type', :set_value => 'linked') end diff --git a/spec/classes/manila_volume_eqlx_spec.rb b/spec/classes/manila_volume_eqlx_spec.rb index 889dde34..4089417e 100644 --- a/spec/classes/manila_volume_eqlx_spec.rb +++ b/spec/classes/manila_volume_eqlx_spec.rb @@ -1,6 +1,6 @@ require 'spec_helper' -describe 'cinder::volume::eqlx' do +describe 'manila::volume::eqlx' do let :params do { :san_ip => '192.168.100.10', @@ -19,14 +19,14 @@ describe 'cinder::volume::eqlx' do describe 'eqlx volume driver' do it 'configures eqlx volume driver' do - should contain_cinder_config( + should contain_manila_config( "DEFAULT/volume_driver").with_value( - 'cinder.volume.drivers.eqlx.DellEQLSanISCSIDriver') - should contain_cinder_config( + 'manila.volume.drivers.eqlx.DellEQLSanISCSIDriver') + should contain_manila_config( "DEFAULT/volume_backend_name").with_value('DEFAULT') params.each_pair do |config,value| - should contain_cinder_config("DEFAULT/#{config}").with_value(value) + should contain_manila_config("DEFAULT/#{config}").with_value(value) end end end diff --git a/spec/classes/manila_volume_glusterfs_spec.rb b/spec/classes/manila_volume_glusterfs_spec.rb index 950d0c41..e05cc225 100644 --- a/spec/classes/manila_volume_glusterfs_spec.rb +++ b/spec/classes/manila_volume_glusterfs_spec.rb @@ -1,30 +1,30 @@ require 'spec_helper' -describe 'cinder::volume::glusterfs' do +describe 'manila::volume::glusterfs' do shared_examples_for 'glusterfs volume driver' do let :params do { :glusterfs_shares => ['10.10.10.10:/volumes', '10.10.10.11:/volumes'], - :glusterfs_shares_config => '/etc/cinder/other_shares.conf', + :glusterfs_shares_config => '/etc/manila/other_shares.conf', :glusterfs_sparsed_volumes => true, - :glusterfs_mount_point_base => '/cinder_mount_point', + :glusterfs_mount_point_base => '/manila_mount_point', } end it 'configures glusterfs volume driver' do - should contain_cinder_config('DEFAULT/volume_driver').with_value( - 'cinder.volume.drivers.glusterfs.GlusterfsDriver') - should contain_cinder_config('DEFAULT/glusterfs_shares_config').with_value( - '/etc/cinder/other_shares.conf') - should contain_cinder_config('DEFAULT/glusterfs_sparsed_volumes').with_value( + should contain_manila_config('DEFAULT/volume_driver').with_value( + 'manila.volume.drivers.glusterfs.GlusterfsDriver') + should contain_manila_config('DEFAULT/glusterfs_shares_config').with_value( + '/etc/manila/other_shares.conf') + should contain_manila_config('DEFAULT/glusterfs_sparsed_volumes').with_value( true) - should contain_cinder_config('DEFAULT/glusterfs_mount_point_base').with_value( - '/cinder_mount_point') - should contain_file('/etc/cinder/other_shares.conf').with( + should contain_manila_config('DEFAULT/glusterfs_mount_point_base').with_value( + '/manila_mount_point') + should contain_file('/etc/manila/other_shares.conf').with( :content => "10.10.10.10:/volumes\n10.10.10.11:/volumes\n", - :require => 'Package[cinder]', - :notify => 'Service[cinder-volume]' + :require => 'Package[manila]', + :notify => 'Service[manila-volume]' ) end diff --git a/spec/classes/manila_volume_iscsi_spec.rb b/spec/classes/manila_volume_iscsi_spec.rb index 0e7a6814..4a7e7a52 100644 --- a/spec/classes/manila_volume_iscsi_spec.rb +++ b/spec/classes/manila_volume_iscsi_spec.rb @@ -1,6 +1,6 @@ require 'spec_helper' -describe 'cinder::volume::iscsi' do +describe 'manila::volume::iscsi' do let :req_params do { :iscsi_ip_address => '127.0.0.2', @@ -18,14 +18,14 @@ describe 'cinder::volume::iscsi' do req_params end - it { should contain_cinder_config('DEFAULT/iscsi_ip_address').with( + it { should contain_manila_config('DEFAULT/iscsi_ip_address').with( :value => '127.0.0.2' ) } - it { should contain_cinder_config('DEFAULT/iscsi_helper').with( + it { should contain_manila_config('DEFAULT/iscsi_helper').with( :value => 'tgtadm' ) } - it { should contain_cinder_config('DEFAULT/volume_group').with( - :value => 'cinder-volumes' + it { should contain_manila_config('DEFAULT/volume_group').with( + :value => 'manila-volumes' ) } end @@ -40,8 +40,8 @@ describe 'cinder::volume::iscsi' do {:osfamily => 'RedHat'} end - it { should contain_file_line('cinder include').with( - :line => 'include /etc/cinder/volumes/*', + it { should contain_file_line('manila include').with( + :line => 'include /etc/manila/volumes/*', :path => '/etc/tgt/targets.conf' ) } diff --git a/spec/classes/manila_volume_netapp_spec.rb b/spec/classes/manila_volume_netapp_spec.rb index 9625cdd5..fad7ae74 100644 --- a/spec/classes/manila_volume_netapp_spec.rb +++ b/spec/classes/manila_volume_netapp_spec.rb @@ -1,6 +1,6 @@ require 'spec_helper' -describe 'cinder::volume::netapp' do +describe 'manila::volume::netapp' do let :params do { @@ -39,15 +39,15 @@ describe 'cinder::volume::netapp' do end it 'configures netapp volume driver' do - should contain_cinder_config('DEFAULT/volume_driver').with_value( - 'cinder.volume.drivers.netapp.common.NetAppDriver') + should contain_manila_config('DEFAULT/volume_driver').with_value( + 'manila.volume.drivers.netapp.common.NetAppDriver') params_hash.each_pair do |config,value| - should contain_cinder_config("DEFAULT/#{config}").with_value( value ) + should contain_manila_config("DEFAULT/#{config}").with_value( value ) end end it 'marks netapp_password as secret' do - should contain_cinder_config('DEFAULT/netapp_password').with_secret( true ) + should contain_manila_config('DEFAULT/netapp_password').with_secret( true ) end end diff --git a/spec/classes/manila_volume_nexenta_spec.rb b/spec/classes/manila_volume_nexenta_spec.rb index 422646c6..334055f0 100644 --- a/spec/classes/manila_volume_nexenta_spec.rb +++ b/spec/classes/manila_volume_nexenta_spec.rb @@ -1,9 +1,9 @@ # author 'Aimon Bustardo ' # license 'Apache License 2.0' -# description 'configures openstack cinder nexenta driver' +# description 'configures openstack manila nexenta driver' require 'spec_helper' -describe 'cinder::volume::nexenta' do +describe 'manila::volume::nexenta' do let :params do { :nexenta_user => 'nexenta', @@ -12,9 +12,9 @@ describe 'cinder::volume::nexenta' do end let :default_params do - { :nexenta_volume => 'cinder', + { :nexenta_volume => 'manila', :nexenta_target_prefix => 'iqn:', - :nexenta_target_group_prefix => 'cinder/', + :nexenta_target_group_prefix => 'manila/', :nexenta_blocksize => '8k', :nexenta_sparse => true } end @@ -31,7 +31,7 @@ describe 'cinder::volume::nexenta' do it 'configures nexenta volume driver' do params_hash.each_pair do |config, value| - should contain_cinder_config("DEFAULT/#{config}").with_value(value) + should contain_manila_config("DEFAULT/#{config}").with_value(value) end end end diff --git a/spec/classes/manila_volume_nfs_spec.rb b/spec/classes/manila_volume_nfs_spec.rb index 449153fc..67528a8b 100644 --- a/spec/classes/manila_volume_nfs_spec.rb +++ b/spec/classes/manila_volume_nfs_spec.rb @@ -1,15 +1,15 @@ require 'spec_helper' -describe 'cinder::volume::nfs' do +describe 'manila::volume::nfs' do let :params do { :nfs_servers => ['10.10.10.10:/shares', '10.10.10.10:/shares2'], :nfs_mount_options => 'vers=3', - :nfs_shares_config => '/etc/cinder/other_shares.conf', + :nfs_shares_config => '/etc/manila/other_shares.conf', :nfs_disk_util => 'du', :nfs_sparsed_volumes => true, - :nfs_mount_point_base => '/cinder_mount_point', + :nfs_mount_point_base => '/manila_mount_point', :nfs_used_ratio => '0.95', :nfs_oversub_ratio => '1.0', } @@ -17,26 +17,26 @@ describe 'cinder::volume::nfs' do describe 'nfs volume driver' do it 'configures nfs volume driver' do - should contain_cinder_config('DEFAULT/volume_driver').with_value( - 'cinder.volume.drivers.nfs.NfsDriver') - should contain_cinder_config('DEFAULT/nfs_shares_config').with_value( - '/etc/cinder/other_shares.conf') - should contain_cinder_config('DEFAULT/nfs_mount_options').with_value( + should contain_manila_config('DEFAULT/volume_driver').with_value( + 'manila.volume.drivers.nfs.NfsDriver') + should contain_manila_config('DEFAULT/nfs_shares_config').with_value( + '/etc/manila/other_shares.conf') + should contain_manila_config('DEFAULT/nfs_mount_options').with_value( 'vers=3') - should contain_cinder_config('DEFAULT/nfs_sparsed_volumes').with_value( + should contain_manila_config('DEFAULT/nfs_sparsed_volumes').with_value( true) - should contain_cinder_config('DEFAULT/nfs_mount_point_base').with_value( - '/cinder_mount_point') - should contain_cinder_config('DEFAULT/nfs_disk_util').with_value( + should contain_manila_config('DEFAULT/nfs_mount_point_base').with_value( + '/manila_mount_point') + should contain_manila_config('DEFAULT/nfs_disk_util').with_value( 'du') - should contain_cinder_config('DEFAULT/nfs_used_ratio').with_value( + should contain_manila_config('DEFAULT/nfs_used_ratio').with_value( '0.95') - should contain_cinder_config('DEFAULT/nfs_oversub_ratio').with_value( + should contain_manila_config('DEFAULT/nfs_oversub_ratio').with_value( '1.0') - should contain_file('/etc/cinder/other_shares.conf').with( + should contain_file('/etc/manila/other_shares.conf').with( :content => "10.10.10.10:/shares\n10.10.10.10:/shares2", - :require => 'Package[cinder]', - :notify => 'Service[cinder-volume]' + :require => 'Package[manila]', + :notify => 'Service[manila-volume]' ) end end diff --git a/spec/classes/manila_volume_rbd_spec.rb b/spec/classes/manila_volume_rbd_spec.rb index ec3a9267..61481caa 100644 --- a/spec/classes/manila_volume_rbd_spec.rb +++ b/spec/classes/manila_volume_rbd_spec.rb @@ -1,6 +1,6 @@ require 'spec_helper' -describe 'cinder::volume::rbd' do +describe 'manila::volume::rbd' do let :req_params do { :rbd_pool => 'volumes', @@ -14,7 +14,7 @@ describe 'cinder::volume::rbd' do } end - it { should contain_class('cinder::params') } + it { should contain_class('manila::params') } let :params do req_params @@ -26,30 +26,30 @@ describe 'cinder::volume::rbd' do describe 'rbd volume driver' do it 'configure rbd volume driver' do - should contain_cinder_config('DEFAULT/volume_driver').with_value('cinder.volume.drivers.rbd.RBDDriver') + should contain_manila_config('DEFAULT/volume_driver').with_value('manila.volume.drivers.rbd.RBDDriver') - should contain_cinder_config('DEFAULT/rbd_ceph_conf').with_value(req_params[:rbd_ceph_conf]) - should contain_cinder_config('DEFAULT/rbd_flatten_volume_from_snapshot').with_value(req_params[:rbd_flatten_volume_from_snapshot]) - should contain_cinder_config('DEFAULT/volume_tmp_dir').with_value(req_params[:volume_tmp_dir]) - should contain_cinder_config('DEFAULT/rbd_max_clone_depth').with_value(req_params[:rbd_max_clone_depth]) - should contain_cinder_config('DEFAULT/rbd_pool').with_value(req_params[:rbd_pool]) - should contain_cinder_config('DEFAULT/rbd_user').with_value(req_params[:rbd_user]) - should contain_cinder_config('DEFAULT/rbd_secret_uuid').with_value(req_params[:rbd_secret_uuid]) - should contain_file('/etc/init/cinder-volume.override').with(:ensure => 'present') + should contain_manila_config('DEFAULT/rbd_ceph_conf').with_value(req_params[:rbd_ceph_conf]) + should contain_manila_config('DEFAULT/rbd_flatten_volume_from_snapshot').with_value(req_params[:rbd_flatten_volume_from_snapshot]) + should contain_manila_config('DEFAULT/volume_tmp_dir').with_value(req_params[:volume_tmp_dir]) + should contain_manila_config('DEFAULT/rbd_max_clone_depth').with_value(req_params[:rbd_max_clone_depth]) + should contain_manila_config('DEFAULT/rbd_pool').with_value(req_params[:rbd_pool]) + should contain_manila_config('DEFAULT/rbd_user').with_value(req_params[:rbd_user]) + should contain_manila_config('DEFAULT/rbd_secret_uuid').with_value(req_params[:rbd_secret_uuid]) + should contain_file('/etc/init/manila-volume.override').with(:ensure => 'present') should contain_file_line('set initscript env').with( :line => /env CEPH_ARGS=\"--id test\"/, - :path => '/etc/init/cinder-volume.override', - :notify => 'Service[cinder-volume]') + :path => '/etc/init/manila-volume.override', + :notify => 'Service[manila-volume]') end context 'with rbd_secret_uuid disabled' do let(:params) { req_params.merge!({:rbd_secret_uuid => false}) } - it { should contain_cinder_config('DEFAULT/rbd_secret_uuid').with_ensure('absent') } + it { should contain_manila_config('DEFAULT/rbd_secret_uuid').with_ensure('absent') } end context 'with volume_tmp_dir disabled' do let(:params) { req_params.merge!({:volume_tmp_dir => false}) } - it { should contain_cinder_config('DEFAULT/volume_tmp_dir').with_ensure('absent') } + it { should contain_manila_config('DEFAULT/volume_tmp_dir').with_ensure('absent') } end end @@ -64,8 +64,8 @@ describe 'cinder::volume::rbd' do req_params end - it 'should ensure that the cinder-volume sysconfig file is present' do - should contain_file('/etc/sysconfig/openstack-cinder-volume').with( + it 'should ensure that the manila-volume sysconfig file is present' do + should contain_file('/etc/sysconfig/openstack-manila-volume').with( :ensure => 'present' ) end @@ -73,8 +73,8 @@ describe 'cinder::volume::rbd' do it 'should configure RedHat init override' do should contain_file_line('set initscript env').with( :line => /export CEPH_ARGS=\"--id test\"/, - :path => '/etc/sysconfig/openstack-cinder-volume', - :notify => 'Service[cinder-volume]') + :path => '/etc/sysconfig/openstack-manila-volume', + :notify => 'Service[manila-volume]') end end diff --git a/spec/classes/manila_volume_san_spec.rb b/spec/classes/manila_volume_san_spec.rb index 15c32843..088cbc52 100644 --- a/spec/classes/manila_volume_san_spec.rb +++ b/spec/classes/manila_volume_san_spec.rb @@ -1,9 +1,9 @@ require 'spec_helper' -describe 'cinder::volume::san' do +describe 'manila::volume::san' do let :params do - { :volume_driver => 'cinder.volume.san.SolarisISCSIDriver', + { :volume_driver => 'manila.volume.san.SolarisISCSIDriver', :san_ip => '127.0.0.1', :san_login => 'cluster_operator', :san_password => '007', @@ -25,9 +25,9 @@ describe 'cinder::volume::san' do default_params.merge(params) end - it 'configures cinder volume driver' do + it 'configures manila volume driver' do params_hash.each_pair do |config,value| - should contain_cinder_config("DEFAULT/#{config}").with_value( value ) + should contain_manila_config("DEFAULT/#{config}").with_value( value ) end end end diff --git a/spec/classes/manila_volume_solidfire_spec.rb b/spec/classes/manila_volume_solidfire_spec.rb index ddafe092..77346a4e 100644 --- a/spec/classes/manila_volume_solidfire_spec.rb +++ b/spec/classes/manila_volume_solidfire_spec.rb @@ -1,6 +1,6 @@ require 'spec_helper' -describe 'cinder::volume::solidfire' do +describe 'manila::volume::solidfire' do let :req_params do { :san_ip => '127.0.0.2', @@ -15,13 +15,13 @@ describe 'cinder::volume::solidfire' do describe 'solidfire volume driver' do it 'configure solidfire volume driver' do - should contain_cinder_config('DEFAULT/volume_driver').with_value( - 'cinder.volume.drivers.solidfire.SolidFire') - should contain_cinder_config('DEFAULT/san_ip').with_value( + should contain_manila_config('DEFAULT/volume_driver').with_value( + 'manila.volume.drivers.solidfire.SolidFire') + should contain_manila_config('DEFAULT/san_ip').with_value( '127.0.0.2') - should contain_cinder_config('DEFAULT/san_login').with_value( + should contain_manila_config('DEFAULT/san_login').with_value( 'solidfire') - should contain_cinder_config('DEFAULT/san_password').with_value( + should contain_manila_config('DEFAULT/san_password').with_value( 'password') end end diff --git a/spec/classes/manila_volume_spec.rb b/spec/classes/manila_volume_spec.rb index 4b3cc14b..3bab5113 100644 --- a/spec/classes/manila_volume_spec.rb +++ b/spec/classes/manila_volume_spec.rb @@ -1,17 +1,17 @@ require 'spec_helper' -describe 'cinder::volume' do +describe 'manila::volume' do let :pre_condition do - 'class { "cinder": rabbit_password => "fpp", database_connection => "mysql://a:b@c/d" }' + 'class { "manila": rabbit_password => "fpp", database_connection => "mysql://a:b@c/d" }' end let :facts do {:osfamily => 'Debian'} end - it { should contain_package('cinder-volume').with_ensure('present') } - it { should contain_service('cinder-volume').with( + it { should contain_package('manila-volume').with_ensure('present') } + it { should contain_service('manila-volume').with( 'hasstatus' => true )} @@ -20,7 +20,7 @@ describe 'cinder::volume' do { 'manage_service' => false } end it 'should not change the state of the service' do - should contain_service('cinder-volume').without_ensure + should contain_service('manila-volume').without_ensure end end end diff --git a/spec/classes/manila_volume_vmdk_spec.rb b/spec/classes/manila_volume_vmdk_spec.rb index 0995797d..11620e61 100644 --- a/spec/classes/manila_volume_vmdk_spec.rb +++ b/spec/classes/manila_volume_vmdk_spec.rb @@ -1,6 +1,6 @@ require 'spec_helper' -describe 'cinder::volume::vmdk' do +describe 'manila::volume::vmdk' do let :params do { @@ -12,7 +12,7 @@ describe 'cinder::volume::vmdk' do let :optional_params do { - :volume_folder => 'cinder-volume-folder', + :volume_folder => 'manila-volume-folder', :api_retry_count => 5, :max_object_retrieval => 200, :task_poll_interval => 10, @@ -21,17 +21,17 @@ describe 'cinder::volume::vmdk' do } end - it 'should configure vmdk driver in cinder.conf' do - should contain_cinder_config('DEFAULT/volume_driver').with_value('cinder.volume.drivers.vmware.vmdk.VMwareVcVmdkDriver') - should contain_cinder_config('DEFAULT/vmware_host_ip').with_value(params[:host_ip]) - should contain_cinder_config('DEFAULT/vmware_host_username').with_value(params[:host_username]) - should contain_cinder_config('DEFAULT/vmware_host_password').with_value(params[:host_password]) - should contain_cinder_config('DEFAULT/vmware_volume_folder').with_value('cinder-volumes') - should contain_cinder_config('DEFAULT/vmware_api_retry_count').with_value(10) - should contain_cinder_config('DEFAULT/vmware_max_object_retrieval').with_value(100) - should contain_cinder_config('DEFAULT/vmware_task_poll_interval').with_value(5) - should contain_cinder_config('DEFAULT/vmware_image_transfer_timeout_secs').with_value(7200) - should_not contain_cinder_config('DEFAULT/vmware_wsdl_location') + it 'should configure vmdk driver in manila.conf' do + should contain_manila_config('DEFAULT/volume_driver').with_value('manila.volume.drivers.vmware.vmdk.VMwareVcVmdkDriver') + should contain_manila_config('DEFAULT/vmware_host_ip').with_value(params[:host_ip]) + should contain_manila_config('DEFAULT/vmware_host_username').with_value(params[:host_username]) + should contain_manila_config('DEFAULT/vmware_host_password').with_value(params[:host_password]) + should contain_manila_config('DEFAULT/vmware_volume_folder').with_value('manila-volumes') + should contain_manila_config('DEFAULT/vmware_api_retry_count').with_value(10) + should contain_manila_config('DEFAULT/vmware_max_object_retrieval').with_value(100) + should contain_manila_config('DEFAULT/vmware_task_poll_interval').with_value(5) + should contain_manila_config('DEFAULT/vmware_image_transfer_timeout_secs').with_value(7200) + should_not contain_manila_config('DEFAULT/vmware_wsdl_location') end it 'installs vmdk python driver' do @@ -45,13 +45,13 @@ describe 'cinder::volume::vmdk' do params.merge!(optional_params) end - it 'should configure vmdk driver in cinder.conf' do - should contain_cinder_config('DEFAULT/vmware_volume_folder').with_value(params[:volume_folder]) - should contain_cinder_config('DEFAULT/vmware_api_retry_count').with_value(params[:api_retry_count]) - should contain_cinder_config('DEFAULT/vmware_max_object_retrieval').with_value(params[:max_object_retrieval]) - should contain_cinder_config('DEFAULT/vmware_task_poll_interval').with_value(params[:task_poll_interval]) - should contain_cinder_config('DEFAULT/vmware_image_transfer_timeout_secs').with_value(params[:image_transfer_timeout_secs]) - should contain_cinder_config('DEFAULT/vmware_wsdl_location').with_value(params[:wsdl_location]) + it 'should configure vmdk driver in manila.conf' do + should contain_manila_config('DEFAULT/vmware_volume_folder').with_value(params[:volume_folder]) + should contain_manila_config('DEFAULT/vmware_api_retry_count').with_value(params[:api_retry_count]) + should contain_manila_config('DEFAULT/vmware_max_object_retrieval').with_value(params[:max_object_retrieval]) + should contain_manila_config('DEFAULT/vmware_task_poll_interval').with_value(params[:task_poll_interval]) + should contain_manila_config('DEFAULT/vmware_image_transfer_timeout_secs').with_value(params[:image_transfer_timeout_secs]) + should contain_manila_config('DEFAULT/vmware_wsdl_location').with_value(params[:wsdl_location]) end end end diff --git a/spec/defines/manila_backend_eqlx_spec.rb b/spec/defines/manila_backend_eqlx_spec.rb index a6a287a9..1a43857c 100644 --- a/spec/defines/manila_backend_eqlx_spec.rb +++ b/spec/defines/manila_backend_eqlx_spec.rb @@ -1,6 +1,6 @@ require 'spec_helper' -describe 'cinder::backend::eqlx' do +describe 'manila::backend::eqlx' do let (:config_group_name) { 'eqlx-1' } let (:title) { config_group_name } @@ -24,11 +24,11 @@ describe 'cinder::backend::eqlx' do describe 'eqlx volume driver' do it 'configure eqlx volume driver' do - should contain_cinder_config( + should contain_manila_config( "#{config_group_name}/volume_driver").with_value( - 'cinder.volume.drivers.eqlx.DellEQLSanISCSIDriver') + 'manila.volume.drivers.eqlx.DellEQLSanISCSIDriver') params.each_pair do |config,value| - should contain_cinder_config( + should contain_manila_config( "#{config_group_name}/#{config}").with_value(value) end end diff --git a/spec/defines/manila_backend_glusterfs_spec.rb b/spec/defines/manila_backend_glusterfs_spec.rb index c0b4fa2e..a35e05a1 100644 --- a/spec/defines/manila_backend_glusterfs_spec.rb +++ b/spec/defines/manila_backend_glusterfs_spec.rb @@ -1,6 +1,6 @@ require 'spec_helper' -describe 'cinder::backend::glusterfs' do +describe 'manila::backend::glusterfs' do shared_examples_for 'glusterfs volume driver' do let(:title) {'mygluster'} @@ -8,25 +8,25 @@ describe 'cinder::backend::glusterfs' do let :params do { :glusterfs_shares => ['10.10.10.10:/volumes', '10.10.10.11:/volumes'], - :glusterfs_shares_config => '/etc/cinder/other_shares.conf', + :glusterfs_shares_config => '/etc/manila/other_shares.conf', :glusterfs_sparsed_volumes => true, - :glusterfs_mount_point_base => '/cinder_mount_point', + :glusterfs_mount_point_base => '/manila_mount_point', } end it 'configures glusterfs volume driver' do - should contain_cinder_config('mygluster/volume_driver').with_value( - 'cinder.volume.drivers.glusterfs.GlusterfsDriver') - should contain_cinder_config('mygluster/glusterfs_shares_config').with_value( - '/etc/cinder/other_shares.conf') - should contain_cinder_config('mygluster/glusterfs_sparsed_volumes').with_value( + should contain_manila_config('mygluster/volume_driver').with_value( + 'manila.volume.drivers.glusterfs.GlusterfsDriver') + should contain_manila_config('mygluster/glusterfs_shares_config').with_value( + '/etc/manila/other_shares.conf') + should contain_manila_config('mygluster/glusterfs_sparsed_volumes').with_value( true) - should contain_cinder_config('mygluster/glusterfs_mount_point_base').with_value( - '/cinder_mount_point') - should contain_file('/etc/cinder/other_shares.conf').with( + should contain_manila_config('mygluster/glusterfs_mount_point_base').with_value( + '/manila_mount_point') + should contain_file('/etc/manila/other_shares.conf').with( :content => "10.10.10.10:/volumes\n10.10.10.11:/volumes\n", - :require => 'Package[cinder]', - :notify => 'Service[cinder-volume]' + :require => 'Package[manila]', + :notify => 'Service[manila-volume]' ) end diff --git a/spec/defines/manila_backend_iscsi_spec.rb b/spec/defines/manila_backend_iscsi_spec.rb index 4e987648..6b31631b 100644 --- a/spec/defines/manila_backend_iscsi_spec.rb +++ b/spec/defines/manila_backend_iscsi_spec.rb @@ -1,6 +1,6 @@ require 'spec_helper' -describe 'cinder::backend::iscsi' do +describe 'manila::backend::iscsi' do let(:title) {'hippo'} @@ -21,14 +21,14 @@ describe 'cinder::backend::iscsi' do describe 'with default params' do it 'should configure iscsi driver' do - should contain_cinder_config('hippo/volume_backend_name').with( + should contain_manila_config('hippo/volume_backend_name').with( :value => 'hippo') - should contain_cinder_config('hippo/iscsi_ip_address').with( + should contain_manila_config('hippo/iscsi_ip_address').with( :value => '127.0.0.2') - should contain_cinder_config('hippo/iscsi_helper').with( + should contain_manila_config('hippo/iscsi_helper').with( :value => 'tgtadm') - should contain_cinder_config('hippo/volume_group').with( - :value => 'cinder-volumes') + should contain_manila_config('hippo/volume_group').with( + :value => 'manila-volumes') end end @@ -38,8 +38,8 @@ describe 'cinder::backend::iscsi' do {:osfamily => 'RedHat'} end - it { should contain_file_line('cinder include').with( - :line => 'include /etc/cinder/volumes/*', + it { should contain_file_line('manila include').with( + :line => 'include /etc/manila/volumes/*', :path => '/etc/tgt/targets.conf' ) } diff --git a/spec/defines/manila_backend_netapp_spec.rb b/spec/defines/manila_backend_netapp_spec.rb index d737a6bc..669c9ee2 100644 --- a/spec/defines/manila_backend_netapp_spec.rb +++ b/spec/defines/manila_backend_netapp_spec.rb @@ -1,6 +1,6 @@ require 'spec_helper' -describe 'cinder::backend::netapp' do +describe 'manila::backend::netapp' do let(:title) {'hippo'} @@ -41,15 +41,15 @@ describe 'cinder::backend::netapp' do end it 'configures netapp volume driver' do - should contain_cinder_config("#{params_hash[:volume_backend_name]}/volume_driver").with_value( - 'cinder.volume.drivers.netapp.common.NetAppDriver') + should contain_manila_config("#{params_hash[:volume_backend_name]}/volume_driver").with_value( + 'manila.volume.drivers.netapp.common.NetAppDriver') params_hash.each_pair do |config,value| - should contain_cinder_config("#{params_hash[:volume_backend_name]}/#{config}").with_value( value ) + should contain_manila_config("#{params_hash[:volume_backend_name]}/#{config}").with_value( value ) end end it 'marks netapp_password as secret' do - should contain_cinder_config("#{params_hash[:volume_backend_name]}/netapp_password").with_secret( true ) + should contain_manila_config("#{params_hash[:volume_backend_name]}/netapp_password").with_secret( true ) end end diff --git a/spec/defines/manila_backend_nexenta_spec.rb b/spec/defines/manila_backend_nexenta_spec.rb index 2c26c586..bd93fc8f 100644 --- a/spec/defines/manila_backend_nexenta_spec.rb +++ b/spec/defines/manila_backend_nexenta_spec.rb @@ -1,9 +1,9 @@ # author 'Aimon Bustardo ' # license 'Apache License 2.0' -# description 'configures openstack cinder nexenta driver' +# description 'configures openstack manila nexenta driver' require 'spec_helper' -describe 'cinder::backend::nexenta' do +describe 'manila::backend::nexenta' do let (:title) { 'nexenta' } let :params do @@ -13,9 +13,9 @@ describe 'cinder::backend::nexenta' do end let :default_params do - { :nexenta_volume => 'cinder', + { :nexenta_volume => 'manila', :nexenta_target_prefix => 'iqn:', - :nexenta_target_group_prefix => 'cinder/', + :nexenta_target_group_prefix => 'manila/', :nexenta_blocksize => '8k', :nexenta_sparse => true } end @@ -32,7 +32,7 @@ describe 'cinder::backend::nexenta' do it 'configures nexenta volume driver' do params_hash.each_pair do |config, value| - should contain_cinder_config("nexenta/#{config}").with_value(value) + should contain_manila_config("nexenta/#{config}").with_value(value) end end end diff --git a/spec/defines/manila_backend_nfs_spec.rb b/spec/defines/manila_backend_nfs_spec.rb index bc7906f6..cbfd81b6 100644 --- a/spec/defines/manila_backend_nfs_spec.rb +++ b/spec/defines/manila_backend_nfs_spec.rb @@ -1,6 +1,6 @@ require 'spec_helper' -describe 'cinder::backend::nfs' do +describe 'manila::backend::nfs' do let(:title) {'hippo'} @@ -8,10 +8,10 @@ describe 'cinder::backend::nfs' do { :nfs_servers => ['10.10.10.10:/shares', '10.10.10.10:/shares2'], :nfs_mount_options => 'vers=3', - :nfs_shares_config => '/etc/cinder/other_shares.conf', + :nfs_shares_config => '/etc/manila/other_shares.conf', :nfs_disk_util => 'du', :nfs_sparsed_volumes => true, - :nfs_mount_point_base => '/cinder_mount_point', + :nfs_mount_point_base => '/manila_mount_point', :nfs_used_ratio => '0.7', :nfs_oversub_ratio => '0.9' } @@ -20,28 +20,28 @@ describe 'cinder::backend::nfs' do describe 'nfs volume driver' do it 'configures nfs volume driver' do - should contain_cinder_config('hippo/volume_backend_name').with( + should contain_manila_config('hippo/volume_backend_name').with( :value => 'hippo') - should contain_cinder_config('hippo/volume_driver').with_value( - 'cinder.volume.drivers.nfs.NfsDriver') - should contain_cinder_config('hippo/nfs_shares_config').with_value( - '/etc/cinder/other_shares.conf') - should contain_cinder_config('hippo/nfs_mount_options').with_value( + should contain_manila_config('hippo/volume_driver').with_value( + 'manila.volume.drivers.nfs.NfsDriver') + should contain_manila_config('hippo/nfs_shares_config').with_value( + '/etc/manila/other_shares.conf') + should contain_manila_config('hippo/nfs_mount_options').with_value( 'vers=3') - should contain_cinder_config('hippo/nfs_sparsed_volumes').with_value( + should contain_manila_config('hippo/nfs_sparsed_volumes').with_value( true) - should contain_cinder_config('hippo/nfs_mount_point_base').with_value( - '/cinder_mount_point') - should contain_cinder_config('hippo/nfs_disk_util').with_value( + should contain_manila_config('hippo/nfs_mount_point_base').with_value( + '/manila_mount_point') + should contain_manila_config('hippo/nfs_disk_util').with_value( 'du') - should contain_cinder_config('hippo/nfs_used_ratio').with_value( + should contain_manila_config('hippo/nfs_used_ratio').with_value( '0.7') - should contain_cinder_config('hippo/nfs_oversub_ratio').with_value( + should contain_manila_config('hippo/nfs_oversub_ratio').with_value( '0.9') - should contain_file('/etc/cinder/other_shares.conf').with( + should contain_file('/etc/manila/other_shares.conf').with( :content => "10.10.10.10:/shares\n10.10.10.10:/shares2", - :require => 'Package[cinder]', - :notify => 'Service[cinder-volume]' + :require => 'Package[manila]', + :notify => 'Service[manila-volume]' ) end end diff --git a/spec/defines/manila_backend_rbd_spec.rb b/spec/defines/manila_backend_rbd_spec.rb index 0636344c..9a3502f5 100644 --- a/spec/defines/manila_backend_rbd_spec.rb +++ b/spec/defines/manila_backend_rbd_spec.rb @@ -1,6 +1,6 @@ require 'spec_helper' -describe 'cinder::backend::rbd' do +describe 'manila::backend::rbd' do let(:title) {'rbd-ssd'} @@ -18,7 +18,7 @@ describe 'cinder::backend::rbd' do } end - it { should contain_class('cinder::params') } + it { should contain_class('manila::params') } let :params do req_params @@ -30,45 +30,45 @@ describe 'cinder::backend::rbd' do describe 'rbd backend volume driver' do it 'configure rbd volume driver' do - should contain_cinder_config("#{req_params[:volume_backend_name]}/volume_backend_name").with_value(req_params[:volume_backend_name]) - should contain_cinder_config("#{req_params[:volume_backend_name]}/volume_driver").with_value('cinder.volume.drivers.rbd.RBDDriver') - should contain_cinder_config("#{req_params[:volume_backend_name]}/rbd_ceph_conf").with_value(req_params[:rbd_ceph_conf]) - should contain_cinder_config("#{req_params[:volume_backend_name]}/rbd_flatten_volume_from_snapshot").with_value(req_params[:rbd_flatten_volume_from_snapshot]) - should contain_cinder_config("#{req_params[:volume_backend_name]}/volume_tmp_dir").with_value(req_params[:volume_tmp_dir]) - should contain_cinder_config("#{req_params[:volume_backend_name]}/rbd_max_clone_depth").with_value(req_params[:rbd_max_clone_depth]) - should contain_cinder_config("#{req_params[:volume_backend_name]}/rbd_pool").with_value(req_params[:rbd_pool]) - should contain_cinder_config("#{req_params[:volume_backend_name]}/rbd_user").with_value(req_params[:rbd_user]) - should contain_cinder_config("#{req_params[:volume_backend_name]}/rbd_secret_uuid").with_value(req_params[:rbd_secret_uuid]) - should contain_file('/etc/init/cinder-volume.override').with(:ensure => 'present') + should contain_manila_config("#{req_params[:volume_backend_name]}/volume_backend_name").with_value(req_params[:volume_backend_name]) + should contain_manila_config("#{req_params[:volume_backend_name]}/volume_driver").with_value('manila.volume.drivers.rbd.RBDDriver') + should contain_manila_config("#{req_params[:volume_backend_name]}/rbd_ceph_conf").with_value(req_params[:rbd_ceph_conf]) + should contain_manila_config("#{req_params[:volume_backend_name]}/rbd_flatten_volume_from_snapshot").with_value(req_params[:rbd_flatten_volume_from_snapshot]) + should contain_manila_config("#{req_params[:volume_backend_name]}/volume_tmp_dir").with_value(req_params[:volume_tmp_dir]) + should contain_manila_config("#{req_params[:volume_backend_name]}/rbd_max_clone_depth").with_value(req_params[:rbd_max_clone_depth]) + should contain_manila_config("#{req_params[:volume_backend_name]}/rbd_pool").with_value(req_params[:rbd_pool]) + should contain_manila_config("#{req_params[:volume_backend_name]}/rbd_user").with_value(req_params[:rbd_user]) + should contain_manila_config("#{req_params[:volume_backend_name]}/rbd_secret_uuid").with_value(req_params[:rbd_secret_uuid]) + should contain_file('/etc/init/manila-volume.override').with(:ensure => 'present') should contain_file_line('set initscript env').with( :line => /env CEPH_ARGS=\"--id test\"/, - :path => '/etc/init/cinder-volume.override', - :notify => 'Service[cinder-volume]') + :path => '/etc/init/manila-volume.override', + :notify => 'Service[manila-volume]') end context 'with rbd_secret_uuid disabled' do let(:params) { req_params.merge!({:rbd_secret_uuid => false}) } - it { should contain_cinder_config("#{req_params[:volume_backend_name]}/rbd_secret_uuid").with_ensure('absent') } + it { should contain_manila_config("#{req_params[:volume_backend_name]}/rbd_secret_uuid").with_ensure('absent') } end context 'with volume_tmp_dir disabled' do let(:params) { req_params.merge!({:volume_tmp_dir => false}) } - it { should contain_cinder_config("#{req_params[:volume_backend_name]}/volume_tmp_dir").with_ensure('absent') } + it { should contain_manila_config("#{req_params[:volume_backend_name]}/volume_tmp_dir").with_ensure('absent') } end context 'with another RBD backend' do let :pre_condition do - "cinder::backend::rbd { 'ceph2': + "manila::backend::rbd { 'ceph2': rbd_pool => 'volumes2', rbd_user => 'test' }" end - it { should contain_cinder_config("#{req_params[:volume_backend_name]}/volume_driver").with_value('cinder.volume.drivers.rbd.RBDDriver') } - it { should contain_cinder_config("#{req_params[:volume_backend_name]}/rbd_pool").with_value(req_params[:rbd_pool]) } - it { should contain_cinder_config("#{req_params[:volume_backend_name]}/rbd_user").with_value(req_params[:rbd_user]) } - it { should contain_cinder_config("ceph2/volume_driver").with_value('cinder.volume.drivers.rbd.RBDDriver') } - it { should contain_cinder_config("ceph2/rbd_pool").with_value('volumes2') } - it { should contain_cinder_config("ceph2/rbd_user").with_value('test') } + it { should contain_manila_config("#{req_params[:volume_backend_name]}/volume_driver").with_value('manila.volume.drivers.rbd.RBDDriver') } + it { should contain_manila_config("#{req_params[:volume_backend_name]}/rbd_pool").with_value(req_params[:rbd_pool]) } + it { should contain_manila_config("#{req_params[:volume_backend_name]}/rbd_user").with_value(req_params[:rbd_user]) } + it { should contain_manila_config("ceph2/volume_driver").with_value('manila.volume.drivers.rbd.RBDDriver') } + it { should contain_manila_config("ceph2/rbd_pool").with_value('volumes2') } + it { should contain_manila_config("ceph2/rbd_user").with_value('test') } end end @@ -81,8 +81,8 @@ describe 'cinder::backend::rbd' do req_params end - it 'should ensure that the cinder-volume sysconfig file is present' do - should contain_file('/etc/sysconfig/openstack-cinder-volume').with( + it 'should ensure that the manila-volume sysconfig file is present' do + should contain_file('/etc/sysconfig/openstack-manila-volume').with( :ensure => 'present' ) end @@ -90,8 +90,8 @@ describe 'cinder::backend::rbd' do it 'should configure RedHat init override' do should contain_file_line('set initscript env').with( :line => /export CEPH_ARGS=\"--id test\"/, - :path => '/etc/sysconfig/openstack-cinder-volume', - :notify => 'Service[cinder-volume]') + :path => '/etc/sysconfig/openstack-manila-volume', + :notify => 'Service[manila-volume]') end end diff --git a/spec/defines/manila_backend_san_spec.rb b/spec/defines/manila_backend_san_spec.rb index ef647de2..12d6b18c 100644 --- a/spec/defines/manila_backend_san_spec.rb +++ b/spec/defines/manila_backend_san_spec.rb @@ -1,10 +1,10 @@ require 'spec_helper' -describe 'cinder::backend::san' do +describe 'manila::backend::san' do let (:title) { 'mysan' } let :params do - { :volume_driver => 'cinder.volume.san.SolarisISCSIDriver', + { :volume_driver => 'manila.volume.san.SolarisISCSIDriver', :san_ip => '127.0.0.1', :san_login => 'cluster_operator', :san_password => '007', @@ -26,9 +26,9 @@ describe 'cinder::backend::san' do default_params.merge(params) end - it 'configures cinder volume driver' do + it 'configures manila volume driver' do params_hash.each_pair do |config,value| - should contain_cinder_config("mysan/#{config}").with_value( value ) + should contain_manila_config("mysan/#{config}").with_value( value ) end end end diff --git a/spec/defines/manila_backend_solidfire_spec.rb b/spec/defines/manila_backend_solidfire_spec.rb index 5b35e1e7..8b88753f 100644 --- a/spec/defines/manila_backend_solidfire_spec.rb +++ b/spec/defines/manila_backend_solidfire_spec.rb @@ -1,6 +1,6 @@ require 'spec_helper' -describe 'cinder::backend::solidfire' do +describe 'manila::backend::solidfire' do let (:title) { 'solidfire' } let :req_params do @@ -17,13 +17,13 @@ describe 'cinder::backend::solidfire' do describe 'solidfire volume driver' do it 'configure solidfire volume driver' do - should contain_cinder_config('solidfire/volume_driver').with_value( - 'cinder.volume.drivers.solidfire.SolidFire') - should contain_cinder_config('solidfire/san_ip').with_value( + should contain_manila_config('solidfire/volume_driver').with_value( + 'manila.volume.drivers.solidfire.SolidFire') + should contain_manila_config('solidfire/san_ip').with_value( '127.0.0.2') - should contain_cinder_config('solidfire/san_login').with_value( + should contain_manila_config('solidfire/san_login').with_value( 'solidfire') - should contain_cinder_config('solidfire/san_password').with_value( + should contain_manila_config('solidfire/san_password').with_value( 'password') end end diff --git a/spec/defines/manila_backend_vmdk_spec.rb b/spec/defines/manila_backend_vmdk_spec.rb index 85940aca..563e1a62 100644 --- a/spec/defines/manila_backend_vmdk_spec.rb +++ b/spec/defines/manila_backend_vmdk_spec.rb @@ -1,6 +1,6 @@ require 'spec_helper' -describe 'cinder::backend::vmdk' do +describe 'manila::backend::vmdk' do let(:title) { 'hippo' } @@ -14,7 +14,7 @@ describe 'cinder::backend::vmdk' do let :optional_params do { - :volume_folder => 'cinder-volume-folder', + :volume_folder => 'manila-volume-folder', :api_retry_count => 5, :max_object_retrieval => 200, :task_poll_interval => 10, @@ -23,18 +23,18 @@ describe 'cinder::backend::vmdk' do } end - it 'should configure vmdk driver in cinder.conf' do - should contain_cinder_config('hippo/volume_backend_name').with_value('hippo') - should contain_cinder_config('hippo/volume_driver').with_value('cinder.volume.drivers.vmware.vmdk.VMwareVcVmdkDriver') - should contain_cinder_config('hippo/vmware_host_ip').with_value(params[:host_ip]) - should contain_cinder_config('hippo/vmware_host_username').with_value(params[:host_username]) - should contain_cinder_config('hippo/vmware_host_password').with_value(params[:host_password]) - should contain_cinder_config('hippo/vmware_volume_folder').with_value('cinder-volumes') - should contain_cinder_config('hippo/vmware_api_retry_count').with_value(10) - should contain_cinder_config('hippo/vmware_max_object_retrieval').with_value(100) - should contain_cinder_config('hippo/vmware_task_poll_interval').with_value(5) - should contain_cinder_config('hippo/vmware_image_transfer_timeout_secs').with_value(7200) - should_not contain_cinder_config('hippo/vmware_wsdl_location') + it 'should configure vmdk driver in manila.conf' do + should contain_manila_config('hippo/volume_backend_name').with_value('hippo') + should contain_manila_config('hippo/volume_driver').with_value('manila.volume.drivers.vmware.vmdk.VMwareVcVmdkDriver') + should contain_manila_config('hippo/vmware_host_ip').with_value(params[:host_ip]) + should contain_manila_config('hippo/vmware_host_username').with_value(params[:host_username]) + should contain_manila_config('hippo/vmware_host_password').with_value(params[:host_password]) + should contain_manila_config('hippo/vmware_volume_folder').with_value('manila-volumes') + should contain_manila_config('hippo/vmware_api_retry_count').with_value(10) + should contain_manila_config('hippo/vmware_max_object_retrieval').with_value(100) + should contain_manila_config('hippo/vmware_task_poll_interval').with_value(5) + should contain_manila_config('hippo/vmware_image_transfer_timeout_secs').with_value(7200) + should_not contain_manila_config('hippo/vmware_wsdl_location') end it 'installs suds python package' do @@ -47,13 +47,13 @@ describe 'cinder::backend::vmdk' do params.merge!(optional_params) end - it 'should configure vmdk driver in cinder.conf' do - should contain_cinder_config('hippo/vmware_volume_folder').with_value(params[:volume_folder]) - should contain_cinder_config('hippo/vmware_api_retry_count').with_value(params[:api_retry_count]) - should contain_cinder_config('hippo/vmware_max_object_retrieval').with_value(params[:max_object_retrieval]) - should contain_cinder_config('hippo/vmware_task_poll_interval').with_value(params[:task_poll_interval]) - should contain_cinder_config('hippo/vmware_image_transfer_timeout_secs').with_value(params[:image_transfer_timeout_secs]) - should contain_cinder_config('hippo/vmware_wsdl_location').with_value(params[:wsdl_location]) + it 'should configure vmdk driver in manila.conf' do + should contain_manila_config('hippo/vmware_volume_folder').with_value(params[:volume_folder]) + should contain_manila_config('hippo/vmware_api_retry_count').with_value(params[:api_retry_count]) + should contain_manila_config('hippo/vmware_max_object_retrieval').with_value(params[:max_object_retrieval]) + should contain_manila_config('hippo/vmware_task_poll_interval').with_value(params[:task_poll_interval]) + should contain_manila_config('hippo/vmware_image_transfer_timeout_secs').with_value(params[:image_transfer_timeout_secs]) + should contain_manila_config('hippo/vmware_wsdl_location').with_value(params[:wsdl_location]) end end end diff --git a/spec/defines/manila_type_set_spec.rb b/spec/defines/manila_type_set_spec.rb index 4cb57c18..eb3fe0a6 100644 --- a/spec/defines/manila_type_set_spec.rb +++ b/spec/defines/manila_type_set_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'cinder::type_set' do +describe 'manila::type_set' do let(:title) {'hippo'} @@ -17,13 +17,13 @@ describe 'cinder::type_set' do end it 'should have its execs' do - should contain_exec('cinder type-key sith set monchichi=hippo').with( - :command => 'cinder type-key sith set monchichi=hippo', + should contain_exec('manila type-key sith set monchichi=hippo').with( + :command => 'manila type-key sith set monchichi=hippo', :environment => [ 'OS_TENANT_NAME=admin', 'OS_USERNAME=admin', 'OS_PASSWORD=asdf', 'OS_AUTH_URL=http://127.127.127.1:5000/v2.0/'], - :require => 'Package[python-cinderclient]') + :require => 'Package[python-manilaclient]') end end diff --git a/spec/defines/manila_type_spec.rb b/spec/defines/manila_type_spec.rb index 8d763ff9..5b881697 100644 --- a/spec/defines/manila_type_spec.rb +++ b/spec/defines/manila_type_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'cinder::type' do +describe 'manila::type' do let(:title) {'hippo'} @@ -17,16 +17,16 @@ describe 'cinder::type' do end it 'should have its execs' do - should contain_exec('cinder type-create hippo').with( - :command => 'cinder type-create hippo', + should contain_exec('manila type-create hippo').with( + :command => 'manila type-create hippo', :environment => [ 'OS_TENANT_NAME=admin', 'OS_USERNAME=admin', 'OS_PASSWORD=asdf', 'OS_AUTH_URL=http://127.127.127.1:5000/v2.0/'], - :unless => 'cinder type-list | grep hippo', - :require => 'Package[python-cinderclient]') - should contain_exec('cinder type-key hippo set volume_backend_name=name1') - should contain_exec('cinder type-key hippo set volume_backend_name=name2') + :unless => 'manila type-list | grep hippo', + :require => 'Package[python-manilaclient]') + should contain_exec('manila type-key hippo set volume_backend_name=name1') + should contain_exec('manila type-key hippo set volume_backend_name=name2') end end