Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Gelencsér Szabolcs
/
circlestack
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
269c4015
authored
Mar 19, 2018
by
Szabolcs Gelencser
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Set template image as shared by default. Do not show shared images in plain vm creation
parent
e155a219
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
3 additions
and
0 deletions
+3
-0
.idea/workspace.xml
+0
-0
circle/circle/db.sqlite3
+0
-0
circle/dashboard/forms.py
+2
-0
circle/vm/operations.py
+1
-0
No files found.
.idea/workspace.xml
View file @
269c4015
This diff is collapsed.
Click to expand it.
circle/circle/db.sqlite3
View file @
269c4015
No preview for this file type
circle/dashboard/forms.py
View file @
269c4015
...
@@ -130,6 +130,8 @@ class VmFromPlainImageForm(forms.Form):
...
@@ -130,6 +130,8 @@ class VmFromPlainImageForm(forms.Form):
super
(
VmFromPlainImageForm
,
self
)
.
__init__
(
*
args
,
**
kwargs
)
super
(
VmFromPlainImageForm
,
self
)
.
__init__
(
*
args
,
**
kwargs
)
images
=
openstack_api
.
glance
.
image_list_detailed
(
request
)[
0
]
#TODO: flatten?
images
=
openstack_api
.
glance
.
image_list_detailed
(
request
)[
0
]
#TODO: flatten?
images
=
[
i
for
i
in
images
if
i
.
_apiresource
[
"visibility"
]
in
[
"private"
,
"public"
]]
def
sizeof_fmt
(
num
,
suffix
=
'B'
):
def
sizeof_fmt
(
num
,
suffix
=
'B'
):
for
unit
in
[
''
,
'K'
,
'M'
,
'G'
,
'T'
]:
for
unit
in
[
''
,
'K'
,
'M'
,
'G'
,
'T'
]:
if
abs
(
num
)
<
1024.0
:
if
abs
(
num
)
<
1024.0
:
...
...
circle/vm/operations.py
View file @
269c4015
...
@@ -523,6 +523,7 @@ class SaveAsTemplateOperation(InstanceOperation):
...
@@ -523,6 +523,7 @@ class SaveAsTemplateOperation(InstanceOperation):
with_shutdown
=
True
,
clone
=
False
,
task
=
None
,
**
kwargs
):
with_shutdown
=
True
,
clone
=
False
,
task
=
None
,
**
kwargs
):
template_image_id
=
openstack_api
.
nova
.
snapshot_create
(
request
,
self
.
instance
.
id
,
name
)
template_image_id
=
openstack_api
.
nova
.
snapshot_create
(
request
,
self
.
instance
.
id
,
name
)
openstack_api
.
glance
.
image_update
(
request
,
template_image_id
,
visibility
=
"shared"
)
template
=
InstanceTemplate
(
template
=
InstanceTemplate
(
name
=
name
,
name
=
name
,
image_id
=
template_image_id
,
image_id
=
template_image_id
,
...
...
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