Skip to content

Commit b420237

Browse files
committed
Merge pull request #3 from Azure/clu
Clu
2 parents 7198df7 + edb0832 commit b420237

File tree

79 files changed

+101390
-46821
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

79 files changed

+101390
-46821
lines changed

clu-getstart.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ To test on osx/linux boxes, do #1, open `<repo-root>\drop\clurun`, copy the flav
6363
(All of those are subject to change, contact yugangw or adxsdkdev for any questions)
6464

6565
### Quick introductions on cmdlets
66-
* Run commands using the ‘az’ prefix, cmdlet nouns, and cmdlet verbs, for example, `az environment get` maps to the cmdlet `Get-AzureRmEnvironment`
66+
* Run commands using the ‘az’ prefix, cmdlet nouns, and cmdlet verbs, for example, `az env get` maps to the cmdlet `Get-AzureRmEnvironment`
6767
* Cmdlet parameters use the double dash (--) so for example, getting a subscription with a particular name would be: `az subscription get –-SubscriptionName “name of subscription"`
6868
* To log in, 3 options
6969
* login interactively using device flow, this is the only option for msa account or any org-id with 2fa enforced, example: `az account add`
@@ -73,14 +73,14 @@ To test on osx/linux boxes, do #1, open `<repo-root>\drop\clurun`, copy the flav
7373
```az subscription get --SubscriptionName | az context set```
7474
* You can capture piped output using redirection to a file - the result will be the json serialization of the output object.
7575
```az subscription get > subscriptions.json```
76-
* You can use file input tu aparameter using '@' notation:
76+
* You can use file input to a parameter using '@' notation:
7777
```az command --param1 @file1.json```
7878
Reads input from file1.json and attempts to deserialize the .net object that is the Parameter type for ```param1```
7979
```az command --param1 @@file1.json```
8080
Does the same thing, but treats the input from ```file1.json``` as if it come from the pipeline, so that multiple objects will result in multiple invocations of ```ProcessRecord()``` for the target cmdlet.
8181
* There are some known issues with the current approach to sessions, which can cause session variables to not be propagated when running cmdlets in a pipeline, to work around this, set the 'CmdletSessionId' environment variable to a numeric value - all cmdlets running from the shell will use that session id, and sessions will work with pipelining
8282

83-
```set CmdletSessionId=1010 ```
83+
```set AzureProfile=1010 ```
8484

8585
### Testing Cmdlets
8686

@@ -119,7 +119,8 @@ Please set the environment variables for either Username/Password (no 2FA) or Se
119119

120120
- To implement an xunit bash scenario test you must
121121
- Add a ```[Collection("SampleCollection")]``` attribute to your test class
122-
- Add a field to your class of type ```ScenarioTestFixture``` and add a constructor that initializes it
122+
- Add a field to your class of type ```ScenarioTestFixture``` and add a constructor that initializes it.
123+
123124
```C#
124125
[Collection("SampleCollection")]
125126
public class SampleTestClass

examples/compute-management/01-VirtualMachineSizes.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/bin/env/bash
22
set -e
33
printf "\n=== Managing Virtual Machine Sizes in Azure Compute ===\n"
44

examples/compute-management/02-VirtualMachineCreation.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/bin/env/bash
22
set -e
33
printf "\n=== Managing Virtual Machine Creation in Azure Compute ===\n"
44

examples/lib/helper.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/bin/env/bash
22

33
randomName() {
44
echo "$1$RANDOM"

examples/lib/loginService.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
#!/bin/bash
1+
#!/bin/env/bash
22
az account add --spn --appid "$spn" --secret "$secret" -t "$tenant" -s "$spnSubscription"

examples/lib/loginUser.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
#!/bin/bash
1+
#!/bin/env/bash
22
az account add -u "$azureUser" -p "$password" -s "$userSubscription"

examples/lib/testrunner.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/bin/env/bash
22
export TESTDIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
33
. $TESTDIR/helper.sh
44
export groupName=`randomName testrg`

examples/resource-management/01-ResourceGroups.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/bin/env/bash
22
set -e
33
printf "\n=== Managing Resource Groups in Azure ===\n"
44

examples/resource-management/02-Resource.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/bin/env/bash
22
set -e
33
printf "\n=== Managing Resources in Azure ===\n"
44

examples/resource-management/03-Deployments.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/bin/env/bash
22
set -e
33
printf "\n=== Provisioning Deployments in Azure ===\n"
44

0 commit comments

Comments
 (0)