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
2f748712
authored
Apr 09, 2019
by
adamtorok
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
serializable image
parent
b83a3a79
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
0 deletions
+9
-0
interface/image/Image.py
+9
-0
No files found.
interface/image/Image.py
View file @
2f748712
import
json
class
Image
:
class
Image
:
def
__init__
(
self
,
id
,
name
,
format
)
->
None
:
def
__init__
(
self
,
id
,
name
,
format
)
->
None
:
super
()
.
__init__
()
super
()
.
__init__
()
...
@@ -5,3 +8,9 @@ class Image:
...
@@ -5,3 +8,9 @@ class Image:
self
.
id
=
id
self
.
id
=
id
self
.
name
=
name
self
.
name
=
name
self
.
format
=
format
self
.
format
=
format
def
__str__
(
self
)
->
str
:
return
self
.
toJSON
()
def
toJSON
(
self
):
return
json
.
dumps
(
self
.
__dict__
)
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