|
|
@ -208,7 +208,7 @@ def main():
|
|
|
|
auth = module.params.pop('auth')
|
|
|
|
auth = module.params.pop('auth')
|
|
|
|
connection = create_connection(auth)
|
|
|
|
connection = create_connection(auth)
|
|
|
|
data_centers_service = connection.system_service().data_centers_service()
|
|
|
|
data_centers_service = connection.system_service().data_centers_service()
|
|
|
|
clusters_module = DatacentersModule(
|
|
|
|
data_centers_module = DatacentersModule(
|
|
|
|
connection=connection,
|
|
|
|
connection=connection,
|
|
|
|
module=module,
|
|
|
|
module=module,
|
|
|
|
service=data_centers_service,
|
|
|
|
service=data_centers_service,
|
|
|
@ -216,9 +216,9 @@ def main():
|
|
|
|
|
|
|
|
|
|
|
|
state = module.params['state']
|
|
|
|
state = module.params['state']
|
|
|
|
if state == 'present':
|
|
|
|
if state == 'present':
|
|
|
|
ret = clusters_module.create()
|
|
|
|
ret = data_centers_module.create()
|
|
|
|
elif state == 'absent':
|
|
|
|
elif state == 'absent':
|
|
|
|
ret = clusters_module.remove(force=module.params['force'])
|
|
|
|
ret = data_centers_module.remove(force=module.params['force'])
|
|
|
|
|
|
|
|
|
|
|
|
module.exit_json(**ret)
|
|
|
|
module.exit_json(**ret)
|
|
|
|
except Exception as e:
|
|
|
|
except Exception as e:
|
|
|
|