Skip to content

Commit

Permalink
SDK changes for swagger update to support AutomaticRepairsPolicy for …
Browse files Browse the repository at this point in the history
…Virtual Machine Scale Sets (#8141)

* SDK changes

* Run CodeGen tool on master

* Update package release notes. Revert AssemblyFileVersion increment

* Fix indent

* Fix file version
  • Loading branch information
hapandar authored and isra-fel committed Oct 22, 2019
1 parent db80641 commit 3272a17
Show file tree
Hide file tree
Showing 23 changed files with 6,342 additions and 36 deletions.
6 changes: 3 additions & 3 deletions eng/mgmt/mgmtmetadata/compute_resource-manager.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ AutoRest installed successfully.
Commencing code generation
Generating CSharp code
Executing AutoRest command
cmd.exe /c autorest.cmd https://github.com/Azure/azure-rest-api-specs/blob/master/specification/compute/resource-manager/readme.md --csharp --version=latest --reflect-api-versions --csharp-sdks-folder=D:\hylee-sdk\avset\sdk
2019-08-30 19:41:37 UTC
cmd.exe /c autorest.cmd https://github.com/Azure/azure-rest-api-specs/blob/master/specification/compute/resource-manager/readme.md --csharp --version=latest --reflect-api-versions --csharp-sdks-folder=C:\repos\azure-sdk-for-net\azure-sdk-for-net\sdk
2019-10-16 16:15:42 UTC
Azure-rest-api-specs repository information
GitHub fork: Azure
Branch: master
Commit: 6359c5dac93947b24007afd9c569e23e92848ea5
Commit: 14464cf0bec27f838f1649f562c9f98cc4074855
AutoRest information
Requested version: latest
Bootstrapper version: [email protected]
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,8 @@ public partial interface IVirtualMachineScaleSetVMsOperations
/// </exception>
Task<AzureOperationResponse> StartWithHttpMessagesAsync(string resourceGroupName, string vmScaleSetName, string instanceId, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
/// <summary>
/// Redeploys a virtual machine in a VM scale set.
/// Shuts down the virtual machine in the virtual machine scale set,
/// moves it to a new node, and powers it back on.
/// </summary>
/// <param name='resourceGroupName'>
/// The name of the resource group.
Expand Down Expand Up @@ -651,7 +652,8 @@ public partial interface IVirtualMachineScaleSetVMsOperations
/// </exception>
Task<AzureOperationResponse> BeginStartWithHttpMessagesAsync(string resourceGroupName, string vmScaleSetName, string instanceId, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
/// <summary>
/// Redeploys a virtual machine in a VM scale set.
/// Shuts down the virtual machine in the virtual machine scale set,
/// moves it to a new node, and powers it back on.
/// </summary>
/// <param name='resourceGroupName'>
/// The name of the resource group.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -391,7 +391,8 @@ public partial interface IVirtualMachineScaleSetsOperations
/// </exception>
Task<AzureOperationResponse> StartWithHttpMessagesAsync(string resourceGroupName, string vmScaleSetName, IList<string> instanceIds = default(IList<string>), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
/// <summary>
/// Redeploy one or more virtual machines in a VM scale set.
/// Shuts down all the virtual machines in the virtual machine scale
/// set, moves them to a new node, and powers them back on.
/// </summary>
/// <param name='resourceGroupName'>
/// The name of the resource group.
Expand Down Expand Up @@ -814,7 +815,8 @@ public partial interface IVirtualMachineScaleSetsOperations
/// </exception>
Task<AzureOperationResponse> BeginStartWithHttpMessagesAsync(string resourceGroupName, string vmScaleSetName, IList<string> instanceIds = default(IList<string>), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
/// <summary>
/// Redeploy one or more virtual machines in a VM scale set.
/// Shuts down all the virtual machines in the virtual machine scale
/// set, moves them to a new node, and powers them back on.
/// </summary>
/// <param name='resourceGroupName'>
/// The name of the resource group.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -425,7 +425,8 @@ public partial interface IVirtualMachinesOperations
/// </exception>
Task<AzureOperationResponse> StartWithHttpMessagesAsync(string resourceGroupName, string vmName, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
/// <summary>
/// The operation to redeploy a virtual machine.
/// Shuts down the virtual machine, moves it to a new node, and powers
/// it back on.
/// </summary>
/// <param name='resourceGroupName'>
/// The name of the resource group.
Expand Down Expand Up @@ -753,7 +754,8 @@ public partial interface IVirtualMachinesOperations
/// </exception>
Task<AzureOperationResponse> BeginStartWithHttpMessagesAsync(string resourceGroupName, string vmName, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
/// <summary>
/// The operation to redeploy a virtual machine.
/// Shuts down the virtual machine, moves it to a new node, and powers
/// it back on.
/// </summary>
/// <param name='resourceGroupName'>
/// The name of the resource group.
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
// <auto-generated>
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for
// license information.
//
// Code generated by Microsoft (R) AutoRest Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.
// </auto-generated>

namespace Microsoft.Azure.Management.Compute.Models
{
using Newtonsoft.Json;
using System.Linq;

/// <summary>
/// Specifies the configuration parameters for automatic repairs on the
/// virtual machine scale set.
/// </summary>
public partial class AutomaticRepairsPolicy
{
/// <summary>
/// Initializes a new instance of the AutomaticRepairsPolicy class.
/// </summary>
public AutomaticRepairsPolicy()
{
CustomInit();
}

/// <summary>
/// Initializes a new instance of the AutomaticRepairsPolicy class.
/// </summary>
/// <param name="enabled">Specifies whether automatic repairs should be
/// enabled on the virtual machine scale set. The default value is
/// false.</param>
/// <param name="gracePeriod">The amount of time for which automatic
/// repairs are suspended due to a state change on VM. The grace time
/// starts after the state change has completed. This helps avoid
/// premature or accidental repairs. The time duration should be
/// specified in ISO 8601 format. The default value is 5 minutes
/// (PT5M).</param>
/// <param name="maxInstanceRepairsPercent">The percentage (capacity of
/// scaleset) of virtual machines that will be simultaneously repaired.
/// The default value is 20%.</param>
public AutomaticRepairsPolicy(bool? enabled = default(bool?), string gracePeriod = default(string), int? maxInstanceRepairsPercent = default(int?))
{
Enabled = enabled;
GracePeriod = gracePeriod;
MaxInstanceRepairsPercent = maxInstanceRepairsPercent;
CustomInit();
}

/// <summary>
/// An initialization method that performs custom operations like setting defaults
/// </summary>
partial void CustomInit();

/// <summary>
/// Gets or sets specifies whether automatic repairs should be enabled
/// on the virtual machine scale set. The default value is false.
/// </summary>
[JsonProperty(PropertyName = "enabled")]
public bool? Enabled { get; set; }

/// <summary>
/// Gets or sets the amount of time for which automatic repairs are
/// suspended due to a state change on VM. The grace time starts after
/// the state change has completed. This helps avoid premature or
/// accidental repairs. The time duration should be specified in ISO
/// 8601 format. The default value is 5 minutes (PT5M).
/// </summary>
[JsonProperty(PropertyName = "gracePeriod")]
public string GracePeriod { get; set; }

/// <summary>
/// Gets or sets the percentage (capacity of scaleset) of virtual
/// machines that will be simultaneously repaired. The default value is
/// 20%.
/// </summary>
[JsonProperty(PropertyName = "maxInstanceRepairsPercent")]
public int? MaxInstanceRepairsPercent { get; set; }

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,10 @@ public OSProfile()
/// operations should be allowed on the virtual machine.
/// &lt;br&gt;&lt;br&gt;This may only be set to False when no
/// extensions are present on the virtual machine.</param>
public OSProfile(string computerName = default(string), string adminUsername = default(string), string adminPassword = default(string), string customData = default(string), WindowsConfiguration windowsConfiguration = default(WindowsConfiguration), LinuxConfiguration linuxConfiguration = default(LinuxConfiguration), IList<VaultSecretGroup> secrets = default(IList<VaultSecretGroup>), bool? allowExtensionOperations = default(bool?))
/// <param name="requireGuestProvisionSignal">Specifies whether the
/// guest provision signal is required from the virtual
/// machine.</param>
public OSProfile(string computerName = default(string), string adminUsername = default(string), string adminPassword = default(string), string customData = default(string), WindowsConfiguration windowsConfiguration = default(WindowsConfiguration), LinuxConfiguration linuxConfiguration = default(LinuxConfiguration), IList<VaultSecretGroup> secrets = default(IList<VaultSecretGroup>), bool? allowExtensionOperations = default(bool?), bool? requireGuestProvisionSignal = default(bool?))
{
ComputerName = computerName;
AdminUsername = adminUsername;
Expand All @@ -107,6 +110,7 @@ public OSProfile()
LinuxConfiguration = linuxConfiguration;
Secrets = secrets;
AllowExtensionOperations = allowExtensionOperations;
RequireGuestProvisionSignal = requireGuestProvisionSignal;
CustomInit();
}

Expand Down Expand Up @@ -227,5 +231,12 @@ public OSProfile()
[JsonProperty(PropertyName = "allowExtensionOperations")]
public bool? AllowExtensionOperations { get; set; }

/// <summary>
/// Gets or sets specifies whether the guest provision signal is
/// required from the virtual machine.
/// </summary>
[JsonProperty(PropertyName = "requireGuestProvisionSignal")]
public bool? RequireGuestProvisionSignal { get; set; }

}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
// <auto-generated>
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for
// license information.
//
// Code generated by Microsoft (R) AutoRest Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.
// </auto-generated>

namespace Microsoft.Azure.Management.Compute.Models
{
using Newtonsoft.Json;
using System.Collections;
using System.Collections.Generic;
using System.Linq;

/// <summary>
/// Describes a scale-in policy for a virtual machine scale set.
/// </summary>
public partial class ScaleInPolicy
{
/// <summary>
/// Initializes a new instance of the ScaleInPolicy class.
/// </summary>
public ScaleInPolicy()
{
CustomInit();
}

/// <summary>
/// Initializes a new instance of the ScaleInPolicy class.
/// </summary>
/// <param name="rules">The rules to be followed when scaling-in a
/// virtual machine scale set. &lt;br&gt;&lt;br&gt; Possible values
/// are: &lt;br&gt;&lt;br&gt; **Default** When a virtual machine scale
/// set is scaled in, the scale set will first be balanced across zones
/// if it is a zonal scale set. Then, it will be balanced across Fault
/// Domains as far as possible. Within each Fault Domain, the virtual
/// machines chosen for removal will be the newest ones that are not
/// protected from scale-in. &lt;br&gt;&lt;br&gt; **OldestVM** When a
/// virtual machine scale set is being scaled-in, the oldest virtual
/// machines that are not protected from scale-in will be chosen for
/// removal. For zonal virtual machine scale sets, the scale set will
/// first be balanced across zones. Within each zone, the oldest
/// virtual machines that are not protected will be chosen for removal.
/// &lt;br&gt;&lt;br&gt; **NewestVM** When a virtual machine scale set
/// is being scaled-in, the newest virtual machines that are not
/// protected from scale-in will be chosen for removal. For zonal
/// virtual machine scale sets, the scale set will first be balanced
/// across zones. Within each zone, the newest virtual machines that
/// are not protected will be chosen for removal.
/// &lt;br&gt;&lt;br&gt;</param>
public ScaleInPolicy(IList<string> rules = default(IList<string>))
{
Rules = rules;
CustomInit();
}

/// <summary>
/// An initialization method that performs custom operations like setting defaults
/// </summary>
partial void CustomInit();

/// <summary>
/// Gets or sets the rules to be followed when scaling-in a virtual
/// machine scale set. &amp;lt;br&amp;gt;&amp;lt;br&amp;gt; Possible
/// values are: &amp;lt;br&amp;gt;&amp;lt;br&amp;gt; **Default** When a
/// virtual machine scale set is scaled in, the scale set will first be
/// balanced across zones if it is a zonal scale set. Then, it will be
/// balanced across Fault Domains as far as possible. Within each Fault
/// Domain, the virtual machines chosen for removal will be the newest
/// ones that are not protected from scale-in.
/// &amp;lt;br&amp;gt;&amp;lt;br&amp;gt; **OldestVM** When a virtual
/// machine scale set is being scaled-in, the oldest virtual machines
/// that are not protected from scale-in will be chosen for removal.
/// For zonal virtual machine scale sets, the scale set will first be
/// balanced across zones. Within each zone, the oldest virtual
/// machines that are not protected will be chosen for removal.
/// &amp;lt;br&amp;gt;&amp;lt;br&amp;gt; **NewestVM** When a virtual
/// machine scale set is being scaled-in, the newest virtual machines
/// that are not protected from scale-in will be chosen for removal.
/// For zonal virtual machine scale sets, the scale set will first be
/// balanced across zones. Within each zone, the newest virtual
/// machines that are not protected will be chosen for removal.
/// &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;
/// </summary>
[JsonProperty(PropertyName = "rules")]
public IList<string> Rules { get; set; }

}
}
Loading

0 comments on commit 3272a17

Please sign in to comment.