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
A prog2-höz tartozó friss repo anyagok itt elérhetőek:
https://git.iit.bme.hu/
Commit
f2876140
authored
Dec 28, 2022
by
Karsa Zoltán István
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
hotplug bugfix
parent
46c893d2
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
13 additions
and
5 deletions
+13
-5
circle/dashboard/urls.py
+2
-2
circle/dashboard/views/vm.py
+1
-1
circle/vm/operations.py
+7
-0
circle/vm/tasks/vm_tasks.py
+3
-2
No files found.
circle/dashboard/urls.py
View file @
f2876140
...
...
@@ -102,8 +102,8 @@ urlpatterns = [
path
(
'acpi/interface/<int:pk>/'
,
GetInterfaceREST
.
as_view
()),
path
(
'acpi/ftusers/'
,
InstanceFTforUsersREST
.
as_view
()),
path
(
'acpi/ftusersid/'
,
InstanceFTforUsersIdREST
.
as_view
()),
path
(
'acpi/vm/<int:pk>/hotplugmem/'
,
Hotplug
VCPU
SetREST
.
as_view
()),
path
(
'acpi/vm/<int:pk>/hotplugvcpu/'
,
Hotplug
Mem
SetREST
.
as_view
()),
path
(
'acpi/vm/<int:pk>/hotplugmem/'
,
Hotplug
Mem
SetREST
.
as_view
()),
path
(
'acpi/vm/<int:pk>/hotplugvcpu/'
,
Hotplug
VCPU
SetREST
.
as_view
()),
path
(
'acpi/vm/<int:pk>/downloaddisk/'
,
DownloadDiskREST
.
as_view
()),
path
(
'acpi/vm/<int:vm_id>/port/<int:vlan_id>/'
,
SetupPortREST
.
as_view
()),
path
(
'acpi/vm/<int:vm_id>/rules/<int:vlan_id>/'
,
RulesREST
.
as_view
()),
...
...
circle/dashboard/views/vm.py
View file @
f2876140
...
...
@@ -196,7 +196,7 @@ class HotplugMemSetREST(APIView):
instance
=
Instance
.
objects
.
get
(
pk
=
pk
)
data
=
JSONParser
()
.
parse
(
request
)
ram_size
=
int
(
data
[
"ram_size"
])
instance
.
hotplug_mem
(
user
=
request
.
user
,
memory
=
ram_size
)
instance
.
hotplug_mem
(
user
=
request
.
user
,
memory
=
ram_size
*
1024
)
instance
.
ram_size
=
ram_size
instance
.
save
()
serializer
=
InstanceSerializer
(
instance
)
...
...
circle/vm/operations.py
View file @
f2876140
...
...
@@ -1466,6 +1466,10 @@ class HotPlugMem(RemoteInstanceOperation):
accept_states
=
(
'RUNNING'
,)
task
=
vm_tasks
.
hotplug_memset
def
_get_remote_args
(
self
,
**
kwargs
):
return
(
super
(
HotPlugMem
,
self
)
.
_get_remote_args
(
**
kwargs
)
+
[
kwargs
[
"memory"
]]
)
@register_operation
class
HotPlugVCPU
(
RemoteInstanceOperation
):
id
=
'hotplug_vcpu'
...
...
@@ -1476,6 +1480,9 @@ class HotPlugVCPU(RemoteInstanceOperation):
accept_states
=
(
'RUNNING'
,)
task
=
vm_tasks
.
hotplug_vcpuset
def
_get_remote_args
(
self
,
**
kwargs
):
return
(
super
(
HotPlugMem
,
self
)
.
_get_remote_args
(
**
kwargs
)
+
[
kwargs
[
"num_cores"
]]
)
@register_operation
class
RecoverOperation
(
InstanceOperation
):
...
...
circle/vm/tasks/vm_tasks.py
View file @
f2876140
...
...
@@ -188,9 +188,9 @@ def screenshot(params):
pass
@celery.task
(
name
=
'vmdriver.hotplug_memset'
)
def
hotplug_memset
(
name
,
memory
):
def
hotplug_memset
(
params
):
pass
@celery.task
(
name
=
'vmdriver.hotplug_vcpuset'
)
def
hotplug_vcpuset
(
name
,
vcpu
):
def
hotplug_vcpuset
(
params
):
pass
\ No newline at end of file
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