Merge "Support for Dell EMC VXFlexOS Backend"
This commit is contained in:
commit
b58d69fe9a
@ -46,6 +46,10 @@
|
||||
# (Optional) Whether to enable the vnx backend
|
||||
# Defaults to false
|
||||
#
|
||||
# [*cinder_enable_dellemc_vxflexos_backend*]
|
||||
# (Optional) Whether to enable the vxflexos backend
|
||||
# Defaults to false
|
||||
#
|
||||
# [*cinder_enable_dellemc_xtremio_backend*]
|
||||
# (Optional) Whether to enable the xtremio backend
|
||||
# Defaults to false
|
||||
@ -131,6 +135,7 @@ class tripleo::profile::base::cinder::volume (
|
||||
$cinder_enable_dellemc_powermax_backend = false,
|
||||
$cinder_enable_dellemc_vmax_iscsi_backend = false,
|
||||
$cinder_enable_dellemc_vnx_backend = false,
|
||||
$cinder_enable_dellemc_vxflexos_backend = false,
|
||||
$cinder_enable_dellemc_xtremio_backend = false,
|
||||
$cinder_enable_dellemc_xtremio_iscsi_backend = false,
|
||||
$cinder_enable_hpelefthand_backend = false,
|
||||
@ -237,6 +242,14 @@ class tripleo::profile::base::cinder::volume (
|
||||
$cinder_dellemc_vnx_backend_name = undef
|
||||
}
|
||||
|
||||
if $cinder_enable_dellemc_vxflexos_backend {
|
||||
include tripleo::profile::base::cinder::volume::dellemc_vxflexos
|
||||
$cinder_dellemc_vxflexos_backend_name = hiera('cinder::backend::dellemc_vxflexos::volume_backend_name',
|
||||
'tripleo_dellemc_vxflexos')
|
||||
} else {
|
||||
$cinder_dellemc_vxflexos_backend_name = undef
|
||||
}
|
||||
|
||||
if $cinder_enable_dellemc_xtremio_backend {
|
||||
include tripleo::profile::base::cinder::volume::dellemc_xtremio
|
||||
$cinder_dellemc_xtremio_backend_name = hiera('cinder::backend::dellemc_xtremio::volume_backend_name',
|
||||
@ -339,6 +352,7 @@ class tripleo::profile::base::cinder::volume (
|
||||
$cinder_dellemc_powermax_backend_name,
|
||||
$cinder_dellemc_vmax_iscsi_backend_name,
|
||||
$cinder_dellemc_vnx_backend_name,
|
||||
$cinder_dellemc_vxflexos_backend_name,
|
||||
$cinder_dellemc_xtremio_backend_name,
|
||||
$cinder_dellemc_xtremio_iscsi_backend_name,
|
||||
$cinder_hpelefthand_backend_name,
|
||||
|
55
manifests/profile/base/cinder/volume/dellemc_vxflexos.pp
Normal file
55
manifests/profile/base/cinder/volume/dellemc_vxflexos.pp
Normal file
@ -0,0 +1,55 @@
|
||||
# Copyright (c) 2020 Dell Inc, or its subsidiaries.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||
# not use this file except in compliance with the License. You may obtain
|
||||
# a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
#
|
||||
# == Class: tripleo::profile::base::cinder::volume::dellemc_vxflexos
|
||||
#
|
||||
# Cinder Volume dellemc_vxflexos profile for tripleo
|
||||
#
|
||||
# === Parameters
|
||||
#
|
||||
# [*backend_name*]
|
||||
# (Optional) Name given to the Cinder backend stanza
|
||||
# Defaults to 'tripleo_dellemc_vxflexos'
|
||||
#
|
||||
# [*step*]
|
||||
# (Optional) The current step in deployment. See tripleo-heat-templates
|
||||
# for more details.
|
||||
# Defaults to hiera('step')
|
||||
#
|
||||
class tripleo::profile::base::cinder::volume::dellemc_vxflexos (
|
||||
$backend_name = hiera('cinder::backend::dellemc_vxflexos::volume_backend_name', 'tripleo_dellemc_vxflexos'),
|
||||
$step = Integer(hiera('step')),
|
||||
) {
|
||||
include tripleo::profile::base::cinder::volume
|
||||
|
||||
if $step >= 4 {
|
||||
cinder::backend::dellemc_vxflexos { $backend_name :
|
||||
backend_availability_zone => hiera('cinder::backend::dellemc_vxflexos::backend_availability_zone', undef),
|
||||
san_login => hiera('cinder::backend::dellemc_vxflexos::san_login', undef),
|
||||
san_password => hiera('cinder::backend::dellemc_vxflexos::san_password', undef),
|
||||
san_ip => hiera('cinder::backend::dellemc_vxflexos::san_ip', undef),
|
||||
vxflexos_storage_pools => hiera('cinder::backend::dellemc_vxflexos::vxflexos_storage_pools', undef),
|
||||
vxflexos_allow_migration_during_rebuild => hiera('cinder::backend::dellemc_vxflexos::vxflexos_allow_migration_during_rebuild', undef),
|
||||
vxflexos_allow_non_padded_volumes => hiera('cinder::backend::dellemc_vxflexos::vxflexos_allow_non_padded_volumes', undef),
|
||||
vxflexos_max_over_subscription_ratio => hiera('cinder::backend::dellemc_vxflexos::vxflexos_max_over_subscription_ratio', undef),
|
||||
vxflexos_rest_server_port => hiera('cinder::backend::dellemc_vxflexos::vxflexos_rest_server_port', undef),
|
||||
vxflexos_round_volume_capacity => hiera('cinder::backend::dellemc_vxflexos::vxflexos_round_volume_capacity', undef),
|
||||
vxflexos_server_api_version => hiera('cinder::backend::dellemc_vxflexos::vxflexos_server_api_version', undef),
|
||||
vxflexos_unmap_volume_before_deletion => hiera('cinder::backend::dellemc_vxflexos::vxflexos_unmap_volume_before_deletion', undef),
|
||||
san_thin_provision => hiera('cinder::backend::dellemc_vxflexos::san_thin_provision', undef),
|
||||
driver_ssl_cert_verify => hiera('cinder::backend::dellemc_vxflexos::driver_ssl_cert_verify', undef),
|
||||
driver_ssl_cert_path => hiera('cinder::backend::dellemc_vxflexos::driver_ssl_cert_path', undef)
|
||||
}
|
||||
}
|
||||
}
|
3
releasenotes/notes/vxflexos-driver-aec8e372280c44e6.yaml
Normal file
3
releasenotes/notes/vxflexos-driver-aec8e372280c44e6.yaml
Normal file
@ -0,0 +1,3 @@
|
||||
---
|
||||
features:
|
||||
- Added support for VxFlexOS backend driver
|
@ -195,6 +195,25 @@ describe 'tripleo::profile::base::cinder::volume' do
|
||||
end
|
||||
end
|
||||
|
||||
context 'with only vxflexos' do
|
||||
before :each do
|
||||
params.merge!({
|
||||
:cinder_enable_dellemc_vxflexos_backend => true,
|
||||
:cinder_enable_iscsi_backend => false,
|
||||
})
|
||||
end
|
||||
it 'should configure only vxflexos' do
|
||||
is_expected.to contain_class('tripleo::profile::base::cinder::volume::dellemc_vxflexos')
|
||||
is_expected.to_not contain_class('tripleo::profile::base::cinder::volume::iscsi')
|
||||
is_expected.to contain_class('tripleo::profile::base::cinder::volume')
|
||||
is_expected.to contain_class('tripleo::profile::base::cinder')
|
||||
is_expected.to contain_class('cinder::volume')
|
||||
is_expected.to contain_class('cinder::backends').with(
|
||||
:enabled_backends => ['tripleo_dellemc_vxflexos']
|
||||
)
|
||||
end
|
||||
end
|
||||
|
||||
context 'with only netapp' do
|
||||
before :each do
|
||||
params.merge!({
|
||||
@ -300,6 +319,7 @@ describe 'tripleo::profile::base::cinder::volume' do
|
||||
is_expected.to_not contain_class('tripleo::profile::base::cinder::volume::dellemc_xtremio')
|
||||
is_expected.to_not contain_class('tripleo::profile::base::cinder::volume::dellsc')
|
||||
is_expected.to_not contain_class('tripleo::profile::base::cinder::volume::dellemc_powermax')
|
||||
is_expected.to_not contain_class('tripleo::profile::base::cinder::volume::dellemc_vxflexos')
|
||||
is_expected.to_not contain_class('tripleo::profile::base::cinder::volume::netapp')
|
||||
is_expected.to_not contain_class('tripleo::profile::base::cinder::volume::veritas_hyperscale')
|
||||
is_expected.to_not contain_class('tripleo::profile::base::cinder::volume::nfs')
|
||||
@ -324,6 +344,7 @@ describe 'tripleo::profile::base::cinder::volume' do
|
||||
:cinder_enable_dellemc_sc_backend => true,
|
||||
:cinder_enable_dellsc_backend => true,
|
||||
:cinder_enable_dellemc_xtremio_backend => true,
|
||||
:cinder_enable_dellemc_vxflexos_backend => true,
|
||||
:cinder_enable_netapp_backend => true,
|
||||
:cinder_enable_vrts_hs_backend => true,
|
||||
})
|
||||
@ -335,6 +356,7 @@ describe 'tripleo::profile::base::cinder::volume' do
|
||||
is_expected.to contain_class('tripleo::profile::base::cinder::volume::dellemc_xtremio')
|
||||
is_expected.to contain_class('tripleo::profile::base::cinder::volume::dellsc')
|
||||
is_expected.to contain_class('tripleo::profile::base::cinder::volume::dellemc_powermax')
|
||||
is_expected.to contain_class('tripleo::profile::base::cinder::volume::dellemc_vxflexos')
|
||||
is_expected.to contain_class('tripleo::profile::base::cinder::volume::netapp')
|
||||
is_expected.to contain_class('tripleo::profile::base::cinder::volume::veritas_hyperscale')
|
||||
is_expected.to contain_class('tripleo::profile::base::cinder::volume::nfs')
|
||||
@ -344,7 +366,7 @@ describe 'tripleo::profile::base::cinder::volume' do
|
||||
is_expected.to contain_class('cinder::volume')
|
||||
is_expected.to contain_class('cinder::backends').with(
|
||||
:enabled_backends => ['tripleo_iscsi', 'tripleo_ceph', 'tripleo_pure', 'tripleo_dellsc', 'tripleo_dellemc_sc','tripleo_dellemc_powermax',
|
||||
'tripleo_dellemc_xtremio', 'tripleo_netapp','tripleo_nfs','Veritas_HyperScale']
|
||||
'tripleo_dellemc_vxflexos', 'tripleo_dellemc_xtremio', 'tripleo_netapp','tripleo_nfs','Veritas_HyperScale']
|
||||
)
|
||||
end
|
||||
end
|
||||
|
58
spec/classes/tripleo_profile_base_cinder_vxflexos_spec.rb
Normal file
58
spec/classes/tripleo_profile_base_cinder_vxflexos_spec.rb
Normal file
@ -0,0 +1,58 @@
|
||||
#
|
||||
# Copyright (c) 2020 Dell Inc, or its subsidiaries
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||
# not use this file except in compliance with the License. You may obtain
|
||||
# a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
#
|
||||
|
||||
require 'spec_helper'
|
||||
|
||||
describe 'tripleo::profile::base::cinder::volume::dellemc_vxflexos' do
|
||||
shared_examples_for 'tripleo::profile::base::cinder::volume::dellemc_vxflexos' do
|
||||
before :each do
|
||||
facts.merge!({ :step => params[:step] })
|
||||
end
|
||||
|
||||
context 'with step less than 4' do
|
||||
let(:params) { { :step => 3 } }
|
||||
|
||||
it 'should do nothing' do
|
||||
is_expected.to contain_class('tripleo::profile::base::cinder::volume::dellemc_vxflexos')
|
||||
is_expected.to contain_class('tripleo::profile::base::cinder::volume')
|
||||
is_expected.to contain_class('tripleo::profile::base::cinder')
|
||||
is_expected.to_not contain_cinder__backend__dellemc_vxflexos('tripleo_dellemc_vxflexos')
|
||||
end
|
||||
end
|
||||
|
||||
context 'with step 4' do
|
||||
let(:params) { {
|
||||
:step => 4,
|
||||
} }
|
||||
|
||||
it 'should trigger complete configuration' do
|
||||
# TODO(aschultz): check hiera parameters
|
||||
is_expected.to contain_cinder__backend__dellemc_vxflexos('tripleo_dellemc_vxflexos')
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
on_supported_os.each do |os, facts|
|
||||
context "on #{os}" do
|
||||
let(:facts) do
|
||||
facts.merge({ :hostname => 'node.example.com' })
|
||||
end
|
||||
|
||||
it_behaves_like 'tripleo::profile::base::cinder::volume::dellemc_vxflexos'
|
||||
end
|
||||
end
|
||||
end
|
Loading…
Reference in New Issue
Block a user