Skip to content

Commit bd44756

Browse files
committed
Update
1 parent c0c0be8 commit bd44756

13 files changed

+2909
-0
lines changed

src/ResourceManager/Compute/Commands.Compute/Generated/ComputeAutomationBaseCmdlet.cs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,14 @@ public IAvailabilitySetsOperations AvailabilitySetsClient
8181
}
8282
}
8383

84+
public IContainerServiceOperations ContainerServiceClient
85+
{
86+
get
87+
{
88+
return ComputeClient.ComputeManagementClient.ContainerService;
89+
}
90+
}
91+
8492
public IVirtualMachineScaleSetsOperations VirtualMachineScaleSetsClient
8593
{
8694
get
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
//
2+
// Copyright (c) Microsoft and contributors. All rights reserved.
3+
//
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+
//
9+
// Unless required by applicable law or agreed to in writing, software
10+
// distributed under the License is distributed on an "AS IS" BASIS,
11+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
//
13+
// See the License for the specific language governing permissions and
14+
// limitations under the License.
15+
//
16+
17+
// Warning: This code was generated by a tool.
18+
//
19+
// Changes to this file may cause incorrect behavior and will be lost if the
20+
// code is regenerated.
21+
22+
using Microsoft.Azure.Management.Compute.Models;
23+
using System;
24+
using System.Collections;
25+
using System.Collections.Generic;
26+
using System.Linq;
27+
using System.Management.Automation;
28+
29+
namespace Microsoft.Azure.Commands.Compute.Automation
30+
{
31+
[Cmdlet("Add", "AzureRmcontainerAgentPoolProfile")]
32+
[OutputType(typeof(ContainerService))]
33+
public class AddAzureRmcontainerAgentPoolProfileCommand : Microsoft.Azure.Commands.ResourceManager.Common.AzureRMCmdlet
34+
{
35+
[Parameter(
36+
Mandatory = false,
37+
Position = 0,
38+
ValueFromPipeline = true,
39+
ValueFromPipelineByPropertyName = true)]
40+
public ContainerService ContainerService { get; set; }
41+
42+
[Parameter(
43+
Mandatory = false,
44+
Position = 1,
45+
ValueFromPipelineByPropertyName = true)]
46+
public string Name { get; set; }
47+
48+
[Parameter(
49+
Mandatory = false,
50+
Position = 2,
51+
ValueFromPipelineByPropertyName = true)]
52+
public int? Count { get; set; }
53+
54+
[Parameter(
55+
Mandatory = false,
56+
Position = 3,
57+
ValueFromPipelineByPropertyName = true)]
58+
public string VmSize { get; set; }
59+
60+
[Parameter(
61+
Mandatory = false,
62+
Position = 4,
63+
ValueFromPipelineByPropertyName = true)]
64+
public string DnsPrefix { get; set; }
65+
66+
protected override void ProcessRecord()
67+
{
68+
// AgentPoolProfiles
69+
if (this.ContainerService.AgentPoolProfiles == null)
70+
{
71+
this.ContainerService.AgentPoolProfiles = new List<Microsoft.Azure.Management.Compute.Models.ContainerServiceAgentPoolProfile>();
72+
}
73+
74+
var vAgentPoolProfiles = new Microsoft.Azure.Management.Compute.Models.ContainerServiceAgentPoolProfile();
75+
76+
vAgentPoolProfiles.Name = this.Name;
77+
vAgentPoolProfiles.Count = this.Count;
78+
vAgentPoolProfiles.VmSize = this.VmSize;
79+
vAgentPoolProfiles.DnsPrefix = this.DnsPrefix;
80+
this.ContainerService.AgentPoolProfiles.Add(vAgentPoolProfiles);
81+
WriteObject(this.ContainerService);
82+
}
83+
}
84+
}
85+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,151 @@
1+
//
2+
// Copyright (c) Microsoft and contributors. All rights reserved.
3+
//
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+
//
9+
// Unless required by applicable law or agreed to in writing, software
10+
// distributed under the License is distributed on an "AS IS" BASIS,
11+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
//
13+
// See the License for the specific language governing permissions and
14+
// limitations under the License.
15+
//
16+
17+
// Warning: This code was generated by a tool.
18+
//
19+
// Changes to this file may cause incorrect behavior and will be lost if the
20+
// code is regenerated.
21+
22+
using Microsoft.Azure.Management.Compute.Models;
23+
using System;
24+
using System.Collections;
25+
using System.Collections.Generic;
26+
using System.Linq;
27+
using System.Management.Automation;
28+
29+
namespace Microsoft.Azure.Commands.Compute.Automation
30+
{
31+
[Cmdlet("New", "AzureRmcontainerConfig")]
32+
[OutputType(typeof(ContainerService))]
33+
public class NewAzureRmcontainerConfigCommand : Microsoft.Azure.Commands.ResourceManager.Common.AzureRMCmdlet
34+
{
35+
[Parameter(
36+
Mandatory = false,
37+
Position = 0,
38+
ValueFromPipelineByPropertyName = true)]
39+
public string Location { get; set; }
40+
41+
[Parameter(
42+
Mandatory = false,
43+
Position = 1,
44+
ValueFromPipelineByPropertyName = true)]
45+
public Hashtable Tag { get; set; }
46+
47+
[Parameter(
48+
Mandatory = false,
49+
Position = 2,
50+
ValueFromPipelineByPropertyName = true)]
51+
public ContainerServiceOchestratorTypes? OrchestratorProfileOrchestratorType { get; set; }
52+
53+
[Parameter(
54+
Mandatory = false,
55+
Position = 3,
56+
ValueFromPipelineByPropertyName = true)]
57+
public int? MasterProfileCount { get; set; }
58+
59+
[Parameter(
60+
Mandatory = false,
61+
Position = 4,
62+
ValueFromPipelineByPropertyName = true)]
63+
public string MasterProfileDnsPrefix { get; set; }
64+
65+
[Parameter(
66+
Mandatory = false,
67+
Position = 5,
68+
ValueFromPipelineByPropertyName = true)]
69+
public ContainerServiceAgentPoolProfile [] AgentPoolProfile { get; set; }
70+
71+
[Parameter(
72+
Mandatory = false,
73+
Position = 6,
74+
ValueFromPipelineByPropertyName = true)]
75+
public string WindowsProfileAdminUsername { get; set; }
76+
77+
[Parameter(
78+
Mandatory = false,
79+
Position = 7,
80+
ValueFromPipelineByPropertyName = true)]
81+
public string WindowsProfileAdminPassword { get; set; }
82+
83+
[Parameter(
84+
Mandatory = false,
85+
Position = 8,
86+
ValueFromPipelineByPropertyName = true)]
87+
public string AdminUsername { get; set; }
88+
89+
[Parameter(
90+
Mandatory = false,
91+
Position = 9,
92+
ValueFromPipelineByPropertyName = true)]
93+
public string [] Ssh { get; set; }
94+
95+
[Parameter(
96+
Mandatory = false,
97+
Position = 10,
98+
ValueFromPipelineByPropertyName = true)]
99+
public bool? VmDiagnosticsEnabled { get; set; }
100+
101+
protected override void ProcessRecord()
102+
{
103+
// OrchestratorProfile
104+
var vOrchestratorProfile = new Microsoft.Azure.Management.Compute.Models.ContainerServiceOrchestratorProfile();
105+
106+
// MasterProfile
107+
var vMasterProfile = new Microsoft.Azure.Management.Compute.Models.ContainerServiceMasterProfile();
108+
109+
// WindowsProfile
110+
var vWindowsProfile = new Microsoft.Azure.Management.Compute.Models.ContainerServiceWindowsProfile();
111+
112+
// LinuxProfile
113+
var vLinuxProfile = new Microsoft.Azure.Management.Compute.Models.ContainerServiceLinuxProfile();
114+
115+
// Ssh
116+
vLinuxProfile.Ssh = new Microsoft.Azure.Management.Compute.Models.ContainerServiceSshConfiguration();
117+
118+
// PublicKeys
119+
vLinuxProfile.Ssh.PublicKeys = new List<Microsoft.Azure.Management.Compute.Models.ContainerServiceSshPublicKey>();
120+
121+
// DiagnosticsProfile
122+
var vDiagnosticsProfile = new Microsoft.Azure.Management.Compute.Models.ContainerServiceDiagnosticsProfile();
123+
124+
// VmDiagnostics
125+
vDiagnosticsProfile.VmDiagnostics = new Microsoft.Azure.Management.Compute.Models.ContainerServiceVMDiagnostics();
126+
vOrchestratorProfile.OrchestratorType = this.OrchestratorProfileOrchestratorType;
127+
vMasterProfile.Count = this.MasterProfileCount;
128+
vMasterProfile.DnsPrefix = this.MasterProfileDnsPrefix;
129+
vWindowsProfile.AdminUsername = this.WindowsProfileAdminUsername;
130+
vWindowsProfile.AdminPassword = this.WindowsProfileAdminPassword;
131+
vLinuxProfile.AdminUsername = this.AdminUsername;
132+
vLinuxProfile.Ssh.PublicKeys = null;
133+
vDiagnosticsProfile.VmDiagnostics.Enabled = this.VmDiagnosticsEnabled;
134+
135+
var vContainerService = new ContainerService
136+
{
137+
Location = this.Location,
138+
Tags = (this.Tag == null) ? null : this.Tag.Cast<DictionaryEntry>().ToDictionary(ht => (string)ht.Key, ht => (string)ht.Value),
139+
AgentPoolProfiles = this.AgentPoolProfile,
140+
OrchestratorProfile = vOrchestratorProfile,
141+
MasterProfile = vMasterProfile,
142+
WindowsProfile = vWindowsProfile,
143+
LinuxProfile = vLinuxProfile,
144+
DiagnosticsProfile = vDiagnosticsProfile,
145+
};
146+
147+
WriteObject(vContainerService);
148+
}
149+
}
150+
}
151+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
//
2+
// Copyright (c) Microsoft and contributors. All rights reserved.
3+
//
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+
//
9+
// Unless required by applicable law or agreed to in writing, software
10+
// distributed under the License is distributed on an "AS IS" BASIS,
11+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
//
13+
// See the License for the specific language governing permissions and
14+
// limitations under the License.
15+
//
16+
17+
// Warning: This code was generated by a tool.
18+
//
19+
// Changes to this file may cause incorrect behavior and will be lost if the
20+
// code is regenerated.
21+
22+
using Microsoft.Azure.Management.Compute.Models;
23+
using System;
24+
using System.Collections;
25+
using System.Collections.Generic;
26+
using System.Linq;
27+
using System.Management.Automation;
28+
29+
namespace Microsoft.Azure.Commands.Compute.Automation
30+
{
31+
[Cmdlet("Remove", "AzureRmcontainerAgentPoolProfile")]
32+
[OutputType(typeof(ContainerService))]
33+
public class RemoveAzureRmcontainerAgentPoolProfileCommand : Microsoft.Azure.Commands.ResourceManager.Common.AzureRMCmdlet
34+
{
35+
[Parameter(
36+
Mandatory = false,
37+
Position = 0,
38+
ValueFromPipeline = true,
39+
ValueFromPipelineByPropertyName = true)]
40+
public ContainerService ContainerService { get; set; }
41+
42+
[Parameter(
43+
Mandatory = false,
44+
Position = 1,
45+
ValueFromPipelineByPropertyName = true)]
46+
public string Name { get; set; }
47+
48+
[Parameter(
49+
Mandatory = false,
50+
Position = 2,
51+
ValueFromPipelineByPropertyName = true)]
52+
public int? Count { get; set; }
53+
54+
[Parameter(
55+
Mandatory = false,
56+
Position = 3,
57+
ValueFromPipelineByPropertyName = true)]
58+
public string VmSize { get; set; }
59+
60+
[Parameter(
61+
Mandatory = false,
62+
Position = 4,
63+
ValueFromPipelineByPropertyName = true)]
64+
public string DnsPrefix { get; set; }
65+
66+
protected override void ProcessRecord()
67+
{
68+
// AgentPoolProfiles
69+
if (this.ContainerService.AgentPoolProfiles == null)
70+
{
71+
WriteObject(this.ContainerService);
72+
return;
73+
}
74+
var vAgentPoolProfiles = this.ContainerService.AgentPoolProfiles.First
75+
(e =>
76+
(this.Name == null || e.Name == this.Name)
77+
&& (this.Count == null || e.Count == this.Count)
78+
&& (this.VmSize == null || e.VmSize == this.VmSize)
79+
&& (this.DnsPrefix == null || e.DnsPrefix == this.DnsPrefix)
80+
);
81+
82+
if (vAgentPoolProfiles != null)
83+
{
84+
this.ContainerService.AgentPoolProfiles.Remove(vAgentPoolProfiles);
85+
}
86+
87+
if (this.ContainerService.AgentPoolProfiles.Count == 0)
88+
{
89+
this.ContainerService.AgentPoolProfiles = null;
90+
}
91+
WriteObject(this.ContainerService);
92+
}
93+
}
94+
}
95+

0 commit comments

Comments
 (0)