Skip to content
This repository has been archived by the owner on Feb 3, 2021. It is now read-only.

Commit

Permalink
Fix typo load_aztk_screts -> load_aztk_secrets (#421)
Browse files Browse the repository at this point in the history
  • Loading branch information
emlyn authored and paselem committed Feb 27, 2018
1 parent c724d94 commit 6827181
Show file tree
Hide file tree
Showing 22 changed files with 23 additions and 23 deletions.
2 changes: 1 addition & 1 deletion cli/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
)
from aztk.models.plugins.internal import PluginReference

def load_aztk_screts() -> SecretsConfiguration:
def load_aztk_secrets() -> SecretsConfiguration:
"""
Loads aztk from .aztk/secrets.yaml files(local and global)
"""
Expand Down
2 changes: 1 addition & 1 deletion cli/spark/endpoints/cluster/cluster_add_user.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ def setup_parser(parser: argparse.ArgumentParser):


def execute(args: typing.NamedTuple):
spark_client = aztk.spark.Client(config.load_aztk_screts())
spark_client = aztk.spark.Client(config.load_aztk_secrets())

log.info('-------------------------------------------')
log.info('spark cluster id: {}'.format(args.cluster_id))
Expand Down
2 changes: 1 addition & 1 deletion cli/spark/endpoints/cluster/cluster_app_logs.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ def setup_parser(parser: argparse.ArgumentParser):


def execute(args: typing.NamedTuple):
spark_client = aztk.spark.Client(config.load_aztk_screts())
spark_client = aztk.spark.Client(config.load_aztk_secrets())

if args.tail:
utils.stream_logs(client=spark_client, cluster_id=args.cluster_id, application_name=args.app_name)
Expand Down
2 changes: 1 addition & 1 deletion cli/spark/endpoints/cluster/cluster_copy.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ def setup_parser(parser: argparse.ArgumentParser):


def execute(args: typing.NamedTuple):
spark_client = aztk.spark.Client(config.load_aztk_screts())
spark_client = aztk.spark.Client(config.load_aztk_secrets())

spark_client.cluster_copy(
cluster_id=args.cluster_id,
Expand Down
2 changes: 1 addition & 1 deletion cli/spark/endpoints/cluster/cluster_create.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def setup_parser(parser: argparse.ArgumentParser):


def execute(args: typing.NamedTuple):
spark_client = aztk.spark.Client(config.load_aztk_screts())
spark_client = aztk.spark.Client(config.load_aztk_secrets())
cluster_conf = ClusterConfiguration()
cluster_conf.spark_configuration = load_aztk_spark_config()

Expand Down
2 changes: 1 addition & 1 deletion cli/spark/endpoints/cluster/cluster_delete.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ def setup_parser(parser: argparse.ArgumentParser):


def execute(args: typing.NamedTuple):
spark_client = aztk.spark.Client(config.load_aztk_screts())
spark_client = aztk.spark.Client(config.load_aztk_secrets())
cluster_id = args.cluster_id

if not args.force:
Expand Down
2 changes: 1 addition & 1 deletion cli/spark/endpoints/cluster/cluster_get.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ def setup_parser(parser: argparse.ArgumentParser):


def execute(args: typing.NamedTuple):
spark_client = aztk.spark.Client(config.load_aztk_screts())
spark_client = aztk.spark.Client(config.load_aztk_secrets())
cluster_id = args.cluster_id
cluster = spark_client.get_cluster(cluster_id)
utils.print_cluster(spark_client, cluster)
Expand Down
2 changes: 1 addition & 1 deletion cli/spark/endpoints/cluster/cluster_list.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@ def setup_parser(_: argparse.ArgumentParser):


def execute(_: typing.NamedTuple):
spark_client = aztk.spark.Client(config.load_aztk_screts())
spark_client = aztk.spark.Client(config.load_aztk_secrets())
clusters = spark_client.list_clusters()
utils.print_clusters(clusters)
2 changes: 1 addition & 1 deletion cli/spark/endpoints/cluster/cluster_run.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@ def setup_parser(parser: argparse.ArgumentParser):
help='The command to run on your spark cluster')

def execute(args: typing.NamedTuple):
spark_client = aztk.spark.Client(config.load_aztk_screts())
spark_client = aztk.spark.Client(config.load_aztk_secrets())
result = spark_client.cluster_run(args.cluster_id, args.command)
#TODO: pretty print result
2 changes: 1 addition & 1 deletion cli/spark/endpoints/cluster/cluster_ssh.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ def setup_parser(parser: argparse.ArgumentParser):


def execute(args: typing.NamedTuple):
spark_client = aztk.spark.Client(config.load_aztk_screts())
spark_client = aztk.spark.Client(config.load_aztk_secrets())
cluster = spark_client.get_cluster(args.cluster_id)
cluster_config = utils.helpers.read_cluster_config(args.cluster_id, spark_client.blob_client)
ssh_conf = SshConfig()
Expand Down
2 changes: 1 addition & 1 deletion cli/spark/endpoints/cluster/cluster_submit.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ def setup_parser(parser: argparse.ArgumentParser):


def execute(args: typing.NamedTuple):
spark_client = aztk.spark.Client(config.load_aztk_screts())
spark_client = aztk.spark.Client(config.load_aztk_secrets())
jars = []
py_files = []
files = []
Expand Down
2 changes: 1 addition & 1 deletion cli/spark/endpoints/job/delete.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ def setup_parser(parser: argparse.ArgumentParser):


def execute(args: typing.NamedTuple):
spark_client = aztk.spark.Client(config.load_aztk_screts())
spark_client = aztk.spark.Client(config.load_aztk_secrets())
job_id = args.job_id

if not args.force:
Expand Down
2 changes: 1 addition & 1 deletion cli/spark/endpoints/job/get.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@ def setup_parser(parser: argparse.ArgumentParser):


def execute(args: typing.NamedTuple):
spark_client = aztk.spark.Client(config.load_aztk_screts())
spark_client = aztk.spark.Client(config.load_aztk_secrets())

utils.print_job(spark_client, spark_client.get_job(args.job_id))
2 changes: 1 addition & 1 deletion cli/spark/endpoints/job/get_app.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@ def setup_parser(parser: argparse.ArgumentParser):


def execute(args: typing.NamedTuple):
spark_client = aztk.spark.Client(config.load_aztk_screts())
spark_client = aztk.spark.Client(config.load_aztk_secrets())

utils.print_application(spark_client.get_application(args.job_id, args.app_name))
2 changes: 1 addition & 1 deletion cli/spark/endpoints/job/get_app_logs.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@ def setup_parser(parser: argparse.ArgumentParser):


def execute(args: typing.NamedTuple):
spark_client = aztk.spark.Client(config.load_aztk_screts())
spark_client = aztk.spark.Client(config.load_aztk_secrets())
app_logs = spark_client.get_job_application_log(args.job_id, args.app_name)
print(app_logs.log)
2 changes: 1 addition & 1 deletion cli/spark/endpoints/job/list.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@ def setup_parser(_: argparse.ArgumentParser):
pass

def execute(args: typing.NamedTuple):
spark_client = aztk.spark.Client(config.load_aztk_screts())
spark_client = aztk.spark.Client(config.load_aztk_secrets())

utils.print_jobs(spark_client.list_jobs())
2 changes: 1 addition & 1 deletion cli/spark/endpoints/job/list_apps.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@ def setup_parser(parser: argparse.ArgumentParser):


def execute(args: typing.NamedTuple):
spark_client = aztk.spark.Client(config.load_aztk_screts())
spark_client = aztk.spark.Client(config.load_aztk_secrets())
utils.print_applications(spark_client.list_applications(args.job_id))
2 changes: 1 addition & 1 deletion cli/spark/endpoints/job/stop.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@ def setup_parser(parser: argparse.ArgumentParser):


def execute(args: typing.NamedTuple):
spark_client = aztk.spark.Client(config.load_aztk_screts())
spark_client = aztk.spark.Client(config.load_aztk_secrets())
spark_client.stop_job(args.job_id)
print("Stopped Job {0}".format(args.job_id))
2 changes: 1 addition & 1 deletion cli/spark/endpoints/job/stop_app.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ def setup_parser(parser: argparse.ArgumentParser):


def execute(args: typing.NamedTuple):
spark_client = aztk.spark.Client(config.load_aztk_screts())
spark_client = aztk.spark.Client(config.load_aztk_secrets())

if spark_client.stop_job_app(args.job_id, args.app_name):
log.info("Stopped app {0}".format(args.app_name))
Expand Down
2 changes: 1 addition & 1 deletion cli/spark/endpoints/job/submit.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ def setup_parser(parser: argparse.ArgumentParser):


def execute(args: typing.NamedTuple):
spark_client = aztk.spark.Client(config.load_aztk_screts())
spark_client = aztk.spark.Client(config.load_aztk_secrets())
job_conf = JobConfig()

job_conf.merge(args.job_id, args.job_conf)
Expand Down
2 changes: 1 addition & 1 deletion tests/spark/integration_tests/sdk/cluster/test_cluster.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

# load secrets
# note: this assumes secrets are set up in .aztk/secrets
spark_client = aztk.spark.Client(config.load_aztk_screts())
spark_client = aztk.spark.Client(config.load_aztk_secrets())


# helper method
Expand Down
4 changes: 2 additions & 2 deletions tests/spark/integration_tests/sdk/job/test_job.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

# load secrets
# note: this assumes secrets are set up in .aztk/secrets
spark_client = aztk.spark.Client(config.load_aztk_screts())
spark_client = aztk.spark.Client(config.load_aztk_secrets())


def test_submit_job():
Expand Down Expand Up @@ -281,4 +281,4 @@ def test_delete_job():
try:
spark_client.delete_job(job_configuration.id)
except Exception:
pass
pass

0 comments on commit 6827181

Please sign in to comment.