Skip to content

Commit 7c9753b

Browse files
unknownunknown
authored andcommitted
Update Publish Extension cmdlet and tests
1 parent 1b3dc61 commit 7c9753b

File tree

57 files changed

+1232
-69
lines changed

Some content is hidden

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

57 files changed

+1232
-69
lines changed

src/Common/Commands.Common.Test/Commands.Common.Test.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@
107107
<HintPath>..\..\packages\Microsoft.WindowsAzure.Management.4.1.1\lib\net40\Microsoft.WindowsAzure.Management.dll</HintPath>
108108
</Reference>
109109
<Reference Include="Microsoft.WindowsAzure.Management.Compute">
110-
<HintPath>..\..\packages\Microsoft.WindowsAzure.Management.Compute.12.2.0-preview\lib\net40\Microsoft.WindowsAzure.Management.Compute.dll</HintPath>
110+
<HintPath>..\..\packages\Microsoft.WindowsAzure.Management.Compute.12.3.1\lib\net40\Microsoft.WindowsAzure.Management.Compute.dll</HintPath>
111111
</Reference>
112112
<Reference Include="Microsoft.WindowsAzure.Management.Storage">
113113
<HintPath>..\..\packages\Microsoft.WindowsAzure.Management.Storage.5.1.1\lib\net40\Microsoft.WindowsAzure.Management.Storage.dll</HintPath>

src/Common/Commands.Common.Test/packages.config

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
<package id="Microsoft.Net.Http" version="2.2.28" targetFramework="net45" />
1717
<package id="Microsoft.WindowsAzure.ConfigurationManager" version="2.0.3" targetFramework="net45" />
1818
<package id="Microsoft.WindowsAzure.Management" version="4.1.1" targetFramework="net45" />
19-
<package id="Microsoft.WindowsAzure.Management.Compute" version="12.2.0-preview" targetFramework="net45" />
19+
<package id="Microsoft.WindowsAzure.Management.Compute" version="12.3.1" targetFramework="net45" />
2020
<package id="Microsoft.WindowsAzure.Management.Storage" version="5.1.1" targetFramework="net45" />
2121
<package id="Moq" version="4.2.1402.2112" targetFramework="net45" />
2222
<package id="Newtonsoft.Json" version="6.0.4" targetFramework="net45" />

src/Common/Commands.ScenarioTest/Commands.ScenarioTest.csproj

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,8 +102,9 @@
102102
<Reference Include="Microsoft.WindowsAzure.Management">
103103
<HintPath>..\..\packages\Microsoft.WindowsAzure.Management.4.1.1\lib\net40\Microsoft.WindowsAzure.Management.dll</HintPath>
104104
</Reference>
105-
<Reference Include="Microsoft.WindowsAzure.Management.Compute">
106-
<HintPath>..\..\packages\Microsoft.WindowsAzure.Management.Compute.12.2.0-preview\lib\net40\Microsoft.WindowsAzure.Management.Compute.dll</HintPath>
105+
<Reference Include="Microsoft.WindowsAzure.Management.Compute, Version=12.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
106+
<SpecificVersion>False</SpecificVersion>
107+
<HintPath>..\..\packages\Microsoft.WindowsAzure.Management.Compute.12.3.1\lib\net40\Microsoft.WindowsAzure.Management.Compute.dll</HintPath>
107108
</Reference>
108109
<Reference Include="Microsoft.WindowsAzure.Management.Network, Version=7.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
109110
<HintPath>..\..\packages\Microsoft.WindowsAzure.Management.Network.7.0.0\lib\net40\Microsoft.WindowsAzure.Management.Network.dll</HintPath>

src/Common/Commands.ScenarioTest/packages.config

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
<package id="Microsoft.Net.Http" version="2.2.28" targetFramework="net45" />
1818
<package id="Microsoft.WindowsAzure.ConfigurationManager" version="2.0.3" targetFramework="net45" />
1919
<package id="Microsoft.WindowsAzure.Management" version="4.1.1" targetFramework="net45" />
20-
<package id="Microsoft.WindowsAzure.Management.Compute" version="12.2.0-preview" targetFramework="net45" />
20+
<package id="Microsoft.WindowsAzure.Management.Compute" version="12.3.1" targetFramework="net45" />
2121
<package id="Microsoft.WindowsAzure.Management.Network" version="7.0.0" targetFramework="net45" />
2222
<package id="Microsoft.WindowsAzure.Management.Storage" version="5.1.1" targetFramework="net45" />
2323
<package id="Microsoft.WindowsAzure.Management.WebSites" version="4.4.2-prerelease" targetFramework="net45" />

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@
101101
</Reference>
102102
<Reference Include="Microsoft.WindowsAzure.Management.Compute, Version=12.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
103103
<SpecificVersion>False</SpecificVersion>
104-
<HintPath>..\..\..\packages\Microsoft.WindowsAzure.Management.Compute.12.2.0-preview\lib\net40\Microsoft.WindowsAzure.Management.Compute.dll</HintPath>
104+
<HintPath>..\..\..\packages\Microsoft.WindowsAzure.Management.Compute.12.3.1\lib\net40\Microsoft.WindowsAzure.Management.Compute.dll</HintPath>
105105
</Reference>
106106
<Reference Include="Microsoft.WindowsAzure.Management.Storage, Version=5.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
107107
<SpecificVersion>False</SpecificVersion>

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
<package id="Microsoft.IdentityModel.Clients.ActiveDirectory" version="2.14.201151115" targetFramework="net45" />
1616
<package id="Microsoft.Net.Http" version="2.2.28" targetFramework="net45" />
1717
<package id="Microsoft.WindowsAzure.Management" version="4.1.1" targetFramework="net45" />
18-
<package id="Microsoft.WindowsAzure.Management.Compute" version="12.2.0-preview" targetFramework="net45" />
18+
<package id="Microsoft.WindowsAzure.Management.Compute" version="12.3.1" targetFramework="net45" />
1919
<package id="Microsoft.WindowsAzure.Management.Storage" version="5.1.1" targetFramework="net45" />
2020
<package id="Newtonsoft.Json" version="6.0.4" targetFramework="net45" />
2121
<package id="xunit" version="1.9.2" targetFramework="net45" />

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@
101101
</Reference>
102102
<Reference Include="Microsoft.WindowsAzure.Management.Compute, Version=12.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
103103
<SpecificVersion>False</SpecificVersion>
104-
<HintPath>..\..\..\packages\Microsoft.WindowsAzure.Management.Compute.12.2.0-preview\lib\net40\Microsoft.WindowsAzure.Management.Compute.dll</HintPath>
104+
<HintPath>..\..\..\packages\Microsoft.WindowsAzure.Management.Compute.12.3.1\lib\net40\Microsoft.WindowsAzure.Management.Compute.dll</HintPath>
105105
</Reference>
106106
<Reference Include="Microsoft.WindowsAzure.Management.Storage, Version=5.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
107107
<SpecificVersion>False</SpecificVersion>

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
<package id="Microsoft.IdentityModel.Clients.ActiveDirectory" version="2.14.201151115" targetFramework="net45" />
1616
<package id="Microsoft.Net.Http" version="2.2.28" targetFramework="net45" />
1717
<package id="Microsoft.WindowsAzure.Management" version="4.1.1" targetFramework="net45" />
18-
<package id="Microsoft.WindowsAzure.Management.Compute" version="12.2.0-preview" targetFramework="net45" />
18+
<package id="Microsoft.WindowsAzure.Management.Compute" version="12.3.1" targetFramework="net45" />
1919
<package id="Microsoft.WindowsAzure.Management.Storage" version="5.1.1" targetFramework="net45" />
2020
<package id="Newtonsoft.Json" version="6.0.4" targetFramework="net45" />
2121
<package id="xunit" version="1.9.2" targetFramework="net45" />

