Compare commits

...

10 Commits
7.8.0 ... 8.2.1

Author SHA1 Message Date
Elvira García
776e360e35 Fix help sentence in network log create --enable
As the documentation states [1], the default in network log objects is
to be enabled, not disabled.

[1] https://docs.openstack.org/neutron/latest/admin/config-logging.html

Change-Id: I13e9d1132fc38104e6e85d9c8442bc7506adc2fd
2022-11-25 15:32:46 +01:00
elajkat
f67af3d9be Add warning and reno for SDK
On the 2023.1 (Antelope) PTG we discussed the status of the python
binding (SDK) code in python-neutronclient and decided to not allow new
features to this repo (see [1]), and make users to use openstacksdk.
Let's add a warning log message and a releasenote to make it visible.

[1]: https://etherpad.opendev.org/p/neutron-antelope-ptg#L163

Change-Id: I03317179bd0d30a69b91eef6e451b8e40eb28191
2022-10-21 16:40:38 +02:00
ec84aff516 Switch to 2023.1 Python3 unit tests and generic template name
This is an automatically generated patch to ensure unit testing
is in place for all the of the tested runtimes for antelope. Also,
updating the template name to generic one.

See also the PTI in governance [1].

[1]: https://governance.openstack.org/tc/reference/project-testing-interface.html

Change-Id: I026505ff0d277fd4f15329ed26a5cecf1d573f68
2022-09-14 09:26:48 +00:00
f060429cfc Update master for stable/zed
Add file to the reno documentation build to show release notes for
stable/zed.

Use pbr instruction to increment the minor version number
automatically so that master versions are higher than the versions on
stable/zed.

Sem-Ver: feature
Change-Id: Ie6a0efba406cd26606168ce5b6dbc8ee7ae759ed
2022-09-09 11:48:19 +00:00
Pedro Henrique
7467c710f6 Add support to floating ip port forwarding
To extend Horizon to allow users to create
port forwarding rules for their floating ips,
we need to extend this client to allow it,
as Horizon uses this client.

This patch is the one of a series of patches
to implement floating ip port forwarding with
port ranges.

The specification is defined in:
https://github.com/openstack/neutron-specs/blob/master/specs/wallaby/port-forwarding-port-ranges.rst

Implements: blueprint floatingips-portforwarding-ranges
Related-Bug: #1885921
Change-Id: I3f616dba5e2ebe301cf6ce4bed8c2e6e4da2da9b
2022-07-15 10:06:03 -03:00
Ghanshyam Mann
b720fdaee7 Update python testing as per zed cycle teting runtime
In Zed cycle, we have dropped the python 3.6/3.7[1] testing
and its support. Add release notes, move py36 jobs to py38|9,
and update the python classifier for the same.

[1] https://governance.openstack.org/tc/reference/runtimes/zed.html

Change-Id: Ibeee0b16ee1ea95f05127563a9cb08ffd0f04e2b
2022-05-11 22:25:31 -05:00
Ghanshyam Mann
143db0177a Drop lower-constraints.txt and its testing
As discussed in TC PTG[1] and TC resolution[2], we are
dropping the lower-constraints.txt file and its testing.
We will keep lower bounds in the requirements.txt file but
with a note that these are not tested lower bounds and we
try our best to keep them updated.

[1] https://etherpad.opendev.org/p/tc-zed-ptg#L326
[2] https://governance.openstack.org/tc/resolutions/20220414-drop-lower-constraints.html#proposal

Change-Id: I9a985c439675dc3aa6120a0d9734b8cdeaedccf8
2022-04-30 20:28:29 -05:00
Zuul
8c72cc87da Merge "Update master for stable/yoga" 2022-03-08 12:02:40 +00:00
4575bea5a6 Update master for stable/yoga
Add file to the reno documentation build to show release notes for
stable/yoga.

Use pbr instruction to increment the minor version number
automatically so that master versions are higher than the versions on
stable/yoga.

Sem-Ver: feature
Change-Id: I3f709510026817ae2f36d646ca3fe9487637b717
2022-03-03 10:52:26 +00:00
Rodolfo Alonso Hernandez
28628e8f96 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

Change-Id: I8e58da2d88d727018c8d5af5949e34f8c0893c1f
2022-03-03 00:26:29 +00:00
13 changed files with 73 additions and 125 deletions

