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
444c3a93
authored
5 years ago
by
adamtorok
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
new fields added to Snapshot
parent
ced1af14
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
1 deletions
+19
-1
interface/storage/Snapshot.py
+19
-1
No files found.
interface/storage/Snapshot.py
View file @
444c3a93
import
json
class
Snapshot
:
class
Snapshot
:
def
__init__
(
self
,
id
,
size
)
->
None
:
def
__init__
(
self
,
id
,
volume_id
,
size
,
status
,
created_at
)
->
None
:
super
()
.
__init__
()
super
()
.
__init__
()
self
.
id
=
id
self
.
id
=
id
self
.
volume_id
=
volume_id
self
.
size
=
size
self
.
size
=
size
self
.
status
=
status
self
.
created_at
=
created_at
def
__str__
(
self
)
->
str
:
return
self
.
toJSON
()
def
toJSON
(
self
):
return
json
.
dumps
(
self
.
__dict__
)
This diff is collapsed.
Click to expand it.
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