summaryrefslogtreecommitdiffstats
path: root/build/puppet-neutron
diff options
context:
space:
mode:
authorFeng Pan <fpan@redhat.com>2016-09-26 14:39:23 -0400
committerTim Rozet <trozet@redhat.com>2016-10-05 16:21:17 -0400
commit136bfee6d8a4dddd18d621047086031a1bb584d2 (patch)
tree05453b75d24ef75686d77137928daa26bfd9a61f /build/puppet-neutron
parent9b06e3cbd8d24ec9cf9cb0cbbf16b6b98b8e4b67 (diff)
VPP version update
- Update VPP version to latest on 16.09 branch - Change networking-vpp repo to point to openstack. - Update VPP python API rpm location - Configure etcd for networking-vpp ML2 plugin opnfv-tht-pr: 85 JIRA: APEX-283 Change-Id: I4e69de3c51b1f4221995cc8568cdfa18aacbc55c Signed-off-by: Feng Pan <fpan@redhat.com>
Diffstat (limited to 'build/puppet-neutron')
-rw-r--r--build/puppet-neutron/lib/puppet/provider/neutron_agent_vpp/ini_setting.rb15
-rw-r--r--build/puppet-neutron/lib/puppet/type/neutron_agent_vpp.rb28
-rw-r--r--build/puppet-neutron/manifests/agents/ml2/networking-vpp.pp33
-rw-r--r--build/puppet-neutron/manifests/plugins/ml2/networking-vpp.pp28
4 files changed, 87 insertions, 17 deletions
diff --git a/build/puppet-neutron/lib/puppet/provider/neutron_agent_vpp/ini_setting.rb b/build/puppet-neutron/lib/puppet/provider/neutron_agent_vpp/ini_setting.rb
new file mode 100644
index 00000000..595904ce
--- /dev/null
+++ b/build/puppet-neutron/lib/puppet/provider/neutron_agent_vpp/ini_setting.rb
@@ -0,0 +1,15 @@
+Puppet::Type.type(:neutron_agent_vpp).provide(
+ :ini_setting,
+ :parent => Puppet::Type.type(:openstack_config).provider(:ini_setting)
+) do
+
+ def self.file_path
+ '/etc/neutron/plugins/ml2/vpp_agent.ini'
+ end
+
+ # added for backwards compatibility with older versions of inifile
+ def file_path
+ self.class.file_path
+ end
+
+end \ No newline at end of file
diff --git a/build/puppet-neutron/lib/puppet/type/neutron_agent_vpp.rb b/build/puppet-neutron/lib/puppet/type/neutron_agent_vpp.rb
new file mode 100644
index 00000000..f43a8b41
--- /dev/null
+++ b/build/puppet-neutron/lib/puppet/type/neutron_agent_vpp.rb
@@ -0,0 +1,28 @@
+Puppet::Type.newtype(:neutron_agent_vpp) do
+
+ ensurable
+
+ newparam(:name, :namevar => true) do
+ desc 'Section/setting name to manage from vpp agent config.'
+ newvalues(/\S+\/\S+/)
+ end
+
+ newproperty(:value) do
+ desc 'The value of the setting to be defined.'
+ munge do |value|
+ value = value.to_s.strip
+ value.capitalize! if value =~ /^(true|false)$/i
+ value
+ end
+ end
+
+ newparam(:ensure_absent_val) do
+ desc 'A value that is specified as the value property will behave as if ensure => absent was specified'
+ defaultto('<SERVICE DEFAULT>')
+ end
+
+ autorequire(:package) do
+ 'networking-vpp'
+ end
+
+end \ No newline at end of file
diff --git a/build/puppet-neutron/manifests/agents/ml2/networking-vpp.pp b/build/puppet-neutron/manifests/agents/ml2/networking-vpp.pp
index c25c2817..6184e006 100644
--- a/build/puppet-neutron/manifests/agents/ml2/networking-vpp.pp
+++ b/build/puppet-neutron/manifests/agents/ml2/networking-vpp.pp
@@ -21,20 +21,34 @@
# tuples mapping physical network names to agent's node-specific physical
# network interfaces. Defaults to empty list.
#
-# [*flat_network_if*]
-# VPP interface used for flat network
-# Defaults to ''.
+# [*etcd_host*]
+# etcd server host name/ip
+# Defaults to 127.0.0.1.
+#
+# [*etcd_port*]
+# etcd server listening port.
+# Defaults to 4001.
#
class neutron::agents::ml2::networking-vpp (
$package_ensure = 'present',
$enabled = true,
$manage_service = true,
$physnets = '',
- $flat_network_if = '',
+ $etcd_host = '127.0.0.1',
+ $etcd_port = 4001,
) {
include ::neutron::params
+ Neutron_agent_vpp<||> ~> Service['networking-vpp-agent']
+
+ neutron_agent_vpp {
+ 'ml2_vpp/physnets': value => $physnets;
+ 'ml2_vpp/etcd_host': value => $etcd_host;
+ 'ml2_vpp/etcd_port': value => $etcd_port;
+ 'DEFAULT/host': value => $::fqdn;
+ }
+
if $manage_service {
if $enabled {
$service_ensure = 'running'
@@ -43,14 +57,9 @@ class neutron::agents::ml2::networking-vpp (
}
}
- neutron_plugin_ml2 {
- 'ml2_vpp/physnets': value => $physnets;
- 'ml2_vpp/flat_network_if': value => $flat_network_if;
- }->
service { 'networking-vpp-agent':
- ensure => $service_ensure,
- name => 'networking-vpp-agent',
- enable => $enabled,
- tag => 'neutron-service',
+ ensure => $service_ensure,
+ name => 'networking-vpp-agent',
+ enable => $enabled,
}
} \ No newline at end of file
diff --git a/build/puppet-neutron/manifests/plugins/ml2/networking-vpp.pp b/build/puppet-neutron/manifests/plugins/ml2/networking-vpp.pp
index 26548d3a..cf8fe178 100644
--- a/build/puppet-neutron/manifests/plugins/ml2/networking-vpp.pp
+++ b/build/puppet-neutron/manifests/plugins/ml2/networking-vpp.pp
@@ -10,13 +10,28 @@
# property for a package resource type.
# Defaults to 'present'
#
-# [*agents*]
-# Networking-vpp agents's addresses
-# Defaults to $::os_service_default
+# [*etcd_host*]
+# (required) etcd server host name or IP.
+# Defaults to '127.0.0.1'
+#
+# [*etcd_port*]
+# (optional) etcd server listening port.
+# Defaults to 4001.
+#
+# [*etcd_user*]
+# (optional) User name for etcd authentication
+# Defaults to ''.
+#
+# [*etcd_pass*]
+# (optional) Password for etcd authentication
+# Defaults to ''.
#
class neutron::plugins::ml2::networking-vpp (
$package_ensure = 'present',
- $agents = $::os_service_default,
+ $etcd_host = '127.0.0.1',
+ $etcd_port = 4001,
+ $etcd_user = '',
+ $etcd_pass = '',
) {
require ::neutron::plugins::ml2
@@ -28,6 +43,9 @@ class neutron::plugins::ml2::networking-vpp (
)
neutron_plugin_ml2 {
- 'ml2_vpp/agents': value => $agents;
+ 'ml2_vpp/etcd_host': value => $etcd_host;
+ 'ml2_vpp/etcd_port': value => $etcd_port;
+ 'ml2_vpp/etcd_user': value => $etcd_user;
+ 'ml2_vpp/etcd_pass': value => $etcd_pass;
}
}