Skip to content

Clu #99

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 5 commits into from
Dec 22, 2015
Merged

Clu #99

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
6 changes: 6 additions & 0 deletions examples/virtual-hard-disk/02-VirtualHardDisks.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Param(
[string]$resourceGroupName,
[string]$resourceGroupLocation
)

Write-Host "Skip"
17 changes: 17 additions & 0 deletions examples/virtual-hard-disk/02-VirtualHardDisks.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/bin/bash
set -e
printf "\n=== Managing Virtual Hard Disks in Azure Compute ===\n"

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

printf "\n2. Creating a new storage account"
result=`azure storage account new --resourcegroupname "$groupName" --name "$groupName" --location "$location" --type "$storageAccountType"`

printf "\n3. Uploading a virtual hard disk"
result=`azure vhd add -o --resourcegroupname "$groupName" --destination https://"$groupName".blob.core.windows.net/test/test.vhd --localfilepath $(dirname $0)/test.vhd`

printf "\n4. Downloading a virtual hard disk"

printf "\n5. Removing resource group: %s.\n" "$groupName"
azure group remove -n "$groupName" -f
Binary file added examples/virtual-hard-disk/test.vhd
Binary file not shown.
2 changes: 1 addition & 1 deletion src/CLU/Commands.Common.Authentication/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"System.Linq": "4.0.1-beta-23516",
"Microsoft.CLU": "1.0.0",
"Microsoft.IdentityModel.Clients.ActiveDirectory": "3.6.212041202-alpha",
"Microsoft.Rest.ClientRuntime": "1.8.1",
"Microsoft.Rest.ClientRuntime": "1.9.0",
"Microsoft.Rest.ClientRuntime.Azure.Authentication": "1.2.1-preview",
"Newtonsoft.Json": "7.0.1",
"System.Collections": "4.0.11-beta-23516",
Expand Down
4 changes: 4 additions & 0 deletions src/CLU/Commands.Common.ScenarioTest/ExampleScriptRunner.cs
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ public class ExampleScriptRunner
const string ResourceGroupNameKey = "groupName";
const string locationKey = "location";
const string SessionKey = "CmdletSessionID";
const string storageAccountTypeKey = "storageAccountType";
const string DefaultStorageAccountType = "Standard_GRS";

