Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
snf-ganeti
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
itminedu
snf-ganeti
Commits
a424ce50
Commit
a424ce50
authored
16 years ago
by
Alexander Schreiber
Browse files
Options
Downloads
Patches
Plain Diff
Correctly filter out Domain-0 from domain list if requested.
Reviewed-by: ultrotter
parent
455a3445
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
lib/hypervisor.py
+7
-7
7 additions, 7 deletions
lib/hypervisor.py
with
7 additions
and
7 deletions
lib/hypervisor.py
+
7
−
7
View file @
a424ce50
...
@@ -170,12 +170,8 @@ class XenHypervisor(BaseHypervisor):
...
@@ -170,12 +170,8 @@ class XenHypervisor(BaseHypervisor):
raise
HypervisorError
(
"
xm list failed, retries exceeded (%s): %s
"
%
raise
HypervisorError
(
"
xm list failed, retries exceeded (%s): %s
"
%
(
result
.
fail_reason
,
result
.
stderr
))
(
result
.
fail_reason
,
result
.
stderr
))
# skip over the heading and the domain 0 line (optional)
# skip over the heading
if
include_node
:
lines
=
result
.
stdout
.
splitlines
()[
1
:]
to_skip
=
1
else
:
to_skip
=
2
lines
=
result
.
stdout
.
splitlines
()[
to_skip
:]
result
=
[]
result
=
[]
for
line
in
lines
:
for
line
in
lines
:
# The format of lines is:
# The format of lines is:
...
@@ -192,7 +188,11 @@ class XenHypervisor(BaseHypervisor):
...
@@ -192,7 +188,11 @@ class XenHypervisor(BaseHypervisor):
except
ValueError
,
err
:
except
ValueError
,
err
:
raise
HypervisorError
(
"
Can
'
t parse output of xm list,
"
raise
HypervisorError
(
"
Can
'
t parse output of xm list,
"
"
line: %s, error: %s
"
%
(
line
,
err
))
"
line: %s, error: %s
"
%
(
line
,
err
))
result
.
append
(
data
)
# skip the Domain-0 (optional)
if
include_node
or
data
[
0
]
!=
'
Domain-0
'
:
result
.
append
(
data
)
return
result
return
result
def
ListInstances
(
self
):
def
ListInstances
(
self
):
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment