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
79588613
authored
Apr 09, 2019
by
adamtorok
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
upgrades
parent
14670c78
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
2 deletions
+13
-2
implementation/storage/OpenstackStorageManager.py
+13
-2
No files found.
implementation/storage/OpenstackStorageManager.py
View file @
79588613
...
...
@@ -15,14 +15,23 @@ class OpenstackStorageManager(StorageManager):
def
os_volume_to_rc_volume
(
os_volume
):
return
Volume
(
os_volume
.
id
,
os_volume
.
image_id
,
os_volume
.
size
,
os_volume
.
is_bootable
,
os_volume
.
status
,
os_volume
.
created_at
)
def
create
(
self
,
size
,
bootable
):
def
create
(
self
,
size
):
os_volume
=
self
.
openstack
.
block_storage
.
create_volume
(
size
=
size
)
return
self
.
os_volume_to_rc_volume
(
os_volume
)
def
create_from_image
(
self
,
id
,
size
,
bootable
):
os_volume
=
self
.
openstack
.
block_storage
.
create_volume
(
image_id
=
id
,
size
=
size
,
bootable
=
bootable
)
...
...
@@ -30,7 +39,9 @@ class OpenstackStorageManager(StorageManager):
return
self
.
os_volume_to_rc_volume
(
os_volume
)
def
create_from_snapshot
(
self
,
id
):
os_volume
=
self
.
openstack
.
block_storage
.
create_volume
(
snapshot_id
=
id
)
os_volume
=
self
.
openstack
.
block_storage
.
create_volume
(
snapshot_id
=
id
)
return
self
.
os_volume_to_rc_volume
(
os_volume
)
...
...
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