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
50372eec
Commit
50372eec
authored
Oct 12, 2015
by
Brian Coca
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #12455 from privateip/devel
added methods for retrieving vapp and vm
parents
eb60ce1b
ab3239ec
Show 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 @
50372eec
...
...
@@ -91,6 +91,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