From 54a15b7685bcf86f97a65f5eae479ba023077948 Mon Sep 17 00:00:00 2001 From: Terry Wilson Date: Tue, 6 Aug 2013 11:03:31 -0500 Subject: [PATCH] Quantum to Neutron rename Change-Id: I756615e8ed821e3ab95e23438a394e5c5b3a095d --- .fixtures.yml | 2 +- Puppetfile | 2 +- README.md | 8 +- manifests/all.pp | 86 ++++++++--------- manifests/client.pp | 10 +- manifests/compute.pp | 60 ++++++------ manifests/controller.pp | 92 +++++++++---------- manifests/db/mysql.pp | 32 +++---- manifests/keystone.pp | 42 ++++----- manifests/{quantum.pp => neutron.pp} | 56 +++++------ manifests/nova/controller.pp | 40 ++++---- manifests/provision.pp | 28 +++--- manifests/test_file.pp | 2 +- spec/classes/openstack_all_spec.rb | 84 ++++++++--------- spec/classes/openstack_client_spec.rb | 8 +- spec/classes/openstack_compute_spec.rb | 50 +++++----- spec/classes/openstack_controller_spec.rb | 44 ++++----- spec/classes/openstack_keystone_spec.rb | 4 +- ...ntum_spec.rb => openstack_neutron_spec.rb} | 28 +++--- .../classes/openstack_nova_controller_spec.rb | 24 ++--- spec/classes/openstack_provision_spec.rb | 6 +- templates/test_nova.sh.erb | 36 ++++---- tests/all.pp | 2 +- tests/cloudcontroller.pp | 2 +- tests/compute.pp | 2 +- tests/site.pp | 6 +- 26 files changed, 378 insertions(+), 378 deletions(-) rename manifests/{quantum.pp => neutron.pp} (85%) rename spec/classes/{openstack_quantum_spec.rb => openstack_neutron_spec.rb} (78%) diff --git a/.fixtures.yml b/.fixtures.yml index 2196943..24716f8 100644 --- a/.fixtures.yml +++ b/.fixtures.yml @@ -6,7 +6,7 @@ fixtures: "glance": "git://github.com/stackforge/puppet-glance.git" 'horizon': 'git://github.com/stackforge/puppet-horizon' 'swift' : 'git://github.com/stackforge/puppet-swift' - 'quantum': 'git://github.com/stackforge/puppet-quantum' + 'neutron': 'git://github.com/stackforge/puppet-quantum' 'ceilometer' : 'git://github.com/stackforge/puppet-ceilometer' "apt": "git://github.com/puppetlabs/puppetlabs-apt.git" "apache": diff --git a/Puppetfile b/Puppetfile index c440dc7..f61df78 100644 --- a/Puppetfile +++ b/Puppetfile @@ -7,7 +7,7 @@ mod 'puppetlabs/horizon', :git => 'git://github.com/stackforge/puppet-horizon' mod 'puppetlabs/swift', :git => 'git://github.com/stackforge/puppet-swift' mod 'puppetlabs/cinder', :git => 'git://github.com/stackforge/puppet-cinder' mod 'puppetlabs/tempest', :git => 'git://github.com/stackforge/puppet-tempest' -mod 'puppet/quantum', :git => 'git://github.com/stackforge/puppet-quantum/' +mod 'stackforge/neutron', :git => 'git://github.com/stackforge/puppet-quantum/' # openstack middleware mod 'puppet/vswitch', :git => 'git://github.com/bodepd/puppet-vswitch' mod 'puppetlabs/rabbitmq', diff --git a/README.md b/README.md index c9c464b..6125014 100644 --- a/README.md +++ b/README.md @@ -153,7 +153,7 @@ class { 'openstack::all': libvirt_type => 'kvm', fixed_range => '10.0.0.0/24', secret_key => '12345', - quantum => false, + neutron => false, } ``` @@ -199,7 +199,7 @@ class { 'openstack::controller': rabbit_password => 'rabbit_password', rabbit_user => 'rabbit_user', secret_key => '12345', - quantum => false, + neutron => false, } ``` @@ -233,7 +233,7 @@ class { 'openstack::compute': vncproxy_host => '192.168.101.10', vnc_enabled => true, manage_volumes => true, - quantum => false, + neutron => false, } ``` @@ -539,7 +539,7 @@ Release Notes **2.0.0** * Upstream is now part of stackfoge. -* Initial support for the utilization of the quantum module. +* Initial support for the utilization of the neutron module. * Ability to set vncproxy host. * Refactors of db connections for compute. * Refactor of glance and cinder related classes. diff --git a/manifests/all.pp b/manifests/all.pp index d0fcf8c..9521fad 100644 --- a/manifests/all.pp +++ b/manifests/all.pp @@ -44,20 +44,20 @@ # [cache_server_ip] local memcached instance ip # [cache_server_port] local memcached instance port # [horizon] (bool) is horizon installed. Defaults to: true -# [quantum] (bool) is quantum installed +# [neutron] (bool) is neutron installed # The next is an array of arrays, that can be used to add call-out links to the dashboard for other apps. # There is no specific requirement for these apps to be for monitoring, that's just the defacto purpose. # Each app is defined in two parts, the display name, and the URI # [metadata_shared_secret] -# Shared secret used by nova and quantum to authenticate metadata. +# Shared secret used by nova and neutron to authenticate metadata. # (optional) Defaults to false. # # [firewall_driver] # Driver used to implement firewall rules. -# (optional) Defaults to 'quantum.agent.linux.iptables_firewall.OVSHybridIptablesFirewallDriver'. +# (optional) Defaults to 'neutron.agent.linux.iptables_firewall.OVSHybridIptablesFirewallDriver'. # -# [quantum_auth_url] -# Url used to quantum to contact the authentication service. +# [neutron_auth_url] +# Url used to neutron to contact the authentication service. # (optional) Default to http://127.0.0.1:35357/v2.0. # # [horizon_app_links] array as in '[ ["Nagios","http://nagios_addr:port/path"],["Ganglia","http://ganglia_addr"] ]' @@ -92,8 +92,8 @@ # admin_password => 'changeme', # rabbit_password => 'changeme', # keystone_admin_token => 'changeme', -# quantum_user_password => 'changeme', -# quantum_db_password => 'changeme', +# neutron_user_password => 'changeme', +# neutron_db_password => 'changeme', # secret_key => 'dummy_secret_key', # bridge_interface => 'eth0', # metadata_shared_secret => 'shared_md_secret', @@ -116,10 +116,10 @@ class openstack::all ( $nova_user_password, $secret_key, $mysql_root_password, - # cinder and quantum password are not required b/c they are + # cinder and neutron password are not required b/c they are # optional. Not sure what to do about this. - $quantum_user_password = false, - $quantum_db_password = false, + $neutron_user_password = false, + $neutron_db_password = false, $cinder_user_password = false, $cinder_db_password = false, # Database @@ -189,8 +189,8 @@ class openstack::all ( $setup_test_volume = false, $volume_group = 'cinder-volumes', $iscsi_ip_address = '127.0.0.1', - # Quantum - $quantum = true, + # Neutron + $neutron = true, $bridge_interface = undef, $external_bridge_name = 'br-ex', $enable_ovs_agent = true, @@ -198,11 +198,11 @@ class openstack::all ( $enable_l3_agent = true, $enable_metadata_agent = true, $metadata_shared_secret = false, - $firewall_driver = 'quantum.agent.linux.iptables_firewall.OVSHybridIptablesFirewallDriver', - $quantum_db_user = 'quantum', - $quantum_db_name = 'quantum', - $quantum_auth_url = 'http://127.0.0.1:35357/v2.0', - $enable_quantum_server = true, + $firewall_driver = 'neutron.agent.linux.iptables_firewall.OVSHybridIptablesFirewallDriver', + $neutron_db_user = 'neutron', + $neutron_db_name = 'neutron', + $neutron_auth_url = 'http://127.0.0.1:35357/v2.0', + $enable_neutron_server = true, $ovs_local_ip = false, # General $verbose = false, @@ -270,10 +270,10 @@ class openstack::all ( cinder_db_user => $cinder_db_user, cinder_db_password => $cinder_db_password, cinder_db_dbname => $cinder_db_dbname, - quantum => $quantum, - quantum_db_user => $quantum_db_user, - quantum_db_password => $quantum_db_password, - quantum_db_dbname => $quantum_db_name, + neutron => $neutron, + neutron_db_user => $neutron_db_user, + neutron_db_password => $neutron_db_password, + neutron_db_dbname => $neutron_db_name, allowed_hosts => $allowed_hosts, enabled => $enabled, } @@ -301,8 +301,8 @@ class openstack::all ( nova_user_password => $nova_user_password, cinder => $cinder, cinder_user_password => $cinder_user_password, - quantum => $quantum, - quantum_user_password => $quantum_user_password, + neutron => $neutron, + neutron_user_password => $neutron_user_password, enabled => $enabled, bind_host => $keystone_bind_address, } @@ -367,9 +367,9 @@ class openstack::all ( multi_host => $multi_host, public_interface => $public_interface, private_interface => $private_interface, - # Quantum - quantum => $quantum, - quantum_user_password => $quantum_user_password, + # Neutron + neutron => $neutron, + neutron_user_password => $neutron_user_password, metadata_shared_secret => $metadata_shared_secret, # Nova nova_admin_tenant_name => $nova_admin_tenant_name, @@ -393,22 +393,22 @@ class openstack::all ( enabled => $enabled, } - ######### Quantum Controller Services ######## - if ($quantum) { + ######### Neutron Controller Services ######## + if ($neutron) { - if ! $quantum_user_password { - fail('quantum_user_password must be set when configuring quantum') + if ! $neutron_user_password { + fail('neutron_user_password must be set when configuring neutron') } - if ! $quantum_db_password { - fail('quantum_db_password must be set when configuring quantum') + if ! $neutron_db_password { + fail('neutron_db_password must be set when configuring neutron') } if ! $bridge_interface { - fail('bridge_interface must be set when configuring quantum') + fail('bridge_interface must be set when configuring neutron') } - class { 'openstack::quantum': + class { 'openstack::neutron': # Database db_host => $db_host, # Rabbit @@ -416,31 +416,31 @@ class openstack::all ( rabbit_user => $rabbit_user, rabbit_password => $rabbit_password, rabbit_virtual_host => $rabbit_virtual_host, - # Quantum OVS + # Neutron OVS ovs_local_ip => $ovs_local_ip_real, bridge_uplinks => ["${external_bridge_name}:${bridge_interface}"], bridge_mappings => ["default:${external_bridge_name}"], enable_ovs_agent => $enable_ovs_agent, firewall_driver => $firewall_driver, # Database - db_name => $quantum_db_name, - db_user => $quantum_db_user, - db_password => $quantum_db_password, - # Quantum agents + db_name => $neutron_db_name, + db_user => $neutron_db_user, + db_password => $neutron_db_password, + # Neutron agents enable_dhcp_agent => $enable_dhcp_agent, enable_l3_agent => $enable_l3_agent, enable_metadata_agent => $enable_metadata_agent, - auth_url => $quantum_auth_url, - user_password => $quantum_user_password, + auth_url => $neutron_auth_url, + user_password => $neutron_user_password, shared_secret => $metadata_shared_secret, # Keystone keystone_host => $keystone_host, # General enabled => $enabled, - enable_server => $enable_quantum_server, + enable_server => $enable_neutron_server, verbose => $verbose, } - class { 'nova::compute::quantum': + class { 'nova::compute::neutron': libvirt_vif_driver => $libvirt_vif_driver, } } else { diff --git a/manifests/client.pp b/manifests/client.pp index 8b4e3c6..bfd63bc 100644 --- a/manifests/client.pp +++ b/manifests/client.pp @@ -18,8 +18,8 @@ # [nova] # (optional) Install the Nova client package # -# [quantum] -# (optional) Install the Quantum client package +# [neutron] +# (optional) Install the Neutron client package # class openstack::client ( @@ -28,7 +28,7 @@ class openstack::client ( $glance = true, $keystone = true, $nova = true, - $quantum = true + $neutron = true ) { if $ceilometer { @@ -51,7 +51,7 @@ class openstack::client ( include nova::client } - if $quantum { - include quantum::client + if $neutron { + include neutron::client } } diff --git a/manifests/compute.pp b/manifests/compute.pp index f7204f6..98c3c11 100644 --- a/manifests/compute.pp +++ b/manifests/compute.pp @@ -7,12 +7,12 @@ # Whether unmanaged nova.conf entries should be purged. # (optional) Defaults to false. # -# [quantum_firewall_driver] -# Driver used to implement Quantum firewalling. +# [neutron_firewall_driver] +# Driver used to implement Neutron firewalling. # (optional) Defaults to false. # # [ovs_enable_tunneling] -# Enable/disable the Quantum OVS GRE tunneling networking mode. +# Enable/disable the Neutron OVS GRE tunneling networking mode. # Optional. Defaults to true. # # [rabbit_hosts] An array of IP addresses or Virttual IP address for connecting to a RabbitMQ Cluster. @@ -47,20 +47,20 @@ class openstack::compute ( $network_config = {}, $multi_host = false, $enabled_apis = 'ec2,osapi_compute,metadata', - # Quantum - $quantum = true, - $quantum_user_password = false, - $quantum_admin_tenant_name = 'services', - $quantum_admin_user = 'quantum', + # Neutron + $neutron = true, + $neutron_user_password = false, + $neutron_admin_tenant_name = 'services', + $neutron_admin_user = 'neutron', $enable_ovs_agent = true, $enable_l3_agent = false, $enable_dhcp_agent = false, - $quantum_auth_url = 'http://127.0.0.1:35357/v2.0', + $neutron_auth_url = 'http://127.0.0.1:35357/v2.0', $keystone_host = '127.0.0.1', - $quantum_host = '127.0.0.1', + $neutron_host = '127.0.0.1', $ovs_enable_tunneling = true, $ovs_local_ip = false, - $quantum_firewall_driver = false, + $neutron_firewall_driver = false, $bridge_mappings = undef, $bridge_uplinks = undef, # Nova @@ -155,7 +155,7 @@ class openstack::compute ( # if the compute node should be configured as a multi-host # compute installation - if ! $quantum { + if ! $neutron { if ! $fixed_range { fail('Must specify the fixed range when using nova-networks') @@ -199,14 +199,14 @@ class openstack::compute ( } } else { - if ! $quantum_user_password { - fail('quantum_user_password must be set when quantum is configured') + if ! $neutron_user_password { + fail('neutron_user_password must be set when neutron is configured') } if ! $keystone_host { - fail('keystone_host must be configured when quantum is installed') + fail('keystone_host must be configured when neutron is installed') } - class { 'openstack::quantum': + class { 'openstack::neutron': # Database db_host => $db_host, # Networking @@ -215,15 +215,15 @@ class openstack::compute ( rabbit_host => $rabbit_host, rabbit_user => $rabbit_user, rabbit_password => $rabbit_password, - # Quantum OVS + # Neutron OVS enable_ovs_agent => $enable_ovs_agent, ovs_enable_tunneling => $ovs_enable_tunneling, - firewall_driver => $quantum_firewall_driver, - # Quantum L3 Agent + firewall_driver => $neutron_firewall_driver, + # Neutron L3 Agent enable_l3_agent => $enable_l3_agent, enable_dhcp_agent => $enable_dhcp_agent, - auth_url => $quantum_auth_url, - user_password => $quantum_user_password, + auth_url => $neutron_auth_url, + user_password => $neutron_user_password, # Keystone keystone_host => $keystone_host, # General @@ -234,18 +234,18 @@ class openstack::compute ( bridge_uplinks => $bridge_uplinks } - class { 'nova::compute::quantum': + class { 'nova::compute::neutron': libvirt_vif_driver => $libvirt_vif_driver, } - # Configures nova.conf entries applicable to Quantum. - class { 'nova::network::quantum': - quantum_admin_password => $quantum_user_password, - quantum_auth_strategy => 'keystone', - quantum_url => "http://${quantum_host}:9696", - quantum_admin_username => $quantum_admin_user, - quantum_admin_tenant_name => $quantum_admin_tenant_name, - quantum_admin_auth_url => "http://${keystone_host}:35357/v2.0", + # Configures nova.conf entries applicable to Neutron. + class { 'nova::network::neutron': + neutron_admin_password => $neutron_user_password, + neutron_auth_strategy => 'keystone', + neutron_url => "http://${neutron_host}:9696", + neutron_admin_username => $neutron_admin_user, + neutron_admin_tenant_name => $neutron_admin_tenant_name, + neutron_admin_auth_url => "http://${keystone_host}:35357/v2.0", } } diff --git a/manifests/controller.pp b/manifests/controller.pp index a2d2e4e..caac303 100644 --- a/manifests/controller.pp +++ b/manifests/controller.pp @@ -59,21 +59,21 @@ # [cache_server_ip] local memcached instance ip # [cache_server_port] local memcached instance port # [horizon] (bool) is horizon installed. Defaults to: true -# [quantum] (bool) is quantum installed +# [neutron] (bool) is neutron installed # The next is an array of arrays, that can be used to add call-out links to the dashboard for other apps. # There is no specific requirement for these apps to be for monitoring, that's just the defacto purpose. # Each app is defined in two parts, the display name, and the URI # # [ovs_enable_tunneling] -# Enable/disable the Quantum OVS GRE tunneling networking mode. +# Enable/disable the Neutron OVS GRE tunneling networking mode. # Optional. Defaults to true. # # [metadata_shared_secret] -# Shared secret used by nova and quantum to authenticate metadata. +# Shared secret used by nova and neutron to authenticate metadata. # (optional) Defaults to false. # # [physical_network] -# Unique name of the physical network used by the Quantum OVS Agent. +# Unique name of the physical network used by the Neutron OVS Agent. # All physical networks listed are available for flat and VLAN # provider network creation. # @@ -90,10 +90,10 @@ # # [firewall_driver] # Driver used to implement firewall rules. -# (optional) Defaults to 'quantum.agent.linux.iptables_firewall.OVSHybridIptablesFirewallDriver'. +# (optional) Defaults to 'neutron.agent.linux.iptables_firewall.OVSHybridIptablesFirewallDriver'. # -# [quantum_auth_url] -# Url used to quantum to contact the authentication service. +# [neutron_auth_url] +# Url used to neutron to contact the authentication service. # (optional) Default to http://127.0.0.1:35357/v2.0. # # [horizon_app_links] array as in '[ ["Nagios","http://nagios_addr:port/path"],["Ganglia","http://ganglia_addr"] ]' @@ -143,11 +143,11 @@ class openstack::controller ( $nova_user_password, $secret_key, $mysql_root_password, - # cinder and quantum password are not required b/c they are + # cinder and neutron password are not required b/c they are # optional. Not sure what to do about this. - $quantum_user_password = false, - $quantum_db_password = false, - $quantum_core_plugin = undef, + $neutron_user_password = false, + $neutron_db_password = false, + $neutron_core_plugin = undef, $cinder_user_password = false, $cinder_db_password = false, $swift_user_password = false, @@ -219,8 +219,8 @@ class openstack::controller ( $cinder_db_user = 'cinder', $cinder_db_dbname = 'cinder', $cinder_bind_address = '0.0.0.0', - # Quantum - $quantum = true, + # Neutron + $neutron = true, $physical_network = 'default', $tenant_network_type = 'gre', $ovs_enable_tunneling = true, @@ -235,11 +235,11 @@ class openstack::controller ( $enable_l3_agent = true, $enable_metadata_agent = true, $metadata_shared_secret = false, - $firewall_driver = 'quantum.agent.linux.iptables_firewall.OVSHybridIptablesFirewallDriver', - $quantum_db_user = 'quantum', - $quantum_db_name = 'quantum', - $quantum_auth_url = 'http://127.0.0.1:35357/v2.0', - $enable_quantum_server = true, + $firewall_driver = 'neutron.agent.linux.iptables_firewall.OVSHybridIptablesFirewallDriver', + $neutron_db_user = 'neutron', + $neutron_db_name = 'neutron', + $neutron_auth_url = 'http://127.0.0.1:35357/v2.0', + $enable_neutron_server = true, # swift $swift = false, $swift_public_address = false, @@ -296,10 +296,10 @@ class openstack::controller ( cinder_db_user => $cinder_db_user, cinder_db_password => $cinder_db_password, cinder_db_dbname => $cinder_db_dbname, - quantum => $quantum, - quantum_db_user => $quantum_db_user, - quantum_db_password => $quantum_db_password, - quantum_db_dbname => $quantum_db_name, + neutron => $neutron, + neutron_db_user => $neutron_db_user, + neutron_db_password => $neutron_db_password, + neutron_db_dbname => $neutron_db_name, allowed_hosts => $allowed_hosts, enabled => $enabled, } @@ -336,10 +336,10 @@ class openstack::controller ( cinder_user_password => $cinder_user_password, cinder_internal_address => $internal_address_real, cinder_admin_address => $admin_address_real, - quantum => $quantum, - quantum_user_password => $quantum_user_password, - quantum_internal_address => $internal_address_real, - quantum_admin_address => $admin_address_real, + neutron => $neutron, + neutron_user_password => $neutron_user_password, + neutron_internal_address => $internal_address_real, + neutron_admin_address => $admin_address_real, swift => $swift, swift_user_password => $swift_user_password, swift_public_address => $swift_public_address, @@ -398,9 +398,9 @@ class openstack::controller ( multi_host => $multi_host, public_interface => $public_interface, private_interface => $private_interface, - # Quantum - quantum => $quantum, - quantum_user_password => $quantum_user_password, + # Neutron + neutron => $neutron, + neutron_user_password => $neutron_user_password, metadata_shared_secret => $metadata_shared_secret, # Nova nova_admin_tenant_name => $nova_admin_tenant_name, @@ -428,19 +428,19 @@ class openstack::controller ( enabled => $enabled, } - ######### Quantum Controller Services ######## - if ($quantum) { + ######### Neutron Controller Services ######## + if ($neutron) { - if ! $quantum_user_password { - fail('quantum_user_password must be set when configuring quantum') + if ! $neutron_user_password { + fail('neutron_user_password must be set when configuring neutron') } - if ! $quantum_db_password { - fail('quantum_db_password must be set when configuring quantum') + if ! $neutron_db_password { + fail('neutron_db_password must be set when configuring neutron') } if ! $bridge_interface { - fail('bridge_interface must be set when configuring quantum') + fail('bridge_interface must be set when configuring neutron') } if ! $bridge_uplinks { @@ -455,7 +455,7 @@ class openstack::controller ( $bridge_mappings_real = $bridge_mappings } - class { 'openstack::quantum': + class { 'openstack::neutron': # Database db_host => $db_host, sql_idle_timeout => $sql_idle_timeout, @@ -465,7 +465,7 @@ class openstack::controller ( rabbit_password => $rabbit_password, rabbit_hosts => $rabbit_hosts, rabbit_virtual_host => $rabbit_virtual_host, - # Quantum OVS + # Neutron OVS tenant_network_type => $tenant_network_type, network_vlan_ranges => $network_vlan_ranges, ovs_enable_tunneling => $ovs_enable_tunneling, @@ -475,23 +475,23 @@ class openstack::controller ( enable_ovs_agent => $enable_ovs_agent, firewall_driver => $firewall_driver, # Database - db_name => $quantum_db_name, - db_user => $quantum_db_user, - db_password => $quantum_db_password, + db_name => $neutron_db_name, + db_user => $neutron_db_user, + db_password => $neutron_db_password, # Plugin - core_plugin => $quantum_core_plugin, - # Quantum agents + core_plugin => $neutron_core_plugin, + # Neutron agents enable_dhcp_agent => $enable_dhcp_agent, enable_l3_agent => $enable_l3_agent, enable_metadata_agent => $enable_metadata_agent, - auth_url => $quantum_auth_url, - user_password => $quantum_user_password, + auth_url => $neutron_auth_url, + user_password => $neutron_user_password, shared_secret => $metadata_shared_secret, # Keystone keystone_host => $keystone_host, # General enabled => $enabled, - enable_server => $enable_quantum_server, + enable_server => $enable_neutron_server, debug => $debug, verbose => $verbose, } diff --git a/manifests/db/mysql.pp b/manifests/db/mysql.pp index 18ff8ce..99c7b43 100644 --- a/manifests/db/mysql.pp +++ b/manifests/db/mysql.pp @@ -11,7 +11,7 @@ # [glance_db_password] Password for glance database. Required. # [nova_db_password] Password for nova database. Required. # [cinder_db_password] Password for cinder database. Required. -# [quantum_db_password] Password for quantum database. Required. +# [neutron_db_password] Password for neutron database. Required. # [mysql_bind_address] Address that mysql will bind to. Optional .Defaults to '0.0.0.0'. # [mysql_account_security] If a secure mysql db should be setup. Optional .Defaults to true. # [keystone_db_user] DB user for keystone. Optional. Defaults to 'keystone'. @@ -23,9 +23,9 @@ # [cinder]. Whether create cinder db. Optional. Defaults to 'true'. # [cinder_db_user]. Name of cinder DB user. Optional. Defaults to 'cinder'. # [cinder_db_dbname]. Name of cinder DB. Optional. Defaults to 'cinder'. -# [quantum]. Whether create quantum db. Optional. Defaults to 'true'. -# [quantum_db_user]. Name of quantum DB user. Optional. Defaults to 'quantum'. -# [quantum_db_dbname]. Name of quantum DB. Optional. Defaults to 'quantum'. +# [neutron]. Whether create neutron db. Optional. Defaults to 'true'. +# [neutron_db_user]. Name of neutron DB user. Optional. Defaults to 'neutron'. +# [neutron_db_dbname]. Name of neutron DB. Optional. Defaults to 'neutron'. # [allowed_hosts] List of hosts that are allowed access. Optional. Defaults to false. # [enabled] If the db service should be started. Optional. Defaults to true. # @@ -37,7 +37,7 @@ # glance_db_password => 'changeme', # nova_db_password => 'changeme', # cinder_db_password => 'changeme', -# quantum_db_password => 'changeme', +# neutron_db_password => 'changeme', # allowed_hosts => ['127.0.0.1', '10.0.0.%'], # } class openstack::db::mysql ( @@ -48,7 +48,7 @@ class openstack::db::mysql ( $glance_db_password, $nova_db_password, $cinder_db_password, - $quantum_db_password, + $neutron_db_password, # MySQL $mysql_bind_address = '0.0.0.0', $mysql_account_security = true, @@ -65,10 +65,10 @@ class openstack::db::mysql ( $cinder = true, $cinder_db_user = 'cinder', $cinder_db_dbname = 'cinder', - # quantum - $quantum = true, - $quantum_db_user = 'quantum', - $quantum_db_dbname = 'quantum', + # neutron + $neutron = true, + $neutron_db_user = 'neutron', + $neutron_db_dbname = 'neutron', $allowed_hosts = false, $enabled = true ) { @@ -122,12 +122,12 @@ class openstack::db::mysql ( } } - # create quantum db - if ($quantum) { - class { 'quantum::db::mysql': - user => $quantum_db_user, - password => $quantum_db_password, - dbname => $quantum_db_dbname, + # create neutron db + if ($neutron) { + class { 'neutron::db::mysql': + user => $neutron_db_user, + password => $neutron_db_password, + dbname => $neutron_db_dbname, allowed_hosts => $allowed_hosts, } } diff --git a/manifests/keystone.pp b/manifests/keystone.pp index a49ff51..b3f6dbe 100644 --- a/manifests/keystone.pp +++ b/manifests/keystone.pp @@ -44,7 +44,7 @@ # glance_user_password => 'glance', # nova_user_password => 'nova', # cinder_user_password => 'cinder', -# quantum_user_password => 'quantum', +# neutron_user_password => 'neutron', # public_address => '192.168.1.1', # } @@ -56,7 +56,7 @@ class openstack::keystone ( $glance_user_password, $nova_user_password, $cinder_user_password, - $quantum_user_password, + $neutron_user_password, $public_address, $public_protocol = 'http', $db_host = '127.0.0.1', @@ -81,16 +81,16 @@ class openstack::keystone ( $cinder_public_address = false, $cinder_internal_address = false, $cinder_admin_address = false, - $quantum_public_address = false, - $quantum_internal_address = false, - $quantum_admin_address = false, + $neutron_public_address = false, + $neutron_internal_address = false, + $neutron_admin_address = false, $swift_public_address = false, $swift_internal_address = false, $swift_admin_address = false, $glance = true, $nova = true, $cinder = true, - $quantum = true, + $neutron = true, $swift = false, $enabled = true ) { @@ -159,20 +159,20 @@ class openstack::keystone ( } else { $cinder_admin_real = $cinder_internal_real } - if($quantum_public_address) { - $quantum_public_real = $quantum_public_address + if($neutron_public_address) { + $neutron_public_real = $neutron_public_address } else { - $quantum_public_real = $public_address + $neutron_public_real = $public_address } - if($quantum_internal_address) { - $quantum_internal_real = $quantum_internal_address + if($neutron_internal_address) { + $neutron_internal_real = $neutron_internal_address } else { - $quantum_internal_real = $quantum_public_real + $neutron_internal_real = $neutron_public_real } - if($quantum_admin_address) { - $quantum_admin_real = $quantum_admin_address + if($neutron_admin_address) { + $neutron_admin_real = $neutron_admin_address } else { - $quantum_admin_real = $quantum_internal_real + $neutron_admin_real = $neutron_internal_real } if($swift_public_address) { $swift_public_real = $swift_public_address @@ -255,13 +255,13 @@ class openstack::keystone ( region => $region, } } - if $quantum { - class { 'quantum::keystone::auth': - password => $quantum_user_password, - public_address => $quantum_public_real, + if $neutron { + class { 'neutron::keystone::auth': + password => $neutron_user_password, + public_address => $neutron_public_real, public_protocol => $public_protocol, - admin_address => $quantum_admin_real, - internal_address => $quantum_internal_real, + admin_address => $neutron_admin_real, + internal_address => $neutron_internal_real, region => $region, } } diff --git a/manifests/quantum.pp b/manifests/neutron.pp similarity index 85% rename from manifests/quantum.pp rename to manifests/neutron.pp index fcb6336..566565d 100644 --- a/manifests/quantum.pp +++ b/manifests/neutron.pp @@ -1,8 +1,8 @@ # -# == Class: openstack::quantum +# == Class: openstack::neutron # -# Class to define quantum components for openstack. This class can -# be configured to provide all quantum related functionality. +# Class to define neutron components for openstack. This class can +# be configured to provide all neutron related functionality. # # === Parameters # @@ -15,7 +15,7 @@ # (required) # # [enabled] -# state of the quantum services. +# state of the neutron services. # (optional) Defaults to true. # # [enable_server] @@ -59,7 +59,7 @@ # (optional) Defaults to '127.0.0.1'. # # [db_password] -# Password used to connect to quantum database. +# Password used to connect to neutron database. # (required) # # [db_type] @@ -110,15 +110,15 @@ # (optional) Defaults to 127.0.0.1. # # [db_name] -# Name of quantum database. -# (optional) Defaults to quantum. +# Name of neutron database. +# (optional) Defaults to neutron. # # [db_user] -# User to connect to quantum database as. -# (optional) Defaults to quantum. +# User to connect to neutron database as. +# (optional) Defaults to neutron. # # [bind_address] -# Address quantum api server should bind to. +# Address neutron api server should bind to. # (optional) Defaults to 0.0.0.0. # # [sql_idle_timeout] @@ -130,19 +130,19 @@ # (optional) Defaults to 127.0.0.1. # # [verbose] -# Enables verbose for quantum services. +# Enables verbose for neutron services. # (optional) Defaults to false. # # [debug] -# Enables debug for quantum services. +# Enables debug for neutron services. # (optional) Defaults to false. # # === Examples # -# class { 'openstack::quantum': -# db_password => 'quantum_db_pass', +# class { 'openstack::neutron': +# db_password => 'neutron_db_pass', # user_password => 'keystone_user_pass', -# rabbit_password => 'quantum_rabbit_pass', +# rabbit_password => 'neutron_rabbit_pass', # bridge_uplinks => '[br-ex:eth0]', # bridge_mappings => '[default:br-ex], # enable_ovs_agent => true, @@ -150,11 +150,11 @@ # } # -class openstack::quantum ( +class openstack::neutron ( # Passwords $user_password, $rabbit_password, - # enable or disable quantum + # enable or disable neutron $enabled = true, $enable_server = true, # Set DHCP/L3 Agents on Primary Controller @@ -175,7 +175,7 @@ class openstack::quantum ( # Metadata configuration $shared_secret = false, $metadata_ip = '127.0.0.1', - # Quantum Authentication Information + # Neutron Authentication Information $auth_url = 'http://localhost:35357/v2.0', # Rabbit Information $rabbit_user = 'rabbit_user', @@ -186,8 +186,8 @@ class openstack::quantum ( $db_type = 'mysql', $db_password = false, $db_host = '127.0.0.1', - $db_name = 'quantum', - $db_user = 'quantum', + $db_name = 'neutron', + $db_user = 'neutron', $sql_idle_timeout = '3600', # Plugin $core_plugin = undef, @@ -198,7 +198,7 @@ class openstack::quantum ( $debug = false, ) { - class { '::quantum': + class { '::neutron': enabled => $enabled, core_plugin => $core_plugin, bind_host => $bind_address, @@ -213,18 +213,18 @@ class openstack::quantum ( if $enable_server { if ! $db_password { - fail('db password must be set when configuring a quantum server') + fail('db password must be set when configuring a neutron server') } if ($db_type == 'mysql') { $sql_connection = "mysql://${db_user}:${db_password}@${db_host}/${db_name}?charset=utf8" } else { fail("Unsupported db type: ${db_type}. Only mysql is currently supported.") } - class { 'quantum::server': + class { 'neutron::server': auth_host => $keystone_host, auth_password => $user_password, } - class { 'quantum::plugins::ovs': + class { 'neutron::plugins::ovs': sql_connection => $sql_connection, sql_idle_timeout => $sql_idle_timeout, tenant_network_type => $tenant_network_type, @@ -233,7 +233,7 @@ class openstack::quantum ( } if $enable_ovs_agent { - class { 'quantum::agents::ovs': + class { 'neutron::agents::ovs': bridge_uplinks => $bridge_uplinks, bridge_mappings => $bridge_mappings, enable_tunneling => $ovs_enable_tunneling, @@ -243,13 +243,13 @@ class openstack::quantum ( } if $enable_dhcp_agent { - class { 'quantum::agents::dhcp': + class { 'neutron::agents::dhcp': use_namespaces => true, debug => $debug, } } if $enable_l3_agent { - class { 'quantum::agents::l3': + class { 'neutron::agents::l3': use_namespaces => true, debug => $debug, } @@ -259,7 +259,7 @@ class openstack::quantum ( if ! $shared_secret { fail('metadata_shared_secret parameter must be set when using metadata agent') } - class { 'quantum::agents::metadata': + class { 'neutron::agents::metadata': auth_password => $user_password, shared_secret => $shared_secret, auth_url => $auth_url, diff --git a/manifests/nova/controller.pp b/manifests/nova/controller.pp index 27918fe..daf4cb6 100644 --- a/manifests/nova/controller.pp +++ b/manifests/nova/controller.pp @@ -21,15 +21,15 @@ # [rabbit_cluster_nodes] An array of Rabbit Broker IP addresses within the Cluster. # Optional. Defaults to false. # -# [quantum] -# Specifies if nova should be configured to use quantum. +# [neutron] +# Specifies if nova should be configured to use neutron. # (optional) Defaults to false (indicating nova-networks should be used) # -# [quantum_user_password] -# password that nova uses to authenticate with quantum. +# [neutron_user_password] +# password that nova uses to authenticate with neutron. # # [metadata_shared_secret] Secret used to authenticate between nova and the -# quantum metadata services. +# neutron metadata services. # (Optional). Defaults to undef. # # [sql_idle_timeout] @@ -70,9 +70,9 @@ class openstack::nova::controller ( $multi_host = false, $public_interface = undef, $private_interface = undef, - # quantum - $quantum = true, - $quantum_user_password = false, + # neutron + $neutron = true, + $neutron_user_password = false, $metadata_shared_secret = undef, # Nova $nova_admin_tenant_name = 'services', @@ -161,7 +161,7 @@ class openstack::nova::controller ( enabled_apis => $enabled_apis, api_bind_address => $api_bind_address, auth_host => $keystone_host, - quantum_metadata_proxy_shared_secret => $metadata_shared_secret, + neutron_metadata_proxy_shared_secret => $metadata_shared_secret, } @@ -171,7 +171,7 @@ class openstack::nova::controller ( $really_create_networks = false } - if $quantum == false { + if $neutron == false { # Configure nova-network if $multi_host { nova_config { 'DEFAULT/multi_host': value => true } @@ -204,19 +204,19 @@ class openstack::nova::controller ( install_service => $enable_network_service, } } else { - # Configure Nova for Quantum networking + # Configure Nova for Neutron networking - if ! $quantum_user_password { - fail('quantum_user_password must be specified when quantum is configured') + if ! $neutron_user_password { + fail('neutron_user_password must be specified when neutron is configured') } - class { 'nova::network::quantum': - quantum_admin_password => $quantum_user_password, - quantum_auth_strategy => 'keystone', - quantum_url => "http://${keystone_host}:9696", - quantum_admin_tenant_name => 'services', - quantum_admin_username => 'quantum', - quantum_admin_auth_url => "http://${keystone_host}:35357/v2.0", + class { 'nova::network::neutron': + neutron_admin_password => $neutron_user_password, + neutron_auth_strategy => 'keystone', + neutron_url => "http://${keystone_host}:9696", + neutron_admin_tenant_name => 'services', + neutron_admin_username => 'neutron', + neutron_admin_auth_url => "http://${keystone_host}:35357/v2.0", } } diff --git a/manifests/provision.pp b/manifests/provision.pp index 3dd6c3c..cf3da89 100644 --- a/manifests/provision.pp +++ b/manifests/provision.pp @@ -2,14 +2,14 @@ # # This class provides basic provisioning of a bare openstack # deployment. A non-admin user is created, an image is uploaded, and -# quantum networking is configured. Once complete, it should be +# neutron networking is configured. Once complete, it should be # possible for the non-admin user to create a boot a VM that can be # logged into via vnc (ssh may require extra configuration). # # This module is currently limited to targetting an all-in-one # deployment for the following reasons: # -# - puppet-{keystone,glance,quantum} rely on their configuration files being +# - puppet-{keystone,glance,neutron} rely on their configuration files being # available on localhost which is not guaranteed for multi-host. # # - the gateway configuration only supports a host that uses the same @@ -52,7 +52,7 @@ class openstack::provision( $image_source = 'http://download.cirros-cloud.net/0.3.1/cirros-0.3.1-x86_64-disk.img', $image_ssh_user = 'cirros', - ## Quantum + ## Neutron $tenant_name = 'demo', $public_network_name = 'public', $public_subnet_name = 'public_subnet', @@ -113,43 +113,43 @@ class openstack::provision( ## Networks - quantum_network { $public_network_name: + neutron_network { $public_network_name: ensure => present, router_external => true, tenant_name => $admin_tenant_name, } - quantum_subnet { $public_subnet_name: + neutron_subnet { $public_subnet_name: ensure => 'present', cidr => $floating_range, enable_dhcp => false, network_name => $public_network_name, tenant_name => $admin_tenant_name, } - quantum_network { $private_network_name: + neutron_network { $private_network_name: ensure => present, tenant_name => $tenant_name, } - quantum_subnet { $private_subnet_name: + neutron_subnet { $private_subnet_name: ensure => present, cidr => $fixed_range, network_name => $private_network_name, tenant_name => $tenant_name, } # Tenant-owned router - assumes network namespace isolation - quantum_router { $router_name: + neutron_router { $router_name: ensure => present, tenant_name => $tenant_name, gateway_network_name => $public_network_name, - # A quantum_router resource must explicitly declare a dependency on + # A neutron_router resource must explicitly declare a dependency on # the first subnet of the gateway network. - require => Quantum_subnet[$public_subnet_name], + require => Neutron_subnet[$public_subnet_name], } - quantum_router_interface { "${router_name}:${private_subnet_name}": + neutron_router_interface { "${router_name}:${private_subnet_name}": ensure => present, } if $setup_ovs_bridge { - quantum_l3_ovs_bridge { $public_bridge_name: + neutron_l3_ovs_bridge { $public_bridge_name: ensure => present, subnet_name => $public_subnet_name, } @@ -178,7 +178,7 @@ class openstack::provision( admin_username => $admin_username, admin_password => $admin_password, admin_tenant_name => $admin_tenant_name, - quantum_available => true, + neutron_available => true, public_network_name => $public_network_name, resize_available => $resize_available, change_password_available => $change_password_available, @@ -186,7 +186,7 @@ class openstack::provision( Keystone_user[$username], Keystone_user[$alt_username], Glance_image[$image_name], - Quantum_network[$public_network_name], + Neutron_network[$public_network_name], ], } } diff --git a/manifests/test_file.pp b/manifests/test_file.pp index e9f3e62..7ec1fa8 100644 --- a/manifests/test_file.pp +++ b/manifests/test_file.pp @@ -19,7 +19,7 @@ class openstack::test_file( $image_type = 'cirros', $sleep_time = '15', $floating_ip = false, - $quantum = true + $neutron = true ) { file { $path: diff --git a/spec/classes/openstack_all_spec.rb b/spec/classes/openstack_all_spec.rb index f692784..122c222 100644 --- a/spec/classes/openstack_all_spec.rb +++ b/spec/classes/openstack_all_spec.rb @@ -33,51 +33,51 @@ describe 'openstack::all' do } end - context 'quantum enabled (which is the default)' do + context 'neutron enabled (which is the default)' do before do params.merge!(:cinder => false) end - it 'raises an error if no quantum_user_password is set' do - expect { subject }.to raise_error(Puppet::Error, /quantum_user_password must be specified when quantum is configured/) + it 'raises an error if no neutron_user_password is set' do + expect { subject }.to raise_error(Puppet::Error, /neutron_user_password must be specified when neutron is configured/) end - context 'with quantum_user_password set' do + context 'with neutron_user_password set' do before do - params.merge!(:quantum_user_password => 'quantum_user_password') + params.merge!(:neutron_user_password => 'neutron_user_password') end - it 'raises an error if no quantum_db_password is set' do - expect { subject }.to raise_error(Puppet::Error, /quantum_db_password must be set when configuring quantum/) + it 'raises an error if no neutron_db_password is set' do + expect { subject }.to raise_error(Puppet::Error, /neutron_db_password must be set when configuring neutron/) end end - context 'with quantum_user_password and quantum_db_password set' do + context 'with neutron_user_password and neutron_db_password set' do before do params.merge!( - :quantum_user_password => 'quantum_user_password', - :quantum_db_password => 'quantum_db_password' + :neutron_user_password => 'neutron_user_password', + :neutron_db_password => 'neutron_db_password' ) end it 'raises an error if no bridge_interface is set' do - expect { subject }.to raise_error(Puppet::Error, /bridge_interface must be set when configuring quantum/) + expect { subject }.to raise_error(Puppet::Error, /bridge_interface must be set when configuring neutron/) end end - context 'with quantum_user_password, quantum_db_password, and bridge_interface set' do + context 'with neutron_user_password, neutron_db_password, and bridge_interface set' do before do params.merge!( - :quantum_user_password => 'quantum_user_password', - :quantum_db_password => 'quantum_db_password', + :neutron_user_password => 'neutron_user_password', + :neutron_db_password => 'neutron_db_password', :bridge_interface => 'eth0' ) end end - context 'with quantum_user_password, quantum_db_password, bridge_interface, and ovs_local_ip set' do + context 'with neutron_user_password, neutron_db_password, bridge_interface, and ovs_local_ip set' do before do params.merge!( - :quantum_user_password => 'quantum_user_password', - :quantum_db_password => 'quantum_db_password', + :neutron_user_password => 'neutron_user_password', + :neutron_db_password => 'neutron_db_password', :bridge_interface => 'eth0', :ovs_local_ip => '10.0.1.1' ) @@ -87,18 +87,18 @@ describe 'openstack::all' do end end - context 'with quantum_user_password, quantum_db_password, bridge_interface, ovs_local_ip, and shared_secret set' do + context 'with neutron_user_password, neutron_db_password, bridge_interface, ovs_local_ip, and shared_secret set' do before do params.merge!( - :quantum_user_password => 'quantum_user_password', - :quantum_db_password => 'quantum_db_password', + :neutron_user_password => 'neutron_user_password', + :neutron_db_password => 'neutron_db_password', :bridge_interface => 'eth0', :ovs_local_ip => '10.0.1.1', :metadata_shared_secret => 'shared_md_secret' ) end - it 'contains an openstack::quantum class' do - should contain_class('openstack::quantum').with( + it 'contains an openstack::neutron class' do + should contain_class('openstack::neutron').with( :db_host => '127.0.0.1', :rabbit_host => '127.0.0.1', :rabbit_user => 'openstack', @@ -108,15 +108,15 @@ describe 'openstack::all' do :bridge_uplinks => 'br-ex:eth0', :bridge_mappings => 'default:br-ex', :enable_ovs_agent => true, - :firewall_driver => 'quantum.agent.linux.iptables_firewall.OVSHybridIptablesFirewallDriver', - :db_name => 'quantum', - :db_user => 'quantum', - :db_password => 'quantum_db_password', + :firewall_driver => 'neutron.agent.linux.iptables_firewall.OVSHybridIptablesFirewallDriver', + :db_name => 'neutron', + :db_user => 'neutron', + :db_password => 'neutron_db_password', :enable_dhcp_agent => true, :enable_l3_agent => true, :enable_metadata_agent => true, :auth_url => 'http://127.0.0.1:35357/v2.0', - :user_password => 'quantum_user_password', + :user_password => 'neutron_user_password', :shared_secret => 'shared_md_secret', :keystone_host => '127.0.0.1', :enabled => true, @@ -130,8 +130,8 @@ describe 'openstack::all' do context 'cinder enabled (which is the default)' do before do params.merge!( - :quantum_user_password => 'quantum_user_password', - :quantum_db_password => 'quantum_db_password', + :neutron_user_password => 'neutron_user_password', + :neutron_db_password => 'neutron_db_password', :bridge_interface => 'eth0', :ovs_local_ip => '10.0.1.1', :metadata_shared_secret => 'shared_md_secret' @@ -180,11 +180,11 @@ describe 'openstack::all' do end end - context 'cinder and quantum enabled (which is the default)' do + context 'cinder and neutron enabled (which is the default)' do before do params.merge!( - :quantum_user_password => 'quantum_user_password', - :quantum_db_password => 'quantum_db_password', + :neutron_user_password => 'neutron_user_password', + :neutron_db_password => 'neutron_db_password', :bridge_interface => 'eth0', :ovs_local_ip => '10.0.1.1', :metadata_shared_secret => 'shared_md_secret', @@ -211,10 +211,10 @@ describe 'openstack::all' do :cinder_db_user => 'cinder', :cinder_db_password => 'cinder_db_password', :cinder_db_dbname => 'cinder', - :quantum => true, - :quantum_db_user => 'quantum', - :quantum_db_password => 'quantum_db_password', - :quantum_db_dbname => 'quantum', + :neutron => true, + :neutron_db_user => 'neutron', + :neutron_db_password => 'neutron_db_password', + :neutron_db_dbname => 'neutron', :allowed_hosts => '%', :enabled => true ) @@ -240,8 +240,8 @@ describe 'openstack::all' do :nova_user_password => 'nova_pass', :cinder => true, :cinder_user_password => 'cinder_user_password', - :quantum => true, - :quantum_user_password => 'quantum_user_password', + :neutron => true, + :neutron_user_password => 'neutron_user_password', :enabled => true, :bind_host => '0.0.0.0' ) @@ -295,8 +295,8 @@ describe 'openstack::all' do :multi_host => false, :public_interface => 'eth0', :private_interface => false, - :quantum => true, - :quantum_user_password => 'quantum_user_password', + :neutron => true, + :neutron_user_password => 'neutron_user_password', :metadata_shared_secret => 'shared_md_secret', :nova_admin_tenant_name => 'services', :nova_admin_user => 'nova', @@ -326,11 +326,11 @@ describe 'openstack::all' do end end - context 'without quantum' do + context 'without neutron' do before do params.merge!( :cinder => false, - :quantum => false, + :neutron => false, :private_interface => 'eth1') end diff --git a/spec/classes/openstack_client_spec.rb b/spec/classes/openstack_client_spec.rb index f4374ff..98fcd62 100644 --- a/spec/classes/openstack_client_spec.rb +++ b/spec/classes/openstack_client_spec.rb @@ -12,7 +12,7 @@ describe 'openstack::client' do it { should include_class('glance::client') } it { should include_class('keystone::client') } it { should include_class('nova::client') } - it { should include_class('quantum::client') } + it { should include_class('neutron::client') } end describe 'without ceilometer' do @@ -40,8 +40,8 @@ describe 'openstack::client' do it { should_not include_class('nova::client') } end - describe 'without quantum' do - let (:params) { {:quantum => false }} - it { should_not include_class('quantum::client') } + describe 'without neutron' do + let (:params) { {:neutron => false }} + it { should_not include_class('neutron::client') } end end diff --git a/spec/classes/openstack_compute_spec.rb b/spec/classes/openstack_compute_spec.rb index 7eb34a2..f6a0a56 100644 --- a/spec/classes/openstack_compute_spec.rb +++ b/spec/classes/openstack_compute_spec.rb @@ -16,7 +16,7 @@ describe 'openstack::compute' do :enabled_apis => 'ec2,osapi_compute,metadata', :nova_db_password => 'pass', :cinder_db_password => 'cinder_pass', - :quantum => false, + :neutron => false, :fixed_range => '10.0.0.0/16' } end @@ -180,14 +180,14 @@ describe 'openstack::compute' do end end - describe 'when quantum is false' do + describe 'when neutron is false' do describe 'configuring for multi host' do before do params.merge!( :multi_host => true, :public_interface => 'eth0', - :quantum => false + :neutron => false ) end @@ -199,7 +199,7 @@ describe 'openstack::compute' do 'enabled' => true, 'install_service' => true }) - should_not contain_class('openstack::quantum') + should_not contain_class('openstack::neutron') end describe 'with defaults' do @@ -270,22 +270,22 @@ describe 'openstack::compute' do } end - describe 'when configuring quantum' do + describe 'when configuring neutron' do before do params.merge!( :internal_address => '127.0.0.1', :public_interface => 'eth3', - :quantum => true, + :neutron => true, :keystone_host => '127.0.0.3', - :quantum_host => '127.0.0.2', + :neutron_host => '127.0.0.2', :ovs_enable_tunneling => true, - :quantum_user_password => 'quantum_user_password', - :quantum_firewall_driver => false + :neutron_user_password => 'neutron_user_password', + :neutron_firewall_driver => false ) end - it 'should configure quantum' do - should contain_class('openstack::quantum').with( + it 'should configure neutron' do + should contain_class('openstack::neutron').with( :db_host => '127.0.0.1', :ovs_local_ip => params[:internal_address], :rabbit_host => params[:rabbit_host], @@ -294,34 +294,34 @@ describe 'openstack::compute' do :rabbit_password => params[:rabbit_password], :enable_ovs_agent => true, :ovs_enable_tunneling => params[:ovs_enable_tunneling], - :firewall_driver => params[:quantum_firewall_driver], + :firewall_driver => params[:neutron_firewall_driver], :enable_l3_agent => false, :enable_dhcp_agent => false, :auth_url => 'http://127.0.0.1:35357/v2.0', - :user_password => params[:quantum_user_password], + :user_password => params[:neutron_user_password], :keystone_host => params[:keystone_host], :enabled => true, :enable_server => false, :verbose => false ) - should contain_class('nova::compute::quantum').with( + should contain_class('nova::compute::neutron').with( :libvirt_vif_driver => 'nova.virt.libvirt.vif.LibvirtGenericVIFDriver' ) - should contain_class('nova::network::quantum').with( - :quantum_admin_password => 'quantum_user_password', - :quantum_auth_strategy => 'keystone', - :quantum_url => "http://127.0.0.2:9696", - :quantum_admin_tenant_name => 'services', - :quantum_admin_username => 'quantum', - :quantum_admin_auth_url => "http://127.0.0.3:35357/v2.0" + should contain_class('nova::network::neutron').with( + :neutron_admin_password => 'neutron_user_password', + :neutron_auth_strategy => 'keystone', + :neutron_url => "http://127.0.0.2:9696", + :neutron_admin_tenant_name => 'services', + :neutron_admin_username => 'neutron', + :neutron_admin_auth_url => "http://127.0.0.3:35357/v2.0" ) - should_not contain_class('quantum::server') - should_not contain_class('quantum::plugins::ovs') - should_not contain_class('quantum::agents::dhcp') - should_not contain_class('quantum::agents::l3') + should_not contain_class('neutron::server') + should_not contain_class('neutron::plugins::ovs') + should_not contain_class('neutron::agents::dhcp') + should_not contain_class('neutron::agents::l3') end end diff --git a/spec/classes/openstack_controller_spec.rb b/spec/classes/openstack_controller_spec.rb index 113fc2d..9974afe 100644 --- a/spec/classes/openstack_controller_spec.rb +++ b/spec/classes/openstack_controller_spec.rb @@ -26,7 +26,7 @@ describe 'openstack::controller' do :cinder_user_password => 'cinder_pass', :secret_key => 'secret_key', :mysql_root_password => 'sql_pass', - :quantum => false, + :neutron => false, :vncproxy_host => '10.0.0.1', :nova_admin_tenant_name => 'services', :nova_admin_user => 'nova', @@ -71,11 +71,11 @@ describe 'openstack::controller' do default_params.merge( :enabled => true, :db_type => 'mysql', - :quantum => true, + :neutron => true, :metadata_shared_secret => 'secret', :bridge_interface => 'eth1', - :quantum_user_password => 'q_pass', - :quantum_db_password => 'q_db_pass', + :neutron_user_password => 'q_pass', + :neutron_db_password => 'q_db_pass', :cinder => true ) end @@ -112,10 +112,10 @@ describe 'openstack::controller' do :dbname => 'cinder', :allowed_hosts => '%' ) - should contain_class('quantum::db::mysql').with( - :user => 'quantum', + should contain_class('neutron::db::mysql').with( + :user => 'neutron', :password => 'q_db_pass', - :dbname => 'quantum', + :dbname => 'neutron', :allowed_hosts => '%' ) end @@ -125,16 +125,16 @@ describe 'openstack::controller' do end - context 'when cinder and quantum are false' do + context 'when cinder and neutron are false' do let :params do default_params.merge( - :quantum => false, + :neutron => false, :cinder => false ) end it do - should_not contain_class('quantum::db::mysql') + should_not contain_class('neutron::db::mysql') should_not contain_class('cinder::db::mysql') end @@ -155,7 +155,7 @@ describe 'openstack::controller' do config_hash['root_password'].should == 'sql_pass' end - ['keystone', 'nova', 'glance', 'cinder', 'quantum'].each do |x| + ['keystone', 'nova', 'glance', 'cinder', 'neutron'].each do |x| it { should_not contain_class("#{x}::db::mysql") } end end @@ -578,18 +578,18 @@ describe 'openstack::controller' do context 'network config' do - context 'when quantum' do + context 'when neutron' do let :params do default_params.merge({ - :quantum => true, + :neutron => true, :debug => true, :verbose => true, :sql_idle_timeout => '30', - :quantum_user_password => 'q_pass', + :neutron_user_password => 'q_pass', :bridge_interface => 'eth_27', :internal_address => '10.0.0.3', - :quantum_db_password => 'q_db_pass', + :neutron_db_password => 'q_db_pass', :metadata_shared_secret => 'secret', :external_bridge_name => 'br-ex' }) @@ -597,9 +597,9 @@ describe 'openstack::controller' do it { should_not contain_class('nova::network') } - it 'should configure quantum' do + it 'should configure neutron' do - should contain_class('openstack::quantum').with( + should contain_class('openstack::neutron').with( :db_host => '127.0.0.1', :sql_idle_timeout => '30', :rabbit_host => '127.0.0.1', @@ -613,9 +613,9 @@ describe 'openstack::controller' do :bridge_uplinks => ["br-ex:eth_27"], :bridge_mappings => ["default:br-ex"], :enable_ovs_agent => true, - :firewall_driver => 'quantum.agent.linux.iptables_firewall.OVSHybridIptablesFirewallDriver', - :db_name => 'quantum', - :db_user => 'quantum', + :firewall_driver => 'neutron.agent.linux.iptables_firewall.OVSHybridIptablesFirewallDriver', + :db_name => 'neutron', + :db_user => 'neutron', :db_password => 'q_db_pass', :enable_dhcp_agent => true, :enable_l3_agent => true, @@ -639,7 +639,7 @@ describe 'openstack::controller' do context 'when multi-host is not set' do let :params do - default_params.merge(:quantum => false, :multi_host => false) + default_params.merge(:neutron => false, :multi_host => false) end it {should contain_class('nova::network').with( :private_interface => 'eth0', @@ -657,7 +657,7 @@ describe 'openstack::controller' do context 'when multi-host is set' do let :params do - default_params.merge(:quantum => false, :multi_host => true) + default_params.merge(:neutron => false, :multi_host => true) end it { should contain_nova_config('DEFAULT/multi_host').with(:value => true)} it {should contain_class('nova::network').with( diff --git a/spec/classes/openstack_keystone_spec.rb b/spec/classes/openstack_keystone_spec.rb index 064ca29..53965ec 100644 --- a/spec/classes/openstack_keystone_spec.rb +++ b/spec/classes/openstack_keystone_spec.rb @@ -11,7 +11,7 @@ describe 'openstack::keystone' do :glance_user_password => 'pass', :nova_user_password => 'pass', :cinder_user_password => 'pass', - :quantum_user_password => 'pass', + :neutron_user_password => 'pass', :public_address => '127.0.0.1', :db_host => '127.0.0.1', :admin_email => 'root@localhost' @@ -40,7 +40,7 @@ describe 'openstack::keystone' do :enabled => true, :sql_connection => 'mysql://keystone:pass@127.0.0.1/keystone' ) - [ 'glance', 'cinder', 'quantum' ].each do |type| + [ 'glance', 'cinder', 'neutron' ].each do |type| should contain_class("#{type}::keystone::auth").with( :password => params["#{type}_user_password".intern], :public_address => params[:public_address], diff --git a/spec/classes/openstack_quantum_spec.rb b/spec/classes/openstack_neutron_spec.rb similarity index 78% rename from spec/classes/openstack_quantum_spec.rb rename to spec/classes/openstack_neutron_spec.rb index 33e0c21..03ca83e 100644 --- a/spec/classes/openstack_quantum_spec.rb +++ b/spec/classes/openstack_neutron_spec.rb @@ -1,6 +1,6 @@ require 'spec_helper' -describe 'openstack::quantum' do +describe 'openstack::neutron' do let :facts do {:osfamily => 'Redhat'} @@ -14,7 +14,7 @@ describe 'openstack::quantum' do } end - context 'install quantum with default settings' do + context 'install neutron with default settings' do before do params.delete(:db_password) end @@ -24,9 +24,9 @@ describe 'openstack::quantum' do end.to raise_error(Puppet::Error, /db password must be set/) end end - context 'install quantum with default and database password' do + context 'install neutron with default and database password' do it 'should perform default configuration' do - should contain_class('quantum').with( + should contain_class('neutron').with( :enabled => true, :bind_host => '0.0.0.0', :rabbit_host => '127.0.0.1', @@ -37,12 +37,12 @@ describe 'openstack::quantum' do :verbose => false, :debug => false ) - should contain_class('quantum::server').with( + should contain_class('neutron::server').with( :auth_host => '127.0.0.1', :auth_password => 'q_user_pass' ) - should contain_class('quantum::plugins::ovs').with( - :sql_connection => "mysql://quantum:bar@127.0.0.1/quantum?charset=utf8", + should contain_class('neutron::plugins::ovs').with( + :sql_connection => "mysql://neutron:bar@127.0.0.1/neutron?charset=utf8", :tenant_network_type => 'gre' ) end @@ -53,8 +53,8 @@ describe 'openstack::quantum' do params.merge!(:enable_server => false) end it 'should not configure server' do - should_not contain_class('quantum::server') - should_not contain_class('quantum::plugins::ovs') + should_not contain_class('neutron::server') + should_not contain_class('neutron::plugins::ovs') end end @@ -67,12 +67,12 @@ describe 'openstack::quantum' do :ovs_local_ip => '10.0.0.2' ) end - it { should contain_class('quantum::agents::ovs').with( + it { should contain_class('neutron::agents::ovs').with( :bridge_uplinks => ['br-ex:eth0'], :bridge_mappings => ['default:br-ex'], :enable_tunneling => true, :local_ip => '10.0.0.2', - :firewall_driver => 'quantum.agent.linux.iptables_firewall.OVSHybridIptablesFirewallDriver' + :firewall_driver => 'neutron.agent.linux.iptables_firewall.OVSHybridIptablesFirewallDriver' )} end @@ -80,7 +80,7 @@ describe 'openstack::quantum' do before do params.merge!(:enable_dhcp_agent => true) end - it { should contain_class('quantum::agents::dhcp').with( + it { should contain_class('neutron::agents::dhcp').with( :use_namespaces => true, :debug => false ) } @@ -90,7 +90,7 @@ describe 'openstack::quantum' do before do params.merge!(:enable_l3_agent => true) end - it { should contain_class('quantum::agents::l3').with( + it { should contain_class('neutron::agents::l3').with( :use_namespaces => true, :debug => false ) } @@ -113,7 +113,7 @@ describe 'openstack::quantum' do :shared_secret => 'foo' ) end - it { should contain_class('quantum::agents::metadata').with( + it { should contain_class('neutron::agents::metadata').with( :auth_password => 'q_user_pass', :shared_secret => 'foo', :auth_url => 'http://localhost:35357/v2.0', diff --git a/spec/classes/openstack_nova_controller_spec.rb b/spec/classes/openstack_nova_controller_spec.rb index 3c08218..b9fa284 100644 --- a/spec/classes/openstack_nova_controller_spec.rb +++ b/spec/classes/openstack_nova_controller_spec.rb @@ -9,9 +9,9 @@ describe 'openstack::nova::controller' do :api_bind_address => '0.0.0.0', :rabbit_password => 'rabbit_pass', :nova_user_password => 'nova_user_pass', - :quantum_user_password => 'quantum_user_pass', + :neutron_user_password => 'neutron_user_pass', :nova_db_password => 'nova_db_pass', - :quantum => true, + :neutron => true, :memcached_servers => false, :metadata_shared_secret => 'secret' } @@ -27,9 +27,9 @@ describe 'openstack::nova::controller' do it { should contain_class('openstack::nova::controller') } - context 'when configuring quantum' do + context 'when configuring neutron' do - it 'should configure nova with quantum' do + it 'should configure nova with neutron' do should contain_class('nova::rabbitmq').with( :userid => 'openstack', @@ -59,16 +59,16 @@ describe 'openstack::nova::controller' do :enabled_apis => 'ec2,osapi_compute,metadata', :api_bind_address => '0.0.0.0', :auth_host => '127.0.0.1', - :quantum_metadata_proxy_shared_secret => 'secret' + :neutron_metadata_proxy_shared_secret => 'secret' ) - should contain_class('nova::network::quantum').with( - :quantum_admin_password => 'quantum_user_pass', - :quantum_auth_strategy => 'keystone', - :quantum_url => "http://127.0.0.1:9696", - :quantum_admin_tenant_name => 'services', - :quantum_admin_username => 'quantum', - :quantum_admin_auth_url => "http://127.0.0.1:35357/v2.0" + should contain_class('nova::network::neutron').with( + :neutron_admin_password => 'neutron_user_pass', + :neutron_auth_strategy => 'keystone', + :neutron_url => "http://127.0.0.1:9696", + :neutron_admin_tenant_name => 'services', + :neutron_admin_username => 'neutron', + :neutron_admin_auth_url => "http://127.0.0.1:35357/v2.0" ) ['nova::scheduler', 'nova::objectstore', 'nova::cert', 'nova::consoleauth', 'nova::conductor'].each do |x| diff --git a/spec/classes/openstack_provision_spec.rb b/spec/classes/openstack_provision_spec.rb index 62a4fae..2782439 100644 --- a/spec/classes/openstack_provision_spec.rb +++ b/spec/classes/openstack_provision_spec.rb @@ -24,13 +24,13 @@ describe 'openstack::provision' do :tempest_repo_revision => 'stable/grizzly' ) } - it 'should configure quantum networks' do - should contain_quantum_network('public').with( + it 'should configure neutron networks' do + should contain_neutron_network('public').with( 'ensure' => 'present', 'router_external' => true, 'tenant_name' => 'admin' ) - should contain_quantum_network('private').with( + should contain_neutron_network('private').with( 'ensure' => 'present', 'tenant_name' => 'demo' ) diff --git a/templates/test_nova.sh.erb b/templates/test_nova.sh.erb index 012bd57..e28152b 100644 --- a/templates/test_nova.sh.erb +++ b/templates/test_nova.sh.erb @@ -40,24 +40,24 @@ nova --no-cache keypair-add --pub_key /tmp/id_rsa.pub key_cirros instance_name='<%= @image_type %>_test_vm' -<% if @quantum -%> +<% if @neutron -%> -quantum net-create public --router:external=True -quantum subnet-create --allocation-pool start=172.16.2.128,end=172.16.2.150 public 172.16.2.0/24 +neutron net-create public --router:external=True +neutron subnet-create --allocation-pool start=172.16.2.128,end=172.16.2.150 public 172.16.2.0/24 -quantum net-create net1 -quantum subnet-create net1 10.0.0.0/24 +neutron net-create net1 +neutron subnet-create net1 10.0.0.0/24 -quantum_net=`quantum net-list | grep net1 | awk -F' ' '{print $2}'` -quantum_public_net=`quantum net-list | grep public | awk -F' ' '{print $2}'` -quantum_prv_subnet=`quantum subnet-list | grep '10.0.0.0/24' | awk -F' ' '{print $2}'` +neutron_net=`neutron net-list | grep net1 | awk -F' ' '{print $2}'` +neutron_public_net=`neutron net-list | grep public | awk -F' ' '{print $2}'` +neutron_prv_subnet=`neutron subnet-list | grep '10.0.0.0/24' | awk -F' ' '{print $2}'` -quantum router-create router1 -quantum router-interface-add router1 $quantum_prv_subnet -quantum router-gateway-set router1 $quantum_public_net +neutron router-create router1 +neutron router-interface-add router1 $neutron_prv_subnet +neutron router-gateway-set router1 $neutron_public_net -nova --no-cache boot --flavor 1 --image $IMAGE_ID --key_name key_cirros --nic net-id=$quantum_net $instance_name +nova --no-cache boot --flavor 1 --image $IMAGE_ID --key_name key_cirros --nic net-id=$neutron_net $instance_name <% else -%> <% if @floating_ip -%> # create a security group so that we can allow ssh, http, and ping traffic @@ -84,7 +84,7 @@ sleep <%= @sleep_time %> <% if @floating_ip -%> # Now add the floating IP we reserved earlier to the machine. - # if not quantum + # if not neutron nova --no-cache add-floating-ip $instance_name $floating_ip # Wait and then try to SSH to the node, leveraging the private key # we generated earlier. @@ -92,13 +92,13 @@ sleep <%= @sleep_time %> ssh $login_user@$floating_ip -i /tmp/id_rsa -o StrictHostKeyChecking=no hostname <% end -%> -<% if @quantum %> +<% if @neutron %> # get port ip_addr=`nova show $instance_name | grep 'net1 network' | awk -F'|' '{print $3}'` -port_id=`quantum port-list | grep $ip_addr | awk -F' ' '{print $2}'` -floating_ip=`quantum floatingip-create --port_id $port_id $quantum_public_net | grep floating_ip_address | awk '{print $4}'` -quantum security-group-rule-create --protocol icmp --direction ingress default -quantum security-group-rule-create --protocol tcp --port-range-min 22 \ +port_id=`neutron port-list | grep $ip_addr | awk -F' ' '{print $2}'` +floating_ip=`neutron floatingip-create --port_id $port_id $neutron_public_net | grep floating_ip_address | awk '{print $4}'` +neutron security-group-rule-create --protocol icmp --direction ingress default +neutron security-group-rule-create --protocol tcp --port-range-min 22 \ --port-range-max 22 --direction ingress default sleep <%= @sleep_time %> ssh $login_user@$floating_ip -i /tmp/id_rsa -o StrictHostKeyChecking=no hostname diff --git a/tests/all.pp b/tests/all.pp index 65fe837..1705640 100644 --- a/tests/all.pp +++ b/tests/all.pp @@ -14,7 +14,7 @@ class { 'openstack::all': private_interface => 'eth1', public_address => $::ipaddress_eth0, public_interface => 'eth0', - quantum => false, + neutron => false, rabbit_password => 'password', secret_key => '12345', } diff --git a/tests/cloudcontroller.pp b/tests/cloudcontroller.pp index 851d51d..6346c56 100644 --- a/tests/cloudcontroller.pp +++ b/tests/cloudcontroller.pp @@ -14,7 +14,7 @@ class { 'openstack::controller': private_interface => 'eth1', public_address => $::ipaddress_eth0, public_interface => 'eth0', - quantum => false, + neutron => false, rabbit_password => 'password', secret_key => '12345', } diff --git a/tests/compute.pp b/tests/compute.pp index bde7fb5..08357d8 100644 --- a/tests/compute.pp +++ b/tests/compute.pp @@ -6,7 +6,7 @@ class { 'openstack::compute': libvirt_type => 'qemu', nova_db_password => 'password', nova_user_password => 'password', - quantum => false, + neutron => false, rabbit_password => 'password', vncproxy_host => '192.168.1.1', } diff --git a/tests/site.pp b/tests/site.pp index ac856ea..7ad3232 100644 --- a/tests/site.pp +++ b/tests/site.pp @@ -71,7 +71,7 @@ node /openstack_all/ { verbose => $verbose, auto_assign_floating_ip => $auto_assign_floating_ip, secret_key => $secret_key, - quantum => false, + neutron => false, } class { 'openstack::auth_file': @@ -117,7 +117,7 @@ node /openstack_controller/ { cinder_user_password => $cinder_user_password, glance_db_password => $glance_db_password, glance_user_password => $glance_user_password, - quantum => false, + neutron => false, nova_db_password => $nova_db_password, nova_user_password => $nova_user_password, rabbit_password => $rabbit_password, @@ -147,7 +147,7 @@ node /openstack_compute/ { cinder_db_password => $cinder_db_password, nova_db_password => $nova_db_password, nova_user_password => $nova_user_password, - quantum => false, + neutron => false, rabbit_host => $controller_node_internal, rabbit_password => $rabbit_password, rabbit_user => $rabbit_user,