vendor: update all dependencies to latest versions

This commit is contained in:
Nick Craig-Wood
2017-09-30 15:27:27 +01:00
parent 911d121bb9
commit b017fcfe9a
3048 changed files with 537055 additions and 189679 deletions
+372 -125
View File
@@ -14,9 +14,8 @@ package compute
// See the License for the specific language governing permissions and
// limitations under the License.
//
// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.
// Code generated by Microsoft (R) AutoRest Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
import (
"github.com/Azure/go-autorest/autorest"
@@ -25,43 +24,67 @@ import (
"net/http"
)
// VirtualMachineScaleSetsClient is the the Compute Management Client.
// VirtualMachineScaleSetsClient is the compute Client
type VirtualMachineScaleSetsClient struct {
ManagementClient
}
// NewVirtualMachineScaleSetsClient creates an instance of the
// VirtualMachineScaleSetsClient client.
// NewVirtualMachineScaleSetsClient creates an instance of the VirtualMachineScaleSetsClient client.
func NewVirtualMachineScaleSetsClient(subscriptionID string) VirtualMachineScaleSetsClient {
return NewVirtualMachineScaleSetsClientWithBaseURI(DefaultBaseURI, subscriptionID)
}
// NewVirtualMachineScaleSetsClientWithBaseURI creates an instance of the
// VirtualMachineScaleSetsClient client.
// NewVirtualMachineScaleSetsClientWithBaseURI creates an instance of the VirtualMachineScaleSetsClient client.
func NewVirtualMachineScaleSetsClientWithBaseURI(baseURI string, subscriptionID string) VirtualMachineScaleSetsClient {
return VirtualMachineScaleSetsClient{NewWithBaseURI(baseURI, subscriptionID)}
}
// CreateOrUpdate create or update a VM scale set. This method may poll for
// completion. Polling can be canceled by passing the cancel channel argument.
// The channel will be used to cancel polling and any outstanding HTTP
// requests.
// CreateOrUpdate create or update a VM scale set. This method may poll for completion. Polling can be canceled by
// passing the cancel channel argument. The channel will be used to cancel polling and any outstanding HTTP requests.
//
// resourceGroupName is the name of the resource group. name is the name of the
// VM scale set to create or update. parameters is the scale set object.
func (client VirtualMachineScaleSetsClient) CreateOrUpdate(resourceGroupName string, name string, parameters VirtualMachineScaleSet, cancel <-chan struct{}) (<-chan VirtualMachineScaleSet, <-chan error) {
// resourceGroupName is the name of the resource group. VMScaleSetName is the name of the VM scale set to create or
// update. parameters is the scale set object.
func (client VirtualMachineScaleSetsClient) CreateOrUpdate(resourceGroupName string, VMScaleSetName string, parameters VirtualMachineScaleSet, cancel <-chan struct{}) (<-chan VirtualMachineScaleSet, <-chan error) {
resultChan := make(chan VirtualMachineScaleSet, 1)
errChan := make(chan error, 1)
if err := validation.Validate([]validation.Validation{
{TargetValue: parameters,
Constraints: []validation.Constraint{{Target: "parameters.VirtualMachineScaleSetProperties", Name: validation.Null, Rule: false,
Chain: []validation.Constraint{{Target: "parameters.VirtualMachineScaleSetProperties.UpgradePolicy", Name: validation.Null, Rule: false,
Chain: []validation.Constraint{{Target: "parameters.VirtualMachineScaleSetProperties.UpgradePolicy.RollingUpgradePolicy", Name: validation.Null, Rule: false,
Chain: []validation.Constraint{{Target: "parameters.VirtualMachineScaleSetProperties.UpgradePolicy.RollingUpgradePolicy.MaxBatchInstancePercent", Name: validation.Null, Rule: false,
Chain: []validation.Constraint{{Target: "parameters.VirtualMachineScaleSetProperties.UpgradePolicy.RollingUpgradePolicy.MaxBatchInstancePercent", Name: validation.InclusiveMaximum, Rule: 100, Chain: nil},
{Target: "parameters.VirtualMachineScaleSetProperties.UpgradePolicy.RollingUpgradePolicy.MaxBatchInstancePercent", Name: validation.InclusiveMinimum, Rule: 5, Chain: nil},
}},
{Target: "parameters.VirtualMachineScaleSetProperties.UpgradePolicy.RollingUpgradePolicy.MaxUnhealthyInstancePercent", Name: validation.Null, Rule: false,
Chain: []validation.Constraint{{Target: "parameters.VirtualMachineScaleSetProperties.UpgradePolicy.RollingUpgradePolicy.MaxUnhealthyInstancePercent", Name: validation.InclusiveMaximum, Rule: 100, Chain: nil},
{Target: "parameters.VirtualMachineScaleSetProperties.UpgradePolicy.RollingUpgradePolicy.MaxUnhealthyInstancePercent", Name: validation.InclusiveMinimum, Rule: 5, Chain: nil},
}},
{Target: "parameters.VirtualMachineScaleSetProperties.UpgradePolicy.RollingUpgradePolicy.MaxUnhealthyUpgradedInstancePercent", Name: validation.Null, Rule: false,
Chain: []validation.Constraint{{Target: "parameters.VirtualMachineScaleSetProperties.UpgradePolicy.RollingUpgradePolicy.MaxUnhealthyUpgradedInstancePercent", Name: validation.InclusiveMaximum, Rule: 100, Chain: nil},
{Target: "parameters.VirtualMachineScaleSetProperties.UpgradePolicy.RollingUpgradePolicy.MaxUnhealthyUpgradedInstancePercent", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil},
}},
}},
}},
}}}}}); err != nil {
errChan <- validation.NewErrorWithValidationError(err, "compute.VirtualMachineScaleSetsClient", "CreateOrUpdate")
close(errChan)
close(resultChan)
return resultChan, errChan
}
go func() {
var err error
var result VirtualMachineScaleSet
defer func() {
if err != nil {
errChan <- err
}
resultChan <- result
errChan <- err
close(resultChan)
close(errChan)
}()
req, err := client.CreateOrUpdatePreparer(resourceGroupName, name, parameters, cancel)
req, err := client.CreateOrUpdatePreparer(resourceGroupName, VMScaleSetName, parameters, cancel)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "CreateOrUpdate", nil, "Failure preparing request")
return
@@ -83,14 +106,14 @@ func (client VirtualMachineScaleSetsClient) CreateOrUpdate(resourceGroupName str
}
// CreateOrUpdatePreparer prepares the CreateOrUpdate request.
func (client VirtualMachineScaleSetsClient) CreateOrUpdatePreparer(resourceGroupName string, name string, parameters VirtualMachineScaleSet, cancel <-chan struct{}) (*http.Request, error) {
func (client VirtualMachineScaleSetsClient) CreateOrUpdatePreparer(resourceGroupName string, VMScaleSetName string, parameters VirtualMachineScaleSet, cancel <-chan struct{}) (*http.Request, error) {
pathParameters := map[string]interface{}{
"name": autorest.Encode("path", name),
"resourceGroupName": autorest.Encode("path", resourceGroupName),
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
"vmScaleSetName": autorest.Encode("path", VMScaleSetName),
}
const APIVersion = "2016-04-30-preview"
const APIVersion = "2017-03-30"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
@@ -99,7 +122,7 @@ func (client VirtualMachineScaleSetsClient) CreateOrUpdatePreparer(resourceGroup
autorest.AsJSON(),
autorest.AsPut(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{name}", pathParameters),
autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}", pathParameters),
autorest.WithJSON(parameters),
autorest.WithQueryParameters(queryParameters))
return preparer.Prepare(&http.Request{Cancel: cancel})
@@ -126,16 +149,13 @@ func (client VirtualMachineScaleSetsClient) CreateOrUpdateResponder(resp *http.R
return
}
// Deallocate deallocates specific virtual machines in a VM scale set. Shuts
// down the virtual machines and releases the compute resources. You are not
// billed for the compute resources that this virtual machine scale set
// deallocates. This method may poll for completion. Polling can be canceled by
// passing the cancel channel argument. The channel will be used to cancel
// polling and any outstanding HTTP requests.
// Deallocate deallocates specific virtual machines in a VM scale set. Shuts down the virtual machines and releases the
// compute resources. You are not billed for the compute resources that this virtual machine scale set deallocates.
// This method may poll for completion. Polling can be canceled by passing the cancel channel argument. The channel
// will be used to cancel polling and any outstanding HTTP requests.
//
// resourceGroupName is the name of the resource group. VMScaleSetName is the
// name of the VM scale set. VMInstanceIDs is a list of virtual machine
// instance IDs from the VM scale set.
// resourceGroupName is the name of the resource group. VMScaleSetName is the name of the VM scale set. VMInstanceIDs
// is a list of virtual machine instance IDs from the VM scale set.
func (client VirtualMachineScaleSetsClient) Deallocate(resourceGroupName string, VMScaleSetName string, VMInstanceIDs *VirtualMachineScaleSetVMInstanceIDs, cancel <-chan struct{}) (<-chan OperationStatusResponse, <-chan error) {
resultChan := make(chan OperationStatusResponse, 1)
errChan := make(chan error, 1)
@@ -143,8 +163,10 @@ func (client VirtualMachineScaleSetsClient) Deallocate(resourceGroupName string,
var err error
var result OperationStatusResponse
defer func() {
if err != nil {
errChan <- err
}
resultChan <- result
errChan <- err
close(resultChan)
close(errChan)
}()
@@ -177,7 +199,7 @@ func (client VirtualMachineScaleSetsClient) DeallocatePreparer(resourceGroupName
"vmScaleSetName": autorest.Encode("path", VMScaleSetName),
}
const APIVersion = "2016-04-30-preview"
const APIVersion = "2017-03-30"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
@@ -216,12 +238,10 @@ func (client VirtualMachineScaleSetsClient) DeallocateResponder(resp *http.Respo
return
}
// Delete deletes a VM scale set. This method may poll for completion. Polling
// can be canceled by passing the cancel channel argument. The channel will be
// used to cancel polling and any outstanding HTTP requests.
// Delete deletes a VM scale set. This method may poll for completion. Polling can be canceled by passing the cancel
// channel argument. The channel will be used to cancel polling and any outstanding HTTP requests.
//
// resourceGroupName is the name of the resource group. VMScaleSetName is the
// name of the VM scale set.
// resourceGroupName is the name of the resource group. VMScaleSetName is the name of the VM scale set.
func (client VirtualMachineScaleSetsClient) Delete(resourceGroupName string, VMScaleSetName string, cancel <-chan struct{}) (<-chan OperationStatusResponse, <-chan error) {
resultChan := make(chan OperationStatusResponse, 1)
errChan := make(chan error, 1)
@@ -229,8 +249,10 @@ func (client VirtualMachineScaleSetsClient) Delete(resourceGroupName string, VMS
var err error
var result OperationStatusResponse
defer func() {
if err != nil {
errChan <- err
}
resultChan <- result
errChan <- err
close(resultChan)
close(errChan)
}()
@@ -263,7 +285,7 @@ func (client VirtualMachineScaleSetsClient) DeletePreparer(resourceGroupName str
"vmScaleSetName": autorest.Encode("path", VMScaleSetName),
}
const APIVersion = "2016-04-30-preview"
const APIVersion = "2017-03-30"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
@@ -297,14 +319,12 @@ func (client VirtualMachineScaleSetsClient) DeleteResponder(resp *http.Response)
return
}
// DeleteInstances deletes virtual machines in a VM scale set. This method may
// poll for completion. Polling can be canceled by passing the cancel channel
// argument. The channel will be used to cancel polling and any outstanding
// HTTP requests.
// DeleteInstances deletes virtual machines in a VM scale set. This method may poll for completion. Polling can be
// canceled by passing the cancel channel argument. The channel will be used to cancel polling and any outstanding HTTP
// requests.
//
// resourceGroupName is the name of the resource group. VMScaleSetName is the
// name of the VM scale set. VMInstanceIDs is a list of virtual machine
// instance IDs from the VM scale set.
// resourceGroupName is the name of the resource group. VMScaleSetName is the name of the VM scale set. VMInstanceIDs
// is a list of virtual machine instance IDs from the VM scale set.
func (client VirtualMachineScaleSetsClient) DeleteInstances(resourceGroupName string, VMScaleSetName string, VMInstanceIDs VirtualMachineScaleSetVMInstanceRequiredIDs, cancel <-chan struct{}) (<-chan OperationStatusResponse, <-chan error) {
resultChan := make(chan OperationStatusResponse, 1)
errChan := make(chan error, 1)
@@ -321,8 +341,10 @@ func (client VirtualMachineScaleSetsClient) DeleteInstances(resourceGroupName st
var err error
var result OperationStatusResponse
defer func() {
if err != nil {
errChan <- err
}
resultChan <- result
errChan <- err
close(resultChan)
close(errChan)
}()
@@ -355,7 +377,7 @@ func (client VirtualMachineScaleSetsClient) DeleteInstancesPreparer(resourceGrou
"vmScaleSetName": autorest.Encode("path", VMScaleSetName),
}
const APIVersion = "2016-04-30-preview"
const APIVersion = "2017-03-30"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
@@ -393,8 +415,7 @@ func (client VirtualMachineScaleSetsClient) DeleteInstancesResponder(resp *http.
// Get display information about a virtual machine scale set.
//
// resourceGroupName is the name of the resource group. VMScaleSetName is the
// name of the VM scale set.
// resourceGroupName is the name of the resource group. VMScaleSetName is the name of the VM scale set.
func (client VirtualMachineScaleSetsClient) Get(resourceGroupName string, VMScaleSetName string) (result VirtualMachineScaleSet, err error) {
req, err := client.GetPreparer(resourceGroupName, VMScaleSetName)
if err != nil {
@@ -425,7 +446,7 @@ func (client VirtualMachineScaleSetsClient) GetPreparer(resourceGroupName string
"vmScaleSetName": autorest.Encode("path", VMScaleSetName),
}
const APIVersion = "2016-04-30-preview"
const APIVersion = "2017-03-30"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
@@ -459,8 +480,7 @@ func (client VirtualMachineScaleSetsClient) GetResponder(resp *http.Response) (r
// GetInstanceView gets the status of a VM scale set instance.
//
// resourceGroupName is the name of the resource group. VMScaleSetName is the
// name of the VM scale set.
// resourceGroupName is the name of the resource group. VMScaleSetName is the name of the VM scale set.
func (client VirtualMachineScaleSetsClient) GetInstanceView(resourceGroupName string, VMScaleSetName string) (result VirtualMachineScaleSetInstanceView, err error) {
req, err := client.GetInstanceViewPreparer(resourceGroupName, VMScaleSetName)
if err != nil {
@@ -491,7 +511,7 @@ func (client VirtualMachineScaleSetsClient) GetInstanceViewPreparer(resourceGrou
"vmScaleSetName": autorest.Encode("path", VMScaleSetName),
}
const APIVersion = "2016-04-30-preview"
const APIVersion = "2017-03-30"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
@@ -555,7 +575,7 @@ func (client VirtualMachineScaleSetsClient) ListPreparer(resourceGroupName strin
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
}
const APIVersion = "2016-04-30-preview"
const APIVersion = "2017-03-30"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
@@ -611,9 +631,53 @@ func (client VirtualMachineScaleSetsClient) ListNextResults(lastResults VirtualM
return
}
// ListAll gets a list of all VM Scale Sets in the subscription, regardless of
// the associated resource group. Use nextLink property in the response to get
// the next page of VM Scale Sets. Do this till nextLink is not null to fetch
// ListComplete gets all elements from the list without paging.
func (client VirtualMachineScaleSetsClient) ListComplete(resourceGroupName string, cancel <-chan struct{}) (<-chan VirtualMachineScaleSet, <-chan error) {
resultChan := make(chan VirtualMachineScaleSet)
errChan := make(chan error, 1)
go func() {
defer func() {
close(resultChan)
close(errChan)
}()
list, err := client.List(resourceGroupName)
if err != nil {
errChan <- err
return
}
if list.Value != nil {
for _, item := range *list.Value {
select {
case <-cancel:
return
case resultChan <- item:
// Intentionally left blank
}
}
}
for list.NextLink != nil {
list, err = client.ListNextResults(list)
if err != nil {
errChan <- err
return
}
if list.Value != nil {
for _, item := range *list.Value {
select {
case <-cancel:
return
case resultChan <- item:
// Intentionally left blank
}
}
}
}
}()
return resultChan, errChan
}
// ListAll gets a list of all VM Scale Sets in the subscription, regardless of the associated resource group. Use
// nextLink property in the response to get the next page of VM Scale Sets. Do this till nextLink is not null to fetch
// all the VM Scale Sets.
func (client VirtualMachineScaleSetsClient) ListAll() (result VirtualMachineScaleSetListWithLinkResult, err error) {
req, err := client.ListAllPreparer()
@@ -643,7 +707,7 @@ func (client VirtualMachineScaleSetsClient) ListAllPreparer() (*http.Request, er
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
}
const APIVersion = "2016-04-30-preview"
const APIVersion = "2017-03-30"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
@@ -699,11 +763,55 @@ func (client VirtualMachineScaleSetsClient) ListAllNextResults(lastResults Virtu
return
}
// ListSkus gets a list of SKUs available for your VM scale set, including the
// minimum and maximum VM instances allowed for each SKU.
// ListAllComplete gets all elements from the list without paging.
func (client VirtualMachineScaleSetsClient) ListAllComplete(cancel <-chan struct{}) (<-chan VirtualMachineScaleSet, <-chan error) {
resultChan := make(chan VirtualMachineScaleSet)
errChan := make(chan error, 1)
go func() {
defer func() {
close(resultChan)
close(errChan)
}()
list, err := client.ListAll()
if err != nil {
errChan <- err
return
}
if list.Value != nil {
for _, item := range *list.Value {
select {
case <-cancel:
return
case resultChan <- item:
// Intentionally left blank
}
}
}
for list.NextLink != nil {
list, err = client.ListAllNextResults(list)
if err != nil {
errChan <- err
return
}
if list.Value != nil {
for _, item := range *list.Value {
select {
case <-cancel:
return
case resultChan <- item:
// Intentionally left blank
}
}
}
}
}()
return resultChan, errChan
}
// ListSkus gets a list of SKUs available for your VM scale set, including the minimum and maximum VM instances allowed
// for each SKU.
//
// resourceGroupName is the name of the resource group. VMScaleSetName is the
// name of the VM scale set.
// resourceGroupName is the name of the resource group. VMScaleSetName is the name of the VM scale set.
func (client VirtualMachineScaleSetsClient) ListSkus(resourceGroupName string, VMScaleSetName string) (result VirtualMachineScaleSetListSkusResult, err error) {
req, err := client.ListSkusPreparer(resourceGroupName, VMScaleSetName)
if err != nil {
@@ -734,7 +842,7 @@ func (client VirtualMachineScaleSetsClient) ListSkusPreparer(resourceGroupName s
"vmScaleSetName": autorest.Encode("path", VMScaleSetName),
}
const APIVersion = "2016-04-30-preview"
const APIVersion = "2017-03-30"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
@@ -790,16 +898,58 @@ func (client VirtualMachineScaleSetsClient) ListSkusNextResults(lastResults Virt
return
}
// PowerOff power off (stop) one or more virtual machines in a VM scale set.
// Note that resources are still attached and you are getting charged for the
// resources. Instead, use deallocate to release resources and avoid charges.
// This method may poll for completion. Polling can be canceled by passing the
// cancel channel argument. The channel will be used to cancel polling and any
// outstanding HTTP requests.
// ListSkusComplete gets all elements from the list without paging.
func (client VirtualMachineScaleSetsClient) ListSkusComplete(resourceGroupName string, VMScaleSetName string, cancel <-chan struct{}) (<-chan VirtualMachineScaleSetSku, <-chan error) {
resultChan := make(chan VirtualMachineScaleSetSku)
errChan := make(chan error, 1)
go func() {
defer func() {
close(resultChan)
close(errChan)
}()
list, err := client.ListSkus(resourceGroupName, VMScaleSetName)
if err != nil {
errChan <- err
return
}
if list.Value != nil {
for _, item := range *list.Value {
select {
case <-cancel:
return
case resultChan <- item:
// Intentionally left blank
}
}
}
for list.NextLink != nil {
list, err = client.ListSkusNextResults(list)
if err != nil {
errChan <- err
return
}
if list.Value != nil {
for _, item := range *list.Value {
select {
case <-cancel:
return
case resultChan <- item:
// Intentionally left blank
}
}
}
}
}()
return resultChan, errChan
}
// PowerOff power off (stop) one or more virtual machines in a VM scale set. Note that resources are still attached and
// you are getting charged for the resources. Instead, use deallocate to release resources and avoid charges. This
// method may poll for completion. Polling can be canceled by passing the cancel channel argument. The channel will be
// used to cancel polling and any outstanding HTTP requests.
//
// resourceGroupName is the name of the resource group. VMScaleSetName is the
// name of the VM scale set. VMInstanceIDs is a list of virtual machine
// instance IDs from the VM scale set.
// resourceGroupName is the name of the resource group. VMScaleSetName is the name of the VM scale set. VMInstanceIDs
// is a list of virtual machine instance IDs from the VM scale set.
func (client VirtualMachineScaleSetsClient) PowerOff(resourceGroupName string, VMScaleSetName string, VMInstanceIDs *VirtualMachineScaleSetVMInstanceIDs, cancel <-chan struct{}) (<-chan OperationStatusResponse, <-chan error) {
resultChan := make(chan OperationStatusResponse, 1)
errChan := make(chan error, 1)
@@ -807,8 +957,10 @@ func (client VirtualMachineScaleSetsClient) PowerOff(resourceGroupName string, V
var err error
var result OperationStatusResponse
defer func() {
if err != nil {
errChan <- err
}
resultChan <- result
errChan <- err
close(resultChan)
close(errChan)
}()
@@ -841,7 +993,7 @@ func (client VirtualMachineScaleSetsClient) PowerOffPreparer(resourceGroupName s
"vmScaleSetName": autorest.Encode("path", VMScaleSetName),
}
const APIVersion = "2016-04-30-preview"
const APIVersion = "2017-03-30"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
@@ -880,26 +1032,27 @@ func (client VirtualMachineScaleSetsClient) PowerOffResponder(resp *http.Respons
return
}
// Reimage reimages (upgrade the operating system) one or more virtual machines
// in a VM scale set. This method may poll for completion. Polling can be
// canceled by passing the cancel channel argument. The channel will be used to
// cancel polling and any outstanding HTTP requests.
// Reimage reimages (upgrade the operating system) one or more virtual machines in a VM scale set. This method may poll
// for completion. Polling can be canceled by passing the cancel channel argument. The channel will be used to cancel
// polling and any outstanding HTTP requests.
//
// resourceGroupName is the name of the resource group. VMScaleSetName is the
// name of the VM scale set.
func (client VirtualMachineScaleSetsClient) Reimage(resourceGroupName string, VMScaleSetName string, cancel <-chan struct{}) (<-chan OperationStatusResponse, <-chan error) {
// resourceGroupName is the name of the resource group. VMScaleSetName is the name of the VM scale set. VMInstanceIDs
// is a list of virtual machine instance IDs from the VM scale set.
func (client VirtualMachineScaleSetsClient) Reimage(resourceGroupName string, VMScaleSetName string, VMInstanceIDs *VirtualMachineScaleSetVMInstanceIDs, cancel <-chan struct{}) (<-chan OperationStatusResponse, <-chan error) {
resultChan := make(chan OperationStatusResponse, 1)
errChan := make(chan error, 1)
go func() {
var err error
var result OperationStatusResponse
defer func() {
if err != nil {
errChan <- err
}
resultChan <- result
errChan <- err
close(resultChan)
close(errChan)
}()
req, err := client.ReimagePreparer(resourceGroupName, VMScaleSetName, cancel)
req, err := client.ReimagePreparer(resourceGroupName, VMScaleSetName, VMInstanceIDs, cancel)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "Reimage", nil, "Failure preparing request")
return
@@ -921,23 +1074,28 @@ func (client VirtualMachineScaleSetsClient) Reimage(resourceGroupName string, VM
}
// ReimagePreparer prepares the Reimage request.
func (client VirtualMachineScaleSetsClient) ReimagePreparer(resourceGroupName string, VMScaleSetName string, cancel <-chan struct{}) (*http.Request, error) {
func (client VirtualMachineScaleSetsClient) ReimagePreparer(resourceGroupName string, VMScaleSetName string, VMInstanceIDs *VirtualMachineScaleSetVMInstanceIDs, cancel <-chan struct{}) (*http.Request, error) {
pathParameters := map[string]interface{}{
"resourceGroupName": autorest.Encode("path", resourceGroupName),
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
"vmScaleSetName": autorest.Encode("path", VMScaleSetName),
}
const APIVersion = "2016-04-30-preview"
const APIVersion = "2017-03-30"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
preparer := autorest.CreatePreparer(
autorest.AsJSON(),
autorest.AsPost(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/reimage", pathParameters),
autorest.WithQueryParameters(queryParameters))
if VMInstanceIDs != nil {
preparer = autorest.DecoratePreparer(preparer,
autorest.WithJSON(VMInstanceIDs))
}
return preparer.Prepare(&http.Request{Cancel: cancel})
}
@@ -962,27 +1120,27 @@ func (client VirtualMachineScaleSetsClient) ReimageResponder(resp *http.Response
return
}
// ReimageAll reimages all the disks ( including data disks ) in the virtual
// machines in a virtual machine scale set. This operation is only supported
// for managed disks. This method may poll for completion. Polling can be
// canceled by passing the cancel channel argument. The channel will be used to
// cancel polling and any outstanding HTTP requests.
// ReimageAll reimages all the disks ( including data disks ) in the virtual machines in a VM scale set. This operation
// is only supported for managed disks. This method may poll for completion. Polling can be canceled by passing the
// cancel channel argument. The channel will be used to cancel polling and any outstanding HTTP requests.
//
// resourceGroupName is the name of the resource group. VMScaleSetName is the
// name of the VM scale set.
func (client VirtualMachineScaleSetsClient) ReimageAll(resourceGroupName string, VMScaleSetName string, cancel <-chan struct{}) (<-chan OperationStatusResponse, <-chan error) {
// resourceGroupName is the name of the resource group. VMScaleSetName is the name of the VM scale set. VMInstanceIDs
// is a list of virtual machine instance IDs from the VM scale set.
func (client VirtualMachineScaleSetsClient) ReimageAll(resourceGroupName string, VMScaleSetName string, VMInstanceIDs *VirtualMachineScaleSetVMInstanceIDs, cancel <-chan struct{}) (<-chan OperationStatusResponse, <-chan error) {
resultChan := make(chan OperationStatusResponse, 1)
errChan := make(chan error, 1)
go func() {
var err error
var result OperationStatusResponse
defer func() {
if err != nil {
errChan <- err
}
resultChan <- result
errChan <- err
close(resultChan)
close(errChan)
}()
req, err := client.ReimageAllPreparer(resourceGroupName, VMScaleSetName, cancel)
req, err := client.ReimageAllPreparer(resourceGroupName, VMScaleSetName, VMInstanceIDs, cancel)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "ReimageAll", nil, "Failure preparing request")
return
@@ -1004,23 +1162,28 @@ func (client VirtualMachineScaleSetsClient) ReimageAll(resourceGroupName string,
}
// ReimageAllPreparer prepares the ReimageAll request.
func (client VirtualMachineScaleSetsClient) ReimageAllPreparer(resourceGroupName string, VMScaleSetName string, cancel <-chan struct{}) (*http.Request, error) {
func (client VirtualMachineScaleSetsClient) ReimageAllPreparer(resourceGroupName string, VMScaleSetName string, VMInstanceIDs *VirtualMachineScaleSetVMInstanceIDs, cancel <-chan struct{}) (*http.Request, error) {
pathParameters := map[string]interface{}{
"resourceGroupName": autorest.Encode("path", resourceGroupName),
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
"vmScaleSetName": autorest.Encode("path", VMScaleSetName),
}
const APIVersion = "2016-04-30-preview"
const APIVersion = "2017-03-30"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
preparer := autorest.CreatePreparer(
autorest.AsJSON(),
autorest.AsPost(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/reimageall", pathParameters),
autorest.WithQueryParameters(queryParameters))
if VMInstanceIDs != nil {
preparer = autorest.DecoratePreparer(preparer,
autorest.WithJSON(VMInstanceIDs))
}
return preparer.Prepare(&http.Request{Cancel: cancel})
}
@@ -1045,14 +1208,12 @@ func (client VirtualMachineScaleSetsClient) ReimageAllResponder(resp *http.Respo
return
}
// Restart restarts one or more virtual machines in a VM scale set. This method
// may poll for completion. Polling can be canceled by passing the cancel
// channel argument. The channel will be used to cancel polling and any
// outstanding HTTP requests.
// Restart restarts one or more virtual machines in a VM scale set. This method may poll for completion. Polling can be
// canceled by passing the cancel channel argument. The channel will be used to cancel polling and any outstanding HTTP
// requests.
//
// resourceGroupName is the name of the resource group. VMScaleSetName is the
// name of the VM scale set. VMInstanceIDs is a list of virtual machine
// instance IDs from the VM scale set.
// resourceGroupName is the name of the resource group. VMScaleSetName is the name of the VM scale set. VMInstanceIDs
// is a list of virtual machine instance IDs from the VM scale set.
func (client VirtualMachineScaleSetsClient) Restart(resourceGroupName string, VMScaleSetName string, VMInstanceIDs *VirtualMachineScaleSetVMInstanceIDs, cancel <-chan struct{}) (<-chan OperationStatusResponse, <-chan error) {
resultChan := make(chan OperationStatusResponse, 1)
errChan := make(chan error, 1)
@@ -1060,8 +1221,10 @@ func (client VirtualMachineScaleSetsClient) Restart(resourceGroupName string, VM
var err error
var result OperationStatusResponse
defer func() {
if err != nil {
errChan <- err
}
resultChan <- result
errChan <- err
close(resultChan)
close(errChan)
}()
@@ -1094,7 +1257,7 @@ func (client VirtualMachineScaleSetsClient) RestartPreparer(resourceGroupName st
"vmScaleSetName": autorest.Encode("path", VMScaleSetName),
}
const APIVersion = "2016-04-30-preview"
const APIVersion = "2017-03-30"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
@@ -1133,14 +1296,12 @@ func (client VirtualMachineScaleSetsClient) RestartResponder(resp *http.Response
return
}
// Start starts one or more virtual machines in a VM scale set. This method may
// poll for completion. Polling can be canceled by passing the cancel channel
// argument. The channel will be used to cancel polling and any outstanding
// HTTP requests.
// Start starts one or more virtual machines in a VM scale set. This method may poll for completion. Polling can be
// canceled by passing the cancel channel argument. The channel will be used to cancel polling and any outstanding HTTP
// requests.
//
// resourceGroupName is the name of the resource group. VMScaleSetName is the
// name of the VM scale set. VMInstanceIDs is a list of virtual machine
// instance IDs from the VM scale set.
// resourceGroupName is the name of the resource group. VMScaleSetName is the name of the VM scale set. VMInstanceIDs
// is a list of virtual machine instance IDs from the VM scale set.
func (client VirtualMachineScaleSetsClient) Start(resourceGroupName string, VMScaleSetName string, VMInstanceIDs *VirtualMachineScaleSetVMInstanceIDs, cancel <-chan struct{}) (<-chan OperationStatusResponse, <-chan error) {
resultChan := make(chan OperationStatusResponse, 1)
errChan := make(chan error, 1)
@@ -1148,8 +1309,10 @@ func (client VirtualMachineScaleSetsClient) Start(resourceGroupName string, VMSc
var err error
var result OperationStatusResponse
defer func() {
if err != nil {
errChan <- err
}
resultChan <- result
errChan <- err
close(resultChan)
close(errChan)
}()
@@ -1182,7 +1345,7 @@ func (client VirtualMachineScaleSetsClient) StartPreparer(resourceGroupName stri
"vmScaleSetName": autorest.Encode("path", VMScaleSetName),
}
const APIVersion = "2016-04-30-preview"
const APIVersion = "2017-03-30"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
@@ -1221,14 +1384,96 @@ func (client VirtualMachineScaleSetsClient) StartResponder(resp *http.Response)
return
}
// UpdateInstances upgrades one or more virtual machines to the latest SKU set
// in the VM scale set model. This method may poll for completion. Polling can
// be canceled by passing the cancel channel argument. The channel will be used
// to cancel polling and any outstanding HTTP requests.
// Update update a VM scale set. This method may poll for completion. Polling can be canceled by passing the cancel
// channel argument. The channel will be used to cancel polling and any outstanding HTTP requests.
//
// resourceGroupName is the name of the resource group. VMScaleSetName is the
// name of the VM scale set. VMInstanceIDs is a list of virtual machine
// instance IDs from the VM scale set.
// resourceGroupName is the name of the resource group. VMScaleSetName is the name of the VM scale set to create or
// update. parameters is the scale set object.
func (client VirtualMachineScaleSetsClient) Update(resourceGroupName string, VMScaleSetName string, parameters VirtualMachineScaleSetUpdate, cancel <-chan struct{}) (<-chan VirtualMachineScaleSet, <-chan error) {
resultChan := make(chan VirtualMachineScaleSet, 1)
errChan := make(chan error, 1)
go func() {
var err error
var result VirtualMachineScaleSet
defer func() {
if err != nil {
errChan <- err
}
resultChan <- result
close(resultChan)
close(errChan)
}()
req, err := client.UpdatePreparer(resourceGroupName, VMScaleSetName, parameters, cancel)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "Update", nil, "Failure preparing request")
return
}
resp, err := client.UpdateSender(req)
if err != nil {
result.Response = autorest.Response{Response: resp}
err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "Update", resp, "Failure sending request")
return
}
result, err = client.UpdateResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "Update", resp, "Failure responding to request")
}
}()
return resultChan, errChan
}
// UpdatePreparer prepares the Update request.
func (client VirtualMachineScaleSetsClient) UpdatePreparer(resourceGroupName string, VMScaleSetName string, parameters VirtualMachineScaleSetUpdate, cancel <-chan struct{}) (*http.Request, error) {
pathParameters := map[string]interface{}{
"resourceGroupName": autorest.Encode("path", resourceGroupName),
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
"vmScaleSetName": autorest.Encode("path", VMScaleSetName),
}
const APIVersion = "2017-03-30"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
preparer := autorest.CreatePreparer(
autorest.AsJSON(),
autorest.AsPatch(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}", pathParameters),
autorest.WithJSON(parameters),
autorest.WithQueryParameters(queryParameters))
return preparer.Prepare(&http.Request{Cancel: cancel})
}
// UpdateSender sends the Update request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualMachineScaleSetsClient) UpdateSender(req *http.Request) (*http.Response, error) {
return autorest.SendWithSender(client,
req,
azure.DoPollForAsynchronous(client.PollingDelay))
}
// UpdateResponder handles the response to the Update request. The method always
// closes the http.Response Body.
func (client VirtualMachineScaleSetsClient) UpdateResponder(resp *http.Response) (result VirtualMachineScaleSet, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK),
autorest.ByUnmarshallingJSON(&result),
autorest.ByClosing())
result.Response = autorest.Response{Response: resp}
return
}
// UpdateInstances upgrades one or more virtual machines to the latest SKU set in the VM scale set model. This method
// may poll for completion. Polling can be canceled by passing the cancel channel argument. The channel will be used to
// cancel polling and any outstanding HTTP requests.
//
// resourceGroupName is the name of the resource group. VMScaleSetName is the name of the VM scale set. VMInstanceIDs
// is a list of virtual machine instance IDs from the VM scale set.
func (client VirtualMachineScaleSetsClient) UpdateInstances(resourceGroupName string, VMScaleSetName string, VMInstanceIDs VirtualMachineScaleSetVMInstanceRequiredIDs, cancel <-chan struct{}) (<-chan OperationStatusResponse, <-chan error) {
resultChan := make(chan OperationStatusResponse, 1)
errChan := make(chan error, 1)
@@ -1245,8 +1490,10 @@ func (client VirtualMachineScaleSetsClient) UpdateInstances(resourceGroupName st
var err error
var result OperationStatusResponse
defer func() {
if err != nil {
errChan <- err
}
resultChan <- result
errChan <- err
close(resultChan)
close(errChan)
}()
@@ -1279,7 +1526,7 @@ func (client VirtualMachineScaleSetsClient) UpdateInstancesPreparer(resourceGrou
"vmScaleSetName": autorest.Encode("path", VMScaleSetName),
}
const APIVersion = "2016-04-30-preview"
const APIVersion = "2017-03-30"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}