Retire tap-as-a-service-tempest-plugin: Remove project content
Change-Id: I9b8f06664afea6331990caeacecb8d4abb56cff4
This commit is contained in:
parent
ca1b905adb
commit
0621787700
58
.gitignore
vendored
58
.gitignore
vendored
@ -1,58 +0,0 @@
|
|||||||
*.py[cod]
|
|
||||||
|
|
||||||
# C extensions
|
|
||||||
*.so
|
|
||||||
|
|
||||||
# Packages
|
|
||||||
*.egg
|
|
||||||
*.egg-info
|
|
||||||
dist
|
|
||||||
build
|
|
||||||
.eggs
|
|
||||||
eggs
|
|
||||||
parts
|
|
||||||
bin
|
|
||||||
var
|
|
||||||
sdist
|
|
||||||
develop-eggs
|
|
||||||
.installed.cfg
|
|
||||||
lib
|
|
||||||
lib64
|
|
||||||
|
|
||||||
# Installer logs
|
|
||||||
pip-log.txt
|
|
||||||
|
|
||||||
# Unit test / coverage reports
|
|
||||||
.coverage
|
|
||||||
.tox
|
|
||||||
nosetests.xml
|
|
||||||
.testrepository
|
|
||||||
.stestr
|
|
||||||
.venv
|
|
||||||
|
|
||||||
# Translations
|
|
||||||
*.mo
|
|
||||||
|
|
||||||
# Mr Developer
|
|
||||||
.mr.developer.cfg
|
|
||||||
.project
|
|
||||||
.pydevproject
|
|
||||||
|
|
||||||
# Complexity
|
|
||||||
output/*.html
|
|
||||||
output/*/index.html
|
|
||||||
|
|
||||||
# Sphinx
|
|
||||||
doc/build
|
|
||||||
|
|
||||||
# pbr generates these
|
|
||||||
AUTHORS
|
|
||||||
ChangeLog
|
|
||||||
|
|
||||||
# Editors
|
|
||||||
*~
|
|
||||||
.*.swp
|
|
||||||
.*sw?
|
|
||||||
|
|
||||||
# Files created by releasenotes build
|
|
||||||
releasenotes/build
|
|
3
.mailmap
3
.mailmap
@ -1,3 +0,0 @@
|
|||||||
# Format is:
|
|
||||||
# <preferred e-mail> <other e-mail 1>
|
|
||||||
# <preferred e-mail> <other e-mail 2>
|
|
264
.zuul.yaml
264
.zuul.yaml
@ -1,264 +0,0 @@
|
|||||||
- project:
|
|
||||||
templates:
|
|
||||||
- check-requirements
|
|
||||||
- tempest-plugin-jobs
|
|
||||||
check:
|
|
||||||
jobs:
|
|
||||||
- tap-as-a-service-tempest-plugin:
|
|
||||||
voting: false
|
|
||||||
nodeset: openstack-single-node-focal
|
|
||||||
- tap-as-a-service-tempest-plugin-train:
|
|
||||||
voting: false
|
|
||||||
- tap-as-a-service-tempest-plugin-stein:
|
|
||||||
voting: false
|
|
||||||
- tap-as-a-service-tempest-plugin-rocky:
|
|
||||||
voting: false
|
|
||||||
- tap-as-a-service-tempest-plugin-queens:
|
|
||||||
voting: false
|
|
||||||
- tap-as-a-service-tempest-plugin-pike:
|
|
||||||
voting: false
|
|
||||||
|
|
||||||
- job:
|
|
||||||
name: tap-as-a-service-tempest-plugin
|
|
||||||
parent: devstack-tempest
|
|
||||||
description: |
|
|
||||||
Perform setup common to all tap-as-a-service tempest tests
|
|
||||||
roles:
|
|
||||||
- zuul: openstack/devstack
|
|
||||||
required-projects:
|
|
||||||
- openstack/devstack-gate
|
|
||||||
- openstack/neutron
|
|
||||||
- openstack/tap-as-a-service
|
|
||||||
- x/tap-as-a-service-tempest-plugin
|
|
||||||
- openstack/tempest
|
|
||||||
vars:
|
|
||||||
tempest_test_regex: ^neutron_taas_tempest_plugin\.
|
|
||||||
tempest_concurrency: 4
|
|
||||||
tox_envlist: all
|
|
||||||
network_api_extensions_common:
|
|
||||||
- agent
|
|
||||||
- allowed-address-pairs
|
|
||||||
- auto-allocated-topology
|
|
||||||
- availability_zone
|
|
||||||
- binding
|
|
||||||
- default-subnetpools
|
|
||||||
- dhcp_agent_scheduler
|
|
||||||
- dns-domain-ports
|
|
||||||
- dns-integration
|
|
||||||
- empty-string-filtering
|
|
||||||
- ext-gw-mode
|
|
||||||
- external-net
|
|
||||||
- extra_dhcp_opt
|
|
||||||
- extraroute
|
|
||||||
- filter-validation
|
|
||||||
- fip-port-details
|
|
||||||
- flavors
|
|
||||||
- floatingip-pools
|
|
||||||
- ip-substring-filtering
|
|
||||||
- l3-flavors
|
|
||||||
- l3-ha
|
|
||||||
- l3_agent_scheduler
|
|
||||||
- logging
|
|
||||||
- metering
|
|
||||||
- multi-provider
|
|
||||||
- net-mtu
|
|
||||||
- net-mtu-writable
|
|
||||||
- network-ip-availability
|
|
||||||
- network_availability_zone
|
|
||||||
- pagination
|
|
||||||
- port-resource-request
|
|
||||||
- port-mac-address-regenerate
|
|
||||||
- port-security
|
|
||||||
- port-security-groups-filtering
|
|
||||||
- project-id
|
|
||||||
- provider
|
|
||||||
- qos
|
|
||||||
- qos-bw-minimum-ingress
|
|
||||||
- qos-fip
|
|
||||||
- quotas
|
|
||||||
- quota_details
|
|
||||||
- rbac-policies
|
|
||||||
- router
|
|
||||||
- router_availability_zone
|
|
||||||
- security-group
|
|
||||||
- segment
|
|
||||||
- service-type
|
|
||||||
- sorting
|
|
||||||
- standard-attr-description
|
|
||||||
- standard-attr-revisions
|
|
||||||
- standard-attr-segment
|
|
||||||
- standard-attr-tag
|
|
||||||
- standard-attr-timestamp
|
|
||||||
- subnet_allocation
|
|
||||||
- trunk
|
|
||||||
- trunk-details
|
|
||||||
- uplink-status-propagation
|
|
||||||
network_api_extensions_tempest:
|
|
||||||
- taas
|
|
||||||
- taas-vlan-filter
|
|
||||||
devstack_localrc:
|
|
||||||
TEMPEST_PLUGINS: /opt/stack/tap-as-a-service-tempest-plugin
|
|
||||||
NETWORK_API_EXTENSIONS: "{{ (network_api_extensions_common + network_api_extensions_tempest) | join(',') }}"
|
|
||||||
DOWNLOAD_DEFAULT_IMAGES: false
|
|
||||||
IMAGE_URLS: "http://download.cirros-cloud.net/0.3.4/cirros-0.3.4-i386-disk.img,https://cloud-images.ubuntu.com/releases/bionic/release/ubuntu-18.04-server-cloudimg-amd64.img"
|
|
||||||
DEFAULT_IMAGE_NAME: cirros-0.3.4-i386-disk
|
|
||||||
ADVANCED_IMAGE_NAME: ubuntu-18.04-server-cloudimg-amd64
|
|
||||||
BUILD_TIMEOUT: 784
|
|
||||||
Q_AGENT: openvswitch
|
|
||||||
Q_ML2_TENANT_NETWORK_TYPE: vxlan
|
|
||||||
Q_ML2_PLUGIN_MECHANISM_DRIVERS: openvswitch
|
|
||||||
devstack_local_conf:
|
|
||||||
post-config:
|
|
||||||
/$NEUTRON_CORE_PLUGIN_CONF:
|
|
||||||
AGENT:
|
|
||||||
tunnel_types: vxlan,gre
|
|
||||||
test-config:
|
|
||||||
$TEMPEST_CONFIG:
|
|
||||||
taas_plugin_options:
|
|
||||||
advanced_image_ref: ubuntu-18.04-server-cloudimg-amd64
|
|
||||||
advanced_image_ssh_user: ubuntu
|
|
||||||
provider_physical_network: public
|
|
||||||
provider_segmentation_id: 100
|
|
||||||
image_feature_enabled:
|
|
||||||
api_v2: true
|
|
||||||
devstack_plugins:
|
|
||||||
neutron: git://opendev.org/openstack/neutron.git
|
|
||||||
tap-as-a-service: git://opendev.org/openstack/tap-as-a-service.git
|
|
||||||
# tempest_plugins:
|
|
||||||
# - tap-as-a-service-tempest-plugin
|
|
||||||
devstack_services:
|
|
||||||
base: false
|
|
||||||
key: true
|
|
||||||
mysql: true
|
|
||||||
rabbit: true
|
|
||||||
g-api: true
|
|
||||||
g-reg: true
|
|
||||||
n-api: true
|
|
||||||
n-cond: true
|
|
||||||
n-cpu: true
|
|
||||||
n-crt: true
|
|
||||||
n-sch: true
|
|
||||||
placement-api: true
|
|
||||||
n-api-meta: true
|
|
||||||
# Disable OVN services
|
|
||||||
br-ex-tcpdump: false
|
|
||||||
br-int-flows: false
|
|
||||||
ovn-controller: false
|
|
||||||
ovn-northd: false
|
|
||||||
ovs-vswitchd: false
|
|
||||||
ovsdb-server: false
|
|
||||||
q-ovn-metadata-agent: false
|
|
||||||
# Neutron services
|
|
||||||
q-agt: true
|
|
||||||
q-dhcp: true
|
|
||||||
q-l3: true
|
|
||||||
q-meta: true
|
|
||||||
q-metering: true
|
|
||||||
q-svc: true
|
|
||||||
quantum: true
|
|
||||||
taas: true
|
|
||||||
taas_openvswitch_agent: true
|
|
||||||
tempest: true
|
|
||||||
dstat: true
|
|
||||||
irrelevant-files: &tempest-irrelevant-files
|
|
||||||
- ^(test-|)requirements.txt$
|
|
||||||
- ^releasenotes/.*$
|
|
||||||
- ^doc/.*$
|
|
||||||
- ^.*\.rst$
|
|
||||||
- ^tools/.*$
|
|
||||||
- ^tox.ini$
|
|
||||||
|
|
||||||
- job:
|
|
||||||
name: tap-as-a-service-tempest-plugin-base
|
|
||||||
parent: tap-as-a-service-tempest-plugin
|
|
||||||
|
|
||||||
- job:
|
|
||||||
name: tap-as-a-service-tempest-plugin-train
|
|
||||||
parent: tap-as-a-service-tempest-plugin
|
|
||||||
override-checkout: stable/train
|
|
||||||
|
|
||||||
- job:
|
|
||||||
name: tap-as-a-service-tempest-plugin-stein
|
|
||||||
parent: tap-as-a-service-tempest-plugin
|
|
||||||
override-checkout: stable/stein
|
|
||||||
|
|
||||||
- job:
|
|
||||||
name: tap-as-a-service-tempest-plugin-rocky
|
|
||||||
parent: tap-as-a-service-tempest-plugin
|
|
||||||
override-checkout: stable/rocky
|
|
||||||
nodeset: openstack-single-node-xenial
|
|
||||||
vars:
|
|
||||||
network_api_extensions_tempest:
|
|
||||||
- taas
|
|
||||||
devstack_localrc:
|
|
||||||
USE_PYTHON3: false
|
|
||||||
tempest_black_regex: |
|
|
||||||
(?x) # Ignore comments and whitespaces
|
|
||||||
# bug 1814937
|
|
||||||
neutron_taas_tempest_plugin\.tests\.api\.test_taas\.TaaSExtensionTestJSON\.test_delete_tap_resources_after_ts_port_delete
|
|
||||||
|
|
||||||
- job:
|
|
||||||
name: tap-as-a-service-tempest-plugin-queens
|
|
||||||
parent: tap-as-a-service-tempest-plugin
|
|
||||||
override-checkout: stable/queens
|
|
||||||
nodeset: openstack-single-node-xenial
|
|
||||||
vars:
|
|
||||||
network_api_extensions_tempest:
|
|
||||||
- taas
|
|
||||||
devstack_localrc:
|
|
||||||
USE_PYTHON3: false
|
|
||||||
tempest_black_regex: |
|
|
||||||
(?x) # Ignore comments and whitespaces
|
|
||||||
# bug 1814937
|
|
||||||
neutron_taas_tempest_plugin\.tests\.api\.test_taas\.TaaSExtensionTestJSON\.test_delete_tap_resources_after_ts_port_delete
|
|
||||||
|
|
||||||
- job:
|
|
||||||
name: tap-as-a-service-tempest-plugin-pike
|
|
||||||
parent: tap-as-a-service-tempest-plugin
|
|
||||||
override-checkout: stable/pike
|
|
||||||
nodeset: openstack-single-node-xenial
|
|
||||||
vars:
|
|
||||||
network_api_extensions_tempest:
|
|
||||||
- taas
|
|
||||||
devstack_localrc:
|
|
||||||
USE_PYTHON3: false
|
|
||||||
tempest_black_regex: |
|
|
||||||
(?x) # Ignore comments and whitespaces
|
|
||||||
# bug 1814937
|
|
||||||
neutron_taas_tempest_plugin\.tests\.api\.test_taas\.TaaSExtensionTestJSON\.test_delete_tap_resources_after_ts_port_delete
|
|
||||||
|
|
||||||
- project-template:
|
|
||||||
name: tap-as-a-service-tempest-plugin-jobs
|
|
||||||
check:
|
|
||||||
jobs:
|
|
||||||
- tap-as-a-service-tempest-plugin
|
|
||||||
gate:
|
|
||||||
jobs:
|
|
||||||
- tap-as-a-service-tempest-plugin
|
|
||||||
|
|
||||||
- project-template:
|
|
||||||
name: tap-as-a-service-tempest-plugin-jobs-rocky
|
|
||||||
check:
|
|
||||||
jobs:
|
|
||||||
- tap-as-a-service-tempest-plugin-rocky
|
|
||||||
gate:
|
|
||||||
jobs:
|
|
||||||
- tap-as-a-service-tempest-plugin-rocky
|
|
||||||
|
|
||||||
- project-template:
|
|
||||||
name: tap-as-a-service-tempest-plugin-jobs-queens
|
|
||||||
check:
|
|
||||||
jobs:
|
|
||||||
- tap-as-a-service-tempest-plugin-queens
|
|
||||||
gate:
|
|
||||||
jobs:
|
|
||||||
- tap-as-a-service-tempest-plugin-queens
|
|
||||||
|
|
||||||
- project-template:
|
|
||||||
name: tap-as-a-service-tempest-plugin-jobs-pike
|
|
||||||
check:
|
|
||||||
jobs:
|
|
||||||
- tap-as-a-service-tempest-plugin-pike
|
|
||||||
gate:
|
|
||||||
jobs:
|
|
||||||
- tap-as-a-service-tempest-plugin-pike
|
|
@ -1,17 +0,0 @@
|
|||||||
If you would like to contribute to the development of OpenStack, you must
|
|
||||||
follow the steps in this page:
|
|
||||||
|
|
||||||
https://docs.openstack.org/infra/manual/developers.html
|
|
||||||
|
|
||||||
If you already have a good understanding of how the system works and your
|
|
||||||
OpenStack accounts are set up, you can skip to the development workflow
|
|
||||||
section of this documentation to learn how changes to OpenStack should be
|
|
||||||
submitted for review via the Gerrit tool:
|
|
||||||
|
|
||||||
https://docs.openstack.org/infra/manual/developers.html#development-workflow
|
|
||||||
|
|
||||||
Pull requests submitted through GitHub will be ignored.
|
|
||||||
|
|
||||||
Bugs should be filed on Launchpad, not GitHub:
|
|
||||||
|
|
||||||
https://bugs.launchpad.net/tap-as-a-service
|
|
176
LICENSE
176
LICENSE
@ -1,176 +0,0 @@
|
|||||||
|
|
||||||
Apache License
|
|
||||||
Version 2.0, January 2004
|
|
||||||
http://www.apache.org/licenses/
|
|
||||||
|
|
||||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
||||||
|
|
||||||
1. Definitions.
|
|
||||||
|
|
||||||
"License" shall mean the terms and conditions for use, reproduction,
|
|
||||||
and distribution as defined by Sections 1 through 9 of this document.
|
|
||||||
|
|
||||||
"Licensor" shall mean the copyright owner or entity authorized by
|
|
||||||
the copyright owner that is granting the License.
|
|
||||||
|
|
||||||
"Legal Entity" shall mean the union of the acting entity and all
|
|
||||||
other entities that control, are controlled by, or are under common
|
|
||||||
control with that entity. For the purposes of this definition,
|
|
||||||
"control" means (i) the power, direct or indirect, to cause the
|
|
||||||
direction or management of such entity, whether by contract or
|
|
||||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
||||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
||||||
|
|
||||||
"You" (or "Your") shall mean an individual or Legal Entity
|
|
||||||
exercising permissions granted by this License.
|
|
||||||
|
|
||||||
"Source" form shall mean the preferred form for making modifications,
|
|
||||||
including but not limited to software source code, documentation
|
|
||||||
source, and configuration files.
|
|
||||||
|
|
||||||
"Object" form shall mean any form resulting from mechanical
|
|
||||||
transformation or translation of a Source form, including but
|
|
||||||
not limited to compiled object code, generated documentation,
|
|
||||||
and conversions to other media types.
|
|
||||||
|
|
||||||
"Work" shall mean the work of authorship, whether in Source or
|
|
||||||
Object form, made available under the License, as indicated by a
|
|
||||||
copyright notice that is included in or attached to the work
|
|
||||||
(an example is provided in the Appendix below).
|
|
||||||
|
|
||||||
"Derivative Works" shall mean any work, whether in Source or Object
|
|
||||||
form, that is based on (or derived from) the Work and for which the
|
|
||||||
editorial revisions, annotations, elaborations, or other modifications
|
|
||||||
represent, as a whole, an original work of authorship. For the purposes
|
|
||||||
of this License, Derivative Works shall not include works that remain
|
|
||||||
separable from, or merely link (or bind by name) to the interfaces of,
|
|
||||||
the Work and Derivative Works thereof.
|
|
||||||
|
|
||||||
"Contribution" shall mean any work of authorship, including
|
|
||||||
the original version of the Work and any modifications or additions
|
|
||||||
to that Work or Derivative Works thereof, that is intentionally
|
|
||||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
||||||
or by an individual or Legal Entity authorized to submit on behalf of
|
|
||||||
the copyright owner. For the purposes of this definition, "submitted"
|
|
||||||
means any form of electronic, verbal, or written communication sent
|
|
||||||
to the Licensor or its representatives, including but not limited to
|
|
||||||
communication on electronic mailing lists, source code control systems,
|
|
||||||
and issue tracking systems that are managed by, or on behalf of, the
|
|
||||||
Licensor for the purpose of discussing and improving the Work, but
|
|
||||||
excluding communication that is conspicuously marked or otherwise
|
|
||||||
designated in writing by the copyright owner as "Not a Contribution."
|
|
||||||
|
|
||||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
||||||
on behalf of whom a Contribution has been received by Licensor and
|
|
||||||
subsequently incorporated within the Work.
|
|
||||||
|
|
||||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
||||||
this License, each Contributor hereby grants to You a perpetual,
|
|
||||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
||||||
copyright license to reproduce, prepare Derivative Works of,
|
|
||||||
publicly display, publicly perform, sublicense, and distribute the
|
|
||||||
Work and such Derivative Works in Source or Object form.
|
|
||||||
|
|
||||||
3. Grant of Patent License. Subject to the terms and conditions of
|
|
||||||
this License, each Contributor hereby grants to You a perpetual,
|
|
||||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
||||||
(except as stated in this section) patent license to make, have made,
|
|
||||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
||||||
where such license applies only to those patent claims licensable
|
|
||||||
by such Contributor that are necessarily infringed by their
|
|
||||||
Contribution(s) alone or by combination of their Contribution(s)
|
|
||||||
with the Work to which such Contribution(s) was submitted. If You
|
|
||||||
institute patent litigation against any entity (including a
|
|
||||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
||||||
or a Contribution incorporated within the Work constitutes direct
|
|
||||||
or contributory patent infringement, then any patent licenses
|
|
||||||
granted to You under this License for that Work shall terminate
|
|
||||||
as of the date such litigation is filed.
|
|
||||||
|
|
||||||
4. Redistribution. You may reproduce and distribute copies of the
|
|
||||||
Work or Derivative Works thereof in any medium, with or without
|
|
||||||
modifications, and in Source or Object form, provided that You
|
|
||||||
meet the following conditions:
|
|
||||||
|
|
||||||
(a) You must give any other recipients of the Work or
|
|
||||||
Derivative Works a copy of this License; and
|
|
||||||
|
|
||||||
(b) You must cause any modified files to carry prominent notices
|
|
||||||
stating that You changed the files; and
|
|
||||||
|
|
||||||
(c) You must retain, in the Source form of any Derivative Works
|
|
||||||
that You distribute, all copyright, patent, trademark, and
|
|
||||||
attribution notices from the Source form of the Work,
|
|
||||||
excluding those notices that do not pertain to any part of
|
|
||||||
the Derivative Works; and
|
|
||||||
|
|
||||||
(d) If the Work includes a "NOTICE" text file as part of its
|
|
||||||
distribution, then any Derivative Works that You distribute must
|
|
||||||
include a readable copy of the attribution notices contained
|
|
||||||
within such NOTICE file, excluding those notices that do not
|
|
||||||
pertain to any part of the Derivative Works, in at least one
|
|
||||||
of the following places: within a NOTICE text file distributed
|
|
||||||
as part of the Derivative Works; within the Source form or
|
|
||||||
documentation, if provided along with the Derivative Works; or,
|
|
||||||
within a display generated by the Derivative Works, if and
|
|
||||||
wherever such third-party notices normally appear. The contents
|
|
||||||
of the NOTICE file are for informational purposes only and
|
|
||||||
do not modify the License. You may add Your own attribution
|
|
||||||
notices within Derivative Works that You distribute, alongside
|
|
||||||
or as an addendum to the NOTICE text from the Work, provided
|
|
||||||
that such additional attribution notices cannot be construed
|
|
||||||
as modifying the License.
|
|
||||||
|
|
||||||
You may add Your own copyright statement to Your modifications and
|
|
||||||
may provide additional or different license terms and conditions
|
|
||||||
for use, reproduction, or distribution of Your modifications, or
|
|
||||||
for any such Derivative Works as a whole, provided Your use,
|
|
||||||
reproduction, and distribution of the Work otherwise complies with
|
|
||||||
the conditions stated in this License.
|
|
||||||
|
|
||||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
||||||
any Contribution intentionally submitted for inclusion in the Work
|
|
||||||
by You to the Licensor shall be under the terms and conditions of
|
|
||||||
this License, without any additional terms or conditions.
|
|
||||||
Notwithstanding the above, nothing herein shall supersede or modify
|
|
||||||
the terms of any separate license agreement you may have executed
|
|
||||||
with Licensor regarding such Contributions.
|
|
||||||
|
|
||||||
6. Trademarks. This License does not grant permission to use the trade
|
|
||||||
names, trademarks, service marks, or product names of the Licensor,
|
|
||||||
except as required for reasonable and customary use in describing the
|
|
||||||
origin of the Work and reproducing the content of the NOTICE file.
|
|
||||||
|
|
||||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
||||||
agreed to in writing, Licensor provides the Work (and each
|
|
||||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
||||||
implied, including, without limitation, any warranties or conditions
|
|
||||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
||||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
||||||
appropriateness of using or redistributing the Work and assume any
|
|
||||||
risks associated with Your exercise of permissions under this License.
|
|
||||||
|
|
||||||
8. Limitation of Liability. In no event and under no legal theory,
|
|
||||||
whether in tort (including negligence), contract, or otherwise,
|
|
||||||
unless required by applicable law (such as deliberate and grossly
|
|
||||||
negligent acts) or agreed to in writing, shall any Contributor be
|
|
||||||
liable to You for damages, including any direct, indirect, special,
|
|
||||||
incidental, or consequential damages of any character arising as a
|
|
||||||
result of this License or out of the use or inability to use the
|
|
||||||
Work (including but not limited to damages for loss of goodwill,
|
|
||||||
work stoppage, computer failure or malfunction, or any and all
|
|
||||||
other commercial damages or losses), even if such Contributor
|
|
||||||
has been advised of the possibility of such damages.
|
|
||||||
|
|
||||||
9. Accepting Warranty or Additional Liability. While redistributing
|
|
||||||
the Work or Derivative Works thereof, You may choose to offer,
|
|
||||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
||||||
or other liability obligations and/or rights consistent with this
|
|
||||||
License. However, in accepting such obligations, You may act only
|
|
||||||
on Your own behalf and on Your sole responsibility, not on behalf
|
|
||||||
of any other Contributor, and only if You agree to indemnify,
|
|
||||||
defend, and hold each Contributor harmless for any liability
|
|
||||||
incurred by, or claims asserted against, such Contributor by reason
|
|
||||||
of your accepting any such warranty or additional liability.
|
|
||||||
|
|
18
README.rst
18
README.rst
@ -1,5 +1,15 @@
|
|||||||
===================================
|
This project is no longer maintained.
|
||||||
Tempest plugin for Tap as a Service
|
|
||||||
===================================
|
The contents of this repository are still available in the Git
|
||||||
|
source code management system. To see the contents of this
|
||||||
|
repository before it reached its end of life, please check out the
|
||||||
|
previous commit with "git checkout HEAD^1".
|
||||||
|
|
||||||
|
The content of tap-as-a-service-tempest-plugin was moved to
|
||||||
|
neutron-tempest-plugin and maintained there:
|
||||||
|
https://opendev.org/openstack/neutron-tempest-plugin/src/branch/master/neutron_tempest_plugin/tap_as_a_service
|
||||||
|
|
||||||
|
For any further questions, please email
|
||||||
|
openstack-discuss@lists.openstack.org or join #openstack-dev on
|
||||||
|
OFTC.
|
||||||
|
|
||||||
This repository contains tempest plugin for tap-as-a-service.
|
|
||||||
|
@ -1,47 +0,0 @@
|
|||||||
# Copyright (c) 2018 AT&T Corporation
|
|
||||||
# All Rights Reserved.
|
|
||||||
#
|
|
||||||
# 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.
|
|
||||||
|
|
||||||
from oslo_config import cfg
|
|
||||||
from tempest import config
|
|
||||||
|
|
||||||
|
|
||||||
CONF = config.CONF
|
|
||||||
|
|
||||||
|
|
||||||
taas_plugin_group = cfg.OptGroup(name='taas_plugin_options',
|
|
||||||
title='TaaS Tempest Plugin Options')
|
|
||||||
|
|
||||||
TaaSPluginGroup = [
|
|
||||||
cfg.StrOpt('provider_physical_network',
|
|
||||||
default='',
|
|
||||||
help='Physical network to be used for creating SRIOV network.'),
|
|
||||||
cfg.StrOpt('provider_segmentation_id',
|
|
||||||
default='',
|
|
||||||
help='Segmentation-id to be used for creating SRIOV network.'),
|
|
||||||
cfg.StrOpt('vlan_filter',
|
|
||||||
default='',
|
|
||||||
help='Comma separated list of VLANs to be mirrored '
|
|
||||||
'for a Tap-Flow.'),
|
|
||||||
cfg.StrOpt('advanced_image_ref',
|
|
||||||
default='',
|
|
||||||
help='Valid advanced image uuid to be used in tests. '
|
|
||||||
'Must contain tcpdump preinstalled.'),
|
|
||||||
cfg.StrOpt('advanced_image_ssh_user',
|
|
||||||
default='ubuntu',
|
|
||||||
help='Name of ssh user to use with advanced image in tests.'),
|
|
||||||
cfg.StrOpt('advanced_image_flavor_ref',
|
|
||||||
default='d1',
|
|
||||||
help='Valid flavor to use with advanced image in tests.'),
|
|
||||||
]
|
|
@ -1,39 +0,0 @@
|
|||||||
# Copyright (c) 2015 Midokura SARL
|
|
||||||
# All Rights Reserved.
|
|
||||||
#
|
|
||||||
# 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.
|
|
||||||
|
|
||||||
import os
|
|
||||||
|
|
||||||
from tempest.test_discover import plugins
|
|
||||||
|
|
||||||
from neutron_taas_tempest_plugin import config as project_config
|
|
||||||
|
|
||||||
|
|
||||||
class NeutronTaaSPlugin(plugins.TempestPlugin):
|
|
||||||
def get_opt_lists(self):
|
|
||||||
return [(project_config.taas_plugin_group.name,
|
|
||||||
project_config.TaaSPluginGroup)]
|
|
||||||
|
|
||||||
def load_tests(self):
|
|
||||||
this_dir = os.path.dirname(os.path.abspath(__file__))
|
|
||||||
# top_level_dir = $(this_dir)/..
|
|
||||||
top_level_dir = os.path.split(this_dir)[0]
|
|
||||||
test_dir = os.path.join(top_level_dir,
|
|
||||||
'neutron_taas_tempest_plugin/tests')
|
|
||||||
return (test_dir, top_level_dir)
|
|
||||||
|
|
||||||
def register_opts(self, conf):
|
|
||||||
conf.register_group(project_config.taas_plugin_group)
|
|
||||||
conf.register_opts(project_config.TaaSPluginGroup,
|
|
||||||
project_config.taas_plugin_group)
|
|
@ -1,66 +0,0 @@
|
|||||||
# Copyright (c) 2015 Midokura SARL
|
|
||||||
# All Rights Reserved.
|
|
||||||
#
|
|
||||||
# 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.
|
|
||||||
|
|
||||||
from tempest.lib.services.network import base
|
|
||||||
|
|
||||||
|
|
||||||
class TapServicesClient(base.BaseNetworkClient):
|
|
||||||
|
|
||||||
def create_tap_service(self, **kwargs):
|
|
||||||
uri = '/taas/tap_services'
|
|
||||||
post_data = {'tap_service': kwargs}
|
|
||||||
return self.create_resource(uri, post_data)
|
|
||||||
|
|
||||||
def update_tap_service(self, tap_service_id, **kwargs):
|
|
||||||
uri = '/taas/tap_services/%s' % tap_service_id
|
|
||||||
post_data = {'tap_service': kwargs}
|
|
||||||
return self.update_resource(uri, post_data)
|
|
||||||
|
|
||||||
def show_tap_service(self, tap_service_id, **fields):
|
|
||||||
uri = '/taas/tap_services/%s' % tap_service_id
|
|
||||||
return self.show_resource(uri, **fields)
|
|
||||||
|
|
||||||
def delete_tap_service(self, tap_service_id):
|
|
||||||
uri = '/taas/tap_services/%s' % tap_service_id
|
|
||||||
return self.delete_resource(uri)
|
|
||||||
|
|
||||||
def list_tap_services(self, **filters):
|
|
||||||
uri = '/taas/tap_services'
|
|
||||||
return self.list_resources(uri, **filters)
|
|
||||||
|
|
||||||
|
|
||||||
class TapFlowsClient(base.BaseNetworkClient):
|
|
||||||
|
|
||||||
def create_tap_flow(self, **kwargs):
|
|
||||||
uri = '/taas/tap_flows'
|
|
||||||
post_data = {'tap_flow': kwargs}
|
|
||||||
return self.create_resource(uri, post_data)
|
|
||||||
|
|
||||||
def update_tap_flow(self, tap_flow_id, **kwargs):
|
|
||||||
uri = '/taas/tap_flows/%s' % tap_flow_id
|
|
||||||
post_data = {'tap_flow': kwargs}
|
|
||||||
return self.update_resource(uri, post_data)
|
|
||||||
|
|
||||||
def show_tap_flow(self, tap_flow_id, **fields):
|
|
||||||
uri = '/taas/tap_flows/%s' % tap_flow_id
|
|
||||||
return self.show_resource(uri, **fields)
|
|
||||||
|
|
||||||
def delete_tap_flow(self, tap_flow_id):
|
|
||||||
uri = '/taas/tap_flows/%s' % tap_flow_id
|
|
||||||
return self.delete_resource(uri)
|
|
||||||
|
|
||||||
def list_tap_flows(self, **filters):
|
|
||||||
uri = '/taas/tap_flows'
|
|
||||||
return self.list_resources(uri, **filters)
|
|
@ -1,22 +0,0 @@
|
|||||||
# Copyright (c) 2015 Midokura SARL
|
|
||||||
# All Rights Reserved.
|
|
||||||
#
|
|
||||||
# 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.
|
|
||||||
|
|
||||||
from tempest.api.network import base
|
|
||||||
|
|
||||||
from neutron_taas_tempest_plugin.tests import taas_client
|
|
||||||
|
|
||||||
|
|
||||||
class BaseTaaSTest(taas_client.TaaSClientMixin, base.BaseNetworkTest):
|
|
||||||
pass
|
|
@ -1,133 +0,0 @@
|
|||||||
# Copyright (c) 2018 AT&T Intellectual Property. All other rights reserved.
|
|
||||||
# Copyright (c) 2015 Midokura SARL
|
|
||||||
# All Rights Reserved.
|
|
||||||
#
|
|
||||||
# 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.
|
|
||||||
|
|
||||||
from tempest.common import utils
|
|
||||||
from tempest import config
|
|
||||||
from tempest.lib import decorators
|
|
||||||
from tempest.lib import exceptions as lib_exc
|
|
||||||
|
|
||||||
from neutron_taas_tempest_plugin.tests.api import base
|
|
||||||
|
|
||||||
CONF = config.CONF
|
|
||||||
|
|
||||||
|
|
||||||
class TaaSExtensionTestJSON(base.BaseTaaSTest):
|
|
||||||
|
|
||||||
@classmethod
|
|
||||||
@utils.requires_ext(extension='taas', service='network')
|
|
||||||
def skip_checks(cls):
|
|
||||||
super(TaaSExtensionTestJSON, cls).skip_checks()
|
|
||||||
|
|
||||||
@classmethod
|
|
||||||
def resource_setup(cls):
|
|
||||||
super(TaaSExtensionTestJSON, cls).resource_setup()
|
|
||||||
cls.network = cls.create_network()
|
|
||||||
cls.ts_port = cls.create_port(cls.network)
|
|
||||||
cls.tf_port = cls.create_port(cls.network)
|
|
||||||
cls.tf2_port = cls.create_port(cls.network)
|
|
||||||
|
|
||||||
@decorators.idempotent_id('b993c14e-797a-4c91-b4da-8cb1a450aa2f')
|
|
||||||
def test_create_tap_service_and_flow(self):
|
|
||||||
"""create tap service adn tap flow
|
|
||||||
|
|
||||||
Test create tap service and flow.
|
|
||||||
"""
|
|
||||||
tap_service = self.create_tap_service(port_id=self.ts_port['id'])
|
|
||||||
self.create_tap_flow(tap_service_id=tap_service['id'],
|
|
||||||
direction='BOTH', source_port=self.tf_port['id'])
|
|
||||||
|
|
||||||
@decorators.idempotent_id('897a0aaf-1b55-4ea8-9d9f-1bc0fd09cb60')
|
|
||||||
@utils.requires_ext(extension='taas-vlan-filter', service='network')
|
|
||||||
def test_create_tap_service_and_flow_vlan_filter(self):
|
|
||||||
"""create tap service with vlan_filter
|
|
||||||
|
|
||||||
Test create tap service with additional vlan_filter argument.
|
|
||||||
"""
|
|
||||||
tap_service = self.create_tap_service(port_id=self.ts_port['id'])
|
|
||||||
tap_flow = self.create_tap_flow(tap_service_id=tap_service['id'],
|
|
||||||
direction='BOTH',
|
|
||||||
source_port=self.tf_port['id'],
|
|
||||||
vlan_filter='189,279,999-1008')
|
|
||||||
self.assertEqual(tap_flow['vlan_filter'], '189,279,999-1008')
|
|
||||||
|
|
||||||
@decorators.idempotent_id('d7a2115d-16b4-41cf-95a6-dcebc3682b24')
|
|
||||||
def test_delete_tap_resources_after_ts_port_delete(self):
|
|
||||||
"""delete tap resources after ts port delete
|
|
||||||
|
|
||||||
Test delete tap resources after deletion of ts port.
|
|
||||||
"""
|
|
||||||
tap_service = self.create_tap_service(port_id=self.ts_port['id'])
|
|
||||||
tap_flow = self.create_tap_flow(tap_service_id=tap_service['id'],
|
|
||||||
direction='BOTH',
|
|
||||||
source_port=self.tf2_port['id'])
|
|
||||||
# delete ts_port; it shall also delete the associated tap-service and
|
|
||||||
# subsequently the tap-flow as well
|
|
||||||
self.ports_client.delete_port(self.ts_port['id'])
|
|
||||||
# Attempt tap-service deletion; it should throw not found exception.
|
|
||||||
self.assertRaises(lib_exc.NotFound,
|
|
||||||
self.tap_services_client.delete_tap_service,
|
|
||||||
tap_service['id'])
|
|
||||||
# Attempt tap-flow deletion; it should throw not found exception.
|
|
||||||
self.assertRaises(lib_exc.NotFound,
|
|
||||||
self.tap_flows_client.delete_tap_flow,
|
|
||||||
tap_flow['id'])
|
|
||||||
|
|
||||||
@decorators.idempotent_id('9ba4edfd-4002-4c44-b02b-6c4f71b40a92')
|
|
||||||
def test_delete_tap_resources_after_tf_port_delete(self):
|
|
||||||
"""delete tap resources after tf port delete
|
|
||||||
|
|
||||||
Test delete tap service after deletion of tf port.
|
|
||||||
"""
|
|
||||||
tap_service = self.create_tap_service(port_id=self.ts_port['id'])
|
|
||||||
tap_flow = self.create_tap_flow(tap_service_id=tap_service['id'],
|
|
||||||
direction='BOTH',
|
|
||||||
source_port=self.tf_port['id'])
|
|
||||||
# delete tf port; it shall also delete the associated tap-flow
|
|
||||||
self.ports_client.delete_port(self.tf_port['id'])
|
|
||||||
# Attempt tap-flow deletion; it should throw not found exception.
|
|
||||||
self.assertRaises(lib_exc.NotFound,
|
|
||||||
self.tap_flows_client.delete_tap_flow,
|
|
||||||
tap_flow['id'])
|
|
||||||
# delete tap service; it shall go fine
|
|
||||||
self.tap_services_client.delete_tap_service(tap_service['id'])
|
|
||||||
|
|
||||||
@decorators.idempotent_id('687089b8-b045-496d-86bf-030b380039d1')
|
|
||||||
def test_create_and_update_tap_service(self):
|
|
||||||
"""create and update tap service
|
|
||||||
|
|
||||||
Test update tap service - update description.
|
|
||||||
"""
|
|
||||||
tap_service = self.create_tap_service(port_id=self.ts_port['id'])
|
|
||||||
|
|
||||||
# Update description of the tap service
|
|
||||||
self.update_tap_service(
|
|
||||||
tap_service['id'],
|
|
||||||
description='Tap Service Description Updated')
|
|
||||||
|
|
||||||
@decorators.idempotent_id('bb4d5482-37fc-46b5-85a5-5867e9adbfae')
|
|
||||||
def test_create_and_update_tap_flow(self):
|
|
||||||
"""create and update tap flow
|
|
||||||
|
|
||||||
Test update tap flow - update description.
|
|
||||||
"""
|
|
||||||
tap_service = self.create_tap_service(port_id=self.ts_port['id'])
|
|
||||||
tap_flow = self.create_tap_flow(
|
|
||||||
tap_service_id=tap_service['id'],
|
|
||||||
direction='BOTH', source_port=self.tf_port['id'])
|
|
||||||
# Update description of the tap flow
|
|
||||||
self.update_tap_flow(
|
|
||||||
tap_flow['id'],
|
|
||||||
description='Tap Flow Description Updated')
|
|
@ -1,22 +0,0 @@
|
|||||||
# Copyright (c) 2015 Midokura SARL
|
|
||||||
# All Rights Reserved.
|
|
||||||
#
|
|
||||||
# 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.
|
|
||||||
|
|
||||||
from neutron_taas_tempest_plugin.tests.scenario import manager
|
|
||||||
from neutron_taas_tempest_plugin.tests import taas_client
|
|
||||||
|
|
||||||
|
|
||||||
class TaaSScenarioTest(taas_client.TaaSClientMixin,
|
|
||||||
manager.NetworkScenarioTest):
|
|
||||||
pass
|
|
File diff suppressed because it is too large
Load Diff
@ -1,277 +0,0 @@
|
|||||||
# Copyright (c) 2015 Midokura SARL
|
|
||||||
# All Rights Reserved.
|
|
||||||
#
|
|
||||||
# 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.
|
|
||||||
|
|
||||||
from oslo_log import log as logging
|
|
||||||
from tempest.common import utils
|
|
||||||
from tempest import config
|
|
||||||
from tempest.lib.common.utils import data_utils
|
|
||||||
from tempest.lib.common.utils import test_utils
|
|
||||||
from tempest.lib import decorators
|
|
||||||
from tempest.lib import exceptions as lib_exc
|
|
||||||
import testtools
|
|
||||||
|
|
||||||
from neutron_taas_tempest_plugin.tests.scenario import base
|
|
||||||
|
|
||||||
CONF = config.CONF
|
|
||||||
LOG = logging.getLogger(__name__)
|
|
||||||
|
|
||||||
|
|
||||||
# pylint: disable=too-many-ancestors
|
|
||||||
class TestTaaS(base.TaaSScenarioTest):
|
|
||||||
"""Config Requirement in tempest.conf:
|
|
||||||
|
|
||||||
- project_network_cidr_bits- specifies the subnet range for each network
|
|
||||||
- project_network_cidr
|
|
||||||
- public_network_id.
|
|
||||||
"""
|
|
||||||
|
|
||||||
@classmethod
|
|
||||||
@utils.requires_ext(extension='taas', service='network')
|
|
||||||
@utils.requires_ext(extension='security-group', service='network')
|
|
||||||
@utils.requires_ext(extension='router', service='network')
|
|
||||||
def skip_checks(cls):
|
|
||||||
super(TestTaaS, cls).skip_checks()
|
|
||||||
|
|
||||||
@classmethod
|
|
||||||
def resource_setup(cls):
|
|
||||||
LOG.debug("Initializing TaaSScenarioTest Setup")
|
|
||||||
super(TestTaaS, cls).resource_setup()
|
|
||||||
LOG.debug("TaaSScenarioTest Setup done.")
|
|
||||||
|
|
||||||
def _create_server(self, network, security_group=None):
|
|
||||||
"""Create a server
|
|
||||||
|
|
||||||
Creates a server having a port on given network and security group.
|
|
||||||
"""
|
|
||||||
keys = self.create_keypair()
|
|
||||||
kwargs = {}
|
|
||||||
if security_group is not None:
|
|
||||||
kwargs['security_groups'] = [{'name': security_group['name']}]
|
|
||||||
server = self.create_server(
|
|
||||||
key_name=keys['name'],
|
|
||||||
networks=[{'uuid': network['id']}],
|
|
||||||
wait_until='ACTIVE',
|
|
||||||
**kwargs)
|
|
||||||
return server, keys
|
|
||||||
|
|
||||||
def _create_test_server(self, network, security_group):
|
|
||||||
"""Create a server
|
|
||||||
|
|
||||||
Creates a server having a port on given network and security group;
|
|
||||||
Also creates a floting IP if port is not an sriov port.
|
|
||||||
"""
|
|
||||||
pub_network_id = CONF.network.public_network_id
|
|
||||||
server, keys = self._create_server(
|
|
||||||
network, security_group=security_group)
|
|
||||||
private_key = keys['private_key']
|
|
||||||
vnic_type = CONF.network.port_vnic_type
|
|
||||||
server_floating_ip = None
|
|
||||||
if vnic_type != 'direct':
|
|
||||||
server_floating_ip = self.create_floating_ip(server,
|
|
||||||
pub_network_id)
|
|
||||||
fixed_ip = list(server['addresses'].values())[0][0]['addr']
|
|
||||||
return server, private_key, fixed_ip, server_floating_ip
|
|
||||||
|
|
||||||
@testtools.skipUnless(CONF.taas_plugin_options.provider_physical_network,
|
|
||||||
'Provider physical network parameter not provided.')
|
|
||||||
@utils.requires_ext(extension="provider", service="network")
|
|
||||||
def _create_network_sriov(self, networks_client=None,
|
|
||||||
tenant_id=None,
|
|
||||||
namestart='network-smoke-sriov-',
|
|
||||||
port_security_enabled=True):
|
|
||||||
if not networks_client:
|
|
||||||
networks_client = self.networks_client
|
|
||||||
if not tenant_id:
|
|
||||||
tenant_id = networks_client.tenant_id
|
|
||||||
name = data_utils.rand_name(namestart)
|
|
||||||
network_kwargs = dict(name=name, tenant_id=tenant_id)
|
|
||||||
# Neutron disables port security by default so we have to check the
|
|
||||||
# config before trying to create the network with
|
|
||||||
# port_security_enabled
|
|
||||||
if CONF.network_feature_enabled.port_security:
|
|
||||||
network_kwargs['port_security_enabled'] = port_security_enabled
|
|
||||||
|
|
||||||
if CONF.network.port_vnic_type and \
|
|
||||||
CONF.network.port_vnic_type == 'direct':
|
|
||||||
network_kwargs['provider:network_type'] = 'vlan'
|
|
||||||
if CONF.taas_plugin_options.provider_segmentation_id:
|
|
||||||
if CONF.taas_plugin_options.provider_segmentation_id == '0':
|
|
||||||
network_kwargs['provider:network_type'] = 'flat'
|
|
||||||
else:
|
|
||||||
network_kwargs['provider:segmentation_id'] = \
|
|
||||||
CONF.taas_plugin_options.provider_segmentation_id
|
|
||||||
|
|
||||||
network_kwargs['provider:physical_network'] = \
|
|
||||||
CONF.taas_plugin_options.provider_physical_network
|
|
||||||
|
|
||||||
result = networks_client.create_network(**network_kwargs)
|
|
||||||
network = result['network']
|
|
||||||
self.assertEqual(network['name'], name)
|
|
||||||
self.addCleanup(test_utils.call_and_ignore_notfound_exc,
|
|
||||||
networks_client.delete_network,
|
|
||||||
network['id'])
|
|
||||||
return network
|
|
||||||
|
|
||||||
@testtools.skipUnless(CONF.taas_plugin_options.provider_physical_network,
|
|
||||||
'Provider physical network parameter not provided.')
|
|
||||||
@utils.requires_ext(extension="provider", service="network")
|
|
||||||
def create_networks_sriov(self, networks_client=None,
|
|
||||||
routers_client=None, subnets_client=None,
|
|
||||||
tenant_id=None, dns_nameservers=None,
|
|
||||||
port_security_enabled=True):
|
|
||||||
"""Create a network with a subnet connected to a router.
|
|
||||||
|
|
||||||
The baremetal driver is a special case since all nodes are
|
|
||||||
on the same shared network.
|
|
||||||
|
|
||||||
:param tenant_id: id of tenant to create resources in.
|
|
||||||
:param dns_nameservers: list of dns servers to send to subnet.
|
|
||||||
:returns: network, subnet, router
|
|
||||||
"""
|
|
||||||
router = None
|
|
||||||
if CONF.network.shared_physical_network:
|
|
||||||
# NOTE(Shrews): This exception is for environments where tenant
|
|
||||||
# credential isolation is available, but network separation is
|
|
||||||
# not (the current baremetal case). Likely can be removed when
|
|
||||||
# test account mgmt is reworked:
|
|
||||||
# https://blueprints.launchpad.net/tempest/+spec/test-accounts
|
|
||||||
if not CONF.compute.fixed_network_name:
|
|
||||||
msg = 'fixed_network_name must be specified in config'
|
|
||||||
raise lib_exc.InvalidConfiguration(msg)
|
|
||||||
network = self._get_network_by_name(
|
|
||||||
CONF.compute.fixed_network_name)
|
|
||||||
subnet = None
|
|
||||||
else:
|
|
||||||
network = self._create_network_sriov(
|
|
||||||
networks_client=networks_client,
|
|
||||||
tenant_id=tenant_id,
|
|
||||||
port_security_enabled=port_security_enabled)
|
|
||||||
subnet_kwargs = dict(network=network,
|
|
||||||
subnets_client=subnets_client,
|
|
||||||
routers_client=routers_client)
|
|
||||||
# use explicit check because empty list is a valid option
|
|
||||||
if dns_nameservers is not None:
|
|
||||||
subnet_kwargs['dns_nameservers'] = dns_nameservers
|
|
||||||
subnet = self._create_subnet(**subnet_kwargs)
|
|
||||||
return network, subnet, router
|
|
||||||
|
|
||||||
def _create_topology(self):
|
|
||||||
"""Topology
|
|
||||||
|
|
||||||
+----------+ +----------+
|
|
||||||
| "server" | | "server" |
|
|
||||||
| VM-1 | | VM-2 |
|
|
||||||
| | | |
|
|
||||||
+----+-----+ +----+-----+
|
|
||||||
| |
|
|
||||||
| |
|
|
||||||
+----+----+----+----+----+----+-----+
|
|
||||||
|
|
|
||||||
|
|
|
||||||
|
|
|
||||||
+------+------+
|
|
||||||
| "server" |
|
|
||||||
| tap-service |
|
|
||||||
+-------------+
|
|
||||||
"""
|
|
||||||
LOG.debug('Starting Topology Creation')
|
|
||||||
resp = {}
|
|
||||||
# Create Network1 and Subnet1.
|
|
||||||
vnic_type = CONF.network.port_vnic_type
|
|
||||||
if vnic_type == 'direct':
|
|
||||||
self.network1, self.subnet1, self.router1 = \
|
|
||||||
self.create_networks_sriov()
|
|
||||||
else:
|
|
||||||
self.network1, self.subnet1, self.router1 = self.create_networks()
|
|
||||||
resp['network1'] = self.network1
|
|
||||||
resp['subnet1'] = self.subnet1
|
|
||||||
resp['router1'] = self.router1
|
|
||||||
|
|
||||||
# Create a security group allowing icmp and ssh traffic.
|
|
||||||
security_group = self._create_security_group()
|
|
||||||
|
|
||||||
# Create 3 VMs and assign them a floating IP each.
|
|
||||||
server1, private_key1, server_fixed_ip_1, server_floating_ip_1 = (
|
|
||||||
self._create_test_server(self.network1, security_group))
|
|
||||||
server2, private_key2, server_fixed_ip_2, server_floating_ip_2 = (
|
|
||||||
self._create_test_server(self.network1, security_group))
|
|
||||||
server3, private_key3, server_fixed_ip_3, server_floating_ip_3 = (
|
|
||||||
self._create_test_server(self.network1, security_group))
|
|
||||||
|
|
||||||
# Store the received information to be used later
|
|
||||||
resp['server1'] = server1
|
|
||||||
resp['private_key1'] = private_key1
|
|
||||||
resp['server_fixed_ip_1'] = server_fixed_ip_1
|
|
||||||
resp['server_floating_ip_1'] = server_floating_ip_1
|
|
||||||
|
|
||||||
resp['server2'] = server2
|
|
||||||
resp['private_key2'] = private_key2
|
|
||||||
resp['server_fixed_ip_2'] = server_fixed_ip_2
|
|
||||||
resp['server_floating_ip_2'] = server_floating_ip_2
|
|
||||||
|
|
||||||
resp['server3'] = server3
|
|
||||||
resp['private_key3'] = private_key3
|
|
||||||
resp['server_fixed_ip_3'] = server_fixed_ip_3
|
|
||||||
resp['server_floating_ip_3'] = server_floating_ip_3
|
|
||||||
|
|
||||||
return resp
|
|
||||||
|
|
||||||
@utils.services('network')
|
|
||||||
@utils.requires_ext(extension="taas-vlan-filter", service="network")
|
|
||||||
@decorators.attr(type='slow')
|
|
||||||
@decorators.idempotent_id('40903cbd-0e3c-464d-b311-dc77d3894e65')
|
|
||||||
def test_tap_flow_data_mirroring(self):
|
|
||||||
"""Create test topology and TaaS resources
|
|
||||||
|
|
||||||
Creates test topology consisting of 3 servers, one routable network,
|
|
||||||
ports and TaaS resources, i.e. tap-service and tap-flow using those
|
|
||||||
ports.
|
|
||||||
"""
|
|
||||||
topology = self._create_topology()
|
|
||||||
|
|
||||||
# Fetch source port and tap-service port to be used for creating
|
|
||||||
# Tap Service and Tap flow.
|
|
||||||
source_port = self.os_admin.ports_client.list_ports(
|
|
||||||
network_id=topology['network1']['id'],
|
|
||||||
device_id=topology['server1']['id']
|
|
||||||
)['ports'][0]
|
|
||||||
|
|
||||||
tap_service_port = self.os_admin.ports_client.list_ports(
|
|
||||||
network_id=topology['network1']['id'],
|
|
||||||
device_id=topology['server3']['id']
|
|
||||||
)['ports'][0]
|
|
||||||
|
|
||||||
# Create Tap-Service.
|
|
||||||
tap_service = self.create_tap_service(port_id=tap_service_port['id'])
|
|
||||||
|
|
||||||
LOG.debug('TaaS Config options: vlan-filter: %s',
|
|
||||||
CONF.taas_plugin_options.vlan_filter)
|
|
||||||
|
|
||||||
# Create Tap-Flow.
|
|
||||||
vnic_type = CONF.network.port_vnic_type
|
|
||||||
vlan_filter = None
|
|
||||||
if vnic_type == 'direct':
|
|
||||||
vlan_filter = '108-117,126,135-144'
|
|
||||||
if CONF.taas_plugin_options.vlan_filter:
|
|
||||||
vlan_filter = CONF.taas_plugin_options.vlan_filter
|
|
||||||
elif topology['network1']['provider:segmentation_id'] != '0':
|
|
||||||
vlan_filter = topology['network1']['provider:segmentation_id']
|
|
||||||
|
|
||||||
tap_flow = self.create_tap_flow(tap_service_id=tap_service['id'],
|
|
||||||
direction='BOTH',
|
|
||||||
source_port=source_port['id'],
|
|
||||||
vlan_filter=vlan_filter)
|
|
||||||
|
|
||||||
self.assertEqual(tap_flow['vlan_filter'], vlan_filter)
|
|
@ -1,245 +0,0 @@
|
|||||||
# Copyright (c) 2019 AT&T
|
|
||||||
# All Rights Reserved.
|
|
||||||
#
|
|
||||||
# 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.
|
|
||||||
|
|
||||||
from contextlib import contextmanager
|
|
||||||
from oslo_log import log
|
|
||||||
import testtools
|
|
||||||
|
|
||||||
from tempest.common import utils
|
|
||||||
from tempest import config
|
|
||||||
from tempest.lib.common.utils.linux import remote_client
|
|
||||||
from tempest.lib import decorators
|
|
||||||
|
|
||||||
from neutron_taas_tempest_plugin.tests.scenario import base
|
|
||||||
|
|
||||||
|
|
||||||
CONF = config.CONF
|
|
||||||
LOG = log.getLogger(__name__)
|
|
||||||
|
|
||||||
|
|
||||||
class TestTaaSTrafficScenarios(base.TaaSScenarioTest):
|
|
||||||
|
|
||||||
@classmethod
|
|
||||||
def setup_clients(cls):
|
|
||||||
super(TestTaaSTrafficScenarios, cls).setup_clients()
|
|
||||||
|
|
||||||
if CONF.image_feature_enabled.api_v1:
|
|
||||||
cls.image_client = cls.os_primary.image_client
|
|
||||||
elif CONF.image_feature_enabled.api_v2:
|
|
||||||
cls.image_client = cls.os_primary.image_client_v2
|
|
||||||
else:
|
|
||||||
raise cls.skipException(
|
|
||||||
'Either api_v1 or api_v2 must be True in '
|
|
||||||
'[image-feature-enabled].')
|
|
||||||
|
|
||||||
@classmethod
|
|
||||||
@utils.requires_ext(extension="router", service="network")
|
|
||||||
def resource_setup(cls):
|
|
||||||
super(TestTaaSTrafficScenarios, cls).resource_setup()
|
|
||||||
for ext in ['taas']:
|
|
||||||
if not utils.is_extension_enabled(ext, 'network'):
|
|
||||||
msg = "%s Extension not enabled." % ext
|
|
||||||
raise cls.skipException(msg)
|
|
||||||
|
|
||||||
cls.network, cls.subnet, cls.router = cls.create_networks()
|
|
||||||
cls.provider_network = None
|
|
||||||
cls.keypair = cls.create_keypair()
|
|
||||||
cls.secgroup = cls._create_security_group()
|
|
||||||
|
|
||||||
@contextmanager
|
|
||||||
def _setup_topology(self, taas=True, use_taas_cloud_image=False,
|
|
||||||
provider_net=False):
|
|
||||||
"""Setup topology for the test
|
|
||||||
|
|
||||||
+------------+
|
|
||||||
| monitor vm |
|
|
||||||
+-----+------+
|
|
||||||
|
|
|
||||||
+-----v---+
|
|
||||||
+--+ network <--+
|
|
||||||
| +----^----+ |
|
|
||||||
| | |
|
|
||||||
| +----+-+ +---+--+
|
|
||||||
| | vm 1 | | vm 2 |
|
|
||||||
| +------+ +------+
|
|
||||||
|
|
|
||||||
| +--------+
|
|
||||||
+--> router |
|
|
||||||
+-----+--+
|
|
||||||
|
|
|
||||||
+-----v------+
|
|
||||||
| public net |
|
|
||||||
+------------+
|
|
||||||
"""
|
|
||||||
if provider_net:
|
|
||||||
if CONF.taas_plugin_options.provider_physical_network:
|
|
||||||
self.provider_network = self._setup_provider_network()
|
|
||||||
else:
|
|
||||||
msg = "provider_physical_network not provided"
|
|
||||||
raise self.skipException(msg)
|
|
||||||
|
|
||||||
self.mon_port, mon_fip = self._create_server_with_floatingip(
|
|
||||||
use_taas_cloud_image=use_taas_cloud_image,
|
|
||||||
provider_net=provider_net)
|
|
||||||
self.left_port, left_fip = self._create_server_with_floatingip(
|
|
||||||
provider_net=provider_net)
|
|
||||||
self.right_port, right_fip = self._create_server_with_floatingip(
|
|
||||||
provider_net=provider_net)
|
|
||||||
|
|
||||||
if taas:
|
|
||||||
LOG.debug("Create TAAS service")
|
|
||||||
tap_service = self.create_tap_service(port_id=self.mon_port['id'])
|
|
||||||
self.create_tap_flow(tap_service_id=tap_service['id'],
|
|
||||||
direction='BOTH',
|
|
||||||
source_port=self.left_port['id'])
|
|
||||||
self.create_tap_flow(tap_service_id=tap_service['id'],
|
|
||||||
direction='BOTH',
|
|
||||||
source_port=self.right_port['id'])
|
|
||||||
|
|
||||||
user = CONF.validation.image_ssh_user
|
|
||||||
if use_taas_cloud_image:
|
|
||||||
user = CONF.taas_plugin_options.advanced_image_ssh_user
|
|
||||||
|
|
||||||
self.monitor_client = remote_client.RemoteClient(
|
|
||||||
mon_fip['floating_ip_address'], user,
|
|
||||||
pkey=self.keypair['private_key'])
|
|
||||||
self.left_client = remote_client.RemoteClient(
|
|
||||||
left_fip['floating_ip_address'], CONF.validation.image_ssh_user,
|
|
||||||
pkey=self.keypair['private_key'])
|
|
||||||
self.right_client = remote_client.RemoteClient(
|
|
||||||
right_fip['floating_ip_address'], CONF.validation.image_ssh_user,
|
|
||||||
pkey=self.keypair['private_key'])
|
|
||||||
yield
|
|
||||||
|
|
||||||
def _check_icmp_traffic(self):
|
|
||||||
log_location = "/tmp/tcpdumplog"
|
|
||||||
|
|
||||||
right_ip = self.right_port['fixed_ips'][0]['ip_address']
|
|
||||||
left_ip = self.left_port['fixed_ips'][0]['ip_address']
|
|
||||||
|
|
||||||
# Run tcpdump in background
|
|
||||||
self._run_in_background(self.monitor_client,
|
|
||||||
"sudo tcpdump -n -nn > %s" % log_location)
|
|
||||||
|
|
||||||
# Ensure tcpdump is up and running
|
|
||||||
psax = self.monitor_client.exec_command("ps -ax")
|
|
||||||
self.assertTrue("tcpdump" in psax)
|
|
||||||
|
|
||||||
# Run traffic from left_vm to right_vm
|
|
||||||
self.left_client.exec_command("ping -c 50 %s" % right_ip)
|
|
||||||
|
|
||||||
# Collect tcpdump results
|
|
||||||
output = self.monitor_client.exec_command("cat %s" % log_location)
|
|
||||||
self.assertTrue(len(output) > 0)
|
|
||||||
|
|
||||||
looking_for = ["IP %s > %s: ICMP echo request" % (left_ip, right_ip),
|
|
||||||
"IP %s > %s: ICMP echo reply" % (right_ip, left_ip)]
|
|
||||||
|
|
||||||
results = []
|
|
||||||
for tcpdump_line in looking_for:
|
|
||||||
results.append(tcpdump_line in output)
|
|
||||||
|
|
||||||
return all(results)
|
|
||||||
|
|
||||||
def _test_taas_connectivity(self, use_provider_net=False):
|
|
||||||
"""Ensure TAAS doesn't break connectivity
|
|
||||||
|
|
||||||
This test creates TAAS service between two servers and checks that
|
|
||||||
it doesn't break basic connectivity between them.
|
|
||||||
"""
|
|
||||||
|
|
||||||
# Check uninterrupted traffic between VMs
|
|
||||||
with self._setup_topology(provider_net=use_provider_net):
|
|
||||||
# Left to right
|
|
||||||
self._check_remote_connectivity(
|
|
||||||
self.left_client,
|
|
||||||
self.right_port['fixed_ips'][0]['ip_address'])
|
|
||||||
|
|
||||||
# Right to left
|
|
||||||
self._check_remote_connectivity(
|
|
||||||
self.right_client,
|
|
||||||
self.left_port['fixed_ips'][0]['ip_address'])
|
|
||||||
|
|
||||||
# TAAS vm to right
|
|
||||||
self._check_remote_connectivity(
|
|
||||||
self.monitor_client,
|
|
||||||
self.right_port['fixed_ips'][0]['ip_address'])
|
|
||||||
|
|
||||||
# TAAS vm to left
|
|
||||||
self._check_remote_connectivity(
|
|
||||||
self.monitor_client,
|
|
||||||
self.left_port['fixed_ips'][0]['ip_address'])
|
|
||||||
|
|
||||||
@decorators.idempotent_id('ff414b7d-e81c-47f2-b6c8-53bc2f1e9b00')
|
|
||||||
@decorators.attr(type='slow')
|
|
||||||
@utils.services('compute', 'network')
|
|
||||||
def test_taas_provider_network_connectivity(self):
|
|
||||||
self._test_taas_connectivity(use_provider_net=True)
|
|
||||||
|
|
||||||
@decorators.idempotent_id('e3c52e91-7abf-4dfd-8687-f7c071cdd333')
|
|
||||||
@decorators.attr(type='slow')
|
|
||||||
@utils.services('compute', 'network')
|
|
||||||
def test_taas_network_connectivity(self):
|
|
||||||
self._test_taas_connectivity(use_provider_net=False)
|
|
||||||
|
|
||||||
@decorators.idempotent_id('fcb15ca3-ef61-11e9-9792-f45c89c47e11')
|
|
||||||
@testtools.skipUnless(CONF.taas_plugin_options.advanced_image_ref,
|
|
||||||
'Cloud image not found.')
|
|
||||||
@decorators.attr(type='slow')
|
|
||||||
@utils.services('compute', 'network')
|
|
||||||
def test_taas_forwarded_traffic_positive(self):
|
|
||||||
"""Check that TAAS forwards traffic as expected"""
|
|
||||||
|
|
||||||
with self._setup_topology(use_taas_cloud_image=True):
|
|
||||||
# Check that traffic was forwarded to TAAS service
|
|
||||||
self.assertTrue(self._check_icmp_traffic())
|
|
||||||
|
|
||||||
@decorators.idempotent_id('6c54d9c5-075a-4a1f-bbe6-12c3c9abf1e2')
|
|
||||||
@testtools.skipUnless(CONF.taas_plugin_options.advanced_image_ref,
|
|
||||||
'Cloud image not found.')
|
|
||||||
@decorators.attr(type='slow')
|
|
||||||
@utils.services('compute', 'network')
|
|
||||||
def test_taas_forwarded_traffic_negative(self):
|
|
||||||
"""Check that TAAS doesn't forward traffic"""
|
|
||||||
|
|
||||||
with self._setup_topology(taas=False, use_taas_cloud_image=True):
|
|
||||||
# Check that traffic was NOT forwarded to TAAS service
|
|
||||||
self.assertFalse(self._check_icmp_traffic())
|
|
||||||
|
|
||||||
@decorators.idempotent_id('fcb15ca3-ef61-11e9-9792-f45c89c47e12')
|
|
||||||
@testtools.skipUnless(CONF.taas_plugin_options.advanced_image_ref,
|
|
||||||
'Cloud image not found.')
|
|
||||||
@decorators.attr(type='slow')
|
|
||||||
@utils.services('compute', 'network')
|
|
||||||
def test_taas_forwarded_traffic_provider_net_positive(self):
|
|
||||||
"""Check that TAAS forwards traffic as expected in provider network"""
|
|
||||||
|
|
||||||
with self._setup_topology(use_taas_cloud_image=True,
|
|
||||||
provider_net=True):
|
|
||||||
# Check that traffic was forwarded to TAAS service
|
|
||||||
self.assertTrue(self._check_icmp_traffic())
|
|
||||||
|
|
||||||
@decorators.idempotent_id('6c54d9c5-075a-4a1f-bbe6-12c3c9abf1e3')
|
|
||||||
@testtools.skipUnless(CONF.taas_plugin_options.advanced_image_ref,
|
|
||||||
'Cloud image not found.')
|
|
||||||
@decorators.attr(type='slow')
|
|
||||||
@utils.services('compute', 'network')
|
|
||||||
def test_taas_forwarded_traffic_provider_net_negative(self):
|
|
||||||
"""Check that TAAS doesn't forward traffic in provider network"""
|
|
||||||
|
|
||||||
with self._setup_topology(taas=False, use_taas_cloud_image=True,
|
|
||||||
provider_net=True):
|
|
||||||
# Check that traffic was NOT forwarded to TAAS service
|
|
||||||
self.assertFalse(self._check_icmp_traffic())
|
|
@ -1,84 +0,0 @@
|
|||||||
# Copyright (c) 2015 Midokura SARL
|
|
||||||
# All Rights Reserved.
|
|
||||||
#
|
|
||||||
# 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.
|
|
||||||
|
|
||||||
from tempest import config
|
|
||||||
from tempest.lib.common.utils import data_utils
|
|
||||||
from tempest.lib.common.utils import test_utils
|
|
||||||
|
|
||||||
from neutron_taas_tempest_plugin.services import client
|
|
||||||
|
|
||||||
CONF = config.CONF
|
|
||||||
|
|
||||||
|
|
||||||
class TaaSClientMixin(object):
|
|
||||||
|
|
||||||
@classmethod
|
|
||||||
def resource_setup(cls):
|
|
||||||
super(TaaSClientMixin, cls).resource_setup()
|
|
||||||
os_primary = cls.os_primary
|
|
||||||
cls.tap_services_client = client.TapServicesClient(
|
|
||||||
os_primary.auth_provider,
|
|
||||||
CONF.network.catalog_type,
|
|
||||||
CONF.network.region or CONF.identity.region,
|
|
||||||
endpoint_type=CONF.network.endpoint_type,
|
|
||||||
build_interval=CONF.network.build_interval,
|
|
||||||
build_timeout=CONF.network.build_timeout,
|
|
||||||
**os_primary.default_params)
|
|
||||||
cls.tap_flows_client = client.TapFlowsClient(
|
|
||||||
os_primary.auth_provider,
|
|
||||||
CONF.network.catalog_type,
|
|
||||||
CONF.network.region or CONF.identity.region,
|
|
||||||
endpoint_type=CONF.network.endpoint_type,
|
|
||||||
build_interval=CONF.network.build_interval,
|
|
||||||
build_timeout=CONF.network.build_timeout,
|
|
||||||
**os_primary.default_params)
|
|
||||||
|
|
||||||
def create_tap_service(self, **kwargs):
|
|
||||||
body = self.tap_services_client.create_tap_service(
|
|
||||||
name=data_utils.rand_name("tap_service"),
|
|
||||||
**kwargs)
|
|
||||||
tap_service = body['tap_service']
|
|
||||||
self.addCleanup(test_utils.call_and_ignore_notfound_exc,
|
|
||||||
self.tap_services_client.delete_tap_service,
|
|
||||||
tap_service['id'])
|
|
||||||
return tap_service
|
|
||||||
|
|
||||||
def create_tap_flow(self, **kwargs):
|
|
||||||
body = self.tap_flows_client.create_tap_flow(
|
|
||||||
name=data_utils.rand_name("tap_service"),
|
|
||||||
**kwargs)
|
|
||||||
tap_flow = body['tap_flow']
|
|
||||||
self.addCleanup(test_utils.call_and_ignore_notfound_exc,
|
|
||||||
self.tap_flows_client.delete_tap_flow,
|
|
||||||
tap_flow['id'])
|
|
||||||
return tap_flow
|
|
||||||
|
|
||||||
def update_tap_service(self, tap_service_id, **kwargs):
|
|
||||||
body = self.tap_services_client.update_tap_service(
|
|
||||||
tap_service_id,
|
|
||||||
**kwargs)
|
|
||||||
tap_service = body['tap_service']
|
|
||||||
self.addCleanup(test_utils.call_and_ignore_notfound_exc,
|
|
||||||
self.tap_services_client.delete_tap_service,
|
|
||||||
tap_service['id'])
|
|
||||||
|
|
||||||
def update_tap_flow(self, tap_flow_id, **kwargs):
|
|
||||||
body = self.tap_flows_client.update_tap_flow(
|
|
||||||
tap_flow_id,
|
|
||||||
**kwargs)
|
|
||||||
tap_flow = body['tap_flow']
|
|
||||||
self.addCleanup(test_utils.call_and_ignore_notfound_exc,
|
|
||||||
self.tap_flows_client.delete_tap_flow,
|
|
||||||
tap_flow['id'])
|
|
@ -1,5 +0,0 @@
|
|||||||
# The order of packages is significant, because pip processes them in the order
|
|
||||||
# of appearance. Changing the order has an impact on the overall integration
|
|
||||||
# process, which may cause wedges in the gate later.
|
|
||||||
|
|
||||||
pbr>=5.5.0 # Apache-2.0
|
|
45
setup.cfg
45
setup.cfg
@ -1,45 +0,0 @@
|
|||||||
[metadata]
|
|
||||||
name = tap-as-a-service-tempest-plugin
|
|
||||||
summary = Tempest plugin for Tap-as-a-Service
|
|
||||||
description-file =
|
|
||||||
README.rst
|
|
||||||
author = OpenStack
|
|
||||||
author-email = openstack-discuss@lists.openstack.org
|
|
||||||
home-page = http://www.openstack.org/
|
|
||||||
classifier =
|
|
||||||
Environment :: OpenStack
|
|
||||||
Intended Audience :: Information Technology
|
|
||||||
Intended Audience :: System Administrators
|
|
||||||
License :: OSI Approved :: Apache Software License
|
|
||||||
Operating System :: POSIX :: Linux
|
|
||||||
Programming Language :: Python
|
|
||||||
Programming Language :: Python :: 2
|
|
||||||
Programming Language :: Python :: 2.7
|
|
||||||
Programming Language :: Python :: 3
|
|
||||||
Programming Language :: Python :: 3.5
|
|
||||||
|
|
||||||
[files]
|
|
||||||
packages =
|
|
||||||
neutron_taas_tempest_plugin
|
|
||||||
|
|
||||||
[build_sphinx]
|
|
||||||
source-dir = doc/source
|
|
||||||
build-dir = doc/build
|
|
||||||
all_files = 1
|
|
||||||
|
|
||||||
[upload_sphinx]
|
|
||||||
upload-dir = doc/build/html
|
|
||||||
|
|
||||||
[build_releasenotes]
|
|
||||||
build-dir = releasenotes/build
|
|
||||||
source-dir = releasenotes/source
|
|
||||||
all_files = 1
|
|
||||||
|
|
||||||
[entry_points]
|
|
||||||
tempest.test_plugins =
|
|
||||||
tap-as-a-service-tempest-plugin = neutron_taas_tempest_plugin.plugin:NeutronTaaSPlugin
|
|
||||||
|
|
||||||
[pbr]
|
|
||||||
autodoc_index_modules = True
|
|
||||||
warnerrors = True
|
|
||||||
|
|
29
setup.py
29
setup.py
@ -1,29 +0,0 @@
|
|||||||
# Copyright (c) 2013 Hewlett-Packard Development Company, L.P.
|
|
||||||
#
|
|
||||||
# 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.
|
|
||||||
|
|
||||||
# THIS FILE IS MANAGED BY THE GLOBAL REQUIREMENTS REPO - DO NOT EDIT
|
|
||||||
import setuptools
|
|
||||||
|
|
||||||
# In python < 2.7.4, a lazy loading of package `pbr` will break
|
|
||||||
# setuptools if some other modules registered functions in `atexit`.
|
|
||||||
# solution from: http://bugs.python.org/issue15881#msg170215
|
|
||||||
try:
|
|
||||||
import multiprocessing # noqa
|
|
||||||
except ImportError:
|
|
||||||
pass
|
|
||||||
|
|
||||||
setuptools.setup(
|
|
||||||
setup_requires=['pbr>=2.0.0'],
|
|
||||||
pbr=True)
|
|
@ -1,13 +0,0 @@
|
|||||||
# The order of packages is significant, because pip processes them in the order
|
|
||||||
# of appearance. Changing the order has an impact on the overall integration
|
|
||||||
# process, which may cause wedges in the gate later.
|
|
||||||
|
|
||||||
hacking>=3.0.0,<3.1 # Apache-2.0
|
|
||||||
|
|
||||||
coverage>=5.2.1 # Apache-2.0
|
|
||||||
python-subunit>=1.4.0 # Apache-2.0/BSD
|
|
||||||
sphinx!=1.6.6,!=1.6.7,>=1.6.2 # BSD
|
|
||||||
oslosphinx>=4.7.0 # Apache-2.0
|
|
||||||
oslotest>=4.4.1 # Apache-2.0
|
|
||||||
os-testr>=1.0.0 # Apache-2.0
|
|
||||||
reno>=2.5.0 # Apache-2.0
|
|
34
tox.ini
34
tox.ini
@ -1,34 +0,0 @@
|
|||||||
[tox]
|
|
||||||
envlist = pep8
|
|
||||||
minversion = 1.8
|
|
||||||
skipsdist = True
|
|
||||||
|
|
||||||
[testenv]
|
|
||||||
setenv = VIRTUAL_ENV={envdir}
|
|
||||||
PYTHONWARNINGS=default::DeprecationWarning
|
|
||||||
usedevelop = True
|
|
||||||
install_command = pip install {opts} {packages}
|
|
||||||
deps = -c{env:UPPER_CONSTRAINTS_FILE:https://opendev.org/openstack/requirements/raw/branch/master/upper-constraints.txt}
|
|
||||||
-r{toxinidir}/requirements.txt
|
|
||||||
-r{toxinidir}/test-requirements.txt
|
|
||||||
commands = find . -type f -name "*.py[c|o]" -delete
|
|
||||||
find . -type l -name "*.py[c|o]" -delete
|
|
||||||
find . -type d -name "__pycache__" -delete
|
|
||||||
ostestr --regex '{posargs}'
|
|
||||||
whitelist_externals = find
|
|
||||||
|
|
||||||
[testenv:pep8]
|
|
||||||
commands =
|
|
||||||
flake8
|
|
||||||
|
|
||||||
[testenv:venv]
|
|
||||||
commands = {posargs}
|
|
||||||
|
|
||||||
[flake8]
|
|
||||||
# E123, E125 skipped as they are invalid PEP-8.
|
|
||||||
# W504 Line break occurred after a binary operator
|
|
||||||
|
|
||||||
show-source = True
|
|
||||||
ignore = E123,E125,W504
|
|
||||||
builtins = _
|
|
||||||
exclude=.venv,.git,.tox,dist,doc,*openstack/common*,*lib/python*,*egg,build
|
|
Loading…
x
Reference in New Issue
Block a user