Closed Disco402 closed 5 months ago
@mattwit
Im not sure this has fixed it - Certain modules still fail with missing directory, only work around ive found so far is to put the contents of structure.json
into a variable in utils.py
and return it directly e.g.
structure = """{
"system": {
"hostname": ["system_hostname", "hostname"],
"banner": ["system_banner", "banner"],
"webui_session_timeout": ["system_webui_session_timeout", "timeout"],
"cli_session_timeout": ["system_cli_session_timeout", "timeout"],
"system_authorized_keys": ["system_authorized_keys"],
"ssh_port": ["system_ssh_port", "port"],
"timezone": ["system_timezone", "timezone"],
"time": ["time", "time"],
"admin_info": ["system_admin_info"]
}
}"""
def get_restapi_body_structure():
return json.loads(structure)
Hardcoded path to
structure.json
breaks running this on other machines. Probably a much better way to do this but seem to work locallyTo fix issue https://github.com/opengear/opengear.om/issues/3 and https://github.com/opengear/opengear.om/issues/9