src/ResourceManager/Automation/Commands.Automation.Test/Commands.ResourceManagement.Automation.Test.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<ProductVersion>
77
</ProductVersion>
88
<SchemaVersion>2.0</SchemaVersion>
9-
<ProjectGuid>{127D0D51-FDEA-4E1A-8CD8-34DEB5C2F7F6}</ProjectGuid>
9+
<ProjectGuid>{59D1B5DC-9175-43EC-90C6-CBA601B3565F}</ProjectGuid>
1010
<OutputType>Library</OutputType>
1111
<AppDesignerFolder>Properties</AppDesignerFolder>
1212
<RootNamespace>Microsoft.Azure.Commands.ResourceManager.Automation.Test</RootNamespace>

src/ServiceManagement/Compute/Commands.ServiceManagement.Extensions.Test/Commands.ServiceManagement.Extensions.Test.csproj

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,8 +79,9 @@
7979
<Reference Include="Microsoft.WindowsAzure.Management">
8080
<HintPath>..\..\..\packages\Microsoft.WindowsAzure.Management.4.1.1\lib\net40\Microsoft.WindowsAzure.Management.dll</HintPath>
8181
</Reference>
82-
<Reference Include="Microsoft.WindowsAzure.Management.Compute">
83-
<HintPath>..\..\..\packages\Microsoft.WindowsAzure.Management.Compute.12.2.0-preview\lib\net40\Microsoft.WindowsAzure.Management.Compute.dll</HintPath>
82+
<Reference Include="Microsoft.WindowsAzure.Management.Compute, Version=12.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
83+
<SpecificVersion>False</SpecificVersion>
84+
<HintPath>..\..\..\packages\Microsoft.WindowsAzure.Management.Compute.12.3.1\lib\net40\Microsoft.WindowsAzure.Management.Compute.dll</HintPath>
8485
</Reference>
8586
<Reference Include="Newtonsoft.Json, Version=6.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
8687
<SpecificVersion>False</SpecificVersion>

src/ServiceManagement/Compute/Commands.ServiceManagement.Extensions.Test/packages.config

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
<package id="Microsoft.IdentityModel.Clients.ActiveDirectory" version="2.14.201151115" targetFramework="net45" />
1212
<package id="Microsoft.Net.Http" version="2.2.28" targetFramework="net45" />
1313
<package id="Microsoft.WindowsAzure.Management" version="4.1.1" targetFramework="net45" />
14-
<package id="Microsoft.WindowsAzure.Management.Compute" version="12.2.0-preview" targetFramework="net45" />
14+
<package id="Microsoft.WindowsAzure.Management.Compute" version="12.3.1" targetFramework="net45" />
1515
<package id="Newtonsoft.Json" version="6.0.4" targetFramework="net45" />
1616
<package id="xunit.runner.visualstudio" version="2.0.0" targetFramework="net45" />
1717
</packages>

src/ServiceManagement/Compute/Commands.ServiceManagement.PlatformImageRepository/Commands.ServiceManagement.PlatformImageRepository.csproj

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,8 @@
112112
<HintPath>..\..\..\packages\Microsoft.WindowsAzure.Management.4.1.1\lib\net40\Microsoft.WindowsAzure.Management.dll</HintPath>
113113
</Reference>
114114
<Reference Include="Microsoft.WindowsAzure.Management.Compute">
115-
<HintPath>..\..\..\packages\Microsoft.WindowsAzure.Management.Compute.12.2.0-preview\lib\net40\Microsoft.WindowsAzure.Management.Compute.dll</HintPath>
115+
<SpecificVersion>False</SpecificVersion>
116+
<HintPath>..\..\..\packages\Microsoft.WindowsAzure.Management.Compute.12.3.1\lib\net40\Microsoft.WindowsAzure.Management.Compute.dll</HintPath>
116117
</Reference>
117118
<Reference Include="Microsoft.WindowsAzure.Management.Storage">
118119
<HintPath>..\..\..\packages\Microsoft.WindowsAzure.Management.Storage.5.1.1\lib\net40\Microsoft.WindowsAzure.Management.Storage.dll</HintPath>
@@ -163,6 +164,7 @@
163164
<Compile Include="ImagePublishing\RemoveAzurePlatformVMImage.cs" />
164165
<Compile Include="ImagePublishing\GetAzurePlatformVMImage.cs" />
165166
<Compile Include="ImagePublishing\SetAzurePlatformVMImage.cs" />
167+
<Compile Include="Model\ExtensionInstanceInputEndpoint.cs" />
166168
<Compile Include="Model\ExtensionInternalEndpoint.cs" />
167169
<Compile Include="Model\ExtensionInputEndpoint.cs" />
168170
<Compile Include="Model\ExtensionLocalResourceConfig.cs" />

