From 3913de1c43213113612d42f82fe9117825be2618 Mon Sep 17 00:00:00 2001 From: Charles Paul Date: Mon, 12 Oct 2015 08:35:21 -0500 Subject: [PATCH] reference instance_id in docs, fixes for calls to fail_json --- lib/ansible/modules/extras/cloud/vmware/vca_fw.py | 7 +++---- lib/ansible/modules/extras/cloud/vmware/vca_nat.py | 6 +++--- lib/ansible/modules/extras/cloud/vmware/vca_vapp.py | 9 ++------- 3 files changed, 8 insertions(+), 14 deletions(-) diff --git a/lib/ansible/modules/extras/cloud/vmware/vca_fw.py b/lib/ansible/modules/extras/cloud/vmware/vca_fw.py index 375b825755..2d5804f7a8 100644 --- a/lib/ansible/modules/extras/cloud/vmware/vca_fw.py +++ b/lib/ansible/modules/extras/cloud/vmware/vca_fw.py @@ -41,10 +41,9 @@ options: - The org to login to for creating vapp, mostly set when the service_type is vdc. required: false default: None - service_id: - version_added: "2.0" + instance_id: description: - - The service id in a vchs environment to be used for creating the vapp + - The instance id in a vchs environment to be used for creating the vapp required: false default: None host: @@ -250,7 +249,7 @@ def main(): try: desired_rules = validate_fw_rules(fw_rules) except VcaError, e: - module.fail_json(e.message) + module.fail_json(msg=e.message) result = dict(changed=False) result['current_rules'] = current_rules diff --git a/lib/ansible/modules/extras/cloud/vmware/vca_nat.py b/lib/ansible/modules/extras/cloud/vmware/vca_nat.py index a1af6883bc..88fc24a20f 100644 --- a/lib/ansible/modules/extras/cloud/vmware/vca_nat.py +++ b/lib/ansible/modules/extras/cloud/vmware/vca_nat.py @@ -42,9 +42,9 @@ options: - The org to login to for creating vapp, mostly set when the service_type is vdc. required: false default: None - service_id: + instance_id: description: - - The service id in a vchs environment to be used for creating the vapp + - The instance id in a vchs environment to be used for creating the vapp required: false default: None host: @@ -200,7 +200,7 @@ def main(): purge_rules = module.params['purge_rules'] if not purge_rules and not nat_rules: - module.fail_json('Must define purge_rules or nat_rules') + module.fail_json(msg='Must define purge_rules or nat_rules') vca = vca_login(module) diff --git a/lib/ansible/modules/extras/cloud/vmware/vca_vapp.py b/lib/ansible/modules/extras/cloud/vmware/vca_vapp.py index 15bf4d3147..87810c5fae 100644 --- a/lib/ansible/modules/extras/cloud/vmware/vca_vapp.py +++ b/lib/ansible/modules/extras/cloud/vmware/vca_vapp.py @@ -104,15 +104,10 @@ options: - The org to login to for creating vapp, mostly set when the service_type is vdc. required: false default: None - service_id: - description: - - The service id in a vchs environment to be used for creating the vapp - required: false - default: None instance_id: description: - - The vCloud Air instance ID - required: no + - The instance id in a vchs environment to be used for creating the vapp + required: false default: None host: description: