mirror of
https://github.com/hanzoai/bootnode.git
synced 2026-09-30 20:46:32 +00:00
Use Google Compute APIs to list/edit clusters
This commit is contained in:
@@ -20,6 +20,16 @@ def ssd_type(project, zone):
|
||||
return "projects/{0}/zones/{1}/diskTypes/pd-ssd".format(project, zone)
|
||||
|
||||
|
||||
class Cluster(object):
|
||||
def __init__(self, obj, api=None):
|
||||
self.api = api
|
||||
self.name = obj['name']
|
||||
self.id = obj['id']
|
||||
self.created_at = obj['creationTimestamp']
|
||||
self.link = obj['selfLink']
|
||||
self.status = obj['status']
|
||||
|
||||
|
||||
class NodePool(object):
|
||||
def __init__(self, obj, api=None):
|
||||
self.api = api
|
||||
|
||||
@@ -4,12 +4,6 @@ from kubernetes.stream import stream
|
||||
POD_NAMESPACE = 'default'
|
||||
|
||||
|
||||
class Cluster(object):
|
||||
def __init__(self, cluster, api=None):
|
||||
self.api = api
|
||||
self.cluster = cluster
|
||||
|
||||
|
||||
class Node(object):
|
||||
def __init__(self, node, api=None):
|
||||
self.api = api
|
||||
|
||||
Reference in New Issue
Block a user