public ExampleScriptRunner(string sessionId) : this(new Random(), sessionId)
{
Expand Down Expand Up @@ -104,6 +106,8 @@ public string RunScript(string testName)
process.EnvironmentVariables[SessionKey] = _sessionId;
process.EnvironmentVariables[ResourceGroupNameKey] = _resourceGroupName;
process.EnvironmentVariables[locationKey] = DefaultLocation;
process.EnvironmentVariables[locationKey] = DefaultLocation;
process.EnvironmentVariables[storageAccountTypeKey] = DefaultStorageAccountType;
foreach (var helper in _context.EnvironmentHelpers)
{
helper.TrySetupScriptEnvironment(_context, _clientFactory, process.EnvironmentVariables);
Expand Down
7 changes: 7 additions & 0 deletions src/CLU/Commands.Common.ScenarioTest/SampleTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,19 @@ public SampleTest(ScenarioTestFixture fixture)
{
_collectionState = fixture;
}

[Fact]
public void RunSampleTest()
{
var helper = _collectionState.GetRunner("resource-management");
helper.RunScript("01-ResourceGroups");
}

[Fact]
public void RunVirtualHardDiskTest()
{
var helper = _collectionState.GetRunner("virtual-hard-disk");
helper.RunScript("02-VirtualHardDisks");
}
}
}
3 changes: 1 addition & 2 deletions src/CLU/Commands.Common.ScenarioTest/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,7 @@
"Microsoft.Azure.Management.Resources": "3.3.0-preview",
"Microsoft.Extensions.Logging.Console": "1.0.0-rc1-final",
"Microsoft.IdentityModel.Clients.ActiveDirectory": "3.6.212041202-alpha",
"Microsoft.Rest.ClientRuntime": "1.8.0",
"Microsoft.Rest.ClientRuntime.Azure": "2.5.1",
"Microsoft.Rest.ClientRuntime.Azure": "2.6.0",
"Microsoft.Rest.ClientRuntime.Azure.Authentication": "1.2.1-preview",
"Newtonsoft.Json": "7.0.1",
"System.Collections": "4.0.11-beta-23516",
Expand Down
2 changes: 1 addition & 1 deletion src/CLU/Commands.Common.Storage/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"Commands.Common": "",
"Commands.Common.Authentication": "",
"Microsoft.IdentityModel.Clients.ActiveDirectory": "3.6.212041202-alpha",
"Microsoft.Rest.ClientRuntime": "1.8.1",
"Microsoft.Rest.ClientRuntime": "1.9.0",
"Newtonsoft.Json": "7.0.1",
"System.Collections": "4.0.11-beta-23516",
"System.Collections.Concurrent": "4.0.11-beta-23516",
Expand Down
2 changes: 1 addition & 1 deletion src/CLU/Commands.Common/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"Microsoft.CLU": "1.0.0",
"Commands.Common.Authentication": "",
"Microsoft.IdentityModel.Clients.ActiveDirectory": "3.6.212041202-alpha",
"Microsoft.Rest.ClientRuntime": "1.8.1",
"Microsoft.Rest.ClientRuntime": "1.9.0",
"Newtonsoft.Json": "7.0.1",
"System.Collections": "4.0.11-beta-23516",
"System.Collections.Concurrent": "4.0.11-beta-23516",
Expand Down
2 changes: 1 addition & 1 deletion src/CLU/Commands.ResourceManager.Cmdlets/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"Commands.Common": "",
"Commands.ResourceManager.Common": "",
"Microsoft.IdentityModel.Clients.ActiveDirectory": "3.6.212041202-alpha",
"Microsoft.Rest.ClientRuntime": "1.8.1",
"Microsoft.Rest.ClientRuntime": "1.9.0",
"Newtonsoft.Json": "7.0.1",
"System.Collections": "4.0.11-beta-23516",
"System.Collections.Concurrent": "4.0.11-beta-23516",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
// ----------------------------------------------------------------------------------

using Microsoft.Azure.Commands.Common.Authentication.Models;
using Microsoft.Azure.Commands.Common.Resources.Properties;
using Commands.ResourceManager.Common.Properties;
using Microsoft.IdentityModel.Clients.ActiveDirectory;
using System;

Expand Down
2 changes: 1 addition & 1 deletion src/CLU/Commands.ResourceManager.Common/AzureRmCmdlet.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

using Microsoft.Azure.Commands.Common;
using Microsoft.Azure.Commands.Common.Authentication.Models;
using Microsoft.Azure.Commands.Common.Resources.Properties;
using Commands.ResourceManager.Common.Properties;
using Microsoft.Azure.Commands.Models;
using Microsoft.Azure.Commands.Utilities.Common;
using Newtonsoft.Json;
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
using System;
using System.Collections;
using System.Collections.Generic;
using Microsoft.Azure.Commands.Common.Resources.Properties;
using Commands.ResourceManager.Common.Properties;

