memcached (openstack) is no longer in use
[mirror/dsa-puppet.git] / 3rdparty / modules / neutron / manifests / plugins / ml2 / cisco / nexus.pp
1 #
2 # Configure the Mech Driver for cisco neutron plugin
3 # More info available here:
4 # https://wiki.openstack.org/wiki/Neutron/ML2/MechCiscoNexus
5 #
6 # === Parameters
7 #
8 # [*neutron_config*]
9 # Neutron switch configuration for ml2_cisco_conf.ini
10 # Example nexus config format:
11 #  { 'switch_hostname' => {'username' => 'admin',
12 #    'ssh_port' => 22,
13 #    'password' => "password",
14 #    'ip_address' => "172.18.117.28",
15 #    'servers' => {
16 #      'control01' => "portchannel:20",
17 #      'control02' => "portchannel:10"
18 #    }}}
19 #
20
21 class neutron::plugins::ml2::cisco::nexus (
22   $nexus_config = undef,
23 )
24 {
25
26   if !$nexus_config {
27     fail('No nexus config specified')
28   }
29
30   # For Ubuntu: This package is not available upstream
31   # Please use the source from:
32   # https://launchpad.net/~cisco-openstack/+archive/python-ncclient
33   # and install it manually
34   package { 'python-ncclient':
35     ensure => installed,
36   } ~> Service['neutron-server']
37
38   Neutron_plugin_ml2<||> ->
39   file { $::neutron::params::cisco_ml2_config_file:
40     owner   => 'root',
41     group   => 'root',
42     content => template('neutron/ml2_conf_cisco.ini.erb'),
43   } ~> Service['neutron-server']
44
45   create_resources(neutron::plugins::ml2::cisco::nexus_creds, $nexus_config)
46
47 }
48