some minor updates

This commit is contained in:
David Tai
2018-12-01 18:05:06 -06:00
parent 333971a421
commit 42da6dcad7
2 changed files with 12 additions and 0 deletions
+6
View File
@@ -232,6 +232,9 @@ class Gcloud(object):
def list_snapshots(self, network=None):
"""
List all snapshots for a given network.
:param network: The name of the network
:return: Returns the list of snapshots, parsed into objects
"""
snaps = [Snapshot(s, self) for s in
self.gce_api.snapshots().list(project=self.project).execute()['items']]
@@ -245,6 +248,9 @@ class Gcloud(object):
"""
Create a snapshot of a given disk. Optionally label with Pod disk is
associated.
:param network: The name of the network
:return: Returns the list of snapshots, parsed into objects
"""
if not project:
+6
View File
@@ -163,6 +163,7 @@ class Blockchain(Pod):
def is_blockchain(cls, chain):
return
class Ethereum(Blockchain):
def __init__(self, name, network='mainnet',
image='gcr.io/hanzo-ai/geth:latest', command='/bin/geth',
@@ -269,8 +270,13 @@ class Ethereum(Blockchain):
def is_blockchain(cls, chain):
return chain in ['ethereum', 'eth', 'geth']
class Bitcoin(Blockchain):
def __init__(self, name, network, image, command, args, path,
resources=None, limits=None):
super(Bitcoin, self).__init__(name, 'bitcoin', network, image, command,
args, path, resources, limits)
@classmethod
def is_blockchain(cls, chain):
return chain in ['bitcoin']