Merge "Change authentication method for Mellanox sdn controller"
This commit is contained in:
commit
70fe4887a1
@ -4,20 +4,15 @@
|
|||||||
#
|
#
|
||||||
# === Parameters
|
# === Parameters
|
||||||
#
|
#
|
||||||
# [*sdn_username*]
|
# [*sdn_token*]
|
||||||
# (optional) The Mellanox controller username
|
# (optional) The Mellanox controller token
|
||||||
# Defaults to $::os_service_default
|
# Defaults to $::os_service_default
|
||||||
# Example: 'admin'
|
# Example: 'abcdef'
|
||||||
#
|
|
||||||
# [*sdn_password*]
|
|
||||||
# (optional) The Mellanox controller password
|
|
||||||
# Defaults to $::os_service_default
|
|
||||||
# Example: 'admin'
|
|
||||||
#
|
#
|
||||||
# [*sdn_url*]
|
# [*sdn_url*]
|
||||||
# (optional) The Mellanox controller neutron URL
|
# (optional) The Mellanox controller neutron URL
|
||||||
# Defaults to $::os_service_default
|
# Defaults to $::os_service_default
|
||||||
# Example: 'http://127.0.0.1/neo'
|
# Example: 'http://127.0.0.1/ufmRestV3/'
|
||||||
#
|
#
|
||||||
# [*sdn_domain*]
|
# [*sdn_domain*]
|
||||||
# (optional) The Mellanox controller domain
|
# (optional) The Mellanox controller domain
|
||||||
@ -41,22 +36,48 @@
|
|||||||
# The list must be a subset of physical_networks
|
# The list must be a subset of physical_networks
|
||||||
# Defaults to []
|
# Defaults to []
|
||||||
#
|
#
|
||||||
|
# DEPRECATED PARAMETERS
|
||||||
|
#
|
||||||
|
# [*sdn_username*]
|
||||||
|
# (optional) The Mellanox controller username
|
||||||
|
# Defaults to undef.
|
||||||
|
#
|
||||||
|
# [*sdn_password*]
|
||||||
|
# (optional) The Mellanox controller password
|
||||||
|
# Defaults to undef.
|
||||||
|
#
|
||||||
class neutron::plugins::ml2::mellanox::mlnx_sdn_assist (
|
class neutron::plugins::ml2::mellanox::mlnx_sdn_assist (
|
||||||
$sdn_username = $::os_service_default,
|
$sdn_token = $::os_service_default,
|
||||||
$sdn_password = $::os_service_default,
|
|
||||||
$sdn_url = $::os_service_default,
|
$sdn_url = $::os_service_default,
|
||||||
$sdn_domain = $::os_service_default,
|
$sdn_domain = $::os_service_default,
|
||||||
$sync_enabled = true,
|
$sync_enabled = true,
|
||||||
$bind_normal_ports = false,
|
$bind_normal_ports = false,
|
||||||
$bind_normal_ports_physnets = [],
|
$bind_normal_ports_physnets = [],
|
||||||
|
# DEPRECATED PARAMETERS
|
||||||
|
$sdn_username = undef,
|
||||||
|
$sdn_password = undef,
|
||||||
) {
|
) {
|
||||||
|
|
||||||
include neutron::deps
|
include neutron::deps
|
||||||
require neutron::plugins::ml2
|
require neutron::plugins::ml2
|
||||||
|
|
||||||
|
if $sdn_username != undef {
|
||||||
|
warning('neutron::plugins::ml2::mellanox::mlnx_sdn_assist::sdn_username is now deprecated \
|
||||||
|
and has no effect.')
|
||||||
|
}
|
||||||
|
|
||||||
|
if $sdn_password != undef {
|
||||||
|
warning('neutron::plugins::ml2::mellanox::mlnx_sdn_assist::sdn_password is now deprecated \
|
||||||
|
and has no effect.')
|
||||||
|
}
|
||||||
|
|
||||||
neutron_plugin_ml2 {
|
neutron_plugin_ml2 {
|
||||||
'sdn/username': value => $sdn_username;
|
'sdn/username': ensure => absent;
|
||||||
'sdn/password': value => $sdn_password, secret => true;
|
'sdn/password ': ensure => absent;
|
||||||
|
}
|
||||||
|
|
||||||
|
neutron_plugin_ml2 {
|
||||||
|
'sdn/token': value => $sdn_token, secret => true;
|
||||||
'sdn/url': value => $sdn_url;
|
'sdn/url': value => $sdn_url;
|
||||||
'sdn/domain': value => $sdn_domain;
|
'sdn/domain': value => $sdn_domain;
|
||||||
'sdn/sync_enabled': value => $sync_enabled;
|
'sdn/sync_enabled': value => $sync_enabled;
|
||||||
|
13
releasenotes/notes/add_token_auth-daa888e87da725da.yaml
Normal file
13
releasenotes/notes/add_token_auth-daa888e87da725da.yaml
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
---
|
||||||
|
features:
|
||||||
|
- The new ``sdn_token`` parameter to authenticate sdn has been added to
|
||||||
|
the ``neutron::plugins::ml2::mellanox::mlnx_sdn_assist`` class.
|
||||||
|
|
||||||
|
deprecations:
|
||||||
|
- |
|
||||||
|
The following two parameters of
|
||||||
|
the ``neutron::plugins::ml2::mellanox::mlnx_sdn_assist`` class have been
|
||||||
|
deprecated and have no effect now.
|
||||||
|
|
||||||
|
- ``sdn_username``
|
||||||
|
- ``sdn_password``
|
@ -19,8 +19,7 @@ describe 'neutron::plugins::ml2::mellanox::mlnx_sdn_assist' do
|
|||||||
|
|
||||||
let :params do
|
let :params do
|
||||||
{
|
{
|
||||||
:sdn_username => 'user',
|
:sdn_token => 'token',
|
||||||
:sdn_password => 'password',
|
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -30,8 +29,7 @@ describe 'neutron::plugins::ml2::mellanox::mlnx_sdn_assist' do
|
|||||||
end
|
end
|
||||||
|
|
||||||
it 'configures sdn settings' do
|
it 'configures sdn settings' do
|
||||||
should contain_neutron_plugin_ml2('sdn/password').with_value(params[:sdn_password]).with_secret(true)
|
should contain_neutron_plugin_ml2('sdn/token').with_value(params[:sdn_token]).with_secret(true)
|
||||||
should contain_neutron_plugin_ml2('sdn/username').with_value(params[:sdn_username])
|
|
||||||
should contain_neutron_plugin_ml2('sdn/url').with_value(params[:sdn_url])
|
should contain_neutron_plugin_ml2('sdn/url').with_value(params[:sdn_url])
|
||||||
should contain_neutron_plugin_ml2('sdn/sync_enabled').with_value('true')
|
should contain_neutron_plugin_ml2('sdn/sync_enabled').with_value('true')
|
||||||
should contain_neutron_plugin_ml2('sdn/bind_normal_ports').with_value('false')
|
should contain_neutron_plugin_ml2('sdn/bind_normal_ports').with_value('false')
|
||||||
|
Loading…
Reference in New Issue
Block a user