Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
ansible
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
OpenEdx
ansible
Commits
f9f0f5ce
Commit
f9f0f5ce
authored
Jun 12, 2013
by
Raul Melo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
HP-UX virtualization facts
parent
2475bc41
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
39 additions
and
0 deletions
+39
-0
library/system/setup
+39
-0
No files found.
library/system/setup
View file @
f9f0f5ce
...
...
@@ -1872,6 +1872,45 @@ class LinuxVirtual(Virtual):
self
.
facts
[
'virtualization_role'
]
=
'host'
return
class
HPUXVirtual
(
Virtual
):
"""
This is a HP-UX specific subclass of Virtual. It defines
- virtualization_type
- virtualization_role
"""
platform
=
'HP-UX'
def
__init__
(
self
):
Virtual
.
__init__
(
self
)
def
populate
(
self
):
self
.
get_virtual_facts
()
return
self
.
facts
def
get_virtual_facts
(
self
):
if
os
.
path
.
exists
(
'/usr/sbin/vecheck'
):
rc
,
out
,
err
=
module
.
run_command
(
"/usr/sbin/vecheck"
)
if
rc
==
0
:
self
.
facts
[
'virtualization_type'
]
=
'guest'
self
.
facts
[
'virtualization_role'
]
=
'HP vPar'
if
os
.
path
.
exists
(
'/opt/hpvm/bin/hpvminfo'
):
rc
,
out
,
err
=
module
.
run_command
(
"/opt/hpvm/bin/hpvminfo"
)
if
rc
==
0
and
re
.
match
(
'.*Running.*HPVM vPar.*'
,
out
):
self
.
facts
[
'virtualization_type'
]
=
'guest'
self
.
facts
[
'virtualization_role'
]
=
'HPVM vPar'
elif
rc
==
0
and
re
.
match
(
'.*Running.*HPVM guest.*'
,
out
):
self
.
facts
[
'virtualization_type'
]
=
'guest'
self
.
facts
[
'virtualization_role'
]
=
'HPVM IVM'
elif
rc
==
0
and
re
.
match
(
'.*Running.*HPVM host.*'
,
out
):
self
.
facts
[
'virtualization_type'
]
=
'host'
self
.
facts
[
'virtualization_role'
]
=
'HPVM'
if
os
.
path
.
exists
(
'/usr/sbin/parstatus'
):
rc
,
out
,
err
=
module
.
run_command
(
"/usr/sbin/parstatus"
)
if
rc
==
0
:
self
.
facts
[
'virtualization_type'
]
=
'guest'
self
.
facts
[
'virtualization_role'
]
=
'HP nPar'
class
SunOSVirtual
(
Virtual
):
"""
This is a SunOS-specific subclass of Virtual. It defines
...
...
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