Skip to content

HPF PR: clu <- Azure:clu #359

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 13 commits into from
Jan 26, 2016
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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
8 changes: 7 additions & 1 deletion src/CLU/CLUCoreCLR.sln
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 14
VisualStudioVersion = 14.0.24720.0
VisualStudioVersion = 14.0.23107.0
MinimumVisualStudioVersion = 10.0.40219.1
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Commands.Common", "Commands.Common\Commands.Common.xproj", "{5F567ACA-595E-436D-83DB-A21E08F82DF6}"
EndProject
Expand Down Expand Up @@ -68,6 +68,8 @@ Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Microsoft.Azure.Commands.Ne
EndProject
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Microsoft.CLU.Test", "Microsoft.CLU.Test\Microsoft.CLU.Test.xproj", "{13C34370-51A4-4726-81B8-BE0996FC9CF0}"
EndProject
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "StaticAnalysis", "StaticAnalysis\StaticAnalysis.xproj", "{84F9573A-449E-4159-8493-EFD6C3C8F0A5}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down Expand Up @@ -172,6 +174,10 @@ Global
{13C34370-51A4-4726-81B8-BE0996FC9CF0}.Debug|Any CPU.Build.0 = Debug|Any CPU
{13C34370-51A4-4726-81B8-BE0996FC9CF0}.Release|Any CPU.ActiveCfg = Release|Any CPU
{13C34370-51A4-4726-81B8-BE0996FC9CF0}.Release|Any CPU.Build.0 = Release|Any CPU
{84F9573A-449E-4159-8493-EFD6C3C8F0A5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{84F9573A-449E-4159-8493-EFD6C3C8F0A5}.Debug|Any CPU.Build.0 = Debug|Any CPU
{84F9573A-449E-4159-8493-EFD6C3C8F0A5}.Release|Any CPU.ActiveCfg = Release|Any CPU
{84F9573A-449E-4159-8493-EFD6C3C8F0A5}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down
17 changes: 14 additions & 3 deletions src/CLU/Commands.Common.Authentication/Models/AzureRMProfile.cs
Original file line number Diff line number Diff line change
Expand Up @@ -103,11 +103,22 @@ public void Save()
/// <param name="path">File path on disk to save profile to</param>
public void Save(string path)
{
Save(_dataStore, path);
}

public void Save(IDataStore store, string path)
{

if (string.IsNullOrEmpty(path))
{
return;
}

if (store == null)
{
return;
}

// Removing predefined environments
foreach (string env in AzureEnvironment.PublicEnvironments.Keys)
{
Expand All @@ -118,14 +129,14 @@ public void Save(string path)
{
string contents = ToString();
string diskContents = string.Empty;
if (_dataStore.FileExists(path))
if (store.FileExists(path))
{
diskContents = _dataStore.ReadFileAsText(path);
diskContents = store.ReadFileAsText(path);
}

if (diskContents != contents)
{
_dataStore.WriteFile(path, contents);
store.WriteFile(path, contents);
}
}
finally
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
az resource action invoke

Invoke a Resource Action.

USAGE:

az resource action invoke -a <action> --resourceId <resourceId> [--parameters <parameters>] [--oDataQuery <oDataQuery>] [-f] [--apiVersion <apiVersion>] [--pre]

az resource action invoke -a <action> -n <resourceName> -t <resourceType> [--parameters <parameters>] [--extensionResourceName <extensionResourceName>] [--extensionResourceType <extensionResourceType>] [--oDataQuery <oDataQuery>] [-g <resourceGroupName>] [-f] [--apiVersion <apiVersion>] [--pre]

az resource action invoke -a <action> -n <resourceName> -t <resourceType> --tenantLevel [--parameters <parameters>] [--extensionResourceName <extensionResourceName>] [--extensionResourceType <extensionResourceType>] [--oDataQuery <oDataQuery>] [-f] [--apiVersion <apiVersion>] [--pre]

PARAMETERS:

-a (--actionName, --action)
[string] The name of the action to invoke.

--apiVersion
[string] When set, indicates the version of the resource provider API to use. If not specified, the API version is automatically determined as the latest available.

--extensionResourceName
[string] The extension resource name. e.g. to specify a database MyServer/MyDatabase.

--extensionResourceType
[string] The extension resource type. e.g. Microsoft.Sql/Servers/Databases.

-f (--force)
[flag] Perform this action without prompting, even if permanent changes are made.

-g (--group, --resourceGroupName)
[string] The name of the resource group containing this resource

-n (--name, --resourceName)
[string] The resource name. e.g. to specify a database MyServer/MyDatabase.

--oDataQuery
[string] An OData style filter which will be appended to the request in addition to any other filters.

--parameters (--object)
[hashtable] A hash table which represents resource properties.

--pre
[flag] When set, indicates that the cmdlet should use pre-release API versions when automatically determining which version to use.

--resourceId (--id)
[string] The identity of this resource. Resource identity is a Uri path that uniquely identifies the resource.

-t (--type, --resourceType)
[string] The resource type. e.g. Microsoft.Sql/Servers/Databases.

--tenantLevel
[flag] Indicates that this is a tenant level operation.

Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
az resource create

Create a Resource.

USAGE:

az resource create --properties <properties> --resourceId <resourceId> [-l <location>] [-k <kind>] [--planObject <planObject>] [--skuObject <skuObject>] [-t <tag>] [--isFullObject] [--oDataQuery <oDataQuery>] [-f] [--apiVersion <apiVersion>] [--pre]

az resource create --properties <properties> -n <resourceName> -t <resourceType> [-l <location>] [-k <kind>] [--planObject <planObject>] [--skuObject <skuObject>] [-t <tag>] [--isFullObject] [--extensionResourceName <extensionResourceName>] [--extensionResourceType <extensionResourceType>] [--oDataQuery <oDataQuery>] [-g <resourceGroupName>] [-f] [--apiVersion <apiVersion>] [--pre]

az resource create --properties <properties> -n <resourceName> -t <resourceType> --tenantLevel [-l <location>] [-k <kind>] [--planObject <planObject>] [--skuObject <skuObject>] [-t <tag>] [--isFullObject] [--extensionResourceName <extensionResourceName>] [--extensionResourceType <extensionResourceType>] [--oDataQuery <oDataQuery>] [-f] [--apiVersion <apiVersion>] [--pre]

PARAMETERS:

--apiVersion
[string] When set, indicates the version of the resource provider API to use. If not specified, the API version is automatically determined as the latest available.

--extensionResourceName
[string] The extension resource name. e.g. to specify a database MyServer/MyDatabase.

--extensionResourceType
[string] The extension resource type. e.g. Microsoft.Sql/Servers/Databases.

-f (--force)
[flag] Perform this action without prompting, even if permanent changes are made.

-g (--group, --resourceGroupName)
[string] The name of the resource group containing this resource

--isFullObject
[flag] When set indicates that the full object is passed in to the -PropertyObject parameter.

-k (--kind)
[string] The resource kind.

-l (--location)
[string] The region that will contain this resource. Possible values include 'East US', 'North Europe', 'East Asia'

-n (--name, --resourceName)
[string] The resource name. e.g. to specify a database MyServer/MyDatabase.

--oDataQuery
[string] An OData style filter which will be appended to the request in addition to any other filters.

--planObject (--plan)
[hashtable] A hash table which represents resource plan properties.

--pre
[flag] When set, indicates that the cmdlet should use pre-release API versions when automatically determining which version to use.

--properties (--propertyObject)
[psObject] A hash table which represents resource properties.

--resourceId (--id)
[string] The identity of this resource. Resource identity is a Uri path that uniquely identifies the resource.

--skuObject (--sku)
[hashtable] A hash table which represents sku properties.

-t (--tags, --tag)
[hashtable[]] A hash table which represents resource tags.

-t (--type, --resourceType)
[string] The resource type. e.g. Microsoft.Sql/Servers/Databases.

--tenantLevel
[flag] Indicates that this is a tenant level operation.

Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
az resource find

Find a Resource.

USAGE:

az resource find [-n <resourceNameContains>] [-t <resourceType>] [--extensionResourceType <extensionResourceType>] [--top <top>] [--oDataQuery <oDataQuery>] [--tagName <tagName>] [--tagValue <tagValue>] [-g <resourceGroupNameContains>] [--expandProperties] [--apiVersion <apiVersion>] [--pre]

az resource find -t <resourceType> --tenantLevel [-n <resourceNameContains>] [--extensionResourceType <extensionResourceType>] [--top <top>] [--oDataQuery <oDataQuery>] [--expandProperties] [--apiVersion <apiVersion>] [--pre]

az resource find -t <resourceType> [-n <resourceNameContains>] [--extensionResourceType <extensionResourceType>] [--top <top>] [--oDataQuery <oDataQuery>] [--tagName <tagName>] [--tagValue <tagValue>] [-g <resourceGroupNameContains>] [--expandProperties] [--apiVersion <apiVersion>] [--pre]

PARAMETERS:

--apiVersion
[string] When set, indicates the version of the resource provider API to use. If not specified, the API version is automatically determined as the latest available.

--expandProperties
[flag] When specified, expands the properties of the resource.

--extensionResourceType
[string] The extension resource type. e.g. Microsoft.Sql/Servers/{serverName}/Databases/myDatabase.

-g (--resourceGroupName, --group, --resourceGroupNameContains)
[string] The resource group name substring.

-n (--name, --resourceNameContains)
[string] The resource name substring. e.g. if your resource name is testResource, you can specify test.

--oDataQuery
[string] An OData style filter which will be appended to the request in addition to any other filters.

--pre
[flag] When set, indicates that the cmdlet should use pre-release API versions when automatically determining which version to use.

-t (--type, --resourceType)
[string] The resource type. e.g. Microsoft.Sql/Servers/Databases.

--tagName
[string] The name of the tag to query by.

--tagValue
[string] The value of the tag to query by.

--tenantLevel
[flag] Indicates that this is a tenant level operation.

--top
[int32] The number of resources to retrieve.

Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
az resource group deployment operation ls

Get Resource Group Deployment Operation details.

USAGE:

az resource group deployment operation ls -n <deploymentName> -g <resourceGroupName> [-s <subscriptionId>] [--apiVersion <apiVersion>] [--pre]

PARAMETERS:

--apiVersion
[string] When set, indicates the version of the resource provider API to use. If not specified, the API version is automatically determined as the latest available.

-g (--group, --resourceGroupName)
[string] The name of the resource group containing this resource

-n (--name, --deploymentName)
[string] The deployment name.

--pre
[flag] When set, indicates that the cmdlet should use pre-release API versions when automatically determining which version to use.

-s (--id, --subscriptionId)
[guid] The subscription identity, a global unique identifier (GUID) that uniquely identifies the subscription.

Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
az resource group find

Find a Resource Group.

USAGE:

az resource group find [-t <tag>] [--apiVersion <apiVersion>] [--pre]

PARAMETERS:

--apiVersion
[string] When set, indicates the version of the resource provider API to use. If not specified, the API version is automatically determined as the latest available.

--pre
[flag] When set, indicates that the cmdlet should use pre-release API versions when automatically determining which version to use.

-t (--tag)
[hashtable] The tag filter for the OData query. The expected format is @{Name = 'tagName'} or @{Name = 'tagName'; Value = 'tagValue'}.

Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
az resource lock create

Create a Resource Lock.

USAGE:

az resource lock create -n <lockName> --lockLevel <lockLevel> --resourceName <resourceName> -t <resourceType> [--lockNotes <lockNotes>] [-f] [--apiVersion <apiVersion>] [--pre]

az resource lock create -n <lockName> --lockLevel <lockLevel> -g <resourceGroupName> [--lockNotes <lockNotes>] [-f] [--apiVersion <apiVersion>] [--pre]

az resource lock create -n <lockName> --lockLevel <lockLevel> --resourceName <resourceName> -t <resourceType> -g <resourceGroupName> [--lockNotes <lockNotes>] [-f] [--apiVersion <apiVersion>] [--pre]

az resource lock create -n <lockName> --lockLevel <lockLevel> --scope <scope> [--lockNotes <lockNotes>] [-f] [--apiVersion <apiVersion>] [--pre]

az resource lock create -n <lockName> --lockLevel <lockLevel> [--lockNotes <lockNotes>] [-f] [--apiVersion <apiVersion>] [--pre]

az resource lock create -n <lockName> --lockLevel <lockLevel> --resourceName <resourceName> -t <resourceType> --tenantLevel [--lockNotes <lockNotes>] [-f] [--apiVersion <apiVersion>] [--pre]

az resource lock create --lockLevel <lockLevel> --lockId <lockId> [--lockNotes <lockNotes>] [-f] [--apiVersion <apiVersion>] [--pre]

PARAMETERS:

--apiVersion
[string] When set, indicates the version of the resource provider API to use. If not specified, the API version is automatically determined as the latest available.

-f (--force)
[flag] Perform this action without prompting, even if permanent changes are made.

-g (--group, --resourceGroupName)
[string] The name of the resource group containing this resource

--lockId
[string] The Id of the lock.

--lockLevel (--level)
[object] The level of the lock.

--lockNotes (--notes)
[string] The notes of the lock.

-n (--extensionResourceName, --name, --lockName)
[string] The name of the lock.

--pre
[flag] When set, indicates that the cmdlet should use pre-release API versions when automatically determining which version to use.

--resourceName
[string] The resource name. e.g. to specify a database MyServer/MyDatabase.

--scope (--id, --resourceId)
[string] The scope. e.g. to specify a database '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaserName}', to specify a resoruce group: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}'

-t (--type, --resourceType)
[string] The resource type. e.g. Microsoft.Sql/Servers/Databases.

--tenantLevel
[flag] Indicates that this is a tenant level operation.

Loading