diff options
author | Bence Romsics <bence.romsics@gmail.com> | 2019-08-07 16:26:38 +0200 |
---|---|---|
committer | Slawek Kaplonski <skaplons@redhat.com> | 2019-09-13 09:07:19 +0000 |
commit | 1c634ed2c16195e5a2e67400902f01450df30d98 (patch) | |
tree | bf5b1f729e1a6e9c0a4d398bae25f32a02895609 | |
parent | 62f4868e6e240ebbb4d6e29b8c1e1d23a24fcc15 (diff) | |
download | python-neutronclient-1c634ed2c16195e5a2e67400902f01450df30d98.tar.gz |
Add router add/remove extra routes operations
Add methods to the client to call the two new member actions introduced by
new Neutron extension: extraroute-atomic.
Change-Id: Idb1fa073c2ff31f566b376cfa4f63cf27fecec86
Partial-Bug: #1826396 (rfe)
Related-Change: https://review.opendev.org/655680 (spec)
-rw-r--r-- | neutronclient/v2_0/client.py | 10 | ||||
-rw-r--r-- | releasenotes/notes/extraroute-atomic-b11919d8e33b0d92.yaml | 5 |
2 files changed, 15 insertions, 0 deletions
diff --git a/neutronclient/v2_0/client.py b/neutronclient/v2_0/client.py index ed8dbd4..c338c31 100644 --- a/neutronclient/v2_0/client.py +++ b/neutronclient/v2_0/client.py @@ -934,6 +934,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), diff --git a/releasenotes/notes/extraroute-atomic-b11919d8e33b0d92.yaml b/releasenotes/notes/extraroute-atomic-b11919d8e33b0d92.yaml new file mode 100644 index 0000000..fed4a1e --- /dev/null +++ b/releasenotes/notes/extraroute-atomic-b11919d8e33b0d92.yaml @@ -0,0 +1,5 @@ +--- +features: + - | + New client methods: ``add_extra_routes_to_router`` and + ``remove_extra_routes_from_router``. |