Commit 7696614a by edems

OpenstackRouterManager upgraded

parent 9bd6841c
Pipeline #712 failed with stage
in 37 seconds
......@@ -19,7 +19,9 @@ class OpenstackRouterManager(RouterManager):
os_router.id,
os_router.name,
os_router.status,
os_router.created_at
os_router.external_gateway_info,
os_router.created_at,
os_router.updated_at
)
def create(self) -> Router:
......@@ -45,10 +47,18 @@ class OpenstackRouterManager(RouterManager):
def add_interface(self, id, subnet_id):
try:
os_router = self.openstack.network.add_interface_to_router(id, subnet_id)
os_router = self.openstack.network.add_interface_to_router(id, subnet_id) # TODO: can't get the id of the router from dict
except ResourceNotFound:
return None
return self.os_router_to_rc_router(os_router)
def add_gateway(self, id, network_id):
#try:
os_router = self.openstack.network.add_gateway_to_router(id, external_gateway_info=network_id)
#except ResourceNotFound:
# return None
print(os_router)
return self.os_router_to_rc_router(os_router)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment