Add name template attributes
Change-Id: I861451d137c2436ae8bb792570751d1ddb754906
This commit is contained in:
parent
b8237582af
commit
cb510a048e
|
@ -45,6 +45,8 @@ Attributes
|
|||
* `openstack["block-storage"]["db"]["username"]` - cinder username for database
|
||||
TODO: Add DB2 support on other platforms
|
||||
* `openstack["block-storage"]["platform"]["db2_python_packages"]` - Array of DB2 python packages, only available on redhat platform
|
||||
* `openstack["block-storage"]["volume_name_template"]` - Template string to be used to generate volume names
|
||||
* `openstack["block-storage"]["snapshot_name_template"]` - Template string to be used to generate snapshot names
|
||||
|
||||
MQ attributes
|
||||
-------------
|
||||
|
|
|
@ -43,6 +43,10 @@ default['openstack']['block-storage']['lock_path'] = '/var/lock/cinder'
|
|||
default['openstack']['block-storage']['region'] = 'RegionOne'
|
||||
default['openstack']['block-storage']['scheduler_role'] = 'os-block-storage-scheduler'
|
||||
|
||||
# Template strings to be used to generate resource names
|
||||
default['openstack']['block-storage']['volume_name_template'] = 'volume-%s'
|
||||
default['openstack']['block-storage']['snapshot_name_template'] = 'snapshot-%s'
|
||||
|
||||
# The name of the Chef role that knows about the message queue server
|
||||
# that Cinder uses
|
||||
default['openstack']['block-storage']['rabbit_server_chef_role'] = 'os-ops-messaging'
|
||||
|
|
|
@ -49,6 +49,11 @@ describe "openstack-block-storage::cinder-common" do
|
|||
expect(sprintf("%o", @file.mode)).to eq "644"
|
||||
end
|
||||
|
||||
it "has name templates" do
|
||||
expect(@chef_run).to render_file(@file.name).with_content("volume_name_template=volume-%s")
|
||||
expect(@chef_run).to render_file(@file.name).with_content("snapshot_name_template=snapshot-%s")
|
||||
end
|
||||
|
||||
it "has rpc_backend set" do
|
||||
expect(@chef_run).to render_file(@file.name).with_content("rpc_backend=cinder.openstack.common.rpc.impl_kombu")
|
||||
end
|
||||
|
|
|
@ -265,10 +265,10 @@ db_backend=sqlalchemy
|
|||
# enable_new_services=true
|
||||
#### (BoolOpt) Services to be added to the available pool on create
|
||||
|
||||
# volume_name_template=volume-%s
|
||||
volume_name_template=<%= node["openstack"]["block-storage"]["volume_name_template"] %>
|
||||
#### (StrOpt) Template string to be used to generate volume names
|
||||
|
||||
# snapshot_name_template=snapshot-%s
|
||||
snapshot_name_template=<%= node["openstack"]["block-storage"]["snapshot_name_template"] %>
|
||||
#### (StrOpt) Template string to be used to generate snapshot names
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue