mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-09 03:57:41 +00:00
line formatting
This commit is contained in:
parent
a57a64781a
commit
0ab77ae8be
@ -2,6 +2,7 @@ import httplib
|
|||||||
import json
|
import json
|
||||||
import time
|
import time
|
||||||
|
|
||||||
|
|
||||||
class Registrator:
|
class Registrator:
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
@ -41,11 +42,10 @@ class Registrator:
|
|||||||
body = response.read()
|
body = response.read()
|
||||||
print(body)
|
print(body)
|
||||||
result = json.loads(body)
|
result = json.loads(body)
|
||||||
print("Response status:%s reason:%s body:%s" % (
|
print("Response status:%s reason:%s body:%s" % \
|
||||||
response.status, response.reason, result))
|
(response.status, response.reason, result))
|
||||||
return response, result
|
return response, result
|
||||||
|
|
||||||
|
|
||||||
def update(self):
|
def update(self):
|
||||||
''' Contact the API Server to update a registration '''
|
''' Contact the API Server to update a registration '''
|
||||||
# do a get on the API for the node
|
# do a get on the API for the node
|
||||||
@ -80,5 +80,3 @@ class Registrator:
|
|||||||
print("Registration error")
|
print("Registration error")
|
||||||
# TODO - get request data
|
# TODO - get request data
|
||||||
raise RuntimeError("Unable to register machine with")
|
raise RuntimeError("Unable to register machine with")
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user