Compare commits
42 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
bb5b9cac6e | ||
|
|
b3fa5e530b | ||
|
|
59145be07e | ||
|
|
946ac3ed2e | ||
|
|
a363edd761 | ||
|
|
29043825e7 | ||
|
|
918b590fbf | ||
|
|
1168458db2 | ||
|
|
91fb009706 | ||
|
|
010053df07 | ||
|
|
d5c516a5a2 | ||
|
|
e68234ecf6 | ||
|
|
c430ed8950 | ||
|
|
40996e50ea | ||
|
|
f46bf7eca0 | ||
|
|
ee08644c5f | ||
| f61cd94e11 | |||
|
|
115f60f005 | ||
|
|
1c634ed2c1 | ||
|
|
d6c78a5d39 | ||
|
|
e35b3c160b | ||
|
|
62f4868e6e | ||
|
|
ab426a791a | ||
|
|
1a8fdf355d | ||
|
|
6330cc1980 | ||
|
|
6ea4cb57dd | ||
|
|
2af19d55d6 | ||
|
|
34924865b3 | ||
|
|
cf95be3ea5 | ||
|
|
d40f4cc96b | ||
|
|
e2ee92e2e1 | ||
|
|
dc10f44128 | ||
|
|
209e1801ac | ||
|
|
88c660dbe8 | ||
|
|
9a91b4ad38 | ||
|
|
b62a1cd1a4 | ||
|
|
da62ba3029 | ||
|
|
f0c886cbe7 | ||
|
|
d572f2cdd2 | ||
|
|
4cbf6ddc66 | ||
| ca875adf38 | |||
|
|
b4a0e27ec6 |
@@ -1,4 +1,4 @@
|
||||
[gerrit]
|
||||
host=review.openstack.org
|
||||
host=review.opendev.org
|
||||
port=29418
|
||||
project=openstack/python-neutronclient.git
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
[DEFAULT]
|
||||
test_path=./neutronclient/tests/unit
|
||||
test_path=${OS_TEST_PATH:-./neutronclient/tests/unit}
|
||||
top_dir=./
|
||||
|
||||
69
.zuul.yaml
69
.zuul.yaml
@@ -2,35 +2,70 @@
|
||||
templates:
|
||||
- openstack-cover-jobs
|
||||
- openstack-lower-constraints-jobs
|
||||
- openstack-python-jobs
|
||||
- openstack-python35-jobs
|
||||
- openstack-python36-jobs
|
||||
- openstack-python3-ussuri-jobs
|
||||
- publish-openstack-docs-pti
|
||||
- check-requirements
|
||||
- lib-forward-testing
|
||||
- lib-forward-testing-python3
|
||||
- release-notes-jobs-python3
|
||||
- openstackclient-plugin-jobs
|
||||
check:
|
||||
jobs:
|
||||
- legacy-neutronclient-test-dsvm-functional:
|
||||
irrelevant-files: &project-irrelevant-files
|
||||
- ^.*\.rst$
|
||||
- ^doc/.*$
|
||||
- ^neutron/locale/.*$
|
||||
- ^releasenotes/.*$
|
||||
- legacy-neutronclient-test-dsvm-functional-adv-svcs:
|
||||
irrelevant-files: *project-irrelevant-files
|
||||
- neutronclient-functional
|
||||
gate:
|
||||
jobs:
|
||||
- legacy-neutronclient-test-dsvm-functional:
|
||||
irrelevant-files: *project-irrelevant-files
|
||||
- legacy-neutronclient-test-dsvm-functional-adv-svcs:
|
||||
irrelevant-files: *project-irrelevant-files
|
||||
- neutronclient-functional
|
||||
experimental:
|
||||
jobs:
|
||||
- legacy-grenade-dsvm-neutron-libs:
|
||||
- neutron-lib-grenade-dsvm:
|
||||
irrelevant-files:
|
||||
- ^(test-|)requirements.txt$
|
||||
- ^setup.cfg$
|
||||
|
||||
- job:
|
||||
name: neutronclient-functional
|
||||
parent: devstack-tox-functional
|
||||
irrelevant-files:
|
||||
- ^.*\.rst$
|
||||
- ^doc/.*$
|
||||
- ^releasenotes/.*$
|
||||
required-projects:
|
||||
- openstack/python-neutronclient
|
||||
- openstack/neutron
|
||||
- openstack/neutron-vpnaas
|
||||
vars:
|
||||
tox_envlist: functional
|
||||
devstack_services:
|
||||
# NOTE: neutronclient.tests.functional.base.ClientTestBase does not
|
||||
# support HTTPS endpoints now, so tls-proxy needs to be disabled.
|
||||
tls-proxy: false
|
||||
devstack_localrc:
|
||||
USE_PYTHON3: true
|
||||
LIBS_FROM_GIT: python-neutronclient
|
||||
devstack_plugins:
|
||||
neutron-vpnaas: https://opendev.org/openstack/neutron-vpnaas
|
||||
|
||||
- job:
|
||||
name: neutron-lib-grenade-dsvm
|
||||
# Old name: legacy-grenade-dsvm-neutron-libs
|
||||
parent: legacy-dsvm-base
|
||||
run: playbooks/legacy/grenade-dsvm-neutron-libs/run.yaml
|
||||
post-run: playbooks/legacy/grenade-dsvm-neutron-libs/post.yaml
|
||||
timeout: 10800
|
||||
required-projects:
|
||||
- openstack/grenade
|
||||
- openstack/devstack-gate
|
||||
- openstack/keystoneauth
|
||||
- openstack/neutron
|
||||
- openstack/neutron-lib
|
||||
- openstack/os-client-config
|
||||
- openstack/python-cinderclient
|
||||
- openstack/python-glanceclient
|
||||
- openstack/python-ironicclient
|
||||
- openstack/python-keystoneclient
|
||||
- openstack/python-neutronclient
|
||||
- openstack/python-novaclient
|
||||
# This is py3 version for ussuri onwards rest all branch needs to be py2
|
||||
# version which is present in openstack-zuul-jobs.
|
||||
# We need to take care of this branch variant and python version while
|
||||
# migrating these jobs to zuulv3.
|
||||
branches: ^(?!(stable/(ocata|pike|queens|rocky|stein|train))).*$
|
||||
|
||||
@@ -32,6 +32,6 @@ provides a Python API (the ``neutronclient`` module) and a command-line tool
|
||||
.. _Launchpad project: https://launchpad.net/python-neutronclient
|
||||
.. _Blueprints: https://blueprints.launchpad.net/python-neutronclient
|
||||
.. _Bugs: https://bugs.launchpad.net/python-neutronclient
|
||||
.. _Source: https://git.openstack.org/cgit/openstack/python-neutronclient
|
||||
.. _Source: https://opendev.org/openstack/python-neutronclient
|
||||
.. _Developer's Guide: http://docs.openstack.org/infra/manual/developers.html
|
||||
.. _Release Notes: https://docs.openstack.org/releasenotes/python-neutronclient
|
||||
|
||||
@@ -3,4 +3,5 @@
|
||||
# process, which may cause wedges in the gate later.
|
||||
openstackdocstheme>=1.18.1 # Apache-2.0
|
||||
reno>=2.5.0 # Apache-2.0
|
||||
sphinx!=1.6.6,!=1.6.7,>=1.6.2 # BSD
|
||||
sphinx!=1.6.6,!=1.6.7,>=1.6.2,<2.0.0;python_version=='2.7' # BSD
|
||||
sphinx!=1.6.6,!=1.6.7,>=1.6.2;python_version>='3.4' # BSD
|
||||
|
||||
@@ -49,6 +49,25 @@ html_theme = 'openstackdocs'
|
||||
# Output file base name for HTML help builder.
|
||||
htmlhelp_basename = 'neutronclientdoc'
|
||||
|
||||
# -- Options for LaTeX output ------------------------------------------------
|
||||
|
||||
latex_documents = [
|
||||
('index', 'doc-python-neutronclient.tex',
|
||||
u'python-neutronclient Documentation',
|
||||
u'Neutron Contributors', 'manual'),
|
||||
]
|
||||
|
||||
# Disable usage of xindy https://bugzilla.redhat.com/show_bug.cgi?id=1643664
|
||||
latex_use_xindy = False
|
||||
|
||||
latex_domain_indices = False
|
||||
|
||||
latex_elements = {
|
||||
'makeindex': '',
|
||||
'printindex': '',
|
||||
'preamble': r'\setcounter{tocdepth}{5}',
|
||||
}
|
||||
|
||||
# -- Options for cliff.sphinxext plugin ---------------------------------------
|
||||
|
||||
autoprogram_cliff_application = 'openstack'
|
||||
|
||||
@@ -29,7 +29,7 @@ command-line interface (CLI), to the
|
||||
`OpenStack Client (OSC) <https://github.com/openstack/python-openstackclient>`_
|
||||
and the `OpenStack Python SDK <https://github.com/openstack/openstacksdk>`_.
|
||||
This transition is being guided by the
|
||||
`Deprecate individual CLIs in favour of OSC <https://review.openstack.org/#/c/243348/>`_
|
||||
`Deprecate individual CLIs in favour of OSC <https://review.opendev.org/#/c/243348/>`_
|
||||
OpenStack spec. See the `Neutron RFE <https://bugs.launchpad.net/neutron/+bug/1521291>`_,
|
||||
`OSC neutron support etherpad <https://etherpad.openstack.org/p/osc-neutron-support>`_ and
|
||||
details below for the overall progress of this transition.
|
||||
@@ -56,16 +56,16 @@ Transition Steps
|
||||
----------------
|
||||
|
||||
1. **Done:** OSC adds OpenStack Python SDK as a dependency. See the following
|
||||
patch set: https://review.openstack.org/#/c/138745/
|
||||
patch set: https://review.opendev.org/#/c/138745/
|
||||
|
||||
2. **Done:** OSC switches its networking support for the
|
||||
`network <https://docs.openstack.org/python-openstackclient/latest/cli/command-objects/network.html>`_
|
||||
command object to use the OpenStack Python SDK instead of the neutron
|
||||
client's Python library. See the following patch set:
|
||||
https://review.openstack.org/#/c/253348/
|
||||
https://review.opendev.org/#/c/253348/
|
||||
|
||||
3. **Done:** OSC removes its python-neutronclient dependency.
|
||||
See the following patch set: https://review.openstack.org/#/c/255545/
|
||||
See the following patch set: https://review.opendev.org/#/c/255545/
|
||||
|
||||
4. **In Progress:** OpenStack Python SDK releases version 1.0 to guarantee
|
||||
backwards compatibility of its networking support and OSC updates
|
||||
@@ -99,7 +99,7 @@ Transition Steps
|
||||
developer guide section below for more information on this step.
|
||||
|
||||
7. **In Progress:** Deprecate the ``neutron`` CLI. Running the CLI after
|
||||
it has been `deprecated <https://review.openstack.org/#/c/393903/>`_
|
||||
it has been `deprecated <https://review.opendev.org/#/c/393903/>`_
|
||||
will issue a warning message:
|
||||
``neutron CLI is deprecated and will be removed in the future. Use openstack CLI instead.``
|
||||
In addition, no new features will be added to the CLI, though fixes to
|
||||
|
||||
@@ -33,23 +33,23 @@ information on this keystoneauth API, see `Using Sessions`_.
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
>>> from keystoneauth1 import identity
|
||||
>>> from keystoneauth1 import session
|
||||
>>> from neutronclient.v2_0 import client
|
||||
>>> username='username'
|
||||
>>> password='password'
|
||||
>>> project_name='demo'
|
||||
>>> project_domain_id='default'
|
||||
>>> user_domain_id='default'
|
||||
>>> auth_url='http://auth.example.com:5000/v3'
|
||||
>>> auth = identity.Password(auth_url=auth_url,
|
||||
... username=username,
|
||||
... password=password,
|
||||
... project_name=project_name,
|
||||
... project_domain_id=project_domain_id,
|
||||
... user_domain_id=user_domain_id)
|
||||
>>> sess = session.Session(auth=auth)
|
||||
>>> neutron = client.Client(session=sess)
|
||||
from keystoneauth1 import identity
|
||||
from keystoneauth1 import session
|
||||
from neutronclient.v2_0 import client
|
||||
username='username'
|
||||
password='password'
|
||||
project_name='demo'
|
||||
project_domain_id='default'
|
||||
user_domain_id='default'
|
||||
auth_url='http://auth.example.com:5000/v3'
|
||||
auth = identity.Password(auth_url=auth_url,
|
||||
username=username,
|
||||
password=password,
|
||||
project_name=project_name,
|
||||
project_domain_id=project_domain_id,
|
||||
user_domain_id=user_domain_id)
|
||||
sess = session.Session(auth=auth)
|
||||
neutron = client.Client(session=sess)
|
||||
|
||||
If you are using Identity v2.0 API (DEPRECATED), create an auth plugin using
|
||||
the appropriate parameters and `keystoneauth1.identity` will handle Identity
|
||||
@@ -58,38 +58,38 @@ like the previous example.
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
>>> auth = identity.Password(auth_url=auth_url,
|
||||
... username=username,
|
||||
... password=password,
|
||||
... project_name=project_name)
|
||||
>>> # create a Session and a Neutronclient
|
||||
auth = identity.Password(auth_url=auth_url,
|
||||
username=username,
|
||||
password=password,
|
||||
project_name=project_name)
|
||||
# create a Session and a Neutronclient
|
||||
|
||||
Now you can call various methods on the client instance.
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
>>> network = {'name': 'mynetwork', 'admin_state_up': True}
|
||||
>>> neutron.create_network({'network':network})
|
||||
>>> networks = neutron.list_networks(name='mynetwork')
|
||||
>>> print networks
|
||||
>>> network_id = networks['networks'][0]['id']
|
||||
>>> neutron.delete_network(network_id)
|
||||
network = {'name': 'mynetwork', 'admin_state_up': True}
|
||||
neutron.create_network({'network':network})
|
||||
networks = neutron.list_networks(name='mynetwork')
|
||||
print networks
|
||||
network_id = networks['networks'][0]['id']
|
||||
neutron.delete_network(network_id)
|
||||
|
||||
Alternatively, you can create a client instance using an auth token
|
||||
and a service endpoint URL directly.
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
>>> from neutronclient.v2_0 import client
|
||||
>>> neutron = client.Client(endpoint_url='http://192.168.206.130:9696/',
|
||||
... token='d3f9226f27774f338019aa2611112ef6')
|
||||
from neutronclient.v2_0 import client
|
||||
neutron = client.Client(endpoint_url='http://192.168.206.130:9696/',
|
||||
token='d3f9226f27774f338019aa2611112ef6')
|
||||
|
||||
You can get ``X-Openstack-Request-Id`` as ``request_ids`` from the result.
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
>>> network = {'name': 'mynetwork', 'admin_state_up': True}
|
||||
>>> neutron.create_network({'network':network})
|
||||
>>> networks = neutron.list_networks(name='mynetwork')
|
||||
>>> print networks.request_ids
|
||||
['req-978a0160-7ab0-44f0-8a93-08e9a4e785fa']
|
||||
network = {'name': 'mynetwork', 'admin_state_up': True}
|
||||
neutron.create_network({'network':network})
|
||||
networks = neutron.list_networks(name='mynetwork')
|
||||
print networks.request_ids
|
||||
# -> ['req-978a0160-7ab0-44f0-8a93-08e9a4e785fa']
|
||||
|
||||
@@ -104,13 +104,13 @@ class HTTPClient(object):
|
||||
try:
|
||||
resp, body = self.request(*args, **kargs)
|
||||
except requests.exceptions.SSLError as e:
|
||||
raise exceptions.SslCertificateValidationError(reason=e)
|
||||
raise exceptions.SslCertificateValidationError(reason=str(e))
|
||||
except Exception as e:
|
||||
# Wrap the low-level connection error (socket timeout, redirect
|
||||
# limit, decompression error, etc) into our custom high-level
|
||||
# connection exception (it is excepted in the upper layers of code)
|
||||
_logger.debug("throwing ConnectionFailed : %s", e)
|
||||
raise exceptions.ConnectionFailed(reason=e)
|
||||
raise exceptions.ConnectionFailed(reason=str(e))
|
||||
utils.http_log_resp(_logger, resp, body)
|
||||
|
||||
# log request-id for each api call
|
||||
|
||||
@@ -20,10 +20,6 @@ from neutronclient._i18n import _
|
||||
from neutronclient.common import exceptions as exception
|
||||
|
||||
|
||||
if six.PY3:
|
||||
long = int
|
||||
|
||||
|
||||
class ActionDispatcher(object):
|
||||
"""Maps method name to local methods through action name."""
|
||||
|
||||
|
||||
@@ -183,9 +183,9 @@ def http_log_req(_logger, args, kwargs):
|
||||
for (key, value) in six.iteritems(kwargs['headers']):
|
||||
if key in SENSITIVE_HEADERS:
|
||||
v = value.encode('utf-8')
|
||||
h = hashlib.sha1(v)
|
||||
h = hashlib.sha256(v)
|
||||
d = h.hexdigest()
|
||||
value = "{SHA1}%s" % d
|
||||
value = "{SHA256}%s" % d
|
||||
header = ' -H "%s: %s"' % (key, value)
|
||||
string_parts.append(header)
|
||||
|
||||
|
||||
@@ -31,7 +31,7 @@ def add_minimum_bandwidth_arguments(parser):
|
||||
help=_('QoS minimum bandwidth assurance, expressed in kilobits '
|
||||
'per second.'))
|
||||
# NOTE(ralonsoh): the only direction implemented is "egress". Please,
|
||||
# refer to the spec (https://review.openstack.org/#/c/316082/).
|
||||
# refer to the spec (https://review.opendev.org/#/c/316082/).
|
||||
parser.add_argument(
|
||||
'--direction',
|
||||
# NOTE(ihrachys): though server picks the default for us (egress), it's
|
||||
|
||||
@@ -70,18 +70,25 @@ class RemoveBgpSpeakerFromDRAgent(command.Command):
|
||||
|
||||
|
||||
class ListDRAgentsHostingBgpSpeaker(command.Lister):
|
||||
"""List dynamic routing agents hosting a BGP speaker"""
|
||||
"""(Deprecated) List dynamic routing agents hosting a BGP speaker
|
||||
|
||||
(Use "bgp dragent list" instead)
|
||||
"""
|
||||
|
||||
resource = 'agent'
|
||||
list_columns = ['id', 'host', 'admin_state_up', 'alive']
|
||||
unknown_parts_flag = False
|
||||
|
||||
def get_parser(self, prog_name):
|
||||
self.log.warning("The 'openstack bgp speaker show dragents' CLI is "
|
||||
"deprecated and will be removed in the future. Use "
|
||||
"'openstack bgp dragent list' CLI instead.")
|
||||
parser = super(ListDRAgentsHostingBgpSpeaker,
|
||||
self).get_parser(prog_name)
|
||||
parser.add_argument('bgp_speaker',
|
||||
metavar='<bgp-speaker>',
|
||||
help=_("ID or name of the BGP speaker"))
|
||||
help=_("List dynamic routing agents hosting a "
|
||||
"BGP speaker (name or ID)"))
|
||||
return parser
|
||||
|
||||
def take_action(self, parsed_args):
|
||||
@@ -97,3 +104,39 @@ class ListDRAgentsHostingBgpSpeaker(command.Lister):
|
||||
(utils.get_dict_properties(
|
||||
s, columns, formatters=_formatters,
|
||||
) for s in data['agents']))
|
||||
|
||||
|
||||
class ListDRAgent(command.Lister):
|
||||
"""List dynamic routing agents"""
|
||||
|
||||
resource = 'agent'
|
||||
list_columns = ['id', 'host', 'admin_state_up', 'alive']
|
||||
unknown_parts_flag = False
|
||||
|
||||
def get_parser(self, prog_name):
|
||||
parser = super(ListDRAgent,
|
||||
self).get_parser(prog_name)
|
||||
parser.add_argument('--bgp-speaker',
|
||||
metavar='<bgp-speaker>',
|
||||
help=_("List dynamic routing agents hosting a "
|
||||
"BGP speaker (name or ID)"))
|
||||
return parser
|
||||
|
||||
def take_action(self, parsed_args):
|
||||
search_opts = {}
|
||||
client = self.app.client_manager.neutronclient
|
||||
if parsed_args.bgp_speaker is not None:
|
||||
search_opts = {}
|
||||
speaker_id = client.find_resource(constants.BGP_SPEAKER,
|
||||
parsed_args.bgp_speaker)['id']
|
||||
search_opts['bgp_speaker'] = speaker_id
|
||||
data = client.list_dragents_hosting_bgp_speaker(**search_opts)
|
||||
else:
|
||||
attrs = {'agent_type': 'BGP dynamic routing agent'}
|
||||
data = client.list_agents(**attrs)
|
||||
headers = ('ID', 'Host', 'State', 'Alive')
|
||||
columns = ('id', 'host', 'admin_state_up', 'alive')
|
||||
return (headers,
|
||||
(utils.get_dict_properties(
|
||||
s, columns, formatters=_formatters,
|
||||
) for s in data['agents']))
|
||||
|
||||
@@ -77,19 +77,6 @@ def _get_common_parser(parser):
|
||||
action='store_true',
|
||||
help=_('Detach egress firewall policy from the firewall group'))
|
||||
shared_group = parser.add_mutually_exclusive_group()
|
||||
shared_group.add_argument(
|
||||
'--public',
|
||||
action='store_true',
|
||||
help=_('Make the firewall group public, which allows it to be '
|
||||
'used in all projects (as opposed to the default, '
|
||||
'which is to restrict its use to the current project). '
|
||||
'This option is deprecated and would be removed in R release.'))
|
||||
shared_group.add_argument(
|
||||
'--private',
|
||||
action='store_true',
|
||||
help=_('Restrict use of the firewall group to the '
|
||||
'current project. This option is deprecated '
|
||||
'and would be removed in R release.'))
|
||||
|
||||
shared_group.add_argument(
|
||||
'--share',
|
||||
@@ -147,9 +134,9 @@ def _get_common_attrs(client_manager, parsed_args, is_create=True):
|
||||
cmd_resource=const.CMD_FWP)['id']
|
||||
elif parsed_args.no_egress_firewall_policy:
|
||||
attrs['egress_firewall_policy_id'] = None
|
||||
if parsed_args.share or parsed_args.public:
|
||||
if parsed_args.share:
|
||||
attrs['shared'] = True
|
||||
if parsed_args.no_share or parsed_args.private:
|
||||
if parsed_args.no_share:
|
||||
attrs['shared'] = False
|
||||
if parsed_args.enable:
|
||||
attrs['admin_state_up'] = True
|
||||
@@ -349,14 +336,6 @@ class UnsetFirewallGroup(command.Command):
|
||||
dest='egress_firewall_policy',
|
||||
help=_('Egress firewall policy (name or ID) to delete'))
|
||||
shared_group = parser.add_mutually_exclusive_group()
|
||||
shared_group.add_argument(
|
||||
'--public',
|
||||
action='store_true',
|
||||
help=_('Make the firewall group public, which allows it to be '
|
||||
'used in all projects (as opposed to the default, '
|
||||
'which is to restrict its use to the current project). '
|
||||
'This option is deprecated and would be removed in R'
|
||||
' release.'))
|
||||
shared_group.add_argument(
|
||||
'--share',
|
||||
action='store_true',
|
||||
@@ -375,7 +354,7 @@ class UnsetFirewallGroup(command.Command):
|
||||
attrs['ingress_firewall_policy_id'] = None
|
||||
if parsed_args.egress_firewall_policy:
|
||||
attrs['egress_firewall_policy_id'] = None
|
||||
if parsed_args.share or parsed_args.public:
|
||||
if parsed_args.share:
|
||||
attrs['shared'] = False
|
||||
if parsed_args.enable:
|
||||
attrs['admin_state_up'] = False
|
||||
|
||||
@@ -80,9 +80,9 @@ def _get_common_attrs(client_manager, parsed_args, is_create=True):
|
||||
attrs['name'] = str(parsed_args.name)
|
||||
if parsed_args.description:
|
||||
attrs['description'] = str(parsed_args.description)
|
||||
if parsed_args.share or parsed_args.public:
|
||||
if parsed_args.share:
|
||||
attrs['shared'] = True
|
||||
if parsed_args.no_share or parsed_args.private:
|
||||
if parsed_args.no_share:
|
||||
attrs['shared'] = False
|
||||
return attrs
|
||||
|
||||
@@ -107,19 +107,6 @@ def _get_common_parser(parser):
|
||||
help=_('Share the firewall policy to be used in all projects '
|
||||
'(by default, it is restricted to be used by the '
|
||||
'current project).'))
|
||||
shared_group.add_argument(
|
||||
'--public',
|
||||
action='store_true',
|
||||
help=_('Make the firewall policy public, which allows it to be '
|
||||
'used in all projects (as opposed to the default, which '
|
||||
'is to restrict its use to the current project.) This '
|
||||
'option is deprecated and would be removed in R release.'))
|
||||
shared_group.add_argument(
|
||||
'--private',
|
||||
action='store_true',
|
||||
help=_(
|
||||
'Restrict use of the firewall policy to the current project.'
|
||||
'This option is deprecated and would be removed in R release.'))
|
||||
shared_group.add_argument(
|
||||
'--no-share',
|
||||
action='store_true',
|
||||
@@ -403,12 +390,6 @@ class UnsetFirewallPolicy(command.Command):
|
||||
action='store_true',
|
||||
help=_('Restrict use of the firewall policy to the '
|
||||
'current project'))
|
||||
parser.add_argument(
|
||||
'--public',
|
||||
action='store_true',
|
||||
help=_('Restrict use of the firewall policy to the '
|
||||
'current project. This option is deprecated '
|
||||
'and would be removed in R release.'))
|
||||
return parser
|
||||
|
||||
def _get_attrs(self, client_manager, parsed_args):
|
||||
@@ -428,7 +409,7 @@ class UnsetFirewallPolicy(command.Command):
|
||||
attrs[const.FWRS] = []
|
||||
if parsed_args.audited:
|
||||
attrs['audited'] = False
|
||||
if parsed_args.share or parsed_args.public:
|
||||
if parsed_args.share:
|
||||
attrs['shared'] = False
|
||||
return attrs
|
||||
|
||||
|
||||
@@ -117,19 +117,6 @@ def _get_common_parser(parser):
|
||||
action='store_true',
|
||||
help=_('Detach destination port number or range'))
|
||||
shared_group = parser.add_mutually_exclusive_group()
|
||||
shared_group.add_argument(
|
||||
'--public',
|
||||
action='store_true',
|
||||
help=_('Make the firewall policy public, which allows it to be '
|
||||
'used in all projects (as opposed to the default, '
|
||||
'which is to restrict its use to the current project). '
|
||||
'This option is deprecated and would be removed in R Release'))
|
||||
shared_group.add_argument(
|
||||
'--private',
|
||||
action='store_true',
|
||||
help=_(
|
||||
'Restrict use of the firewall rule to the current project.'
|
||||
'This option is deprecated and would be removed in R release.'))
|
||||
shared_group.add_argument(
|
||||
'--share',
|
||||
action='store_true',
|
||||
@@ -212,9 +199,9 @@ def _get_common_attrs(client_manager, parsed_args, is_create=True):
|
||||
attrs['enabled'] = True
|
||||
if parsed_args.disable_rule:
|
||||
attrs['enabled'] = False
|
||||
if parsed_args.share or parsed_args.public:
|
||||
if parsed_args.share:
|
||||
attrs['shared'] = True
|
||||
if parsed_args.no_share or parsed_args.private:
|
||||
if parsed_args.no_share:
|
||||
attrs['shared'] = False
|
||||
if parsed_args.source_firewall_group:
|
||||
attrs['source_firewall_group_id'] = client.find_resource(
|
||||
@@ -416,12 +403,6 @@ class UnsetFirewallRule(command.Command):
|
||||
'--share',
|
||||
action='store_true',
|
||||
help=_('Restrict use of the firewall rule to the current project'))
|
||||
parser.add_argument(
|
||||
'--public',
|
||||
action='store_true',
|
||||
help=_('Restrict use of the firewall rule to the current project. '
|
||||
'This option is deprecated and would be removed in '
|
||||
'R Release.'))
|
||||
parser.add_argument(
|
||||
'--enable-rule',
|
||||
action='store_true',
|
||||
@@ -448,7 +429,7 @@ class UnsetFirewallRule(command.Command):
|
||||
attrs['destination_ip_address'] = None
|
||||
if parsed_args.destination_port:
|
||||
attrs['destination_port'] = None
|
||||
if parsed_args.share or parsed_args.public:
|
||||
if parsed_args.share:
|
||||
attrs['shared'] = False
|
||||
if parsed_args.enable_rule:
|
||||
attrs['enabled'] = False
|
||||
|
||||
@@ -118,7 +118,7 @@ class CreateNetworkLog(command.ShowOne):
|
||||
help=_('Name for the network log'))
|
||||
parser.add_argument(
|
||||
'--event',
|
||||
metavar='<event>',
|
||||
metavar='{ALL,ACCEPT,DROP}',
|
||||
choices=['ALL', 'ACCEPT', 'DROP'],
|
||||
type=nc_utils.convert_to_uppercase,
|
||||
help=_('An event to store with log'))
|
||||
|
||||
@@ -222,7 +222,7 @@ class NeutronShell(app.App):
|
||||
type=check_non_negative_int,
|
||||
default=0,
|
||||
help=_("How many times the request to the Neutron server should "
|
||||
"be retried if it fails."))
|
||||
"be retried if it fails. Defaults to 0."))
|
||||
# FIXME(bklei): this method should come from keystoneauth1
|
||||
self._append_global_identity_args(parser)
|
||||
|
||||
@@ -241,12 +241,12 @@ class NeutronShell(app.App):
|
||||
parser.add_argument(
|
||||
'--os-service-type', metavar='<os-service-type>',
|
||||
default=env('OS_NETWORK_SERVICE_TYPE', default='network'),
|
||||
help=_('Defaults to env[OS_NETWORK_SERVICE_TYPE] or network.'))
|
||||
help=_('Defaults to env[OS_NETWORK_SERVICE_TYPE] or "network".'))
|
||||
|
||||
parser.add_argument(
|
||||
'--os-endpoint-type', metavar='<os-endpoint-type>',
|
||||
default=env('OS_ENDPOINT_TYPE', default='public'),
|
||||
help=_('Defaults to env[OS_ENDPOINT_TYPE] or public.'))
|
||||
help=_('Defaults to env[OS_ENDPOINT_TYPE] or "public".'))
|
||||
|
||||
# FIXME(bklei): --service-type is deprecated but kept in for
|
||||
# backward compatibility.
|
||||
|
||||
@@ -76,7 +76,5 @@ class ClientTestBase(base.ClientTestBase):
|
||||
|
||||
def is_extension_enabled(self, extension_alias):
|
||||
extensions = self.parser.listing(self.neutron('ext-list'))
|
||||
for extension in extensions:
|
||||
if extension_alias in extension['alias']:
|
||||
return True
|
||||
return False
|
||||
aliases = [e['alias'] for e in extensions]
|
||||
return extension_alias in aliases
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
enable_plugin neutron-fwaas git://git.openstack.org/openstack/neutron-fwaas
|
||||
enable_plugin neutron-fwaas https://opendev.org/openstack/neutron-fwaas
|
||||
enable_service q-fwaas
|
||||
|
||||
@@ -1 +1 @@
|
||||
enable_plugin neutron-vpnaas git://git.openstack.org/openstack/neutron-vpnaas
|
||||
enable_plugin neutron-vpnaas https://opendev.org/openstack/neutron-vpnaas
|
||||
|
||||
@@ -57,7 +57,7 @@ class FakeBgpSpeaker(object):
|
||||
|
||||
"""
|
||||
bgp_speakers = []
|
||||
for i in range(0, count):
|
||||
for i in range(count):
|
||||
bgp_speaker = FakeBgpSpeaker.create_one_bgp_speaker(attrs)
|
||||
bgp_speakers.append(bgp_speaker)
|
||||
|
||||
@@ -89,8 +89,42 @@ class FakeBgpPeer(object):
|
||||
def create_bgp_peers(attrs=None, count=1):
|
||||
"""Create one or multiple fake bgp peers."""
|
||||
bgp_peers = []
|
||||
for i in range(0, count):
|
||||
for i in range(count):
|
||||
bgp_peer = FakeBgpPeer.create_one_bgp_peer(attrs)
|
||||
bgp_peers.append(bgp_peer)
|
||||
|
||||
return {'bgp_peers': bgp_peers}
|
||||
|
||||
|
||||
class FakeDRAgent(object):
|
||||
"""Fake one or more dynamic routing agents."""
|
||||
|
||||
@staticmethod
|
||||
def create_one_dragent(attrs=None):
|
||||
attrs = attrs or {}
|
||||
# Set default attributes.
|
||||
dragent_attrs = {
|
||||
'binary': 'neutron-bgp-dragent',
|
||||
'admin_state_up': True,
|
||||
'alive': True,
|
||||
'topic': 'bgp_dragent',
|
||||
'host': 'network-' + uuid.uuid4().hex,
|
||||
'name': 'bgp-dragent-' + uuid.uuid4().hex,
|
||||
'agent_type': 'BGP dynamic routing agent',
|
||||
'id': uuid.uuid4().hex,
|
||||
}
|
||||
|
||||
# Overwrite default attributes.
|
||||
dragent_attrs.update(attrs)
|
||||
|
||||
return copy.deepcopy(dragent_attrs)
|
||||
|
||||
@staticmethod
|
||||
def create_dragents(attrs=None, count=1):
|
||||
"""Create one or multiple fake dynamic routing agents."""
|
||||
agents = []
|
||||
for i in range(count):
|
||||
agent = FakeDRAgent.create_one_dragent(attrs)
|
||||
agents.append(agent)
|
||||
|
||||
return {'agents': agents}
|
||||
|
||||
@@ -0,0 +1,123 @@
|
||||
# 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 mock
|
||||
|
||||
from neutronclient.osc.v2.dynamic_routing import bgp_dragent
|
||||
from neutronclient.tests.unit.osc.v2.dynamic_routing import fakes
|
||||
|
||||
|
||||
class TestAddBgpSpeakerToDRAgent(fakes.TestNeutronDynamicRoutingOSCV2):
|
||||
_bgp_speaker = fakes.FakeBgpSpeaker.create_one_bgp_speaker()
|
||||
_bgp_dragent = fakes.FakeDRAgent.create_one_dragent()
|
||||
_bgp_speaker_id = _bgp_speaker['id']
|
||||
_bgp_dragent_id = _bgp_dragent['id']
|
||||
|
||||
def setUp(self):
|
||||
super(TestAddBgpSpeakerToDRAgent, self).setUp()
|
||||
|
||||
# Get the command object to test
|
||||
self.cmd = bgp_dragent.AddBgpSpeakerToDRAgent(self.app, self.namespace)
|
||||
|
||||
def test_add_bgp_speaker_to_dragent(self):
|
||||
arglist = [
|
||||
self._bgp_dragent_id,
|
||||
self._bgp_speaker_id,
|
||||
]
|
||||
verifylist = [
|
||||
('dragent_id', self._bgp_dragent_id),
|
||||
('bgp_speaker', self._bgp_speaker_id),
|
||||
]
|
||||
parsed_args = self.check_parser(self.cmd, arglist, verifylist)
|
||||
|
||||
with mock.patch.object(self.neutronclient,
|
||||
"add_bgp_speaker_to_dragent",
|
||||
return_value=None):
|
||||
|
||||
result = self.cmd.take_action(parsed_args)
|
||||
self.neutronclient.add_bgp_speaker_to_dragent.\
|
||||
assert_called_once_with(
|
||||
self._bgp_dragent_id,
|
||||
{'bgp_speaker_id': self._bgp_speaker_id})
|
||||
self.assertIsNone(result)
|
||||
|
||||
|
||||
class TestRemoveBgpSpeakerFromDRAgent(fakes.TestNeutronDynamicRoutingOSCV2):
|
||||
_bgp_speaker = fakes.FakeBgpSpeaker.create_one_bgp_speaker()
|
||||
_bgp_dragent = fakes.FakeDRAgent.create_one_dragent()
|
||||
_bgp_speaker_id = _bgp_speaker['id']
|
||||
_bgp_dragent_id = _bgp_dragent['id']
|
||||
|
||||
def setUp(self):
|
||||
super(TestRemoveBgpSpeakerFromDRAgent, self).setUp()
|
||||
|
||||
# Get the command object to test
|
||||
self.cmd = bgp_dragent.RemoveBgpSpeakerFromDRAgent(
|
||||
self.app, self.namespace)
|
||||
|
||||
def test_remove_bgp_speaker_from_dragent(self):
|
||||
arglist = [
|
||||
self._bgp_dragent_id,
|
||||
self._bgp_speaker_id,
|
||||
]
|
||||
verifylist = [
|
||||
('dragent_id', self._bgp_dragent_id),
|
||||
('bgp_speaker', self._bgp_speaker_id),
|
||||
]
|
||||
parsed_args = self.check_parser(self.cmd, arglist, verifylist)
|
||||
|
||||
with mock.patch.object(self.neutronclient,
|
||||
"remove_bgp_speaker_from_dragent",
|
||||
return_value=None):
|
||||
result = self.cmd.take_action(parsed_args)
|
||||
self.neutronclient.remove_bgp_speaker_from_dragent.\
|
||||
assert_called_once_with(self._bgp_dragent_id,
|
||||
self._bgp_speaker_id)
|
||||
self.assertIsNone(result)
|
||||
|
||||
|
||||
class TestListDRAgentsHostingBgpSpeaker(fakes.TestNeutronDynamicRoutingOSCV2):
|
||||
_bgp_speaker = fakes.FakeBgpSpeaker.create_one_bgp_speaker()
|
||||
_bgp_speaker_id = _bgp_speaker['id']
|
||||
attrs = {'bgp_speaker_id': _bgp_speaker_id}
|
||||
_bgp_dragents = fakes.FakeDRAgent.create_dragents(attrs)
|
||||
columns = ('ID', 'Host', 'State', 'Alive')
|
||||
data = [(_bgp_dragent['id'],
|
||||
_bgp_dragent['host'],
|
||||
_bgp_dragent['admin_state_up'],
|
||||
':-)' if _bgp_dragent['alive'] else 'XXX')
|
||||
for _bgp_dragent in _bgp_dragents['agents']]
|
||||
|
||||
def setUp(self):
|
||||
super(TestListDRAgentsHostingBgpSpeaker, self).setUp()
|
||||
|
||||
# Get the command object to test
|
||||
self.cmd = bgp_dragent.ListDRAgent(self.app, self.namespace)
|
||||
|
||||
def test_list_dragents_hosting_bgp_speaker(self):
|
||||
arglist = [
|
||||
'--bgp-speaker', self._bgp_speaker_id,
|
||||
]
|
||||
verifylist = [
|
||||
('bgp_speaker', self._bgp_speaker_id),
|
||||
]
|
||||
parsed_args = self.check_parser(self.cmd, arglist, verifylist)
|
||||
|
||||
with mock.patch.object(self.neutronclient,
|
||||
"list_dragents_hosting_bgp_speaker",
|
||||
return_value=self._bgp_dragents):
|
||||
columns, data = self.cmd.take_action(parsed_args)
|
||||
attrs = {'bgp_speaker': self._bgp_speaker_id}
|
||||
self.neutronclient.list_dragents_hosting_bgp_speaker.\
|
||||
assert_called_once_with(**attrs)
|
||||
self.assertEqual(self.columns, columns)
|
||||
self.assertListEqual(self.data, list(data))
|
||||
@@ -120,20 +120,6 @@ class TestSetFWaaS(test_fakes.TestNeutronClientOSCV2):
|
||||
target, {self.res: {'shared': True}})
|
||||
self.assertIsNone(result)
|
||||
|
||||
def test_set_public(self):
|
||||
target = self.resource['id']
|
||||
arglist = [target, '--public']
|
||||
verifylist = [
|
||||
(self.res, target),
|
||||
('public', True),
|
||||
]
|
||||
parsed_args = self.check_parser(self.cmd, arglist, verifylist)
|
||||
result = self.cmd.take_action(parsed_args)
|
||||
|
||||
self.mocked.assert_called_once_with(
|
||||
target, {self.res: {'shared': True}})
|
||||
self.assertIsNone(result)
|
||||
|
||||
def test_set_duplicate_shared(self):
|
||||
target = self.resource['id']
|
||||
arglist = [target, '--share', '--share']
|
||||
|
||||
@@ -139,8 +139,8 @@ class TestCreateNetworkLog(TestNetworkLog):
|
||||
self.mocked = self.neutronclient.create_network_log
|
||||
self.cmd = network_log.CreateNetworkLog(self.app, self.namespace)
|
||||
loggables = {
|
||||
"loggable_resources": [{"type": RES_TYPE_SG,
|
||||
"type": RES_TYPE_FWG}]
|
||||
"loggable_resources": [{"type": RES_TYPE_SG},
|
||||
{"type": RES_TYPE_FWG}]
|
||||
}
|
||||
self.neutronclient.list_network_loggable_resources = mock.Mock(
|
||||
return_value=loggables)
|
||||
|
||||
@@ -33,9 +33,9 @@ class CLITestV20QoSRuleJSON(test_cli20.CLITestV20Base):
|
||||
# qos_rule_types.
|
||||
resources = 'rule_types'
|
||||
cmd_resources = 'qos_rule_types'
|
||||
response_contents = [{'type': 'bandwidth_limit',
|
||||
'type': 'dscp_marking',
|
||||
'type': 'minimum_bandwidth'}]
|
||||
response_contents = [{'type': 'bandwidth_limit'},
|
||||
{'type': 'dscp_marking'},
|
||||
{'type': 'minimum_bandwidth'}]
|
||||
|
||||
cmd = qos_rule.ListQoSRuleTypes(test_cli20.MyApp(sys.stdout),
|
||||
None)
|
||||
|
||||
@@ -12,7 +12,9 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
import fixtures
|
||||
import sys
|
||||
|
||||
import mock
|
||||
from oslo_utils import encodeutils
|
||||
import six
|
||||
import testtools
|
||||
@@ -30,12 +32,11 @@ class TestExceptions(testtools.TestCase):
|
||||
multibyte_unicode_string = u'\uff21\uff22\uff23'
|
||||
e = TestException(reason=multibyte_unicode_string)
|
||||
|
||||
fixture = fixtures.StringStream('stdout')
|
||||
self.useFixture(fixture)
|
||||
with fixtures.MonkeyPatch('sys.stdout', fixture.stream):
|
||||
with mock.patch.object(sys, 'stdout') as mock_stdout:
|
||||
print(e)
|
||||
self.assertEqual('Exception with %s' % multibyte_unicode_string,
|
||||
fixture.getDetails().get('stdout').as_text())
|
||||
|
||||
exc_str = 'Exception with %s' % multibyte_unicode_string
|
||||
mock_stdout.assert_has_calls([mock.call.write(exc_str)])
|
||||
|
||||
def test_exception_message_with_encoded_unicode(self):
|
||||
class TestException(exceptions.NeutronException):
|
||||
|
||||
@@ -492,6 +492,9 @@ class Client(ClientBase):
|
||||
network_path = "/networks/%s"
|
||||
ports_path = "/ports"
|
||||
port_path = "/ports/%s"
|
||||
port_bindings_path = "/ports/%s/bindings"
|
||||
port_binding_path = "/ports/%s/bindings/%s"
|
||||
port_binding_path_activate = "/ports/%s/bindings/%s/activate"
|
||||
subnets_path = "/subnets"
|
||||
subnet_path = "/subnets/%s"
|
||||
onboard_network_subnets_path = "/subnetpools/%s/onboard_network_subnets"
|
||||
@@ -811,6 +814,28 @@ class Client(ClientBase):
|
||||
"""Deletes the specified port."""
|
||||
return self.delete(self.port_path % (port))
|
||||
|
||||
def create_port_binding(self, port_id, body=None):
|
||||
"""Creates a new port binding."""
|
||||
return self.post(self.port_bindings_path % port_id, body=body)
|
||||
|
||||
def delete_port_binding(self, port_id, host_id):
|
||||
"""Deletes the specified port binding."""
|
||||
return self.delete(self.port_binding_path % (port_id, host_id))
|
||||
|
||||
def show_port_binding(self, port_id, host_id, **_params):
|
||||
"""Fetches information for a certain port binding."""
|
||||
return self.get(self.port_binding_path % (port_id, host_id),
|
||||
params=_params)
|
||||
|
||||
def list_port_bindings(self, port_id, retrieve_all=True, **_params):
|
||||
"""Fetches a list of all bindings for a certain port."""
|
||||
return self.list('port_bindings', self.port_bindings_path % port_id,
|
||||
retrieve_all, **_params)
|
||||
|
||||
def activate_port_binding(self, port_id, host_id):
|
||||
"""Activates a port binding."""
|
||||
return self.put(self.port_binding_path_activate % (port_id, host_id))
|
||||
|
||||
def list_networks(self, retrieve_all=True, **_params):
|
||||
"""Fetches a list of all networks for a project."""
|
||||
# Pass filters in "params" argument to do_request
|
||||
@@ -934,6 +959,16 @@ class Client(ClientBase):
|
||||
return self.put((self.router_path % router) +
|
||||
"/remove_router_interface", body=body)
|
||||
|
||||
def add_extra_routes_to_router(self, router, body=None):
|
||||
"""Adds extra routes to the specified router."""
|
||||
return self.put((self.router_path % router) + "/add_extraroutes",
|
||||
body=body)
|
||||
|
||||
def remove_extra_routes_from_router(self, router, body=None):
|
||||
"""Removes extra routes from the specified router."""
|
||||
return self.put((self.router_path % router) + "/remove_extraroutes",
|
||||
body=body)
|
||||
|
||||
def add_gateway_router(self, router, body=None):
|
||||
"""Adds an external network gateway to the specified router."""
|
||||
return self.put((self.router_path % router),
|
||||
|
||||
15
playbooks/legacy/grenade-dsvm-neutron-libs/post.yaml
Normal file
15
playbooks/legacy/grenade-dsvm-neutron-libs/post.yaml
Normal file
@@ -0,0 +1,15 @@
|
||||
- hosts: primary
|
||||
tasks:
|
||||
|
||||
- name: Copy files from {{ ansible_user_dir }}/workspace/ on node
|
||||
synchronize:
|
||||
src: '{{ ansible_user_dir }}/workspace/'
|
||||
dest: '{{ zuul.executor.log_root }}'
|
||||
mode: pull
|
||||
copy_links: true
|
||||
verify_host: true
|
||||
rsync_opts:
|
||||
- --include=/logs/**
|
||||
- --include=*/
|
||||
- --exclude=*
|
||||
- --prune-empty-dirs
|
||||
52
playbooks/legacy/grenade-dsvm-neutron-libs/run.yaml
Normal file
52
playbooks/legacy/grenade-dsvm-neutron-libs/run.yaml
Normal file
@@ -0,0 +1,52 @@
|
||||
- hosts: all
|
||||
name: Autoconverted job legacy-grenade-dsvm-neutron-libs from old job gate-grenade-dsvm-neutron-libs-ubuntu-xenial-nv
|
||||
tasks:
|
||||
|
||||
- name: Ensure legacy workspace directory
|
||||
file:
|
||||
path: '{{ ansible_user_dir }}/workspace'
|
||||
state: directory
|
||||
|
||||
- shell:
|
||||
cmd: |
|
||||
set -e
|
||||
set -x
|
||||
cat > clonemap.yaml << EOF
|
||||
clonemap:
|
||||
- name: openstack/devstack-gate
|
||||
dest: devstack-gate
|
||||
EOF
|
||||
/usr/zuul-env/bin/zuul-cloner -m clonemap.yaml --cache-dir /opt/git \
|
||||
https://opendev.org \
|
||||
openstack/devstack-gate
|
||||
executable: /bin/bash
|
||||
chdir: '{{ ansible_user_dir }}/workspace'
|
||||
environment: '{{ zuul | zuul_legacy_vars }}'
|
||||
|
||||
- shell:
|
||||
cmd: |
|
||||
set -e
|
||||
set -x
|
||||
export PROJECTS="openstack/grenade $PROJECTS"
|
||||
export DEVSTACK_PROJECT_FROM_GIT="os-client-config"
|
||||
export DEVSTACK_PROJECT_FROM_GIT+=",keystoneauth"
|
||||
export DEVSTACK_PROJECT_FROM_GIT+=",python-novaclient"
|
||||
export DEVSTACK_PROJECT_FROM_GIT+=",python-keystoneclient"
|
||||
export DEVSTACK_PROJECT_FROM_GIT+=",python-glanceclient"
|
||||
export DEVSTACK_PROJECT_FROM_GIT+=",python-cinderclient"
|
||||
export DEVSTACK_PROJECT_FROM_GIT+=",python-neutronclient"
|
||||
export DEVSTACK_PROJECT_FROM_GIT+=",python-ironicclient"
|
||||
export PYTHONUNBUFFERED=true
|
||||
export DEVSTACK_GATE_TEMPEST=1
|
||||
export DEVSTACK_GATE_GRENADE=pullup
|
||||
export DEVSTACK_GATE_USE_PYTHON3=True
|
||||
export DEVSTACK_GATE_NEUTRON=1
|
||||
export BRANCH_OVERRIDE=default
|
||||
if [ "$BRANCH_OVERRIDE" != "default" ] ; then
|
||||
export OVERRIDE_ZUUL_BRANCH=$BRANCH_OVERRIDE
|
||||
fi
|
||||
cp devstack-gate/devstack-vm-gate-wrap.sh ./safe-devstack-vm-gate-wrap.sh
|
||||
./safe-devstack-vm-gate-wrap.sh
|
||||
executable: /bin/bash
|
||||
chdir: '{{ ansible_user_dir }}/workspace'
|
||||
environment: '{{ zuul | zuul_legacy_vars }}'
|
||||
@@ -0,0 +1,10 @@
|
||||
---
|
||||
deprecations:
|
||||
- |
|
||||
The ``openstack bgp speaker show dragents`` CLI is deprecated and
|
||||
will be removed in the future. Use ``openstack bgp dragent list
|
||||
--bgp-speaker <bgp-speaker>`` CLI instead.
|
||||
features:
|
||||
- |
|
||||
The ``openstack bgp dragent list`` CLI is added to support showing
|
||||
the list of dynamic routing agents.
|
||||
5
releasenotes/notes/drop-python-2.7-f615ebae463b2143.yaml
Normal file
5
releasenotes/notes/drop-python-2.7-f615ebae463b2143.yaml
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
upgrade:
|
||||
- |
|
||||
Python 2.7 support has been dropped. The minimum version of Python now
|
||||
supported by python-neutronclient is Python 3.6.
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
features:
|
||||
- |
|
||||
New client methods: ``add_extra_routes_to_router`` and
|
||||
``remove_extra_routes_from_router``.
|
||||
5
releasenotes/notes/port-bindings-c3f36bd76ece0a71.yaml
Normal file
5
releasenotes/notes/port-bindings-c3f36bd76ece0a71.yaml
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
features:
|
||||
- |
|
||||
New client methods: ``create_port_binding``, ``delete_port_binding``,
|
||||
``show_port_binding``, ``list_port_bindings`` and ``activate_port_binding``.
|
||||
@@ -2,7 +2,7 @@
|
||||
features:
|
||||
- Support os-client-config. OS_CLOUD environment variable is used for
|
||||
selecting named cloud configuration.
|
||||
- Support keystoneauth1 library which brings us better kyestone v3 support.
|
||||
- Support keystoneauth1 library which brings us better keystone v3 support.
|
||||
- Client command extension now supports a child resource.
|
||||
- New CLI for VPNaaS multiple local subnets.
|
||||
- New CLI for VPNaaS endpoint group API.
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
---
|
||||
upgrade:
|
||||
- |
|
||||
The deprecated options ``--public`` and ``--private`` were
|
||||
dropped in FWaaS v2 related commands. Use ``--share`` and
|
||||
``--no-share`` instead.
|
||||
@@ -6,6 +6,8 @@
|
||||
:maxdepth: 1
|
||||
|
||||
unreleased
|
||||
train
|
||||
stein
|
||||
rocky
|
||||
queens
|
||||
pike
|
||||
|
||||
6
releasenotes/source/stein.rst
Normal file
6
releasenotes/source/stein.rst
Normal file
@@ -0,0 +1,6 @@
|
||||
===================================
|
||||
Stein Series Release Notes
|
||||
===================================
|
||||
|
||||
.. release-notes::
|
||||
:branch: stable/stein
|
||||
6
releasenotes/source/train.rst
Normal file
6
releasenotes/source/train.rst
Normal file
@@ -0,0 +1,6 @@
|
||||
==========================
|
||||
Train Series Release Notes
|
||||
==========================
|
||||
|
||||
.. release-notes::
|
||||
:branch: stable/train
|
||||
@@ -14,11 +14,9 @@ classifier =
|
||||
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
|
||||
Programming Language :: Python :: 3.6
|
||||
Programming Language :: Python :: 3.7
|
||||
|
||||
[files]
|
||||
packages =
|
||||
@@ -72,6 +70,7 @@ openstack.neutronclient.v2 =
|
||||
sfc_service_graph_show = neutronclient.osc.v2.sfc.sfc_service_graph:ShowSfcServiceGraph
|
||||
|
||||
bgp_dragent_add_speaker = neutronclient.osc.v2.dynamic_routing.bgp_dragent:AddBgpSpeakerToDRAgent
|
||||
bgp_dragent_list = neutronclient.osc.v2.dynamic_routing.bgp_dragent:ListDRAgent
|
||||
bgp_dragent_remove_speaker = neutronclient.osc.v2.dynamic_routing.bgp_dragent:RemoveBgpSpeakerFromDRAgent
|
||||
bgp_peer_create = neutronclient.osc.v2.dynamic_routing.bgp_peer:CreateBgpPeer
|
||||
bgp_peer_delete = neutronclient.osc.v2.dynamic_routing.bgp_peer:DeleteBgpPeer
|
||||
@@ -457,9 +456,6 @@ neutron.cli.v2 =
|
||||
vpn-ikepolicy-update = neutronclient.neutron.v2_0.vpn.ikepolicy:UpdateIKEPolicy
|
||||
vpn-ikepolicy-delete = neutronclient.neutron.v2_0.vpn.ikepolicy:DeleteIKEPolicy
|
||||
|
||||
[wheel]
|
||||
universal = 1
|
||||
|
||||
[extract_messages]
|
||||
keywords = _ gettext ngettext l_ lazy_gettext
|
||||
mapping_file = babel.cfg
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
# process, which may cause wedges in the gate later.
|
||||
hacking>=1.1.0 # Apache-2.0
|
||||
|
||||
bandit>=1.1.0 # Apache-2.0
|
||||
bandit!=1.6.0,>=1.1.0 # Apache-2.0
|
||||
coverage!=4.4,>=4.0 # Apache-2.0
|
||||
fixtures>=3.0.0 # Apache-2.0/BSD
|
||||
flake8-import-order==0.12 # LGPLv3
|
||||
|
||||
30
tox.ini
30
tox.ini
@@ -1,10 +1,11 @@
|
||||
[tox]
|
||||
# py3 first to avoid .testrepository incompatibility
|
||||
envlist = py35,py27,pypy,pep8
|
||||
envlist = py37,pep8
|
||||
minversion = 2.3.2
|
||||
skipsdist = True
|
||||
ignore_basepython_conflict = True
|
||||
|
||||
[testenv]
|
||||
basepython = python3
|
||||
setenv = VIRTUAL_ENV={envdir}
|
||||
LANG=en_US.UTF-8
|
||||
LANGUAGE=en_US:en
|
||||
@@ -12,7 +13,7 @@ setenv = VIRTUAL_ENV={envdir}
|
||||
PYTHONWARNINGS=default::DeprecationWarning
|
||||
usedevelop = True
|
||||
install_command = pip install {opts} {packages}
|
||||
deps = -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt}
|
||||
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
|
||||
# Delete bytecodes from normal directories before running tests.
|
||||
@@ -25,28 +26,20 @@ commands = sh -c "find . -type d -name '.?*' -prune -o \
|
||||
whitelist_externals = sh
|
||||
|
||||
[testenv:pep8]
|
||||
basepython = python3
|
||||
commands =
|
||||
flake8
|
||||
{[testenv:bandit]commands}
|
||||
distribute = false
|
||||
|
||||
[testenv:venv]
|
||||
basepython = python3
|
||||
commands = {posargs}
|
||||
|
||||
[testenv:functional]
|
||||
setenv =
|
||||
OS_TEST_PATH = ./neutronclient/tests/functional/core
|
||||
OS_NEUTRONCLIENT_EXEC_DIR = {envdir}/bin
|
||||
|
||||
[testenv:functional-adv-svcs]
|
||||
setenv =
|
||||
OS_TEST_PATH = ./neutronclient/tests/functional/adv-svcs
|
||||
OS_TEST_PATH = ./neutronclient/tests/functional
|
||||
OS_NEUTRONCLIENT_EXEC_DIR = {envdir}/bin
|
||||
|
||||
[testenv:cover]
|
||||
basepython = python3
|
||||
setenv =
|
||||
{[testenv]setenv}
|
||||
PYTHON=coverage run --source neutronclient --parallel-mode
|
||||
@@ -58,12 +51,19 @@ commands =
|
||||
coverage report
|
||||
|
||||
[testenv:docs]
|
||||
basepython = python3
|
||||
deps = -r{toxinidir}/doc/requirements.txt
|
||||
commands = sphinx-build -W -b html doc/source doc/build/html
|
||||
|
||||
[testenv:pdf-docs]
|
||||
envdir = {toxworkdir}/docs
|
||||
deps = {[testenv:docs]deps}
|
||||
whitelist_externals =
|
||||
make
|
||||
commands =
|
||||
sphinx-build -W -b latex doc/source doc/build/pdf
|
||||
make -C doc/build/pdf
|
||||
|
||||
[testenv:releasenotes]
|
||||
basepython = python3
|
||||
deps = -r{toxinidir}/doc/requirements.txt
|
||||
commands = sphinx-build -a -E -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
|
||||
|
||||
@@ -76,13 +76,11 @@ import-order-style = pep8
|
||||
enable-extensions=H904
|
||||
|
||||
[testenv:bandit]
|
||||
basepython = python3
|
||||
# B303: blacklist calls: md5, sha1
|
||||
deps = -r{toxinidir}/test-requirements.txt
|
||||
commands = bandit -r neutronclient -x tests -n5 -s B303
|
||||
|
||||
[testenv:lower-constraints]
|
||||
basepython = python3
|
||||
deps =
|
||||
-c{toxinidir}/lower-constraints.txt
|
||||
-r{toxinidir}/test-requirements.txt
|
||||
|
||||
Reference in New Issue
Block a user