File tree 4 files changed +14
-3
lines changed
4 files changed +14
-3
lines changed Original file line number Diff line number Diff line change @@ -32,13 +32,19 @@ def __init__(self, client):
32
32
def _post_initial_agent_data (self ):
33
33
"""Post the initial agent data to the server once on agent startup"""
34
34
35
- location = self .client .config .get ("location" , "" )
36
35
self ._post_advertised_queues ()
37
36
self ._post_advertised_images ()
38
37
39
- queues = self .client .config .get ("job_queues" , [])
40
38
identifier = self .client .config .get ("identifier" )
41
- agent_data = {"queues" : queues , "location" : location }
39
+ location = self .client .config .get ("location" , "" )
40
+ provision_type = self .client .config .get ("provision_type" , "" )
41
+ queues = self .client .config .get ("job_queues" , [])
42
+
43
+ agent_data = {
44
+ "location" : location ,
45
+ "queues" : queues ,
46
+ "provision_type" : provision_type ,
47
+ }
42
48
if identifier :
43
49
agent_data ["identifier" ] = identifier
44
50
Original file line number Diff line number Diff line change @@ -25,6 +25,7 @@ def agent(self, requests_mock):
25
25
"server_address" : "127.0.0.1:8000" ,
26
26
"job_queues" : ["test" ],
27
27
"location" : "nowhere" ,
28
+ "provision_type" : "noprovision" ,
28
29
"execution_basedir" : self .tmpdir ,
29
30
"logging_basedir" : self .tmpdir ,
30
31
"results_basedir" : os .path .join (self .tmpdir , "results" ),
@@ -219,5 +220,6 @@ def test_post_agent_data(self, agent):
219
220
"identifier" : self .config ["identifier" ],
220
221
"queues" : self .config ["job_queues" ],
221
222
"location" : self .config ["location" ],
223
+ "provision_type" : self .config ["provision_type" ],
222
224
}
223
225
)
Original file line number Diff line number Diff line change @@ -27,6 +27,7 @@ class AgentIn(Schema):
27
27
state = fields .String (required = False )
28
28
queues = fields .List (fields .String (), required = False )
29
29
location = fields .String (required = False )
30
+ provision_type = fields .String (required = False )
30
31
job_id = fields .String (required = False )
31
32
log = fields .List (fields .String (), required = False )
32
33
@@ -37,6 +38,7 @@ class AgentOut(Schema):
37
38
state = fields .String (required = False )
38
39
queues = fields .List (fields .String (), required = False )
39
40
location = fields .String (required = False )
41
+ provision_type = fields .String (required = False )
40
42
job_id = fields .String (required = False )
41
43
42
44
Original file line number Diff line number Diff line change 6
6
Agent Name: {{ agent.name }}< br >
7
7
State: {{ agent.state }}< br >
8
8
Location: {{ agent.location }}< br >
9
+ Provision Type: {{ agent.provision_type }}< br >
9
10
Last Updated: {{ agent.updated_at.strftime('%Y-%m-%d %H:%M:%S') }}< br >
10
11
</ p >
11
12
< p >
You can’t perform that action at this time.
0 commit comments