Compare commits

..

3 Commits

Author SHA1 Message Date
Bernard Cafarelli
c4d823cbcc Dropping lower constraints testing (stable Xena)
This topic was discussed on the ML and QA team proposed to
to test lower-constraints [1].

As decided in Neutron meeting, stable branches will drop this
CI job [2].

[1]http://lists.openstack.org/pipermail/openstack-discuss/2020-December/019390.html
[2]http://eavesdrop.openstack.org/meetings/networking/2021/networking.2021-01-12-14.00.log.html

To pass gates, this squashes the PEP8 fix from Change-Id
I8e58da2d88d727018c8d5af5949e34f8c0893c1f:

Skip B105 pep8 error: hardcoded passwords

Skip B105 pep8 error:
* https://bandit.readthedocs.io/en/latest/plugins/b105_hardcoded_password_string.html
* https://cwe.mitre.org/data/definitions/259.html

Trivial-Fix

(cherry picked from commit 28628e8f96)

Change-Id: Id2da075b367281bb5081333e37e472f1e8921e44
2022-03-07 15:25:34 +01:00
1e8f0cdae8 Update TOX_CONSTRAINTS_FILE for stable/xena
Update the URL to the upper-constraints file to point to the redirect
rule on releases.openstack.org so that anyone working on this branch
will switch to the correct upper-constraints list automatically when
the requirements repository branches.

Until the requirements repository has as stable/xena branch, tests will
continue to use the upper-constraints list on master.

Change-Id: I837de509972162b79c4e32f2c2d9cf3173ba7969
2021-09-10 14:32:55 +00:00
8adfc9d1e5 Update .gitreview for stable/xena
Change-Id: I4f8b7e11292dd941463914ebbbc22757f596168f
2021-09-10 14:32:53 +00:00
13 changed files with 13 additions and 125 deletions

View File

@@ -2,4 +2,4 @@
host=review.opendev.org
port=29418
project=openstack/python-neutronclient.git
defaultbranch=stable/yoga
defaultbranch=stable/xena

View File

@@ -1,8 +1,7 @@
- project:
templates:
- openstack-cover-jobs
- openstack-lower-constraints-jobs
- openstack-python3-yoga-jobs
- openstack-python3-xena-jobs
- publish-openstack-docs-pti
- check-requirements
- lib-forward-testing-python3
@@ -64,7 +63,6 @@
Q_ML2_TENANT_NETWORK_TYPE: vxlan
Q_ML2_PLUGIN_MECHANISM_DRIVERS: openvswitch
devstack_plugins:
neutron: https://opendev.org/openstack/neutron
neutron-vpnaas: https://opendev.org/openstack/neutron-vpnaas
- job:

View File

@@ -11,7 +11,7 @@ contextlib2==0.4.0
coverage==4.0
cryptography==2.7
debtcollector==1.2.0
decorator==4.1.0
decorator==3.4.0
deprecation==1.0
docutils==0.11
dogpile.cache==0.6.5

View File

