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
ab3239ec
Commit
ab3239ec
authored
Sep 21, 2015
by
Peter Sprygada
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added methods for retrieving vapp and vm
parent
a1f6de87
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
0 deletions
+14
-0
lib/ansible/module_utils/vca.py
+14
-0
No files found.
lib/ansible/module_utils/vca.py
View file @
ab3239ec
...
...
@@ -90,6 +90,20 @@ class VcaAnsibleModule(AnsibleModule):
self
.
_vdc
=
_vdc
return
_vdc
def
get_vapp
(
self
,
vapp_name
):
vapp
=
self
.
vca
.
get_vapp
(
self
.
vdc
,
vapp_name
)
if
not
vapp
:
raise
VcaError
(
'vca instance has no vapp named
%
s'
%
vapp_name
)
return
vapp
def
get_vm
(
self
,
vapp_name
,
vm_name
):
vapp
=
self
.
get_vapp
(
vapp_name
)
vms
=
[
vm
for
vm
in
children
.
get_Vm
()
if
vm
.
name
==
vm_name
]
try
:
return
vms
[
0
]
except
IndexError
:
raise
VcaError
(
'vapp has no vm named
%
s'
%
vm_name
)
def
create_instance
(
self
):
service_type
=
self
.
params
.
get
(
'service_type'
,
DEFAULT_SERVICE_TYPE
)
host
=
self
.
params
.
get
(
'host'
,
LOGIN_HOST
.
get
(
'service_type'
))
...
...
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