Remove unnecessary required arg logic, and remove 'absent' as a valid choice since it isn't implemented

pull/18777/head
Matt Martz 10 years ago committed by Matt Clay
parent 5ae50eb8cf
commit 8b60fb7181

@ -55,10 +55,6 @@ except ImportError:
def cloud_identity(module, state, identity): def cloud_identity(module, state, identity):
for arg in (state, identity):
if not arg:
module.fail_json(msg='%s is required for rax_identity' % arg)
instance = dict( instance = dict(
authenticated=identity.authenticated, authenticated=identity.authenticated,
credentials=identity._creds_file credentials=identity._creds_file
@ -79,7 +75,7 @@ def main():
argument_spec = rax_argument_spec() argument_spec = rax_argument_spec()
argument_spec.update( argument_spec.update(
dict( dict(
state=dict(default='present', choices=['present', 'absent']) state=dict(default='present', choices=['present'])
) )
) )
@ -95,7 +91,7 @@ def main():
setup_rax_module(module, pyrax) setup_rax_module(module, pyrax)
if pyrax.identity is None: if not pyrax.identity:
module.fail_json(msg='Failed to instantiate client. This ' module.fail_json(msg='Failed to instantiate client. This '
'typically indicates an invalid region or an ' 'typically indicates an invalid region or an '
'incorrectly capitalized region name.') 'incorrectly capitalized region name.')
@ -106,5 +102,5 @@ def main():
from ansible.module_utils.basic import * from ansible.module_utils.basic import *
from ansible.module_utils.rax import * from ansible.module_utils.rax import *
### invoke the module # invoke the module
main() main()

Loading…
Cancel
Save