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
e71f3254
authored
Jul 12, 2019
by
Chif Gergő
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Replace connection in flavor creare
parent
42a18ce9
Pipeline
#775
failed with stages
in 17 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
14 deletions
+2
-14
.gitignore
+1
-11
recircle/instance/models.py
+1
-3
No files found.
.gitignore
View file @
e71f3254
...
...
@@ -65,7 +65,6 @@ local_settings.py
db.sqlite3
# Flask stuff:
instance/
.webassets-cache
# Scrapy stuff:
...
...
@@ -97,16 +96,7 @@ ipython_config.py
# celery beat schedule file
celerybeat-schedule
# SageMath parsed files ✘ cgergo@cgergo ~/mount/virtual/interface_openstack vm ● git status
On branch vm
Changes not staged for commit:
(use "git add/rm <file>..." to update what will be committed)
(use "git checkout -- <file>..." to discard changes in working directory)
modified: .gitignore
deleted: implementation/instance.py
deleted: implementation/instance.pyc
# SageMath parsed files
*.sage.py
# Environments
...
...
recircle/instance/models.py
View file @
e71f3254
...
...
@@ -7,7 +7,6 @@ from image.models import Disk
from
interface_openstack.implementation.vm.instance
import
(
OSVirtualMachineManager
)
import
openstack
ACCESS_METHODS
=
tuple
(
...
...
@@ -43,8 +42,7 @@ class Flavor(models.Model):
@classmethod
def
create
(
cls
,
name
,
description
,
ram
=
0
,
vcpu
=
0
,
initial_disk
=
0
,
priority
=
0
):
conn
=
openstack
.
connect
(
cloud
=
"openstack"
)
interface
=
OSVirtualMachineManager
(
conn
)
interface
=
OSVirtualMachineManager
(
settings
.
CONNECTION
)
remote_flavor
=
interface
.
create_flavor
(
name
,
ram
,
vcpu
,
initial_disk
)
flavor
=
cls
(
name
=
name
,
description
=
description
,
remote_id
=
remote_flavor
.
id
,
ram
=
ram
,
vcpu
=
vcpu
,
...
...
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