X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;ds=sidebyside;f=3rdparty%2Fmodules%2Fneutron%2Fmanifests%2Fplugins%2Fml2%2Fcisco%2Fnexus.pp;fp=3rdparty%2Fmodules%2Fneutron%2Fmanifests%2Fplugins%2Fml2%2Fcisco%2Fnexus.pp;h=ab034ac6a737355c5820edebdca70dbc0913fce1;hb=4631045ebb77ee8622f6fa09277a50c372bcc02e;hp=0000000000000000000000000000000000000000;hpb=3d4dc4fd9e59bd0e07646c99f6b356c7d9d859aa;p=dsa-puppet.git diff --git a/3rdparty/modules/neutron/manifests/plugins/ml2/cisco/nexus.pp b/3rdparty/modules/neutron/manifests/plugins/ml2/cisco/nexus.pp new file mode 100644 index 00000000..ab034ac6 --- /dev/null +++ b/3rdparty/modules/neutron/manifests/plugins/ml2/cisco/nexus.pp @@ -0,0 +1,48 @@ +# +# Configure the Mech Driver for cisco neutron plugin +# More info available here: +# https://wiki.openstack.org/wiki/Neutron/ML2/MechCiscoNexus +# +# === Parameters +# +# [*neutron_config*] +# Neutron switch configuration for ml2_cisco_conf.ini +# Example nexus config format: +# { 'switch_hostname' => {'username' => 'admin', +# 'ssh_port' => 22, +# 'password' => "password", +# 'ip_address' => "172.18.117.28", +# 'servers' => { +# 'control01' => "portchannel:20", +# 'control02' => "portchannel:10" +# }}} +# + +class neutron::plugins::ml2::cisco::nexus ( + $nexus_config = undef, +) +{ + + if !$nexus_config { + fail('No nexus config specified') + } + + # For Ubuntu: This package is not available upstream + # Please use the source from: + # https://launchpad.net/~cisco-openstack/+archive/python-ncclient + # and install it manually + package { 'python-ncclient': + ensure => installed, + } ~> Service['neutron-server'] + + Neutron_plugin_ml2<||> -> + file { $::neutron::params::cisco_ml2_config_file: + owner => 'root', + group => 'root', + content => template('neutron/ml2_conf_cisco.ini.erb'), + } ~> Service['neutron-server'] + + create_resources(neutron::plugins::ml2::cisco::nexus_creds, $nexus_config) + +} +