Implement Dragonflow deployment
Add a deployment for Dragonflow, when neutron_plugin_type is ml2.dragonflow. Change-Id: Id5184845d18461c6c37a560cdc0404c8a487c020 Co-Authored-By: Omer Anson <omer.anson@toganetworks.com>
This commit is contained in:
parent
228158e91b
commit
9eef229c0b
@ -42,6 +42,9 @@ calico_git_install_branch: master
|
||||
networking_calico_git_repo: https://git.openstack.org/openstack/networking-calico
|
||||
networking_calico_git_install_branch: master
|
||||
|
||||
dragonflow_git_repo: https://git.openstack.org/openstack/dragonflow
|
||||
dragonflow_git_install_branch: master
|
||||
|
||||
neutron_developer_mode: false
|
||||
neutron_developer_constraints:
|
||||
- "git+{{ neutron_git_repo }}@{{ neutron_git_install_branch }}#egg=neutron"
|
||||
@ -51,6 +54,7 @@ neutron_developer_constraints:
|
||||
- "git+{{ neutron_dynamic_routing_git_repo }}@{{ neutron_dynamic_routing_git_install_branch }}#egg=neutron-dynamic-routing"
|
||||
- "git+{{ calico_git_repo }}@{{ calico_git_install_branch }}#egg=felix"
|
||||
- "git+{{ networking_calico_git_repo }}@{{ networking_calico_git_install_branch }}#egg=networking-calico"
|
||||
- "git+{{ dragonflow_git_repo }}@{{ dragonflow_git_install_branch }}#egg=dragonflow"
|
||||
|
||||
# Name of the virtual env to deploy into
|
||||
neutron_venv_tag: untagged
|
||||
@ -184,6 +188,14 @@ neutron_plugins:
|
||||
plugin_conf_ini_overrides: "{{ neutron_ml2_conf_ini_overrides }}"
|
||||
plugin_core: ml2
|
||||
plugin_ini: plugins/ml2/ml2_conf.ini
|
||||
ml2.dragonflow:
|
||||
plugin_core: neutron.plugins.ml2.plugin.Ml2Plugin
|
||||
plugin_ini: plugins/ml2/ml2_conf.ini
|
||||
drivers_type: "{{ neutron_ml2_drivers_type }}"
|
||||
mechanisms: "df"
|
||||
plugin_conf_ini_overrides: "{{ neutron_ml2_conf_ini_overrides }}"
|
||||
l3_agent_mode: "legacy"
|
||||
driver_interface: "openvswitch"
|
||||
plumgrid:
|
||||
plugin_conf_ini_overrides: "{{ neutron_plumgrid_conf_ini_overrides }}"
|
||||
plugin_core: networking_plumgrid.neutron.plugins.plugin.NeutronPluginPLUMgridV2
|
||||
@ -298,7 +310,7 @@ neutron_services:
|
||||
group: neutron_server
|
||||
service_name: neutron-server
|
||||
service_en: True
|
||||
config_options: "--config-file {{ neutron_conf_dir }}/neutron.conf --config-file {{ neutron_conf_dir }}/{{ neutron_plugins[neutron_plugin_type].plugin_ini }} --log-file=/var/log/neutron/neutron-server.log"
|
||||
config_options: "--config-file {{ neutron_conf_dir }}/neutron.conf --config-file {{ neutron_conf_dir }}/{{ neutron_plugins[neutron_plugin_type].plugin_ini }} --log-file=/var/log/neutron/neutron-server.log {% if neutron_plugin_type == 'ml2.dragonflow' %}--config-file {{ neutron_conf_dir }}/dragonflow.ini{% endif %}"
|
||||
calico-felix:
|
||||
group: neutron_calico_dhcp_agent
|
||||
service_name: calico-felix
|
||||
@ -325,6 +337,30 @@ neutron_services:
|
||||
config_options: "--config-file {{ neutron_conf_dir }}/neutron.conf --config-file {{ neutron_conf_dir }}/plugins/ml2/ml2_conf.ini --config-file {{ neutron_conf_dir }}/plugins/ml2/sriov_nic_agent.ini --log-file=/var/log/neutron/neutron-sriov-nic-agent.log"
|
||||
config_overrides: "{{ neutron_sriov_nic_agent_ini_overrides }}"
|
||||
config_type: "ini"
|
||||
dragonflow-controller-agent:
|
||||
group: dragonflow_controller_agent
|
||||
service_name: df-local-controller
|
||||
service_en: "{{ neutron_plugin_type == 'ml2.dragonflow' }}"
|
||||
config_options: "--config-file {{ neutron_conf_dir }}/neutron.conf --config-file {{ neutron_conf_dir }}/dragonflow.ini --log-file=/var/log/dragonflow/df-local-controller.log"
|
||||
config_overrides: "{{ neutron_dragonflow_ini_overrides }}"
|
||||
config_type: "ini"
|
||||
dragonflow-l3-agent:
|
||||
group: dragonflow_l3_agent
|
||||
service_name: df-l3-agent
|
||||
service_en: "{{ neutron_plugin_type == 'ml2.dragonflow' and neutron_l3 | bool }}"
|
||||
service_conf_path: "{{ neutron_conf_dir }}"
|
||||
service_conf: l3_agent.ini
|
||||
service_rootwrap: rootwrap.d/l3.filters
|
||||
config_options: "--config-file {{ neutron_conf_dir }}/neutron.conf --config-file {{ neutron_conf_dir }}/l3_agent.ini --log-file=/var/log/dragonflow/df-l3-agent.log"
|
||||
config_overrides: "{{ neutron_dragonflow_ini_overrides }}"
|
||||
config_type: "ini"
|
||||
dragonflow-pubsub-agent:
|
||||
group: dragonflow_pubsub_agent
|
||||
service_name: df-publisher-service
|
||||
service_en: "{{ neutron_plugin_type == 'ml2.dragonflow' }}"
|
||||
config_options: "--config-file {{ neutron_conf_dir }}/neutron.conf --config-file {{ neutron_conf_dir }}/dragonflow.ini --log-file=/var/log/dragonflow/df-publisher-service.log"
|
||||
config_overrides: "{{ neutron_dragonflow_ini_overrides }}"
|
||||
config_type: "ini"
|
||||
|
||||
## Neutron DHCP Agent
|
||||
neutron_dhcp: "{% if neutron_plugin_type.split('.')[0] == 'ml2' %}True{% else %}False{% endif %}"
|
||||
@ -349,7 +385,7 @@ neutron_lbaasv2_service_provider: LOADBALANCERV2:Haproxy:neutron_lbaas.drivers.h
|
||||
## Please add 'router' to the neutron_plugin_base list
|
||||
#TODO(odyssey4me): Remove the class path from this conditional in the Newton cycle
|
||||
# Should the neutron-l3-agent service should be enabled on the host
|
||||
neutron_l3: "{% if 'router' in neutron_plugin_base or 'neutron.services.l3_router.l3_router_plugin.L3RouterPlugin' in neutron_plugin_base %}True{% else %}False{% endif %}"
|
||||
neutron_l3: "{% if 'router' in neutron_plugin_base or 'neutron.services.l3_router.l3_router_plugin.L3RouterPlugin' in neutron_plugin_base or 'df-l3' in neutron_plugin_base %}True{% else %}False{% endif %}"
|
||||
|
||||
# Set this option to "true" to enable legacy neutron L3HA tool support
|
||||
# TODO(cloudnull): Remove this in the Ocata cycle
|
||||
@ -516,6 +552,11 @@ neutron_service_in_ldap: false
|
||||
|
||||
# neutron_local_ip is used for the VXLAN local tunnel endpoint
|
||||
neutron_local_ip: 127.0.0.1
|
||||
# neutron_management_ip is used to configure the location (IP) of the
|
||||
# neutron-server
|
||||
# Currently only used in Dragonflow
|
||||
neutron_management_ip: 127.0.0.1
|
||||
|
||||
|
||||
# Toggle the use of Ubuntu Cloud Archive
|
||||
neutron_uca_enable: True
|
||||
@ -530,6 +571,28 @@ uca_apt_repo_url: "http://ubuntu-cloud.archive.canonical.com/ubuntu"
|
||||
# metadata requests, and this results in the checksums being incorrect.
|
||||
neutron_metadata_checksum_fix: False
|
||||
|
||||
#Dragonflow configuration
|
||||
# Database specific configuration
|
||||
dragonflow_remote_db_ip: 127.0.0.1 # etcd has local proxy installed
|
||||
dragonflow_remote_db_port: 4001
|
||||
dragonflow_nb_db_class: etcd_nb_db_driver
|
||||
dragonflow_pub_sub_driver: zmq_pubsub_driver
|
||||
dragonflow_pub_sub_multiproc_driver: zmq_pubsub_multiproc_driver
|
||||
dragonflow_pub_sub_multiproc_enabled: "{{ (dragonflow_pub_sub_multiproc_driver | default('', True)) | length > 0 }}"
|
||||
dragonflow_port_status_notifier:
|
||||
dragonflow_apps:
|
||||
- l2_app.L2App
|
||||
- l3_proactive_app.L3ProactiveApp
|
||||
- dhcp_app.DHCPApp
|
||||
- dnat_app.DNATApp
|
||||
- sg_app.SGApp
|
||||
- portsec_app.PortSecApp
|
||||
dragonflow_ex_peer_patch_port: patch-int
|
||||
dragonflow_int_peer_patch_port: patch-ex
|
||||
dragonflow_external_network_bridge: br-ex
|
||||
dragonflow_publisher_bind_address: "*"
|
||||
|
||||
|
||||
# neutron packages that must be installed before anything else
|
||||
neutron_requires_pip_packages:
|
||||
- virtualenv
|
||||
@ -568,6 +631,10 @@ neutron_optional_lbaas_pip_packages:
|
||||
neutron_optional_vpnaas_pip_packages:
|
||||
- neutron_vpnaas
|
||||
|
||||
neutron_optional_dragonflow_pip_packages:
|
||||
- dragonflow
|
||||
- python-etcd
|
||||
|
||||
neutron_proprietary_nuage_pip_packages:
|
||||
- nuage-openstack-neutron
|
||||
- nuage-openstack-neutronclient
|
||||
@ -601,3 +668,4 @@ neutron_bgp_dragent_ini_overrides: {}
|
||||
neutron_calico_dhcp_agent_ini_overrides: {}
|
||||
neutron_calico_felix_ini_overrides: {}
|
||||
neutron_sriov_nic_agent_ini_overrides: {}
|
||||
neutron_dragonflow_ini_overrides: {}
|
||||
|
11
files/rootwrap.d/dragonflow-controller.filters
Normal file
11
files/rootwrap.d/dragonflow-controller.filters
Normal file
@ -0,0 +1,11 @@
|
||||
# neutron-rootwrap command filters for nodes on which dragonflow SDN network
|
||||
# controller is used.
|
||||
#
|
||||
# This file should be owned by (and only-writeable by) the root user
|
||||
|
||||
# format seems to be
|
||||
# cmd-name: filter-name, raw-command, user, args
|
||||
|
||||
[Filters]
|
||||
|
||||
|
@ -37,7 +37,11 @@ dependencies:
|
||||
- role: etcd
|
||||
etcd_install_type: proxy
|
||||
when:
|
||||
- neutron_services['calico-dhcp-agent']['group'] in group_names
|
||||
or neutron_services['calico-felix']['group'] in group_names
|
||||
or neutron_services['neutron-server']['group'] in group_names
|
||||
- neutron_plugin_type == 'ml2.calico'
|
||||
- "{{ neutron_plugin_type in ['ml2.calico', 'ml2.dragonflow'] }}"
|
||||
- "{{ group_names | intersect([
|
||||
neutron_services['calico-dhcp-agent']['group'],
|
||||
neutron_services['calico-felix']['group'],
|
||||
neutron_services['dragonflow-controller-agent']['group'],
|
||||
neutron_services['neutron-server']['group']
|
||||
]) | length > 0
|
||||
}}"
|
||||
|
@ -0,0 +1,7 @@
|
||||
---
|
||||
features:
|
||||
- The ``dragonflow`` plugin for neutron is now available.
|
||||
You can set the ``neutron_plugin_type`` to
|
||||
``ml2.dragonflow`` to utilize this code path.
|
||||
The ``dragonflow`` code path is currently
|
||||
experimental.
|
119
tasks/dragonflow.yml
Normal file
119
tasks/dragonflow.yml
Normal file
@ -0,0 +1,119 @@
|
||||
---
|
||||
# Copyright 2016, Jean-Philippe Evrard <jean-philippe@evrard.me>
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
- name: Install DragonFlow pip packages
|
||||
pip:
|
||||
name: "{{ neutron_optional_dragonflow_pip_packages }}"
|
||||
state: "{{ neutron_pip_package_state }}"
|
||||
virtualenv: "{{ neutron_bin | dirname }}"
|
||||
virtualenv_site_packages: "no"
|
||||
extra_args: >-
|
||||
{{ neutron_developer_mode | ternary('--constraint /opt/developer-pip-constraints.txt', '') }}
|
||||
{{ (pip_install_upper_constraints is defined) | ternary('--constraint ' + pip_install_upper_constraints | default(''),'') }}
|
||||
{{ pip_install_options | default('') }}
|
||||
register: install_packages
|
||||
until: install_packages|success
|
||||
retries: 5
|
||||
delay: 2
|
||||
notify: Restart neutron services
|
||||
tags:
|
||||
- dragonflow-install
|
||||
- dragonflow-pip-packages
|
||||
|
||||
- name: Ensure DragonFlow directories exists
|
||||
file:
|
||||
path: "{{ item }}"
|
||||
state: directory
|
||||
owner: "{{ neutron_system_user_name }}"
|
||||
group: "{{ neutron_system_group_name }}"
|
||||
mode: "0755"
|
||||
with_items:
|
||||
- "{{ neutron_conf_dir }}/plugins"
|
||||
- "/var/log/dragonflow"
|
||||
tags:
|
||||
- dragonflow-config
|
||||
|
||||
- name: Setup DragonFlow configuration
|
||||
config_template:
|
||||
src: dragonflow.ini.j2
|
||||
dest: "{{ neutron_conf_dir }}/dragonflow.ini"
|
||||
owner: "{{ neutron_system_user_name }}"
|
||||
group: "{{ neutron_system_group_name }}"
|
||||
config_overrides: "{{ neutron_dragonflow_ini_overrides }}"
|
||||
config_type: "ini"
|
||||
tags:
|
||||
- dragonflow-config
|
||||
|
||||
- name: Setup Dragonflow pub/sub IPC socket folder
|
||||
file:
|
||||
path: "/var/run/dragonflow"
|
||||
state: directory
|
||||
owner: "{{ neutron_system_user_name }}"
|
||||
group: "{{ neutron_system_group_name }}"
|
||||
mode: "0755"
|
||||
when:
|
||||
- dragonflow_pub_sub_multiproc_enabled
|
||||
|
||||
- name: Setup Dragonflow integration bridge
|
||||
openvswitch_bridge:
|
||||
bridge: br-int
|
||||
state: present
|
||||
tags:
|
||||
- dragonflow-config
|
||||
when:
|
||||
- (inventory_hostname in groups[neutron_services['dragonflow-l3-agent']['group']]) or
|
||||
(inventory_hostname in groups[neutron_services['dragonflow-controller-agent']['group']])
|
||||
|
||||
# Start Dragonflow publisher service
|
||||
- include: neutron_init_common.yml
|
||||
vars:
|
||||
program_name: "{{ neutron_services['dragonflow-pubsub-agent'].service_name }}"
|
||||
program_config_options: "{{ neutron_services['dragonflow-pubsub-agent'].config_options }}"
|
||||
system_user: "{{ neutron_system_user_name }}"
|
||||
system_group: "{{ neutron_system_group_name }}"
|
||||
service_home: "{{ neutron_system_home_folder }}"
|
||||
when:
|
||||
- neutron_services['dragonflow-pubsub-agent']['group'] in group_names
|
||||
- neutron_services['dragonflow-pubsub-agent'].service_en | bool
|
||||
tags:
|
||||
- upstart-init
|
||||
|
||||
# Start Dragonflow publisher service
|
||||
- include: neutron_init_common.yml
|
||||
vars:
|
||||
program_name: "{{ neutron_services['dragonflow-l3-agent'].service_name }}"
|
||||
program_config_options: "{{ neutron_services['dragonflow-l3-agent'].config_options }}"
|
||||
system_user: root
|
||||
system_group: root
|
||||
service_home: "{{ neutron_system_home_folder }}"
|
||||
when:
|
||||
- neutron_services['dragonflow-l3-agent']['group'] in group_names
|
||||
- neutron_services['dragonflow-l3-agent'].service_en | bool
|
||||
tags:
|
||||
- upstart-init
|
||||
|
||||
# Start Dragonflow controller agent
|
||||
- include: neutron_init_common.yml
|
||||
vars:
|
||||
program_name: "{{ neutron_services['dragonflow-controller-agent'].service_name }}"
|
||||
program_config_options: "{{ neutron_services['dragonflow-controller-agent'].config_options }}"
|
||||
system_user: root
|
||||
system_group: root
|
||||
service_home: "{{ neutron_system_home_folder }}"
|
||||
when:
|
||||
- neutron_services['dragonflow-controller-agent']['group'] in group_names
|
||||
- neutron_services['dragonflow-controller-agent'].service_en | bool
|
||||
tags:
|
||||
- upstart-init
|
@ -74,6 +74,11 @@
|
||||
tags:
|
||||
- neutron-config
|
||||
|
||||
- include: dragonflow.yml
|
||||
when: neutron_plugin_type == 'ml2.dragonflow'
|
||||
tags:
|
||||
- neutron-install
|
||||
|
||||
- include: neutron_db_setup.yml
|
||||
when:
|
||||
- neutron_services['neutron-server']['group'] in group_names
|
||||
|
@ -91,8 +91,12 @@
|
||||
delay: 2
|
||||
with_items: "{{ neutron_ovs_distro_packages }}"
|
||||
when:
|
||||
- neutron_services['neutron-openvswitch-agent']['group'] in group_names
|
||||
- neutron_services['neutron-openvswitch-agent'].service_en | bool
|
||||
- (neutron_services['neutron-openvswitch-agent']['group'] in group_names and
|
||||
neutron_services['neutron-openvswitch-agent'].service_en | bool) or
|
||||
(neutron_services['dragonflow-controller-agent']['group'] in group_names and
|
||||
neutron_services['dragonflow-controller-agent'].service_en | bool) or
|
||||
(neutron_services['dragonflow-l3-agent']['group'] in group_names and
|
||||
neutron_services['dragonflow-l3-agent'].service_en | bool)
|
||||
|
||||
- name: Install distro packages for LBaaS
|
||||
package:
|
||||
|
58
templates/dragonflow.ini.j2
Normal file
58
templates/dragonflow.ini.j2
Normal file
@ -0,0 +1,58 @@
|
||||
# {{ ansible_managed }}
|
||||
#
|
||||
[DEFAULT]
|
||||
|
||||
[df]
|
||||
# The remote db server ip address (IP address value)
|
||||
remote_db_ip = {{ dragonflow_remote_db_ip }}
|
||||
remote_db_port = {{ dragonflow_remote_db_port }}
|
||||
remote_db_hosts = $remote_db_ip:$remote_db_port
|
||||
|
||||
# The driver to use for the NB database (string value)
|
||||
nb_db_class = {{ dragonflow_nb_db_class }}
|
||||
|
||||
# Local host VTEP IP (IP address value)
|
||||
local_ip = {{ neutron_local_ip }}
|
||||
|
||||
# Local host management IP
|
||||
management_ip = {{ neutron_management_ip }}
|
||||
|
||||
# List of openflow applications classes to load (string value)
|
||||
apps_list = {{ dragonflow_apps | join(",") }}
|
||||
|
||||
# Enable use of Dragonflow built-in pub/sub (boolean value)
|
||||
enable_df_pub_sub = {{ dragonflow_pub_sub_driver | default('', True) | length > 0 }}
|
||||
|
||||
# Drivers to use for the Dragonflow pub/sub (string value)
|
||||
pub_sub_driver = {{ dragonflow_pub_sub_driver | default('', True) }}
|
||||
|
||||
# Drivers to use for the Dragonflow pub/sub (string value)
|
||||
pub_sub_multiproc_driver = {{ dragonflow_pub_sub_multiproc_driver }}
|
||||
|
||||
# Enable notifier for the Dragonflow port status (boolean value)
|
||||
enable_port_status_notifier = {{ dragonflow_port_status_notifier | default('', True) | length > 0 }}
|
||||
|
||||
# Notifier for the Dragonflow port status (string value)
|
||||
port_status_notifier = {{ dragonflow_port_status_notifier | default('', True) }}
|
||||
|
||||
# Neutron Server Publishers bind address (string value)
|
||||
publisher_bind_address = {{ dragonflow_publisher_bind_address }}
|
||||
|
||||
# Use inter-process publish/subscribe.
|
||||
pub_sub_use_multiproc = {{ dragonflow_pub_sub_multiproc_enabled }}
|
||||
|
||||
{%if dragonflow_pub_sub_multiproc_enabled | bool %}
|
||||
publisher_multiproc_socket = /var/run/dragonflow/dragonflow-publisher-socket
|
||||
{% endif %}
|
||||
|
||||
# Have each controller get only the part of the topology relevant to it.
|
||||
enable_selective_topology_distribution = True
|
||||
|
||||
|
||||
[df_dnat_app]
|
||||
ex_peer_patch_port = {{ dragonflow_ex_peer_patch_port }}
|
||||
int_peer_patch_port = {{ dragonflow_int_peer_patch_port }}
|
||||
external_network_bridge = {{ dragonflow_external_network_bridge }}
|
||||
|
||||
[df_l2_app]
|
||||
l2_responder = True
|
@ -78,9 +78,14 @@ rpc_workers = {{ neutron_rpc_workers }}
|
||||
|
||||
{% set dhcp_agents_max = num_agent if num_agent > 2 else 2 %}
|
||||
# DHCP
|
||||
{% if neutron_plugin_type == 'ml2.dragonflow' %}
|
||||
# In dragonflow, DHCP is fully distributed, and DHCP agents are not used
|
||||
dhcp_agent_notification = False
|
||||
{% else %}
|
||||
dhcp_agent_notification = True
|
||||
dhcp_agents_per_network = {{ dhcp_agents_max }}
|
||||
dhcp_lease_duration = 86400
|
||||
{% endif %}
|
||||
|
||||
# Nova notifications
|
||||
notify_nova_on_port_status_changes = True
|
||||
|
73
tests/dragonflow_inventory
Normal file
73
tests/dragonflow_inventory
Normal file
@ -0,0 +1,73 @@
|
||||
[all]
|
||||
localhost
|
||||
infra1
|
||||
openstack1
|
||||
|
||||
[physical_host]
|
||||
localhost
|
||||
|
||||
[all_containers]
|
||||
infra1
|
||||
openstack1
|
||||
|
||||
[rabbitmq_all]
|
||||
infra1
|
||||
|
||||
[galera_all]
|
||||
infra1
|
||||
|
||||
[memcached_all]
|
||||
infra1
|
||||
|
||||
[etcd_all]
|
||||
infra1
|
||||
|
||||
[etcd:children]
|
||||
etcd_all
|
||||
|
||||
[service_all:children]
|
||||
rabbitmq_all
|
||||
galera_all
|
||||
memcached_all
|
||||
etcd_all
|
||||
|
||||
[keystone_all]
|
||||
openstack1
|
||||
|
||||
[neutron_server]
|
||||
openstack1
|
||||
|
||||
[dragonflow_pubsub_agent]
|
||||
openstack1
|
||||
|
||||
[dragonflow_controller_agent]
|
||||
localhost
|
||||
|
||||
[dragonflow_l3_agent]
|
||||
openstack1
|
||||
|
||||
[neutron_agent]
|
||||
[neutron_dhcp_agent]
|
||||
[neutron_linuxbridge_agent]
|
||||
[neutron_openvswitch_agent]
|
||||
[neutron_metering_agent]
|
||||
[neutron_l3_agent]
|
||||
[neutron_lbaas_agent]
|
||||
[neutron_metadata_agent]
|
||||
|
||||
[neutron_all:children]
|
||||
neutron_agent
|
||||
neutron_dhcp_agent
|
||||
neutron_linuxbridge_agent
|
||||
neutron_openvswitch_agent
|
||||
neutron_metering_agent
|
||||
neutron_l3_agent
|
||||
neutron_lbaas_agent
|
||||
neutron_metadata_agent
|
||||
neutron_server
|
||||
dragonflow_controller_agent
|
||||
dragonflow_pubsub_agent
|
||||
dragonflow_l3_agent
|
||||
|
||||
[utility_all]
|
||||
openstack1
|
67
tests/neutron-overrides-dragonflow.yml
Normal file
67
tests/neutron-overrides-dragonflow.yml
Normal file
@ -0,0 +1,67 @@
|
||||
---
|
||||
# Copyright 2016, YOURSTOCHANGE
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
neutron_plugin_type: ml2.dragonflow
|
||||
neutron_plugin_base:
|
||||
- df-l3
|
||||
- metering
|
||||
neutron_external_network_bridge: br-ex
|
||||
neutron_local_ip: 10.1.0.3
|
||||
|
||||
tempest_run: yes
|
||||
|
||||
tempest_plugins:
|
||||
- name: neutron
|
||||
repo: https://git.openstack.org/openstack/neutron
|
||||
branch: master
|
||||
- name: dragonflow
|
||||
repo: https://git.openstack.org/openstack/dragonflow
|
||||
branch: master
|
||||
|
||||
tempest_test_whitelist:
|
||||
- neutron.tests.tempest.api.test_networks*
|
||||
|
||||
dragonflow_fullstack_failing_tests:
|
||||
- dragonflow.tests.fullstack.test_db_consistent.TestDbConsistent.test_db_consistent
|
||||
- dragonflow.tests.fullstack.test_l2_flows.TestL2FLows.test_flat_network_flows
|
||||
- dragonflow.tests.fullstack.test_l2_flows.TestL2FLows.test_tunnel_network_flows
|
||||
- dragonflow.tests.fullstack.test_l2_flows.TestL2FLows.test_vlan_network_flows
|
||||
- dragonflow.tests.fullstack.test_l2_flows.TestL2FLows.test_vm_multicast
|
||||
- dragonflow.tests.fullstack.test_neutron_api.TestNeutronAPIandDB.test_create_delete_qos_policy
|
||||
- dragonflow.tests.fullstack.test_neutron_api.TestNeutronAPIandDB.test_create_port_with_qospolicy
|
||||
- dragonflow.tests.fullstack.test_neutron_api.TestNeutronAPIandDB.test_update_port_with_qospolicy
|
||||
- dragonflow.tests.fullstack.test_object_version.TestObjectVersion.test_qospolicy_version
|
||||
- dragonflow.tests.fullstack.test_ovsdb_monitor.TestOvsdbMonitor.test_notify_message
|
||||
- dragonflow.tests.fullstack.test_ovsdb_monitor.TestOvsdbMonitor.test_reply_message
|
||||
- dragonflow.tests.fullstack.test_portqos.TestPortQos.test_port_with_qospolicy
|
||||
- dragonflow.tests.fullstack.test_portsec_flows.TestOVSFlowsForPortSecurity.test_anti_spoof_flows
|
||||
- dragonflow.tests.fullstack.test_pub_sub.TestDbTableMonitors.test_operations
|
||||
- dragonflow.tests.fullstack.test_pub_sub.TestPubSub.test_pub_sub_add_port
|
||||
- dragonflow.tests.fullstack.test_pub_sub.TestPubSub.test_pub_sub_add_topic
|
||||
- dragonflow.tests.fullstack.test_pub_sub.TestPubSub.test_pub_sub_event_number_different_port
|
||||
- dragonflow.tests.fullstack.test_pub_sub.TestPubSub.test_pub_sub_register_addr
|
||||
- dragonflow.tests.fullstack.test_pub_sub.TestPubSub.test_pub_sub_update_port
|
||||
- dragonflow.tests.fullstack.test_responder.ArpResponderTest.test_arp_responder
|
||||
- dragonflow.tests.fullstack.test_responder.ICMPResponderTest.test_icmp_responder
|
||||
- dragonflow.tests.fullstack.test_sg_flows.TestOVSFlowsForSecurityGroup.test_associating_flows
|
||||
- dragonflow.tests.fullstack.test_sg_flows.TestOVSFlowsForSecurityGroup.test_rule_flows
|
||||
- dragonflow.tests.fullstack.test_topology.TestTopology.test_topology_create_vm
|
||||
- dragonflow.tests.fullstack.test_topology.TestTopology.test_topology_create_vm2
|
||||
- dragonflow.tests.fullstack.test_apps.TestDNATApp.test_nat_embedded_packet
|
||||
- dragonflow.tests.fullstack.test_l3_flows.TestL3Flows.test_router_add_route
|
||||
- dragonflow.tests.fullstack.test_allowed_address_pairs_flows.TestOVSFlowsForActivePortDectionApp.test_sending_arp_to_controller_flows
|
||||
- dragonflow.tests.fullstack.test_apps.TestAllowedAddressPairsDetectActive.test_detected_active_port
|
||||
- dragonflow.tests.fullstack.test_api_nb.Test_API_NB.test_create_lport # Pending patch 418381
|
||||
- dragonflow.tests.fullstack.test_api_nb.Test_API_NB.test_create_lswitch # Pending patch 418381
|
48
tests/test-dragonflow-functional.yml
Normal file
48
tests/test-dragonflow-functional.yml
Normal file
@ -0,0 +1,48 @@
|
||||
---
|
||||
# Copyright 2016, Omer Anson <omer.anson@toganetworks.com>
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
- name: Test Dragonflow
|
||||
hosts: physical_host
|
||||
user: root
|
||||
gather_facts: true
|
||||
roles:
|
||||
- role: "{{ tempest_rolename | default('os_tempest') }}"
|
||||
post_tasks:
|
||||
- name: Run Dragonflow fullstack tests
|
||||
shell: |
|
||||
. {{ tempest_venv_bin }}/activate
|
||||
. /root/openrc
|
||||
export DF_FULLSTACK_USE_ENV=1
|
||||
export OS_STDOUT_CAPTURE=1
|
||||
export OS_STDERR_CAPTURE=1
|
||||
export OS_LOG_CAPTURE=1
|
||||
python -m subunit.run discover dragonflow.tests.fullstack > /var/log/dragonflow-fullstack.subunit
|
||||
subunit2html /var/log/dragonflow-fullstack.subunit /var/log/dragonflow-fullstack.html
|
||||
register: dragonflow_fullstack_tests
|
||||
- name: Ensure etc folder exists in logs
|
||||
file:
|
||||
path: /var/log/etc
|
||||
state: directory
|
||||
- name: Copy config files
|
||||
shell: |
|
||||
cp -r /etc/neutron /var/log/etc
|
||||
register: dragonflow_fullstack_log_copy
|
||||
- name: Verify tests have passed
|
||||
shell: |
|
||||
. {{ tempest_venv_bin }}/activate
|
||||
subunit-filter --without {{ dragonflow_fullstack_failing_tests | join(' --without ') }} -s /var/log/dragonflow-fullstack.subunit | subunit2pyunit
|
||||
exit $?
|
||||
vars_files:
|
||||
- common/test-vars.yml
|
@ -21,8 +21,6 @@
|
||||
|
||||
# Install etcd
|
||||
- include: common/test-install-etcd.yml
|
||||
when:
|
||||
- groups['neutron_calico_dhcp_agent'] | length > 0
|
||||
|
||||
# Install Keystone
|
||||
- include: common/test-install-keystone.yml
|
||||
@ -36,3 +34,7 @@
|
||||
- include: test-calico-functional.yml
|
||||
when:
|
||||
- "{{ neutron_plugin_type == 'ml2.calico' }}"
|
||||
|
||||
- include: test-dragonflow-functional.yml
|
||||
when:
|
||||
- "{{ neutron_plugin_type == 'ml2.dragonflow' }}"
|
||||
|
11
tox.ini
11
tox.ini
@ -146,6 +146,17 @@ commands =
|
||||
{[testenv:tests_clone]commands}
|
||||
bash -c "{toxinidir}/tests/common/test-ansible-functional.sh"
|
||||
|
||||
[testenv:dragonflow]
|
||||
deps =
|
||||
{[testenv:ansible]deps}
|
||||
setenv =
|
||||
{[testenv]setenv}
|
||||
ANSIBLE_INVENTORY={toxinidir}/tests/dragonflow_inventory
|
||||
ANSIBLE_OVERRIDES={toxinidir}/tests/neutron-overrides-dragonflow.yml
|
||||
commands =
|
||||
{[testenv:tests_clone]commands}
|
||||
bash -c "{toxinidir}/tests/common/test-ansible-functional.sh"
|
||||
|
||||
|
||||
[testenv:linters]
|
||||
deps =
|
||||
|
Loading…
Reference in New Issue
Block a user