Skip to content

Commit

Permalink
Add start/stop functions for OPDB & DH
Browse files Browse the repository at this point in the history
  • Loading branch information
Raddish18 committed Oct 19, 2021
1 parent 8d0e88c commit e609c7a
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/cdpy/datahub.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,3 +72,15 @@ def list_cluster_definitions(self):
def describe_cluster_definition(self, name):
return self.sdk.call(svc='datahub', func='describe_cluster_definition', ret_field='clusterDefinition', squelch=[
Squelch(value='NOT_FOUND')], clusterDefinitionName=name)

def start_cluster(self, name):
return self.sdk.call(
svc='datahub', func='start_cluster', squelch=[Squelch('NOT_FOUND')],
clusterName=name
)

def stop_cluster(self, name):
return self.sdk.call(
svc='datahub', func='stop_cluster', squelch=[Squelch('NOT_FOUND')],
clusterName=name
)
18 changes: 18 additions & 0 deletions src/cdpy/opdb.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,3 +49,21 @@ def create_database(self, name, env):
databaseName=name,
environmentName=env,
)

def start_database(self, name, env):
return self.sdk.call(
svc='opdb', func='start_database', squelch=[
Squelch('NOT_FOUND'),
],
databaseName=name,
environmentName=env,
)

def stop_database(self, name, env):
return self.sdk.call(
svc='opdb', func='stop_database', squelch=[
Squelch('NOT_FOUND'),
],
databaseName=name,
environmentName=env,
)

0 comments on commit e609c7a

Please sign in to comment.