N1Kv:Adding params for IPv6 communication with VSM

Adding ability to configure IPv6 control address of VSM,
in the n1kv.conf file, to enable N1kv VEM to talk to VSM
over IPv6

Change-Id: Iac92569ec19a879091111f78474aebb83292999d
(cherry picked from commit bfb33bfe31)
This commit is contained in:
Saksham Varma 2015-07-02 18:15:21 -07:00
parent ad7a3cfb7b
commit 6fd743bca5
3 changed files with 47 additions and 0 deletions

View File

@ -9,6 +9,10 @@
# (required) N1KV VSM(Virtual Supervisor Module) VM's IP.
# Defaults to 127.0.0.1
#
# [*n1kv_vsm_ipv6*]
# (required) N1KV VSM(Virtual Supervisor Module) VM's IP.
# Defaults to ::1
#
# [*n1kv_vsm_domainid*]
# (required) N1KV VSM DomainID.
# Defaults to 1000
@ -101,6 +105,7 @@
#
class neutron::agents::n1kv_vem (
$n1kv_vsm_ip = '127.0.0.1',
$n1kv_vsm_ipv6 = '::1',
$n1kv_vsm_domain_id = 1000,
$host_mgmt_intf = 'eth1',
$uplink_profile = {},

View File

@ -67,6 +67,7 @@ describe 'neutron::agents::n1kv_vem' do
let :params do
{
:n1kv_vsm_ip => '9.0.0.1',
:n1kv_vsm_ipv6 => '::3',
:n1kv_vsm_domain_id => 900,
:host_mgmt_intf => 'eth9',
:portdb => 'ovs',
@ -76,6 +77,8 @@ describe 'neutron::agents::n1kv_vem' do
it do
is_expected.to contain_file('/etc/n1kv/n1kv.conf') \
.with_content(/^l3control-ipaddr 9.0.0.1/)
is_expected.to contain_file('/etc/n1kv/n1kv.conf') \
.with_content(/^l3control-ipv6addr ::3/)
is_expected.to contain_file('/etc/n1kv/n1kv.conf') \
.with_content(/^switch-domain 900/)
is_expected.to contain_file('/etc/n1kv/n1kv.conf') \
@ -93,6 +96,30 @@ describe 'neutron::agents::n1kv_vem' do
end
end
context 'verify n1kv.conf svs-mode with default IPv6 address' do
let :params do
{
:n1kv_vsm_ipv6 => '::1'
}
end
it do
is_expected.to contain_file('/etc/n1kv/n1kv.conf') \
.without_content(/^svs-mode V6/)
end
end
context 'verify n1kv.conf svs-mode with non-default IPv6 address' do
let :params do
{
:n1kv_vsm_ipv6 => '::3'
}
end
it do
is_expected.to contain_file('/etc/n1kv/n1kv.conf') \
.with_content(/^svs-mode V6/)
end
end
context 'verify node_type' do
let :params do
{

View File

@ -29,6 +29,21 @@ switch-domain <%= @n1kv_vsm_domain_id %>
# restart_on_modify: No
l3control-ipaddr <%= @n1kv_vsm_ip %>
# TAG: l3control-ipv6addr
# Description: IPv6 Address of VSM Mgmt I/F
# Optional: No
# Default: ::1
# restart_on_modify: No
l3control-ipv6addr <%= @n1kv_vsm_ipv6 %>
# Set svs-mode to V6 if IPv6 address for VSM
# is set to something other than default ::1.
# This tells VEM to communicate with VSM on
# IPv6 instead of the default IPv4 option
<% if @n1kv_vsm_ipv6 != '::1' -%>
svs-mode V6
<% end -%>
# TAG: host-mgmt-intf
# Description: Management interface of the Host
# Optional: No (on N1KV, we need this