Skip to content

Commit 74123cc

Browse files
committed
Added more PS output object types.
1 parent d88cd12 commit 74123cc

File tree

8 files changed

+64
-12
lines changed

8 files changed

+64
-12
lines changed

src/ResourceManager/MachineLearningCompute/Commands.MachineLearningCompute.Test/ScenarioTests/MLCTests.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ public MLCTests(ITestOutputHelper output)
1616
XunitTracingInterceptor.AddToContext(interceptor);
1717
}
1818

19-
/*
2019
[Fact]
2120
[Trait(Category.AcceptanceType, Category.CheckIn)]
2221
public void TestNewGetRemove()
@@ -37,13 +36,14 @@ public void TestUpdateSystemServices()
3736
{
3837
TestController.NewInstance.RunPsTest(this.interceptor, "Test-UpdateSystemServices");
3938
}
40-
*/
4139

40+
/*
4241
[Fact]
4342
[Trait(Category.AcceptanceType, Category.CheckIn)]
4443
public void TestSandbox()
4544
{
4645
TestController.NewInstance.RunPsTest(this.interceptor, "Test-Sandbox");
4746
}
47+
*/
4848
}
4949
}

src/ResourceManager/MachineLearningCompute/Commands.MachineLearningCompute/Cmdlets/GetAzureRmMlOpClusterKey.cs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,14 @@
1515
using Microsoft.Azure.Commands.MachineLearningCompute.Models;
1616
using Microsoft.Azure.Management.Internal.Resources.Utilities.Models;
1717
using Microsoft.Azure.Management.MachineLearningCompute;
18-
using Microsoft.Azure.Management.MachineLearningCompute.Models;
1918
using Microsoft.Rest.Azure;
2019
using System;
2120
using System.Management.Automation;
2221

2322
namespace Microsoft.Azure.Commands.MachineLearningCompute.Cmdlets
2423
{
2524
[Cmdlet(VerbsCommon.Get, CmdletSuffix + "Key")]
26-
[OutputType(typeof(OperationalizationClusterCredentials))]
25+
[OutputType(typeof(PSOperationalizationClusterCredentials))]
2726
public class GetAzureRmMlOpClusterKey : MachineLearningComputeCmdletBase
2827
{
2928
protected const string CmdletParametersParameterSet =
@@ -77,7 +76,7 @@ public override void ExecuteCmdlet()
7776

7877
try
7978
{
80-
WriteObject(MachineLearningComputeManagementClient.OperationalizationClusters.ListKeys(ResourceGroupName, Name));
79+
WriteObject(new PSOperationalizationClusterCredentials(MachineLearningComputeManagementClient.OperationalizationClusters.ListKeys(ResourceGroupName, Name)));
8180
}
8281
catch (CloudException e)
8382
{

src/ResourceManager/MachineLearningCompute/Commands.MachineLearningCompute/Cmdlets/TestAzureRmMlOpClusterSystemServicesUpdateAvailability.cs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,14 @@
11
using Microsoft.Azure.Commands.MachineLearningCompute.Models;
22
using Microsoft.Azure.Management.Internal.Resources.Utilities.Models;
33
using Microsoft.Azure.Management.MachineLearningCompute;
4-
using Microsoft.Azure.Management.MachineLearningCompute.Models;
54
using Microsoft.Rest.Azure;
65
using System;
76
using System.Management.Automation;
87

98
namespace Microsoft.Azure.Commands.MachineLearningCompute.Cmdlets
109
{
1110
[Cmdlet(VerbsDiagnostic.Test, CmdletSuffix + "SystemServicesUpdateAvailability")]
12-
[OutputType(typeof(CheckSystemServicesUpdatesAvailableResponse))]
11+
[OutputType(typeof(PSCheckSystemServicesUpdatesAvailableResponse))]
1312
public class TestAzureRmOpClusterSystemServicesUpdateAvailability: MachineLearningComputeCmdletBase
1413
{
1514
protected const string CmdletParametersParameterSet =
@@ -63,7 +62,7 @@ public override void ExecuteCmdlet()
6362

6463
try
6564
{
66-
WriteObject(MachineLearningComputeManagementClient.OperationalizationClusters.CheckSystemServicesUpdatesAvailable(ResourceGroupName, Name));
65+
WriteObject(new PSCheckSystemServicesUpdatesAvailableResponse(MachineLearningComputeManagementClient.OperationalizationClusters.CheckSystemServicesUpdatesAvailable(ResourceGroupName, Name)));
6766
}
6867
catch (CloudException e)
6968
{

src/ResourceManager/MachineLearningCompute/Commands.MachineLearningCompute/Cmdlets/UpdateAzureRmMlOpClusterSystemService.cs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
using Microsoft.Azure.Commands.MachineLearningCompute.Models;
1616
using Microsoft.Azure.Management.Internal.Resources.Utilities.Models;
1717
using Microsoft.Azure.Management.MachineLearningCompute;
18-
using Microsoft.Azure.Management.MachineLearningCompute.Models;
1918
using Microsoft.Rest.Azure;
2019
using System;
2120
using System.Management.Automation;
@@ -24,7 +23,7 @@ namespace Microsoft.Azure.Commands.MachineLearningCompute.Cmdlets
2423
{
2524

2625
[Cmdlet(VerbsData.Update, CmdletSuffix + "SystemService", SupportsShouldProcess = true)]
27-
[OutputType(typeof(UpdateSystemServicesResponse))]
26+
[OutputType(typeof(PSUpdateSystemServicesResponse))]
2827
public class UpdateAzureRmMlOpClusterSystemService : MachineLearningComputeCmdletBase
2928
{
3029
protected const string CmdletParametersParameterSet =
@@ -80,7 +79,7 @@ public override void ExecuteCmdlet()
8079

8180
try
8281
{
83-
WriteObject(MachineLearningComputeManagementClient.OperationalizationClusters.UpdateSystemServices(ResourceGroupName, Name));
82+
WriteObject(new PSUpdateSystemServicesResponse(MachineLearningComputeManagementClient.OperationalizationClusters.UpdateSystemServices(ResourceGroupName, Name)));
8483
}
8584
catch (CloudException e)
8685
{

src/ResourceManager/MachineLearningCompute/Commands.MachineLearningCompute/Commands.MachineLearningCompute.csproj

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,10 @@
8787
<Compile Include="Cmdlets\NewAzureRmMlOpCluster.cs" />
8888
<Compile Include="Cmdlets\RemoveAzureRmMlOpCluster.cs" />
8989
<Compile Include="Cmdlets\UpdateAzureRmMlOpClusterSystemService.cs" />
90+
<Compile Include="Models\PSCheckSystemServicesUpdatesAvailableResponse.cs" />
9091
<Compile Include="Models\PSOperationalizationCluster.cs" />
91-
<Compile Include="Models\PSOperationalizationClusterCredential.cs" />
92+
<Compile Include="Models\PSOperationalizationClusterCredentials.cs" />
93+
<Compile Include="Models\PSUpdateSystemServicesResponse.cs" />
9294
<Compile Include="Properties\AssemblyInfo.cs" />
9395
<Compile Include="Resources.Designer.cs">
9496
<AutoGen>True</AutoGen>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
using Microsoft.Azure.Management.MachineLearningCompute.Models;
2+
using System;
3+
using System.Collections.Generic;
4+
using System.Linq;
5+
using System.Text;
6+
using System.Threading.Tasks;
7+
8+
namespace Microsoft.Azure.Commands.MachineLearningCompute.Models
9+
{
10+
class PSCheckSystemServicesUpdatesAvailableResponse : CheckSystemServicesUpdatesAvailableResponse
11+
{
12+
public PSCheckSystemServicesUpdatesAvailableResponse(CheckSystemServicesUpdatesAvailableResponse response)
13+
: base(response.UpdatesAvailable)
14+
{
15+
16+
}
17+
}
18+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
using Microsoft.Azure.Management.MachineLearningCompute.Models;
2+
3+
namespace Microsoft.Azure.Commands.MachineLearningCompute.Models
4+
{
5+
public class PSOperationalizationClusterCredentials : OperationalizationClusterCredentials
6+
{
7+
public PSOperationalizationClusterCredentials(OperationalizationClusterCredentials credentials)
8+
{
9+
this.StorageAccount = credentials.StorageAccount;
10+
this.ContainerRegistry = credentials.ContainerRegistry;
11+
this.ContainerService = credentials.ContainerService;
12+
this.AppInsights = credentials.AppInsights;
13+
this.ServiceAuthConfiguration = credentials.ServiceAuthConfiguration;
14+
this.SslConfiguration = credentials.SslConfiguration;
15+
}
16+
}
17+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
using Microsoft.Azure.Management.MachineLearningCompute.Models;
2+
using System;
3+
using System.Collections.Generic;
4+
using System.Linq;
5+
using System.Text;
6+
using System.Threading.Tasks;
7+
8+
namespace Microsoft.Azure.Commands.MachineLearningCompute.Models
9+
{
10+
class PSUpdateSystemServicesResponse : UpdateSystemServicesResponse
11+
{
12+
public PSUpdateSystemServicesResponse(UpdateSystemServicesResponse response)
13+
: base(response.UpdateStatus, response.UpdateStartedOn, response.UpdateCompletedOn)
14+
{
15+
16+
}
17+
}
18+
}

0 commit comments

Comments
 (0)