def get(self, args): username = args['username'] if str(username).__contains__('missing'): return json_response(username, 400) password = args['password'] if str(password).__contains__('missing'): return json_response(password, 400) if username == 'gateway-user' and password == 'admin': return json_response( "Session Token-> BAMAuthToken: r0JiHMTU0NTkyNjAxOTM3MDpucXVvY3RoYWk= <- for User : gateway-user") else: return json_response('Invalid username or password.', 401)
def post(self, args): return json_response('')
def post(self, args): return json_response("{:0>6d}".format(random.randint(1, 9999999), 6))
def delete(self, args): return json_response('')
def post(self, args): name = args['name'] if str(name).__contains__('wrong'): return json_response('option is wrong', 400) return json_response("{:0>6d}".format(random.randint(1, 9999999), 6))
def get(self): return json_response(system_info)
def get(self): return json_response(read_file(bluecat_api_list))