forked from Sysdeploy/idlers-agent
Implemented key categorization to distinguish between keys set only during server creation and those that can be updated
This commit is contained in:
parent
0072a07754
commit
bbb59e8519
2
agent.py
2
agent.py
|
@ -110,7 +110,7 @@ class ServerManager:
|
|||
|
||||
def update_server(self, post_data, server_id):
|
||||
# remove following keys from post_data
|
||||
for key in ['ssh_port', 'ip1', 'currency', 'price', 'payment_term', 'next_due_date']:
|
||||
for key in ['ssh_port', 'provider_id', 'location_id', 'currency', 'price', 'payment_term', 'next_due_date']:
|
||||
post_data.pop(key, None)
|
||||
logging.info(f"Updating server with id {server_id}...")
|
||||
return self.send_request('PUT', '/api/servers/' + str(server_id), post_data)
|
||||
|
|
Loading…
Reference in New Issue
Block a user