src/ServiceManagement/Compute/Commands.ServiceManagement.PlatformImageRepository/ExtensionPublishing/NewAzurePlatformExtensionCertificateConfig.cs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,21 +39,23 @@ public class NewAzurePlatformExtensionCertificateConfigCommand : PSCmdlet
3939
public string StoreLocation { get; set; }
4040

4141
[Parameter(
42-
Mandatory = true,
42+
Mandatory = false,
4343
Position = 1,
4444
ValueFromPipelineByPropertyName = true,
4545
HelpMessage = "The Extension Certificate Store Name.")]
46+
[ValidateNotNullOrEmpty]
4647
public string StoreName { get; set; }
4748

4849
[Parameter(
49-
Mandatory = true,
50+
Mandatory = false,
5051
Position = 2,
5152
ValueFromPipelineByPropertyName = true,
5253
HelpMessage = "The Extension Certificate Thumbprint Algorithm.")]
54+
[ValidateNotNullOrEmpty]
5355
public string ThumbprintAlgorithm { get; set; }
5456

5557
[Parameter(
56-
Mandatory = true,
58+
Mandatory = false,
5759
Position = 3,
5860
ValueFromPipelineByPropertyName = true,
5961
HelpMessage = "The Extension Certificate Thumbprint Requirement.")]

src/ServiceManagement/Compute/Commands.ServiceManagement.PlatformImageRepository/ExtensionPublishing/PublishAzurePlatformExtension.cs

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -200,12 +200,23 @@ public class PublishAzurePlatformExtensionCommand : ServiceManagementBaseCmdlet
200200
[ValidateNotNullOrEmpty]
201201
public string SupportedOS { get; set; }
202202

203+
[Parameter(
204+
Mandatory = false,
205+
Position = 22,
206+
HelpMessage = "To force the registration operation.")]
207+
public string Regions { get; set; }
208+
203209
[Parameter(
204210
Mandatory = false,
205-
Position = 22,
211+
Position = 23,
206212
HelpMessage = "To force the registration operation.")]
207213
public SwitchParameter Force { get; set; }
208214

215+
[Parameter(
216+
Mandatory = false,
217+
Position = 24,
218+
HelpMessage = "To force the registration operation.")]
219+
[ValidateSet(PublicModeStr, InternalModeStr, IgnoreCase = true)]
209220
public string ExtensionMode { get; set; }
210221

211222
protected override void OnProcessRecord()
@@ -225,9 +236,7 @@ protected override void OnProcessRecord()
225236
var upgradeCnfm = Resources.ExtensionUpgradingConfirmation;
226237
var upgradeCptn = Resources.ExtensionUpgradingCaption;
227238

228-
this.IsInternalExtension = string.Equals(this.ExtensionMode, PublicModeStr) ? false
229-
: string.Equals(this.ExtensionMode, InternalModeStr) ? true
230-
: true;
239+
this.IsInternalExtension = ! this.ExtensionMode.Equals(PublicModeStr, StringComparison.InvariantCultureIgnoreCase);
231240

232241
if (found && (this.Force.IsPresent || this.ShouldContinue(upgradeCnfm, upgradeCptn)))
233242
{

src/ServiceManagement/Compute/Commands.ServiceManagement.PlatformImageRepository/ExtensionPublishing/RemoveAzurePlatformExtensionEndpoint.cs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ public class RemoveAzurePlatformExtensionEndpointCommand : PSCmdlet
3232
protected const string AzurePlatformExtensionEndpointCommandNoun = "AzurePlatformExtensionEndpoint";
3333
protected const string InputEndpointParamSetStr = "InputEndpoint";
3434
protected const string InternalEndpointParamSetStr = "InternalEndpoint";
35+
protected const string InstanceInputEndpointParamSetStr = "InstanceInputEndpoint";
3536

3637
[Parameter(
3738
Mandatory = true,
@@ -56,6 +57,14 @@ public class RemoveAzurePlatformExtensionEndpointCommand : PSCmdlet
5657
HelpMessage = "The Internal Endpoint Name.")]
5758
public string InternalEndpointName { get; set; }
5859

60+
[Parameter(
61+
ParameterSetName = InstanceInputEndpointParamSetStr,
62+
Mandatory = true,
63+
Position = 1,
64+
ValueFromPipelineByPropertyName = true,
65+
HelpMessage = "The Instance Input Endpoint Name.")]
66+
public string InstanceInputEndpointName { get; set; }
67+
5968
protected override void ProcessRecord()
6069
{
6170
if (this.EndpointConfig != null)

src/ServiceManagement/Compute/Commands.ServiceManagement.PlatformImageRepository/ExtensionPublishing/SetAzurePlatformExtensionEndpoint.cs

Lines changed: 67 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@
1212
// limitations under the License.
1313
// ----------------------------------------------------------------------------------
1414

15+
using Microsoft.WindowsAzure.Commands.ServiceManagement.PlatformImageRepository.Model;
1516
using System.Collections.Generic;
1617
using System.Management.Automation;
17-
using Microsoft.WindowsAzure.Commands.ServiceManagement.PlatformImageRepository.Model;
1818

1919
namespace Microsoft.WindowsAzure.Commands.ServiceManagement.PlatformImageRepository.ExtensionPublishing
2020
{
@@ -26,12 +26,13 @@ namespace Microsoft.WindowsAzure.Commands.ServiceManagement.PlatformImageReposit
2626
AzurePlatformExtensionEndpointCommandNoun,
2727
DefaultParameterSetName = InputEndpointParamSetStr),
2828
OutputType(
29-
typeof(ExtensionLocalResourceConfigSet))]
29+
typeof(ExtensionEndpointConfigSet))]
3030
public class SetAzurePlatformExtensionEndpointCommand : PSCmdlet
3131
{
3232
protected const string AzurePlatformExtensionEndpointCommandNoun = "AzurePlatformExtensionEndpoint";
3333
protected const string InputEndpointParamSetStr = "InputEndpoint";
3434
protected const string InternalEndpointParamSetStr = "InternalEndpoint";
35+
protected const string InstanceInputEndpointParamSetStr = "InstanceInputEndpoint";
3536

3637
[Parameter(
3738
Mandatory = true,
@@ -57,27 +58,68 @@ public class SetAzurePlatformExtensionEndpointCommand : PSCmdlet
5758
HelpMessage = "The Internal Endpoint Name.")]
5859
public string InternalEndpointName { get; set; }
5960

61+
[Parameter(
62+
ParameterSetName = InstanceInputEndpointParamSetStr,
63+
Mandatory = true,
64+
Position = 1,
65+
ValueFromPipelineByPropertyName = true,
66+
HelpMessage = "The Instance Input Endpoint Name.")]
67+
public string InstanceInputEndpointName { get; set; }
68+
6069
[Parameter(
6170
Mandatory = true,
6271
Position = 2,
6372
ValueFromPipelineByPropertyName = true,
64-
HelpMessage = "The Internal Endpoint Port.")]
65-
public int Port { get; set; }
73+
HelpMessage = "Protocol Name.")]
74+
[ValidateSet("tcp", "udp", "http", "https", IgnoreCase = true)]
75+
public string Protocol { get; set; }
6676

