From d16429b59ccf60713c7d71ac2f55a5dc25f5bc87 Mon Sep 17 00:00:00 2001 From: Rene Moser Date: Wed, 19 Aug 2015 21:25:19 +0200 Subject: [PATCH 1/3] cloudstack: rename returns for consistency --- lib/ansible/module_utils/cloudstack.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/ansible/module_utils/cloudstack.py b/lib/ansible/module_utils/cloudstack.py index b330cb57921..5bfd3d2db9f 100644 --- a/lib/ansible/module_utils/cloudstack.py +++ b/lib/ansible/module_utils/cloudstack.py @@ -56,8 +56,8 @@ class AnsibleCloudStack(object): 'project': 'project', 'account': 'account', 'domain': 'domain', - 'displaytext': 'displaytext', - 'displayname': 'displayname', + 'displaytext': 'display_text', + 'displayname': 'display_name', 'description': 'description', } From 8f3c181d90a07578fb18b02070d6991436cdf5cd Mon Sep 17 00:00:00 2001 From: Rene Moser Date: Wed, 19 Aug 2015 21:37:54 +0200 Subject: [PATCH 2/3] cloudstack: tests: use resource_prefix --- test/integration/cloudstack.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/test/integration/cloudstack.yml b/test/integration/cloudstack.yml index 0102689ed07..6951fd2856b 100644 --- a/test/integration/cloudstack.yml +++ b/test/integration/cloudstack.yml @@ -4,6 +4,8 @@ gather_facts: no tags: - cloudstack + vars: + cs_resource_prefix: "cs{{ resource_prefix | default('') }}" roles: - { role: test_cs_sshkeypair, tags: test_cs_sshkeypair } - { role: test_cs_affinitygroup, tags: test_cs_affinitygroup } From 9d3577a74a8462e680d910bff75fa500794a2a7f Mon Sep 17 00:00:00 2001 From: Rene Moser Date: Wed, 19 Aug 2015 21:39:58 +0200 Subject: [PATCH 3/3] cloudstack: fix tests unhashable type: 'dict' --- test/integration/roles/test_cs_affinitygroup/tasks/main.yml | 2 +- test/integration/roles/test_cs_instancegroup/tasks/main.yml | 2 +- test/integration/roles/test_cs_securitygroup/tasks/main.yml | 2 +- test/integration/roles/test_cs_sshkeypair/tasks/main.yml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/test/integration/roles/test_cs_affinitygroup/tasks/main.yml b/test/integration/roles/test_cs_affinitygroup/tasks/main.yml index 7ebab20bad3..b066bf49011 100644 --- a/test/integration/roles/test_cs_affinitygroup/tasks/main.yml +++ b/test/integration/roles/test_cs_affinitygroup/tasks/main.yml @@ -15,7 +15,7 @@ assert: that: - ag|failed - - ag.msg == "missing required arguments: name" + - "ag.msg == 'missing required arguments: name'" - name: test present affinity group cs_affinitygroup: name={{ cs_resource_prefix }}_ag diff --git a/test/integration/roles/test_cs_instancegroup/tasks/main.yml b/test/integration/roles/test_cs_instancegroup/tasks/main.yml index e3a726bf6f7..d0f3c2258cd 100644 --- a/test/integration/roles/test_cs_instancegroup/tasks/main.yml +++ b/test/integration/roles/test_cs_instancegroup/tasks/main.yml @@ -15,7 +15,7 @@ assert: that: - ig|failed - - ig.msg == "missing required arguments: name" + - "ig.msg == 'missing required arguments: name'" - name: test present instance group cs_instancegroup: name={{ cs_resource_prefix }}_ig diff --git a/test/integration/roles/test_cs_securitygroup/tasks/main.yml b/test/integration/roles/test_cs_securitygroup/tasks/main.yml index d22871739e5..de62ba150fd 100644 --- a/test/integration/roles/test_cs_securitygroup/tasks/main.yml +++ b/test/integration/roles/test_cs_securitygroup/tasks/main.yml @@ -15,7 +15,7 @@ assert: that: - sg|failed - - sg.msg == "missing required arguments: name" + - "sg.msg == 'missing required arguments: name'" - name: test present security group cs_securitygroup: name={{ cs_resource_prefix }}_sg diff --git a/test/integration/roles/test_cs_sshkeypair/tasks/main.yml b/test/integration/roles/test_cs_sshkeypair/tasks/main.yml index 35023b38aa1..2f10e0da923 100644 --- a/test/integration/roles/test_cs_sshkeypair/tasks/main.yml +++ b/test/integration/roles/test_cs_sshkeypair/tasks/main.yml @@ -10,7 +10,7 @@ assert: that: - sshkey|failed - - sshkey.msg == "missing required arguments: name" + - "sshkey.msg == 'missing required arguments: name'" - name: test ssh key creation cs_sshkeypair: name={{ cs_resource_prefix }}-sshkey