Skip to content

Commit 0d52f3d

Browse files
committed
Merge pull request Azure#359 from Azure/clu
HPF PR: clu <- Azure:clu
2 parents c213c13 + 2eb536f commit 0d52f3d

File tree

411 files changed

+13528
-5416
lines changed

Some content is hidden

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

411 files changed

+13528
-5416
lines changed

src/CLU/CLUCoreCLR.sln

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

22
Microsoft Visual Studio Solution File, Format Version 12.00
33
# Visual Studio 14
4-
VisualStudioVersion = 14.0.24720.0
4+
VisualStudioVersion = 14.0.23107.0
55
MinimumVisualStudioVersion = 10.0.40219.1
66
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Commands.Common", "Commands.Common\Commands.Common.xproj", "{5F567ACA-595E-436D-83DB-A21E08F82DF6}"
77
EndProject
@@ -68,6 +68,8 @@ Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Microsoft.Azure.Commands.Ne
6868
EndProject
6969
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Microsoft.CLU.Test", "Microsoft.CLU.Test\Microsoft.CLU.Test.xproj", "{13C34370-51A4-4726-81B8-BE0996FC9CF0}"
7070
EndProject
71+
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "StaticAnalysis", "StaticAnalysis\StaticAnalysis.xproj", "{84F9573A-449E-4159-8493-EFD6C3C8F0A5}"
72+
EndProject
7173
Global
7274
GlobalSection(SolutionConfigurationPlatforms) = preSolution
7375
Debug|Any CPU = Debug|Any CPU
@@ -172,6 +174,10 @@ Global
172174
{13C34370-51A4-4726-81B8-BE0996FC9CF0}.Debug|Any CPU.Build.0 = Debug|Any CPU
173175
{13C34370-51A4-4726-81B8-BE0996FC9CF0}.Release|Any CPU.ActiveCfg = Release|Any CPU
174176
{13C34370-51A4-4726-81B8-BE0996FC9CF0}.Release|Any CPU.Build.0 = Release|Any CPU
177+
{84F9573A-449E-4159-8493-EFD6C3C8F0A5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
178+
{84F9573A-449E-4159-8493-EFD6C3C8F0A5}.Debug|Any CPU.Build.0 = Debug|Any CPU
179+
{84F9573A-449E-4159-8493-EFD6C3C8F0A5}.Release|Any CPU.ActiveCfg = Release|Any CPU
180+
{84F9573A-449E-4159-8493-EFD6C3C8F0A5}.Release|Any CPU.Build.0 = Release|Any CPU
175181
EndGlobalSection
176182
GlobalSection(SolutionProperties) = preSolution
177183
HideSolutionNode = FALSE

src/CLU/Commands.Common.Authentication/Models/AzureRMProfile.cs

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -103,11 +103,22 @@ public void Save()
103103
/// <param name="path">File path on disk to save profile to</param>
104104
public void Save(string path)
105105
{
106+
Save(_dataStore, path);
107+
}
108+
109+
public void Save(IDataStore store, string path)
110+
{
111+
106112
if (string.IsNullOrEmpty(path))
107113
{
108114
return;
109115
}
110116

117+
if (store == null)
118+
{
119+
return;
120+
}
121+
111122
// Removing predefined environments
112123
foreach (string env in AzureEnvironment.PublicEnvironments.Keys)
113124
{
@@ -118,14 +129,14 @@ public void Save(string path)
118129
{
119130
string contents = ToString();
120131
string diskContents = string.Empty;
121-
if (_dataStore.FileExists(path))
132+
if (store.FileExists(path))
122133
{
123-
diskContents = _dataStore.ReadFileAsText(path);
134+
diskContents = store.ReadFileAsText(path);
124135
}
125136

126137
if (diskContents != contents)
127138
{
128-
_dataStore.WriteFile(path, contents);
139+
store.WriteFile(path, contents);
129140
}
130141
}
131142
finally
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
az resource action invoke
2+
3+
Invoke a Resource Action.
4+
5+
USAGE:
6+
7+
az resource action invoke -a <action> --resourceId <resourceId> [--parameters <parameters>] [--oDataQuery <oDataQuery>] [-f] [--apiVersion <apiVersion>] [--pre]
8+
9+
az resource action invoke -a <action> -n <resourceName> -t <resourceType> [--parameters <parameters>] [--extensionResourceName <extensionResourceName>] [--extensionResourceType <extensionResourceType>] [--oDataQuery <oDataQuery>] [-g <resourceGroupName>] [-f] [--apiVersion <apiVersion>] [--pre]
10+
11+
az resource action invoke -a <action> -n <resourceName> -t <resourceType> --tenantLevel [--parameters <parameters>] [--extensionResourceName <extensionResourceName>] [--extensionResourceType <extensionResourceType>] [--oDataQuery <oDataQuery>] [-f] [--apiVersion <apiVersion>] [--pre]
12+
13+
PARAMETERS:
14+
15+
-a (--actionName, --action)
16+
[string] The name of the action to invoke.
17+
18+
--apiVersion
19+
[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.
20+
21+
--extensionResourceName
22+
[string] The extension resource name. e.g. to specify a database MyServer/MyDatabase.
23+
24+
--extensionResourceType
25+
[string] The extension resource type. e.g. Microsoft.Sql/Servers/Databases.
26+
27+
-f (--force)
28+
[flag] Perform this action without prompting, even if permanent changes are made.
29+
30+
-g (--group, --resourceGroupName)
31+
[string] The name of the resource group containing this resource
32+
33+
-n (--name, --resourceName)
34+
[string] The resource name. e.g. to specify a database MyServer/MyDatabase.
35+
36+
--oDataQuery
37+
[string] An OData style filter which will be appended to the request in addition to any other filters.
38+
39+
--parameters (--object)
40+
[hashtable] A hash table which represents resource properties.
41+
42+
--pre
43+
[flag] When set, indicates that the cmdlet should use pre-release API versions when automatically determining which version to use.
44+
45+
--resourceId (--id)
46+
[string] The identity of this resource. Resource identity is a Uri path that uniquely identifies the resource.
47+
48+
-t (--type, --resourceType)
49+
[string] The resource type. e.g. Microsoft.Sql/Servers/Databases.
50+
51+
--tenantLevel
52+
[flag] Indicates that this is a tenant level operation.
53+
Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
az resource create
2+
3+
Create a Resource.
4+
5+
USAGE:
6+
7+
az resource create --properties <properties> --resourceId <resourceId> [-l <location>] [-k <kind>] [--planObject <planObject>] [--skuObject <skuObject>] [-t <tag>] [--isFullObject] [--oDataQuery <oDataQuery>] [-f] [--apiVersion <apiVersion>] [--pre]
8+
9+
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]
10+
11+
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]
12+
13+
PARAMETERS:
14+
15+
--apiVersion
16+
[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.
17+
18+
--extensionResourceName
19+
[string] The extension resource name. e.g. to specify a database MyServer/MyDatabase.
20+
21+
--extensionResourceType
22+
[string] The extension resource type. e.g. Microsoft.Sql/Servers/Databases.
23+
24+
-f (--force)
25+
[flag] Perform this action without prompting, even if permanent changes are made.
26+
27+
-g (--group, --resourceGroupName)
28+
[string] The name of the resource group containing this resource
29+
30+
--isFullObject
31+
[flag] When set indicates that the full object is passed in to the -PropertyObject parameter.
32+
33+
-k (--kind)
34+
[string] The resource kind.
35+
36+
-l (--location)
37+
[string] The region that will contain this resource. Possible values include 'East US', 'North Europe', 'East Asia'
38+
39+
-n (--name, --resourceName)
40+
[string] The resource name. e.g. to specify a database MyServer/MyDatabase.
41+
42+
--oDataQuery
43+
[string] An OData style filter which will be appended to the request in addition to any other filters.
44+
45+
--planObject (--plan)
46+
[hashtable] A hash table which represents resource plan properties.
47+
48+
--pre
49+
[flag] When set, indicates that the cmdlet should use pre-release API versions when automatically determining which version to use.
50+
51+
--properties (--propertyObject)
52+
[psObject] A hash table which represents resource properties.
53+
54+
--resourceId (--id)
55+
[string] The identity of this resource. Resource identity is a Uri path that uniquely identifies the resource.
56+
57+
--skuObject (--sku)
58+
[hashtable] A hash table which represents sku properties.
59+
60+
-t (--tags, --tag)
61+
[hashtable[]] A hash table which represents resource tags.
62+
63+
-t (--type, --resourceType)
64+
[string] The resource type. e.g. Microsoft.Sql/Servers/Databases.
65+
66+
--tenantLevel
67+
[flag] Indicates that this is a tenant level operation.
68+
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
az resource find
2+
3+
Find a Resource.
4+
5+
USAGE:
6+
7+
az resource find [-n <resourceNameContains>] [-t <resourceType>] [--extensionResourceType <extensionResourceType>] [--top <top>] [--oDataQuery <oDataQuery>] [--tagName <tagName>] [--tagValue <tagValue>] [-g <resourceGroupNameContains>] [--expandProperties] [--apiVersion <apiVersion>] [--pre]
8+
9+
az resource find -t <resourceType> --tenantLevel [-n <resourceNameContains>] [--extensionResourceType <extensionResourceType>] [--top <top>] [--oDataQuery <oDataQuery>] [--expandProperties] [--apiVersion <apiVersion>] [--pre]
10+
11+
az resource find -t <resourceType> [-n <resourceNameContains>] [--extensionResourceType <extensionResourceType>] [--top <top>] [--oDataQuery <oDataQuery>] [--tagName <tagName>] [--tagValue <tagValue>] [-g <resourceGroupNameContains>] [--expandProperties] [--apiVersion <apiVersion>] [--pre]
12+
13+
PARAMETERS:
14+
15+
--apiVersion
16+
[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.
17+
18+
--expandProperties
19+
[flag] When specified, expands the properties of the resource.
20+
21+
--extensionResourceType
22+
[string] The extension resource type. e.g. Microsoft.Sql/Servers/{serverName}/Databases/myDatabase.
23+
24+
-g (--resourceGroupName, --group, --resourceGroupNameContains)
25+
[string] The resource group name substring.
26+
27+
-n (--name, --resourceNameContains)
28+
[string] The resource name substring. e.g. if your resource name is testResource, you can specify test.
29+
30+
--oDataQuery
31+
[string] An OData style filter which will be appended to the request in addition to any other filters.
32+
33+
--pre
34+
[flag] When set, indicates that the cmdlet should use pre-release API versions when automatically determining which version to use.
35+
36+
-t (--type, --resourceType)
37+
[string] The resource type. e.g. Microsoft.Sql/Servers/Databases.
38+
39+
--tagName
40+
[string] The name of the tag to query by.
41+
42+
--tagValue
43+
[string] The value of the tag to query by.
44+
45+
--tenantLevel
46+
[flag] Indicates that this is a tenant level operation.
47+
48+
--top
49+
[int32] The number of resources to retrieve.
50+
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
az resource group deployment operation ls
2+
3+
Get Resource Group Deployment Operation details.
4+
5+
USAGE:
6+
7+
az resource group deployment operation ls -n <deploymentName> -g <resourceGroupName> [-s <subscriptionId>] [--apiVersion <apiVersion>] [--pre]
8+
9+
PARAMETERS:
10+
11+
--apiVersion
12+
[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.
13+
14+
-g (--group, --resourceGroupName)
15+
[string] The name of the resource group containing this resource
16+
17+
-n (--name, --deploymentName)
18+
[string] The deployment name.
19+
20+
--pre
21+
[flag] When set, indicates that the cmdlet should use pre-release API versions when automatically determining which version to use.
22+
23+
-s (--id, --subscriptionId)
24+
[guid] The subscription identity, a global unique identifier (GUID) that uniquely identifies the subscription.
25+
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
az resource group find
2+
3+
Find a Resource Group.
4+
5+
USAGE:
6+
7+
az resource group find [-t <tag>] [--apiVersion <apiVersion>] [--pre]
8+
9+
PARAMETERS:
10+
11+
--apiVersion
12+
[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.
13+
14+
--pre
15+
[flag] When set, indicates that the cmdlet should use pre-release API versions when automatically determining which version to use.
16+
17+
-t (--tag)
18+
[hashtable] The tag filter for the OData query. The expected format is @{Name = 'tagName'} or @{Name = 'tagName'; Value = 'tagValue'}.
19+
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
az resource lock create
2+
3+
Create a Resource Lock.
4+
5+
USAGE:
6+
7+
az resource lock create -n <lockName> --lockLevel <lockLevel> --resourceName <resourceName> -t <resourceType> [--lockNotes <lockNotes>] [-f] [--apiVersion <apiVersion>] [--pre]
8+
9+
az resource lock create -n <lockName> --lockLevel <lockLevel> -g <resourceGroupName> [--lockNotes <lockNotes>] [-f] [--apiVersion <apiVersion>] [--pre]
10+
11+
az resource lock create -n <lockName> --lockLevel <lockLevel> --resourceName <resourceName> -t <resourceType> -g <resourceGroupName> [--lockNotes <lockNotes>] [-f] [--apiVersion <apiVersion>] [--pre]
12+
13+
az resource lock create -n <lockName> --lockLevel <lockLevel> --scope <scope> [--lockNotes <lockNotes>] [-f] [--apiVersion <apiVersion>] [--pre]
14+
15+
az resource lock create -n <lockName> --lockLevel <lockLevel> [--lockNotes <lockNotes>] [-f] [--apiVersion <apiVersion>] [--pre]
16+
17+
az resource lock create -n <lockName> --lockLevel <lockLevel> --resourceName <resourceName> -t <resourceType> --tenantLevel [--lockNotes <lockNotes>] [-f] [--apiVersion <apiVersion>] [--pre]
18+
19+
az resource lock create --lockLevel <lockLevel> --lockId <lockId> [--lockNotes <lockNotes>] [-f] [--apiVersion <apiVersion>] [--pre]
20+
21+
PARAMETERS:
22+
23+
--apiVersion
24+
[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.
25+
26+
-f (--force)
27+
[flag] Perform this action without prompting, even if permanent changes are made.
28+
29+
-g (--group, --resourceGroupName)
30+
[string] The name of the resource group containing this resource
31+
32+
--lockId
33+
[string] The Id of the lock.
34+
35+
--lockLevel (--level)
36+
[object] The level of the lock.
37+
38+
--lockNotes (--notes)
39+
[string] The notes of the lock.
40+
41+
-n (--extensionResourceName, --name, --lockName)
42+
[string] The name of the lock.
43+
44+
--pre
45+
[flag] When set, indicates that the cmdlet should use pre-release API versions when automatically determining which version to use.
46+
47+
--resourceName
48+
[string] The resource name. e.g. to specify a database MyServer/MyDatabase.
49+
50+
--scope (--id, --resourceId)
51+
[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}'
52+
53+
-t (--type, --resourceType)
54+
[string] The resource type. e.g. Microsoft.Sql/Servers/Databases.
55+
56+
--tenantLevel
57+
[flag] Indicates that this is a tenant level operation.
58+

0 commit comments

Comments
 (0)