Merge "Create nodepool.cloud inventory variable" into feature/zuulv3
diff --git a/tests/base.py b/tests/base.py
index 480db83..028a8b1 100755
--- a/tests/base.py
+++ b/tests/base.py
@@ -1659,6 +1659,7 @@
now = time.time()
path = '/nodepool/nodes/'
data = dict(type=node_type,
+ cloud='test-cloud',
provider='test-provider',
region='test-region',
az='test-az',
diff --git a/tests/fixtures/config/ansible/git/common-config/playbooks/check-vars.yaml b/tests/fixtures/config/ansible/git/common-config/playbooks/check-vars.yaml
index f3ad414..9bfeb0e 100644
--- a/tests/fixtures/config/ansible/git/common-config/playbooks/check-vars.yaml
+++ b/tests/fixtures/config/ansible/git/common-config/playbooks/check-vars.yaml
@@ -4,6 +4,7 @@
assert:
that:
- nodepool.az == 'test-az'
+ - nodepool.cloud == 'test-cloud'
- nodepool.region == 'test-region'
- nodepool.provider == 'test-provider'
diff --git a/zuul/executor/client.py b/zuul/executor/client.py
index e503f41..40ad860 100644
--- a/zuul/executor/client.py
+++ b/zuul/executor/client.py
@@ -223,6 +223,7 @@
for node in nodeset.getNodes():
nodes.append(dict(name=node.name, label=node.label,
az=node.az,
+ cloud=node.cloud,
host_keys=node.host_keys,
provider=node.provider,
region=node.region,
diff --git a/zuul/executor/server.py b/zuul/executor/server.py
index 499b4d8..45937ef 100644
--- a/zuul/executor/server.py
+++ b/zuul/executor/server.py
@@ -1156,6 +1156,7 @@
ansible_port=port,
nodepool=dict(
az=node.get('az'),
+ cloud=node.get('cloud'),
provider=node.get('provider'),
region=node.get('region')))