Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
RECIRCLE
/
portal
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
11
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
65249fb4
authored
Apr 16, 2020
by
Chif Gergő
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
'Serialize' flavor
parent
f34faabf
Pipeline
#1071
passed with stage
in 1 minute 30 seconds
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
1 deletions
+7
-1
recircle/instance/models.py
+7
-1
No files found.
recircle/instance/models.py
View file @
65249fb4
...
...
@@ -265,8 +265,14 @@ class Instance(BaseMachineDescriptor):
self
.
save
()
def
resize
(
self
,
flavor
):
flav
=
{
"name"
:
flavor
.
name
,
"ram"
:
flavor
.
ram
,
"vcpus"
:
flavor
.
vcpus
,
"disk"
:
flavor
.
initial_disk
}
try
:
interface
.
resize_vm
(
self
.
remote_id
,
flav
or
)
interface
.
resize_vm
(
self
.
remote_id
,
flav
)
self
.
flavor
=
flavor
self
.
save
()
except
Exception
as
e
:
...
...
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