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
6277a2eb
authored
Sep 21, 2023
by
Karsa Zoltán István
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
63351c3f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
5 deletions
+4
-5
circle/dashboard/serializers.py
+2
-3
circle/dashboard/views/vm.py
+2
-2
No files found.
circle/dashboard/serializers.py
View file @
6277a2eb
...
...
@@ -159,9 +159,8 @@ class CreateDiskSerializer(serializers.Serializer):
size
=
serializers
.
CharField
(
max_length
=
50
)
name
=
serializers
.
CharField
(
max_length
=
100
)
datastore
=
serializers
.
CharField
(
max_length
=
40
,
required
=
False
,
allow_blank
=
True
,
default
=
None
)
cache_size
=
serializers
.
IntegerField
(
required
=
False
,
allow_blank
=
True
,
default
=
1024
)
cluster_size
=
serializers
.
IntegerField
(
required
=
False
,
allow_blank
=
True
,
default
=
64
)
cache_size
=
serializers
.
IntegerField
(
initial
=
1024
)
cluster_size
=
serializers
.
IntegerField
(
initial
=
64
)
class
ResizeDiskSerializer
(
serializers
.
Serializer
):
size
=
serializers
.
CharField
(
max_length
=
50
)
...
...
circle/dashboard/views/vm.py
View file @
6277a2eb
...
...
@@ -138,10 +138,10 @@ class CreatePersistentDiskREST(APIView):
datastore
=
data
[
'datastore'
]
cache_size
=
1024
if
'cache_size'
in
data
:
cache_size
=
data
[
'cache_size'
]
cache_size
=
int
(
data
[
'cache_size'
])
cluster_size
=
64
if
'cluster_size'
in
data
:
cluster_size
=
data
[
'cluster_size'
]
cluster_size
=
int
(
data
[
'cluster_size'
])
disk
=
Disk
.
create
(
size
=
disk_size
,
name
=
disk_name
,
type
=
"qcow2-norm"
,
datastore
=
datastore
,
cache_size
=
cache_size
,
cluster_size
=
cluster_size
)
disk
.
full_clean
()
disk
.
dev_num
=
'f'
...
...
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