View File

@@ -1,8 +1,7 @@
- project:
templates:
- openstack-cover-jobs
- openstack-lower-constraints-jobs
- openstack-python3-yoga-jobs
- openstack-python3-jobs
- publish-openstack-docs-pti
- check-requirements
- lib-forward-testing-python3

View File

@@ -1,111 +0,0 @@
alabaster==0.7.10
amqp==2.1.1
appdirs==1.3.0
asn1crypto==0.23.0
Babel==2.3.4
cachetools==2.0.0
cffi==1.14.0
cliff==3.4.0
cmd2==0.8.0
contextlib2==0.4.0
coverage==4.0
cryptography==2.7
debtcollector==1.2.0
decorator==4.1.0
deprecation==1.0
docutils==0.11
dogpile.cache==0.6.5
dulwich==0.15.0
eventlet==0.18.2
extras==1.0.0
fasteners==0.7.0
fixtures==3.0.0
flake8-import-order==0.12
flake8==3.6.0
future==0.16.0
futurist==1.2.0
greenlet==0.4.10
hacking==3.0.1
idna==2.6
imagesize==0.7.1
iso8601==0.1.11
Jinja2==2.10
jmespath==0.9.0
jsonpatch==1.16
jsonpointer==1.13
jsonschema==2.6.0
keystoneauth1==3.8.0
kombu==4.0.0
linecache2==1.0.0
MarkupSafe==1.0
mccabe==0.6.0
monotonic==0.6
msgpack-python==0.4.0
munch==2.1.0
netaddr==0.7.18
netifaces==0.10.4
openstacksdk==0.15.0
os-client-config==1.28.0
os-service-types==1.2.0
osc-lib==1.12.0
oslo.concurrency==3.26.0
oslo.config==5.2.0
oslo.context==2.19.2
oslo.i18n==3.15.3
oslo.log==3.36.0
oslo.messaging==5.29.0
oslo.middleware==3.31.0
oslo.serialization==2.18.0
oslo.service==1.24.0
oslo.utils==3.33.0
oslotest==3.2.0
osprofiler==2.3.0
paramiko==2.0.0
Paste==2.0.2
PasteDeploy==1.5.0
pbr==2.0.0
pika-pool==0.1.3
pika==0.10.0
positional==1.2.1
prettytable==0.7.2
pyasn1==0.1.8
pycodestyle==2.4.0
pycparser==2.18
pyflakes==2.0.0
Pygments==2.2.0
pyinotify==0.9.6
pyOpenSSL==17.1.0
pyparsing==2.1.0
pyperclip==1.5.27
python-cinderclient==3.3.0
python-dateutil==2.5.3
python-glanceclient==2.8.0
python-keystoneclient==3.8.0
python-mimeparse==1.6.0
python-novaclient==9.1.0
python-openstackclient==3.12.0
python-subunit==1.0.0
pytz==2013.6
PyYAML==5.3.1
repoze.lru==0.7
requests-mock==1.2.0
requests==2.14.2
requestsexceptions==1.2.0
rfc3986==0.3.1
Routes==2.3.1
simplejson==3.5.1
snowballstemmer==1.2.1
statsd==3.2.1
stestr==2.0.0
stevedore==2.0.1
tempest==17.1.0
tenacity==3.2.1
testscenarios==0.4
testtools==2.2.0
traceback2==1.4.0
unittest2==1.1.0
urllib3==1.21.1
vine==1.1.4
warlock==1.2.0
WebOb==1.7.1
wrapt==1.7.0

View File

@@ -58,11 +58,11 @@ def _get_common_parser(parser):
enable_group.add_argument(
'--enable',
action='store_true',
help=_('Enable this log (default is disabled)'))
help=_('Enable this log'))
enable_group.add_argument(
'--disable',
action='store_true',
help=_('Disable this log'))
help=_('Disable this log (default is enabled)'))
return parser

View File

