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)
This commit is contained in:
Bence Romsics 2019-08-07 16:26:38 +02:00 committed by Slawek Kaplonski
parent 62f4868e6e
commit 1c634ed2c1
2 changed files with 15 additions and 0 deletions

View File

@ -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),

View File

@ -0,0 +1,5 @@
---
features:
- |
New client methods: ``add_extra_routes_to_router`` and
``remove_extra_routes_from_router``.