New configuration being added for Cisco UCSM ML2 driver

Cisco UCSM ML2 driver now accepts the following new configuration
parameters:
1. ucsm_https_verify
2. sp_template_list
3. vnic_template_list

Change-Id: I974c51a4bee4dc2e084cea809b3f93978d09c63b
Closes-Bug: #1742796
This commit is contained in:
Sandhya Dasu 2018-01-11 16:17:41 -05:00
parent 3b3123d337
commit b61e1f5e33
3 changed files with 42 additions and 2 deletions

View File

@ -1,7 +1,7 @@
# #
# Configure the Mech Driver for Cisco UCSM plugin # Configure the Mech Driver for Cisco UCSM plugin
# More info available here: # More info available here:
# http://docwiki.cisco.com/wiki/UCS_Mechanism_Driver_for_ML2_Plugin:_Kilo # http://networking-cisco.readthedocs.io
# #
# === Parameters # === Parameters
# #
@ -27,12 +27,34 @@
# Example: # Example:
# [ '2222:3333', '4444:5555' ] # [ '2222:3333', '4444:5555' ]
# #
# [*ucsm_https_verify*]
# (optional) Set to False to turn off SSL certificate checking
# while connecting to UCS Manager.
# Defaults to True.
#
# [*sp_template_list*]
# (optional) This configuration needs to be provided when
# UCS Servers are controlled by Service Profile Templates.
# Example:
# sp_template_list = SP_Template1_path:SP_Template1:S1,S2
# SP_Template2_path:SP_Template2:S3,S4,S5
#
# [*vnic_template_list*]
# (optional) This configuration needs to be provided when vNICs
# on UCS Servers are controlled by vNIC Templates.
# Example:
# vnic_template_list = physnet1:vnic_template_path1:vt1
# physnet2:vnic_template_path2:vt2
#
class neutron::plugins::ml2::cisco::ucsm ( class neutron::plugins::ml2::cisco::ucsm (
$ucsm_ip, $ucsm_ip,
$ucsm_username, $ucsm_username,
$ucsm_password, $ucsm_password,
$ucsm_host_list, $ucsm_host_list,
$sp_template_list,
$vnic_template_list,
$supported_pci_devs = $::os_service_default, $supported_pci_devs = $::os_service_default,
$ucsm_https_verify = $::os_service_default,
) { ) {
include ::neutron::deps include ::neutron::deps
@ -43,7 +65,10 @@ class neutron::plugins::ml2::cisco::ucsm (
'ml2_cisco_ucsm/ucsm_username' : value => $ucsm_username; 'ml2_cisco_ucsm/ucsm_username' : value => $ucsm_username;
'ml2_cisco_ucsm/ucsm_password' : value => $ucsm_password, secret => true; 'ml2_cisco_ucsm/ucsm_password' : value => $ucsm_password, secret => true;
'ml2_cisco_ucsm/ucsm_host_list' : value => $ucsm_host_list; 'ml2_cisco_ucsm/ucsm_host_list' : value => $ucsm_host_list;
'ml2_cisco_ucsm/sp_template_list' : value => $sp_template_list;
'ml2_cisco_ucsm/vnic_template_list' : value => $vnic_template_list;
'ml2_cisco_ucsm/supported_pci_devs' : value => $supported_pci_devs; 'ml2_cisco_ucsm/supported_pci_devs' : value => $supported_pci_devs;
'ml2_cisco_ucsm/ucsm_https_verify' : value => $ucsm_https_verify;
} }
} }

View File

@ -0,0 +1,10 @@
---
features:
- |
Add new configuration parameters for the Cisco UCSM ML2 driver
The following new configuration parameters are now being supported by the
UCSM ML2 driver.
* ucsm_https_verify
* sp_template_list
* vnic_template_list

View File

@ -22,7 +22,10 @@ describe 'neutron::plugins::ml2::cisco::ucsm' do
:ucsm_username => 'admin', :ucsm_username => 'admin',
:ucsm_password => 'password', :ucsm_password => 'password',
:ucsm_host_list => 'host1:profile1, host2:profile2', :ucsm_host_list => 'host1:profile1, host2:profile2',
:supported_pci_devs => [ '2222:3333', '4444:5555' ] :supported_pci_devs => [ '2222:3333', '4444:5555' ],
:ucsm_https_verify => 'True',
:sp_template_list => 'SP_Template1_path:SP_Template1:S1,S2 SP_Template2_path:SP_Template2:S3,S4,S5',
:vnic_template_list => 'physnet1:vnic_template_path1:vt1 physnet2:vnic_template_path2:vt2',
} }
end end
@ -51,6 +54,8 @@ describe 'neutron::plugins::ml2::cisco::ucsm' do
is_expected.to contain_neutron_plugin_ml2('ml2_cisco_ucsm/ucsm_password').with_value(params[:ucsm_password]).with_secret(true) is_expected.to contain_neutron_plugin_ml2('ml2_cisco_ucsm/ucsm_password').with_value(params[:ucsm_password]).with_secret(true)
is_expected.to contain_neutron_plugin_ml2('ml2_cisco_ucsm/ucsm_host_list').with_value(params[:ucsm_host_list]) is_expected.to contain_neutron_plugin_ml2('ml2_cisco_ucsm/ucsm_host_list').with_value(params[:ucsm_host_list])
is_expected.to contain_neutron_plugin_ml2('ml2_cisco_ucsm/supported_pci_devs').with_value(params[:supported_pci_devs]) is_expected.to contain_neutron_plugin_ml2('ml2_cisco_ucsm/supported_pci_devs').with_value(params[:supported_pci_devs])
is_expected.to contain_neutron_plugin_ml2('ml2_cisco_ucsm/sp_template_list').with_value(params[:sp_template_list])
is_expected.to contain_neutron_plugin_ml2('ml2_cisco_ucsm/vnic_template_list').with_value(params[:vnic_template_list])
end end
end end