Added note and refactor code #16
12
agent.py
12
agent.py
|
@ -161,6 +161,13 @@ class ServerData:
|
|||
logging.info("Post data created")
|
||||
return post_data
|
||||
|
||||
def create_note_data(self, server_id):
|
||||
note_data = {
|
||||
'service_id': server_id,
|
||||
'note': 'Bla bla bla'
|
||||
}
|
||||
return note_data
|
||||
|
||||
|
||||
class ServerManager:
|
||||
|
||||
def __init__(self, host, api_key):
|
||||
|
@ -249,10 +256,7 @@ def main():
|
|||
logging.info('Server does not exist, Creating...')
|
||||
logging.info(server_manager.create_server(post_data))
|
||||
|
||||
note_data = {
|
||||
'service_id': server_id,
|
||||
'note': 'Bla bla bla'
|
||||
}
|
||||
note_data = server_data.create_note_data(server_id)
|
||||
try:
|
||||
note = server_manager.get_note(server_id)
|
||||
except urllib.error.HTTPError:
|
||||
|
|
Loading…
Reference in New Issue
Block a user
We should also report "baseboard", and "system", if present. Traditional servers seem to report "system" and/or "chassis" whereas custom build machines report only "baseboard" (i.e. motherboard), as there is no way for the motherboard to find out what kind of chassis it is mounted into.
Please share a sample
sudo dmidecode -t1
output.Here's what I see on test2:
one:
two: