Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix examples and documentation to correctly escape or quote shell cha… #5066

Merged
merged 5 commits into from
Jan 11, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -506,7 +506,7 @@
examples:
- name: List default host name and state for all web apps.
text: >
az webapp list --query "[].{ hostName: defaultHostName, state: state }"
az webapp list --query "[].{hostName: defaultHostName, state: state}"
- name: List all running web apps.
text: >
az webapp list --query "[?state=='Running']"
Expand Down Expand Up @@ -558,7 +558,7 @@
examples:
- name: List default host name and state for all function apps.
text: >
az functionapp list --query "[].{ hostName: defaultHostName, state: state }"
az functionapp list --query "[].{hostName: defaultHostName, state: state}"
- name: List all running function apps.
text: >
az functionapp list --query "[?state=='Running']"
Expand Down
4 changes: 4 additions & 0 deletions src/command_modules/azure-cli-dla/HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
Release History
===============

0.0.17
++++++
* Update helpfile

0.0.16
++++++
* Update for CLI core changes.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
short-summary: Name for the submitted job.
- name: --script
type: string
short-summary: Script to submit. This may be an @{file} to load from a file.
short-summary: Script to submit. This may be '@{file}' to load from a file.
- name: --runtime-version
short-summary: The runtime version to use.
long-summary: This parameter is used for explicitly overwriting the default runtime. It should only be done if you know what you are doing.
Expand Down
2 changes: 1 addition & 1 deletion src/command_modules/azure-cli-dla/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
cmdclass = {}


VERSION = "0.0.16"
VERSION = "0.0.17"
# The full list of classifiers is available at
# https://pypi.python.org/pypi?%3Aaction=list_classifiers
CLASSIFIERS = [
Expand Down
4 changes: 4 additions & 0 deletions src/command_modules/azure-cli-lab/HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
Release History
===============

0.0.15
++++++
* Update helpfile

0.0.14
++++++
* Update for CLI core changes.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,10 @@
short-summary: 'Type of IP configuration to use for the VM. Allowed values are: shared, public, private.'
long-summary: If omitted, will be selected based on the VM's vnet.
- name: --artifacts
short-summary: JSON encoded array of artifacts to be applied. Use @{file} to load from a file.
short-summary: JSON encoded array of artifacts to be applied. Use '@{file}' to load from a file.
- name: --tags
short-summary: Space separated tags in `key[=value]` format.
long-summary: Tags may be cleared by assigning the empty value `""` to them.
long-summary: Tags may be cleared by assigning the empty value "" to them.
- name: --allow-claim
short-summary: Flag indicating if the VM should be created as claimable.
- name: --disk-type
Expand All @@ -70,25 +70,25 @@
examples:
- name: Create a VM in the lab from a gallery image.
text: >
az lab vm create --lab-name MyLab -g MyRG --name MyVM --image "Ubuntu Server 16.04 LTS" --image-type gallery --size Standard_DS1_v2
az lab vm create --lab-name {LabName} -g {ResourceGroup} --name {VMName} --image "Ubuntu Server 16.04 LTS" --image-type gallery --size Standard_DS1_v2
- name: Create a VM in the lab from a gallery image with SSH authentication.
text: >
az lab vm create --lab-name MyLab -g MyRG --name MyVM --image "Ubuntu Server 16.04 LTS" --image-type gallery --size Standard_DS1_v2 --authentication-type ssh
az lab vm create --lab-name {LabName} -g {ResourceGroup} --name {VMName} --image "Ubuntu Server 16.04 LTS" --image-type gallery --size Standard_DS1_v2 --authentication-type ssh
- name: Create a claimable VM in the lab from a gallery image with password authentication.
text: >
az lab vm create --lab-name MyLab -g MyRG --name MyVM --image "Ubuntu Server 16.04 LTS" --image-type gallery --size Standard_DS1_v2 --allow-claim
az lab vm create --lab-name {LabName} -g {ResourceGroup} --name {VMName} --image "Ubuntu Server 16.04 LTS" --image-type gallery --size Standard_DS1_v2 --allow-claim
- name: Create a windows VM in the lab from a gallery image with password authentication.
text: >
az lab vm create --lab-name MyLab -g MyRG --name MyVM --image "Windows Server 2008 R2 SP1" --image-type gallery --size Standard_DS1_v2
az lab vm create --lab-name {LabName} -g {ResourceGroup} --name {VMName} --image "Windows Server 2008 R2 SP1" --image-type gallery --size Standard_DS1_v2
- name: Create a VM in the lab from a custom image.
text: >
az lab vm create --lab-name MyLab -g MyRG --name MyVM --image "jenkins_custom" --image-type custom --size Standard_DS1_v2
az lab vm create --lab-name {LabName} -g {ResourceGroup} --name {VMName} --image "jenkins_custom" --image-type custom --size Standard_DS1_v2
- name: Create a VM in the lab with a public IP.
text: >
az lab vm create --lab-name MyLab -g MyRG --name MyVM --image "Ubuntu Server 16.04 LTS" --image-type gallery --size Standard_DS1_v2 --ip-configuration public
az lab vm create --lab-name {LabName} -g {ResourceGroup} --name {VMName} --image "Ubuntu Server 16.04 LTS" --image-type gallery --size Standard_DS1_v2 --ip-configuration public
- name: Create a VM from a formula.
text: >
az lab vm create --lab-name MyLab -g MyRG --name MyVM --formula MyFormula --artifacts @/artifacts.json
az lab vm create --lab-name {LabName} -g {ResourceGroup} --name {VMName} --formula MyFormula --artifacts '@artifacts.json'
"""
helps['lab vm list'] = """
type: command
Expand Down Expand Up @@ -124,7 +124,7 @@
- name: --name -n
short-summary: Name of the virtual machine.
- name: --artifacts
short-summary: JSON encoded array of artifacts to be applied. Use @{file} to load from a file.
short-summary: JSON encoded array of artifacts to be applied. Use '@{file}' to load from a file.
"""
helps['lab vm claim'] = """
type: command
Expand All @@ -141,15 +141,15 @@
examples:
- name: Claim any available virtual machine in the lab.
text: >
az lab vm claim -g MyRG --lab-name MyLab
az lab vm claim -g {ResourceGroup} --lab-name {LabName}
- name: Claim a specific virtual machine in the lab.
text: >
az lab vm claim -g MyRG --lab-name MyLab --name MyVM
- name: Claim multiple virtual machines in the lab using `--ids`.
az lab vm claim -g {ResourceGroup} --lab-name {LabName} --name {VMName}
- name: Claim multiple virtual machines in the lab by IDs.
text: |
az lab vm claim --ids \\
/subscriptions/{SubID}/resourcegroups/{MyRG}/providers/microsoft.devtestlab/labs/{MyLab}/virtualmachines/{MyVM1} \\
/subscriptions/{SubID}/resourcegroups/{MyRG}/providers/microsoft.devtestlab/labs/{MyLab}/virtualmachines/{MyVM2}
/subscriptions/{SubID}/resourcegroups/{ResourceGroup}/providers/microsoft.devtestlab/labs/{LabName}/virtualmachines/{VMName1} \\
/subscriptions/{SubID}/resourcegroups/{ResourceGroup}/providers/microsoft.devtestlab/labs/{LabName}/virtualmachines/{VMName2}
"""
helps['lab custom-image'] = """
type: group
Expand All @@ -175,13 +175,13 @@
short-summary: The current state of the virtual machine.
long-summary: >
For Windows virtual machines: NonSysprepped, SysprepRequested, SysprepApplied
For Linux virtual machines - NonDeprovisioned, DeprovisionRequested, DeprovisionApplied
For Linux virtual machines: NonDeprovisioned, DeprovisionRequested, DeprovisionApplied
examples:
- name: Create a custom image in the lab from a running Windows virtual machine without applying sysprep.
text: |
az lab custom-image create --lab-name MyLab -g MyRG --name MyVM \\
az lab custom-image create --lab-name {LabName} -g {ResourceGroup} --name {VMName} \\
--os-type Windows --os-state NonSysprepped \\
--source-vm-id "/subscriptions/{SubID}/resourcegroups/{MyRG}/microsoft.devtestlab/labs/{MyLab}/virtualmachines/{MyVM}"
--source-vm-id "/subscriptions/{SubID}/resourcegroups/{ResourceGroup}/microsoft.devtestlab/labs/{LabName}/virtualmachines/{VMName}"
"""
helps['lab gallery-image'] = """
type: group
Expand Down Expand Up @@ -276,7 +276,7 @@
populator-commands:
- az lab artifact-source list
- name: --parameters
short-summary: JSON encoded list of parameters. Use @{file} to load from a file.
short-summary: JSON encoded list of parameters. Use '@{file}' to load from a file.
- name: --tags
short-summary: The tags for the resource.
"""
Expand Down
2 changes: 1 addition & 1 deletion src/command_modules/azure-cli-lab/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
logger.warn("Wheel is not available, disabling bdist_wheel hook")
cmdclass = {}

VERSION = "0.0.14"
VERSION = "0.0.15"
CLASSIFIERS = [
'Development Status :: 4 - Beta',
'Intended Audience :: Developers',
Expand Down
Loading