Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 346063192e | |||
| 60e3638d7a | |||
|
|
7467c710f6 |
@@ -2,3 +2,4 @@
|
||||
host=review.opendev.org
|
||||
port=29418
|
||||
project=openstack/python-neutronclient.git
|
||||
defaultbranch=stable/zed
|
||||
|
||||
@@ -515,6 +515,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 +1021,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)
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
---
|
||||
features:
|
||||
- |
|
||||
Add support to floating ip port forwarding.
|
||||
6
tox.ini
6
tox.ini
@@ -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/master}
|
||||
deps = -c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/zed}
|
||||
-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/master}
|
||||
-c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/zed}
|
||||
-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/master}
|
||||
-c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/zed}
|
||||
-r{toxinidir}/doc/requirements.txt
|
||||
commands = sphinx-build -a -E -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
|
||||
|
||||
|
||||
Reference in New Issue
Block a user