Skip to content

Add support to source options from yaml file #2

@wildengineer

Description

@wildengineer

As of right now the only way to pass in options to the cli is inline. This leads to long commands. The cli should add support provide the options via yaml file. The cli should also search in the home directory for .aztest/aztest.yaml by default and log to the user when it is using these default properties.

Example commands:

  1. Explicit yaml file injection. In this case the user provides yaml file path and a message.
aztest eventhub send -p eventhub.yaml --message "foo"

Its assumed eventhub.yaml file contains the following:

eventhub_namespace: SomeNamespace
eventhub_name: SomeEventHub
eventhub_sas_name: SomePolicyNameWithSenderAccess
eventhub_sas_key: SomePolicyKeyWithSenderAccess
  1. Explicit yaml file injection. In this case the user provides yaml file path
aztest servicebus queue receive -p queue.yaml

Its assumed queue.yaml file contains the following:

servicebus_namespace: SomeNamespace
servicebus_queue_name: SomeQueue
servicebus_sas_name: SomePolicyNameWithListenerAccess
servicebus_sas_key: SomePolicyKeyWithListenerAccess
  1. Implied file injection. In this case no file is provided but it is assumed a file exists in ~/.aztest/aztest.yaml
aztest blobstorage download --path /abc/123/foo.csv

It is assumed ~/.aztest/aztest.yaml contains

storage_account: SomeStorageAccountName
storage_sas_name: SomeSASName
storage_sas_key: SomeSASKey
storage_container: SomeContainer

Metadata

Metadata

Assignees

Labels

help wantedExtra attention is needed

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions