mirror of
https://github.com/hanzoai/bootnode.git
synced 2026-09-30 20:46:32 +00:00
some minor updates
This commit is contained in:
@@ -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:
|
||||
|
||||
@@ -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']
|
||||
|
||||
Reference in New Issue
Block a user