Skip to content

Commit 02136ad

Browse files
committed
Merge pull request #95 from huangpf/vmss
Vmss
2 parents 915d9a4 + df4e510 commit 02136ad

File tree

98 files changed

+7232
-6318
lines changed

Some content is hidden

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

98 files changed

+7232
-6318
lines changed

src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/ApiManagementClient.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1039,12 +1039,12 @@ public void PolicySetTenantLevel(PsApiManagementContext context, string format,
10391039

10401040
public void PolicySetProductLevel(PsApiManagementContext context, string format, Stream stream, string productId)
10411041
{
1042-
Client.ProductPolicy.Set(context.ResourceGroupName, context.ServiceName, productId, format, stream);
1042+
Client.ProductPolicy.Set(context.ResourceGroupName, context.ServiceName, productId, format, stream, "*");
10431043
}
10441044

10451045
public void PolicySetApiLevel(PsApiManagementContext context, string format, Stream stream, string apiId)
10461046
{
1047-
Client.ApiPolicy.Set(context.ResourceGroupName, context.ServiceName, apiId, format, stream);
1047+
Client.ApiPolicy.Set(context.ResourceGroupName, context.ServiceName, apiId, format, stream, "*");
10481048
}
10491049

10501050
public void PolicySetOperationLevel(PsApiManagementContext context, string format, Stream stream, string apiId, string operationId)

src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Commands.ApiManagement.ServiceManagement.csproj

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,7 @@
7272
</Reference>
7373
<Reference Include="Microsoft.Azure.Management.ApiManagement, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
7474
<SpecificVersion>False</SpecificVersion>
75-
<HintPath>..\..\..\packages\Microsoft.Azure.Management.ApiManagement.2.0.0-preview\lib\net40\Microsoft.Azure.Management.ApiManagement.dll</HintPath>
76-
<Private>True</Private>
75+
<HintPath>..\..\..\packages\Microsoft.Azure.Management.ApiManagement.2.0.1-preview\lib\net40\Microsoft.Azure.Management.ApiManagement.dll</HintPath>
7776
</Reference>
7877
<Reference Include="Microsoft.Azure.ResourceManager, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
7978
<SpecificVersion>False</SpecificVersion>

src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Commands/GetAzureApiManagementGroup.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ public override void ExecuteApiManagementCmdlet()
6565
{
6666
if (ParameterSetName.Equals(GetAll))
6767
{
68-
var groups = Client.GroupsList(Context, null, null, null);
68+
var groups = Client.GroupsList(Context, Name, null, null);
6969
WriteObject(groups, true);
7070
}
7171
else if (ParameterSetName.Equals(GetById))
Lines changed: 22 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,28 @@
1-
using System.Reflection;
2-
using System.Runtime.CompilerServices;
1+
// ----------------------------------------------------------------------------------
2+
//
3+
// Copyright Microsoft Corporation
4+
// Licensed under the Apache License, Version 2.0 (the "License");
5+
// you may not use this file except in compliance with the License.
6+
// You may obtain a copy of the License at
7+
// http://www.apache.org/licenses/LICENSE-2.0
8+
// Unless required by applicable law or agreed to in writing, software
9+
// distributed under the License is distributed on an "AS IS" BASIS,
10+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11+
// See the License for the specific language governing permissions and
12+
// limitations under the License.
13+
// ----------------------------------------------------------------------------------
14+
15+
using System.Reflection;
316
using System.Runtime.InteropServices;
417

518
// General Information about an assembly is controlled through the following
619
// set of attributes. Change these attribute values to modify the information
720
// associated with an assembly.
8-
[assembly: AssemblyTitle("Commands.ApiManagement")]
9-
[assembly: AssemblyDescription("")]
10-
[assembly: AssemblyConfiguration("")]
11-
[assembly: AssemblyCompany("Hewlett-Packard Company")]
12-
[assembly: AssemblyProduct("Commands.ApiManagement")]
13-
[assembly: AssemblyCopyright("Copyright © Hewlett-Packard Company 2015")]
14-
[assembly: AssemblyTrademark("")]
15-
[assembly: AssemblyCulture("")]
21+
[assembly: AssemblyTitle("Microsoft.Azure.Commands.ApiManagement.ServiceManagement")]
22+
[assembly: AssemblyCompany(Microsoft.WindowsAzure.Commands.Common.AzurePowerShell.AssemblyCompany)]
23+
[assembly: AssemblyProduct(Microsoft.WindowsAzure.Commands.Common.AzurePowerShell.AssemblyProduct)]
24+
[assembly: AssemblyCopyright(Microsoft.WindowsAzure.Commands.Common.AzurePowerShell.AssemblyCopyright)]
25+
1626

1727
// Setting ComVisible to false makes the types in this assembly not visible
1828
// to COM components. If you need to access a type in this assembly from
@@ -32,5 +42,5 @@
3242
// You can specify all the values or you can default the Build and Revision Numbers
3343
// by using the '*' as shown below:
3444
// [assembly: AssemblyVersion("1.0.*")]
35-
[assembly: AssemblyVersion("1.0.0.0")]
36-
[assembly: AssemblyFileVersion("1.0.0.0")]
45+
[assembly: AssemblyVersion(Microsoft.WindowsAzure.Commands.Common.AzurePowerShell.AssemblyVersion)]
46+
[assembly: AssemblyFileVersion(Microsoft.WindowsAzure.Commands.Common.AzurePowerShell.AssemblyFileVersion)]

src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/packages.config

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<package id="Microsoft.Azure.Common.Authentication" version="1.4.1-preview" targetFramework="net45" />
77
<package id="Microsoft.Azure.Common.Dependencies" version="1.0.0" targetFramework="net45" />
88
<package id="Microsoft.Azure.KeyVault.Core" version="1.0.0" targetFramework="net45" />
9-
<package id="Microsoft.Azure.Management.ApiManagement" version="2.0.0-preview" targetFramework="net45" />
9+
<package id="Microsoft.Azure.Management.ApiManagement" version="2.0.1-preview" targetFramework="net45" />
1010
<package id="Microsoft.Azure.Management.Resources" version="2.18.7-preview" targetFramework="net45" />
1111
<package id="Microsoft.Bcl" version="1.1.9" targetFramework="net45" />
1212
<package id="Microsoft.Bcl.Async" version="1.0.168" targetFramework="net45" />

src/ResourceManager/ApiManagement/Commands.ApiManagement.Test/Commands.ApiManagement.Test.csproj

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,7 @@
5555
</Reference>
5656
<Reference Include="Microsoft.Azure.Management.ApiManagement, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
5757
<SpecificVersion>False</SpecificVersion>
58-
<HintPath>..\..\..\packages\Microsoft.Azure.Management.ApiManagement.2.0.0-preview\lib\net40\Microsoft.Azure.Management.ApiManagement.dll</HintPath>
59-
<Private>True</Private>
58+
<HintPath>..\..\..\packages\Microsoft.Azure.Management.ApiManagement.2.0.1-preview\lib\net40\Microsoft.Azure.Management.ApiManagement.dll</HintPath>
6059
</Reference>
6160
<Reference Include="Microsoft.Azure.Management.Authorization">
6261
<SpecificVersion>False</SpecificVersion>
@@ -156,6 +155,10 @@
156155
<Compile Include="UnitTests\PsApiManagementTests.cs" />
157156
</ItemGroup>
158157
<ItemGroup>
158+
<ProjectReference Include="..\..\..\Common\Commands.Common\Commands.Common.csproj">
159+
<Project>{5ee72c53-1720-4309-b54b-5fb79703195f}</Project>
160+
<Name>Commands.Common</Name>
161+
</ProjectReference>
159162
<ProjectReference Include="..\..\Common\Commands.ScenarioTests.ResourceManager.Common\Commands.ScenarioTests.ResourceManager.Common.csproj">
160163
<Project>{3436a126-edc9-4060-8952-9a1be34cdd95}</Project>
161164
<Name>Commands.ScenarioTests.ResourceManager.Common</Name>
Lines changed: 20 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,27 @@
1-
using System.Reflection;
2-
using System.Runtime.CompilerServices;
1+
// ----------------------------------------------------------------------------------
2+
//
3+
// Copyright Microsoft Corporation
4+
// Licensed under the Apache License, Version 2.0 (the "License");
5+
// you may not use this file except in compliance with the License.
6+
// You may obtain a copy of the License at
7+
// http://www.apache.org/licenses/LICENSE-2.0
8+
// Unless required by applicable law or agreed to in writing, software
9+
// distributed under the License is distributed on an "AS IS" BASIS,
10+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11+
// See the License for the specific language governing permissions and
12+
// limitations under the License.
13+
// ----------------------------------------------------------------------------------
14+
15+
using System.Reflection;
316
using System.Runtime.InteropServices;
4-
using Xunit;
517

618
// General Information about an assembly is controlled through the following
719
// set of attributes. Change these attribute values to modify the information
820
// associated with an assembly.
921
[assembly: AssemblyTitle("Microsoft.Azure.Commands.ApiManagement.Test")]
10-
[assembly: AssemblyDescription("")]
11-
[assembly: AssemblyConfiguration("")]
12-
[assembly: AssemblyCompany("Mcrosoft")]
13-
[assembly: AssemblyProduct("Microsoft.Azure.Commands.ApiManagement.Test")]
14-
[assembly: AssemblyCopyright("Copyright © Microsoft 2015")]
15-
[assembly: AssemblyTrademark("")]
16-
[assembly: AssemblyCulture("")]
22+
[assembly: AssemblyCompany(Microsoft.WindowsAzure.Commands.Common.AzurePowerShell.AssemblyCompany)]
23+
[assembly: AssemblyProduct(Microsoft.WindowsAzure.Commands.Common.AzurePowerShell.AssemblyProduct)]
24+
[assembly: AssemblyCopyright(Microsoft.WindowsAzure.Commands.Common.AzurePowerShell.AssemblyCopyright)]
1725

1826
// Setting ComVisible to false makes the types in this assembly not visible
1927
// to COM components. If you need to access a type in this assembly from
@@ -33,5 +41,5 @@
3341
// You can specify all the values or you can default the Build and Revision Numbers
3442
// by using the '*' as shown below:
3543
// [assembly: AssemblyVersion("1.0.*")]
36-
[assembly: AssemblyVersion("1.0.0.0")]
37-
[assembly: AssemblyFileVersion("1.0.0.0")]
44+
[assembly: AssemblyVersion(Microsoft.WindowsAzure.Commands.Common.AzurePowerShell.AssemblyVersion)]
45+
[assembly: AssemblyFileVersion(Microsoft.WindowsAzure.Commands.Common.AzurePowerShell.AssemblyFileVersion)]

src/ResourceManager/ApiManagement/Commands.ApiManagement.Test/ScenarioTests/ApiManagementTests.ps1

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,18 @@
1-
<#
1+
# ----------------------------------------------------------------------------------
2+
#
3+
# Copyright Microsoft Corporation
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
# Unless required by applicable law or agreed to in writing, software
9+
# distributed under the License is distributed on an "AS IS" BASIS,
10+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11+
# See the License for the specific language governing permissions and
12+
# limitations under the License.
13+
# ----------------------------------------------------------------------------------
14+
15+
<#
216
.SYNOPSIS
317
Tests API Management Create List Remove operations.
418
#>

src/ResourceManager/ApiManagement/Commands.ApiManagement.Test/ScenarioTests/Common.ps1

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -50,25 +50,25 @@ Gets all locations for a provider
5050
#>
5151
function Get-ProviderLocations($provider)
5252
{
53-
if ([Microsoft.Azure.Test.HttpRecorder.HttpMockServer]::Mode -ne [Microsoft.Azure.Test.HttpRecorder.HttpRecorderMode]::Playback)
54-
{
55-
$namespace = $provider.Split("/")[0]
56-
if($provider.Contains("/"))
57-
{
58-
$type = $provider.Substring($namespace.Length + 1)
59-
$location = Get-AzureRmResourceProvider -ProviderNamespace $namespace | where {$_.ResourceTypes[0].ResourceTypeName -eq $type}
53+
if ([Microsoft.Azure.Test.HttpRecorder.HttpMockServer]::Mode -ne [Microsoft.Azure.Test.HttpRecorder.HttpRecorderMode]::Playback)
54+
{
55+
$namespace = $provider.Split("/")[0]
56+
if($provider.Contains("/"))
57+
{
58+
$type = $provider.Substring($namespace.Length + 1)
59+
$location = Get-AzureRmResourceProvider -ProviderNamespace $namespace | where {$_.ResourceTypes[0].ResourceTypeName -eq $type}
6060

61-
if ($location -eq $null)
62-
{
63-
return @("Central US", "East US")
64-
} else
65-
{
66-
return $location.Locations
67-
}
68-
}
69-
70-
return @("Central US", "East US")
71-
}
61+
if ($location -eq $null)
62+
{
63+
return @("Central US", "East US")
64+
} else
65+
{
66+
return $location.Locations
67+
}
68+
}
69+
70+
return @("Central US", "East US")
71+
}
7272

73-
return @("Central US", "East US")
73+
return @("Central US", "East US")
7474
}

src/ResourceManager/ApiManagement/Commands.ApiManagement.Test/packages.config

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,8 @@
44
<package id="Microsoft.Azure.Common" version="2.1.0" targetFramework="net45" />
55
<package id="Microsoft.Azure.Common.Authentication" version="1.4.1-preview" targetFramework="net45" />
66
<package id="Microsoft.Azure.Common.Dependencies" version="1.0.0" targetFramework="net45" />
7-
<package id="Microsoft.Azure.Management.ApiManagement" version="2.0.0-preview" targetFramework="net45" />
8-
<package id="Microsoft.Azure.Management.Resources" version="2.18.7-preview" targetFramework="net45" />
97
<package id="Microsoft.Azure.Management.Authorization" version="1.0.0" targetFramework="net45" />
8+
<package id="Microsoft.Azure.Management.ApiManagement" version="2.0.1-preview" targetFramework="net45" />
109
<package id="Microsoft.Azure.Management.Resources" version="2.18.7-preview" targetFramework="net45" />
1110
<package id="Microsoft.Azure.Management.Storage" version="3.0.0" targetFramework="net45" />
1211
<package id="Microsoft.Azure.Test.Framework" version="1.0.5799.28345-prerelease" targetFramework="net45" />
@@ -24,4 +23,4 @@
2423
<package id="Newtonsoft.Json" version="6.0.8" targetFramework="net45" />
2524
<package id="xunit" version="1.9.2" targetFramework="net45" />
2625
<package id="xunit.extensions" version="1.9.2" targetFramework="net45" />
27-
</packages>
26+
</packages>

src/ResourceManager/ApiManagement/Commands.ApiManagement/Commands.ApiManagement.csproj

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,7 @@
7171
</Reference>
7272
<Reference Include="Microsoft.Azure.Management.ApiManagement, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
7373
<SpecificVersion>False</SpecificVersion>
74-
<HintPath>..\..\..\packages\Microsoft.Azure.Management.ApiManagement.2.0.0-preview\lib\net40\Microsoft.Azure.Management.ApiManagement.dll</HintPath>
75-
<Private>True</Private>
74+
<HintPath>..\..\..\packages\Microsoft.Azure.Management.ApiManagement.2.0.1-preview\lib\net40\Microsoft.Azure.Management.ApiManagement.dll</HintPath>
7675
</Reference>
7776
<Reference Include="Microsoft.Azure.ResourceManager, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
7877
<SpecificVersion>False</SpecificVersion>
Lines changed: 21 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,27 @@
1-
using System.Reflection;
2-
using System.Runtime.CompilerServices;
1+
// ----------------------------------------------------------------------------------
2+
//
3+
// Copyright Microsoft Corporation
4+
// Licensed under the Apache License, Version 2.0 (the "License");
5+
// you may not use this file except in compliance with the License.
6+
// You may obtain a copy of the License at
7+
// http://www.apache.org/licenses/LICENSE-2.0
8+
// Unless required by applicable law or agreed to in writing, software
9+
// distributed under the License is distributed on an "AS IS" BASIS,
10+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11+
// See the License for the specific language governing permissions and
12+
// limitations under the License.
13+
// ----------------------------------------------------------------------------------
14+
15+
using System.Reflection;
316
using System.Runtime.InteropServices;
417

518
// General Information about an assembly is controlled through the following
619
// set of attributes. Change these attribute values to modify the information
720
// associated with an assembly.
8-
[assembly: AssemblyTitle("Commands.ApiManagement")]
9-
[assembly: AssemblyDescription("")]
10-
[assembly: AssemblyConfiguration("")]
11-
[assembly: AssemblyCompany("Hewlett-Packard Company")]
12-
[assembly: AssemblyProduct("Commands.ApiManagement")]
13-
[assembly: AssemblyCopyright("Copyright © Hewlett-Packard Company 2015")]
14-
[assembly: AssemblyTrademark("")]
15-
[assembly: AssemblyCulture("")]
21+
[assembly: AssemblyTitle("Microsoft.Azure.Commands.ApiManagement")]
22+
[assembly: AssemblyCompany(Microsoft.WindowsAzure.Commands.Common.AzurePowerShell.AssemblyCompany)]
23+
[assembly: AssemblyProduct(Microsoft.WindowsAzure.Commands.Common.AzurePowerShell.AssemblyProduct)]
24+
[assembly: AssemblyCopyright(Microsoft.WindowsAzure.Commands.Common.AzurePowerShell.AssemblyCopyright)]
1625

1726
// Setting ComVisible to false makes the types in this assembly not visible
1827
// to COM components. If you need to access a type in this assembly from
@@ -32,5 +41,5 @@
3241
// You can specify all the values or you can default the Build and Revision Numbers
3342
// by using the '*' as shown below:
3443
// [assembly: AssemblyVersion("1.0.*")]
35-
[assembly: AssemblyVersion("1.0.0.0")]
36-
[assembly: AssemblyFileVersion("1.0.0.0")]
44+
[assembly: AssemblyVersion(Microsoft.WindowsAzure.Commands.Common.AzurePowerShell.AssemblyVersion)]
45+
[assembly: AssemblyFileVersion(Microsoft.WindowsAzure.Commands.Common.AzurePowerShell.AssemblyFileVersion)]

src/ResourceManager/ApiManagement/Commands.ApiManagement/packages.config

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<package id="Microsoft.Azure.Common.Authentication" version="1.4.1-preview" targetFramework="net45" />
77
<package id="Microsoft.Azure.Common.Dependencies" version="1.0.0" targetFramework="net45" />
88
<package id="Microsoft.Azure.KeyVault.Core" version="1.0.0" targetFramework="net45" />
9-
<package id="Microsoft.Azure.Management.ApiManagement" version="2.0.0-preview" targetFramework="net45" />
9+
<package id="Microsoft.Azure.Management.ApiManagement" version="2.0.1-preview" targetFramework="net45" />
1010
<package id="Microsoft.Azure.Management.Resources" version="2.18.7-preview" targetFramework="net45" />
1111
<package id="Microsoft.Bcl" version="1.1.9" targetFramework="net45" />
1212
<package id="Microsoft.Bcl.Async" version="1.0.168" targetFramework="net45" />

src/ResourceManager/ApiManagement/Commands.SMAPI.Test/Commands.ApiManagement.ServiceManagement.Test.csproj

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,7 @@
5555
</Reference>
5656
<Reference Include="Microsoft.Azure.Management.ApiManagement, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
5757
<SpecificVersion>False</SpecificVersion>
58-
<HintPath>..\..\..\packages\Microsoft.Azure.Management.ApiManagement.2.0.0-preview\lib\net40\Microsoft.Azure.Management.ApiManagement.dll</HintPath>
59-
<Private>True</Private>
58+
<HintPath>..\..\..\packages\Microsoft.Azure.Management.ApiManagement.2.0.1-preview\lib\net40\Microsoft.Azure.Management.ApiManagement.dll</HintPath>
6059
</Reference>
6160
<Reference Include="Microsoft.Azure.Management.Authorization">
6261
<SpecificVersion>False</SpecificVersion>
@@ -158,6 +157,10 @@
158157
<Compile Include="ScenarioTests\TestsFixture.cs" />
159158
</ItemGroup>
160159
<ItemGroup>
160+
<ProjectReference Include="..\..\..\Common\Commands.Common\Commands.Common.csproj">
161+
<Project>{5ee72c53-1720-4309-b54b-5fb79703195f}</Project>
162+
<Name>Commands.Common</Name>
163+
</ProjectReference>
161164
<ProjectReference Include="..\..\Common\Commands.ScenarioTests.ResourceManager.Common\Commands.ScenarioTests.ResourceManager.Common.csproj">
162165
<Project>{3436a126-edc9-4060-8952-9a1be34cdd95}</Project>
163166
<Name>Commands.ScenarioTests.ResourceManager.Common</Name>

0 commit comments

Comments
 (0)