Browse Source

Merge "Support for Dell EMC VXFlexOS Backend" into stable/train

changes/63/735563/1
Zuul 1 month ago
committed by Gerrit Code Review
parent
commit
e86dd81441
5 changed files with 169 additions and 17 deletions
  1. +14
    -0
      manifests/profile/base/cinder/volume.pp
  2. +55
    -0
      manifests/profile/base/cinder/volume/dellemc_vxflexos.pp
  3. +3
    -0
      releasenotes/notes/vxflexos-driver-aec8e372280c44e6.yaml
  4. +39
    -17
      spec/classes/tripleo_profile_base_cinder_volume_spec.rb
  5. +58
    -0
      spec/classes/tripleo_profile_base_cinder_vxflexos_spec.rb

+ 14
- 0
manifests/profile/base/cinder/volume.pp View File

@@ -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
@@ -135,6 +139,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,
@@ -242,6 +247,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',
@@ -352,6 +365,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
- 0
manifests/profile/base/cinder/volume/dellemc_vxflexos.pp View 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
- 0
releasenotes/notes/vxflexos-driver-aec8e372280c44e6.yaml View File

@@ -0,0 +1,3 @@
---
features:
- Added support for VxFlexOS backend driver

+ 39
- 17
spec/classes/tripleo_profile_base_cinder_volume_spec.rb View File

@@ -214,6 +214,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!({
@@ -315,10 +334,11 @@ describe 'tripleo::profile::base::cinder::volume' do
it 'should configure only user backend' do
is_expected.to_not contain_class('tripleo::profile::base::cinder::volume::iscsi')
is_expected.to_not contain_class('tripleo::profile::base::cinder::volume::pure')
is_expected.to_not contain_class('tripleo::profile::base::cinder::volume::dellemc_sc')
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::dellps')
is_expected.to_not contain_class('tripleo::profile::base::cinder::volume::dellemc_sc')
is_expected.to_not contain_class('tripleo::profile::base::cinder::volume::dellemc_vxflexos')
is_expected.to_not contain_class('tripleo::profile::base::cinder::volume::dellemc_xtremio')
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')
@@ -335,25 +355,27 @@ describe 'tripleo::profile::base::cinder::volume' do
context 'with all tripleo backends' do
before :each do
params.merge!({
:cinder_enable_nfs_backend => true,
:cinder_enable_rbd_backend => true,
:cinder_enable_iscsi_backend => true,
:cinder_enable_pure_backend => true,
:cinder_enable_dellemc_sc_backend => true,
:cinder_enable_dellemc_xtremio_backend => true,
:cinder_enable_dellps_backend => true,
:cinder_enable_dellsc_backend => true,
:cinder_enable_netapp_backend => true,
:cinder_enable_vrts_hs_backend => true,
:cinder_enable_nfs_backend => true,
:cinder_enable_rbd_backend => true,
:cinder_enable_iscsi_backend => true,
:cinder_enable_pure_backend => true,
:cinder_enable_dellps_backend => true,
:cinder_enable_dellsc_backend => true,
:cinder_enable_dellemc_sc_backend => true,
:cinder_enable_dellemc_vxflexos_backend => true,
:cinder_enable_dellemc_xtremio_backend => true,
:cinder_enable_netapp_backend => true,
:cinder_enable_vrts_hs_backend => true,
})
end
it 'should configure all backends' do
is_expected.to contain_class('tripleo::profile::base::cinder::volume::iscsi')
is_expected.to contain_class('tripleo::profile::base::cinder::volume::pure')
is_expected.to contain_class('tripleo::profile::base::cinder::volume::dellps')
is_expected.to contain_class('tripleo::profile::base::cinder::volume::dellsc')
is_expected.to contain_class('tripleo::profile::base::cinder::volume::dellemc_sc')
is_expected.to contain_class('tripleo::profile::base::cinder::volume::dellemc_vxflexos')
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::dellps')
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')
@@ -362,9 +384,9 @@ describe 'tripleo::profile::base::cinder::volume' do
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_iscsi', 'tripleo_ceph', 'tripleo_pure','tripleo_dellps', 'tripleo_dellsc',
'tripleo_dellemc_sc', 'tripleo_dellemc_xtremio',
'tripleo_netapp','tripleo_nfs','Veritas_HyperScale']
:enabled_backends => ['tripleo_iscsi', 'tripleo_ceph', 'tripleo_pure', 'tripleo_dellps', 'tripleo_dellsc',
'tripleo_dellemc_sc', 'tripleo_dellemc_vxflexos', 'tripleo_dellemc_xtremio', 'tripleo_netapp',
'tripleo_nfs', 'Veritas_HyperScale']
)
end
end


+ 58
- 0
spec/classes/tripleo_profile_base_cinder_vxflexos_spec.rb View 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…
Cancel
Save