Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
CIRCLE3
/
vmdriver
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
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
494675f9
authored
2 years ago
by
Karsa Zoltán István
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
set 0 to def max
parent
2679abf4
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
1 deletions
+2
-1
vm.py
+2
-1
No files found.
vm.py
View file @
494675f9
...
...
@@ -103,8 +103,8 @@ class VMInstance:
xml_top
.
append
(
child
)
# Basic virtual machine paramaters
ET
.
SubElement
(
xml_top
,
'name'
)
.
text
=
self
.
name
if
self
.
vcpu
<
self
.
vcpu_max
and
self
.
vcpu_max
!=
0
:
ET
.
SubElement
(
xml_top
,
'vcpu'
,
attrib
=
{
'current'
:
str
(
self
.
vcpu
)})
.
text
=
str
(
self
.
vcpu_max
)
if
self
.
vcpu
<
self
.
vcpu_max
:
vcpus
=
ET
.
SubElement
(
xml_top
,
'vcpus'
)
for
i
in
range
(
0
,
self
.
vcpu
):
ET
.
SubElement
(
vcpus
,
'vcpu'
,
...
...
@@ -119,6 +119,7 @@ class VMInstance:
'enabled'
:
'no'
,
'hotpluggable'
:
'yes'
})
else
:
ET
.
SubElement
(
xml_top
,
'vcpu'
)
.
text
=
str
(
self
.
vcpu
)
cpu
=
ET
.
SubElement
(
xml_top
,
'cpu'
)
ET
.
SubElement
(
cpu
,
'topology'
,
attrib
=
{
...
...
This diff is collapsed.
Click to expand it.
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