diff --git a/HACKING.rst b/HACKING.rst index 3fef9509e4..dd665a2304 100644 --- a/HACKING.rst +++ b/HACKING.rst @@ -110,7 +110,7 @@ follows: * Global service configuration like ``ENABLED_SERVICES`` * Variables used by multiple services that do not have a clear owner, i.e. ``VOLUME_BACKING_FILE_SIZE`` (nova-volumes and cinder) or ``PUBLIC_NETWORK_NAME`` - (nova-network and quantum) + (nova-network and neutron) * Variables that can not be cleanly declared in a project file due to dependency ordering, i.e. the order of sourcing the project files can not be changed for other reasons but the earlier file needs to dereference a diff --git a/README.md b/README.md index 905a54d5fc..6fcd01d7ce 100644 --- a/README.md +++ b/README.md @@ -104,11 +104,11 @@ If you are enabling `swift3` in `ENABLED_SERVICES` devstack will install the swi Only Swift proxy server is launched in the screen session all other services are started in background and managed by `swift-init` tool. -# Quantum +# Neutron Basic Setup -In order to enable Quantum a single node setup, you'll need the following settings in your `localrc` : +In order to enable Neutron a single node setup, you'll need the following settings in your `localrc` : disable_service n-net enable_service q-svc @@ -116,13 +116,13 @@ In order to enable Quantum a single node setup, you'll need the following settin enable_service q-dhcp enable_service q-l3 enable_service q-meta - enable_service quantum + enable_service neutron # Optional, to enable tempest configuration as part of devstack enable_service tempest Then run `stack.sh` as normal. -devstack supports adding specific Quantum configuration flags to both the Open vSwitch and LinuxBridge plugin configuration files. To make use of this feature, the following variables are defined and can be configured in your `localrc` file: +devstack supports adding specific Neutron configuration flags to both the Open vSwitch and LinuxBridge plugin configuration files. To make use of this feature, the following variables are defined and can be configured in your `localrc` file: Variable Name Plugin Config File Section Modified ------------------------------------------------------------------------------------- @@ -144,7 +144,7 @@ If tempest has been successfully configured, a basic set of smoke tests can be r # Multi-Node Setup -A more interesting setup involves running multiple compute nodes, with Quantum networks connecting VMs on different compute nodes. +A more interesting setup involves running multiple compute nodes, with Neutron networks connecting VMs on different compute nodes. You should run at least one "controller node", which should have a `stackrc` that includes at least: disable_service n-net @@ -153,7 +153,7 @@ You should run at least one "controller node", which should have a `stackrc` tha enable_service q-dhcp enable_service q-l3 enable_service q-meta - enable_service quantum + enable_service neutron You likely want to change your `localrc` to run a scheduler that will balance VMs across hosts: @@ -161,7 +161,7 @@ You likely want to change your `localrc` to run a scheduler that will balance VM You can then run many compute nodes, each of which should have a `stackrc` which includes the following, with the IP address of the above controller node: - ENABLED_SERVICES=n-cpu,rabbit,g-api,quantum,q-agt + ENABLED_SERVICES=n-cpu,rabbit,g-api,neutron,q-agt SERVICE_HOST=[IP of controller node] MYSQL_HOST=$SERVICE_HOST RABBIT_HOST=$SERVICE_HOST diff --git a/clean.sh b/clean.sh index 758947a02e..493c449fca 100755 --- a/clean.sh +++ b/clean.sh @@ -42,7 +42,7 @@ source $TOP_DIR/lib/cinder source $TOP_DIR/lib/swift source $TOP_DIR/lib/ceilometer source $TOP_DIR/lib/heat -source $TOP_DIR/lib/quantum +source $TOP_DIR/lib/neutron source $TOP_DIR/lib/baremetal source $TOP_DIR/lib/ldap @@ -60,7 +60,7 @@ cleanup_cinder cleanup_glance cleanup_keystone cleanup_nova -cleanup_quantum +cleanup_neutron cleanup_swift # cinder doesn't always clean up the volume group as it might be used elsewhere... diff --git a/exercises/boot_from_volume.sh b/exercises/boot_from_volume.sh index 358b3d2579..18147325bb 100755 --- a/exercises/boot_from_volume.sh +++ b/exercises/boot_from_volume.sh @@ -32,9 +32,9 @@ source $TOP_DIR/functions # Import configuration source $TOP_DIR/openrc -# Import quantum functions if needed -if is_service_enabled quantum; then - source $TOP_DIR/lib/quantum +# Import neutron functions if needed +if is_service_enabled neutron; then + source $TOP_DIR/lib/neutron fi # Import exercise configuration diff --git a/exercises/euca.sh b/exercises/euca.sh index ac21b6bf79..eec8636fa3 100755 --- a/exercises/euca.sh +++ b/exercises/euca.sh @@ -33,9 +33,9 @@ source $TOP_DIR/functions # Import EC2 configuration source $TOP_DIR/eucarc -# Import quantum functions if needed -if is_service_enabled quantum; then - source $TOP_DIR/lib/quantum +# Import neutron functions if needed +if is_service_enabled neutron; then + source $TOP_DIR/lib/neutron fi # Import exercise configuration diff --git a/exercises/floating_ips.sh b/exercises/floating_ips.sh index b741efbeba..b22ef110d2 100755 --- a/exercises/floating_ips.sh +++ b/exercises/floating_ips.sh @@ -30,9 +30,9 @@ source $TOP_DIR/functions # Import configuration source $TOP_DIR/openrc -# Import quantum functions if needed -if is_service_enabled quantum; then - source $TOP_DIR/lib/quantum +# Import neutron functions if needed +if is_service_enabled neutron; then + source $TOP_DIR/lib/neutron fi # Import exercise configuration @@ -155,7 +155,7 @@ nova add-floating-ip $VM_UUID $FLOATING_IP || \ # Test we can ping our floating IP within ASSOCIATE_TIMEOUT seconds ping_check "$PUBLIC_NETWORK_NAME" $FLOATING_IP $ASSOCIATE_TIMEOUT -if ! is_service_enabled quantum; then +if ! is_service_enabled neutron; then # Allocate an IP from second floating pool TEST_FLOATING_IP=$(nova floating-ip-create $TEST_FLOATING_POOL | grep $TEST_FLOATING_POOL | get_field 1) die_if_not_set $LINENO TEST_FLOATING_IP "Failure creating floating IP in $TEST_FLOATING_POOL" @@ -179,7 +179,7 @@ fi # Clean up # -------- -if ! is_service_enabled quantum; then +if ! is_service_enabled neutron; then # Delete second floating IP nova floating-ip-delete $TEST_FLOATING_IP || \ die $LINENO "Failure deleting floating IP $TEST_FLOATING_IP" diff --git a/exercises/quantum-adv-test.sh b/exercises/quantum-adv-test.sh index abec5e4a1b..4367e2e3c1 100755 --- a/exercises/quantum-adv-test.sh +++ b/exercises/quantum-adv-test.sh @@ -1,9 +1,9 @@ #!/usr/bin/env bash # -# **quantum-adv-test.sh** +# **neutron-adv-test.sh** -# Perform integration testing of Nova and other components with Quantum. +# Perform integration testing of Nova and other components with Neutron. echo "*********************************************************************" echo "Begin DevStack Exercise: $0" @@ -43,16 +43,16 @@ source $TOP_DIR/functions # Import configuration source $TOP_DIR/openrc -# Import quantum functions -source $TOP_DIR/lib/quantum +# Import neutron functions +source $TOP_DIR/lib/neutron -# If quantum is not enabled we exit with exitcode 55, which means exercise is skipped. -quantum_plugin_check_adv_test_requirements || exit 55 +# If neutron is not enabled we exit with exitcode 55, which means exercise is skipped. +neutron_plugin_check_adv_test_requirements || exit 55 # Import exercise configuration source $TOP_DIR/exerciserc -# Quantum Settings +# Neutron Settings # ---------------- TENANTS="DEMO1" @@ -161,7 +161,7 @@ function get_role_id { function get_network_id { local NETWORK_NAME="$1" - local NETWORK_ID=`quantum net-list -F id -- --name=$NETWORK_NAME | awk "NR==4" | awk '{print $2}'` + local NETWORK_ID=`neutron net-list -F id -- --name=$NETWORK_NAME | awk "NR==4" | awk '{print $2}'` echo $NETWORK_ID } @@ -232,9 +232,9 @@ function create_network { source $TOP_DIR/openrc admin admin local TENANT_ID=$(get_tenant_id $TENANT) source $TOP_DIR/openrc $TENANT $TENANT - local NET_ID=$(quantum net-create --tenant_id $TENANT_ID $NET_NAME $EXTRA| grep ' id ' | awk '{print $4}' ) - quantum subnet-create --ip_version 4 --tenant_id $TENANT_ID --gateway $GATEWAY $NET_ID $CIDR - quantum-debug probe-create --device-owner compute $NET_ID + local NET_ID=$(neutron net-create --tenant_id $TENANT_ID $NET_NAME $EXTRA| grep ' id ' | awk '{print $4}' ) + neutron subnet-create --ip_version 4 --tenant_id $TENANT_ID --gateway $GATEWAY $NET_ID $CIDR + neutron-debug probe-create --device-owner compute $NET_ID source $TOP_DIR/openrc demo demo } @@ -320,10 +320,10 @@ function delete_network { local TENANT_ID=$(get_tenant_id $TENANT) #TODO(nati) comment out until l3-agent merged #for res in port subnet net router;do - for net_id in `quantum net-list -c id -c name | grep $NET_NAME | awk '{print $2}'`;do + for net_id in `neutron net-list -c id -c name | grep $NET_NAME | awk '{print $2}'`;do delete_probe $net_id - quantum subnet-list | grep $net_id | awk '{print $2}' | xargs -I% quantum subnet-delete % - quantum net-delete $net_id + neutron subnet-list | grep $net_id | awk '{print $2}' | xargs -I% neutron subnet-delete % + neutron net-delete $net_id done source $TOP_DIR/openrc demo demo } diff --git a/exercises/volumes.sh b/exercises/volumes.sh index 79136411ac..f574bb3463 100755 --- a/exercises/volumes.sh +++ b/exercises/volumes.sh @@ -30,9 +30,9 @@ source $TOP_DIR/functions # Import configuration source $TOP_DIR/openrc -# Import quantum functions if needed -if is_service_enabled quantum; then - source $TOP_DIR/lib/quantum +# Import neutron functions if needed +if is_service_enabled neutron; then + source $TOP_DIR/lib/neutron fi # Import exercise configuration diff --git a/functions b/functions index fa0e7248da..3a3e28bcdb 100644 --- a/functions +++ b/functions @@ -262,8 +262,8 @@ function get_packages() { file_to_parse="${file_to_parse} keystone" fi elif [[ $service == q-* ]]; then - if [[ ! $file_to_parse =~ quantum ]]; then - file_to_parse="${file_to_parse} quantum" + if [[ ! $file_to_parse =~ neutron ]]; then + file_to_parse="${file_to_parse} neutron" fi fi done @@ -717,7 +717,7 @@ function is_running() { # **cinder** returns true if any service enabled start with **c-** # **ceilometer** returns true if any service enabled start with **ceilometer** # **glance** returns true if any service enabled start with **g-** -# **quantum** returns true if any service enabled start with **q-** +# **neutron** returns true if any service enabled start with **q-** # **swift** returns true if any service enabled start with **s-** # For backward compatibility if we have **swift** in ENABLED_SERVICES all the # **s-** services will be enabled. This will be deprecated in the future. @@ -732,7 +732,7 @@ function is_service_enabled() { [[ ${service} == "cinder" && ${ENABLED_SERVICES} =~ "c-" ]] && return 0 [[ ${service} == "ceilometer" && ${ENABLED_SERVICES} =~ "ceilometer-" ]] && return 0 [[ ${service} == "glance" && ${ENABLED_SERVICES} =~ "g-" ]] && return 0 - [[ ${service} == "quantum" && ${ENABLED_SERVICES} =~ "q-" ]] && return 0 + [[ ${service} == "neutron" && ${ENABLED_SERVICES} =~ "q-" ]] && return 0 [[ ${service} == "swift" && ${ENABLED_SERVICES} =~ "s-" ]] && return 0 [[ ${service} == s-* && ${ENABLED_SERVICES} =~ "swift" ]] && return 0 done @@ -758,7 +758,7 @@ function _cleanup_service_list () { # enable_service qpid # # This function does not know about the special cases -# for nova, glance, and quantum built into is_service_enabled(). +# for nova, glance, and neutron built into is_service_enabled(). # Uses global ``ENABLED_SERVICES`` # enable_service service [service ...] function enable_service() { @@ -780,7 +780,7 @@ function enable_service() { # disable_service rabbit # # This function does not know about the special cases -# for nova, glance, and quantum built into is_service_enabled(). +# for nova, glance, and neutron built into is_service_enabled(). # Uses global ``ENABLED_SERVICES`` # disable_service service [service ...] function disable_service() { @@ -1331,8 +1331,8 @@ function zypper_install() { # Uses globals ``ENABLED_SERVICES`` # ping_check from-net ip boot-timeout expected function ping_check() { - if is_service_enabled quantum; then - _ping_check_quantum "$1" $2 $3 $4 + if is_service_enabled neutron; then + _ping_check_neutron "$1" $2 $3 $4 return fi _ping_check_novanet "$1" $2 $3 $4 @@ -1371,8 +1371,8 @@ function _ping_check_novanet() { # ssh_check net-name key-file floating-ip default-user active-timeout function ssh_check() { - if is_service_enabled quantum; then - _ssh_check_quantum "$1" $2 $3 $4 $5 + if is_service_enabled neutron; then + _ssh_check_neutron "$1" $2 $3 $4 $5 return fi _ssh_check_novanet "$1" $2 $3 $4 $5 diff --git a/lib/keystone b/lib/keystone index 2edd137dbb..4b93992cb9 100644 --- a/lib/keystone +++ b/lib/keystone @@ -151,12 +151,12 @@ function configure_keystone() { echo "catalog.RegionOne.object_store.name = Swift Service" >> $KEYSTONE_CATALOG fi - # Add quantum endpoints to service catalog if quantum is enabled - if is_service_enabled quantum; then + # Add neutron endpoints to service catalog if neutron is enabled + if is_service_enabled neutron; then echo "catalog.RegionOne.network.publicURL = http://%SERVICE_HOST%:$Q_PORT/" >> $KEYSTONE_CATALOG echo "catalog.RegionOne.network.adminURL = http://%SERVICE_HOST%:$Q_PORT/" >> $KEYSTONE_CATALOG echo "catalog.RegionOne.network.internalURL = http://%SERVICE_HOST%:$Q_PORT/" >> $KEYSTONE_CATALOG - echo "catalog.RegionOne.network.name = Quantum Service" >> $KEYSTONE_CATALOG + echo "catalog.RegionOne.network.name = Neutron Service" >> $KEYSTONE_CATALOG fi sed -e " diff --git a/lib/quantum b/lib/neutron similarity index 58% rename from lib/quantum rename to lib/neutron index a8708653cb..c28bd28fb0 100644 --- a/lib/quantum +++ b/lib/neutron @@ -1,5 +1,5 @@ -# lib/quantum -# functions - funstions specific to quantum +# lib/neutron +# functions - funstions specific to neutron # Dependencies: # ``functions`` file @@ -7,62 +7,62 @@ # ``stack.sh`` calls the entry points in this order: # -# install_quantum -# install_quantumclient -# install_quantum_agent_packages -# install_quantum_third_party -# configure_quantum -# init_quantum -# configure_quantum_third_party -# init_quantum_third_party -# start_quantum_third_party -# create_nova_conf_quantum -# start_quantum_service_and_check -# create_quantum_initial_network -# setup_quantum_debug -# start_quantum_agents +# install_neutron +# install_neutronclient +# install_neutron_agent_packages +# install_neutron_third_party +# configure_neutron +# init_neutron +# configure_neutron_third_party +# init_neutron_third_party +# start_neutron_third_party +# create_nova_conf_neutron +# start_neutron_service_and_check +# create_neutron_initial_network +# setup_neutron_debug +# start_neutron_agents # # ``unstack.sh`` calls the entry points in this order: # -# stop_quantum +# stop_neutron -# Functions in lib/quantum are classified into the following categories: +# Functions in lib/neutron are classified into the following categories: # # - entry points (called from stack.sh or unstack.sh) # - internal functions -# - quantum exercises +# - neutron exercises # - 3rd party programs -# Quantum Networking +# Neutron Networking # ------------------ -# Make sure that quantum is enabled in ``ENABLED_SERVICES``. If you want -# to run Quantum on this host, make sure that q-svc is also in +# Make sure that neutron is enabled in ``ENABLED_SERVICES``. If you want +# to run Neutron on this host, make sure that q-svc is also in # ``ENABLED_SERVICES``. # -# If you're planning to use the Quantum openvswitch plugin, set +# If you're planning to use the Neutron openvswitch plugin, set # ``Q_PLUGIN`` to "openvswitch" and make sure the q-agt service is enabled -# in ``ENABLED_SERVICES``. If you're planning to use the Quantum +# in ``ENABLED_SERVICES``. If you're planning to use the Neutron # linuxbridge plugin, set ``Q_PLUGIN`` to "linuxbridge" and make sure the # q-agt service is enabled in ``ENABLED_SERVICES``. # -# See "Quantum Network Configuration" below for additional variables +# See "Neutron Network Configuration" below for additional variables # that must be set in localrc for connectivity across hosts with -# Quantum. +# Neutron. # -# With Quantum networking the NETWORK_MANAGER variable is ignored. +# With Neutron networking the NETWORK_MANAGER variable is ignored. # # To enable specific configuration options for either the Open vSwitch or # LinuxBridge plugin, please see the top level README file under the -# Quantum section. +# Neutron section. # Save trace setting XTRACE=$(set +o | grep xtrace) set +o xtrace -# Quantum Network Configuration +# Neutron Network Configuration # ----------------------------- # Gateway and subnet defaults, in case they are not customized in localrc @@ -72,22 +72,29 @@ PRIVATE_SUBNET_NAME=${PRIVATE_SUBNET_NAME:-"private-subnet"} PUBLIC_SUBNET_NAME=${PUBLIC_SUBNET_NAME:-"public-subnet"} # Set up default directories -QUANTUM_DIR=$DEST/neutron -QUANTUMCLIENT_DIR=$DEST/python-neutronclient -QUANTUM_AUTH_CACHE_DIR=${QUANTUM_AUTH_CACHE_DIR:-/var/cache/quantum} +NEUTRON_DIR=$DEST/neutron +NEUTRONCLIENT_DIR=$DEST/python-neutronclient +NEUTRON_AUTH_CACHE_DIR=${NEUTRON_AUTH_CACHE_DIR:-/var/cache/neutron} -QUANTUM_CONF_DIR=/etc/quantum -QUANTUM_CONF=$QUANTUM_CONF_DIR/quantum.conf -export QUANTUM_TEST_CONFIG_FILE=${QUANTUM_TEST_CONFIG_FILE:-"$QUANTUM_CONF_DIR/debug.ini"} +# Support entry points installation of console scripts +if [[ -d $NEUTRON_DIR/bin/neutron-server ]]; then + NEUTRON_BIN_DIR=$NEUTRON_DIR/bin + else +NEUTRON_BIN_DIR=$(get_python_exec_prefix) +fi -# Default Quantum Plugin +NEUTRON_CONF_DIR=/etc/neutron +NEUTRON_CONF=$NEUTRON_CONF_DIR/neutron.conf +export NEUTRON_TEST_CONFIG_FILE=${NEUTRON_TEST_CONFIG_FILE:-"$NEUTRON_CONF_DIR/debug.ini"} + +# Default Neutron Plugin Q_PLUGIN=${Q_PLUGIN:-openvswitch} -# Default Quantum Port +# Default Neutron Port Q_PORT=${Q_PORT:-9696} -# Default Quantum Host +# Default Neutron Host Q_HOST=${Q_HOST:-$SERVICE_HOST} # Default admin username -Q_ADMIN_USERNAME=${Q_ADMIN_USERNAME:-quantum} +Q_ADMIN_USERNAME=${Q_ADMIN_USERNAME:-neutron} # Default auth strategy Q_AUTH_STRATEGY=${Q_AUTH_STRATEGY:-keystone} # Use namespace or not @@ -99,27 +106,27 @@ Q_USE_ROOTWRAP=${Q_USE_ROOTWRAP:-True} Q_META_DATA_IP=${Q_META_DATA_IP:-$SERVICE_HOST} # Allow Overlapping IP among subnets Q_ALLOW_OVERLAPPING_IP=${Q_ALLOW_OVERLAPPING_IP:-True} -# Use quantum-debug command +# Use neutron-debug command Q_USE_DEBUG_COMMAND=${Q_USE_DEBUG_COMMAND:-False} # The name of the default q-l3 router Q_ROUTER_NAME=${Q_ROUTER_NAME:-router1} # List of config file names in addition to the main plugin config file -# See _configure_quantum_common() for details about setting it up +# See _configure_neutron_common() for details about setting it up declare -a Q_PLUGIN_EXTRA_CONF_FILES -if is_service_enabled quantum; then - Q_RR_CONF_FILE=$QUANTUM_CONF_DIR/rootwrap.conf +if is_service_enabled neutron; then + Q_RR_CONF_FILE=$NEUTRON_CONF_DIR/rootwrap.conf if [[ "$Q_USE_ROOTWRAP" == "False" ]]; then Q_RR_COMMAND="sudo" else - QUANTUM_ROOTWRAP=$(get_rootwrap_location quantum) - Q_RR_COMMAND="sudo $QUANTUM_ROOTWRAP $Q_RR_CONF_FILE" + NEUTRON_ROOTWRAP=$(get_rootwrap_location neutron) + Q_RR_COMMAND="sudo $NEUTRON_ROOTWRAP $Q_RR_CONF_FILE" fi # Provider Network Configurations # -------------------------------- - # The following variables control the Quantum openvswitch and + # The following variables control the Neutron openvswitch and # linuxbridge plugins' allocation of tenant networks and # availability of provider networks. If these are not configured # in ``localrc``, tenant networks will be local to the host (with no @@ -183,20 +190,20 @@ if is_service_enabled quantum; then OVS_ENABLE_TUNNELING=${OVS_ENABLE_TUNNELING:-$ENABLE_TENANT_TUNNELS} fi -# Quantum plugin specific functions +# Neutron plugin specific functions # --------------------------------- -# Please refer to ``lib/quantum_plugins/README.md`` for details. -source $TOP_DIR/lib/quantum_plugins/$Q_PLUGIN +# Please refer to ``lib/neutron_plugins/README.md`` for details. +source $TOP_DIR/lib/neutron_plugins/$Q_PLUGIN # Agent loadbalancer service plugin functions # ------------------------------------------- # Hardcoding for 1 service plugin for now -source $TOP_DIR/lib/quantum_plugins/services/loadbalancer +source $TOP_DIR/lib/neutron_plugins/services/loadbalancer # Use security group or not -if has_quantum_plugin_security_group; then +if has_neutron_plugin_security_group; then Q_USE_SECGROUP=${Q_USE_SECGROUP:-True} else Q_USE_SECGROUP=False @@ -205,36 +212,36 @@ fi # Functions # --------- -# configure_quantum() -# Set common config for all quantum server and agents. -function configure_quantum() { - _configure_quantum_common - iniset_rpc_backend quantum $QUANTUM_CONF DEFAULT +# configure_neutron() +# Set common config for all neutron server and agents. +function configure_neutron() { + _configure_neutron_common + iniset_rpc_backend neutron $NEUTRON_CONF DEFAULT # goes before q-svc to init Q_SERVICE_PLUGIN_CLASSES if is_service_enabled q-lbaas; then - _configure_quantum_lbaas + _configure_neutron_lbaas fi if is_service_enabled q-svc; then - _configure_quantum_service + _configure_neutron_service fi if is_service_enabled q-agt; then - _configure_quantum_plugin_agent + _configure_neutron_plugin_agent fi if is_service_enabled q-dhcp; then - _configure_quantum_dhcp_agent + _configure_neutron_dhcp_agent fi if is_service_enabled q-l3; then - _configure_quantum_l3_agent + _configure_neutron_l3_agent fi if is_service_enabled q-meta; then - _configure_quantum_metadata_agent + _configure_neutron_metadata_agent fi - _configure_quantum_debug_command + _configure_neutron_debug_command } -function create_nova_conf_quantum() { +function create_nova_conf_neutron() { iniset $NOVA_CONF DEFAULT network_api_class "nova.network.quantumv2.api.API" iniset $NOVA_CONF DEFAULT quantum_admin_username "$Q_ADMIN_USERNAME" iniset $NOVA_CONF DEFAULT quantum_admin_password "$SERVICE_PASSWORD" @@ -249,7 +256,7 @@ function create_nova_conf_quantum() { fi # set NOVA_VIF_DRIVER and optionally set options in nova_conf - quantum_plugin_create_nova_conf + neutron_plugin_create_nova_conf iniset $NOVA_CONF DEFAULT libvirt_vif_driver "$NOVA_VIF_DRIVER" iniset $NOVA_CONF DEFAULT linuxnet_interface_driver "$LINUXNET_VIF_DRIVER" @@ -258,38 +265,38 @@ function create_nova_conf_quantum() { fi } -# create_quantum_accounts() - Set up common required quantum accounts +# create_neutron_accounts() - Set up common required neutron accounts # Tenant User Roles # ------------------------------------------------------------------ -# service quantum admin # if enabled +# service neutron admin # if enabled # Migrated from keystone_data.sh -function create_quantum_accounts() { +function create_neutron_accounts() { SERVICE_TENANT=$(keystone tenant-list | awk "/ $SERVICE_TENANT_NAME / { print \$2 }") ADMIN_ROLE=$(keystone role-list | awk "/ admin / { print \$2 }") if [[ "$ENABLED_SERVICES" =~ "q-svc" ]]; then - QUANTUM_USER=$(keystone user-create \ - --name=quantum \ + NEUTRON_USER=$(keystone user-create \ + --name=neutron \ --pass="$SERVICE_PASSWORD" \ --tenant_id $SERVICE_TENANT \ - --email=quantum@example.com \ + --email=neutron@example.com \ | grep " id " | get_field 2) keystone user-role-add \ --tenant_id $SERVICE_TENANT \ - --user_id $QUANTUM_USER \ + --user_id $NEUTRON_USER \ --role_id $ADMIN_ROLE if [[ "$KEYSTONE_CATALOG_BACKEND" = 'sql' ]]; then - QUANTUM_SERVICE=$(keystone service-create \ - --name=quantum \ + NEUTRON_SERVICE=$(keystone service-create \ + --name=neutron \ --type=network \ - --description="Quantum Service" \ + --description="Neutron Service" \ | grep " id " | get_field 2) keystone endpoint-create \ --region RegionOne \ - --service_id $QUANTUM_SERVICE \ + --service_id $NEUTRON_SERVICE \ --publicurl "http://$SERVICE_HOST:9696/" \ --adminurl "http://$SERVICE_HOST:9696/" \ --internalurl "http://$SERVICE_HOST:9696/" @@ -297,11 +304,11 @@ function create_quantum_accounts() { fi } -function create_quantum_initial_network() { +function create_neutron_initial_network() { TENANT_ID=$(keystone tenant-list | grep " demo " | get_field 1) # Create a small network - # Since quantum command is executed in admin context at this point, + # Since neutron command is executed in admin context at this point, # ``--tenant_id`` needs to be specified. if is_baremetal; then sudo ovs-vsctl add-port $OVS_PHYSICAL_BRIDGE $PUBLIC_INTERFACE @@ -309,36 +316,36 @@ function create_quantum_initial_network() { sudo ip addr del $IP dev $PUBLIC_INTERFACE sudo ip addr add $IP dev $OVS_PHYSICAL_BRIDGE done - NET_ID=$(quantum net-create $PHYSICAL_NETWORK --tenant_id $TENANT_ID --provider:network_type flat --provider:physical_network "$PHYSICAL_NETWORK" | grep ' id ' | get_field 2) - SUBNET_ID=$(quantum subnet-create --tenant_id $TENANT_ID --ip_version 4 ${ALLOCATION_POOL:+--allocation-pool $ALLOCATION_POOL} --gateway $NETWORK_GATEWAY --name $PRIVATE_SUBNET_NAME $NET_ID $FIXED_RANGE | grep ' id ' | get_field 2) + NET_ID=$(neutron net-create $PHYSICAL_NETWORK --tenant_id $TENANT_ID --provider:network_type flat --provider:physical_network "$PHYSICAL_NETWORK" | grep ' id ' | get_field 2) + SUBNET_ID=$(neutron subnet-create --tenant_id $TENANT_ID --ip_version 4 ${ALLOCATION_POOL:+--allocation-pool $ALLOCATION_POOL} --gateway $NETWORK_GATEWAY --name $PRIVATE_SUBNET_NAME $NET_ID $FIXED_RANGE | grep ' id ' | get_field 2) sudo ifconfig $OVS_PHYSICAL_BRIDGE up else - NET_ID=$(quantum net-create --tenant_id $TENANT_ID "$PRIVATE_NETWORK_NAME" | grep ' id ' | get_field 2) - SUBNET_ID=$(quantum subnet-create --tenant_id $TENANT_ID --ip_version 4 --gateway $NETWORK_GATEWAY --name $PRIVATE_SUBNET_NAME $NET_ID $FIXED_RANGE | grep ' id ' | get_field 2) + NET_ID=$(neutron net-create --tenant_id $TENANT_ID "$PRIVATE_NETWORK_NAME" | grep ' id ' | get_field 2) + SUBNET_ID=$(neutron subnet-create --tenant_id $TENANT_ID --ip_version 4 --gateway $NETWORK_GATEWAY --name $PRIVATE_SUBNET_NAME $NET_ID $FIXED_RANGE | grep ' id ' | get_field 2) fi if [[ "$Q_L3_ENABLED" == "True" ]]; then # Create a router, and add the private subnet as one of its interfaces if [[ "$Q_L3_ROUTER_PER_TENANT" == "True" ]]; then # create a tenant-owned router. - ROUTER_ID=$(quantum router-create --tenant_id $TENANT_ID $Q_ROUTER_NAME | grep ' id ' | get_field 2) + ROUTER_ID=$(neutron router-create --tenant_id $TENANT_ID $Q_ROUTER_NAME | grep ' id ' | get_field 2) else # Plugin only supports creating a single router, which should be admin owned. - ROUTER_ID=$(quantum router-create $Q_ROUTER_NAME | grep ' id ' | get_field 2) + ROUTER_ID=$(neutron router-create $Q_ROUTER_NAME | grep ' id ' | get_field 2) fi - quantum router-interface-add $ROUTER_ID $SUBNET_ID + neutron router-interface-add $ROUTER_ID $SUBNET_ID # Create an external network, and a subnet. Configure the external network as router gw - EXT_NET_ID=$(quantum net-create "$PUBLIC_NETWORK_NAME" -- --router:external=True | grep ' id ' | get_field 2) - EXT_GW_IP=$(quantum subnet-create --ip_version 4 ${Q_FLOATING_ALLOCATION_POOL:+--allocation-pool $Q_FLOATING_ALLOCATION_POOL} --gateway $PUBLIC_NETWORK_GATEWAY --name $PUBLIC_SUBNET_NAME $EXT_NET_ID $FLOATING_RANGE -- --enable_dhcp=False | grep 'gateway_ip' | get_field 2) - quantum router-gateway-set $ROUTER_ID $EXT_NET_ID + EXT_NET_ID=$(neutron net-create "$PUBLIC_NETWORK_NAME" -- --router:external=True | grep ' id ' | get_field 2) + EXT_GW_IP=$(neutron subnet-create --ip_version 4 ${Q_FLOATING_ALLOCATION_POOL:+--allocation-pool $Q_FLOATING_ALLOCATION_POOL} --gateway $PUBLIC_NETWORK_GATEWAY --name $PUBLIC_SUBNET_NAME $EXT_NET_ID $FLOATING_RANGE -- --enable_dhcp=False | grep 'gateway_ip' | get_field 2) + neutron router-gateway-set $ROUTER_ID $EXT_NET_ID if is_service_enabled q-l3; then # logic is specific to using the l3-agent for l3 - if is_quantum_ovs_base_plugin && [[ "$Q_USE_NAMESPACE" = "True" ]]; then + if is_neutron_ovs_base_plugin && [[ "$Q_USE_NAMESPACE" = "True" ]]; then CIDR_LEN=${FLOATING_RANGE#*/} sudo ip addr add $EXT_GW_IP/$CIDR_LEN dev $PUBLIC_BRIDGE sudo ip link set $PUBLIC_BRIDGE up - ROUTER_GW_IP=`quantum port-list -c fixed_ips -c device_owner | grep router_gateway | awk -F '"' '{ print $8; }'` + ROUTER_GW_IP=`neutron port-list -c fixed_ips -c device_owner | grep router_gateway | awk -F '"' '{ print $8; }'` sudo route add -net $FIXED_RANGE gw $ROUTER_GW_IP fi if [[ "$Q_USE_NAMESPACE" == "False" ]]; then @@ -349,313 +356,313 @@ function create_quantum_initial_network() { fi } -# init_quantum() - Initialize databases, etc. -function init_quantum() { +# init_neutron() - Initialize databases, etc. +function init_neutron() { : } -# install_quantum() - Collect source and prepare -function install_quantum() { - git_clone $QUANTUM_REPO $QUANTUM_DIR $QUANTUM_BRANCH - setup_develop $QUANTUM_DIR +# install_neutron() - Collect source and prepare +function install_neutron() { + git_clone $NEUTRON_REPO $NEUTRON_DIR $NEUTRON_BRANCH + setup_develop $NEUTRON_DIR } -# install_quantumclient() - Collect source and prepare -function install_quantumclient() { - git_clone $QUANTUMCLIENT_REPO $QUANTUMCLIENT_DIR $QUANTUMCLIENT_BRANCH - setup_develop $QUANTUMCLIENT_DIR +# install_neutronclient() - Collect source and prepare +function install_neutronclient() { + git_clone $NEUTRONCLIENT_REPO $NEUTRONCLIENT_DIR $NEUTRONCLIENT_BRANCH + setup_develop $NEUTRONCLIENT_DIR } -# install_quantum_agent_packages() - Collect source and prepare -function install_quantum_agent_packages() { +# install_neutron_agent_packages() - Collect source and prepare +function install_neutron_agent_packages() { # install packages that are specific to plugin agent(s) if is_service_enabled q-agt q-dhcp q-l3; then - quantum_plugin_install_agent_packages + neutron_plugin_install_agent_packages fi if is_service_enabled q-lbaas; then - quantum_agent_lbaas_install_agent_packages + neutron_agent_lbaas_install_agent_packages fi } # Start running processes, including screen -function start_quantum_service_and_check() { +function start_neutron_service_and_check() { # build config-file options local cfg_file - local CFG_FILE_OPTIONS="--config-file $QUANTUM_CONF --config-file /$Q_PLUGIN_CONF_FILE" + local CFG_FILE_OPTIONS="--config-file $NEUTRON_CONF --config-file /$Q_PLUGIN_CONF_FILE" for cfg_file in ${Q_PLUGIN_EXTRA_CONF_FILES[@]}; do CFG_FILE_OPTIONS+=" --config-file /$cfg_file" done - # Start the Quantum service - screen_it q-svc "cd $QUANTUM_DIR && python $QUANTUM_DIR/bin/quantum-server $CFG_FILE_OPTIONS" - echo "Waiting for Quantum to start..." + # Start the Neutron service + screen_it q-svc "cd $NEUTRON_DIR && python $NEUTRON_BIN_DIR/neutron-server $CFG_FILE_OPTIONS" + echo "Waiting for Neutron to start..." if ! timeout $SERVICE_TIMEOUT sh -c "while ! http_proxy= wget -q -O- http://$Q_HOST:$Q_PORT; do sleep 1; done"; then - die $LINENO "Quantum did not start" + die $LINENO "Neutron did not start" fi } # Start running processes, including screen -function start_quantum_agents() { - # Start up the quantum agents if enabled - screen_it q-agt "cd $QUANTUM_DIR && python $AGENT_BINARY --config-file $QUANTUM_CONF --config-file /$Q_PLUGIN_CONF_FILE" - screen_it q-dhcp "cd $QUANTUM_DIR && python $AGENT_DHCP_BINARY --config-file $QUANTUM_CONF --config-file=$Q_DHCP_CONF_FILE" - screen_it q-l3 "cd $QUANTUM_DIR && python $AGENT_L3_BINARY --config-file $QUANTUM_CONF --config-file=$Q_L3_CONF_FILE" - screen_it q-meta "cd $QUANTUM_DIR && python $AGENT_META_BINARY --config-file $QUANTUM_CONF --config-file=$Q_META_CONF_FILE" +function start_neutron_agents() { + # Start up the neutron agents if enabled + screen_it q-agt "cd $NEUTRON_DIR && python $AGENT_BINARY --config-file $NEUTRON_CONF --config-file /$Q_PLUGIN_CONF_FILE" + screen_it q-dhcp "cd $NEUTRON_DIR && python $AGENT_DHCP_BINARY --config-file $NEUTRON_CONF --config-file=$Q_DHCP_CONF_FILE" + screen_it q-l3 "cd $NEUTRON_DIR && python $AGENT_L3_BINARY --config-file $NEUTRON_CONF --config-file=$Q_L3_CONF_FILE" + screen_it q-meta "cd $NEUTRON_DIR && python $AGENT_META_BINARY --config-file $NEUTRON_CONF --config-file=$Q_META_CONF_FILE" if [ "$VIRT_DRIVER" = 'xenserver' ]; then # For XenServer, start an agent for the domU openvswitch - screen_it q-domua "cd $QUANTUM_DIR && python $AGENT_BINARY --config-file $QUANTUM_CONF --config-file /$Q_PLUGIN_CONF_FILE.domU" + screen_it q-domua "cd $NEUTRON_DIR && python $AGENT_BINARY --config-file $NEUTRON_CONF --config-file /$Q_PLUGIN_CONF_FILE.domU" fi if is_service_enabled q-lbaas; then - screen_it q-lbaas "cd $QUANTUM_DIR && python $AGENT_LBAAS_BINARY --config-file $QUANTUM_CONF --config-file=$LBAAS_AGENT_CONF_FILENAME" + screen_it q-lbaas "cd $NEUTRON_DIR && python $AGENT_LBAAS_BINARY --config-file $NEUTRON_CONF --config-file=$LBAAS_AGENT_CONF_FILENAME" fi } -# stop_quantum() - Stop running processes (non-screen) -function stop_quantum() { +# stop_neutron() - Stop running processes (non-screen) +function stop_neutron() { if is_service_enabled q-dhcp; then pid=$(ps aux | awk '/[d]nsmasq.+interface=(tap|ns-)/ { print $2 }') [ ! -z "$pid" ] && sudo kill -9 $pid fi if is_service_enabled q-meta; then - pid=$(ps aux | awk '/quantum-ns-metadata-proxy/ { print $2 }') + pid=$(ps aux | awk '/neutron-ns-metadata-proxy/ { print $2 }') [ ! -z "$pid" ] && sudo kill -9 $pid fi } -# cleanup_quantum() - Remove residual data files, anything left over from previous +# cleanup_neutron() - Remove residual data files, anything left over from previous # runs that a clean run would need to clean up -function cleanup_quantum() { - if is_quantum_ovs_base_plugin; then - quantum_ovs_base_cleanup +function cleanup_neutron() { + if is_neutron_ovs_base_plugin; then + neutron_ovs_base_cleanup fi - # delete all namespaces created by quantum + # delete all namespaces created by neutron for ns in $(sudo ip netns list | grep -o -e qdhcp-[0-9a-f\-]* -e qrouter-[0-9a-f\-]*); do sudo ip netns delete ${ns} done } -# _configure_quantum_common() -# Set common config for all quantum server and agents. -# This MUST be called before other ``_configure_quantum_*`` functions. -function _configure_quantum_common() { - # Put config files in ``QUANTUM_CONF_DIR`` for everyone to find - if [[ ! -d $QUANTUM_CONF_DIR ]]; then - sudo mkdir -p $QUANTUM_CONF_DIR +# _configure_neutron_common() +# Set common config for all neutron server and agents. +# This MUST be called before other ``_configure_neutron_*`` functions. +function _configure_neutron_common() { + # Put config files in ``NEUTRON_CONF_DIR`` for everyone to find + if [[ ! -d $NEUTRON_CONF_DIR ]]; then + sudo mkdir -p $NEUTRON_CONF_DIR fi - sudo chown $STACK_USER $QUANTUM_CONF_DIR + sudo chown $STACK_USER $NEUTRON_CONF_DIR - cp $QUANTUM_DIR/etc/quantum.conf $QUANTUM_CONF + cp $NEUTRON_DIR/etc/neutron.conf $NEUTRON_CONF # Set plugin-specific variables ``Q_DB_NAME``, ``Q_PLUGIN_CLASS``. # For main plugin config file, set ``Q_PLUGIN_CONF_PATH``, ``Q_PLUGIN_CONF_FILENAME``. # For addition plugin config files, set ``Q_PLUGIN_EXTRA_CONF_PATH``, # ``Q_PLUGIN_EXTRA_CONF_FILES``. For example: # ``Q_PLUGIN_EXTRA_CONF_FILES=(file1, file2)`` - quantum_plugin_configure_common + neutron_plugin_configure_common if [[ $Q_PLUGIN_CONF_PATH == '' || $Q_PLUGIN_CONF_FILENAME == '' || $Q_PLUGIN_CLASS == '' ]]; then - die $LINENO "Quantum plugin not set.. exiting" + die $LINENO "Neutron plugin not set.. exiting" fi - # If needed, move config file from ``$QUANTUM_DIR/etc/quantum`` to ``QUANTUM_CONF_DIR`` + # If needed, move config file from ``$NEUTRON_DIR/etc/neutron`` to ``NEUTRON_CONF_DIR`` mkdir -p /$Q_PLUGIN_CONF_PATH Q_PLUGIN_CONF_FILE=$Q_PLUGIN_CONF_PATH/$Q_PLUGIN_CONF_FILENAME - cp $QUANTUM_DIR/$Q_PLUGIN_CONF_FILE /$Q_PLUGIN_CONF_FILE + cp $NEUTRON_DIR/$Q_PLUGIN_CONF_FILE /$Q_PLUGIN_CONF_FILE iniset /$Q_PLUGIN_CONF_FILE database connection `database_connection_url $Q_DB_NAME` - iniset $QUANTUM_CONF DEFAULT state_path $DATA_DIR/quantum + iniset $NEUTRON_CONF DEFAULT state_path $DATA_DIR/neutron # If addition config files are set, make sure their path name is set as well if [[ ${#Q_PLUGIN_EXTRA_CONF_FILES[@]} > 0 && $Q_PLUGIN_EXTRA_CONF_PATH == '' ]]; then - die $LINENO "Quantum additional plugin config not set.. exiting" + die $LINENO "Neutron additional plugin config not set.. exiting" fi - # If additional config files exist, copy them over to quantum configuration + # If additional config files exist, copy them over to neutron configuration # directory if [[ $Q_PLUGIN_EXTRA_CONF_PATH != '' ]]; then mkdir -p /$Q_PLUGIN_EXTRA_CONF_PATH local f for (( f=0; $f < ${#Q_PLUGIN_EXTRA_CONF_FILES[@]}; f+=1 )); do Q_PLUGIN_EXTRA_CONF_FILES[$f]=$Q_PLUGIN_EXTRA_CONF_PATH/${Q_PLUGIN_EXTRA_CONF_FILES[$f]} - cp $QUANTUM_DIR/${Q_PLUGIN_EXTRA_CONF_FILES[$f]} /${Q_PLUGIN_EXTRA_CONF_FILES[$f]} + cp $NEUTRON_DIR/${Q_PLUGIN_EXTRA_CONF_FILES[$f]} /${Q_PLUGIN_EXTRA_CONF_FILES[$f]} done fi - _quantum_setup_rootwrap + _neutron_setup_rootwrap } -function _configure_quantum_debug_command() { +function _configure_neutron_debug_command() { if [[ "$Q_USE_DEBUG_COMMAND" != "True" ]]; then return fi - cp $QUANTUM_DIR/etc/l3_agent.ini $QUANTUM_TEST_CONFIG_FILE + cp $NEUTRON_DIR/etc/l3_agent.ini $NEUTRON_TEST_CONFIG_FILE - iniset $QUANTUM_TEST_CONFIG_FILE DEFAULT verbose False - iniset $QUANTUM_TEST_CONFIG_FILE DEFAULT debug False - iniset $QUANTUM_TEST_CONFIG_FILE DEFAULT use_namespaces $Q_USE_NAMESPACE - iniset $QUANTUM_TEST_CONFIG_FILE DEFAULT root_helper "$Q_RR_COMMAND" - # Intermediate fix until Quantum patch lands and then line above will + iniset $NEUTRON_TEST_CONFIG_FILE DEFAULT verbose False + iniset $NEUTRON_TEST_CONFIG_FILE DEFAULT debug False + iniset $NEUTRON_TEST_CONFIG_FILE DEFAULT use_namespaces $Q_USE_NAMESPACE + iniset $NEUTRON_TEST_CONFIG_FILE DEFAULT root_helper "$Q_RR_COMMAND" + # Intermediate fix until Neutron patch lands and then line above will # be cleaned. - iniset $QUANTUM_TEST_CONFIG_FILE agent root_helper "$Q_RR_COMMAND" + iniset $NEUTRON_TEST_CONFIG_FILE agent root_helper "$Q_RR_COMMAND" - _quantum_setup_keystone $QUANTUM_TEST_CONFIG_FILE DEFAULT set_auth_url - _quantum_setup_interface_driver $QUANTUM_TEST_CONFIG_FILE + _neutron_setup_keystone $NEUTRON_TEST_CONFIG_FILE DEFAULT set_auth_url + _neutron_setup_interface_driver $NEUTRON_TEST_CONFIG_FILE - quantum_plugin_configure_debug_command + neutron_plugin_configure_debug_command } -function _configure_quantum_dhcp_agent() { - AGENT_DHCP_BINARY="$QUANTUM_DIR/bin/quantum-dhcp-agent" - Q_DHCP_CONF_FILE=$QUANTUM_CONF_DIR/dhcp_agent.ini +function _configure_neutron_dhcp_agent() { + AGENT_DHCP_BINARY="$NEUTRON_BIN_DIR/neutron-dhcp-agent" + Q_DHCP_CONF_FILE=$NEUTRON_CONF_DIR/dhcp_agent.ini - cp $QUANTUM_DIR/etc/dhcp_agent.ini $Q_DHCP_CONF_FILE + cp $NEUTRON_DIR/etc/dhcp_agent.ini $Q_DHCP_CONF_FILE iniset $Q_DHCP_CONF_FILE DEFAULT verbose True iniset $Q_DHCP_CONF_FILE DEFAULT debug True iniset $Q_DHCP_CONF_FILE DEFAULT use_namespaces $Q_USE_NAMESPACE iniset $Q_DHCP_CONF_FILE DEFAULT root_helper "$Q_RR_COMMAND" - _quantum_setup_keystone $Q_DHCP_CONF_FILE DEFAULT set_auth_url - _quantum_setup_interface_driver $Q_DHCP_CONF_FILE + _neutron_setup_keystone $Q_DHCP_CONF_FILE DEFAULT set_auth_url + _neutron_setup_interface_driver $Q_DHCP_CONF_FILE - quantum_plugin_configure_dhcp_agent + neutron_plugin_configure_dhcp_agent } -function _configure_quantum_l3_agent() { +function _configure_neutron_l3_agent() { Q_L3_ENABLED=True # for l3-agent, only use per tenant router if we have namespaces Q_L3_ROUTER_PER_TENANT=$Q_USE_NAMESPACE - AGENT_L3_BINARY="$QUANTUM_DIR/bin/quantum-l3-agent" - Q_L3_CONF_FILE=$QUANTUM_CONF_DIR/l3_agent.ini + AGENT_L3_BINARY="$NEUTRON_BIN_DIR/neutron-l3-agent" + Q_L3_CONF_FILE=$NEUTRON_CONF_DIR/l3_agent.ini - cp $QUANTUM_DIR/etc/l3_agent.ini $Q_L3_CONF_FILE + cp $NEUTRON_DIR/etc/l3_agent.ini $Q_L3_CONF_FILE iniset $Q_L3_CONF_FILE DEFAULT verbose True iniset $Q_L3_CONF_FILE DEFAULT debug True iniset $Q_L3_CONF_FILE DEFAULT use_namespaces $Q_USE_NAMESPACE iniset $Q_L3_CONF_FILE DEFAULT root_helper "$Q_RR_COMMAND" - _quantum_setup_keystone $Q_L3_CONF_FILE DEFAULT set_auth_url - _quantum_setup_interface_driver $Q_L3_CONF_FILE + _neutron_setup_keystone $Q_L3_CONF_FILE DEFAULT set_auth_url + _neutron_setup_interface_driver $Q_L3_CONF_FILE - quantum_plugin_configure_l3_agent + neutron_plugin_configure_l3_agent } -function _configure_quantum_metadata_agent() { - AGENT_META_BINARY="$QUANTUM_DIR/bin/quantum-metadata-agent" - Q_META_CONF_FILE=$QUANTUM_CONF_DIR/metadata_agent.ini +function _configure_neutron_metadata_agent() { + AGENT_META_BINARY="$NEUTRON_BIN_DIR/neutron-metadata-agent" + Q_META_CONF_FILE=$NEUTRON_CONF_DIR/metadata_agent.ini - cp $QUANTUM_DIR/etc/metadata_agent.ini $Q_META_CONF_FILE + cp $NEUTRON_DIR/etc/metadata_agent.ini $Q_META_CONF_FILE iniset $Q_META_CONF_FILE DEFAULT verbose True iniset $Q_META_CONF_FILE DEFAULT debug True iniset $Q_META_CONF_FILE DEFAULT nova_metadata_ip $Q_META_DATA_IP iniset $Q_META_CONF_FILE DEFAULT root_helper "$Q_RR_COMMAND" - _quantum_setup_keystone $Q_META_CONF_FILE DEFAULT set_auth_url + _neutron_setup_keystone $Q_META_CONF_FILE DEFAULT set_auth_url } -function _configure_quantum_lbaas() { - quantum_agent_lbaas_configure_common - quantum_agent_lbaas_configure_agent +function _configure_neutron_lbaas() { + neutron_agent_lbaas_configure_common + neutron_agent_lbaas_configure_agent } -# _configure_quantum_plugin_agent() - Set config files for quantum plugin agent +# _configure_neutron_plugin_agent() - Set config files for neutron plugin agent # It is called when q-agt is enabled. -function _configure_quantum_plugin_agent() { +function _configure_neutron_plugin_agent() { # Specify the default root helper prior to agent configuration to # ensure that an agent's configuration can override the default iniset /$Q_PLUGIN_CONF_FILE agent root_helper "$Q_RR_COMMAND" - iniset $QUANTUM_CONF DEFAULT verbose True - iniset $QUANTUM_CONF DEFAULT debug True + iniset $NEUTRON_CONF DEFAULT verbose True + iniset $NEUTRON_CONF DEFAULT debug True # Configure agent for plugin - quantum_plugin_configure_plugin_agent + neutron_plugin_configure_plugin_agent } -# _configure_quantum_service() - Set config files for quantum service +# _configure_neutron_service() - Set config files for neutron service # It is called when q-svc is enabled. -function _configure_quantum_service() { - Q_API_PASTE_FILE=$QUANTUM_CONF_DIR/api-paste.ini - Q_POLICY_FILE=$QUANTUM_CONF_DIR/policy.json +function _configure_neutron_service() { + Q_API_PASTE_FILE=$NEUTRON_CONF_DIR/api-paste.ini + Q_POLICY_FILE=$NEUTRON_CONF_DIR/policy.json - cp $QUANTUM_DIR/etc/api-paste.ini $Q_API_PASTE_FILE - cp $QUANTUM_DIR/etc/policy.json $Q_POLICY_FILE + cp $NEUTRON_DIR/etc/api-paste.ini $Q_API_PASTE_FILE + cp $NEUTRON_DIR/etc/policy.json $Q_POLICY_FILE if is_service_enabled $DATABASE_BACKENDS; then recreate_database $Q_DB_NAME utf8 else - die $LINENO "A database must be enabled in order to use the $Q_PLUGIN Quantum plugin." + die $LINENO "A database must be enabled in order to use the $Q_PLUGIN Neutron plugin." fi # Update either configuration file with plugin - iniset $QUANTUM_CONF DEFAULT core_plugin $Q_PLUGIN_CLASS + iniset $NEUTRON_CONF DEFAULT core_plugin $Q_PLUGIN_CLASS if [[ $Q_SERVICE_PLUGIN_CLASSES != '' ]]; then - iniset $QUANTUM_CONF DEFAULT service_plugins $Q_SERVICE_PLUGIN_CLASSES + iniset $NEUTRON_CONF DEFAULT service_plugins $Q_SERVICE_PLUGIN_CLASSES fi - iniset $QUANTUM_CONF DEFAULT verbose True - iniset $QUANTUM_CONF DEFAULT debug True - iniset $QUANTUM_CONF DEFAULT policy_file $Q_POLICY_FILE - iniset $QUANTUM_CONF DEFAULT allow_overlapping_ips $Q_ALLOW_OVERLAPPING_IP + iniset $NEUTRON_CONF DEFAULT verbose True + iniset $NEUTRON_CONF DEFAULT debug True + iniset $NEUTRON_CONF DEFAULT policy_file $Q_POLICY_FILE + iniset $NEUTRON_CONF DEFAULT allow_overlapping_ips $Q_ALLOW_OVERLAPPING_IP - iniset $QUANTUM_CONF DEFAULT auth_strategy $Q_AUTH_STRATEGY - _quantum_setup_keystone $QUANTUM_CONF keystone_authtoken + iniset $NEUTRON_CONF DEFAULT auth_strategy $Q_AUTH_STRATEGY + _neutron_setup_keystone $NEUTRON_CONF keystone_authtoken # Configure plugin - quantum_plugin_configure_service + neutron_plugin_configure_service } # Utility Functions #------------------ -# _quantum_setup_rootwrap() - configure Quantum's rootwrap -function _quantum_setup_rootwrap() { +# _neutron_setup_rootwrap() - configure Neutron's rootwrap +function _neutron_setup_rootwrap() { if [[ "$Q_USE_ROOTWRAP" == "False" ]]; then return fi # Deploy new rootwrap filters files (owned by root). # Wipe any existing ``rootwrap.d`` files first - Q_CONF_ROOTWRAP_D=$QUANTUM_CONF_DIR/rootwrap.d + Q_CONF_ROOTWRAP_D=$NEUTRON_CONF_DIR/rootwrap.d if [[ -d $Q_CONF_ROOTWRAP_D ]]; then sudo rm -rf $Q_CONF_ROOTWRAP_D fi - # Deploy filters to ``$QUANTUM_CONF_DIR/rootwrap.d`` + # Deploy filters to ``$NEUTRON_CONF_DIR/rootwrap.d`` mkdir -p -m 755 $Q_CONF_ROOTWRAP_D - cp -pr $QUANTUM_DIR/etc/quantum/rootwrap.d/* $Q_CONF_ROOTWRAP_D/ + cp -pr $NEUTRON_DIR/etc/neutron/rootwrap.d/* $Q_CONF_ROOTWRAP_D/ sudo chown -R root:root $Q_CONF_ROOTWRAP_D sudo chmod 644 $Q_CONF_ROOTWRAP_D/* - # Set up ``rootwrap.conf``, pointing to ``$QUANTUM_CONF_DIR/rootwrap.d`` + # Set up ``rootwrap.conf``, pointing to ``$NEUTRON_CONF_DIR/rootwrap.d`` # location moved in newer versions, prefer new location - if test -r $QUANTUM_DIR/etc/quantum/rootwrap.conf; then - sudo cp -p $QUANTUM_DIR/etc/quantum/rootwrap.conf $Q_RR_CONF_FILE + if test -r $NEUTRON_DIR/etc/neutron/rootwrap.conf; then + sudo cp -p $NEUTRON_DIR/etc/neutron/rootwrap.conf $Q_RR_CONF_FILE else - sudo cp -p $QUANTUM_DIR/etc/rootwrap.conf $Q_RR_CONF_FILE + sudo cp -p $NEUTRON_DIR/etc/rootwrap.conf $Q_RR_CONF_FILE fi sudo sed -e "s:^filters_path=.*$:filters_path=$Q_CONF_ROOTWRAP_D:" -i $Q_RR_CONF_FILE sudo chown root:root $Q_RR_CONF_FILE sudo chmod 0644 $Q_RR_CONF_FILE - # Specify ``rootwrap.conf`` as first parameter to quantum-rootwrap - ROOTWRAP_SUDOER_CMD="$QUANTUM_ROOTWRAP $Q_RR_CONF_FILE *" + # Specify ``rootwrap.conf`` as first parameter to neutron-rootwrap + ROOTWRAP_SUDOER_CMD="$NEUTRON_ROOTWRAP $Q_RR_CONF_FILE *" - # Set up the rootwrap sudoers for quantum + # Set up the rootwrap sudoers for neutron TEMPFILE=`mktemp` echo "$USER ALL=(root) NOPASSWD: $ROOTWRAP_SUDOER_CMD" >$TEMPFILE chmod 0440 $TEMPFILE sudo chown root:root $TEMPFILE - sudo mv $TEMPFILE /etc/sudoers.d/quantum-rootwrap + sudo mv $TEMPFILE /etc/sudoers.d/neutron-rootwrap # Update the root_helper - iniset $QUANTUM_CONF agent root_helper "$Q_RR_COMMAND" + iniset $NEUTRON_CONF agent root_helper "$Q_RR_COMMAND" } -# Configures keystone integration for quantum service and agents -function _quantum_setup_keystone() { +# Configures keystone integration for neutron service and agents +function _neutron_setup_keystone() { local conf_file=$1 local section=$2 local use_auth_url=$3 @@ -669,58 +676,58 @@ function _quantum_setup_keystone() { iniset $conf_file $section admin_tenant_name $SERVICE_TENANT_NAME iniset $conf_file $section admin_user $Q_ADMIN_USERNAME iniset $conf_file $section admin_password $SERVICE_PASSWORD - iniset $conf_file $section signing_dir $QUANTUM_AUTH_CACHE_DIR + iniset $conf_file $section signing_dir $NEUTRON_AUTH_CACHE_DIR # Create cache dir - sudo mkdir -p $QUANTUM_AUTH_CACHE_DIR - sudo chown $STACK_USER $QUANTUM_AUTH_CACHE_DIR - rm -f $QUANTUM_AUTH_CACHE_DIR/* + sudo mkdir -p $NEUTRON_AUTH_CACHE_DIR + sudo chown $STACK_USER $NEUTRON_AUTH_CACHE_DIR + rm -f $NEUTRON_AUTH_CACHE_DIR/* } -function _quantum_setup_interface_driver() { +function _neutron_setup_interface_driver() { # ovs_use_veth needs to be set before the plugin configuration # occurs to allow plugins to override the setting. iniset $1 DEFAULT ovs_use_veth $Q_OVS_USE_VETH - quantum_plugin_setup_interface_driver $1 + neutron_plugin_setup_interface_driver $1 } -# Functions for Quantum Exercises +# Functions for Neutron Exercises #-------------------------------- function delete_probe() { local from_net="$1" net_id=`_get_net_id $from_net` - probe_id=`quantum-debug --os-tenant-name admin --os-username admin --os-password $ADMIN_PASSWORD probe-list -c id -c network_id | grep $net_id | awk '{print $2}'` - quantum-debug --os-tenant-name admin --os-username admin probe-delete $probe_id + probe_id=`neutron-debug --os-tenant-name admin --os-username admin --os-password $ADMIN_PASSWORD probe-list -c id -c network_id | grep $net_id | awk '{print $2}'` + neutron-debug --os-tenant-name admin --os-username admin probe-delete $probe_id } -function setup_quantum_debug() { +function setup_neutron_debug() { if [[ "$Q_USE_DEBUG_COMMAND" == "True" ]]; then public_net_id=`_get_net_id $PUBLIC_NETWORK_NAME` - quantum-debug --os-tenant-name admin --os-username admin --os-password $ADMIN_PASSWORD probe-create --device-owner compute $public_net_id + neutron-debug --os-tenant-name admin --os-username admin --os-password $ADMIN_PASSWORD probe-create --device-owner compute $public_net_id private_net_id=`_get_net_id $PRIVATE_NETWORK_NAME` - quantum-debug --os-tenant-name admin --os-username admin --os-password $ADMIN_PASSWORD probe-create --device-owner compute $private_net_id + neutron-debug --os-tenant-name admin --os-username admin --os-password $ADMIN_PASSWORD probe-create --device-owner compute $private_net_id fi } -function teardown_quantum_debug() { +function teardown_neutron_debug() { delete_probe $PUBLIC_NETWORK_NAME delete_probe $PRIVATE_NETWORK_NAME } function _get_net_id() { - quantum --os-tenant-name admin --os-username admin --os-password $ADMIN_PASSWORD net-list | grep $1 | awk '{print $2}' + neutron --os-tenant-name admin --os-username admin --os-password $ADMIN_PASSWORD net-list | grep $1 | awk '{print $2}' } function _get_probe_cmd_prefix() { local from_net="$1" net_id=`_get_net_id $from_net` - probe_id=`quantum-debug --os-tenant-name admin --os-username admin --os-password $ADMIN_PASSWORD probe-list -c id -c network_id | grep $net_id | awk '{print $2}' | head -n 1` + probe_id=`neutron-debug --os-tenant-name admin --os-username admin --os-password $ADMIN_PASSWORD probe-list -c id -c network_id | grep $net_id | awk '{print $2}' | head -n 1` echo "$Q_RR_COMMAND ip netns exec qprobe-$probe_id" } -function _ping_check_quantum() { +function _ping_check_neutron() { local from_net=$1 local ip=$2 local timeout_sec=$3 @@ -742,7 +749,7 @@ function _ping_check_quantum() { } # ssh check -function _ssh_check_quantum() { +function _ssh_check_neutron() { local from_net=$1 local key_file=$2 local ip=$3 @@ -755,48 +762,48 @@ function _ssh_check_quantum() { fi } -# Quantum 3rd party programs +# Neutron 3rd party programs #--------------------------- -# please refer to ``lib/quantum_thirdparty/README.md`` for details -QUANTUM_THIRD_PARTIES="" -for f in $TOP_DIR/lib/quantum_thirdparty/*; do +# please refer to ``lib/neutron_thirdparty/README.md`` for details +NEUTRON_THIRD_PARTIES="" +for f in $TOP_DIR/lib/neutron_thirdparty/*; do third_party=$(basename $f) if is_service_enabled $third_party; then - source $TOP_DIR/lib/quantum_thirdparty/$third_party - QUANTUM_THIRD_PARTIES="$QUANTUM_THIRD_PARTIES,$third_party" + source $TOP_DIR/lib/neutron_thirdparty/$third_party + NEUTRON_THIRD_PARTIES="$NEUTRON_THIRD_PARTIES,$third_party" fi done -function _quantum_third_party_do() { - for third_party in ${QUANTUM_THIRD_PARTIES//,/ }; do +function _neutron_third_party_do() { + for third_party in ${NEUTRON_THIRD_PARTIES//,/ }; do ${1}_${third_party} done } -# configure_quantum_third_party() - Set config files, create data dirs, etc -function configure_quantum_third_party() { - _quantum_third_party_do configure +# configure_neutron_third_party() - Set config files, create data dirs, etc +function configure_neutron_third_party() { + _neutron_third_party_do configure } -# init_quantum_third_party() - Initialize databases, etc. -function init_quantum_third_party() { - _quantum_third_party_do init +# init_neutron_third_party() - Initialize databases, etc. +function init_neutron_third_party() { + _neutron_third_party_do init } -# install_quantum_third_party() - Collect source and prepare -function install_quantum_third_party() { - _quantum_third_party_do install +# install_neutron_third_party() - Collect source and prepare +function install_neutron_third_party() { + _neutron_third_party_do install } -# start_quantum_third_party() - Start running processes, including screen -function start_quantum_third_party() { - _quantum_third_party_do start +# start_neutron_third_party() - Start running processes, including screen +function start_neutron_third_party() { + _neutron_third_party_do start } -# stop_quantum_third_party - Stop running processes (non-screen) -function stop_quantum_third_party() { - _quantum_third_party_do stop +# stop_neutron_third_party - Stop running processes (non-screen) +function stop_neutron_third_party() { + _neutron_third_party_do stop } diff --git a/lib/neutron_plugins/README.md b/lib/neutron_plugins/README.md new file mode 100644 index 0000000000..be8fd96677 --- /dev/null +++ b/lib/neutron_plugins/README.md @@ -0,0 +1,38 @@ +Neutron plugin specific files +============================= +Neutron plugins require plugin specific behavior. +The files under the directory, ``lib/neutron_plugins/``, will be used +when their service is enabled. +Each plugin has ``lib/neutron_plugins/$Q_PLUGIN`` and define the following +functions. +Plugin specific configuration variables should be in this file. + +* filename: ``$Q_PLUGIN`` + * The corresponding file name MUST be the same to plugin name ``$Q_PLUGIN``. + Plugin specific configuration variables should be in this file. + +functions +--------- +``lib/neutron`` calls the following functions when the ``$Q_PLUGIN`` is enabled + +* ``neutron_plugin_create_nova_conf`` : + set ``NOVA_VIF_DRIVER`` and optionally set options in nova_conf + e.g. + NOVA_VIF_DRIVER=${NOVA_VIF_DRIVER:-"nova.virt.libvirt.vif.LibvirtGenericVIFDriver"} +* ``neutron_plugin_install_agent_packages`` : + install packages that is specific to plugin agent + e.g. + install_package bridge-utils +* ``neutron_plugin_configure_common`` : + set plugin-specific variables, ``Q_PLUGIN_CONF_PATH``, ``Q_PLUGIN_CONF_FILENAME``, + ``Q_DB_NAME``, ``Q_PLUGIN_CLASS`` +* ``neutron_plugin_configure_debug_command`` +* ``neutron_plugin_configure_dhcp_agent`` +* ``neutron_plugin_configure_l3_agent`` +* ``neutron_plugin_configure_plugin_agent`` +* ``neutron_plugin_configure_service`` +* ``neutron_plugin_setup_interface_driver`` +* ``has_neutron_plugin_security_group``: + return 0 if the plugin support neutron security group otherwise return 1 +* ``neutron_plugin_check_adv_test_requirements``: + return 0 if requirements are satisfied otherwise return 1 diff --git a/lib/neutron_plugins/bigswitch_floodlight b/lib/neutron_plugins/bigswitch_floodlight new file mode 100644 index 0000000000..24507312c7 --- /dev/null +++ b/lib/neutron_plugins/bigswitch_floodlight @@ -0,0 +1,74 @@ +# Neuton Big Switch/FloodLight plugin +# ------------------------------------ + +# Save trace setting +MY_XTRACE=$(set +o | grep xtrace) +set +o xtrace + +source $TOP_DIR/lib/neutron_plugins/ovs_base +source $TOP_DIR/lib/neutron_thirdparty/bigswitch_floodlight # for third party service specific configuration values + +function neutron_plugin_create_nova_conf() { + NOVA_VIF_DRIVER=${NOVA_VIF_DRIVER:-"nova.virt.libvirt.vif.LibvirtGenericVIFDriver"} +} + +function neutron_plugin_install_agent_packages() { + _neutron_ovs_base_install_agent_packages +} + +function neutron_plugin_configure_common() { + Q_PLUGIN_CONF_PATH=etc/neutron/plugins/bigswitch + Q_PLUGIN_CONF_FILENAME=restproxy.ini + Q_DB_NAME="restproxy_neutron" + Q_PLUGIN_CLASS="neutron.plugins.bigswitch.plugin.NeutronRestProxyV2" + BS_FL_CONTROLLERS_PORT=${BS_FL_CONTROLLERS_PORT:-localhost:80} + BS_FL_CONTROLLER_TIMEOUT=${BS_FL_CONTROLLER_TIMEOUT:-10} +} + +function neutron_plugin_configure_debug_command() { + _neutron_ovs_base_configure_debug_command +} + +function neutron_plugin_configure_dhcp_agent() { + : +} + +function neutron_plugin_configure_l3_agent() { + _neutron_ovs_base_configure_l3_agent +} + +function neutron_plugin_configure_plugin_agent() { + : +} + +function neutron_plugin_configure_service() { + iniset /$Q_PLUGIN_CONF_FILE restproxy servers $BS_FL_CONTROLLERS_PORT + iniset /$Q_PLUGIN_CONF_FILE restproxy servertimeout $BS_FL_CONTROLLER_TIMEOUT + if [ "$BS_FL_VIF_DRIVER" = "ivs" ] + then + iniset /$Q_PLUGIN_CONF_FILE nova vif_type ivs + fi +} + +function neutron_plugin_setup_interface_driver() { + local conf_file=$1 + if [ "$BS_FL_VIF_DRIVER" = "ivs" ] + then + iniset $conf_file DEFAULT interface_driver neutron.agent.linux.interface.IVSInterfaceDriver + else + iniset $conf_file DEFAULT interface_driver neutron.agent.linux.interface.OVSInterfaceDriver + fi +} + + +function has_neutron_plugin_security_group() { + # 1 means False here + return 1 +} + +function neutron_plugin_check_adv_test_requirements() { + is_service_enabled q-agt && is_service_enabled q-dhcp && return 0 +} + +# Restore xtrace +$MY_XTRACE diff --git a/lib/neutron_plugins/brocade b/lib/neutron_plugins/brocade new file mode 100644 index 0000000000..f9275cacc2 --- /dev/null +++ b/lib/neutron_plugins/brocade @@ -0,0 +1,59 @@ +# Brocade Neutron Plugin +# ---------------------- + +# Save trace setting +BRCD_XTRACE=$(set +o | grep xtrace) +set +o xtrace + +function is_neutron_ovs_base_plugin() { + return 1 +} + +function neutron_plugin_create_nova_conf() { + NOVA_VIF_DRIVER=${NOVA_VIF_DRIVER:-"nova.virt.libvirt.vif.LibvirtGenericVIFDriver"} +} + +function neutron_plugin_install_agent_packages() { + install_package bridge-utils +} + +function neutron_plugin_configure_common() { + Q_PLUGIN_CONF_PATH=etc/neutron/plugins/brocade + Q_PLUGIN_CONF_FILENAME=brocade.ini + Q_DB_NAME="brcd_neutron" + Q_PLUGIN_CLASS="neutron.plugins.brocade.NeutronPlugin.BrocadePluginV2" +} + +function neutron_plugin_configure_debug_command() { + iniset $NEUTRON_TEST_CONFIG_FILE DEFAULT external_network_bridge +} + +function neutron_plugin_configure_dhcp_agent() { + iniset $Q_DHCP_CONF_FILE DEFAULT dhcp_agent_manager neutron.agent.dhcp_agent.DhcpAgentWithStateReport +} + +function neutron_plugin_configure_l3_agent() { + iniset $Q_L3_CONF_FILE DEFAULT external_network_bridge + iniset $Q_L3_CONF_FILE DEFAULT l3_agent_manager neutron.agent.l3_agent.L3NATAgentWithStateReport +} + +function neutron_plugin_configure_plugin_agent() { + AGENT_BINARY="$NEUTON_BIN_DIR/neutron-linuxbridge-agent" +} + +function neutron_plugin_setup_interface_driver() { + local conf_file=$1 + iniset $conf_file DEFAULT interface_driver neutron.agent.linux.interface.BridgeInterfaceDriver +} + +function has_neutron_plugin_security_group() { + # 0 means True here + return 0 +} + +function neutron_plugin_check_adv_test_requirements() { + is_service_enabled q-agt && is_service_enabled q-dhcp && return 0 +} + +# Restore xtrace +$BRCD_XTRACE diff --git a/lib/quantum_plugins/cisco b/lib/neutron_plugins/cisco similarity index 79% rename from lib/quantum_plugins/cisco rename to lib/neutron_plugins/cisco index 92b91e4526..8948be6de4 100644 --- a/lib/quantum_plugins/cisco +++ b/lib/neutron_plugins/cisco @@ -1,4 +1,4 @@ -# Quantum Cisco plugin +# Neutron Cisco plugin # --------------------------- # Save trace setting @@ -86,17 +86,17 @@ function _config_switch() { # Prefix openvswitch plugin routines with "ovs" in order to differentiate from # cisco plugin routines. This means, ovs plugin routines will coexist with cisco # plugin routines in this script. -source $TOP_DIR/lib/quantum_plugins/openvswitch -_prefix_function quantum_plugin_create_nova_conf ovs -_prefix_function quantum_plugin_install_agent_packages ovs -_prefix_function quantum_plugin_configure_common ovs -_prefix_function quantum_plugin_configure_debug_command ovs -_prefix_function quantum_plugin_configure_dhcp_agent ovs -_prefix_function quantum_plugin_configure_l3_agent ovs -_prefix_function quantum_plugin_configure_plugin_agent ovs -_prefix_function quantum_plugin_configure_service ovs -_prefix_function quantum_plugin_setup_interface_driver ovs -_prefix_function has_quantum_plugin_security_group ovs +source $TOP_DIR/lib/neutron_plugins/openvswitch +_prefix_function neutron_plugin_create_nova_conf ovs +_prefix_function neutron_plugin_install_agent_packages ovs +_prefix_function neutron_plugin_configure_common ovs +_prefix_function neutron_plugin_configure_debug_command ovs +_prefix_function neutron_plugin_configure_dhcp_agent ovs +_prefix_function neutron_plugin_configure_l3_agent ovs +_prefix_function neutron_plugin_configure_plugin_agent ovs +_prefix_function neutron_plugin_configure_service ovs +_prefix_function neutron_plugin_setup_interface_driver ovs +_prefix_function has_neutron_plugin_security_group ovs # Check the version of the installed ncclient package function check_ncclient_version() { @@ -144,66 +144,66 @@ function is_ncclient_installed() { return 0 } -function has_quantum_plugin_security_group() { +function has_neutron_plugin_security_group() { if _has_ovs_subplugin; then - ovs_has_quantum_plugin_security_group + ovs_has_neutron_plugin_security_group else return 1 fi } -function is_quantum_ovs_base_plugin() { +function is_neutron_ovs_base_plugin() { # Cisco uses OVS if openvswitch subplugin is deployed _has_ovs_subplugin return } # populate required nova configuration parameters -function quantum_plugin_create_nova_conf() { +function neutron_plugin_create_nova_conf() { if _has_ovs_subplugin; then - ovs_quantum_plugin_create_nova_conf + ovs_neutron_plugin_create_nova_conf else - _quantum_ovs_base_configure_nova_vif_driver + _neutron_ovs_base_configure_nova_vif_driver fi } -function quantum_plugin_install_agent_packages() { +function neutron_plugin_install_agent_packages() { # Cisco plugin uses openvswitch to operate in one of its configurations - ovs_quantum_plugin_install_agent_packages + ovs_neutron_plugin_install_agent_packages } # Configure common parameters -function quantum_plugin_configure_common() { +function neutron_plugin_configure_common() { # setup default subplugins if [ ! -v Q_CISCO_PLUGIN_SUBPLUGINS ]; then declare -ga Q_CISCO_PLUGIN_SUBPLUGINS Q_CISCO_PLUGIN_SUBPLUGINS=(openvswitch nexus) fi if _has_ovs_subplugin; then - ovs_quantum_plugin_configure_common - Q_PLUGIN_EXTRA_CONF_PATH=etc/quantum/plugins/cisco + ovs_neutron_plugin_configure_common + Q_PLUGIN_EXTRA_CONF_PATH=etc/neutron/plugins/cisco Q_PLUGIN_EXTRA_CONF_FILES=(cisco_plugins.ini) else - Q_PLUGIN_CONF_PATH=etc/quantum/plugins/cisco + Q_PLUGIN_CONF_PATH=etc/neutron/plugins/cisco Q_PLUGIN_CONF_FILENAME=cisco_plugins.ini fi - Q_PLUGIN_CLASS="quantum.plugins.cisco.network_plugin.PluginV2" - Q_DB_NAME=cisco_quantum + Q_PLUGIN_CLASS="neutron.plugins.cisco.network_plugin.PluginV2" + Q_DB_NAME=cisco_neutron } -function quantum_plugin_configure_debug_command() { +function neutron_plugin_configure_debug_command() { if _has_ovs_subplugin; then - ovs_quantum_plugin_configure_debug_command + ovs_neutron_plugin_configure_debug_command fi } -function quantum_plugin_configure_dhcp_agent() { - iniset $Q_DHCP_CONF_FILE DEFAULT dhcp_agent_manager quantum.agent.dhcp_agent.DhcpAgentWithStateReport +function neutron_plugin_configure_dhcp_agent() { + iniset $Q_DHCP_CONF_FILE DEFAULT dhcp_agent_manager neutron.agent.dhcp_agent.DhcpAgentWithStateReport } -function quantum_plugin_configure_l3_agent() { +function neutron_plugin_configure_l3_agent() { if _has_ovs_subplugin; then - ovs_quantum_plugin_configure_l3_agent + ovs_neutron_plugin_configure_l3_agent fi } @@ -230,7 +230,7 @@ function _configure_nexus_subplugin() { HOST_NAME=$(hostname) Q_CISCO_PLUGIN_SWITCH_INFO=([1.1.1.1]=stack:stack:22:${HOST_NAME}:1/10) else - iniset $cisco_cfg_file CISCO nexus_driver quantum.plugins.cisco.nexus.cisco_nexus_network_driver_v2.CiscoNEXUSDriver + iniset $cisco_cfg_file CISCO nexus_driver neutron.plugins.cisco.nexus.cisco_nexus_network_driver_v2.CiscoNEXUSDriver fi # Setup the switch configurations @@ -267,21 +267,21 @@ function _configure_n1kv_subplugin() { # Setup the integration bridge by calling the ovs_base OVS_BRIDGE=$Q_CISCO_PLUGIN_INTEGRATION_BRIDGE - _quantum_ovs_base_setup_bridge $OVS_BRIDGE + _neutron_ovs_base_setup_bridge $OVS_BRIDGE } -function quantum_plugin_configure_plugin_agent() { +function neutron_plugin_configure_plugin_agent() { if _has_ovs_subplugin; then - ovs_quantum_plugin_configure_plugin_agent + ovs_neutron_plugin_configure_plugin_agent fi } -function quantum_plugin_configure_service() { +function neutron_plugin_configure_service() { local subplugin local cisco_cfg_file if _has_ovs_subplugin; then - ovs_quantum_plugin_configure_service + ovs_neutron_plugin_configure_service cisco_cfg_file=/${Q_PLUGIN_EXTRA_CONF_FILES[0]} else cisco_cfg_file=/$Q_PLUGIN_CONF_FILE @@ -302,9 +302,9 @@ function quantum_plugin_configure_service() { inicomment $cisco_cfg_file CISCO_TEST host for subplugin in ${Q_CISCO_PLUGIN_SUBPLUGINS[@]}; do case $subplugin in - nexus) iniset $cisco_cfg_file CISCO_PLUGINS nexus_plugin quantum.plugins.cisco.nexus.cisco_nexus_plugin_v2.NexusPlugin;; - openvswitch) iniset $cisco_cfg_file CISCO_PLUGINS vswitch_plugin quantum.plugins.openvswitch.ovs_quantum_plugin.OVSQuantumPluginV2;; - n1kv) iniset $cisco_cfg_file CISCO_PLUGINS vswitch_plugin quantum.plugins.cisco.n1kv.n1kv_quantum_plugin.N1kvQuantumPluginV2;; + nexus) iniset $cisco_cfg_file CISCO_PLUGINS nexus_plugin neutron.plugins.cisco.nexus.cisco_nexus_plugin_v2.NexusPlugin;; + openvswitch) iniset $cisco_cfg_file CISCO_PLUGINS vswitch_plugin neutron.plugins.openvswitch.ovs_neutron_plugin.OVSNeutronPluginV2;; + n1kv) iniset $cisco_cfg_file CISCO_PLUGINS vswitch_plugin neutron.plugins.cisco.n1kv.n1kv_neutron_plugin.N1kvNeutronPluginV2;; *) die $LINENO "Unsupported cisco subplugin: $subplugin";; esac done @@ -318,9 +318,9 @@ function quantum_plugin_configure_service() { fi } -function quantum_plugin_setup_interface_driver() { +function neutron_plugin_setup_interface_driver() { local conf_file=$1 - iniset $conf_file DEFAULT interface_driver quantum.agent.linux.interface.OVSInterfaceDriver + iniset $conf_file DEFAULT interface_driver neutron.agent.linux.interface.OVSInterfaceDriver } # Restore xtrace diff --git a/lib/quantum_plugins/linuxbridge b/lib/neutron_plugins/linuxbridge similarity index 78% rename from lib/quantum_plugins/linuxbridge rename to lib/neutron_plugins/linuxbridge index 989b930005..9aad8f39ae 100644 --- a/lib/quantum_plugins/linuxbridge +++ b/lib/neutron_plugins/linuxbridge @@ -1,18 +1,18 @@ -# Quantum Linux Bridge plugin +# Neutron Linux Bridge plugin # --------------------------- # Save trace setting MY_XTRACE=$(set +o | grep xtrace) set +o xtrace -function quantum_plugin_configure_common() { - Q_PLUGIN_CONF_PATH=etc/quantum/plugins/linuxbridge +function neutron_plugin_configure_common() { + Q_PLUGIN_CONF_PATH=etc/neutron/plugins/linuxbridge Q_PLUGIN_CONF_FILENAME=linuxbridge_conf.ini - Q_DB_NAME="quantum_linux_bridge" - Q_PLUGIN_CLASS="quantum.plugins.linuxbridge.lb_quantum_plugin.LinuxBridgePluginV2" + Q_DB_NAME="neutron_linux_bridge" + Q_PLUGIN_CLASS="neutron.plugins.linuxbridge.lb_neutron_plugin.LinuxBridgePluginV2" } -function quantum_plugin_configure_service() { +function neutron_plugin_configure_service() { if [[ "$ENABLE_TENANT_VLANS" = "True" ]]; then iniset /$Q_PLUGIN_CONF_FILE vlans tenant_network_type vlan else @@ -31,9 +31,9 @@ function quantum_plugin_configure_service() { iniset /$Q_PLUGIN_CONF_FILE vlans network_vlan_ranges $LB_VLAN_RANGES fi if [[ "$Q_USE_SECGROUP" == "True" ]]; then - iniset /$Q_PLUGIN_CONF_FILE securitygroup firewall_driver quantum.agent.linux.iptables_firewall.IptablesFirewallDriver + iniset /$Q_PLUGIN_CONF_FILE securitygroup firewall_driver neutron.agent.linux.iptables_firewall.IptablesFirewallDriver else - iniset /$Q_PLUGIN_CONF_FILE securitygroup firewall_driver quantum.agent.firewall.NoopFirewallDriver + iniset /$Q_PLUGIN_CONF_FILE securitygroup firewall_driver neutron.agent.firewall.NoopFirewallDriver fi # Define extra "LINUX_BRIDGE" configuration options when q-svc is configured by defining @@ -45,7 +45,7 @@ function quantum_plugin_configure_service() { done } -function has_quantum_plugin_security_group() { +function has_neutron_plugin_security_group() { # 0 means True here return 0 } diff --git a/lib/quantum_plugins/linuxbridge_agent b/lib/neutron_plugins/linuxbridge_agent similarity index 69% rename from lib/quantum_plugins/linuxbridge_agent rename to lib/neutron_plugins/linuxbridge_agent index b3ca8b12ab..88c49c5b5e 100644 --- a/lib/quantum_plugins/linuxbridge_agent +++ b/lib/neutron_plugins/linuxbridge_agent @@ -1,37 +1,37 @@ -# Quantum Linux Bridge L2 agent +# Neutron Linux Bridge L2 agent # ----------------------------- # Save trace setting PLUGIN_XTRACE=$(set +o | grep xtrace) set +o xtrace -function is_quantum_ovs_base_plugin() { +function is_neutron_ovs_base_plugin() { # linuxbridge doesn't use OVS return 1 } -function quantum_plugin_create_nova_conf() { +function neutron_plugin_create_nova_conf() { NOVA_VIF_DRIVER=${NOVA_VIF_DRIVER:-"nova.virt.libvirt.vif.LibvirtGenericVIFDriver"} } -function quantum_plugin_install_agent_packages() { +function neutron_plugin_install_agent_packages() { install_package bridge-utils } -function quantum_plugin_configure_debug_command() { - iniset $QUANTUM_TEST_CONFIG_FILE DEFAULT external_network_bridge +function neutron_plugin_configure_debug_command() { + iniset $NEUTRON_TEST_CONFIG_FILE DEFAULT external_network_bridge } -function quantum_plugin_configure_dhcp_agent() { - iniset $Q_DHCP_CONF_FILE DEFAULT dhcp_agent_manager quantum.agent.dhcp_agent.DhcpAgentWithStateReport +function neutron_plugin_configure_dhcp_agent() { + iniset $Q_DHCP_CONF_FILE DEFAULT dhcp_agent_manager neutron.agent.dhcp_agent.DhcpAgentWithStateReport } -function quantum_plugin_configure_l3_agent() { +function neutron_plugin_configure_l3_agent() { iniset $Q_L3_CONF_FILE DEFAULT external_network_bridge - iniset $Q_L3_CONF_FILE DEFAULT l3_agent_manager quantum.agent.l3_agent.L3NATAgentWithStateReport + iniset $Q_L3_CONF_FILE DEFAULT l3_agent_manager neutron.agent.l3_agent.L3NATAgentWithStateReport } -function quantum_plugin_configure_plugin_agent() { +function neutron_plugin_configure_plugin_agent() { # Setup physical network interface mappings. Override # ``LB_VLAN_RANGES`` and ``LB_INTERFACE_MAPPINGS`` in ``localrc`` for more # complex physical network configurations. @@ -42,11 +42,11 @@ function quantum_plugin_configure_plugin_agent() { iniset /$Q_PLUGIN_CONF_FILE linux_bridge physical_interface_mappings $LB_INTERFACE_MAPPINGS fi if [[ "$Q_USE_SECGROUP" == "True" ]]; then - iniset /$Q_PLUGIN_CONF_FILE securitygroup firewall_driver quantum.agent.linux.iptables_firewall.IptablesFirewallDriver + iniset /$Q_PLUGIN_CONF_FILE securitygroup firewall_driver neutron.agent.linux.iptables_firewall.IptablesFirewallDriver else - iniset /$Q_PLUGIN_CONF_FILE securitygroup firewall_driver quantum.agent.firewall.NoopFirewallDriver + iniset /$Q_PLUGIN_CONF_FILE securitygroup firewall_driver neutron.agent.firewall.NoopFirewallDriver fi - AGENT_BINARY="$QUANTUM_DIR/bin/quantum-linuxbridge-agent" + AGENT_BINARY="$NEUTRON_BIN_DIR/neutron-linuxbridge-agent" # Define extra "AGENT" configuration options when q-agt is configured by defining # the array ``Q_AGENT_EXTRA_AGENT_OPTS``. # For Example: ``Q_AGENT_EXTRA_AGENT_OPTS=(foo=true bar=2)`` @@ -63,12 +63,12 @@ function quantum_plugin_configure_plugin_agent() { done } -function quantum_plugin_setup_interface_driver() { +function neutron_plugin_setup_interface_driver() { local conf_file=$1 - iniset $conf_file DEFAULT interface_driver quantum.agent.linux.interface.BridgeInterfaceDriver + iniset $conf_file DEFAULT interface_driver neutron.agent.linux.interface.BridgeInterfaceDriver } -function quantum_plugin_check_adv_test_requirements() { +function neutron_plugin_check_adv_test_requirements() { is_service_enabled q-agt && is_service_enabled q-dhcp && return 0 } diff --git a/lib/quantum_plugins/ml2 b/lib/neutron_plugins/ml2 similarity index 78% rename from lib/quantum_plugins/ml2 rename to lib/neutron_plugins/ml2 index ae8fe6c997..fcff8703e5 100644 --- a/lib/quantum_plugins/ml2 +++ b/lib/neutron_plugins/ml2 @@ -1,4 +1,4 @@ -# Quantum Modular Layer 2 plugin +# Neutron Modular Layer 2 plugin # ------------------------------ # Save trace setting @@ -7,16 +7,16 @@ set +o xtrace # Default openvswitch L2 agent Q_AGENT=${Q_AGENT:-openvswitch} -source $TOP_DIR/lib/quantum_plugins/${Q_AGENT}_agent +source $TOP_DIR/lib/neutron_plugins/${Q_AGENT}_agent -function quantum_plugin_configure_common() { - Q_PLUGIN_CONF_PATH=etc/quantum/plugins/ml2 +function neutron_plugin_configure_common() { + Q_PLUGIN_CONF_PATH=etc/neutron/plugins/ml2 Q_PLUGIN_CONF_FILENAME=ml2_conf.ini - Q_DB_NAME="quantum_ml2" - Q_PLUGIN_CLASS="quantum.plugins.ml2.plugin.Ml2Plugin" + Q_DB_NAME="neutron_ml2" + Q_PLUGIN_CLASS="neutron.plugins.ml2.plugin.Ml2Plugin" } -function quantum_plugin_configure_service() { +function neutron_plugin_configure_service() { if [[ "$ENABLE_TENANT_TUNNELS" = "True" ]]; then iniset /$Q_PLUGIN_CONF_FILE ml2 tenant_network_types gre iniset /$Q_PLUGIN_CONF_FILE ml2_type_gre tunnel_id_ranges $TENANT_TUNNEL_RANGES @@ -40,21 +40,21 @@ function quantum_plugin_configure_service() { fi # REVISIT(rkukura): Setting firewall_driver here for - # quantum.agent.securitygroups_rpc.is_firewall_enabled() which is + # neutron.agent.securitygroups_rpc.is_firewall_enabled() which is # used in the server, in case no L2 agent is configured on the # server's node. If an L2 agent is configured, this will get # overridden with the correct driver. The ml2 plugin should # instead use its own config variable to indicate whether security # groups is enabled, and that will need to be set here instead. if [[ "$Q_USE_SECGROUP" == "True" ]]; then - iniset /$Q_PLUGIN_CONF_FILE SECURITYGROUP firewall_driver quantum.agent.not.a.real.FirewallDriver + iniset /$Q_PLUGIN_CONF_FILE SECURITYGROUP firewall_driver neutron.agent.not.a.real.FirewallDriver else - iniset /$Q_PLUGIN_CONF_FILE SECURITYGROUP firewall_driver quantum.agent.firewall.NoopFirewallDriver + iniset /$Q_PLUGIN_CONF_FILE SECURITYGROUP firewall_driver neutron.agent.firewall.NoopFirewallDriver fi } -function has_quantum_plugin_security_group() { +function has_neutron_plugin_security_group() { return 0 } diff --git a/lib/quantum_plugins/nec b/lib/neutron_plugins/nec similarity index 65% rename from lib/quantum_plugins/nec rename to lib/neutron_plugins/nec index 69bbe0e618..79d41dbf77 100644 --- a/lib/quantum_plugins/nec +++ b/lib/neutron_plugins/nec @@ -1,4 +1,4 @@ -# Quantum NEC OpenFlow plugin +# Neutron NEC OpenFlow plugin # --------------------------- # Save trace setting @@ -20,47 +20,47 @@ OFC_RETRY_INTERVAL=${OFC_RETRY_INTERVAL:-1} # Main logic # --------------------------- -source $TOP_DIR/lib/quantum_plugins/ovs_base +source $TOP_DIR/lib/neutron_plugins/ovs_base -function quantum_plugin_create_nova_conf() { - _quantum_ovs_base_configure_nova_vif_driver +function neutron_plugin_create_nova_conf() { + _neutron_ovs_base_configure_nova_vif_driver } -function quantum_plugin_install_agent_packages() { +function neutron_plugin_install_agent_packages() { # SKIP_OVS_INSTALL is useful when we want to use Open vSwitch whose # version is different from the version provided by the distribution. if [[ "$SKIP_OVS_INSTALL" = "True" ]]; then echo "You need to install Open vSwitch manually." return fi - _quantum_ovs_base_install_agent_packages + _neutron_ovs_base_install_agent_packages } -function quantum_plugin_configure_common() { - Q_PLUGIN_CONF_PATH=etc/quantum/plugins/nec +function neutron_plugin_configure_common() { + Q_PLUGIN_CONF_PATH=etc/neutron/plugins/nec Q_PLUGIN_CONF_FILENAME=nec.ini - Q_DB_NAME="quantum_nec" - Q_PLUGIN_CLASS="quantum.plugins.nec.nec_plugin.NECPluginV2" + Q_DB_NAME="neutron_nec" + Q_PLUGIN_CLASS="neutron.plugins.nec.nec_plugin.NECPluginV2" } -function quantum_plugin_configure_debug_command() { - _quantum_ovs_base_configure_debug_command +function neutron_plugin_configure_debug_command() { + _neutron_ovs_base_configure_debug_command } -function quantum_plugin_configure_dhcp_agent() { +function neutron_plugin_configure_dhcp_agent() { : } -function quantum_plugin_configure_l3_agent() { - _quantum_ovs_base_configure_l3_agent +function neutron_plugin_configure_l3_agent() { + _neutron_ovs_base_configure_l3_agent } -function quantum_plugin_configure_plugin_agent() { +function neutron_plugin_configure_plugin_agent() { if [[ "$SKIP_OVS_BRIDGE_SETUP" = "True" ]]; then return fi # Set up integration bridge - _quantum_ovs_base_setup_bridge $OVS_BRIDGE + _neutron_ovs_base_setup_bridge $OVS_BRIDGE sudo ovs-vsctl --no-wait set-controller $OVS_BRIDGE tcp:$OFC_OFP_HOST:$OFC_OFP_PORT # Generate datapath ID from HOST_IP local dpid=$(printf "0x%07d%03d%03d%03d\n" ${HOST_IP//./ }) @@ -69,26 +69,26 @@ function quantum_plugin_configure_plugin_agent() { if [ -n "$OVS_INTERFACE" ]; then sudo ovs-vsctl --no-wait -- --may-exist add-port $OVS_BRIDGE $OVS_INTERFACE fi - _quantum_setup_ovs_tunnels $OVS_BRIDGE - AGENT_BINARY="$QUANTUM_DIR/bin/quantum-nec-agent" + _neutron_setup_ovs_tunnels $OVS_BRIDGE + AGENT_BINARY="$NEUTRON_BIN_DIR/neutron-nec-agent" - _quantum_ovs_base_configure_firewall_driver + _neutron_ovs_base_configure_firewall_driver } -function quantum_plugin_configure_service() { - iniset $QUANTUM_CONF DEFAULT api_extensions_path quantum/plugins/nec/extensions/ +function neutron_plugin_configure_service() { + iniset $NEUTRON_CONF DEFAULT api_extensions_path neutron/plugins/nec/extensions/ iniset /$Q_PLUGIN_CONF_FILE ofc host $OFC_API_HOST iniset /$Q_PLUGIN_CONF_FILE ofc port $OFC_API_PORT iniset /$Q_PLUGIN_CONF_FILE ofc driver $OFC_DRIVER iniset /$Q_PLUGIN_CONF_FILE ofc api_retry_max OFC_RETRY_MAX iniset /$Q_PLUGIN_CONF_FILE ofc api_retry_interval OFC_RETRY_INTERVAL - _quantum_ovs_base_configure_firewall_driver + _neutron_ovs_base_configure_firewall_driver } -function quantum_plugin_setup_interface_driver() { +function neutron_plugin_setup_interface_driver() { local conf_file=$1 - iniset $conf_file DEFAULT interface_driver quantum.agent.linux.interface.OVSInterfaceDriver + iniset $conf_file DEFAULT interface_driver neutron.agent.linux.interface.OVSInterfaceDriver iniset $conf_file DEFAULT ovs_use_veth True } @@ -96,7 +96,7 @@ function quantum_plugin_setup_interface_driver() { # --------------------------- # Setup OVS tunnel manually -function _quantum_setup_ovs_tunnels() { +function _neutron_setup_ovs_tunnels() { local bridge=$1 local id=0 GRE_LOCAL_IP=${GRE_LOCAL_IP:-$HOST_IP} @@ -113,12 +113,12 @@ function _quantum_setup_ovs_tunnels() { fi } -function has_quantum_plugin_security_group() { +function has_neutron_plugin_security_group() { # 0 means True here return 0 } -function quantum_plugin_check_adv_test_requirements() { +function neutron_plugin_check_adv_test_requirements() { is_service_enabled q-agt && is_service_enabled q-dhcp && return 0 } diff --git a/lib/quantum_plugins/nicira b/lib/neutron_plugins/nicira similarity index 79% rename from lib/quantum_plugins/nicira rename to lib/neutron_plugins/nicira index d4b3e5128e..7642be6578 100644 --- a/lib/quantum_plugins/nicira +++ b/lib/neutron_plugins/nicira @@ -1,14 +1,14 @@ -# Quantum Nicira NVP plugin +# Neutron Nicira NVP plugin # --------------------------- # Save trace setting MY_XTRACE=$(set +o | grep xtrace) set +o xtrace -source $TOP_DIR/lib/quantum_plugins/ovs_base +source $TOP_DIR/lib/neutron_plugins/ovs_base function setup_integration_bridge() { - _quantum_ovs_base_setup_bridge $OVS_BRIDGE + _neutron_ovs_base_setup_bridge $OVS_BRIDGE # Set manager to NVP controller (1st of list) if [[ "$NVP_CONTROLLERS" != "" ]]; then # Get the first controller @@ -20,12 +20,12 @@ function setup_integration_bridge() { sudo ovs-vsctl set-manager ssl:$OVS_MGR_IP } -function is_quantum_ovs_base_plugin() { +function is_neutron_ovs_base_plugin() { # NVP uses OVS, but not the l3-agent return 0 } -function quantum_plugin_create_nova_conf() { +function neutron_plugin_create_nova_conf() { NOVA_VIF_DRIVER=${NOVA_VIF_DRIVER:-"nova.virt.libvirt.vif.LibvirtOpenVswitchDriver"} # if n-cpu is enabled, then setup integration bridge if is_service_enabled n-cpu; then @@ -33,40 +33,40 @@ function quantum_plugin_create_nova_conf() { fi } -function quantum_plugin_install_agent_packages() { +function neutron_plugin_install_agent_packages() { # Nicira Plugin does not run q-agt, but it currently needs dhcp and metadata agents - _quantum_ovs_base_install_agent_packages + _neutron_ovs_base_install_agent_packages } -function quantum_plugin_configure_common() { - Q_PLUGIN_CONF_PATH=etc/quantum/plugins/nicira +function neutron_plugin_configure_common() { + Q_PLUGIN_CONF_PATH=etc/neutron/plugins/nicira Q_PLUGIN_CONF_FILENAME=nvp.ini - Q_DB_NAME="quantum_nvp" - Q_PLUGIN_CLASS="quantum.plugins.nicira.nicira_nvp_plugin.QuantumPlugin.NvpPluginV2" + Q_DB_NAME="neutron_nvp" + Q_PLUGIN_CLASS="neutron.plugins.nicira.nicira_nvp_plugin.NeutronPlugin.NvpPluginV2" } -function quantum_plugin_configure_debug_command() { +function neutron_plugin_configure_debug_command() { sudo ovs-vsctl --no-wait -- --may-exist add-br $PUBLIC_BRIDGE } -function quantum_plugin_configure_dhcp_agent() { +function neutron_plugin_configure_dhcp_agent() { setup_integration_bridge iniset $Q_DHCP_CONF_FILE DEFAULT enable_isolated_metadata True iniset $Q_DHCP_CONF_FILE DEFAULT enable_metadata_network True iniset $Q_DHCP_CONF_FILE DEFAULT ovs_use_veth True } -function quantum_plugin_configure_l3_agent() { +function neutron_plugin_configure_l3_agent() { # Nicira plugin does not run L3 agent die $LINENO "q-l3 should must not be executed with Nicira plugin!" } -function quantum_plugin_configure_plugin_agent() { +function neutron_plugin_configure_plugin_agent() { # Nicira plugin does not run L2 agent die $LINENO "q-agt must not be executed with Nicira plugin!" } -function quantum_plugin_configure_service() { +function neutron_plugin_configure_service() { if [[ "$MAX_LP_PER_BRIDGED_LS" != "" ]]; then iniset /$Q_PLUGIN_CONF_FILE nvp max_lp_per_bridged_ls $MAX_LP_PER_BRIDGED_LS fi @@ -120,17 +120,17 @@ function quantum_plugin_configure_service() { fi } -function quantum_plugin_setup_interface_driver() { +function neutron_plugin_setup_interface_driver() { local conf_file=$1 - iniset $conf_file DEFAULT interface_driver quantum.agent.linux.interface.OVSInterfaceDriver + iniset $conf_file DEFAULT interface_driver neutron.agent.linux.interface.OVSInterfaceDriver } -function has_quantum_plugin_security_group() { +function has_neutron_plugin_security_group() { # 0 means True here return 0 } -function quantum_plugin_check_adv_test_requirements() { +function neutron_plugin_check_adv_test_requirements() { is_service_enabled q-dhcp && return 0 } diff --git a/lib/quantum_plugins/openvswitch b/lib/neutron_plugins/openvswitch similarity index 76% rename from lib/quantum_plugins/openvswitch rename to lib/neutron_plugins/openvswitch index 4aac9f8e69..f99eb383d8 100644 --- a/lib/quantum_plugins/openvswitch +++ b/lib/neutron_plugins/openvswitch @@ -1,20 +1,20 @@ -# Quantum Open vSwitch plugin +# Neutron Open vSwitch plugin # --------------------------- # Save trace setting MY_XTRACE=$(set +o | grep xtrace) set +o xtrace -source $TOP_DIR/lib/quantum_plugins/openvswitch_agent +source $TOP_DIR/lib/neutron_plugins/openvswitch_agent -function quantum_plugin_configure_common() { - Q_PLUGIN_CONF_PATH=etc/quantum/plugins/openvswitch - Q_PLUGIN_CONF_FILENAME=ovs_quantum_plugin.ini - Q_DB_NAME="ovs_quantum" - Q_PLUGIN_CLASS="quantum.plugins.openvswitch.ovs_quantum_plugin.OVSQuantumPluginV2" +function neutron_plugin_configure_common() { + Q_PLUGIN_CONF_PATH=etc/neutron/plugins/openvswitch + Q_PLUGIN_CONF_FILENAME=ovs_neutron_plugin.ini + Q_DB_NAME="ovs_neutron" + Q_PLUGIN_CLASS="neutron.plugins.openvswitch.ovs_neutron_plugin.OVSNeutronPluginV2" } -function quantum_plugin_configure_service() { +function neutron_plugin_configure_service() { if [[ "$ENABLE_TENANT_TUNNELS" = "True" ]]; then iniset /$Q_PLUGIN_CONF_FILE ovs tenant_network_type gre iniset /$Q_PLUGIN_CONF_FILE ovs tunnel_id_ranges $TENANT_TUNNEL_RANGES @@ -41,7 +41,7 @@ function quantum_plugin_configure_service() { iniset /$Q_PLUGIN_CONF_FILE ovs enable_tunneling True fi - _quantum_ovs_base_configure_firewall_driver + _neutron_ovs_base_configure_firewall_driver # Define extra "OVS" configuration options when q-svc is configured by defining # the array ``Q_SRV_EXTRA_OPTS``. @@ -52,7 +52,7 @@ function quantum_plugin_configure_service() { done } -function has_quantum_plugin_security_group() { +function has_neutron_plugin_security_group() { return 0 } diff --git a/lib/quantum_plugins/openvswitch_agent b/lib/neutron_plugins/openvswitch_agent similarity index 81% rename from lib/quantum_plugins/openvswitch_agent rename to lib/neutron_plugins/openvswitch_agent index 608c3eae98..46c2a5c6e2 100644 --- a/lib/quantum_plugins/openvswitch_agent +++ b/lib/neutron_plugins/openvswitch_agent @@ -1,43 +1,43 @@ -# Quantum Open vSwitch L2 agent +# Neutron Open vSwitch L2 agent # ----------------------------- # Save trace setting PLUGIN_XTRACE=$(set +o | grep xtrace) set +o xtrace -source $TOP_DIR/lib/quantum_plugins/ovs_base +source $TOP_DIR/lib/neutron_plugins/ovs_base -function quantum_plugin_create_nova_conf() { - _quantum_ovs_base_configure_nova_vif_driver +function neutron_plugin_create_nova_conf() { + _neutron_ovs_base_configure_nova_vif_driver if [ "$VIRT_DRIVER" = 'xenserver' ]; then iniset $NOVA_CONF DEFAULT xenapi_vif_driver nova.virt.xenapi.vif.XenAPIOpenVswitchDriver iniset $NOVA_CONF DEFAULT xenapi_ovs_integration_bridge $XEN_INTEGRATION_BRIDGE - # Disable nova's firewall so that it does not conflict with quantum + # Disable nova's firewall so that it does not conflict with neutron iniset $NOVA_CONF DEFAULT firewall_driver nova.virt.firewall.NoopFirewallDriver fi } -function quantum_plugin_install_agent_packages() { - _quantum_ovs_base_install_agent_packages +function neutron_plugin_install_agent_packages() { + _neutron_ovs_base_install_agent_packages } -function quantum_plugin_configure_debug_command() { - _quantum_ovs_base_configure_debug_command +function neutron_plugin_configure_debug_command() { + _neutron_ovs_base_configure_debug_command } -function quantum_plugin_configure_dhcp_agent() { - iniset $Q_DHCP_CONF_FILE DEFAULT dhcp_agent_manager quantum.agent.dhcp_agent.DhcpAgentWithStateReport +function neutron_plugin_configure_dhcp_agent() { + iniset $Q_DHCP_CONF_FILE DEFAULT dhcp_agent_manager neutron.agent.dhcp_agent.DhcpAgentWithStateReport } -function quantum_plugin_configure_l3_agent() { - _quantum_ovs_base_configure_l3_agent - iniset $Q_L3_CONF_FILE DEFAULT l3_agent_manager quantum.agent.l3_agent.L3NATAgentWithStateReport +function neutron_plugin_configure_l3_agent() { + _neutron_ovs_base_configure_l3_agent + iniset $Q_L3_CONF_FILE DEFAULT l3_agent_manager neutron.agent.l3_agent.L3NATAgentWithStateReport } -function quantum_plugin_configure_plugin_agent() { +function neutron_plugin_configure_plugin_agent() { # Setup integration bridge - _quantum_ovs_base_setup_bridge $OVS_BRIDGE - _quantum_ovs_base_configure_firewall_driver + _neutron_ovs_base_setup_bridge $OVS_BRIDGE + _neutron_ovs_base_configure_firewall_driver # Setup agent for tunneling if [[ "$OVS_ENABLE_TUNNELING" = "True" ]]; then @@ -63,14 +63,14 @@ function quantum_plugin_configure_plugin_agent() { if [[ "$OVS_BRIDGE_MAPPINGS" != "" ]]; then iniset /$Q_PLUGIN_CONF_FILE ovs bridge_mappings $OVS_BRIDGE_MAPPINGS fi - AGENT_BINARY="$QUANTUM_DIR/bin/quantum-openvswitch-agent" + AGENT_BINARY="$NEUTRON_BIN_DIR/neutron-openvswitch-agent" if [ "$VIRT_DRIVER" = 'xenserver' ]; then # Make a copy of our config for domU sudo cp /$Q_PLUGIN_CONF_FILE "/$Q_PLUGIN_CONF_FILE.domu" # Deal with Dom0's L2 Agent: - Q_RR_DOM0_COMMAND="$QUANTUM_DIR/bin/quantum-rootwrap-xen-dom0 $Q_RR_CONF_FILE" + Q_RR_DOM0_COMMAND="$NEUTRON_BIN_DIR/neutron-rootwrap-xen-dom0 $Q_RR_CONF_FILE" # For now, duplicate the xen configuration already found in nova.conf iniset $Q_RR_CONF_FILE xenapi xenapi_connection_url "$XENAPI_CONNECTION_URL" @@ -118,12 +118,12 @@ function quantum_plugin_configure_plugin_agent() { done } -function quantum_plugin_setup_interface_driver() { +function neutron_plugin_setup_interface_driver() { local conf_file=$1 - iniset $conf_file DEFAULT interface_driver quantum.agent.linux.interface.OVSInterfaceDriver + iniset $conf_file DEFAULT interface_driver neutron.agent.linux.interface.OVSInterfaceDriver } -function quantum_plugin_check_adv_test_requirements() { +function neutron_plugin_check_adv_test_requirements() { is_service_enabled q-agt && is_service_enabled q-dhcp && return 0 } diff --git a/lib/quantum_plugins/ovs_base b/lib/neutron_plugins/ovs_base similarity index 71% rename from lib/quantum_plugins/ovs_base rename to lib/neutron_plugins/ovs_base index 646ff4a782..0a2765b480 100644 --- a/lib/quantum_plugins/ovs_base +++ b/lib/neutron_plugins/ovs_base @@ -8,34 +8,34 @@ set +o xtrace OVS_BRIDGE=${OVS_BRIDGE:-br-int} PUBLIC_BRIDGE=${PUBLIC_BRIDGE:-br-ex} -function is_quantum_ovs_base_plugin() { +function is_neutron_ovs_base_plugin() { # Yes, we use OVS. return 0 } -function _quantum_ovs_base_setup_bridge() { +function _neutron_ovs_base_setup_bridge() { local bridge=$1 - quantum-ovs-cleanup + neutron-ovs-cleanup sudo ovs-vsctl --no-wait -- --may-exist add-br $bridge sudo ovs-vsctl --no-wait br-set-external-id $bridge bridge-id $bridge } -function quantum_ovs_base_cleanup() { - # remove all OVS ports that look like Quantum created ports +function neutron_ovs_base_cleanup() { + # remove all OVS ports that look like Neutron created ports for port in $(sudo ovs-vsctl list port | grep -o -e tap[0-9a-f\-]* -e q[rg]-[0-9a-f\-]*); do sudo ovs-vsctl del-port ${port} done - # remove all OVS bridges created by Quantum + # remove all OVS bridges created by Neutron for bridge in $(sudo ovs-vsctl list-br | grep -o -e ${OVS_BRIDGE} -e ${PUBLIC_BRIDGE}); do sudo ovs-vsctl del-br ${bridge} done } -function _quantum_ovs_base_install_agent_packages() { +function _neutron_ovs_base_install_agent_packages() { local kernel_version # Install deps - # FIXME add to ``files/apts/quantum``, but don't install if not needed! + # FIXME add to ``files/apts/neutron``, but don't install if not needed! if is_ubuntu; then kernel_version=`cat /proc/version | cut -d " " -f3` install_package make fakeroot dkms openvswitch-switch openvswitch-datapath-dkms linux-headers-$kernel_version @@ -50,29 +50,29 @@ function _quantum_ovs_base_install_agent_packages() { fi } -function _quantum_ovs_base_configure_debug_command() { - iniset $QUANTUM_TEST_CONFIG_FILE DEFAULT external_network_bridge $PUBLIC_BRIDGE +function _neutron_ovs_base_configure_debug_command() { + iniset $NEUTRON_TEST_CONFIG_FILE DEFAULT external_network_bridge $PUBLIC_BRIDGE } -function _quantum_ovs_base_configure_firewall_driver() { +function _neutron_ovs_base_configure_firewall_driver() { if [[ "$Q_USE_SECGROUP" == "True" ]]; then - iniset /$Q_PLUGIN_CONF_FILE securitygroup firewall_driver quantum.agent.linux.iptables_firewall.OVSHybridIptablesFirewallDriver + iniset /$Q_PLUGIN_CONF_FILE securitygroup firewall_driver neutron.agent.linux.iptables_firewall.OVSHybridIptablesFirewallDriver else - iniset /$Q_PLUGIN_CONF_FILE securitygroup firewall_driver quantum.agent.firewall.NoopFirewallDriver + iniset /$Q_PLUGIN_CONF_FILE securitygroup firewall_driver neutron.agent.firewall.NoopFirewallDriver fi } -function _quantum_ovs_base_configure_l3_agent() { +function _neutron_ovs_base_configure_l3_agent() { iniset $Q_L3_CONF_FILE DEFAULT external_network_bridge $PUBLIC_BRIDGE - quantum-ovs-cleanup + neutron-ovs-cleanup sudo ovs-vsctl --no-wait -- --may-exist add-br $PUBLIC_BRIDGE # ensure no IP is configured on the public bridge sudo ip addr flush dev $PUBLIC_BRIDGE } -function _quantum_ovs_base_configure_nova_vif_driver() { - # The hybrid VIF driver needs to be specified when Quantum Security Group +function _neutron_ovs_base_configure_nova_vif_driver() { + # The hybrid VIF driver needs to be specified when Neutron Security Group # is enabled (until vif_security attributes are supported in VIF extension) if [[ "$Q_USE_SECGROUP" == "True" ]]; then NOVA_VIF_DRIVER=${NOVA_VIF_DRIVER:-"nova.virt.libvirt.vif.LibvirtHybridOVSBridgeDriver"} diff --git a/lib/quantum_plugins/plumgrid b/lib/neutron_plugins/plumgrid similarity index 53% rename from lib/quantum_plugins/plumgrid rename to lib/neutron_plugins/plumgrid index dde18c8e85..d4cc39596e 100644 --- a/lib/quantum_plugins/plumgrid +++ b/lib/neutron_plugins/plumgrid @@ -1,4 +1,4 @@ -# PLUMgrid Quantum Plugin +# PLUMgrid Neutron Plugin # Edgar Magana emagana@plumgrid.com # ------------------------------------ @@ -6,36 +6,36 @@ MY_XTRACE=$(set +o | grep xtrace) set +o xtrace -#source $TOP_DIR/lib/quantum_plugins/ovs_base +#source $TOP_DIR/lib/neutron_plugins/ovs_base -function quantum_plugin_create_nova_conf() { +function neutron_plugin_create_nova_conf() { NOVA_VIF_DRIVER=${NOVA_VIF_DRIVER:-"nova.virt.libvirt.vif.LibvirtGenericVIFDriver"} } -function quantum_plugin_setup_interface_driver() { +function neutron_plugin_setup_interface_driver() { : } -function quantum_plugin_configure_common() { - Q_PLUGIN_CONF_PATH=etc/quantum/plugins/plumgrid +function neutron_plugin_configure_common() { + Q_PLUGIN_CONF_PATH=etc/neutron/plugins/plumgrid Q_PLUGIN_CONF_FILENAME=plumgrid.ini - Q_DB_NAME="plumgrid_quantum" - Q_PLUGIN_CLASS="quantum.plugins.plumgrid.plumgrid_nos_plugin.plumgrid_plugin.QuantumPluginPLUMgridV2" + Q_DB_NAME="plumgrid_neutron" + Q_PLUGIN_CLASS="neutron.plugins.plumgrid.plumgrid_nos_plugin.plumgrid_plugin.NeutronPluginPLUMgridV2" } -function quantum_plugin_configure_service() { +function neutron_plugin_configure_service() { PLUMGRID_NOS_IP=${PLUMGRID_NOS_IP:-localhost} PLUMGRID_NOS_PORT=${PLUMGRID_NOS_PORT:-7766} iniset /$Q_PLUGIN_CONF_FILE plumgridnos nos_server $PLUMGRID_NOS_IP iniset /$Q_PLUGIN_CONF_FILE plumgridnos nos_server_port $PLUMGRID_NOS_PORT } -function quantum_plugin_configure_debug_command() { +function neutron_plugin_configure_debug_command() { : } -function quantum_plugin_check_adv_test_requirements() { +function neutron_plugin_check_adv_test_requirements() { is_service_enabled q-agt && is_service_enabled q-dhcp && return 0 } # Restore xtrace diff --git a/lib/neutron_plugins/ryu b/lib/neutron_plugins/ryu new file mode 100644 index 0000000000..334c227cdb --- /dev/null +++ b/lib/neutron_plugins/ryu @@ -0,0 +1,80 @@ +# Neutron Ryu plugin +# ------------------ + +# Save trace setting +MY_XTRACE=$(set +o | grep xtrace) +set +o xtrace + +source $TOP_DIR/lib/neutron_plugins/ovs_base +source $TOP_DIR/lib/neutron_thirdparty/ryu # for configuration value + +function neutron_plugin_create_nova_conf() { + _neutron_ovs_base_configure_nova_vif_driver + iniset $NOVA_CONF DEFAULT libvirt_ovs_integration_bridge "$OVS_BRIDGE" +} + +function neutron_plugin_install_agent_packages() { + _neutron_ovs_base_install_agent_packages + + # neutron_ryu_agent requires ryu module + install_package $(get_packages "ryu") + install_ryu + configure_ryu +} + +function neutron_plugin_configure_common() { + Q_PLUGIN_CONF_PATH=etc/neutron/plugins/ryu + Q_PLUGIN_CONF_FILENAME=ryu.ini + Q_DB_NAME="ovs_neutron" + Q_PLUGIN_CLASS="neutron.plugins.ryu.ryu_neutron_plugin.RyuNeutronPluginV2" +} + +function neutron_plugin_configure_debug_command() { + _neutron_ovs_base_configure_debug_command + iniset $NEUTRON_TEST_CONFIG_FILE DEFAULT ryu_api_host $RYU_API_HOST:$RYU_API_PORT +} + +function neutron_plugin_configure_dhcp_agent() { + iniset $Q_DHCP_CONF_FILE DEFAULT ryu_api_host $RYU_API_HOST:$RYU_API_PORT +} + +function neutron_plugin_configure_l3_agent() { + iniset $Q_L3_CONF_FILE DEFAULT ryu_api_host $RYU_API_HOST:$RYU_API_PORT + _neutron_ovs_base_configure_l3_agent +} + +function neutron_plugin_configure_plugin_agent() { + # Set up integration bridge + _neutron_ovs_base_setup_bridge $OVS_BRIDGE + if [ -n "$RYU_INTERNAL_INTERFACE" ]; then + sudo ovs-vsctl --no-wait -- --may-exist add-port $OVS_BRIDGE $RYU_INTERNAL_INTERFACE + fi + iniset /$Q_PLUGIN_CONF_FILE ovs integration_bridge $OVS_BRIDGE + AGENT_BINARY="$NEUTRON_DIR/neutron/plugins/ryu/agent/ryu_neutron_agent.py" + + _neutron_ovs_base_configure_firewall_driver +} + +function neutron_plugin_configure_service() { + iniset /$Q_PLUGIN_CONF_FILE ovs openflow_rest_api $RYU_API_HOST:$RYU_API_PORT + + _neutron_ovs_base_configure_firewall_driver +} + +function neutron_plugin_setup_interface_driver() { + local conf_file=$1 + iniset $conf_file DEFAULT interface_driver neutron.agent.linux.interface.OVSInterfaceDriver + iniset $conf_file DEFAULT ovs_use_veth True +} + +function has_neutron_plugin_security_group() { + # 0 means True here + return 0 +} + +function neutron_plugin_check_adv_test_requirements() { + is_service_enabled q-agt && is_service_enabled q-dhcp && return 0 +} + +# Restore xtrace +$MY_XTRACE diff --git a/lib/quantum_plugins/services/loadbalancer b/lib/neutron_plugins/services/loadbalancer similarity index 68% rename from lib/quantum_plugins/services/loadbalancer rename to lib/neutron_plugins/services/loadbalancer index ac8501fa0d..49e286a8cb 100644 --- a/lib/quantum_plugins/services/loadbalancer +++ b/lib/neutron_plugins/services/loadbalancer @@ -1,4 +1,4 @@ -# Quantum loadbalancer plugin +# Neutron loadbalancer plugin # --------------------------- # Save trace setting @@ -6,10 +6,10 @@ MY_XTRACE=$(set +o | grep xtrace) set +o xtrace -AGENT_LBAAS_BINARY="$QUANTUM_DIR/bin/quantum-lbaas-agent" -LBAAS_PLUGIN=quantum.services.loadbalancer.plugin.LoadBalancerPlugin +AGENT_LBAAS_BINARY="$NEUTRON_BIN_DIR/neutron-lbaas-agent" +LBAAS_PLUGIN=neutron.services.loadbalancer.plugin.LoadBalancerPlugin -function quantum_agent_lbaas_install_agent_packages() { +function neutron_agent_lbaas_install_agent_packages() { if is_ubuntu || is_fedora; then install_package haproxy elif is_suse; then @@ -18,7 +18,7 @@ function quantum_agent_lbaas_install_agent_packages() { fi } -function quantum_agent_lbaas_configure_common() { +function neutron_agent_lbaas_configure_common() { if [[ $Q_SERVICE_PLUGIN_CLASSES == '' ]]; then Q_SERVICE_PLUGIN_CLASSES=$LBAAS_PLUGIN else @@ -26,20 +26,20 @@ function quantum_agent_lbaas_configure_common() { fi } -function quantum_agent_lbaas_configure_agent() { - LBAAS_AGENT_CONF_PATH=/etc/quantum/services/loadbalancer/haproxy +function neutron_agent_lbaas_configure_agent() { + LBAAS_AGENT_CONF_PATH=/etc/neutron/services/loadbalancer/haproxy mkdir -p $LBAAS_AGENT_CONF_PATH LBAAS_AGENT_CONF_FILENAME="$LBAAS_AGENT_CONF_PATH/lbaas_agent.ini" - cp $QUANTUM_DIR/etc/lbaas_agent.ini $LBAAS_AGENT_CONF_FILENAME + cp $NEUTRON_DIR/etc/lbaas_agent.ini $LBAAS_AGENT_CONF_FILENAME iniset $LBAAS_AGENT_CONF_FILENAME DEFAULT use_namespaces $Q_USE_NAMESPACE # ovs_use_veth needs to be set before the plugin configuration # occurs to allow plugins to override the setting. iniset $LBAAS_AGENT_CONF_FILENAME DEFAULT ovs_use_veth $Q_OVS_USE_VETH - quantum_plugin_setup_interface_driver $LBAAS_AGENT_CONF_FILENAME + neutron_plugin_setup_interface_driver $LBAAS_AGENT_CONF_FILENAME if is_fedora; then iniset $LBAAS_AGENT_CONF_FILENAME DEFAULT user_group "nobody" diff --git a/lib/quantum_thirdparty/README.md b/lib/neutron_thirdparty/README.md similarity index 78% rename from lib/quantum_thirdparty/README.md rename to lib/neutron_thirdparty/README.md index 3b5837d71d..b289f58c5d 100644 --- a/lib/quantum_thirdparty/README.md +++ b/lib/neutron_thirdparty/README.md @@ -1,7 +1,7 @@ -Quantum third party specific files +Neutron third party specific files ================================== -Some Quantum plugins require third party programs to function. -The files under the directory, ``lib/quantum_thirdparty/``, will be used +Some Neutron plugins require third party programs to function. +The files under the directory, ``lib/neutron_thirdparty/``, will be used when their service are enabled. Third party program specific configuration variables should be in this file. @@ -10,7 +10,7 @@ Third party program specific configuration variables should be in this file. functions --------- -``lib/quantum`` calls the following functions when the ```` is enabled +``lib/neutron`` calls the following functions when the ```` is enabled functions to be implemented * ``configure_``: diff --git a/lib/quantum_thirdparty/bigswitch_floodlight b/lib/neutron_thirdparty/bigswitch_floodlight similarity index 97% rename from lib/quantum_thirdparty/bigswitch_floodlight rename to lib/neutron_thirdparty/bigswitch_floodlight index 385bd0d9b0..ebde0673b8 100644 --- a/lib/quantum_thirdparty/bigswitch_floodlight +++ b/lib/neutron_thirdparty/bigswitch_floodlight @@ -13,7 +13,7 @@ function configure_bigswitch_floodlight() { } function init_bigswitch_floodlight() { - install_quantum_agent_packages + install_neutron_agent_packages echo -n "Installing OVS managed by the openflow controllers:" echo ${BS_FL_CONTROLLERS_PORT} diff --git a/lib/quantum_thirdparty/nicira b/lib/neutron_thirdparty/nicira similarity index 100% rename from lib/quantum_thirdparty/nicira rename to lib/neutron_thirdparty/nicira diff --git a/lib/quantum_thirdparty/ryu b/lib/neutron_thirdparty/ryu similarity index 75% rename from lib/quantum_thirdparty/ryu rename to lib/neutron_thirdparty/ryu index f1e9e7c495..3b825a10c1 100644 --- a/lib/quantum_thirdparty/ryu +++ b/lib/neutron_thirdparty/ryu @@ -18,8 +18,8 @@ RYU_OFP_PORT=${RYU_OFP_PORT:-6633} # Ryu Applications RYU_APPS=${RYU_APPS:-ryu.app.simple_isolation,ryu.app.rest} -# configure_ryu can be called multiple times as quantum_pluing/ryu may call -# this function for quantum-ryu-agent +# configure_ryu can be called multiple times as neutron_pluing/ryu may call +# this function for neutron-ryu-agent _RYU_CONFIGURED=${_RYU_CONFIGURED:-False} function configure_ryu() { if [[ "$_RYU_CONFIGURED" == "False" ]]; then @@ -44,19 +44,19 @@ wsapi_host=$RYU_API_HOST wsapi_port=$RYU_API_PORT ofp_listen_host=$RYU_OFP_HOST ofp_tcp_listen_port=$RYU_OFP_PORT -quantum_url=http://$Q_HOST:$Q_PORT -quantum_admin_username=$Q_ADMIN_USERNAME -quantum_admin_password=$SERVICE_PASSWORD -quantum_admin_tenant_name=$SERVICE_TENANT_NAME -quantum_admin_auth_url=$KEYSTONE_SERVICE_PROTOCOL://$KEYSTONE_SERVICE_HOST:$KEYSTONE_AUTH_PORT/v2.0 -quantum_auth_strategy=$Q_AUTH_STRATEGY -quantum_controller_addr=tcp:$RYU_OFP_HOST:$RYU_OFP_PORT +neutron_url=http://$Q_HOST:$Q_PORT +neutron_admin_username=$Q_ADMIN_USERNAME +neutron_admin_password=$SERVICE_PASSWORD +neutron_admin_tenant_name=$SERVICE_TENANT_NAME +neutron_admin_auth_url=$KEYSTONE_SERVICE_PROTOCOL://$KEYSTONE_SERVICE_HOST:$KEYSTONE_AUTH_PORT/v2.0 +neutron_auth_strategy=$Q_AUTH_STRATEGY +neutron_controller_addr=tcp:$RYU_OFP_HOST:$RYU_OFP_PORT "} echo "${RYU_CONF_CONTENTS}" > $RYU_CONF } -# install_ryu can be called multiple times as quantum_pluing/ryu may call -# this function for quantum-ryu-agent +# install_ryu can be called multiple times as neutron_pluing/ryu may call +# this function for neutron-ryu-agent # Make this function idempotent and avoid cloning same repo many times # with RECLONE=yes _RYU_INSTALLED=${_RYU_INSTALLED:-False} diff --git a/lib/quantum_thirdparty/trema b/lib/neutron_thirdparty/trema similarity index 100% rename from lib/quantum_thirdparty/trema rename to lib/neutron_thirdparty/trema diff --git a/lib/nova b/lib/nova index afc540e7c6..24d5cf9b0a 100644 --- a/lib/nova +++ b/lib/nova @@ -81,7 +81,7 @@ if [ "$VIRT_DRIVER" = 'xenserver' ]; then GUEST_INTERFACE_DEFAULT=eth1 # Allow ``build_domU.sh`` to specify the flat network bridge via kernel args FLAT_NETWORK_BRIDGE_DEFAULT=$(sed -e 's/.* flat_network_bridge=\([[:alnum:]]*\).*$/\1/g' /proc/cmdline) - if is_service_enabled quantum; then + if is_service_enabled neutron; then XEN_INTEGRATION_BRIDGE=$(sed -e 's/.* xen_integration_bridge=\([[:alnum:]]*\).*$/\1/g' /proc/cmdline) fi elif [ "$VIRT_DRIVER" = 'baremetal' ]; then @@ -281,7 +281,7 @@ function configure_nova() { fi if [[ "$VIRT_DRIVER" = 'libvirt' ]]; then - if is_service_enabled quantum && is_quantum_ovs_base_plugin && ! sudo grep -q '^cgroup_device_acl' $QEMU_CONF; then + if is_service_enabled neutron && is_neutron_ovs_base_plugin && ! sudo grep -q '^cgroup_device_acl' $QEMU_CONF; then # Add /dev/net/tun to cgroup_device_acls, needed for type=ethernet interfaces cat <