@@ -245,15 +245,15 @@ class CreatePort(neutronV20.CreateCommand, UpdatePortSecGroupMixin,
parser.add_argument(
'--vnic-type',
metavar='<direct | direct-physical | macvtap '
'| normal | baremetal | smart-nic>',
'| normal | baremetal>',
choices=['direct', 'direct-physical', 'macvtap',
'normal', 'baremetal', 'smart-nic'],
'normal', 'baremetal'],
type=utils.convert_to_lowercase,
help=_('VNIC type for this port.'))
parser.add_argument(
'--vnic_type',
choices=['direct', 'direct-physical', 'macvtap',
'normal', 'baremetal', 'smart-nic'],
'normal', 'baremetal'],
type=utils.convert_to_lowercase,
help=argparse.SUPPRESS)
parser.add_argument(

View File

@@ -214,26 +214,6 @@ class CLITestV20PortJSON(test_cli20.CLITestV20Base):
self._test_create_resource(resource, cmd, name, myid, args,
position_names, position_values)
def test_create_port_vnic_type_smart_nic(self):
# Create port: --vnic_type smart-nic netid.
resource = 'port'
cmd = port.CreatePort(test_cli20.MyApp(sys.stdout), None)
name = 'myname'
myid = 'myid'
netid = 'netid'
args = ['--vnic_type', 'smart-nic', netid]
position_names = ['binding:vnic_type', 'network_id']
position_values = ['smart-nic', netid]
self._test_create_resource(resource, cmd, name, myid, args,
position_names, position_values)
# Test dashed options
args = ['--vnic-type', 'smart-nic', netid]
position_names = ['binding:vnic_type', 'network_id']
position_values = ['smart-nic', netid]
self._test_create_resource(resource, cmd, name, myid, args,
position_names, position_values)
def test_create_port_with_binding_profile(self):
resource = 'port'
cmd = port.CreatePort(test_cli20.MyApp(sys.stdout), None)

View File

@@ -357,10 +357,10 @@ class ShellTest(testtools.TestCase):
self.useFixture(fixtures.MockPatchObject(openstack_shell,
'COMMANDS', None))
openstack_shell.NeutronShell('2.0')
self.assertLessEqual(
self.assertDictContainsSubset(
{'net-create': network.CreateNetwork,
'net-delete': network.DeleteNetwork,
'net-list': network.ListNetwork,
'net-show': network.ShowNetwork,
'net-update': network.UpdateNetwork}.items(),
openstack_shell.COMMANDS['2.0'].items())
'net-update': network.UpdateNetwork},
openstack_shell.COMMANDS['2.0'])

View File

