Merge "node model: adapt to node_properties"

This commit is contained in:
Zuul 2024-11-26 10:43:52 +00:00 committed by Gerrit Code Review
commit 2787c442d7
4 changed files with 13 additions and 2 deletions

View File

@ -1461,6 +1461,14 @@ executor running the job is available:
A private IPv6 address of the node.
.. var:: node_properties
Arbitrary mapping of node properties, such as boolean flags representing
criteria that were taken into account when a node is allocated to Zuul by
Nodepool. Notable properties are `spot` for when a node is an AWS spot
instance or `fleet` when the node was created by Nodepool using the AWS
fleet API.
SSH Keys
--------

View File

@ -1304,7 +1304,8 @@ class FakeNodepool(object):
image_id=None,
host_keys=host_keys,
executor='fake-nodepool',
hold_expiration=None)
hold_expiration=None,
node_properties={"spot": False})
if self.resources:
data['resources'] = self.resources
if self.remote_ansible:

View File

@ -2149,7 +2149,8 @@ class AnsibleJob(object):
public_ipv4=node.public_ipv4,
private_ipv4=node.private_ipv4,
public_ipv6=node.public_ipv6,
private_ipv6=node.private_ipv6)))
private_ipv6=node.private_ipv6,
node_properties=node.node_properties)))
# Ansible >=2.8 introduced "auto" as an
# ansible_python_interpreter argument that looks up

View File

@ -1949,6 +1949,7 @@ class Node(ConfigObject):
self.attributes = {}
self.tenant_name = None
self.requestor = None
self.node_properties = {}
@property
def state(self):