6777
[Parameter(
6878
Mandatory = true,
79+
ParameterSetName = InputEndpointParamSetStr,
80+
Position = 3,
81+
ValueFromPipelineByPropertyName = true,
82+
HelpMessage = "Port for External Endpoint.")]
83+
[Parameter(
84+
Mandatory = true,
85+
ParameterSetName = InternalEndpointParamSetStr,
6986
Position = 3,
7087
ValueFromPipelineByPropertyName = true,
71-
HelpMessage = "The Internal Endpoint Name.")]
72-
public string Protocol { get; set; }
88+
HelpMessage = "Port for External Endpoint.")]
89+
[ValidateRange(1, 65535)]
90+
public int Port { get; set; }
7391

7492
[Parameter(
7593
ParameterSetName = InputEndpointParamSetStr,
7694
Mandatory = true,
7795
Position = 4,
7896
ValueFromPipelineByPropertyName = true,
79-
HelpMessage = "The Input Endpoint Port.")]
80-
public int LocalPort { get; set; }
97+
HelpMessage = "Local Port for Input Endpoint.")]
98+
[Parameter(
99+
ParameterSetName = InstanceInputEndpointParamSetStr,
100+
Mandatory = true,
101+
Position = 4,
102+
ValueFromPipelineByPropertyName = true,
103+
HelpMessage = "Local Port for Instanc Endpoint.")]
104+
public string LocalPort { get; set; }
105+
106+
[Parameter(
107+
ParameterSetName = InstanceInputEndpointParamSetStr,
108+
Mandatory = true,
109+
Position = 5,
110+
ValueFromPipelineByPropertyName = true,
111+
HelpMessage = "Min Port Value for Instance Input Endpoint Port Range.")]
112+
[ValidateRange(1, 65535)]
113+
public int FixedPortMin { get; set; }
114+
115+
[Parameter(
116+
ParameterSetName = InstanceInputEndpointParamSetStr,
117+
Mandatory = true,
118+
Position = 6,
119+
ValueFromPipelineByPropertyName = true,
120+
HelpMessage = "Max Port Value for Instance Input Endpoint Port Range.")]
121+
[ValidateRange(1, 65535)]
122+
public int FixedPortMax { get; set; }
81123

82124
protected override void ProcessRecord()
83125
{
@@ -117,6 +159,23 @@ protected override void ProcessRecord()
117159
});
118160
}
119161

162+
if (!string.IsNullOrEmpty(this.InstanceInputEndpointName))
163+
{
164+
if (this.EndpointConfig.InstanceInputEndpoints == null)
165+
{
166+
this.EndpointConfig.InstanceInputEndpoints = new List<ExtensionInstanceInputEndpoint>();
167+
}
168+
169+
this.EndpointConfig.InstanceInputEndpoints.Add(new ExtensionInstanceInputEndpoint
170+
{
171+
Name = this.InstanceInputEndpointName,
172+
Protocol = this.Protocol,
173+
LocalPort = this.LocalPort,
174+
FixedPortMax = this.FixedPortMax,
175+
FixedPortMin = this.FixedPortMin
176+
});
177+
}
178+
120179
WriteObject(this.EndpointConfig);
121180
}
122181
}

src/ServiceManagement/Compute/Commands.ServiceManagement.PlatformImageRepository/Model/ExtensionEndpointConfigSet.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ namespace Microsoft.WindowsAzure.Commands.ServiceManagement.PlatformImageReposit
1919
public class ExtensionEndpointConfigSet
2020
{
2121
public List<ExtensionInputEndpoint> InputEndpoints { get; set; }
22+
public List<ExtensionInstanceInputEndpoint> InstanceInputEndpoints { get; set; }
2223
public List<ExtensionInternalEndpoint> InternalEndpoints { get; set; }
2324
}
24-
}
25+
}

src/ServiceManagement/Compute/Commands.ServiceManagement.PlatformImageRepository/Model/ExtensionInputEndpoint.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@ namespace Microsoft.WindowsAzure.Commands.ServiceManagement.PlatformImageReposit
1616
{
1717
public class ExtensionInputEndpoint
1818
{
19-
public int LocalPort { get; set; }
19+
public string LocalPort { get; set; }
2020
public string Name { get; set; }
2121
public int Port { get; set; }
2222
public string Protocol { get; set; }
2323
}
24-
}
24+
}

0 commit comments

Comments
 (0)