@@ -619,20 +619,12 @@ class Client(ClientBase):
qos_policy_path = "/qos/policies/%s"
qos_bandwidth_limit_rules_path = "/qos/policies/%s/bandwidth_limit_rules"
qos_bandwidth_limit_rule_path = "/qos/policies/%s/bandwidth_limit_rules/%s"
qos_packet_rate_limit_rules_path = \
"/qos/policies/%s/packet_rate_limit_rules"
qos_packet_rate_limit_rule_path = \
"/qos/policies/%s/packet_rate_limit_rules/%s"
qos_dscp_marking_rules_path = "/qos/policies/%s/dscp_marking_rules"
qos_dscp_marking_rule_path = "/qos/policies/%s/dscp_marking_rules/%s"
qos_minimum_bandwidth_rules_path = \
"/qos/policies/%s/minimum_bandwidth_rules"
qos_minimum_bandwidth_rule_path = \
"/qos/policies/%s/minimum_bandwidth_rules/%s"
qos_minimum_packet_rate_rules_path = \
"/qos/policies/%s/minimum_packet_rate_rules"
qos_minimum_packet_rate_rule_path = \
"/qos/policies/%s/minimum_packet_rate_rules/%s"
qos_rule_types_path = "/qos/rule-types"
qos_rule_type_path = "/qos/rule-types/%s"
flavors_path = "/flavors"
@@ -716,9 +708,7 @@ class Client(ClientBase):
'qos_policies': 'qos_policy',
'policies': 'policy',
'bandwidth_limit_rules': 'bandwidth_limit_rule',
'packet_rate_limit_rules': 'packet_rate_limit_rule',
'minimum_bandwidth_rules': 'minimum_bandwidth_rule',
'minimum_packet_rate_rules': 'minimum_packet_rate_rule',
'rules': 'rule',
'dscp_marking_rules': 'dscp_marking_rule',
'rule_types': 'rule_type',
@@ -1982,35 +1972,6 @@ class Client(ClientBase):
return self.post(self.qos_minimum_bandwidth_rules_path % policy,
body=body)
def list_packet_rate_limit_rules(self, policy_id, retrieve_all=True,
**_params):
"""Fetches a list of all packet rate limit rules for the given policy
"""
return self.list('packet_rate_limit_rules',
self.qos_packet_rate_limit_rules_path %
policy_id, retrieve_all, **_params)
def show_packet_rate_limit_rule(self, rule, policy, body=None):
"""Fetches information of a certain packet rate limit rule."""
return self.get(self.qos_packet_rate_limit_rule_path %
(policy, rule), body=body)
def create_packet_rate_limit_rule(self, policy, body=None):
"""Creates a new packet rate limit rule."""
return self.post(self.qos_packet_rate_limit_rules_path % policy,
body=body)
def update_packet_rate_limit_rule(self, rule, policy, body=None):
"""Updates a packet rate limit rule."""
return self.put(self.qos_packet_rate_limit_rule_path %
(policy, rule), body=body)
def delete_packet_rate_limit_rule(self, rule, policy):
"""Deletes a packet rate limit rule."""
return self.delete(self.qos_packet_rate_limit_rule_path %
(policy, rule))
def update_minimum_bandwidth_rule(self, rule, policy, body=None):
"""Updates a minimum bandwidth rule."""
return self.put(self.qos_minimum_bandwidth_rule_path %
@@ -2021,35 +1982,6 @@ class Client(ClientBase):
return self.delete(self.qos_minimum_bandwidth_rule_path %
(policy, rule))
def list_minimum_packet_rate_rules(self, policy_id, retrieve_all=True,
**_params):
"""Fetches a list of all minimum packet rate rules for the given policy
"""
return self.list('minimum_packet_rate_rules',
self.qos_minimum_packet_rate_rules_path %
policy_id, retrieve_all, **_params)
def show_minimum_packet_rate_rule(self, rule, policy, body=None):
"""Fetches information of a certain minimum packet rate rule."""
return self.get(self.qos_minimum_packet_rate_rule_path %
(policy, rule), body=body)
def create_minimum_packet_rate_rule(self, policy, body=None):
"""Creates a new minimum packet rate rule."""
return self.post(self.qos_minimum_packet_rate_rules_path % policy,
body=body)
def update_minimum_packet_rate_rule(self, rule, policy, body=None):
"""Updates a minimum packet rate rule."""
return self.put(self.qos_minimum_packet_rate_rule_path %
(policy, rule), body=body)
def delete_minimum_packet_rate_rule(self, rule, policy):
"""Deletes a minimum packet rate rule."""
return self.delete(self.qos_minimum_packet_rate_rule_path %
(policy, rule))
def create_flavor(self, body=None):
"""Creates a new Neutron service flavor."""
return self.post(self.flavors_path, body=body)

View File

@@ -1,7 +0,0 @@
---
features:
- |
Added new client methods for QoS minimum packet rate rule:
``list_minimum_packet_rate_rules``, ``show_minimum_packet_rate_rule``,
``create_minimum_packet_rate_rule``, ``update_minimum_packet_rate_rule``,
``delete_minimum_packet_rate_rule``.

View File

@@ -1,7 +0,0 @@
---
features:
- |
Added new client methods for QoS packet rate limit rule:
``list_packet_rate_limit_rules``, ``show_packet_rate_limit_rule``,
``create_packet_rate_limit_rule``, ``update_packet_rate_limit_rule``,
``delete_packet_rate_limit_rule``.

View File

@@ -6,7 +6,6 @@
:maxdepth: 1
unreleased
xena
wallaby
victoria
ussuri

View File

@@ -1,6 +0,0 @@
=========================
Xena Series Release Notes
=========================
.. release-notes::
:branch: stable/xena

View File

@@ -21,7 +21,6 @@ classifier =
Programming Language :: Python :: 3.6
Programming Language :: Python :: 3.7
Programming Language :: Python :: 3.8
Programming Language :: Python :: 3.9
[files]
packages =

View File

@@ -1,5 +1,5 @@
[tox]
envlist = py39,pep8
envlist = py38,pep8
minversion = 3.18.0
skipsdist = True
ignore_basepython_conflict = True
@@ -13,7 +13,7 @@ setenv = VIRTUAL_ENV={envdir}
PYTHONWARNINGS=default::DeprecationWarning
usedevelop = True
install_command = pip install {opts} {packages}
deps = -c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/yoga}
deps = -c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/xena}
-r{toxinidir}/requirements.txt
-r{toxinidir}/test-requirements.txt
# Delete bytecodes from normal directories before running tests.
@@ -52,7 +52,7 @@ commands =
[testenv:docs]
deps =
-c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/yoga}
-c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/xena}
-r{toxinidir}/doc/requirements.txt
commands = sphinx-build -W -b html doc/source doc/build/html
@@ -67,7 +67,7 @@ commands =
[testenv:releasenotes]
deps =
-c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/yoga}
-c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/xena}
-r{toxinidir}/doc/requirements.txt
commands = sphinx-build -a -E -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html