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
d06a277b
Commit
d06a277b
authored
Feb 13, 2015
by
Monty Taylor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Port openstack module_utils changes to v2 branch
parent
4e4bdaad
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
35 additions
and
0 deletions
+35
-0
v2/ansible/module_utils/openstack.py
+35
-0
No files found.
v2/ansible/module_utils/openstack.py
View file @
d06a277b
...
...
@@ -30,6 +30,9 @@ import os
def
openstack_argument_spec
():
# DEPRECATED: This argument spec is only used for the deprecated old
# OpenStack modules. It turns out that modern OpenStack auth is WAY
# more complex than this.
# Consume standard OpenStack environment variables.
# This is mainly only useful for ad-hoc command line operation as
# in playbooks one would assume variables would be used appropriately
...
...
@@ -67,3 +70,35 @@ def openstack_find_nova_addresses(addresses, ext_tag, key_name=None):
ret
.
append
(
interface_spec
[
'addr'
])
return
ret
def
openstack_full_argument_spec
(
**
kwargs
):
spec
=
dict
(
cloud
=
dict
(
default
=
None
),
auth_plugin
=
dict
(
default
=
None
),
auth
=
dict
(
default
=
None
),
region_name
=
dict
(
default
=
None
),
availability_zone
=
dict
(
default
=
None
),
state
=
dict
(
default
=
'present'
,
choices
=
[
'absent'
,
'present'
]),
wait
=
dict
(
default
=
True
,
type
=
'bool'
),
timeout
=
dict
(
default
=
180
,
type
=
'int'
),
endpoint_type
=
dict
(
default
=
'publicURL'
,
choices
=
[
'publicURL'
,
'internalURL'
]
)
)
spec
.
update
(
kwargs
)
return
spec
def
openstack_module_kwargs
(
**
kwargs
):
ret
=
dict
(
required_one_of
=
[
[
'cloud'
,
'auth'
],
],
)
for
key
in
(
'mutually_exclusive'
,
'required_together'
,
'required_one_of'
):
if
key
in
kwargs
:
if
key
in
ret
:
ret
[
key
]
.
extend
(
kwargs
[
key
])
else
:
ret
[
key
]
=
kwargs
[
key
]
return
ret
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