Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
RECIRCLE
/
interface-openstack
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
2
Merge Requests
4
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
7696614a
authored
May 13, 2019
by
edems
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
OpenstackRouterManager upgraded
parent
9bd6841c
Pipeline
#712
failed with stage
in 37 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
2 deletions
+12
-2
implementation/network/OpenstackRouterManager.py
+12
-2
No files found.
implementation/network/OpenstackRouterManager.py
View file @
7696614a
...
...
@@ -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
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment