summaryrefslogtreecommitdiffstats
path: root/etc/testcase/vping.userdata.yml
blob: 0bf1f9a0e2779c58302538ea0f2228fceea9cf54 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
---
dovetail.vping.userdata:
  name: dovetail.vping.userdata
  objective: testing for vping using userdata
  validate:
    type: functest
    testcase: vping_userdata
  report:
    source_archive_files:
      - functest.log
    dest_archive_files:
      - vping_logs/dovetail.vping.userdata.log
    check_results_file: 'functest_results.txt'
    sub_testcase_list:
/ .highlight .sx { color: #e6db74 } /* Literal.String.Other */ .highlight .sr { color: #e6db74 } /* Literal.String.Regex */ .highlight .s1 { color: #e6db74 } /* Literal.String.Single */ .highlight .ss { color: #e6db74 } /* Literal.String.Symbol */ .highlight .bp { color: #f8f8f2 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #a6e22e } /* Name.Function.Magic */ .highlight .vc { color: #f8f8f2 } /* Name.Variable.Class */ .highlight .vg { color: #f8f8f2 } /* Name.Variable.Global */ .highlight .vi { color: #f8f8f2 } /* Name.Variable.Instance */ .highlight .vm { color: #f8f8f2 } /* Name.Variable.Magic */ .highlight .il { color: #ae81ff } /* Literal.Number.Integer.Long */ } @media (prefers-color-scheme: light) { .highlight .hll { background-color: #ffffcc } .highlight .c { color: #888888 } /* Comment */ .highlight .err { color: #a61717; background-color: #e3d2d2 } /* Error */ .highlight .k { color: #008800; font-weight: bold } /* Keyword */ .highlight .ch { color: #888888 } /* Comment.Hashbang */ .highlight .cm { color: #888888 } /* Comment.Multiline */ .highlight .cp { color: #cc0000; font-weight: bold } /* Comment.Preproc */ .highlight .cpf { color: #888888 } /* Comment.PreprocFile */ .highlight .c1 { color: #888888 } /* Comment.Single */ .highlight .cs { color: #cc0000; font-weight: bold; background-color: #fff0f0 } /* Comment.Special */ .highlight .gd { color: #000000; background-color: #ffdddd } /* Generic.Deleted */ .highlight .ge { font-style: italic } /* Generic.Emph */ .highlight .gr { color: #aa0000 } /* Generic.Error */ .highlight .gh { color: #333333 } /* Generic.Heading */ .highlight .gi { color: #000000; background-color: #ddffdd } /* Generic.Inserted */ .highlight .go { color: #888888 } /* Generic.Output */ .highlight .gp { color: #555555 } /* Generic.Prompt */ .highlight .gs { font-weight: bold } /* Generic.Strong */ .highlight .gu { color: #666666 } /* Generic.Subheading */ .highlight .gt { color: #aa0000 } /* Generic.Traceback */ .highlight .kc { color: #008800; font-weight: bold } /* Keyword.Constant */ .highlight .kd { color: #008800; font-weight: bold } /* Keyword.Declaration */ .highlight .kn { color: #008800; font-weight: bold } /* Keyword.Namespace */ .highlight .kp { color: #008800 } /* Keyword.Pseudo */ .highlight .kr { color: #008800; font-weight: bold } /* Keyword.Reserved */ .highlight .kt { color: #888888; font-weight: bold } /* Keyword.Type */ .highlight .m { color: #0000DD; font-weight: bold } /* Literal.Number */ .highlight .s { color: #dd2200; background-color: #fff0f0 } /* Literal.String */ .highlight .na { color: #336699 } /* Name.Attribute */ .highlight .nb { color: #003388 } /* Name.Builtin */ .highlight .nc { color: #bb0066; font-weight: bold } /* Name.Class */ .highlight .no { color: #003366; font-weight: bold } /* Name.Constant */ .highlight .nd { color: #555555 } /* Name.Decorator */ .highlight .ne { color: #bb0066; font-weight: bold } /* Name.Exception */ .highlight .nf { color: #0066bb; font-weight: bold } /* Name.Function */ .highlight .nl { color: #336699; font-style: italic } /* Name.Label */ .highlight .nn { color: #bb0066; font-weight: bold } /* Name.Namespace */ .highlight .py { color: #336699; font-weight: bold } /* Name.Property */ .highlight .nt { color: #bb0066; font-weight: bold } /* Name.Tag */ .highlight .nv { color: #336699 } /* Name.Variable */ .highlight .ow { color: #008800 } /* Operator.Word */ .highlight .w { color: #bbbbbb } /* Text.Whitespace */ .highlight .mb { color: #0000DD; font-weight: bold } /* Literal.Number.Bin */ .highlight .mf { color: #0000DD; font-weight: bold } /* Literal.Number.Float */ .highlight .mh { color: #0000DD; font-weight: bold } /* Literal.Number.Hex */ .highlight .mi { color: #0000DD; font-weight: bold } /* Literal.Number.Integer */ .highlight .mo { color: #0000DD; font-weight: bold } /* Literal.Number.Oct */ .highlight .sa { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Affix */ .highlight .sb { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Backtick */ .highlight .sc { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Char */ .highlight .dl { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Delimiter */ .highlight .sd { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Doc */ .highlight .s2 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Double */ .highlight .se { color: #0044dd; background-color: #fff0f0 } /* Literal.String.Escape */ .highlight .sh { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Heredoc */ .highlight .si { color: #3333bb; background-color: #fff0f0 } /* Literal.String.Interpol */ .highlight .sx { color: #22bb22; background-color: #f0fff0 } /* Literal.String.Other */ .highlight .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */ .highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */ .highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */ .highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */ }
From 72afc22fbba73fdb474bd6e5c1c47ab31219a9b9 Mon Sep 17 00:00:00 2001
From: Feng Pan <fpan@redhat.com>
Date: Tue, 28 Feb 2017 18:07:53 -0500
Subject: [PATCH] Add support for networking-vpp ML2 driver

Change-Id: Ib45681b1e414001c42070a32e8f81778b4e9f15f
---
 .../provider/neutron_agent_vpp/ini_settings.rb     | 15 ++++
 lib/puppet/type/neutron_agent_vpp.rb               | 28 +++++++
 manifests/agents/ml2/vpp.pp                        | 91 ++++++++++++++++++++++
 manifests/deps.pp                                  |  1 +
 manifests/params.pp                                |  3 +
 manifests/plugins/ml2/vpp.pp                       | 38 +++++++++
 6 files changed, 176 insertions(+)
 create mode 100644 lib/puppet/provider/neutron_agent_vpp/ini_settings.rb
 create mode 100644 lib/puppet/type/neutron_agent_vpp.rb
 create mode 100644 manifests/agents/ml2/vpp.pp
 create mode 100644 manifests/plugins/ml2/vpp.pp

diff --git a/lib/puppet/provider/neutron_agent_vpp/ini_settings.rb b/lib/puppet/provider/neutron_agent_vpp/ini_settings.rb
new file mode 100644
index 0000000..d8da7ab
--- /dev/null
+++ b/lib/puppet/provider/neutron_agent_vpp/ini_settings.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
diff --git a/lib/puppet/type/neutron_agent_vpp.rb b/lib/puppet/type/neutron_agent_vpp.rb
new file mode 100644
index 0000000..0718db8
--- /dev/null
+++ b/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
+    'neutron-vpp-agent'
+  end
+
+end
diff --git a/manifests/agents/ml2/vpp.pp b/manifests/agents/ml2/vpp.pp
new file mode 100644
index 0000000..faae279
--- /dev/null
+++ b/manifests/agents/ml2/vpp.pp
@@ -0,0 +1,91 @@
+# == Class: neutron::agents::ml2::vpp
+#
+# Configure networking-vpp Neutron agent for ML2 plugin.
+#
+# === Parameters
+#
+# [*package_ensure*]
+#   (optional) Package ensure state.
+#   Defaults to 'present'.
+#
+# [*enabled*]
+#   (required) Whether or not to enable the agent.
+#   Defaults to true.
+#
+# [*manage_service*]
+#   (optional) Whether to start/stop the service
+#   Defaults to true
+#
+# [*physnets*]
+#   (optional) Comma-separated list of <physical_network>:<physical_interface>
+#   tuples mapping physical network names to agent's node-specific physical
+#   network interfaces. Defaults to $::os_service_default.
+#
+# [*etcd_host*]
+#   (optional) etcd server host name/ip
+#   Defaults to $::os_service_default.
+#
+# [*etcd_port*]
+#   (optional) etcd server listening port.
+#   Defaults to $::os_service_default.
+#
+# [*etcd_user*]
+#   (optional) User name for etcd authentication
+#   Defaults to $::os_service_default.
+#
+# [*etcd_pass*]
+#   (optional) Password for etcd authentication
+#   Defaults to $::os_service_default.
+#
+# [*purge_config*]
+#   (optional) Whether to set only the specified config options
+#   in the vpp config.
+#   Defaults to false.
+#
+class neutron::agents::ml2::vpp (
+  $package_ensure   = 'present',
+  $enabled          = true,
+  $manage_service   = true,
+  $physnets         = $::os_service_default,
+  $etcd_host        = $::os_service_default,
+  $etcd_port        = $::os_service_default,
+  $etcd_user        = $::os_service_default,
+  $etcd_pass        = $::os_service_default,
+  $purge_config     = false,
+) {
+  include ::neutron::deps
+  include ::neutron::params
+
+  resources { 'neutron_agent_vpp':
+    purge => $purge_config,
+  }
+
+  neutron_agent_vpp {
+    'ml2_vpp/physnets': value  => $physnets;
+    '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;
+  }
+
+  package { 'neutron-vpp-agent':
+    ensure => $package_ensure,
+    name   => $::neutron::params::vpp_plugin_package,
+    tag    => ['openstack', 'neutron-package'],
+  }
+
+  if $manage_service {
+    if $enabled {
+      $service_ensure = 'running'
+    } else {
+      $service_ensure = 'stopped'
+    }
+  }
+
+  service { 'neutron-vpp-agent-service':
+    ensure => $service_ensure,
+    name   => $::neutron::params::vpp_agent_service,
+    enable => $enabled,
+    tag    => ['neutron-service'],
+  }
+}
diff --git a/manifests/deps.pp b/manifests/deps.pp
index 94b6f78..835e906 100644
--- a/manifests/deps.pp
+++ b/manifests/deps.pp
@@ -35,6 +35,7 @@ class neutron::deps {
   # All other inifile providers need to be processed in the config block
   Anchor['neutron::config::begin'] -> Neutron_agent_linuxbridge<||> ~> Anchor['neutron::config::end']
   Anchor['neutron::config::begin'] -> Neutron_agent_ovs<||> ~> Anchor['neutron::config::end']
+  Anchor['neutron::config::begin'] -> Neutron_agent_vpp<||> ~> Anchor['neutron::config::end']
   Anchor['neutron::config::begin'] -> Neutron_api_config<||> ~> Anchor['neutron::config::end']
   Anchor['neutron::config::begin'] -> Neutron_api_paste_ini<||> ~> Anchor['neutron::config::end']
   Anchor['neutron::config::begin'] -> Neutron_config<||> ~> Anchor['neutron::config::end']
diff --git a/manifests/params.pp b/manifests/params.pp
index 05ef627..02b9be1 100644
--- a/manifests/params.pp
+++ b/manifests/params.pp
@@ -86,6 +86,9 @@ class neutron::params {
 
     $kernel_headers     = "linux-headers-${::kernelrelease}"
 
+    $vpp_plugin_package = 'python-networking-vpp'
+    $vpp_agent_service  = 'neutron-vpp-agent'
+
   } elsif($::osfamily == 'Debian') {
 
     $nobody_user_group    = 'nogroup'
diff --git a/manifests/plugins/ml2/vpp.pp b/manifests/plugins/ml2/vpp.pp
new file mode 100644
index 0000000..837a614
--- /dev/null
+++ b/manifests/plugins/ml2/vpp.pp
@@ -0,0 +1,38 @@
+#
+# Install the networking-vpp ML2 mechanism driver and generate config file
+# from parameters in the other classes.
+#
+# === Parameters
+#
+# [*etcd_host*]
+# (optional) etcd server host name or IP.
+# Defaults to $::os_service_default
+#
+# [*etcd_port*]
+# (optional) etcd server listening port.
+# Defaults to $::os_service_default.
+#
+# [*etcd_user*]
+# (optional) User name for etcd authentication
+# Defaults to $::os_service_default.
+#
+# [*etcd_pass*]
+# (optional) Password for etcd authentication
+# Defaults to $::os_service_default.
+#
+class neutron::plugins::ml2::vpp (
+  $etcd_host       = $::os_service_default,
+  $etcd_port       = $::os_service_default,
+  $etcd_user       = $::os_service_default,
+  $etcd_pass       = $::os_service_default,
+) {
+  include ::neutron::deps
+  require ::neutron::plugins::ml2
+
+  neutron_plugin_ml2 {
+    '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;
+  }
+}
-- 
2.9.3