diff --git a/agent/testflinger_agent/agent.py b/agent/testflinger_agent/agent.py
index d10713d0..03656ce1 100644
--- a/agent/testflinger_agent/agent.py
+++ b/agent/testflinger_agent/agent.py
@@ -32,13 +32,19 @@ def __init__(self, client):
def _post_initial_agent_data(self):
"""Post the initial agent data to the server once on agent startup"""
- location = self.client.config.get("location", "")
self._post_advertised_queues()
self._post_advertised_images()
- queues = self.client.config.get("job_queues", [])
identifier = self.client.config.get("identifier")
- agent_data = {"queues": queues, "location": location}
+ location = self.client.config.get("location", "")
+ provision_type = self.client.config.get("provision_type", "")
+ queues = self.client.config.get("job_queues", [])
+
+ agent_data = {
+ "location": location,
+ "queues": queues,
+ "provision_type": provision_type,
+ }
if identifier:
agent_data["identifier"] = identifier
diff --git a/agent/testflinger_agent/tests/test_agent.py b/agent/testflinger_agent/tests/test_agent.py
index 56a59bbc..a046b80c 100644
--- a/agent/testflinger_agent/tests/test_agent.py
+++ b/agent/testflinger_agent/tests/test_agent.py
@@ -25,6 +25,7 @@ def agent(self, requests_mock):
"server_address": "127.0.0.1:8000",
"job_queues": ["test"],
"location": "nowhere",
+ "provision_type": "noprovision",
"execution_basedir": self.tmpdir,
"logging_basedir": self.tmpdir,
"results_basedir": os.path.join(self.tmpdir, "results"),
@@ -219,5 +220,6 @@ def test_post_agent_data(self, agent):
"identifier": self.config["identifier"],
"queues": self.config["job_queues"],
"location": self.config["location"],
+ "provision_type": self.config["provision_type"],
}
)
diff --git a/server/src/api/schemas.py b/server/src/api/schemas.py
index fed68f39..ba3e9a60 100644
--- a/server/src/api/schemas.py
+++ b/server/src/api/schemas.py
@@ -27,6 +27,7 @@ class AgentIn(Schema):
state = fields.String(required=False)
queues = fields.List(fields.String(), required=False)
location = fields.String(required=False)
+ provision_type = fields.String(required=False)
job_id = fields.String(required=False)
log = fields.List(fields.String(), required=False)
@@ -37,6 +38,7 @@ class AgentOut(Schema):
state = fields.String(required=False)
queues = fields.List(fields.String(), required=False)
location = fields.String(required=False)
+ provision_type = fields.String(required=False)
job_id = fields.String(required=False)
diff --git a/server/src/templates/agent_detail.html b/server/src/templates/agent_detail.html
index 60ac80b4..bd6cd816 100644
--- a/server/src/templates/agent_detail.html
+++ b/server/src/templates/agent_detail.html
@@ -6,6 +6,7 @@
Agent Name: {{ agent.name }}
State: {{ agent.state }}
Location: {{ agent.location }}
+ Provision Type: {{ agent.provision_type }}
Last Updated: {{ agent.updated_at.strftime('%Y-%m-%d %H:%M:%S') }}