Skip to content

Clu #107

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

Merged
merged 223 commits into from
Jan 14, 2016
Merged

Clu #107

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
223 commits
Select commit Hold shift + click to select a range
6ad70a5
Merge branch 'dev' of https://github.com/Azure/azure-powershell into dev
EmmaZhu Sep 2, 2015
5e15c1d
Update AzureRMVMExtensionImage cmdlet name to AzureRmVMExtensionImage
hyonholee Nov 10, 2015
36ff79a
Show Debug contents when cloud exception occurs
hyonholee Nov 10, 2015
f697a1e
Expose SubStatus for Extension instance view
hyonholee Nov 10, 2015
149e5df
Merge branch 'dev' of https://github.com/Azure/azure-powershell into dev
hyonholee Nov 10, 2015
ad80296
Enable BGInfo Extension by default
hyonholee Nov 11, 2015
e0361c2
Fix a warning message when an OS disk is in a different resource group.
hyonholee Nov 13, 2015
eadb405
Merge branch 'dev' of https://github.com/Azure/azure-powershell into dev
hyonholee Nov 13, 2015
bec90e3
Merge branch 'dev' of https://github.com/Azure/azure-powershell into dev
hyonholee Nov 14, 2015
c62c8b5
Add TestVirtualMachineWithEmptyAuc record file
hyonholee Nov 14, 2015
858fe71
Ignore exceptions during end processing
hyonholee Nov 18, 2015
59ab91f
Merge pull request #1294 from hyonholee/dev
markcowl Nov 18, 2015
6721180
Merge branch 'dev' of https://github.com/wastoresh/azure-powershell i…
EmmaZhu Nov 23, 2015
34e5f19
RDBug 5079671:[PSH] Storage data plane aliases are not defined in res…
blueww Nov 26, 2015
9cf7442
Prototype allowing format flags to be passed in
johanste Dec 12, 2015
9a9935c
Change table formatted output to always go to stdout (previously, pri…
johanste Dec 14, 2015
0ca0508
Merge branch 'clu'
johanste Dec 15, 2015
0ca624c
Merge branch 'clu' of https://github.com/Azure/azure-powershell into clu
EmmaZhu Dec 16, 2015
b1a729c
Fix an issue that throwing exception when some endpoint of storage ac…
EmmaZhu Dec 16, 2015
91d0038
Merge branch 'clu'
johanste Dec 16, 2015
6568986
Merge branch 'clu' of https://github.com/Azure/azure-powershell into clu
EmmaZhu Dec 17, 2015
a067a55
ParentResource intialized .
amarzavery Dec 17, 2015
0bf6336
app service plan tests
amarzavery Dec 18, 2015
a407e81
Merge branch 'clu' of github.com:amarzavery/azure-powershell into web…
Dec 18, 2015
f056ae3
Merge branch 'webapp-test' of github.com:haocs/azure-powershell into …
Dec 21, 2015
327d46c
Merge branch 'clu' of github.com:Azure/azure-powershell into clu
amarzavery Dec 21, 2015
12fd03d
Merge branch 'webapp-test' of github.com:haocs/azure-powershell into …
Dec 21, 2015
3f2a892
Add Network to Clu
deepakswifty Dec 22, 2015
5ee6dc8
update Build files
deepakswifty Dec 22, 2015
3e3d57e
update to latest
deepakswifty Dec 22, 2015
2a4f0e7
Merge branch 'clu' of https://github.com/Azure/azure-powershell into clu
Dec 22, 2015
673a370
Adding web app slot test for CLU.
Dec 22, 2015
4ea06eb
Merge branch 'webapp-test' of https://github.com/haocs/azure-powershe…
Dec 22, 2015
5864702
Merge branch 'clu' of https://github.com/Azure/azure-powershell into clu
EmmaZhu Dec 23, 2015
fb87554
Added more tests for webapp
Dec 23, 2015
584befa
* Added RoleAssignment tests for CLU
Dec 23, 2015
8d8af06
More tests added to Webapp.
Dec 23, 2015
579bbaf
Fixed cmdlet pipeline bug in bash.
Dec 24, 2015
e985097
Merge branch 'clu' of https://github.com/Azure/azure-powershell into clu
Dec 27, 2015
1e63c74
Merge branch 'webapp-test' of https://github.com/haocs/azure-powershe…
Dec 27, 2015
054c9a6
Updated to the latest Graph.RBAC and Authorization SDK libraries.
Dec 28, 2015
5006f98
Merge branch 'clu' of github.com:Azure/azure-powershell into clu
Dec 28, 2015
d01887e
Fixed package reference in Compute libraries.
Dec 28, 2015
db9e5d8
Save session data in .azure directory under home path
johanste Dec 29, 2015
b691ce0
Updated to latest Authorization SDK library
Dec 29, 2015
d0b105f
Added Role Definition tests for bash.
Dec 29, 2015
76e9e8b
Renamed Resource tests.
Dec 29, 2015
b9c4de3
Basic dynamic parameters implementation (enough to make new azure tem…
johanste Dec 30, 2015
a09ef96
Merge branch 'clu' of github.com:Azure/azure-powershell into clu
amarzavery Dec 30, 2015
0ace147
Merge remote-tracking branch 'origin/clu' into DynamicParameters
johanste Dec 30, 2015
fc89673
Merge branch 'clu' of github.com:Azure/azure-powershell into clu
Dec 30, 2015
814d63a
Modifications for CLU
deepakswifty Dec 31, 2015
5e9c256
Sync and merge conflicts
deepakswifty Dec 31, 2015
2f1df81
Fix CLU Mutex Issue
huangpf Dec 31, 2015
cb9f6ae
Added resource tests to CLU
Dec 31, 2015
853e0d5
Merge pull request #1565 from johanste/DynamicParameters
stankovski Dec 31, 2015
50ed951
Merge pull request #286 from Azure/clu
huangpf Dec 31, 2015
d2aae3f
Use dotnet restore instead of dnu restore
johanste Dec 31, 2015
1d38a7c
Merge remote-tracking branch 'upstream/clu' into clu
johanste Dec 31, 2015
19fcd8a
CR feedback
deepakswifty Dec 31, 2015
0157049
Merge pull request #1535 from DeepakRajendranMsft/AddNetworkToClu
markcowl Dec 31, 2015
99623cf
Merge pull request #289 from Azure/clu
huangpf Jan 1, 2016
bda40bf
Update Tests
huangpf Jan 1, 2016
23f9e70
Merge pull request #1566 from huangpf/clu
markcowl Jan 1, 2016
4c82ae6
Fix Arm Client & Resource String Problems
huangpf Jan 2, 2016
40cb058
VM Tests
huangpf Jan 2, 2016
164bbf3
Update Test Script
huangpf Jan 2, 2016
9be53f0
Fix & Update Tests
huangpf Jan 2, 2016
1b7003a
Merge branch 'clu' of github.com:Azure/azure-powershell into clu
Jan 4, 2016
2430372
Updated ClientRuntime versions
stankovski Jan 4, 2016
f17ffba
Changed reference to ClientRuntime 1.8.2
Jan 4, 2016
bac8da6
Merge pull request #1540 from hovsepm/clu
Jan 4, 2016
9f967d6
Removed connection string format for scenario tests. Same env variabl…
stankovski Jan 4, 2016
db4f879
Merge branch 'clu' of https://github.com/Azure/azure-powershell into clu
stankovski Jan 4, 2016
1cad4c4
Fixed doc
stankovski Jan 4, 2016
2ed98d1
Merge pull request #294 from Azure/clu
huangpf Jan 4, 2016
92ce8ae
Remove unneeded Path.Combine
johanste Jan 4, 2016
5e092a7
Updated doc
stankovski Jan 4, 2016
d5eac3c
Remove unused export of CmdletSessionId from generated shell script
johanste Jan 4, 2016
93cbccd
Merge pull request #1575 from stankovski/clu
markcowl Jan 4, 2016
283bc95
Fix Tests
huangpf Jan 4, 2016
260e083
webapp list as stream
amarzavery Jan 5, 2016
75b5e22
Merge branch 'clu' of github.com:Azure/azure-powershell into clu
amarzavery Jan 5, 2016
e17084c
Referenced latest Resources SDK
Jan 5, 2016
6c5c149
Added Deployment tests
Jan 5, 2016
3cee9e7
Merge pull request #295 from Azure/clu
huangpf Jan 5, 2016
ac26cd9
Merge pull request #1576 from huangpf/clu
stankovski Jan 5, 2016
67fd171
Added PowerShell resource tests.
Jan 5, 2016
e033d12
Merge branch 'clu' of github.com:Azure/azure-powershell into clu
Jan 5, 2016
12d9bc6
Fixed test failures
Jan 5, 2016
e61c162
Update Format File
huangpf Jan 5, 2016
88d0269
03-WebApp.sh
amarzavery Jan 5, 2016
9a16de0
Merge pull request #1580 from hovsepm/clu
stankovski Jan 5, 2016
3045498
Merge pull request #296 from Azure/clu
huangpf Jan 5, 2016
3b41de4
Update Format Files
huangpf Jan 5, 2016
cc433dc
Split SampleTest.cs into ComputeTests.cs and ResourceManagementTests.cs
stankovski Jan 5, 2016
8f8ce1c
Merge branch 'clu' of https://github.com/Azure/azure-powershell into clu
stankovski Jan 5, 2016
c3c21e6
Merge pull request #1577 from johanste/SaveProfileDataInHomeDirectory
stankovski Jan 5, 2016
f1ff07f
Merge branch 'clu' of https://github.com/Azure/azure-powershell into clu
stankovski Jan 5, 2016
0c072fc
Merge pull request #299 from Azure/clu
huangpf Jan 5, 2016
25dae4d
Merge pull request #1581 from huangpf/clu
Jan 5, 2016
f99f04a
ensure format & help xmls get into the cmdlet package
yugangw-msft Jan 5, 2016
617c65b
Fixed VM and Deployments tests
stankovski Jan 5, 2016
b522ffa
Merge pull request #1584 from stankovski/clu
stankovski Jan 5, 2016
0a1cf4f
Merge pull request #1583 from yugangw-msft/xmlfile
Jan 5, 2016
6345f0c
Merge pull request #300 from Azure/clu
huangpf Jan 5, 2016
7c1e6b2
Merge branch 'clu' of github.com:Azure/azure-powershell into clu
amarzavery Jan 5, 2016
1b86e5c
Websites list
amarzavery Jan 5, 2016
e6ebd8a
Merge branch 'clu' of github.com:amarzavery/azure-powershell into clu
amarzavery Jan 5, 2016
b8d4830
Added webapp slot clone test back
Jan 5, 2016
4832550
Merge branch 'clu' of github.com:Azure/azure-powershell into webapp-test
Jan 6, 2016
8a430ed
Update BuildPackage.ps1 to remove redenudant copies of xml files
markcowl Jan 6, 2016
bcbebff
Merge branch 'cluformat' of https://github.com/markcowl/azure-powersh…
huangpf Jan 6, 2016
8d55180
Merge pull request #1585 from markcowl/cluformat
stankovski Jan 6, 2016
18ffe02
Add ability to explicitly name commands by adding a CliCommandAliasAt…
johanste Jan 6, 2016
197d70d
Merge branch 'clu' of https://github.com/Azure/azure-powershell into clu
huangpf Jan 6, 2016
29df2a8
Call out for where to get the latest dotnet
yugangw-msft Jan 6, 2016
7eafb74
Merge pull request #301 from Azure/clu
huangpf Jan 6, 2016
fe2a00a
Differentiated stubs between explicit azure help command and azure he…
johanste Jan 6, 2016
efbe275
Fixed website deployment template
stankovski Jan 6, 2016
61e9901
Merge pull request #1589 from stankovski/clu
stankovski Jan 6, 2016
455c1da
rename azure.sh to az.sh
yugangw-msft Jan 6, 2016
28b00af
Merge pull request #302 from Azure/clu
huangpf Jan 6, 2016
e80bcfd
modification for bash tests
amarzavery Jan 6, 2016
aea4da6
Merge branch 'clu' of github.com:Azure/azure-powershell into clu
amarzavery Jan 6, 2016
3a86d68
Added test for webapp slot profile
Jan 6, 2016
2ab03a6
Added logging for role assignment test
stankovski Jan 6, 2016
ef82835
Changed JQ query to work around bug in JQ 1.3
stankovski Jan 6, 2016
d46ec39
Merge branch 'clu' of https://github.com/Azure/azure-powershell into clu
stankovski Jan 6, 2016
977e36c
Merge branch 'clu' of github.com:amarzavery/azure-powershell into web…
Jan 6, 2016
b320357
Merge branch 'clu' of https://github.com/johanste/azure-powershell.git
johanste Jan 6, 2016
d8af3c2
merge with recent changes in upstream clu
yugangw-msft Jan 6, 2016
0bd0d40
Update
huangpf Jan 7, 2016
2e13127
Merge pull request #1592 from johanste/clu
stankovski Jan 7, 2016
cc5bf19
modifications to webapp tests
amarzavery Jan 7, 2016
907e11d
small modification
amarzavery Jan 7, 2016
c5d59cd
monor mods
amarzavery Jan 7, 2016
62f1f04
Merge branch 'clu' of https://github.com/amarzavery/azure-powershell …
amarzavery Jan 7, 2016
6a30804
Merge branch 'clu' of https://github.com/Azure/azure-powershell into clu
amarzavery Jan 7, 2016
4528080
code review feedback
amarzavery Jan 7, 2016
7c0c634
More tests added for webapp slot and fixed Hashtable input error for …
Jan 7, 2016
37d7262
Merge branch 'clu' of github.com:Azure/azure-powershell into webapp-test
Jan 7, 2016
36b9116
fix failing tests
amarzavery Jan 7, 2016
fc8a145
reverting changes
amarzavery Jan 7, 2016
6fe8424
Merge pull request #1593 from amarzavery/clu
amarzavery Jan 7, 2016
e7701e3
update clu run code to produce az.bat
yugangw-msft Jan 7, 2016
ea8f84d
Fix issue of the aliases of new storage account and set storage accou…
EmmaZhu Jan 6, 2016
c651c4b
Merge pull request #307 from Azure/clu
huangpf Jan 7, 2016
4cb64cf
Merge branch 'clu' of https://github.com/Azure/azure-powershell into clu
stankovski Jan 7, 2016
0c02835
Merge remote-tracking branch 'origin/clu' into provide-format-output-…
johanste Jan 7, 2016
d1cb437
Change default cmdlet output view from TableDescriptor to ListDescriptor
BurtBiel Jan 7, 2016
415273c
Rename FormatTable to Display
johanste Jan 7, 2016
8d2ecf5
Added WebsitesTests
stankovski Jan 7, 2016
ebc1b9f
Merge pull request #1605 from stankovski/clu
stankovski Jan 7, 2016
364a997
Merge pull request #1600 from BurtBiel/clu
Jan 7, 2016
08603ee
merge with clu again
yugangw-msft Jan 8, 2016
5887150
Merge pull request #1 from Azure/clu
BurtBiel Jan 8, 2016
2e35775
Merge pull request #1590 from yugangw-msft/rename
stankovski Jan 8, 2016
851d64d
replace azure to az
yugangw-msft Jan 8, 2016
fc574da
Merge pull request #309 from Azure/clu
huangpf Jan 8, 2016
d0b77bd
Merge pull request #1607 from yugangw-msft/docupdate
Jan 8, 2016
c58e73a
Merge pull request #311 from Azure/clu
huangpf Jan 8, 2016
237f267
Remove Unused Format Def.
huangpf Jan 8, 2016
7caebc1
Updated webapp slot tests script.
Jan 8, 2016
812dabf
Merge branch 'clu' of github.com:Azure/azure-powershell into webapp-test
Jan 8, 2016
c2fbd66
Fix Format Problem
huangpf Jan 8, 2016
7fb2786
update webapp from azure to az
yugangw-msft Jan 8, 2016
ef850e3
Merge pull request #1611 from yugangw-msft/webapp
stankovski Jan 8, 2016
44f7a23
Merge pull request #313 from Azure/clu
huangpf Jan 8, 2016
8ee674f
Merge pull request #2 from Azure/clu
BurtBiel Jan 8, 2016
dbbeb00
Update clu-getstart.md
markcowl Jan 9, 2016
af9dfe7
Update clu-getstart.md
markcowl Jan 9, 2016
b5e665e
Merge pull request #315 from Azure/clu
huangpf Jan 9, 2016
7198df7
When the default format view is used, only show fields whose type has…
BurtBiel Jan 11, 2016
21954cb
Change comlet from azure to az and enable ndx test for webapp slot
Jan 11, 2016
b142721
Merge branch 'clu' of github.com:Azure/azure-powershell into webapp-test
Jan 11, 2016
c7e16b5
Updated webapp slot test.
Jan 11, 2016
e284c9d
Replaced #!/bin/bash with #!/bin/env/bash to support OSX
stankovski Jan 11, 2016
1476c6f
Merge pull request #1596 from wastoresh/clu
stankovski Jan 11, 2016
64b6c47
Merge pull request #1602 from johanste/provide-format-output-parameter
stankovski Jan 11, 2016
edb0832
Merge pull request #1623 from stankovski/clu
stankovski Jan 11, 2016
1ec4a8a
Added AppInsights telemetry (#110446326)
stankovski Jan 11, 2016
8391f7e
Merge pull request #316 from Azure/clu
huangpf Jan 11, 2016
b420237
Merge pull request #3 from Azure/clu
BurtBiel Jan 11, 2016
e9ea766
Updated MetricHelper to support multiple clients
stankovski Jan 11, 2016
1cc94cb
Add cmdlet attributes for cli usage. Updates include changing "get" …
BurtBiel Jan 12, 2016
0558bd6
Merge branch 'clu' of https://github.com/BurtBiel/azure-powershell.git
BurtBiel Jan 12, 2016
3360054
Fixed webapp slot test naming conflicts.
Jan 12, 2016
0f43a00
Merge branch 'clu' of github.com:Azure/azure-powershell into webapp-test
Jan 12, 2016
0555e2d
Fixed Resource and RoleDefinition cmdlet screen outputs.
Jan 12, 2016
2150430
Updated webapp slot tests.
Jan 12, 2016
33062a5
Updated webapp slot tests.
Jan 12, 2016
15d2830
Fix storage account cmdlet names
markcowl Jan 12, 2016
9b493f4
Fix cmdlet names for storage
markcowl Jan 12, 2016
7d801b3
Add requests and responses back to debug stream and fix storage cmdle…
markcowl Jan 12, 2016
2fdf522
Merge pull request #1625 from hovsepm/clu
markcowl Jan 12, 2016
06248ee
Merge pull request #1628 from markcowl/formatStorage
stankovski Jan 12, 2016
6271076
Merge pull request #317 from Azure/clu
huangpf Jan 12, 2016
a1729c5
Fix CliCommandAliasAttribute for inherited classes
BurtBiel Jan 12, 2016
4e6060c
Added telemetry data
stankovski Jan 12, 2016
31edd39
Updated subscriptionId in roleDefinition.json
Jan 12, 2016
f441220
Revert 'roleDefinition.json' file change.
Jan 12, 2016
fc41ae2
Minor code cleanup.
Jan 13, 2016
7e0da4c
Merged conflict and updated cmdlet names
BurtBiel Jan 12, 2016
728b687
Changed Flush to be sync
stankovski Jan 13, 2016
7d67b1d
Merge branch 'clu' of https://github.com/Azure/azure-powershell into clu
stankovski Jan 13, 2016
6703cf7
Combine networksecurity-noun into networksecuritynoun
BurtBiel Jan 13, 2016
5f55c08
Fixed compilation error
stankovski Jan 13, 2016
718fcf2
Merge pull request #1610 from haocs/webapp-test
Jan 13, 2016
6961e71
Merge pull request #318 from Azure/clu
huangpf Jan 13, 2016
9922ce3
Merge pull request #1624 from stankovski/clu
Jan 13, 2016
2f96680
Merge pull request #320 from Azure/clu
huangpf Jan 13, 2016
6a644b1
merge test changes
BurtBiel Jan 13, 2016
68d6d9c
merge + rename test usages to new forms
BurtBiel Jan 13, 2016
a3b2e12
rename sealed cmdlet classes, fix one test script typo
BurtBiel Jan 13, 2016
d90bcde
Reformtting websites output
markcowl Jan 13, 2016
ba03791
Merge pull request #1620 from BurtBiel/clu
markcowl Jan 13, 2016
ced0209
Merge branch 'clu' of https://github.com/Azure/azure-powershell into clu
huangpf Jan 13, 2016
251bddd
Merging with upstream
markcowl Jan 14, 2016
a1c571b
Fixing web and generic resource display, fixing scenarion tests to ma…
markcowl Jan 14, 2016
a5374c1
Merge pull request #1646 from huangpf/clu
markcowl Jan 14, 2016
457ad68
Merge pull request #1651 from markcowl/formatWeb
markcowl Jan 14, 2016
e43c6d5
Merge pull request #325 from Azure/clu
huangpf Jan 14, 2016
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion build.proj
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@
DependsOnTargets="Build;Test" >
<Exec Command="$(LibraryToolsFolder)\CLU\BuildAndInstallClu.bat" />
<!--do a simple verification-->
<Exec Command="$(LibraryRoot)drop\clurun\win7-x64\azure.bat help" />
<Exec Command="$(LibraryRoot)drop\clurun\win7-x64\az.bat help" />
</Target>

<Target Name="BuildMsBuildTask" DependsOnTargets="RestoreNugetPackages">
Expand Down
95 changes: 60 additions & 35 deletions clu-getstart.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,12 @@

### Prerequsites

Visual Studio 2015 RTM with ASP.NET. For details, check out the [installation doc](http://docs.asp.net/en/latest/getting-started/installing-on-windows.html).
* Visual Studio 2015 RTM with ASP.NET. For details, check out the [installation doc](http://docs.asp.net/en/latest/getting-started/installing-on-windows.html).

Note, after done, run `dnvm list` command to check the 'coreclr' runtime is installed with right version of `1.0.0-rc1-final`. If not, run `dnvm install 1.0.0-rc1-final -r coreclr -a x64 -p`. Remember always use `-p` flag, so the selection can persist.

* Get the latest dotnet from "https://azureclu.blob.core.windows.net/tools/dotnet-win-x64.latest.zip", unzip, then add its bin folder to the PATH

### Project Artifacts

CLUPackages require some additional files to direct generation of indexing, and to provide shortcuts when files are installed. These files can be copied from the Profile project and updated for each package.
Expand All @@ -23,7 +25,7 @@ CLUPackages require some additional files to direct generation of indexing, and
| ------------- |:-------------:|
| CommandAssemblies | File name of cmdlets assembly(ies) |
| NounPrefix | ‘AzureRm’ The part of the cmdlet noun to remove in clu commands|
| NounFirst | if true, the verb comes at the end of the command (e.g. azure resource get)|
| NounFirst | if true, the verb comes at the end of the command (e.g. az resource get)|

* \<modulename\>.nuspec.template, which contains nuspec format metadata about the package – the base temaplate is in tools\clu\Microsoft.Azure.Commands.nuspec.template. Here are the special fields defined in this template:
* %PackageId% - replace with the module name (Microsoft.Azure.Commands.\<rp-name\>)
Expand All @@ -50,35 +52,35 @@ CLUPackages require some additional files to direct generation of indexing, and
1. Run `<repo-root>\tools\CLU\BuildAndInstallClu.bat` which build and generate all cmdlet packages and deploy to under `<repo root>\drop\clurun` folder, with 3 flavors `win7-x64`, `osx.10.10-x64` and `ubuntu.14.04-x64`. When you have a clean environment or just pull from upstream, you should clean temporary bits such as `git clean -xdf`, and run this command.
2. Run `<repo-root>\tools\CLU\BuildCmdlet <package name like Microsoft.Azure.Commands.Profile>` <name like: Microsoft.Azure.Commands.Profile>", this will build and refresh an individual cmdlet package.

After #1 above is finished, you can run `drop\clurun\<platform>\azure.bat help` to explore.
After #1 above is finished, you can run `drop\clurun\<platform>\az.bat help` to explore.

To debug, set environment variable of `DebugCLU` to "1". Then on running any command, you will be prompted to attach a debugger.

There is also `<repo-root>\tools\CLU\SetupEnv.bat` which is a windows batch wrapping around the `BuildAndInstallClu.bat`, plus set the `DebugCLU` for you, and add the `drop\clurun\win7-x64\azure.bat` to the PATH environment variable.
There is also `<repo-root>\tools\CLU\SetupEnv.bat` which is a windows batch wrapping around the `BuildAndInstallClu.bat`, plus set the `DebugCLU` for you, and add the `drop\clurun\win7-x64\az.bat` to the PATH environment variable.

To test on osx/linux boxes, do #1, open `<repo-root>\drop\clurun`, copy the flavor folder to your target machine, and run the "azure.sh" inside. Make sure set execution permission using `chmod +x azure.sh clurun`
To test on osx/linux boxes, do #1, open `<repo-root>\drop\clurun`, copy the flavor folder to your target machine, and run the "az.sh" inside. Make sure set execution permission using `chmod +x az.sh clurun`

(All of those are subject to change, contact yugangw or adxsdkdev for any questions)

### Quick introductions on cmdlets
* Run commands using the ‘azure’ prefix, cmdlet nouns, and cmdlet verbs, for example, `azure environment get` maps to the cmdlet `Get-AzureRmEnvironment`
* Cmdlet parameters use the double dash (--) so for example, getting a subscription with a particular name would be: `azure subscription get –-SubscriptionName “name of subscription"`
* Run commands using the ‘az’ prefix, cmdlet nouns, and cmdlet verbs, for example, `az env get` maps to the cmdlet `Get-AzureRmEnvironment`
* 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"`
* To log in, 3 options
* login interactively using device flow, this is the only option for msa account or any org-id with 2fa enforced, example: `azure account add`
* login with user and password, this works on org-id w/o 2fa enforced, example: `azure account add --Username [email protected] --Password password1`
* login as service principal. Example: `azure account add --ServicePrincipal --TenantId <tenant> --ApplicationId <id> --Secret <secret>`
* login interactively using device flow, this is the only option for msa account or any org-id with 2fa enforced, example: `az account add`
* login with user and password, this works on org-id w/o 2fa enforced, example: `az account add --Username [email protected] --Password password1`
* login as service principal. Example: `az account add --ServicePrincipal --TenantId <tenant> --ApplicationId <id> --Secret <secret>`
* Piping between cmdlets should work the same way that Powerhell piping works
```azure subscription get --SubscriptionName | azure context set```
```az subscription get --SubscriptionName | az context set```
* You can capture piped output using redirection to a file - the result will be the json serialization of the output object.
```azure subscription get > subscriptions.json```
* You can use file input tu aparameter using '@' notation:
```azure command --param1 @file1.json```
```az subscription get > subscriptions.json```
* You can use file input to a parameter using '@' notation:
```az command --param1 @file1.json```
Reads input from file1.json and attempts to deserialize the .net object that is the Parameter type for ```param1```
```azure command --param1 @@file1.json```
```az command --param1 @@file1.json```
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.
* 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

```set CmdletSessionId=1010 ```
```set AzureProfile=1010 ```

### Testing Cmdlets

Expand All @@ -92,12 +94,33 @@ Testing will consist of scenario tests and unit tests. Scenario tests should be
#### Scenario Tests
- Scenario tests should be saved under `./examples` directory with one directory per package. Each scenario tests should (eventually) consist of both `.ps1` and `.sh` files and should cover "P0" scenarios.

##### Environment Variables for Authentication
Please set the environment variables for either Username/Password (no 2FA) or ServicePrincipal authentication:

**Username/Password (without 2-factor auth):**

| Field (case sensitive) | Description |
| ------------- |:-------------|
| azureUser | an OrgId user name |
| password | a service principal name |
| userSubscription | (optional) Selects a particular subscription by id. If not provided, the first listed subscription will be selected |

**Service Principal:**

| Field (case sensitive) | Description |
| ------------- |:-------------|
| spn | The tenant guid to authenticate against |
| secret | the password or application secret to sue for authentication |
| tenant | The tenant guid to authenticate against |
| spnSubscription | (optional) Selects a particular subscription by id. If not provided, the first listed subscription will be selected |

##### XUnit Automation For Bash Scenario Tests
- The ```Commands.Common.ScenarioTest``` project contains classes that enable executing bash scenario tests in Visual Studio, or cross-platform using dnx.

- To implement an xunit bash scenario test you must
- Add a ```[Collection("SampleCollection")]``` attribute to your test class
- Add a field to your class of type ```ScenarioTestFixture``` and add a constructor that initializes it
- Add a field to your class of type ```ScenarioTestFixture``` and add a constructor that initializes it.

```C#
[Collection("SampleCollection")]
public class SampleTestClass
Expand All @@ -116,20 +139,22 @@ Testing will consist of scenario tests and unit tests. Scenario tests should be
_fixture.GetRunner("resource-management").RunScript("01-ResourceGroups");
}
```
- Set the environment variable 'TestCredentials' to a connection string providing the credentials to use during test execution. Possible fields include:

| Field (case sensitive) | Description |
| ------------- |:-------------|
| Username | an OrgId user name |
| ServicePrincipal | a service principal name |
| Password | the password or application secret to sue for authentication |
| TenantId | (required for Service authentication) The tenant guid to authenticate against |
| SubscriptionId | (optional) Selects a particular subscription by id. If not provided, the first listed subscription will be selected |
- The infrastructure automatically generates a resource group name and assigns the value to the bash variable ```"$resourceGroupName"```. If your scripts require additional variables, you can add these to your environment before running tests, or you can generate values using the ScriptRunner (for the tests using that runner).
- Set the [environment variables](#Environment_Variables_for_Authentication) for either Username/Password (no 2FA) or ServicePrincipal authentication
- Update PATH to include location of CLU bin drop.
```bash
export PATH=/<path-to-drop>/clurun/win7-x64/:$PATH
```
- The infrastructure automatically generates the following environment variables:
- `BASEDIR` - directory path where test script is located
- `location` - default "WestUS" location
- `groupName` - randomly generated resource group name (note: the test guarantees that this resource group is deleted at the end of a test run; any other resource groups generated as part of the test run need to be deleted by the test)
- `storageAccountType` - default "Standard_GRS" storage account type
- `storageAccountName` - randomly generated storage account name
- If the script require additional variables, you can add these to your environment before running tests, or you can generate values using the ScriptRunner (for the tests using that runner).
```C#
runner.EnvironmentVariables.Add("myVariableName", runner.GenerateName("myres"));
runner.EnvironmentVariables.Add("myVariableName", runner.GenerateName("myres"));
```
- Tests can be executed in vs, or by runnign ```dnx test project.json```. If you execute dnx test from the project directory, it will work without modification and a log file for each script will be written to the test results directory ```..\TestResults```. If you execute dnx test from a different directory, you must set the following environment variables to provide the path to the examples directory and where to write log files:
- Tests can be executed in Visual Studio, or by running ```dnx test project.json```. If you execute dnx test from the project directory, it will work without modification and a log file for each script will be written to the test results directory ```..\TestResults```. If you execute dnx test from a different directory, you must set the following environment variables to provide the path to the examples directory and where to write log files:

| Environment Variable | Description |
| ------------- |:-------------|
Expand All @@ -138,14 +163,14 @@ Testing will consist of scenario tests and unit tests. Scenario tests should be

##### Running Bash Tests using Bash shell
- Bash tests should be runnable from bash shell in windows/linux/mac environments.
- To manually run the tests; please set the following envt. variables for authentication and run `./examples/lib/testrunner.sh`
- To manually run the tests; please set [environment variables](#Environment_Variables_for_Authentication) for authentication as well as update PATH and run `./examples/lib/testrunner.sh`

```bash
export azureuser=<[email protected]>
export azurepassword=<your_password>
export PATH=$PATH:/<path-to-drop>/clurun/win7-x64/
. /examples/lib/testrunner.sh
export azureUser=<[email protected]>
export password=<your_password>
export PATH=/<path-to-drop>/clurun/win7-x64/:$PATH
```
- All the parameters to the cmdlets should be passed in as envt. variables
- All the parameters to the cmdlets should be passed in as environment variables
- The current test runners will provide a unique resource group name via `$groupName` but may not remove it at the end if the test fails.
- The location for ARM will be provided via variable `$location`.
- "jq" package and BASH assert (e.g. `[ "foo" == "bar" ]`) should be used to validate the responses.
Expand Down
40 changes: 23 additions & 17 deletions examples/compute-management/01-VirtualMachineSizes.sh
Original file line number Diff line number Diff line change
@@ -1,34 +1,40 @@
#!/bin/bash
#!/bin/env/bash
set -e
printf "\n=== Managing Virtual Machine Sizes in Azure Compute ===\n"

printf "\nShowing VM size results in location: %s.\n" "$location"
azure vmsize get --location "$location"
printf "\n1. Showing VM size results in location: %s.\n" "$location"
az vm size ls --location "$location"

printf "\nChecking VM size results in location: %s.\n" "$location"
vmSizeResult=`azure vmsize get --location "$location"`
printf "\n2. Checking VM size results in location: %s.\n" "$location"
vmSizeResult=`az vm size ls --location "$location"`

if [ "$vmSizeResult" = "" ]; then
if [[ $vmSizeResult == "" ]]; then
echo "Failure: No VM sizes!" 1>&2
exit 1
else
printf "\nSuccess: Non-empty Results.\n"
echo "Success: Non-empty Results."
fi

queryString=Standard_A0
result=`echo "$vmSizeResult" | grep -q "$queryString"`
if [ "$vmSizeResult" = "" ] ; then
printf "\nFailure: VM Size Not Found: '%s'.\n" "$queryString"
filterResult=`az vm size ls --location "$location" | cat | jq 'select(.name | contains("Standard_A0"))' --raw-output`
if [[ "$filterResult" == "" ]]; then
echo "Failure: Standard_A0 vm size not found." 1>&2
exit 1
else
printf "\nSuccess: VM Size Found in Results: '%s'.\n" "$queryString"
echo "Success: Standard_A0 vm size found."
fi

queryString=Standard_G1
result=`echo "$vmSizeResult" | grep -q "$queryString"`
if [ "$vmSizeResult" = "" ] ; then
printf "\nFailure: VM Size Not Found: '%s'.\n" "$queryString"
filterResult=`az vm size ls --location "$location" | cat | jq 'select(.name | contains("Standard_G1"))' --raw-output`
if [[ "$filterResult" == "" ]]; then
echo "Failure: Standard_G1 vm size not found." 1>&2
exit 1
else
printf "\nSuccess: VM Size Found in Results: '%s'.\n" "$queryString"
echo "Success: Standard_G1 vm size found."
fi

filterResult=`az vm size ls --location "$location" | cat | jq 'select(.name | contains("NonStandard_A1"))' --raw-output`
if [[ "$filterResult" == "" ]]; then
echo "Success: NonStandard_A1 vm size not found."
else
echo "Failure: NonStandard_A1 vm size found." 1>&2
exit 1
fi
6 changes: 6 additions & 0 deletions examples/compute-management/02-VirtualMachineCreation.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Param(
[string]$resourceGroupName,
[string]$resourceGroupLocation
)

Write-Host "Skip"
36 changes: 36 additions & 0 deletions examples/compute-management/02-VirtualMachineCreation.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
#!/bin/env/bash
set -e
printf "\n=== Managing Virtual Machine Creation in Azure Compute ===\n"

printf "\n1. Creating a new resource group: %s and location: %s.\n" "$groupName" "$location"
az resourcemanager group create -n "$groupName" --location "$location"

printf "\n2. Creating a new storage account '%s' in type '%s'.\n" "$storageAccountName" "$storageAccountType"
az storage account create--resourcegroupname "$groupName" --name "$storageAccountName" --location "$location" --type "$storageAccountType"

printf "\n3. Create virtual network.\n"
result=`az vnet create--resourcegroupname "$groupName" --name test --location "$location" --addressprefix "[\"10.0.0.0/16\"]" --subnet "[{\"Name\":\"test\",\"AddressPrefix\":\"10.0.0.0/24\"}]" --force`

contextResult=`az context ls`

subId=`echo $contextResult | jq '.Subscription.SubscriptionId' --raw-output`

subnetId="/subscriptions/$subId/resourceGroups/$groupName/providers/Microsoft.Network/virtualNetworks/test/subnets/test"

printf "\n4. Create network interface with:\r\nsubId='%s' \r\n& \r\nsubnetId='$subnetId'.\n" "$subId"
export MSYS_NO_PATHCONV=1
az networkinterface create--name test --resourcegroupname "$groupName" --location "$location" --subnetid "$subnetId"
export MSYS_NO_PATHCONV=

nicId="/subscriptions/$subId/resourceGroups/$groupName/providers/Microsoft.Network/networkInterfaces/test"

vhdUri="https://$storageAccountName.blob.core.windows.net/$storageAccountName/$storageAccountName.vhd"

vmStr="{\"Name\":\"test\",\"HardwareProfile\":{\"VmSize\":\"Standard_A1\"},\"NetworkProfile\":{\"NetworkInterfaces\":[{\"Id\":\"$nicId\"}]},\"OSProfile\":{\"ComputerName\":\"test\",\"AdminPassword\":\"BaR@1234\",\"AdminUsername\":\"Foo12\"},\"StorageProfile\":{\"ImageReference\":{\"Offer\":\"WindowsServer\",\"Publisher\":\"MicrosoftWindowsServer\",\"Sku\":\"2008-R2-SP1\",\"Version\":\"latest\"},\"OSDisk\":{\"Caching\":\"ReadWrite\",\"CreateOption\":\"FromImage\",\"Name\":\"osDisk\",\"Vhd\":{\"Uri\":\"$vhdUri\"}}}}"

printf "\n5. Create virtual machine with\r\nnicId='%s'\r\nvhdUri='%s'\r\nvmStr='%s'\n" "$nicId" "$vhdUri" "$vmStr"

az vm create--resourcegroupname "$groupName" --location "$location" --vmprofile "$vmStr"

printf "\n6. Removing resource group: %s.\n" "$groupName"
az resourcemanager group rm -n "$groupName" -f
2 changes: 1 addition & 1 deletion examples/lib/helper.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/bin/env/bash

randomName() {
echo "$1$RANDOM"
Expand Down
4 changes: 2 additions & 2 deletions examples/lib/loginService.sh
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
#!/bin/bash
azure account add --spn --appid "$spn" --secret "$secret" -t "$tenant" -s "$subscription"
#!/bin/env/bash
az login --spn --appid "$spn" --secret "$secret" -t "$tenant" -s "$spnSubscription"
4 changes: 2 additions & 2 deletions examples/lib/loginUser.sh
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
#!/bin/bash
azure account add -u "$azureUser" -p "$password" -s "$subscription"
#!/bin/env/bash
az login -u "$azureUser" -p "$password" -s "$userSubscription"
16 changes: 8 additions & 8 deletions examples/lib/testrunner.sh
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
#!/bin/bash
export BASEDIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
. $BASEDIR/helper.sh
#!/bin/env/bash
export TESTDIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
. $TESTDIR/helper.sh
export groupName=`randomName testrg`
export location="westus"
export CmdletSessionID=1010
export MSYS_NO_PATHCONV=1

echo "Logging in as user"
. $BASEDIR/loginUser.sh
. $TESTDIR/loginUser.sh

for d in $( ls $BASEDIR/.. --ignore=lib ); do
for f in $( ls $BASEDIR/../$d/*.sh ); do
for d in $( ls $TESTDIR/.. --ignore=lib ); do
for f in $( ls $TESTDIR/../$d/*.sh ); do
echo "running: $f"
BASEDIR=$(cd "$(dirname "$f")" && pwd)
. $f
set +e
printf "\nCleanup: removing resource group: %s\n" $groupName
azure group remove --name "$groupName" --force
az resourcemanager group rm --name "$groupName" --force
set -e
echo "success: $f"
done
Expand Down
Loading