Skip to content

Commit

Permalink
.NET SDK Resource Provider:'ContainerService'
Browse files Browse the repository at this point in the history
REST Spec PR 'Azure/azure-rest-api-specs#5841'
REST Spec PR Author 'JunSun17'
REST Spec PR Last commit
  • Loading branch information
adxsdknet committed May 2, 2019
1 parent 40f460e commit ff48f1d
Show file tree
Hide file tree
Showing 10 changed files with 37 additions and 43 deletions.
2 changes: 1 addition & 1 deletion src/SDKs/ContainerService/AzSdk.RP.props
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<!--This file and it's contents are updated at build time moving or editing might result in build failure. Take due deligence while editing this file-->
<PropertyGroup>
<AzureApiTag>ContainerService_2019-04-01;ContainerService_2017-07-01;ContainerService_2017-09-30;ContainerService_2019-04-30;</AzureApiTag>
<AzureApiTag>ContainerService_2019-04-01;ContainerService_2017-07-01;ContainerService_2019-04-30;</AzureApiTag>
<PackageTags>$(PackageTags);$(CommonTags);$(AzureApiTag);</PackageTags>
</PropertyGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -695,8 +695,8 @@ internal ContainerServicesOperations(ContainerServiceClient client)
/// </summary>
/// <remarks>
/// Gets a list of supported orchestrators in the specified subscription. The
/// operation returns properties of each orchestrator including version and
/// available upgrades.
/// operation returns properties of each orchestrator including version,
/// available upgrades and whether that version or upgrades are in preview.
/// </remarks>
/// <param name='location'>
/// The name of a supported Azure region.
Expand Down Expand Up @@ -735,7 +735,7 @@ internal ContainerServicesOperations(ContainerServiceClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "location");
}
string apiVersion = "2017-09-30";
string apiVersion = "2019-04-01";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -287,8 +287,8 @@ public static IPage<ContainerServiceModel> ListByResourceGroup(this IContainerSe
/// </summary>
/// <remarks>
/// Gets a list of supported orchestrators in the specified subscription. The
/// operation returns properties of each orchestrator including version and
/// available upgrades.
/// operation returns properties of each orchestrator including version,
/// available upgrades and whether that version or upgrades are in preview.
/// </remarks>
/// <param name='operations'>
/// The operations group for this extension method.
Expand All @@ -309,8 +309,8 @@ public static IPage<ContainerServiceModel> ListByResourceGroup(this IContainerSe
/// </summary>
/// <remarks>
/// Gets a list of supported orchestrators in the specified subscription. The
/// operation returns properties of each orchestrator including version and
/// available upgrades.
/// operation returns properties of each orchestrator including version,
/// available upgrades and whether that version or upgrades are in preview.
/// </remarks>
/// <param name='operations'>
/// The operations group for this extension method.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,8 @@ public partial interface IContainerServicesOperations
/// <remarks>
/// Gets a list of supported orchestrators in the specified
/// subscription. The operation returns properties of each orchestrator
/// including version and available upgrades.
/// including version, available upgrades and whether that version or
/// upgrades are in preview.
/// </remarks>
/// <param name='location'>
/// The name of a supported Azure region.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,7 @@ public AgentPool()
/// provisioning state, which only appears in the response.</param>
/// <param name="availabilityZones">(PREVIEW) Availability zones for
/// nodes. Must use VirtualMachineScaleSets AgentPoolType.</param>
/// <param name="enableNodePublicIP">Enable public IP for nodes</param>
public AgentPool(int count, string vmSize, string id = default(string), string name = default(string), string type = default(string), int? osDiskSizeGB = default(int?), string vnetSubnetID = default(string), int? maxPods = default(int?), string osType = default(string), int? maxCount = default(int?), int? minCount = default(int?), bool? enableAutoScaling = default(bool?), string agentPoolType = default(string), string orchestratorVersion = default(string), string provisioningState = default(string), IList<string> availabilityZones = default(IList<string>), bool? enableNodePublicIP = default(bool?))
public AgentPool(int count, string vmSize, string id = default(string), string name = default(string), string type = default(string), int? osDiskSizeGB = default(int?), string vnetSubnetID = default(string), int? maxPods = default(int?), string osType = default(string), int? maxCount = default(int?), int? minCount = default(int?), bool? enableAutoScaling = default(bool?), string agentPoolType = default(string), string orchestratorVersion = default(string), string provisioningState = default(string), IList<string> availabilityZones = default(IList<string>))
: base(id, name, type)
{
Count = count;
Expand All @@ -140,7 +139,6 @@ public AgentPool()
OrchestratorVersion = orchestratorVersion;
ProvisioningState = provisioningState;
AvailabilityZones = availabilityZones;
EnableNodePublicIP = enableNodePublicIP;
CustomInit();
}

Expand Down Expand Up @@ -293,12 +291,6 @@ public AgentPool()
[JsonProperty(PropertyName = "properties.availabilityZones")]
public IList<string> AvailabilityZones { get; set; }

/// <summary>
/// Gets or sets enable public IP for nodes
/// </summary>
[JsonProperty(PropertyName = "properties.enableNodePublicIP")]
public bool? EnableNodePublicIP { get; set; }

/// <summary>
/// Validate the object.
/// </summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,9 +120,8 @@ public ManagedClusterAgentPoolProfile()
/// provisioning state, which only appears in the response.</param>
/// <param name="availabilityZones">(PREVIEW) Availability zones for
/// nodes. Must use VirtualMachineScaleSets AgentPoolType.</param>
/// <param name="enableNodePublicIP">Enable public IP for nodes</param>
public ManagedClusterAgentPoolProfile(int count, string vmSize, string name, int? osDiskSizeGB = default(int?), string vnetSubnetID = default(string), int? maxPods = default(int?), string osType = default(string), int? maxCount = default(int?), int? minCount = default(int?), bool? enableAutoScaling = default(bool?), string type = default(string), string orchestratorVersion = default(string), string provisioningState = default(string), IList<string> availabilityZones = default(IList<string>), bool? enableNodePublicIP = default(bool?))
: base(count, vmSize, osDiskSizeGB, vnetSubnetID, maxPods, osType, maxCount, minCount, enableAutoScaling, type, orchestratorVersion, provisioningState, availabilityZones, enableNodePublicIP)
public ManagedClusterAgentPoolProfile(int count, string vmSize, string name, int? osDiskSizeGB = default(int?), string vnetSubnetID = default(string), int? maxPods = default(int?), string osType = default(string), int? maxCount = default(int?), int? minCount = default(int?), bool? enableAutoScaling = default(bool?), string type = default(string), string orchestratorVersion = default(string), string provisioningState = default(string), IList<string> availabilityZones = default(IList<string>))
: base(count, vmSize, osDiskSizeGB, vnetSubnetID, maxPods, osType, maxCount, minCount, enableAutoScaling, type, orchestratorVersion, provisioningState, availabilityZones)
{
Name = name;
CustomInit();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,7 @@ public ManagedClusterAgentPoolProfileProperties()
/// provisioning state, which only appears in the response.</param>
/// <param name="availabilityZones">(PREVIEW) Availability zones for
/// nodes. Must use VirtualMachineScaleSets AgentPoolType.</param>
/// <param name="enableNodePublicIP">Enable public IP for nodes</param>
public ManagedClusterAgentPoolProfileProperties(int count, string vmSize, int? osDiskSizeGB = default(int?), string vnetSubnetID = default(string), int? maxPods = default(int?), string osType = default(string), int? maxCount = default(int?), int? minCount = default(int?), bool? enableAutoScaling = default(bool?), string type = default(string), string orchestratorVersion = default(string), string provisioningState = default(string), IList<string> availabilityZones = default(IList<string>), bool? enableNodePublicIP = default(bool?))
public ManagedClusterAgentPoolProfileProperties(int count, string vmSize, int? osDiskSizeGB = default(int?), string vnetSubnetID = default(string), int? maxPods = default(int?), string osType = default(string), int? maxCount = default(int?), int? minCount = default(int?), bool? enableAutoScaling = default(bool?), string type = default(string), string orchestratorVersion = default(string), string provisioningState = default(string), IList<string> availabilityZones = default(IList<string>))
{
Count = count;
VmSize = vmSize;
Expand All @@ -134,7 +133,6 @@ public ManagedClusterAgentPoolProfileProperties()
OrchestratorVersion = orchestratorVersion;
ProvisioningState = provisioningState;
AvailabilityZones = availabilityZones;
EnableNodePublicIP = enableNodePublicIP;
CustomInit();
}

Expand Down Expand Up @@ -287,12 +285,6 @@ public ManagedClusterAgentPoolProfileProperties()
[JsonProperty(PropertyName = "availabilityZones")]
public IList<string> AvailabilityZones { get; set; }

/// <summary>
/// Gets or sets enable public IP for nodes
/// </summary>
[JsonProperty(PropertyName = "enableNodePublicIP")]
public bool? EnableNodePublicIP { get; set; }

/// <summary>
/// Validate the object.
/// </summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,16 @@ public OrchestratorProfile()
/// <summary>
/// Initializes a new instance of the OrchestratorProfile class.
/// </summary>
/// <param name="orchestratorType">Orchestrator type.</param>
/// <param name="orchestratorVersion">Orchestrator version (major,
/// minor, patch).</param>
public OrchestratorProfile(string orchestratorType, string orchestratorVersion)
/// <param name="orchestratorType">Orchestrator type.</param>
/// <param name="isPreview">Whether Kubernetes version is currently in
/// preview.</param>
public OrchestratorProfile(string orchestratorVersion, string orchestratorType = default(string), bool? isPreview = default(bool?))
{
OrchestratorType = orchestratorType;
OrchestratorVersion = orchestratorVersion;
IsPreview = isPreview;
CustomInit();
}

Expand All @@ -57,6 +60,12 @@ public OrchestratorProfile(string orchestratorType, string orchestratorVersion)
[JsonProperty(PropertyName = "orchestratorVersion")]
public string OrchestratorVersion { get; set; }

/// <summary>
/// Gets or sets whether Kubernetes version is currently in preview.
/// </summary>
[JsonProperty(PropertyName = "isPreview")]
public bool? IsPreview { get; set; }

/// <summary>
/// Validate the object.
/// </summary>
Expand All @@ -65,10 +74,6 @@ public OrchestratorProfile(string orchestratorType, string orchestratorVersion)
/// </exception>
public virtual void Validate()
{
if (OrchestratorType == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "OrchestratorType");
}
if (OrchestratorVersion == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "OrchestratorVersion");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,16 @@ public OrchestratorVersionProfile()
/// minor, patch).</param>
/// <param name="defaultProperty">Installed by default if version is
/// not specified.</param>
/// <param name="isPreview">Whether Kubernetes version is currently in
/// preview.</param>
/// <param name="upgrades">The list of available upgrade
/// versions.</param>
public OrchestratorVersionProfile(string orchestratorType, string orchestratorVersion, bool defaultProperty, IList<OrchestratorProfile> upgrades)
public OrchestratorVersionProfile(string orchestratorType, string orchestratorVersion, bool? defaultProperty = default(bool?), bool? isPreview = default(bool?), IList<OrchestratorProfile> upgrades = default(IList<OrchestratorProfile>))
{
OrchestratorType = orchestratorType;
OrchestratorVersion = orchestratorVersion;
DefaultProperty = defaultProperty;
IsPreview = isPreview;
Upgrades = upgrades;
CustomInit();
}
Expand All @@ -69,7 +72,13 @@ public OrchestratorVersionProfile(string orchestratorType, string orchestratorVe
/// Gets or sets installed by default if version is not specified.
/// </summary>
[JsonProperty(PropertyName = "default")]
public bool DefaultProperty { get; set; }
public bool? DefaultProperty { get; set; }

/// <summary>
/// Gets or sets whether Kubernetes version is currently in preview.
/// </summary>
[JsonProperty(PropertyName = "isPreview")]
public bool? IsPreview { get; set; }

/// <summary>
/// Gets or sets the list of available upgrade versions.
Expand All @@ -93,10 +102,6 @@ public virtual void Validate()
{
throw new ValidationException(ValidationRules.CannotBeNull, "OrchestratorVersion");
}
if (Upgrades == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "Upgrades");
}
if (Upgrades != null)
{
foreach (var element in Upgrades)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public static IEnumerable<Tuple<string, string, string>> ApiInfo_ContainerServic
{
new Tuple<string, string, string>("ContainerService", "AgentPools", "2019-04-01"),
new Tuple<string, string, string>("ContainerService", "ContainerServices", "2017-07-01"),
new Tuple<string, string, string>("ContainerService", "ContainerServices", "2017-09-30"),
new Tuple<string, string, string>("ContainerService", "ContainerServices", "2019-04-01"),
new Tuple<string, string, string>("ContainerService", "ManagedClusters", "2019-04-01"),
new Tuple<string, string, string>("ContainerService", "OpenShiftManagedClusters", "2019-04-30"),
new Tuple<string, string, string>("ContainerService", "Operations", "2019-04-01"),
Expand Down

0 comments on commit ff48f1d

Please sign in to comment.