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
A prog2-höz tartozó friss repo anyagok itt elérhetőek:
https://git.iit.bme.hu/
Commit
26a9a46f
authored
Apr 26, 2019
by
Adam Torok
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
main clean
parent
4d0a6629
Pipeline
#706
failed with stage
in 35 seconds
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
68 deletions
+0
-68
main.py
+0
-68
No files found.
main.py
View file @
26a9a46f
# This file is for testing the openstack api access
# This file is for testing the openstack api access
import
openstack
from
implementation.network.OpenstackNetworkManager
import
OpenstackNetworkManager
from
implementation.network.OpenstackPortManager
import
OpenstackPortManager
from
implementation.network.OpenstackRouterManager
import
OpenstackRouterManager
from
implementation.network.OpenstackSubnetManager
import
OpenstackSubnetManager
os
=
openstack
.
connect
(
cloud
=
'openstack'
)
network_manager
=
OpenstackNetworkManager
(
os
)
subnet_manager
=
OpenstackSubnetManager
(
os
)
router_manager
=
OpenstackRouterManager
(
os
)
port_manager
=
OpenstackPortManager
(
os
)
print
(
'*'
*
40
)
print
(
'Networks:'
)
for
network
in
network_manager
.
list
():
print
(
'
\t
'
,
network
)
print
(
'*'
*
40
)
print
(
'*'
*
40
)
print
(
'Subnets:'
)
for
subnet
in
subnet_manager
.
list
():
print
(
'
\t
'
,
subnet
)
print
(
'*'
*
40
)
print
(
'*'
*
40
)
print
(
'Routers:'
)
for
router
in
router_manager
.
list
():
print
(
'
\t
'
,
router
)
print
(
'*'
*
40
)
print
(
'*'
*
40
)
print
(
'Ports:'
)
for
port
in
port_manager
.
list
():
print
(
'
\t
'
,
port
)
print
(
'*'
*
40
)
os_network
=
network_manager
.
get
(
'86a53890-5821-4718-b1d7-accee304c497'
)
# network_manager.create()
print
(
'Network:'
)
print
(
os_network
)
os_subnet
=
subnet_manager
.
get
(
'4b68dd3f-cbc1-49d7-9b8d-bbb2fae6e687'
)
# subnet_manager.create(os_network.id, 4, '10.10.0.0/16')
print
(
'Subnet:'
)
print
(
os_subnet
)
os_port
=
port_manager
.
get
(
'74bae615-1189-4d9a-ae44-1a2a3f5eb98a'
)
# port_manager.create(os_network.id)
print
(
'Port:'
)
print
(
os_port
)
#print(subnet_manager.create('10.10.0.0/16'))
#for subnet in subnet_manager.list():
# print(subnet)
\ No newline at end of file
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