namespace Microsoft.Azure.Commands.Tags.Model
{
Expand Down
6 changes: 3 additions & 3 deletions src/CLU/Commands.ResourceManager.Common/project.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"version": "1.0.0-*",
"description": "Microsoft.Azure.Commands.Common.Resources Class Library",
"description": "Commands.ResourceManager.Common Class Library",
"authors": [ "markcowl" ],
"tags": [ "" ],
"projectUrl": "",
Expand All @@ -10,7 +10,7 @@
"dependencies": {
"Microsoft.NETCore": "5.0.1-beta-23516",
"Microsoft.NETCore.Platforms": "1.0.1-beta-23516",
"Microsoft.CSharp": "4.0.1-beta-23516"
"Microsoft.CSharp": "4.0.1-beta-23516"
}
}
},
Expand All @@ -20,7 +20,7 @@
"Commands.Common": "",
"Commands.Common.Authentication": "",
"Microsoft.IdentityModel.Clients.ActiveDirectory": "3.6.212041202-alpha",
"Microsoft.Rest.ClientRuntime": "1.8.1",
"Microsoft.Rest.ClientRuntime": "1.9.0",
"Newtonsoft.Json": "7.0.1",
"System.Collections": "4.0.11-beta-23516",
"System.Collections.Concurrent": "4.0.11-beta-23516",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
"Commands.ResourceManager.Common": "",
"Microsoft.Azure.Management.Resources": "3.3.0-preview",
"Microsoft.IdentityModel.Clients.ActiveDirectory": "3.6.212041202-alpha",
"Microsoft.Rest.ClientRuntime": "1.8.1",
"Microsoft.Rest.ClientRuntime.Azure": "2.5.3",
"Microsoft.Rest.ClientRuntime": "1.9.0",
"Microsoft.Rest.ClientRuntime.Azure": "2.6.0",
"Microsoft.Rest.ClientRuntime.Azure.Authentication": "1.2.1-preview",
"Newtonsoft.Json": "7.0.1",
"System.Collections": "4.0.11-beta-23516",
Expand Down
2 changes: 1 addition & 1 deletion src/CLU/Microsoft.Azure.Commands.Compute.Test/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"Microsoft.Azure.Management.Network": "3.0.3-preview",
"Microsoft.Azure.Management.Storage": "4.0.0-preview",
"Microsoft.IdentityModel.Clients.ActiveDirectory": "3.6.212041202-alpha",
"Microsoft.Rest.ClientRuntime": "1.8.1",
"Microsoft.Rest.ClientRuntime": "1.9.0",
"Newtonsoft.Json": "7.0.1",
"System.Collections": "4.0.11-beta-23516",
"System.Collections.Concurrent": "4.0.11-beta-23516",
Expand Down
2 changes: 1 addition & 1 deletion src/CLU/Microsoft.Azure.Commands.Compute/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"Commands.Common.Storage": "",
"Commands.ResourceManager.Common": "",
"Microsoft.IdentityModel.Clients.ActiveDirectory": "3.6.212041202-alpha",
"Microsoft.Rest.ClientRuntime": "1.8.1",
"Microsoft.Rest.ClientRuntime": "1.9.0",
"Newtonsoft.Json": "7.0.1",
"System.Collections": "4.0.11-beta-23516",
"System.Collections.Concurrent": "4.0.11-beta-23516",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"Commands.Common.Storage": "",
"Commands.ResourceManager.Common": "",
"Microsoft.IdentityModel.Clients.ActiveDirectory": "3.6.212041202-alpha",
"Microsoft.Rest.ClientRuntime": "1.8.1",
"Microsoft.Rest.ClientRuntime": "1.9.0",
"Newtonsoft.Json": "7.0.1",
"System.Collections": "4.0.11-beta-23516",
"System.Collections.Concurrent": "4.0.11-beta-23516",
Expand Down
4 changes: 2 additions & 2 deletions src/CLU/Microsoft.Azure.Commands.Profile.Test/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@
"Microsoft.Azure.Commands.Profile": "",
"Microsoft.Azure.Management.Resources": "3.3.0-preview",
"Microsoft.IdentityModel.Clients.ActiveDirectory": "3.6.212041202-alpha",
"Microsoft.Rest.ClientRuntime": "1.8.1",
"Microsoft.Rest.ClientRuntime.Azure": "2.5.3",
"Microsoft.Rest.ClientRuntime": "1.9.0",
"Microsoft.Rest.ClientRuntime.Azure": "2.6.0",
"Microsoft.Rest.ClientRuntime.Azure.Authentication": "1.2.1-preview",
"Newtonsoft.Json": "7.0.1",
"System.Collections": "4.0.11-beta-23516",
Expand Down
4 changes: 2 additions & 2 deletions src/CLU/Microsoft.Azure.Commands.Profile/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
"Commands.ResourceManager.Common": "",
"Microsoft.Azure.Management.Resources": "3.3.0-preview",
"Microsoft.IdentityModel.Clients.ActiveDirectory": "3.6.212041202-alpha",
"Microsoft.Rest.ClientRuntime": "1.8.1",
"Microsoft.Rest.ClientRuntime.Azure": "2.5.3",
"Microsoft.Rest.ClientRuntime": "1.9.0",
"Microsoft.Rest.ClientRuntime.Azure": "2.6.0",
"Microsoft.Rest.ClientRuntime.Azure.Authentication": "1.2.1-preview",
"Newtonsoft.Json": "7.0.1",
"System.Collections": "4.0.11-beta-23516",
Expand Down
4 changes: 2 additions & 2 deletions src/CLU/Microsoft.Azure.Commands.Resources.Test/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@
"Microsoft.Azure.Management.Authorization": "2.1.0-preview",
"Microsoft.Azure.Management.Resources": "3.3.0-preview",
"Microsoft.IdentityModel.Clients.ActiveDirectory": "3.6.212041202-alpha",
"Microsoft.Rest.ClientRuntime": "1.8.1",
"Microsoft.Rest.ClientRuntime.Azure": "2.5.3",
"Microsoft.Rest.ClientRuntime": "1.9.0",
"Microsoft.Rest.ClientRuntime.Azure": "2.6.0",
"Microsoft.Rest.ClientRuntime.Azure.Authentication": "1.2.1-preview",
"Newtonsoft.Json": "7.0.1",
"System.Collections": "4.0.11-beta-23516",
Expand Down
4 changes: 2 additions & 2 deletions src/CLU/Microsoft.Azure.Commands.Resources/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@
"Microsoft.Azure.Management.Authorization": "2.1.0-preview",
"Microsoft.Azure.Management.Resources": "3.3.0-preview",
"Microsoft.IdentityModel.Clients.ActiveDirectory": "3.6.212041202-alpha",
"Microsoft.Rest.ClientRuntime": "1.8.1",
"Microsoft.Rest.ClientRuntime.Azure": "2.5.3",
"Microsoft.Rest.ClientRuntime": "1.9.0",
"Microsoft.Rest.ClientRuntime.Azure": "2.6.0",
"Microsoft.Rest.ClientRuntime.Azure.Authentication": "1.2.1-preview",
"Newtonsoft.Json": "7.0.1",
"System.Collections": "4.0.11-beta-23516",
Expand Down
4 changes: 2 additions & 2 deletions src/CLU/Microsoft.Azure.Commands.Websites.Test/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@
"Microsoft.Azure.Management.Resources": "3.3.0-preview",
"Microsoft.Azure.Management.Websites": "1.0.0-preview",
"Microsoft.IdentityModel.Clients.ActiveDirectory": "3.6.212041202-alpha",
"Microsoft.Rest.ClientRuntime": "1.8.1",
"Microsoft.Rest.ClientRuntime.Azure": "2.5.3",
"Microsoft.Rest.ClientRuntime": "1.9.0",
"Microsoft.Rest.ClientRuntime.Azure": "2.6.0",
"Microsoft.Rest.ClientRuntime.Azure.Authentication": "1.2.1-preview",
"Newtonsoft.Json": "7.0.1",
"System.Collections": "4.0.11-beta-23516",
Expand Down
4 changes: 2 additions & 2 deletions src/CLU/Microsoft.Azure.Commands.Websites/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@
"Microsoft.Azure.Management.Resources": "3.3.0-preview",
"Microsoft.Azure.Management.Websites": "1.0.0-preview",
"Microsoft.IdentityModel.Clients.ActiveDirectory": "3.6.212041202-alpha",
"Microsoft.Rest.ClientRuntime": "1.8.1",
"Microsoft.Rest.ClientRuntime.Azure": "2.5.3",
"Microsoft.Rest.ClientRuntime": "1.9.0",
"Microsoft.Rest.ClientRuntime.Azure": "2.6.0",
"Microsoft.Rest.ClientRuntime.Azure.Authentication": "1.2.1-preview",
"Newtonsoft.Json": "7.0.1",
"System.Collections": "4.0.11-beta-23516",
Expand Down