@@ -250,6 +250,9 @@ class ClientBase(object):
def __init__(self, **kwargs):
"""Initialize a new client for the Neutron v2.0 API."""
super(ClientBase, self).__init__()
_logger.warning("The python binding code in neutronclient will be "
"deprecated in favor of OpenstackSDK, please use "
"that!")
self.retries = kwargs.pop('retries', 0)
self.raise_errors = kwargs.pop('raise_errors', True)
self.httpclient = client.construct_http_client(**kwargs)
@@ -515,6 +518,8 @@ class Client(ClientBase):
router_path = "/routers/%s"
floatingips_path = "/floatingips"
floatingip_path = "/floatingips/%s"
port_forwardings_path = "/floatingips/%s/port_forwardings"
port_forwarding_path = "/floatingips/%s/port_forwardings/%s"
security_groups_path = "/security-groups"
security_group_path = "/security-groups/%s"
security_group_rules_path = "/security-group-rules"
@@ -1019,6 +1024,32 @@ class Client(ClientBase):
"""Deletes the specified floatingip."""
return self.delete(self.floatingip_path % (floatingip))
def show_port_forwarding(self, floatingip, portforwarding):
"""Fetches information of a certain portforwarding"""
return self.get(self.port_forwarding_path % (floatingip,
portforwarding))
def list_port_forwardings(self, floatingip, retrieve_all=True, **_params):
"""Fetches a list of all portforwardings for a floatingip."""
return self.list('port_forwardings',
self.port_forwardings_path % floatingip, retrieve_all,
**_params)
def create_port_forwarding(self, floatingip, body=None):
"""Creates a new portforwarding."""
return self.post(self.port_forwardings_path % floatingip, body=body)
def delete_port_forwarding(self, floatingip, portforwarding):
"""Deletes the specified portforwarding."""
return self.delete(self.port_forwarding_path % (floatingip,
portforwarding))
def update_port_forwarding(self, floatingip, portforwarding, body=None):
"""Updates a portforwarding."""
return self.put(self.port_forwarding_path % (floatingip,
portforwarding),
body=body)
def create_security_group(self, body=None):
"""Creates a new security group."""
return self.post(self.security_groups_path, body=body)

View File

@@ -0,0 +1,4 @@
---
features:
- |
Add support to floating ip port forwarding.

View File

@@ -0,0 +1,5 @@
---
upgrade:
- |
Python 3.6 & 3.7 support has been dropped. The minimum version of Python now
supported is Python 3.8.

View File

@@ -0,0 +1,7 @@
---
prelude: >
Openstack community decided to use one SDK for its services, that is
in ``openstacksdk`` repository. To avoid duplication, sooner or later the
python binding code in ``python-neutronclient`` will be deprecated, and
``Neutron`` team decided on the ``2023.1 (Antelope)`` PTG to not allow
new features\' bindings implemented here.

View File

@@ -6,6 +6,8 @@
:maxdepth: 1
unreleased
zed
yoga
xena
wallaby
victoria

View File

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

View File

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

View File

@@ -1,3 +1,7 @@
# Requirements lower bounds listed here are our best effort to keep them up to
# date but we do not test them so no guarantee of having them all correct. If
# you find any incorrect lower bounds, let us know or propose a fix.
# 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.

View File

@@ -6,7 +6,7 @@ description_file =
author = OpenStack Networking Project
author_email = openstack-discuss@lists.openstack.org
home_page = https://docs.openstack.org/python-neutronclient/latest/
python_requires = >=3.6
python_requires = >=3.8
classifier =
Environment :: OpenStack
Intended Audience :: Developers
@@ -18,8 +18,6 @@ classifier =
Programming Language :: Python :: Implementation :: CPython
Programming Language :: Python :: 3 :: Only
Programming Language :: Python :: 3
Programming Language :: Python :: 3.6
Programming Language :: Python :: 3.7
Programming Language :: Python :: 3.8
Programming Language :: Python :: 3.9

11
tox.ini
View File

@@ -81,11 +81,8 @@ enable-extensions=H904
[testenv:bandit]
# B303: blacklist calls: md5, sha1
# B105: The software contains a hard-coded password, which it uses for its own
# inbound authentication or for outbound communication to external
# components.
deps = -r{toxinidir}/test-requirements.txt
commands = bandit -r neutronclient -x tests -n5 -s B303
[testenv:lower-constraints]
deps =
-c{toxinidir}/lower-constraints.txt
-r{toxinidir}/test-requirements.txt
-r{toxinidir}/requirements.txt
commands = bandit -r neutronclient -x tests -n5 -s B303,B105