VStorage: manage volume types for ploop and qcow2 volumes
VStorage driver can create volumes in multiple formats, that are suitable for both virtual machines (qcow2) and containers (ploop). To choose between volume formats the vendor property vz:volume_format should be set in volume type extra specs. Thus we need 2 volume types to support both VMs and containers. Change-Id: I7ffce9c16dfa524a3eac2e8d12ad7fd0b682eba6 Depends-On: Ib610e6f9c82259f9dd2db37178b24d964a38e20d Signed-off-by: Pavel Glushchak <pglushchak@virtuozzo.com>
This commit is contained in:
parent
40fdfa0e7a
commit
8be60f0a40
@ -87,7 +87,11 @@ define cinder::backend::vstorage (
|
||||
if $manage_volume_type {
|
||||
cinder_type { $volume_backend_name:
|
||||
ensure => present,
|
||||
properties => ["volume_backend_name=${volume_backend_name}"],
|
||||
properties => ['vz:volume_format=qcow2'],
|
||||
}
|
||||
cinder_type { "${volume_backend_name}-ploop":
|
||||
ensure => present,
|
||||
properties => ['vz:volume_format=ploop'],
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -52,10 +52,13 @@ describe 'cinder::backend::vstorage' do
|
||||
before do
|
||||
params.merge!({:manage_volume_type => true})
|
||||
end
|
||||
it 'should create volume type' do
|
||||
it 'should create volume types' do
|
||||
should contain_cinder_type('vstorage').with(
|
||||
:ensure => :present,
|
||||
:properties => ['volume_backend_name=vstorage'])
|
||||
:properties => ['vz:volume_format=qcow2'])
|
||||
should contain_cinder_type('vstorage-ploop').with(
|
||||
:ensure => :present,
|
||||
:properties => ['vz:volume_format=ploop'])
|
||||
end
|
||||
end
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user