Skip to content
Snippets Groups Projects
Commit b84415d0 authored by Neil Schark's avatar Neil Schark
Browse files

next try

parent 422734c8
Branches isis
No related tags found
No related merge requests found
...@@ -18,13 +18,13 @@ def get_config(url): ...@@ -18,13 +18,13 @@ def get_config(url):
return return
def write_config(file_content): def write_config(file_content):
with open('mnt/flash/startup-config', 'w') as file: with open('/mnt/flash/startup-config', 'w') as file:
file.write(file_content) file.write(file_content)
def main(): def main():
mac_address = get_mac() mac_address = get_mac()
parsed_mac = mac_address.replace(":", "") parsed_mac = mac_address.replace(":", "")
url_with_config = HTTP_SERVER_CONFIG_BASE_URL + parsed_mac + "startup-config" url_with_config = HTTP_SERVER_CONFIG_BASE_URL + parsed_mac + "/startup-config"
startup_config = get_config(url_with_config) startup_config = get_config(url_with_config)
write_config(startup_config) write_config(startup_config)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment