Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
CIRCLE3
/
cloud
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
5
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
95bcd32a
authored
Jul 24, 2022
by
Karsa Zoltán István
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
create vm from template - cloud-init
parent
71162da5
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
1 deletions
+5
-1
circle/dashboard/templates/dashboard/template-edit.html
+4
-0
circle/vm/models/instance.py
+1
-1
No files found.
circle/dashboard/templates/dashboard/template-edit.html
View file @
95bcd32a
...
@@ -52,6 +52,10 @@
...
@@ -52,6 +52,10 @@
{{ form.description|as_crispy_field }}
{{ form.description|as_crispy_field }}
{{ form.system|as_crispy_field }}
{{ form.system|as_crispy_field }}
{{ form.has_agent|as_crispy_field }}
{{ form.has_agent|as_crispy_field }}
<hr/>
{{ form.cloud_init|as_crispy_field }}
{{ form.ci_meta_data|as_crispy_field }}
{{ form.ci_user_data|as_crispy_field }}
</fieldset>
</fieldset>
<fieldset>
<fieldset>
<legend>
{% trans "External resources" %}
</legend>
<legend>
{% trans "External resources" %}
</legend>
...
...
circle/vm/models/instance.py
View file @
95bcd32a
...
@@ -479,7 +479,7 @@ class Instance(AclBase, VirtualMachineDescModel, StatusModel, OperatedMixin,
...
@@ -479,7 +479,7 @@ class Instance(AclBase, VirtualMachineDescModel, StatusModel, OperatedMixin,
common_fields
=
[
'name'
,
'description'
,
'num_cores'
,
'ram_size'
,
common_fields
=
[
'name'
,
'description'
,
'num_cores'
,
'ram_size'
,
'max_ram_size'
,
'arch'
,
'priority'
,
'boot_menu'
,
'max_ram_size'
,
'arch'
,
'priority'
,
'boot_menu'
,
'raw_data'
,
'lease'
,
'access_method'
,
'system'
,
'raw_data'
,
'lease'
,
'access_method'
,
'system'
,
'has_agent'
]
'
cloud_init'
,
'ci_meta_data'
,
'ci_user_data'
,
'
has_agent'
]
params
=
dict
(
template
=
template
,
owner
=
owner
,
pw
=
pwgen
())
params
=
dict
(
template
=
template
,
owner
=
owner
,
pw
=
pwgen
())
params
.
update
([(
f
,
getattr
(
template
,
f
))
for
f
in
common_fields
])
params
.
update
([(
f
,
getattr
(
template
,
f
))
for
f
in
common_fields
])
params
.
update
(
kwargs
)
# override defaults w/ user supplied values
params
.
update
(
kwargs
)
# override defaults w/ user supplied values
...
...
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