Created
January 10, 2018 10:51
-
-
Save sergiomario/4d993b602deb624b338d7dd717441d19 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
API = { | |
'apply': BASE_URL+'/api/v1/system/apply', | |
'login': BASE_URL+'/api/v1/system/login', | |
'service_ssh': BASE_URL+'/api/v1/service/ssh', | |
} | |
def apply(): | |
response = requests.post(API['apply'], headers=headers, verify=False) | |
result = json.loads(response.content.decode('utf-8')) | |
if result['data']['sucess']: | |
return result['data']['config_hash'] | |
return False |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment