项目作者: wildengineer

项目描述 :
Command line interface to test azure resources, such as servicebus, eventhub, blob storage, queue storage, and table storage
高级语言: Python
项目地址: git://github.com/wildengineer/azure-test-cli.git
创建时间: 2018-12-01T16:40:52Z
项目社区:https://github.com/wildengineer/azure-test-cli

开源协议:MIT License

下载


azure-test-cli

Command line interface to test azure resources, such as servicebus,
eventhub, blob storate, queue storage, and table storage.

Install

pip install

  1. pip install azure-test-cli

Manually

  1. git clone https://github.com/wildengineer/azure-test-cli.git
  2. cd azure-test-cli
  3. install_cli.sh

Use install_cli.sh -o if you want to override an existing install of the cli.

Usage

Azure Storage

Provides many tests for testing storage resources

  1. Usage: aztest storage [OPTIONS] COMMAND [ARGS]...
  2. Perform blobstorage tests
  3. Options:
  4. --help Show this message and exit.
  5. Commands:
  6. appendblob Perform append blob tests
  7. blockblob Perform block blob tests

BlockBlob Subcommands

  1. Usage: aztest storage blockblob [OPTIONS] COMMAND [ARGS]...
  2. Perform block blob tests
  3. Options:
  4. --help Show this message and exit.
  5. Commands:
  6. download Download content to a block blob
  7. upload Upload file to a block blob
Upload
  1. Usage: aztest storage blockblob upload [OPTIONS]
  2. Upload file to a block blob
  3. Options:
  4. -a, --storage_account TEXT Name of blob account [required]
  5. -k, --storage_key TEXT Storage access key [required]
  6. -c, --container TEXT Blob container name [required]
  7. -b, --path TEXT Blob path of uploaded file [required]
  8. -f, --file TEXT Content to upload to path [required]
  9. --help Show this message and exit.
Download
  1. Usage: aztest storage blockblob download [OPTIONS]
  2. Download content to a block blob
  3. Options:
  4. -a, --storage_account TEXT Name of blob account [required]
  5. -k, --storage_key TEXT Storage access key [required]
  6. -c, --container TEXT Blob container name [required]
  7. -b, --path TEXT Blob path of uploaded file [required]
  8. -f, --file TEXT Content to upload to path [required]
  9. --help Show this message and exit.

AppendBlob Subcommands

  1. Usage: aztest storage appendblob [OPTIONS] COMMAND [ARGS]...
  2. Perform append blob tests
  3. Options:
  4. --help Show this message and exit.
  5. Commands:
  6. append Upload content to an append blob
  7. delete Delete an append blob
  8. download Download append blob to local file
  9. stream Stream append blob to output
Append

Append a file to an append blob. If the append blob doesn’t exist,
then it’s created.

  1. Usage: aztest storage appendblob append [OPTIONS]
  2. Upload content to an append blob
  3. Options:
  4. -a, --storage_account TEXT Name of blob account [required]
  5. -k, --storage_key TEXT Name of SAS policy with write access [required]
  6. -c, --container TEXT Blob container name [required]
  7. -b, --blob_path TEXT Blob path of uploaded file [required]
  8. -f, --file_path TEXT Content to upload to path [required]
  9. -r, --repeat INTEGER Count of times to repeat the append the content
  10. --help Show this message and exit.
Stream

Stream a blob to stdout. After a timeout the operation will exit. Allows for viewing live
appends.

  1. Usage: aztest storage appendblob stream [OPTIONS]
  2. Stream append blob to output
  3. Options:
  4. -a, --storage_account TEXT Name of blob account [required]
  5. -k, --storage_key TEXT Name of SAS policy with write access [required]
  6. -c, --container TEXT Blob container name [required]
  7. -b, --blob_path TEXT Blob path of uploaded file [required]
  8. --help Show this message and exit.
Download

Download a file from an append blob.

  1. Usage: aztest storage appendblob download [OPTIONS]
  2. Download append blob to local file
  3. Options:
  4. -a, --storage_account TEXT Name of blob account [required]
  5. -k, --storage_key TEXT Name of SAS policy with write access [required]
  6. -c, --container TEXT Blob container name [required]
  7. -b, --blob_path TEXT Blob path of uploaded file [required]
  8. -f, --file_path TEXT Content to upload to path [required]
  9. --help Show this message and exit.
Delete

Delete an append blob.

  1. Usage: aztest storage appendblob delete [OPTIONS]
  2. Delete an append blob
  3. Options:
  4. -a, --storage_account TEXT Name of blob account [required]
  5. -k, --storage_key TEXT Name of access key [required]
  6. -c, --container TEXT Blob container name [required]
  7. -b, --blob_path TEXT Blob path of file [required]
  8. --help Show this message and exit.

Eventhub

Provides several tests for azure eventhub.

  1. Usage: aztest eventhub [OPTIONS] COMMAND [ARGS]...
  2. Perform eventhub tests
  3. Options:
  4. --help Show this message and exit.
  5. Commands:
  6. receive Receive messages from eventhub
  7. send Send messages to eventhub

Send

  1. Usage: aztest eventhub send [OPTIONS]
  2. Send messages to eventhub
  3. Options:
  4. -s, --eventhub_namespace TEXT Name of event hub namespace [required]
  5. -n, --eventhub_name TEXT Name of eventhub [required]
  6. -p, --eventhub_sas_name TEXT Name of eventhub SAS policy with send rights
  7. [required]
  8. -k, --eventhub_sas_key TEXT Key value of eventhub SAS policy with send
  9. rights [required]
  10. -m, --message TEXT Message to send. Must be in quotes
  11. [required]
  12. -r, --repeat INTEGER Count of times to repeat the send of the
  13. message
  14. --help Show this message and exit.

Receive

  1. Usage: aztest eventhub receive [OPTIONS]
  2. Receive messages from eventhub
  3. Options:
  4. -s, --eventhub_namespace TEXT Name of event hub namespace [required]
  5. -n, --eventhub_name TEXT Name of eventhub [required]
  6. -p, --eventhub_sas_name TEXT Name of eventhub SAS policy with listen
  7. rights [required]
  8. -k, --eventhub_sas_key TEXT Key value of eventhub SAS policy with listen
  9. rights [required]
  10. -c, --consumer_group TEXT Name of event hub consumer group [required]
  11. --help Show this message and exit.

Service Bus

Provides several tests for azure service bus.

  1. Usage: aztest servicebus [OPTIONS] COMMAND [ARGS]...
  2. Perform servicebus tests
  3. Options:
  4. --help Show this message and exit.
  5. Commands:
  6. queue Perform servicebus queue tests
  7. topic Perform servicebus topic tests

Queue Subcommands

  1. Usage: aztest servicebus queue [OPTIONS] COMMAND [ARGS]...
  2. Perform servicebus queue tests
  3. Options:
  4. --help Show this message and exit.
  5. Commands:
  6. receive Receive messages onto servicebus queue
  7. send Send messages onto servicebus queue
Send
  1. Usage: aztest servicebus queue send [OPTIONS]
  2. Send messages onto servicebus queue
  3. Options:
  4. -s, --servicebus_namespace TEXT
  5. Name of servicebus namespace [required]
  6. -n, --servicebus_queue_name TEXT
  7. Name of queue [required]
  8. -p, --servicebus_sas_name TEXT Name of servicebus SAS policy with send
  9. access [required]
  10. -k, --servicebus_sas_key TEXT Key value of servicebus SAS policy with send
  11. access [required]
  12. -m, --message TEXT Message to send. Must be in quotes
  13. [required]
  14. -r, --repeat INTEGER Count of times to repeat the send of the
  15. message
  16. --help Show this message and exit.
Receive
  1. Usage: aztest servicebus queue receive [OPTIONS]
  2. Receive messages onto servicebus queue
  3. Options:
  4. -s, --servicebus_namespace TEXT
  5. Name of servicebus namespace [required]
  6. -n, --servicebus_queue_name TEXT
  7. Name of queue [required]
  8. -p, --servicebus_sas_name TEXT Name of servicebus SAS policy with listen
  9. access [required]
  10. -k, --servicebus_sas_key TEXT Key value of servicebus SAS policy with
  11. listen access [required]
  12. --help Show this message and exit.