Unverified Commit f0a4672e authored by Kubernetes Prow Robot's avatar Kubernetes Prow Robot Committed by GitHub

Merge pull request #76656 from feiskyer/az-vmss-fix

Switch to instance-level update APIs for Azure VMSS loadbalancer operations
parents f9a3a22e d35c3a22
...@@ -9,7 +9,7 @@ go 1.12 ...@@ -9,7 +9,7 @@ go 1.12
require ( require (
bitbucket.org/bertimus9/systemstat v0.0.0-20180207000608-0eeff89b0690 bitbucket.org/bertimus9/systemstat v0.0.0-20180207000608-0eeff89b0690
cloud.google.com/go v0.0.0-20160913182117-3b1ae45394a2 cloud.google.com/go v0.0.0-20160913182117-3b1ae45394a2
github.com/Azure/azure-sdk-for-go v21.3.0+incompatible github.com/Azure/azure-sdk-for-go v21.4.0+incompatible
github.com/Azure/go-autorest v11.1.0+incompatible github.com/Azure/go-autorest v11.1.0+incompatible
github.com/GoogleCloudPlatform/k8s-cloud-provider v0.0.0-20181220005116-f8e995905100 github.com/GoogleCloudPlatform/k8s-cloud-provider v0.0.0-20181220005116-f8e995905100
github.com/JeffAshton/win_pdh v0.0.0-20161109143554-76bb4ee9f0ab github.com/JeffAshton/win_pdh v0.0.0-20161109143554-76bb4ee9f0ab
...@@ -203,7 +203,7 @@ require ( ...@@ -203,7 +203,7 @@ require (
replace ( replace (
bitbucket.org/bertimus9/systemstat => bitbucket.org/bertimus9/systemstat v0.0.0-20180207000608-0eeff89b0690 bitbucket.org/bertimus9/systemstat => bitbucket.org/bertimus9/systemstat v0.0.0-20180207000608-0eeff89b0690
cloud.google.com/go => cloud.google.com/go v0.0.0-20160913182117-3b1ae45394a2 cloud.google.com/go => cloud.google.com/go v0.0.0-20160913182117-3b1ae45394a2
github.com/Azure/azure-sdk-for-go => github.com/Azure/azure-sdk-for-go v21.3.0+incompatible github.com/Azure/azure-sdk-for-go => github.com/Azure/azure-sdk-for-go v21.4.0+incompatible
github.com/Azure/go-ansiterm => github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78 github.com/Azure/go-ansiterm => github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78
github.com/Azure/go-autorest => github.com/Azure/go-autorest v11.1.0+incompatible github.com/Azure/go-autorest => github.com/Azure/go-autorest v11.1.0+incompatible
github.com/BurntSushi/toml => github.com/BurntSushi/toml v0.3.0 github.com/BurntSushi/toml => github.com/BurntSushi/toml v0.3.0
......
...@@ -2,8 +2,8 @@ bitbucket.org/bertimus9/systemstat v0.0.0-20180207000608-0eeff89b0690 h1:N9r8OBS ...@@ -2,8 +2,8 @@ bitbucket.org/bertimus9/systemstat v0.0.0-20180207000608-0eeff89b0690 h1:N9r8OBS
bitbucket.org/bertimus9/systemstat v0.0.0-20180207000608-0eeff89b0690/go.mod h1:Ulb78X89vxKYgdL24HMTiXYHlyHEvruOj1ZPlqeNEZM= bitbucket.org/bertimus9/systemstat v0.0.0-20180207000608-0eeff89b0690/go.mod h1:Ulb78X89vxKYgdL24HMTiXYHlyHEvruOj1ZPlqeNEZM=
cloud.google.com/go v0.0.0-20160913182117-3b1ae45394a2 h1:BD5IDvMK5RQqnDi7Fbizwoad9Uus/Hs/xJ1zMYVXlS8= cloud.google.com/go v0.0.0-20160913182117-3b1ae45394a2 h1:BD5IDvMK5RQqnDi7Fbizwoad9Uus/Hs/xJ1zMYVXlS8=
cloud.google.com/go v0.0.0-20160913182117-3b1ae45394a2/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= cloud.google.com/go v0.0.0-20160913182117-3b1ae45394a2/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=
github.com/Azure/azure-sdk-for-go v21.3.0+incompatible h1:YFvAka2WKAl2xnJkYV1e1b7E2z88AgFszDzWU18ejMY= github.com/Azure/azure-sdk-for-go v21.4.0+incompatible h1:rsdM2HqR64WhJv7YqMAjWOLAebbx4c9/gzcLC7yoDDE=
github.com/Azure/azure-sdk-for-go v21.3.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= github.com/Azure/azure-sdk-for-go v21.4.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc=
github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78 h1:w+iIsaOQNcT7OZ575w+acHgRric5iCyQh+xv+KJ4HB8= github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78 h1:w+iIsaOQNcT7OZ575w+acHgRric5iCyQh+xv+KJ4HB8=
github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78/go.mod h1:LmzpDX56iTiv29bbRTIsUNlaFfuhWRQBWjQdVyAevI8= github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78/go.mod h1:LmzpDX56iTiv29bbRTIsUNlaFfuhWRQBWjQdVyAevI8=
github.com/Azure/go-autorest v11.1.0+incompatible h1:9DfMsQdUMEtg1jKRTjtkNZsvOuZXJOMl4dN1kiQwAc8= github.com/Azure/go-autorest v11.1.0+incompatible h1:9DfMsQdUMEtg1jKRTjtkNZsvOuZXJOMl4dN1kiQwAc8=
......
...@@ -58,7 +58,7 @@ go_library( ...@@ -58,7 +58,7 @@ go_library(
"//staging/src/k8s.io/cloud-provider/volume:go_default_library", "//staging/src/k8s.io/cloud-provider/volume:go_default_library",
"//staging/src/k8s.io/cloud-provider/volume/errors:go_default_library", "//staging/src/k8s.io/cloud-provider/volume/errors:go_default_library",
"//staging/src/k8s.io/cloud-provider/volume/helpers:go_default_library", "//staging/src/k8s.io/cloud-provider/volume/helpers:go_default_library",
"//vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-10-01/compute:go_default_library", "//vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-03-01/compute:go_default_library",
"//vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-09-01/network:go_default_library", "//vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-09-01/network:go_default_library",
"//vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2018-07-01/storage:go_default_library", "//vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2018-07-01/storage:go_default_library",
"//vendor/github.com/Azure/azure-sdk-for-go/storage:go_default_library", "//vendor/github.com/Azure/azure-sdk-for-go/storage:go_default_library",
...@@ -102,7 +102,7 @@ go_test( ...@@ -102,7 +102,7 @@ go_test(
"//staging/src/k8s.io/apimachinery/pkg/util/sets:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/util/sets:go_default_library",
"//staging/src/k8s.io/cloud-provider:go_default_library", "//staging/src/k8s.io/cloud-provider:go_default_library",
"//staging/src/k8s.io/cloud-provider/service/helpers:go_default_library", "//staging/src/k8s.io/cloud-provider/service/helpers:go_default_library",
"//vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-10-01/compute:go_default_library", "//vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-03-01/compute:go_default_library",
"//vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-09-01/network:go_default_library", "//vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-09-01/network:go_default_library",
"//vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2018-07-01/storage:go_default_library", "//vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2018-07-01/storage:go_default_library",
"//vendor/github.com/Azure/go-autorest/autorest:go_default_library", "//vendor/github.com/Azure/go-autorest/autorest:go_default_library",
......
...@@ -38,7 +38,7 @@ import ( ...@@ -38,7 +38,7 @@ import (
cloudprovider "k8s.io/cloud-provider" cloudprovider "k8s.io/cloud-provider"
"k8s.io/kubernetes/pkg/cloudprovider/providers/azure/auth" "k8s.io/kubernetes/pkg/cloudprovider/providers/azure/auth"
"github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-10-01/compute" "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-03-01/compute"
"github.com/Azure/go-autorest/autorest" "github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure" "github.com/Azure/go-autorest/autorest/azure"
"k8s.io/klog" "k8s.io/klog"
......
...@@ -20,7 +20,7 @@ import ( ...@@ -20,7 +20,7 @@ import (
"fmt" "fmt"
"net/http" "net/http"
"github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-10-01/compute" "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-03-01/compute"
"github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-09-01/network" "github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-09-01/network"
"k8s.io/api/core/v1" "k8s.io/api/core/v1"
......
...@@ -22,7 +22,7 @@ import ( ...@@ -22,7 +22,7 @@ import (
"net/http" "net/http"
"time" "time"
"github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-10-01/compute" "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-03-01/compute"
"github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-09-01/network" "github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-09-01/network"
"github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2018-07-01/storage" "github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2018-07-01/storage"
"github.com/Azure/go-autorest/autorest" "github.com/Azure/go-autorest/autorest"
...@@ -89,10 +89,8 @@ type SecurityGroupsClient interface { ...@@ -89,10 +89,8 @@ type SecurityGroupsClient interface {
// VirtualMachineScaleSetsClient defines needed functions for azure compute.VirtualMachineScaleSetsClient // VirtualMachineScaleSetsClient defines needed functions for azure compute.VirtualMachineScaleSetsClient
type VirtualMachineScaleSetsClient interface { type VirtualMachineScaleSetsClient interface {
CreateOrUpdate(ctx context.Context, resourceGroupName string, VMScaleSetName string, parameters compute.VirtualMachineScaleSet) (resp *http.Response, err error)
Get(ctx context.Context, resourceGroupName string, VMScaleSetName string) (result compute.VirtualMachineScaleSet, err error) Get(ctx context.Context, resourceGroupName string, VMScaleSetName string) (result compute.VirtualMachineScaleSet, err error)
List(ctx context.Context, resourceGroupName string) (result []compute.VirtualMachineScaleSet, err error) List(ctx context.Context, resourceGroupName string) (result []compute.VirtualMachineScaleSet, err error)
UpdateInstances(ctx context.Context, resourceGroupName string, VMScaleSetName string, VMInstanceIDs compute.VirtualMachineScaleSetVMInstanceRequiredIDs) (resp *http.Response, err error)
} }
// VirtualMachineScaleSetVMsClient defines needed functions for azure compute.VirtualMachineScaleSetVMsClient // VirtualMachineScaleSetVMsClient defines needed functions for azure compute.VirtualMachineScaleSetVMsClient
...@@ -835,30 +833,6 @@ func newAzVirtualMachineScaleSetsClient(config *azClientConfig) *azVirtualMachin ...@@ -835,30 +833,6 @@ func newAzVirtualMachineScaleSetsClient(config *azClientConfig) *azVirtualMachin
} }
} }
func (az *azVirtualMachineScaleSetsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, VMScaleSetName string, parameters compute.VirtualMachineScaleSet) (resp *http.Response, err error) {
/* Write rate limiting */
if !az.rateLimiterWriter.TryAccept() {
err = createRateLimitErr(true, "VMSSCreateOrUpdate")
return
}
klog.V(10).Infof("azVirtualMachineScaleSetsClient.CreateOrUpdate(%q,%q): start", resourceGroupName, VMScaleSetName)
defer func() {
klog.V(10).Infof("azVirtualMachineScaleSetsClient.CreateOrUpdate(%q,%q): end", resourceGroupName, VMScaleSetName)
}()
mc := newMetricContext("vmss", "create_or_update", resourceGroupName, az.client.SubscriptionID)
future, err := az.client.CreateOrUpdate(ctx, resourceGroupName, VMScaleSetName, parameters)
mc.Observe(err)
if err != nil {
return future.Response(), err
}
err = future.WaitForCompletionRef(ctx, az.client.Client)
mc.Observe(err)
return future.Response(), err
}
func (az *azVirtualMachineScaleSetsClient) Get(ctx context.Context, resourceGroupName string, VMScaleSetName string) (result compute.VirtualMachineScaleSet, err error) { func (az *azVirtualMachineScaleSetsClient) Get(ctx context.Context, resourceGroupName string, VMScaleSetName string) (result compute.VirtualMachineScaleSet, err error) {
if !az.rateLimiterReader.TryAccept() { if !az.rateLimiterReader.TryAccept() {
err = createRateLimitErr(false, "VMSSGet") err = createRateLimitErr(false, "VMSSGet")
...@@ -906,30 +880,6 @@ func (az *azVirtualMachineScaleSetsClient) List(ctx context.Context, resourceGro ...@@ -906,30 +880,6 @@ func (az *azVirtualMachineScaleSetsClient) List(ctx context.Context, resourceGro
return result, nil return result, nil
} }
func (az *azVirtualMachineScaleSetsClient) UpdateInstances(ctx context.Context, resourceGroupName string, VMScaleSetName string, VMInstanceIDs compute.VirtualMachineScaleSetVMInstanceRequiredIDs) (resp *http.Response, err error) {
/* Write rate limiting */
if !az.rateLimiterWriter.TryAccept() {
err = createRateLimitErr(true, "VMSSUpdateInstances")
return
}
klog.V(10).Infof("azVirtualMachineScaleSetsClient.UpdateInstances(%q,%q,%v): start", resourceGroupName, VMScaleSetName, VMInstanceIDs)
defer func() {
klog.V(10).Infof("azVirtualMachineScaleSetsClient.UpdateInstances(%q,%q,%v): end", resourceGroupName, VMScaleSetName, VMInstanceIDs)
}()
mc := newMetricContext("vmss", "update_instances", resourceGroupName, az.client.SubscriptionID)
future, err := az.client.UpdateInstances(ctx, resourceGroupName, VMScaleSetName, VMInstanceIDs)
mc.Observe(err)
if err != nil {
return future.Response(), err
}
err = future.WaitForCompletionRef(ctx, az.client.Client)
mc.Observe(err)
return future.Response(), err
}
// azVirtualMachineScaleSetVMsClient implements VirtualMachineScaleSetVMsClient. // azVirtualMachineScaleSetVMsClient implements VirtualMachineScaleSetVMsClient.
type azVirtualMachineScaleSetVMsClient struct { type azVirtualMachineScaleSetVMsClient struct {
client compute.VirtualMachineScaleSetVMsClient client compute.VirtualMachineScaleSetVMsClient
......
...@@ -21,7 +21,7 @@ import ( ...@@ -21,7 +21,7 @@ import (
"fmt" "fmt"
"time" "time"
"github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-10-01/compute" "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-03-01/compute"
"k8s.io/klog" "k8s.io/klog"
"k8s.io/apimachinery/pkg/types" "k8s.io/apimachinery/pkg/types"
......
...@@ -20,7 +20,7 @@ import ( ...@@ -20,7 +20,7 @@ import (
"fmt" "fmt"
"testing" "testing"
"github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-10-01/compute" "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-03-01/compute"
) )
func TestAttachDisk(t *testing.T) { func TestAttachDisk(t *testing.T) {
......
...@@ -21,7 +21,7 @@ import ( ...@@ -21,7 +21,7 @@ import (
"net/http" "net/http"
"strings" "strings"
"github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-10-01/compute" "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-03-01/compute"
"k8s.io/klog" "k8s.io/klog"
"k8s.io/apimachinery/pkg/types" "k8s.io/apimachinery/pkg/types"
......
...@@ -21,7 +21,7 @@ import ( ...@@ -21,7 +21,7 @@ import (
"net/http" "net/http"
"strings" "strings"
"github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-10-01/compute" "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-03-01/compute"
"k8s.io/klog" "k8s.io/klog"
"k8s.io/apimachinery/pkg/types" "k8s.io/apimachinery/pkg/types"
......
...@@ -29,7 +29,7 @@ import ( ...@@ -29,7 +29,7 @@ import (
"k8s.io/apimachinery/pkg/types" "k8s.io/apimachinery/pkg/types"
cloudprovider "k8s.io/cloud-provider" cloudprovider "k8s.io/cloud-provider"
"github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-10-01/compute" "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-03-01/compute"
"github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-09-01/network" "github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-09-01/network"
"github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2018-07-01/storage" "github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2018-07-01/storage"
"github.com/Azure/go-autorest/autorest" "github.com/Azure/go-autorest/autorest"
...@@ -902,7 +902,11 @@ func (f *fakeVMSet) EnsureHostsInPool(service *v1.Service, nodes []*v1.Node, bac ...@@ -902,7 +902,11 @@ func (f *fakeVMSet) EnsureHostsInPool(service *v1.Service, nodes []*v1.Node, bac
return fmt.Errorf("unimplemented") return fmt.Errorf("unimplemented")
} }
func (f *fakeVMSet) EnsureBackendPoolDeleted(service *v1.Service, poolID, vmSetName string, backendAddressPools *[]network.BackendAddressPool) error { func (f *fakeVMSet) EnsureHostInPool(service *v1.Service, nodeName types.NodeName, backendPoolID string, vmSetName string, isInternal bool) error {
return fmt.Errorf("unimplemented")
}
func (f *fakeVMSet) EnsureBackendPoolDeleted(service *v1.Service, backendPoolID, vmSetName string, backendAddressPools *[]network.BackendAddressPool) error {
return fmt.Errorf("unimplemented") return fmt.Errorf("unimplemented")
} }
......
...@@ -24,7 +24,7 @@ import ( ...@@ -24,7 +24,7 @@ import (
"reflect" "reflect"
"testing" "testing"
"github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-10-01/compute" "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-03-01/compute"
"github.com/Azure/go-autorest/autorest/to" "github.com/Azure/go-autorest/autorest/to"
"k8s.io/api/core/v1" "k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/types" "k8s.io/apimachinery/pkg/types"
......
...@@ -829,13 +829,13 @@ func (az *Cloud) reconcileLoadBalancer(clusterName string, service *v1.Service, ...@@ -829,13 +829,13 @@ func (az *Cloud) reconcileLoadBalancer(clusterName string, service *v1.Service,
// Remove backend pools from vmSets. This is required for virtual machine scale sets before removing the LB. // Remove backend pools from vmSets. This is required for virtual machine scale sets before removing the LB.
vmSetName := az.mapLoadBalancerNameToVMSet(lbName, clusterName) vmSetName := az.mapLoadBalancerNameToVMSet(lbName, clusterName)
klog.V(10).Infof("EnsureBackendPoolDeleted(%s, %s): start", lbBackendPoolID, vmSetName) klog.V(10).Infof("EnsureBackendPoolDeleted(%s,%s) for service %s: start", lbBackendPoolID, vmSetName, serviceName)
err := az.vmSet.EnsureBackendPoolDeleted(service, lbBackendPoolID, vmSetName, lb.BackendAddressPools) err := az.vmSet.EnsureBackendPoolDeleted(service, lbBackendPoolID, vmSetName, lb.BackendAddressPools)
if err != nil { if err != nil {
klog.Errorf("EnsureBackendPoolDeleted(%s, %s) failed: %v", lbBackendPoolID, vmSetName, err) klog.Errorf("EnsureBackendPoolDeleted(%s) for service %s failed: %v", lbBackendPoolID, serviceName, err)
return nil, err return nil, err
} }
klog.V(10).Infof("EnsureBackendPoolDeleted(%s, %s): end", lbBackendPoolID, vmSetName) klog.V(10).Infof("EnsureBackendPoolDeleted(%s) for service %s: end", lbBackendPoolID, serviceName)
// Remove the LB. // Remove the LB.
klog.V(10).Infof("reconcileLoadBalancer: az.DeleteLB(%q): start", lbName) klog.V(10).Infof("reconcileLoadBalancer: az.DeleteLB(%q): start", lbName)
......
...@@ -23,7 +23,7 @@ import ( ...@@ -23,7 +23,7 @@ import (
"strconv" "strconv"
"strings" "strings"
"github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-10-01/compute" "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-03-01/compute"
"github.com/Azure/go-autorest/autorest/to" "github.com/Azure/go-autorest/autorest/to"
"k8s.io/klog" "k8s.io/klog"
......
...@@ -26,7 +26,7 @@ import ( ...@@ -26,7 +26,7 @@ import (
"strconv" "strconv"
"strings" "strings"
"github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-10-01/compute" "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-03-01/compute"
"github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-09-01/network" "github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-09-01/network"
"github.com/Azure/go-autorest/autorest/to" "github.com/Azure/go-autorest/autorest/to"
...@@ -622,24 +622,24 @@ func (as *availabilitySet) getPrimaryInterfaceWithVMSet(nodeName, vmSetName stri ...@@ -622,24 +622,24 @@ func (as *availabilitySet) getPrimaryInterfaceWithVMSet(nodeName, vmSetName stri
return nic, nil return nic, nil
} }
// ensureHostInPool ensures the given VM's Primary NIC's Primary IP Configuration is // EnsureHostInPool ensures the given VM's Primary NIC's Primary IP Configuration is
// participating in the specified LoadBalancer Backend Pool. // participating in the specified LoadBalancer Backend Pool.
func (as *availabilitySet) ensureHostInPool(service *v1.Service, nodeName types.NodeName, backendPoolID string, vmSetName string, isInternal bool) error { func (as *availabilitySet) EnsureHostInPool(service *v1.Service, nodeName types.NodeName, backendPoolID string, vmSetName string, isInternal bool) error {
vmName := mapNodeNameToVMName(nodeName) vmName := mapNodeNameToVMName(nodeName)
serviceName := getServiceName(service) serviceName := getServiceName(service)
nic, err := as.getPrimaryInterfaceWithVMSet(vmName, vmSetName) nic, err := as.getPrimaryInterfaceWithVMSet(vmName, vmSetName)
if err != nil { if err != nil {
if err == errNotInVMSet { if err == errNotInVMSet {
klog.V(3).Infof("ensureHostInPool skips node %s because it is not in the vmSet %s", nodeName, vmSetName) klog.V(3).Infof("EnsureHostInPool skips node %s because it is not in the vmSet %s", nodeName, vmSetName)
return nil return nil
} }
klog.Errorf("error: az.ensureHostInPool(%s), az.vmSet.GetPrimaryInterface.Get(%s, %s), err=%v", nodeName, vmName, vmSetName, err) klog.Errorf("error: az.EnsureHostInPool(%s), az.vmSet.GetPrimaryInterface.Get(%s, %s), err=%v", nodeName, vmName, vmSetName, err)
return err return err
} }
if nic.ProvisioningState != nil && *nic.ProvisioningState == nicFailedState { if nic.ProvisioningState != nil && *nic.ProvisioningState == nicFailedState {
klog.V(3).Infof("ensureHostInPool skips node %s because its primary nic %s is in Failed state", nodeName, *nic.Name) klog.Warningf("EnsureHostInPool skips node %s because its primary nic %s is in Failed state", nodeName, *nic.Name)
return nil return nil
} }
...@@ -716,7 +716,7 @@ func (as *availabilitySet) EnsureHostsInPool(service *v1.Service, nodes []*v1.No ...@@ -716,7 +716,7 @@ func (as *availabilitySet) EnsureHostsInPool(service *v1.Service, nodes []*v1.No
} }
f := func() error { f := func() error {
err := as.ensureHostInPool(service, types.NodeName(localNodeName), backendPoolID, vmSetName, isInternal) err := as.EnsureHostInPool(service, types.NodeName(localNodeName), backendPoolID, vmSetName, isInternal)
if err != nil { if err != nil {
return fmt.Errorf("ensure(%s): backendPoolID(%s) - failed to ensure host in pool: %q", getServiceName(service), backendPoolID, err) return fmt.Errorf("ensure(%s): backendPoolID(%s) - failed to ensure host in pool: %q", getServiceName(service), backendPoolID, err)
} }
...@@ -733,8 +733,8 @@ func (as *availabilitySet) EnsureHostsInPool(service *v1.Service, nodes []*v1.No ...@@ -733,8 +733,8 @@ func (as *availabilitySet) EnsureHostsInPool(service *v1.Service, nodes []*v1.No
return nil return nil
} }
// EnsureBackendPoolDeleted ensures the loadBalancer backendAddressPools deleted from the specified vmSet. // EnsureBackendPoolDeleted ensures the loadBalancer backendAddressPools deleted from the specified nodes.
func (as *availabilitySet) EnsureBackendPoolDeleted(service *v1.Service, poolID, vmSetName string, backendAddressPools *[]network.BackendAddressPool) error { func (as *availabilitySet) EnsureBackendPoolDeleted(service *v1.Service, backendPoolID, vmSetName string, backendAddressPools *[]network.BackendAddressPool) error {
// Do nothing for availability set. // Do nothing for availability set.
return nil return nil
} }
......
...@@ -33,7 +33,7 @@ import ( ...@@ -33,7 +33,7 @@ import (
servicehelpers "k8s.io/cloud-provider/service/helpers" servicehelpers "k8s.io/cloud-provider/service/helpers"
"k8s.io/kubernetes/pkg/cloudprovider/providers/azure/auth" "k8s.io/kubernetes/pkg/cloudprovider/providers/azure/auth"
"github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-10-01/compute" "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-03-01/compute"
"github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-09-01/network" "github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-09-01/network"
"github.com/Azure/go-autorest/autorest/to" "github.com/Azure/go-autorest/autorest/to"
"github.com/stretchr/testify/assert" "github.com/stretchr/testify/assert"
......
...@@ -19,7 +19,7 @@ package azure ...@@ -19,7 +19,7 @@ package azure
import ( import (
"net/http" "net/http"
"github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-10-01/compute" "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-03-01/compute"
"github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-09-01/network" "github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-09-01/network"
"k8s.io/api/core/v1" "k8s.io/api/core/v1"
...@@ -57,8 +57,11 @@ type VMSet interface { ...@@ -57,8 +57,11 @@ type VMSet interface {
// EnsureHostsInPool ensures the given Node's primary IP configurations are // EnsureHostsInPool ensures the given Node's primary IP configurations are
// participating in the specified LoadBalancer Backend Pool. // participating in the specified LoadBalancer Backend Pool.
EnsureHostsInPool(service *v1.Service, nodes []*v1.Node, backendPoolID string, vmSetName string, isInternal bool) error EnsureHostsInPool(service *v1.Service, nodes []*v1.Node, backendPoolID string, vmSetName string, isInternal bool) error
// EnsureBackendPoolDeleted ensures the loadBalancer backendAddressPools deleted from the specified vmSet. // EnsureHostInPool ensures the given VM's Primary NIC's Primary IP Configuration is
EnsureBackendPoolDeleted(service *v1.Service, poolID, vmSetName string, backendAddressPools *[]network.BackendAddressPool) error // participating in the specified LoadBalancer Backend Pool.
EnsureHostInPool(service *v1.Service, nodeName types.NodeName, backendPoolID string, vmSetName string, isInternal bool) error
// EnsureBackendPoolDeleted ensures the loadBalancer backendAddressPools deleted from the specified nodes.
EnsureBackendPoolDeleted(service *v1.Service, backendPoolID, vmSetName string, backendAddressPools *[]network.BackendAddressPool) error
// AttachDisk attaches a vhd to vm. The vhd must exist, can be identified by diskName, diskURI, and lun. // AttachDisk attaches a vhd to vm. The vhd must exist, can be identified by diskName, diskURI, and lun.
AttachDisk(isManagedDisk bool, diskName, diskURI string, nodeName types.NodeName, lun int32, cachingMode compute.CachingTypes) error AttachDisk(isManagedDisk bool, diskName, diskURI string, nodeName types.NodeName, lun int32, cachingMode compute.CachingTypes) error
......
...@@ -20,7 +20,7 @@ import ( ...@@ -20,7 +20,7 @@ import (
"fmt" "fmt"
"testing" "testing"
"github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-10-01/compute" "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-03-01/compute"
"github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-09-01/network" "github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-09-01/network"
"github.com/Azure/go-autorest/autorest/to" "github.com/Azure/go-autorest/autorest/to"
"github.com/stretchr/testify/assert" "github.com/stretchr/testify/assert"
...@@ -80,6 +80,21 @@ func setTestVirtualMachineCloud(ss *Cloud, scaleSetName, zone string, faultDomai ...@@ -80,6 +80,21 @@ func setTestVirtualMachineCloud(ss *Cloud, scaleSetName, zone string, faultDomai
ID: &interfaceID, ID: &interfaceID,
}, },
} }
ipConfigurations := []compute.VirtualMachineScaleSetIPConfiguration{
{
Name: to.StringPtr("ipconfig1"),
VirtualMachineScaleSetIPConfigurationProperties: &compute.VirtualMachineScaleSetIPConfigurationProperties{},
},
}
networkConfigurations := []compute.VirtualMachineScaleSetNetworkConfiguration{
{
Name: to.StringPtr("ipconfig1"),
ID: to.StringPtr("fakeNetworkConfiguration"),
VirtualMachineScaleSetNetworkConfigurationProperties: &compute.VirtualMachineScaleSetNetworkConfigurationProperties{
IPConfigurations: &ipConfigurations,
},
},
}
vmssVM := compute.VirtualMachineScaleSetVM{ vmssVM := compute.VirtualMachineScaleSetVM{
VirtualMachineScaleSetVMProperties: &compute.VirtualMachineScaleSetVMProperties{ VirtualMachineScaleSetVMProperties: &compute.VirtualMachineScaleSetVMProperties{
OsProfile: &compute.OSProfile{ OsProfile: &compute.OSProfile{
...@@ -88,6 +103,9 @@ func setTestVirtualMachineCloud(ss *Cloud, scaleSetName, zone string, faultDomai ...@@ -88,6 +103,9 @@ func setTestVirtualMachineCloud(ss *Cloud, scaleSetName, zone string, faultDomai
NetworkProfile: &compute.NetworkProfile{ NetworkProfile: &compute.NetworkProfile{
NetworkInterfaces: &networkInterfaces, NetworkInterfaces: &networkInterfaces,
}, },
NetworkProfileConfiguration: &compute.VirtualMachineScaleSetVMNetworkProfileConfiguration{
NetworkInterfaceConfigurations: &networkConfigurations,
},
InstanceView: &compute.VirtualMachineScaleSetVMInstanceView{ InstanceView: &compute.VirtualMachineScaleSetVMInstanceView{
PlatformFaultDomain: &faultDomain, PlatformFaultDomain: &faultDomain,
}, },
...@@ -307,3 +325,52 @@ func TestGetIPByNodeName(t *testing.T) { ...@@ -307,3 +325,52 @@ func TestGetIPByNodeName(t *testing.T) {
assert.Equal(t, test.expected, []string{privateIP, publicIP}, test.description) assert.Equal(t, test.expected, []string{privateIP, publicIP}, test.description)
} }
} }
func TestGetNodeNameByIPConfigurationID(t *testing.T) {
ipConfigurationIDTemplate := "/subscriptions/script/resourceGroups/rg/providers/Microsoft.Compute/virtualMachineScaleSets/%s/virtualMachines/%s/networkInterfaces/%s/ipConfigurations/ipconfig1"
testCases := []struct {
description string
scaleSet string
vmList []string
ipConfigurationID string
expected string
expectError bool
}{
{
description: "getNodeNameByIPConfigurationID should get node's Name when the node is existing",
scaleSet: "scaleset1",
ipConfigurationID: fmt.Sprintf(ipConfigurationIDTemplate, "scaleset1", "0", "scaleset1"),
vmList: []string{"vmssee6c2000000", "vmssee6c2000001"},
expected: "vmssee6c2000000",
},
{
description: "getNodeNameByIPConfigurationID should return error for non-exist nodes",
scaleSet: "scaleset2",
ipConfigurationID: fmt.Sprintf(ipConfigurationIDTemplate, "scaleset2", "3", "scaleset1"),
vmList: []string{"vmssee6c2000002", "vmssee6c2000003"},
expectError: true,
},
{
description: "getNodeNameByIPConfigurationID should return error for wrong ipConfigurationID",
scaleSet: "scaleset3",
ipConfigurationID: "invalid-configuration-id",
vmList: []string{"vmssee6c2000004", "vmssee6c2000005"},
expectError: true,
},
}
for _, test := range testCases {
ss, err := newTestScaleSet(test.scaleSet, "", 0, test.vmList)
assert.NoError(t, err, test.description)
nodeName, err := ss.getNodeNameByIPConfigurationID(test.ipConfigurationID)
if test.expectError {
assert.Error(t, err, test.description)
continue
}
assert.NoError(t, err, test.description)
assert.Equal(t, test.expected, nodeName, test.description)
}
}
...@@ -23,7 +23,7 @@ import ( ...@@ -23,7 +23,7 @@ import (
"strings" "strings"
"time" "time"
"github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-10-01/compute" "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-03-01/compute"
"github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-09-01/network" "github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-09-01/network"
"github.com/Azure/go-autorest/autorest" "github.com/Azure/go-autorest/autorest"
"k8s.io/apimachinery/pkg/types" "k8s.io/apimachinery/pkg/types"
......
...@@ -37,7 +37,7 @@ go_library( ...@@ -37,7 +37,7 @@ go_library(
"//staging/src/k8s.io/apiserver/pkg/util/feature:go_default_library", "//staging/src/k8s.io/apiserver/pkg/util/feature:go_default_library",
"//staging/src/k8s.io/cloud-provider:go_default_library", "//staging/src/k8s.io/cloud-provider:go_default_library",
"//staging/src/k8s.io/cloud-provider/volume/helpers:go_default_library", "//staging/src/k8s.io/cloud-provider/volume/helpers:go_default_library",
"//vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-10-01/compute:go_default_library", "//vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-03-01/compute:go_default_library",
"//vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2018-07-01/storage:go_default_library", "//vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2018-07-01/storage:go_default_library",
"//vendor/k8s.io/klog:go_default_library", "//vendor/k8s.io/klog:go_default_library",
"//vendor/k8s.io/utils/strings:go_default_library", "//vendor/k8s.io/utils/strings:go_default_library",
...@@ -74,7 +74,7 @@ go_test( ...@@ -74,7 +74,7 @@ go_test(
"//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library",
"//staging/src/k8s.io/apimachinery/pkg/types:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/types:go_default_library",
"//staging/src/k8s.io/client-go/util/testing:go_default_library", "//staging/src/k8s.io/client-go/util/testing:go_default_library",
"//vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-10-01/compute:go_default_library", "//vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-03-01/compute:go_default_library",
"//vendor/github.com/Azure/go-autorest/autorest/to:go_default_library", "//vendor/github.com/Azure/go-autorest/autorest/to:go_default_library",
"//vendor/github.com/stretchr/testify/assert:go_default_library", "//vendor/github.com/stretchr/testify/assert:go_default_library",
], ],
......
...@@ -24,7 +24,7 @@ import ( ...@@ -24,7 +24,7 @@ import (
"strconv" "strconv"
"time" "time"
"github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-10-01/compute" "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-03-01/compute"
"k8s.io/klog" "k8s.io/klog"
"k8s.io/api/core/v1" "k8s.io/api/core/v1"
......
...@@ -25,7 +25,7 @@ import ( ...@@ -25,7 +25,7 @@ import (
"strconv" "strconv"
libstrings "strings" libstrings "strings"
"github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-10-01/compute" "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-03-01/compute"
"k8s.io/api/core/v1" "k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/types" "k8s.io/apimachinery/pkg/types"
......
...@@ -24,7 +24,7 @@ import ( ...@@ -24,7 +24,7 @@ import (
"testing" "testing"
"time" "time"
"github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-10-01/compute" "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-03-01/compute"
"github.com/stretchr/testify/assert" "github.com/stretchr/testify/assert"
"k8s.io/kubernetes/pkg/util/mount" "k8s.io/kubernetes/pkg/util/mount"
......
...@@ -22,7 +22,7 @@ import ( ...@@ -22,7 +22,7 @@ import (
"strings" "strings"
"time" "time"
"github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-10-01/compute" "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-03-01/compute"
"github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2018-07-01/storage" "github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2018-07-01/storage"
"k8s.io/klog" "k8s.io/klog"
......
...@@ -20,7 +20,7 @@ import ( ...@@ -20,7 +20,7 @@ import (
"os" "os"
"testing" "testing"
"github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-10-01/compute" "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-03-01/compute"
"github.com/Azure/go-autorest/autorest/to" "github.com/Azure/go-autorest/autorest/to"
"github.com/stretchr/testify/assert" "github.com/stretchr/testify/assert"
......
...@@ -12,7 +12,7 @@ filegroup( ...@@ -12,7 +12,7 @@ filegroup(
"//vendor/bitbucket.org/bertimus9/systemstat:all-srcs", "//vendor/bitbucket.org/bertimus9/systemstat:all-srcs",
"//vendor/cloud.google.com/go/compute/metadata:all-srcs", "//vendor/cloud.google.com/go/compute/metadata:all-srcs",
"//vendor/cloud.google.com/go/internal:all-srcs", "//vendor/cloud.google.com/go/internal:all-srcs",
"//vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-10-01/compute:all-srcs", "//vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-03-01/compute:all-srcs",
"//vendor/github.com/Azure/azure-sdk-for-go/services/containerregistry/mgmt/2017-10-01/containerregistry:all-srcs", "//vendor/github.com/Azure/azure-sdk-for-go/services/containerregistry/mgmt/2017-10-01/containerregistry:all-srcs",
"//vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-09-01/network:all-srcs", "//vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-09-01/network:all-srcs",
"//vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2018-07-01/storage:all-srcs", "//vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2018-07-01/storage:all-srcs",
......
...@@ -29,8 +29,8 @@ go_library( ...@@ -29,8 +29,8 @@ go_library(
"virtualmachinescalesetvms.go", "virtualmachinescalesetvms.go",
"virtualmachinesizes.go", "virtualmachinesizes.go",
], ],
importmap = "k8s.io/kubernetes/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-10-01/compute", importmap = "k8s.io/kubernetes/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-03-01/compute",
importpath = "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-10-01/compute", importpath = "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-03-01/compute",
visibility = ["//visibility:public"], visibility = ["//visibility:public"],
deps = [ deps = [
"//vendor/github.com/Azure/azure-sdk-for-go/version:go_default_library", "//vendor/github.com/Azure/azure-sdk-for-go/version:go_default_library",
......
...@@ -74,7 +74,7 @@ func (client AvailabilitySetsClient) CreateOrUpdatePreparer(ctx context.Context, ...@@ -74,7 +74,7 @@ func (client AvailabilitySetsClient) CreateOrUpdatePreparer(ctx context.Context,
"subscriptionId": autorest.Encode("path", client.SubscriptionID), "subscriptionId": autorest.Encode("path", client.SubscriptionID),
} }
const APIVersion = "2018-10-01" const APIVersion = "2019-03-01"
queryParameters := map[string]interface{}{ queryParameters := map[string]interface{}{
"api-version": APIVersion, "api-version": APIVersion,
} }
...@@ -143,7 +143,7 @@ func (client AvailabilitySetsClient) DeletePreparer(ctx context.Context, resourc ...@@ -143,7 +143,7 @@ func (client AvailabilitySetsClient) DeletePreparer(ctx context.Context, resourc
"subscriptionId": autorest.Encode("path", client.SubscriptionID), "subscriptionId": autorest.Encode("path", client.SubscriptionID),
} }
const APIVersion = "2018-10-01" const APIVersion = "2019-03-01"
queryParameters := map[string]interface{}{ queryParameters := map[string]interface{}{
"api-version": APIVersion, "api-version": APIVersion,
} }
...@@ -209,7 +209,7 @@ func (client AvailabilitySetsClient) GetPreparer(ctx context.Context, resourceGr ...@@ -209,7 +209,7 @@ func (client AvailabilitySetsClient) GetPreparer(ctx context.Context, resourceGr
"subscriptionId": autorest.Encode("path", client.SubscriptionID), "subscriptionId": autorest.Encode("path", client.SubscriptionID),
} }
const APIVersion = "2018-10-01" const APIVersion = "2019-03-01"
queryParameters := map[string]interface{}{ queryParameters := map[string]interface{}{
"api-version": APIVersion, "api-version": APIVersion,
} }
...@@ -275,7 +275,7 @@ func (client AvailabilitySetsClient) ListPreparer(ctx context.Context, resourceG ...@@ -275,7 +275,7 @@ func (client AvailabilitySetsClient) ListPreparer(ctx context.Context, resourceG
"subscriptionId": autorest.Encode("path", client.SubscriptionID), "subscriptionId": autorest.Encode("path", client.SubscriptionID),
} }
const APIVersion = "2018-10-01" const APIVersion = "2019-03-01"
queryParameters := map[string]interface{}{ queryParameters := map[string]interface{}{
"api-version": APIVersion, "api-version": APIVersion,
} }
...@@ -370,7 +370,7 @@ func (client AvailabilitySetsClient) ListAvailableSizesPreparer(ctx context.Cont ...@@ -370,7 +370,7 @@ func (client AvailabilitySetsClient) ListAvailableSizesPreparer(ctx context.Cont
"subscriptionId": autorest.Encode("path", client.SubscriptionID), "subscriptionId": autorest.Encode("path", client.SubscriptionID),
} }
const APIVersion = "2018-10-01" const APIVersion = "2019-03-01"
queryParameters := map[string]interface{}{ queryParameters := map[string]interface{}{
"api-version": APIVersion, "api-version": APIVersion,
} }
...@@ -433,7 +433,7 @@ func (client AvailabilitySetsClient) ListBySubscriptionPreparer(ctx context.Cont ...@@ -433,7 +433,7 @@ func (client AvailabilitySetsClient) ListBySubscriptionPreparer(ctx context.Cont
"subscriptionId": autorest.Encode("path", client.SubscriptionID), "subscriptionId": autorest.Encode("path", client.SubscriptionID),
} }
const APIVersion = "2018-10-01" const APIVersion = "2019-03-01"
queryParameters := map[string]interface{}{ queryParameters := map[string]interface{}{
"api-version": APIVersion, "api-version": APIVersion,
} }
...@@ -528,7 +528,7 @@ func (client AvailabilitySetsClient) UpdatePreparer(ctx context.Context, resourc ...@@ -528,7 +528,7 @@ func (client AvailabilitySetsClient) UpdatePreparer(ctx context.Context, resourc
"subscriptionId": autorest.Encode("path", client.SubscriptionID), "subscriptionId": autorest.Encode("path", client.SubscriptionID),
} }
const APIVersion = "2018-10-01" const APIVersion = "2019-03-01"
queryParameters := map[string]interface{}{ queryParameters := map[string]interface{}{
"api-version": APIVersion, "api-version": APIVersion,
} }
......
...@@ -125,10 +125,6 @@ func (client ContainerServicesClient) CreateOrUpdateSender(req *http.Request) (f ...@@ -125,10 +125,6 @@ func (client ContainerServicesClient) CreateOrUpdateSender(req *http.Request) (f
if err != nil { if err != nil {
return return
} }
err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted))
if err != nil {
return
}
future.Future, err = azure.NewFutureFromResponse(resp) future.Future, err = azure.NewFutureFromResponse(resp)
return return
} }
...@@ -199,10 +195,6 @@ func (client ContainerServicesClient) DeleteSender(req *http.Request) (future Co ...@@ -199,10 +195,6 @@ func (client ContainerServicesClient) DeleteSender(req *http.Request) (future Co
if err != nil { if err != nil {
return return
} }
err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
if err != nil {
return
}
future.Future, err = azure.NewFutureFromResponse(resp) future.Future, err = azure.NewFutureFromResponse(resp)
return return
} }
......
...@@ -55,16 +55,8 @@ func (client DisksClient) CreateOrUpdate(ctx context.Context, resourceGroupName ...@@ -55,16 +55,8 @@ func (client DisksClient) CreateOrUpdate(ctx context.Context, resourceGroupName
Chain: []validation.Constraint{{Target: "disk.DiskProperties.CreationData.ImageReference", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "disk.DiskProperties.CreationData.ImageReference", Name: validation.Null, Rule: false,
Chain: []validation.Constraint{{Target: "disk.DiskProperties.CreationData.ImageReference.ID", Name: validation.Null, Rule: true, Chain: nil}}}, Chain: []validation.Constraint{{Target: "disk.DiskProperties.CreationData.ImageReference.ID", Name: validation.Null, Rule: true, Chain: nil}}},
}}, }},
{Target: "disk.DiskProperties.EncryptionSettings", Name: validation.Null, Rule: false, {Target: "disk.DiskProperties.EncryptionSettingsCollection", Name: validation.Null, Rule: false,
Chain: []validation.Constraint{{Target: "disk.DiskProperties.EncryptionSettings.DiskEncryptionKey", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "disk.DiskProperties.EncryptionSettingsCollection.Enabled", Name: validation.Null, Rule: true, Chain: nil}}},
Chain: []validation.Constraint{{Target: "disk.DiskProperties.EncryptionSettings.DiskEncryptionKey.SourceVault", Name: validation.Null, Rule: true, Chain: nil},
{Target: "disk.DiskProperties.EncryptionSettings.DiskEncryptionKey.SecretURL", Name: validation.Null, Rule: true, Chain: nil},
}},
{Target: "disk.DiskProperties.EncryptionSettings.KeyEncryptionKey", Name: validation.Null, Rule: false,
Chain: []validation.Constraint{{Target: "disk.DiskProperties.EncryptionSettings.KeyEncryptionKey.SourceVault", Name: validation.Null, Rule: true, Chain: nil},
{Target: "disk.DiskProperties.EncryptionSettings.KeyEncryptionKey.KeyURL", Name: validation.Null, Rule: true, Chain: nil},
}},
}},
}}}}}); err != nil { }}}}}); err != nil {
return result, validation.NewError("compute.DisksClient", "CreateOrUpdate", err.Error()) return result, validation.NewError("compute.DisksClient", "CreateOrUpdate", err.Error())
} }
...@@ -92,7 +84,7 @@ func (client DisksClient) CreateOrUpdatePreparer(ctx context.Context, resourceGr ...@@ -92,7 +84,7 @@ func (client DisksClient) CreateOrUpdatePreparer(ctx context.Context, resourceGr
"subscriptionId": autorest.Encode("path", client.SubscriptionID), "subscriptionId": autorest.Encode("path", client.SubscriptionID),
} }
const APIVersion = "2018-06-01" const APIVersion = "2018-09-30"
queryParameters := map[string]interface{}{ queryParameters := map[string]interface{}{
"api-version": APIVersion, "api-version": APIVersion,
} }
...@@ -116,10 +108,6 @@ func (client DisksClient) CreateOrUpdateSender(req *http.Request) (future DisksC ...@@ -116,10 +108,6 @@ func (client DisksClient) CreateOrUpdateSender(req *http.Request) (future DisksC
if err != nil { if err != nil {
return return
} }
err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
if err != nil {
return
}
future.Future, err = azure.NewFutureFromResponse(resp) future.Future, err = azure.NewFutureFromResponse(resp)
return return
} }
...@@ -167,7 +155,7 @@ func (client DisksClient) DeletePreparer(ctx context.Context, resourceGroupName ...@@ -167,7 +155,7 @@ func (client DisksClient) DeletePreparer(ctx context.Context, resourceGroupName
"subscriptionId": autorest.Encode("path", client.SubscriptionID), "subscriptionId": autorest.Encode("path", client.SubscriptionID),
} }
const APIVersion = "2018-06-01" const APIVersion = "2018-09-30"
queryParameters := map[string]interface{}{ queryParameters := map[string]interface{}{
"api-version": APIVersion, "api-version": APIVersion,
} }
...@@ -189,10 +177,6 @@ func (client DisksClient) DeleteSender(req *http.Request) (future DisksDeleteFut ...@@ -189,10 +177,6 @@ func (client DisksClient) DeleteSender(req *http.Request) (future DisksDeleteFut
if err != nil { if err != nil {
return return
} }
err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
if err != nil {
return
}
future.Future, err = azure.NewFutureFromResponse(resp) future.Future, err = azure.NewFutureFromResponse(resp)
return return
} }
...@@ -245,7 +229,7 @@ func (client DisksClient) GetPreparer(ctx context.Context, resourceGroupName str ...@@ -245,7 +229,7 @@ func (client DisksClient) GetPreparer(ctx context.Context, resourceGroupName str
"subscriptionId": autorest.Encode("path", client.SubscriptionID), "subscriptionId": autorest.Encode("path", client.SubscriptionID),
} }
const APIVersion = "2018-06-01" const APIVersion = "2018-09-30"
queryParameters := map[string]interface{}{ queryParameters := map[string]interface{}{
"api-version": APIVersion, "api-version": APIVersion,
} }
...@@ -315,7 +299,7 @@ func (client DisksClient) GrantAccessPreparer(ctx context.Context, resourceGroup ...@@ -315,7 +299,7 @@ func (client DisksClient) GrantAccessPreparer(ctx context.Context, resourceGroup
"subscriptionId": autorest.Encode("path", client.SubscriptionID), "subscriptionId": autorest.Encode("path", client.SubscriptionID),
} }
const APIVersion = "2018-06-01" const APIVersion = "2018-09-30"
queryParameters := map[string]interface{}{ queryParameters := map[string]interface{}{
"api-version": APIVersion, "api-version": APIVersion,
} }
...@@ -339,10 +323,6 @@ func (client DisksClient) GrantAccessSender(req *http.Request) (future DisksGran ...@@ -339,10 +323,6 @@ func (client DisksClient) GrantAccessSender(req *http.Request) (future DisksGran
if err != nil { if err != nil {
return return
} }
err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
if err != nil {
return
}
future.Future, err = azure.NewFutureFromResponse(resp) future.Future, err = azure.NewFutureFromResponse(resp)
return return
} }
...@@ -390,7 +370,7 @@ func (client DisksClient) ListPreparer(ctx context.Context) (*http.Request, erro ...@@ -390,7 +370,7 @@ func (client DisksClient) ListPreparer(ctx context.Context) (*http.Request, erro
"subscriptionId": autorest.Encode("path", client.SubscriptionID), "subscriptionId": autorest.Encode("path", client.SubscriptionID),
} }
const APIVersion = "2018-06-01" const APIVersion = "2018-09-30"
queryParameters := map[string]interface{}{ queryParameters := map[string]interface{}{
"api-version": APIVersion, "api-version": APIVersion,
} }
...@@ -483,7 +463,7 @@ func (client DisksClient) ListByResourceGroupPreparer(ctx context.Context, resou ...@@ -483,7 +463,7 @@ func (client DisksClient) ListByResourceGroupPreparer(ctx context.Context, resou
"subscriptionId": autorest.Encode("path", client.SubscriptionID), "subscriptionId": autorest.Encode("path", client.SubscriptionID),
} }
const APIVersion = "2018-06-01" const APIVersion = "2018-09-30"
queryParameters := map[string]interface{}{ queryParameters := map[string]interface{}{
"api-version": APIVersion, "api-version": APIVersion,
} }
...@@ -573,7 +553,7 @@ func (client DisksClient) RevokeAccessPreparer(ctx context.Context, resourceGrou ...@@ -573,7 +553,7 @@ func (client DisksClient) RevokeAccessPreparer(ctx context.Context, resourceGrou
"subscriptionId": autorest.Encode("path", client.SubscriptionID), "subscriptionId": autorest.Encode("path", client.SubscriptionID),
} }
const APIVersion = "2018-06-01" const APIVersion = "2018-09-30"
queryParameters := map[string]interface{}{ queryParameters := map[string]interface{}{
"api-version": APIVersion, "api-version": APIVersion,
} }
...@@ -595,10 +575,6 @@ func (client DisksClient) RevokeAccessSender(req *http.Request) (future DisksRev ...@@ -595,10 +575,6 @@ func (client DisksClient) RevokeAccessSender(req *http.Request) (future DisksRev
if err != nil { if err != nil {
return return
} }
err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
if err != nil {
return
}
future.Future, err = azure.NewFutureFromResponse(resp) future.Future, err = azure.NewFutureFromResponse(resp)
return return
} }
...@@ -646,7 +622,7 @@ func (client DisksClient) UpdatePreparer(ctx context.Context, resourceGroupName ...@@ -646,7 +622,7 @@ func (client DisksClient) UpdatePreparer(ctx context.Context, resourceGroupName
"subscriptionId": autorest.Encode("path", client.SubscriptionID), "subscriptionId": autorest.Encode("path", client.SubscriptionID),
} }
const APIVersion = "2018-06-01" const APIVersion = "2018-09-30"
queryParameters := map[string]interface{}{ queryParameters := map[string]interface{}{
"api-version": APIVersion, "api-version": APIVersion,
} }
...@@ -670,10 +646,6 @@ func (client DisksClient) UpdateSender(req *http.Request) (future DisksUpdateFut ...@@ -670,10 +646,6 @@ func (client DisksClient) UpdateSender(req *http.Request) (future DisksUpdateFut
if err != nil { if err != nil {
return return
} }
err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
if err != nil {
return
}
future.Future, err = azure.NewFutureFromResponse(resp) future.Future, err = azure.NewFutureFromResponse(resp)
return return
} }
......
...@@ -69,7 +69,7 @@ func (client GalleriesClient) CreateOrUpdatePreparer(ctx context.Context, resour ...@@ -69,7 +69,7 @@ func (client GalleriesClient) CreateOrUpdatePreparer(ctx context.Context, resour
"subscriptionId": autorest.Encode("path", client.SubscriptionID), "subscriptionId": autorest.Encode("path", client.SubscriptionID),
} }
const APIVersion = "2018-06-01" const APIVersion = "2019-03-01"
queryParameters := map[string]interface{}{ queryParameters := map[string]interface{}{
"api-version": APIVersion, "api-version": APIVersion,
} }
...@@ -93,10 +93,6 @@ func (client GalleriesClient) CreateOrUpdateSender(req *http.Request) (future Ga ...@@ -93,10 +93,6 @@ func (client GalleriesClient) CreateOrUpdateSender(req *http.Request) (future Ga
if err != nil { if err != nil {
return return
} }
err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted))
if err != nil {
return
}
future.Future, err = azure.NewFutureFromResponse(resp) future.Future, err = azure.NewFutureFromResponse(resp)
return return
} }
...@@ -142,7 +138,7 @@ func (client GalleriesClient) DeletePreparer(ctx context.Context, resourceGroupN ...@@ -142,7 +138,7 @@ func (client GalleriesClient) DeletePreparer(ctx context.Context, resourceGroupN
"subscriptionId": autorest.Encode("path", client.SubscriptionID), "subscriptionId": autorest.Encode("path", client.SubscriptionID),
} }
const APIVersion = "2018-06-01" const APIVersion = "2019-03-01"
queryParameters := map[string]interface{}{ queryParameters := map[string]interface{}{
"api-version": APIVersion, "api-version": APIVersion,
} }
...@@ -164,10 +160,6 @@ func (client GalleriesClient) DeleteSender(req *http.Request) (future GalleriesD ...@@ -164,10 +160,6 @@ func (client GalleriesClient) DeleteSender(req *http.Request) (future GalleriesD
if err != nil { if err != nil {
return return
} }
err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
if err != nil {
return
}
future.Future, err = azure.NewFutureFromResponse(resp) future.Future, err = azure.NewFutureFromResponse(resp)
return return
} }
...@@ -218,7 +210,7 @@ func (client GalleriesClient) GetPreparer(ctx context.Context, resourceGroupName ...@@ -218,7 +210,7 @@ func (client GalleriesClient) GetPreparer(ctx context.Context, resourceGroupName
"subscriptionId": autorest.Encode("path", client.SubscriptionID), "subscriptionId": autorest.Encode("path", client.SubscriptionID),
} }
const APIVersion = "2018-06-01" const APIVersion = "2019-03-01"
queryParameters := map[string]interface{}{ queryParameters := map[string]interface{}{
"api-version": APIVersion, "api-version": APIVersion,
} }
...@@ -281,7 +273,7 @@ func (client GalleriesClient) ListPreparer(ctx context.Context) (*http.Request, ...@@ -281,7 +273,7 @@ func (client GalleriesClient) ListPreparer(ctx context.Context) (*http.Request,
"subscriptionId": autorest.Encode("path", client.SubscriptionID), "subscriptionId": autorest.Encode("path", client.SubscriptionID),
} }
const APIVersion = "2018-06-01" const APIVersion = "2019-03-01"
queryParameters := map[string]interface{}{ queryParameters := map[string]interface{}{
"api-version": APIVersion, "api-version": APIVersion,
} }
...@@ -374,7 +366,7 @@ func (client GalleriesClient) ListByResourceGroupPreparer(ctx context.Context, r ...@@ -374,7 +366,7 @@ func (client GalleriesClient) ListByResourceGroupPreparer(ctx context.Context, r
"subscriptionId": autorest.Encode("path", client.SubscriptionID), "subscriptionId": autorest.Encode("path", client.SubscriptionID),
} }
const APIVersion = "2018-06-01" const APIVersion = "2019-03-01"
queryParameters := map[string]interface{}{ queryParameters := map[string]interface{}{
"api-version": APIVersion, "api-version": APIVersion,
} }
......
...@@ -85,7 +85,7 @@ func (client GalleryImagesClient) CreateOrUpdatePreparer(ctx context.Context, re ...@@ -85,7 +85,7 @@ func (client GalleryImagesClient) CreateOrUpdatePreparer(ctx context.Context, re
"subscriptionId": autorest.Encode("path", client.SubscriptionID), "subscriptionId": autorest.Encode("path", client.SubscriptionID),
} }
const APIVersion = "2018-06-01" const APIVersion = "2019-03-01"
queryParameters := map[string]interface{}{ queryParameters := map[string]interface{}{
"api-version": APIVersion, "api-version": APIVersion,
} }
...@@ -109,10 +109,6 @@ func (client GalleryImagesClient) CreateOrUpdateSender(req *http.Request) (futur ...@@ -109,10 +109,6 @@ func (client GalleryImagesClient) CreateOrUpdateSender(req *http.Request) (futur
if err != nil { if err != nil {
return return
} }
err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted))
if err != nil {
return
}
future.Future, err = azure.NewFutureFromResponse(resp) future.Future, err = azure.NewFutureFromResponse(resp)
return return
} }
...@@ -160,7 +156,7 @@ func (client GalleryImagesClient) DeletePreparer(ctx context.Context, resourceGr ...@@ -160,7 +156,7 @@ func (client GalleryImagesClient) DeletePreparer(ctx context.Context, resourceGr
"subscriptionId": autorest.Encode("path", client.SubscriptionID), "subscriptionId": autorest.Encode("path", client.SubscriptionID),
} }
const APIVersion = "2018-06-01" const APIVersion = "2019-03-01"
queryParameters := map[string]interface{}{ queryParameters := map[string]interface{}{
"api-version": APIVersion, "api-version": APIVersion,
} }
...@@ -182,10 +178,6 @@ func (client GalleryImagesClient) DeleteSender(req *http.Request) (future Galler ...@@ -182,10 +178,6 @@ func (client GalleryImagesClient) DeleteSender(req *http.Request) (future Galler
if err != nil { if err != nil {
return return
} }
err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
if err != nil {
return
}
future.Future, err = azure.NewFutureFromResponse(resp) future.Future, err = azure.NewFutureFromResponse(resp)
return return
} }
...@@ -238,7 +230,7 @@ func (client GalleryImagesClient) GetPreparer(ctx context.Context, resourceGroup ...@@ -238,7 +230,7 @@ func (client GalleryImagesClient) GetPreparer(ctx context.Context, resourceGroup
"subscriptionId": autorest.Encode("path", client.SubscriptionID), "subscriptionId": autorest.Encode("path", client.SubscriptionID),
} }
const APIVersion = "2018-06-01" const APIVersion = "2019-03-01"
queryParameters := map[string]interface{}{ queryParameters := map[string]interface{}{
"api-version": APIVersion, "api-version": APIVersion,
} }
...@@ -306,7 +298,7 @@ func (client GalleryImagesClient) ListByGalleryPreparer(ctx context.Context, res ...@@ -306,7 +298,7 @@ func (client GalleryImagesClient) ListByGalleryPreparer(ctx context.Context, res
"subscriptionId": autorest.Encode("path", client.SubscriptionID), "subscriptionId": autorest.Encode("path", client.SubscriptionID),
} }
const APIVersion = "2018-06-01" const APIVersion = "2019-03-01"
queryParameters := map[string]interface{}{ queryParameters := map[string]interface{}{
"api-version": APIVersion, "api-version": APIVersion,
} }
......
...@@ -82,7 +82,7 @@ func (client GalleryImageVersionsClient) CreateOrUpdatePreparer(ctx context.Cont ...@@ -82,7 +82,7 @@ func (client GalleryImageVersionsClient) CreateOrUpdatePreparer(ctx context.Cont
"subscriptionId": autorest.Encode("path", client.SubscriptionID), "subscriptionId": autorest.Encode("path", client.SubscriptionID),
} }
const APIVersion = "2018-06-01" const APIVersion = "2019-03-01"
queryParameters := map[string]interface{}{ queryParameters := map[string]interface{}{
"api-version": APIVersion, "api-version": APIVersion,
} }
...@@ -106,10 +106,6 @@ func (client GalleryImageVersionsClient) CreateOrUpdateSender(req *http.Request) ...@@ -106,10 +106,6 @@ func (client GalleryImageVersionsClient) CreateOrUpdateSender(req *http.Request)
if err != nil { if err != nil {
return return
} }
err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted))
if err != nil {
return
}
future.Future, err = azure.NewFutureFromResponse(resp) future.Future, err = azure.NewFutureFromResponse(resp)
return return
} }
...@@ -159,7 +155,7 @@ func (client GalleryImageVersionsClient) DeletePreparer(ctx context.Context, res ...@@ -159,7 +155,7 @@ func (client GalleryImageVersionsClient) DeletePreparer(ctx context.Context, res
"subscriptionId": autorest.Encode("path", client.SubscriptionID), "subscriptionId": autorest.Encode("path", client.SubscriptionID),
} }
const APIVersion = "2018-06-01" const APIVersion = "2019-03-01"
queryParameters := map[string]interface{}{ queryParameters := map[string]interface{}{
"api-version": APIVersion, "api-version": APIVersion,
} }
...@@ -181,10 +177,6 @@ func (client GalleryImageVersionsClient) DeleteSender(req *http.Request) (future ...@@ -181,10 +177,6 @@ func (client GalleryImageVersionsClient) DeleteSender(req *http.Request) (future
if err != nil { if err != nil {
return return
} }
err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
if err != nil {
return
}
future.Future, err = azure.NewFutureFromResponse(resp) future.Future, err = azure.NewFutureFromResponse(resp)
return return
} }
...@@ -240,7 +232,7 @@ func (client GalleryImageVersionsClient) GetPreparer(ctx context.Context, resour ...@@ -240,7 +232,7 @@ func (client GalleryImageVersionsClient) GetPreparer(ctx context.Context, resour
"subscriptionId": autorest.Encode("path", client.SubscriptionID), "subscriptionId": autorest.Encode("path", client.SubscriptionID),
} }
const APIVersion = "2018-06-01" const APIVersion = "2019-03-01"
queryParameters := map[string]interface{}{ queryParameters := map[string]interface{}{
"api-version": APIVersion, "api-version": APIVersion,
} }
...@@ -314,7 +306,7 @@ func (client GalleryImageVersionsClient) ListByGalleryImagePreparer(ctx context. ...@@ -314,7 +306,7 @@ func (client GalleryImageVersionsClient) ListByGalleryImagePreparer(ctx context.
"subscriptionId": autorest.Encode("path", client.SubscriptionID), "subscriptionId": autorest.Encode("path", client.SubscriptionID),
} }
const APIVersion = "2018-06-01" const APIVersion = "2019-03-01"
queryParameters := map[string]interface{}{ queryParameters := map[string]interface{}{
"api-version": APIVersion, "api-version": APIVersion,
} }
......
...@@ -68,7 +68,7 @@ func (client ImagesClient) CreateOrUpdatePreparer(ctx context.Context, resourceG ...@@ -68,7 +68,7 @@ func (client ImagesClient) CreateOrUpdatePreparer(ctx context.Context, resourceG
"subscriptionId": autorest.Encode("path", client.SubscriptionID), "subscriptionId": autorest.Encode("path", client.SubscriptionID),
} }
const APIVersion = "2018-10-01" const APIVersion = "2019-03-01"
queryParameters := map[string]interface{}{ queryParameters := map[string]interface{}{
"api-version": APIVersion, "api-version": APIVersion,
} }
...@@ -92,10 +92,6 @@ func (client ImagesClient) CreateOrUpdateSender(req *http.Request) (future Image ...@@ -92,10 +92,6 @@ func (client ImagesClient) CreateOrUpdateSender(req *http.Request) (future Image
if err != nil { if err != nil {
return return
} }
err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
if err != nil {
return
}
future.Future, err = azure.NewFutureFromResponse(resp) future.Future, err = azure.NewFutureFromResponse(resp)
return return
} }
...@@ -141,7 +137,7 @@ func (client ImagesClient) DeletePreparer(ctx context.Context, resourceGroupName ...@@ -141,7 +137,7 @@ func (client ImagesClient) DeletePreparer(ctx context.Context, resourceGroupName
"subscriptionId": autorest.Encode("path", client.SubscriptionID), "subscriptionId": autorest.Encode("path", client.SubscriptionID),
} }
const APIVersion = "2018-10-01" const APIVersion = "2019-03-01"
queryParameters := map[string]interface{}{ queryParameters := map[string]interface{}{
"api-version": APIVersion, "api-version": APIVersion,
} }
...@@ -163,10 +159,6 @@ func (client ImagesClient) DeleteSender(req *http.Request) (future ImagesDeleteF ...@@ -163,10 +159,6 @@ func (client ImagesClient) DeleteSender(req *http.Request) (future ImagesDeleteF
if err != nil { if err != nil {
return return
} }
err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
if err != nil {
return
}
future.Future, err = azure.NewFutureFromResponse(resp) future.Future, err = azure.NewFutureFromResponse(resp)
return return
} }
...@@ -218,7 +210,7 @@ func (client ImagesClient) GetPreparer(ctx context.Context, resourceGroupName st ...@@ -218,7 +210,7 @@ func (client ImagesClient) GetPreparer(ctx context.Context, resourceGroupName st
"subscriptionId": autorest.Encode("path", client.SubscriptionID), "subscriptionId": autorest.Encode("path", client.SubscriptionID),
} }
const APIVersion = "2018-10-01" const APIVersion = "2019-03-01"
queryParameters := map[string]interface{}{ queryParameters := map[string]interface{}{
"api-version": APIVersion, "api-version": APIVersion,
} }
...@@ -285,7 +277,7 @@ func (client ImagesClient) ListPreparer(ctx context.Context) (*http.Request, err ...@@ -285,7 +277,7 @@ func (client ImagesClient) ListPreparer(ctx context.Context) (*http.Request, err
"subscriptionId": autorest.Encode("path", client.SubscriptionID), "subscriptionId": autorest.Encode("path", client.SubscriptionID),
} }
const APIVersion = "2018-10-01" const APIVersion = "2019-03-01"
queryParameters := map[string]interface{}{ queryParameters := map[string]interface{}{
"api-version": APIVersion, "api-version": APIVersion,
} }
...@@ -378,7 +370,7 @@ func (client ImagesClient) ListByResourceGroupPreparer(ctx context.Context, reso ...@@ -378,7 +370,7 @@ func (client ImagesClient) ListByResourceGroupPreparer(ctx context.Context, reso
"subscriptionId": autorest.Encode("path", client.SubscriptionID), "subscriptionId": autorest.Encode("path", client.SubscriptionID),
} }
const APIVersion = "2018-10-01" const APIVersion = "2019-03-01"
queryParameters := map[string]interface{}{ queryParameters := map[string]interface{}{
"api-version": APIVersion, "api-version": APIVersion,
} }
...@@ -467,7 +459,7 @@ func (client ImagesClient) UpdatePreparer(ctx context.Context, resourceGroupName ...@@ -467,7 +459,7 @@ func (client ImagesClient) UpdatePreparer(ctx context.Context, resourceGroupName
"subscriptionId": autorest.Encode("path", client.SubscriptionID), "subscriptionId": autorest.Encode("path", client.SubscriptionID),
} }
const APIVersion = "2018-10-01" const APIVersion = "2019-03-01"
queryParameters := map[string]interface{}{ queryParameters := map[string]interface{}{
"api-version": APIVersion, "api-version": APIVersion,
} }
...@@ -491,10 +483,6 @@ func (client ImagesClient) UpdateSender(req *http.Request) (future ImagesUpdateF ...@@ -491,10 +483,6 @@ func (client ImagesClient) UpdateSender(req *http.Request) (future ImagesUpdateF
if err != nil { if err != nil {
return return
} }
err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
if err != nil {
return
}
future.Future, err = azure.NewFutureFromResponse(resp) future.Future, err = azure.NewFutureFromResponse(resp)
return return
} }
......
...@@ -74,7 +74,7 @@ func (client LogAnalyticsClient) ExportRequestRateByIntervalPreparer(ctx context ...@@ -74,7 +74,7 @@ func (client LogAnalyticsClient) ExportRequestRateByIntervalPreparer(ctx context
"subscriptionId": autorest.Encode("path", client.SubscriptionID), "subscriptionId": autorest.Encode("path", client.SubscriptionID),
} }
const APIVersion = "2018-10-01" const APIVersion = "2019-03-01"
queryParameters := map[string]interface{}{ queryParameters := map[string]interface{}{
"api-version": APIVersion, "api-version": APIVersion,
} }
...@@ -98,10 +98,6 @@ func (client LogAnalyticsClient) ExportRequestRateByIntervalSender(req *http.Req ...@@ -98,10 +98,6 @@ func (client LogAnalyticsClient) ExportRequestRateByIntervalSender(req *http.Req
if err != nil { if err != nil {
return return
} }
err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
if err != nil {
return
}
future.Future, err = azure.NewFutureFromResponse(resp) future.Future, err = azure.NewFutureFromResponse(resp)
return return
} }
...@@ -153,7 +149,7 @@ func (client LogAnalyticsClient) ExportThrottledRequestsPreparer(ctx context.Con ...@@ -153,7 +149,7 @@ func (client LogAnalyticsClient) ExportThrottledRequestsPreparer(ctx context.Con
"subscriptionId": autorest.Encode("path", client.SubscriptionID), "subscriptionId": autorest.Encode("path", client.SubscriptionID),
} }
const APIVersion = "2018-10-01" const APIVersion = "2019-03-01"
queryParameters := map[string]interface{}{ queryParameters := map[string]interface{}{
"api-version": APIVersion, "api-version": APIVersion,
} }
...@@ -177,10 +173,6 @@ func (client LogAnalyticsClient) ExportThrottledRequestsSender(req *http.Request ...@@ -177,10 +173,6 @@ func (client LogAnalyticsClient) ExportThrottledRequestsSender(req *http.Request
if err != nil { if err != nil {
return return
} }
err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
if err != nil {
return
}
future.Future, err = azure.NewFutureFromResponse(resp) future.Future, err = azure.NewFutureFromResponse(resp)
return return
} }
......
...@@ -64,7 +64,7 @@ func (client OperationsClient) List(ctx context.Context) (result OperationListRe ...@@ -64,7 +64,7 @@ func (client OperationsClient) List(ctx context.Context) (result OperationListRe
// ListPreparer prepares the List request. // ListPreparer prepares the List request.
func (client OperationsClient) ListPreparer(ctx context.Context) (*http.Request, error) { func (client OperationsClient) ListPreparer(ctx context.Context) (*http.Request, error) {
const APIVersion = "2018-10-01" const APIVersion = "2019-03-01"
queryParameters := map[string]interface{}{ queryParameters := map[string]interface{}{
"api-version": APIVersion, "api-version": APIVersion,
} }
......
...@@ -54,16 +54,8 @@ func (client SnapshotsClient) CreateOrUpdate(ctx context.Context, resourceGroupN ...@@ -54,16 +54,8 @@ func (client SnapshotsClient) CreateOrUpdate(ctx context.Context, resourceGroupN
Chain: []validation.Constraint{{Target: "snapshot.SnapshotProperties.CreationData.ImageReference", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "snapshot.SnapshotProperties.CreationData.ImageReference", Name: validation.Null, Rule: false,
Chain: []validation.Constraint{{Target: "snapshot.SnapshotProperties.CreationData.ImageReference.ID", Name: validation.Null, Rule: true, Chain: nil}}}, Chain: []validation.Constraint{{Target: "snapshot.SnapshotProperties.CreationData.ImageReference.ID", Name: validation.Null, Rule: true, Chain: nil}}},
}}, }},
{Target: "snapshot.SnapshotProperties.EncryptionSettings", Name: validation.Null, Rule: false, {Target: "snapshot.SnapshotProperties.EncryptionSettingsCollection", Name: validation.Null, Rule: false,
Chain: []validation.Constraint{{Target: "snapshot.SnapshotProperties.EncryptionSettings.DiskEncryptionKey", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "snapshot.SnapshotProperties.EncryptionSettingsCollection.Enabled", Name: validation.Null, Rule: true, Chain: nil}}},
Chain: []validation.Constraint{{Target: "snapshot.SnapshotProperties.EncryptionSettings.DiskEncryptionKey.SourceVault", Name: validation.Null, Rule: true, Chain: nil},
{Target: "snapshot.SnapshotProperties.EncryptionSettings.DiskEncryptionKey.SecretURL", Name: validation.Null, Rule: true, Chain: nil},
}},
{Target: "snapshot.SnapshotProperties.EncryptionSettings.KeyEncryptionKey", Name: validation.Null, Rule: false,
Chain: []validation.Constraint{{Target: "snapshot.SnapshotProperties.EncryptionSettings.KeyEncryptionKey.SourceVault", Name: validation.Null, Rule: true, Chain: nil},
{Target: "snapshot.SnapshotProperties.EncryptionSettings.KeyEncryptionKey.KeyURL", Name: validation.Null, Rule: true, Chain: nil},
}},
}},
}}}}}); err != nil { }}}}}); err != nil {
return result, validation.NewError("compute.SnapshotsClient", "CreateOrUpdate", err.Error()) return result, validation.NewError("compute.SnapshotsClient", "CreateOrUpdate", err.Error())
} }
...@@ -91,7 +83,7 @@ func (client SnapshotsClient) CreateOrUpdatePreparer(ctx context.Context, resour ...@@ -91,7 +83,7 @@ func (client SnapshotsClient) CreateOrUpdatePreparer(ctx context.Context, resour
"subscriptionId": autorest.Encode("path", client.SubscriptionID), "subscriptionId": autorest.Encode("path", client.SubscriptionID),
} }
const APIVersion = "2018-06-01" const APIVersion = "2018-09-30"
queryParameters := map[string]interface{}{ queryParameters := map[string]interface{}{
"api-version": APIVersion, "api-version": APIVersion,
} }
...@@ -115,10 +107,6 @@ func (client SnapshotsClient) CreateOrUpdateSender(req *http.Request) (future Sn ...@@ -115,10 +107,6 @@ func (client SnapshotsClient) CreateOrUpdateSender(req *http.Request) (future Sn
if err != nil { if err != nil {
return return
} }
err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
if err != nil {
return
}
future.Future, err = azure.NewFutureFromResponse(resp) future.Future, err = azure.NewFutureFromResponse(resp)
return return
} }
...@@ -165,7 +153,7 @@ func (client SnapshotsClient) DeletePreparer(ctx context.Context, resourceGroupN ...@@ -165,7 +153,7 @@ func (client SnapshotsClient) DeletePreparer(ctx context.Context, resourceGroupN
"subscriptionId": autorest.Encode("path", client.SubscriptionID), "subscriptionId": autorest.Encode("path", client.SubscriptionID),
} }
const APIVersion = "2018-06-01" const APIVersion = "2018-09-30"
queryParameters := map[string]interface{}{ queryParameters := map[string]interface{}{
"api-version": APIVersion, "api-version": APIVersion,
} }
...@@ -187,10 +175,6 @@ func (client SnapshotsClient) DeleteSender(req *http.Request) (future SnapshotsD ...@@ -187,10 +175,6 @@ func (client SnapshotsClient) DeleteSender(req *http.Request) (future SnapshotsD
if err != nil { if err != nil {
return return
} }
err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
if err != nil {
return
}
future.Future, err = azure.NewFutureFromResponse(resp) future.Future, err = azure.NewFutureFromResponse(resp)
return return
} }
...@@ -242,7 +226,7 @@ func (client SnapshotsClient) GetPreparer(ctx context.Context, resourceGroupName ...@@ -242,7 +226,7 @@ func (client SnapshotsClient) GetPreparer(ctx context.Context, resourceGroupName
"subscriptionId": autorest.Encode("path", client.SubscriptionID), "subscriptionId": autorest.Encode("path", client.SubscriptionID),
} }
const APIVersion = "2018-06-01" const APIVersion = "2018-09-30"
queryParameters := map[string]interface{}{ queryParameters := map[string]interface{}{
"api-version": APIVersion, "api-version": APIVersion,
} }
...@@ -311,7 +295,7 @@ func (client SnapshotsClient) GrantAccessPreparer(ctx context.Context, resourceG ...@@ -311,7 +295,7 @@ func (client SnapshotsClient) GrantAccessPreparer(ctx context.Context, resourceG
"subscriptionId": autorest.Encode("path", client.SubscriptionID), "subscriptionId": autorest.Encode("path", client.SubscriptionID),
} }
const APIVersion = "2018-06-01" const APIVersion = "2018-09-30"
queryParameters := map[string]interface{}{ queryParameters := map[string]interface{}{
"api-version": APIVersion, "api-version": APIVersion,
} }
...@@ -335,10 +319,6 @@ func (client SnapshotsClient) GrantAccessSender(req *http.Request) (future Snaps ...@@ -335,10 +319,6 @@ func (client SnapshotsClient) GrantAccessSender(req *http.Request) (future Snaps
if err != nil { if err != nil {
return return
} }
err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
if err != nil {
return
}
future.Future, err = azure.NewFutureFromResponse(resp) future.Future, err = azure.NewFutureFromResponse(resp)
return return
} }
...@@ -386,7 +366,7 @@ func (client SnapshotsClient) ListPreparer(ctx context.Context) (*http.Request, ...@@ -386,7 +366,7 @@ func (client SnapshotsClient) ListPreparer(ctx context.Context) (*http.Request,
"subscriptionId": autorest.Encode("path", client.SubscriptionID), "subscriptionId": autorest.Encode("path", client.SubscriptionID),
} }
const APIVersion = "2018-06-01" const APIVersion = "2018-09-30"
queryParameters := map[string]interface{}{ queryParameters := map[string]interface{}{
"api-version": APIVersion, "api-version": APIVersion,
} }
...@@ -479,7 +459,7 @@ func (client SnapshotsClient) ListByResourceGroupPreparer(ctx context.Context, r ...@@ -479,7 +459,7 @@ func (client SnapshotsClient) ListByResourceGroupPreparer(ctx context.Context, r
"subscriptionId": autorest.Encode("path", client.SubscriptionID), "subscriptionId": autorest.Encode("path", client.SubscriptionID),
} }
const APIVersion = "2018-06-01" const APIVersion = "2018-09-30"
queryParameters := map[string]interface{}{ queryParameters := map[string]interface{}{
"api-version": APIVersion, "api-version": APIVersion,
} }
...@@ -568,7 +548,7 @@ func (client SnapshotsClient) RevokeAccessPreparer(ctx context.Context, resource ...@@ -568,7 +548,7 @@ func (client SnapshotsClient) RevokeAccessPreparer(ctx context.Context, resource
"subscriptionId": autorest.Encode("path", client.SubscriptionID), "subscriptionId": autorest.Encode("path", client.SubscriptionID),
} }
const APIVersion = "2018-06-01" const APIVersion = "2018-09-30"
queryParameters := map[string]interface{}{ queryParameters := map[string]interface{}{
"api-version": APIVersion, "api-version": APIVersion,
} }
...@@ -590,10 +570,6 @@ func (client SnapshotsClient) RevokeAccessSender(req *http.Request) (future Snap ...@@ -590,10 +570,6 @@ func (client SnapshotsClient) RevokeAccessSender(req *http.Request) (future Snap
if err != nil { if err != nil {
return return
} }
err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
if err != nil {
return
}
future.Future, err = azure.NewFutureFromResponse(resp) future.Future, err = azure.NewFutureFromResponse(resp)
return return
} }
...@@ -640,7 +616,7 @@ func (client SnapshotsClient) UpdatePreparer(ctx context.Context, resourceGroupN ...@@ -640,7 +616,7 @@ func (client SnapshotsClient) UpdatePreparer(ctx context.Context, resourceGroupN
"subscriptionId": autorest.Encode("path", client.SubscriptionID), "subscriptionId": autorest.Encode("path", client.SubscriptionID),
} }
const APIVersion = "2018-06-01" const APIVersion = "2018-09-30"
queryParameters := map[string]interface{}{ queryParameters := map[string]interface{}{
"api-version": APIVersion, "api-version": APIVersion,
} }
...@@ -664,10 +640,6 @@ func (client SnapshotsClient) UpdateSender(req *http.Request) (future SnapshotsU ...@@ -664,10 +640,6 @@ func (client SnapshotsClient) UpdateSender(req *http.Request) (future SnapshotsU
if err != nil { if err != nil {
return return
} }
err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
if err != nil {
return
}
future.Future, err = azure.NewFutureFromResponse(resp) future.Future, err = azure.NewFutureFromResponse(resp)
return return
} }
......
...@@ -80,7 +80,7 @@ func (client UsageClient) ListPreparer(ctx context.Context, location string) (*h ...@@ -80,7 +80,7 @@ func (client UsageClient) ListPreparer(ctx context.Context, location string) (*h
"subscriptionId": autorest.Encode("path", client.SubscriptionID), "subscriptionId": autorest.Encode("path", client.SubscriptionID),
} }
const APIVersion = "2018-10-01" const APIVersion = "2019-03-01"
queryParameters := map[string]interface{}{ queryParameters := map[string]interface{}{
"api-version": APIVersion, "api-version": APIVersion,
} }
......
...@@ -21,7 +21,7 @@ import "github.com/Azure/azure-sdk-for-go/version" ...@@ -21,7 +21,7 @@ import "github.com/Azure/azure-sdk-for-go/version"
// UserAgent returns the UserAgent string to use when sending http.Requests. // UserAgent returns the UserAgent string to use when sending http.Requests.
func UserAgent() string { func UserAgent() string {
return "Azure-SDK-For-Go/" + version.Number + " compute/2018-10-01" return "Azure-SDK-For-Go/" + version.Number + " compute/2019-03-01"
} }
// Version returns the semantic version (see http://semver.org) of the client. // Version returns the semantic version (see http://semver.org) of the client.
......
...@@ -75,7 +75,7 @@ func (client VirtualMachineExtensionImagesClient) GetPreparer(ctx context.Contex ...@@ -75,7 +75,7 @@ func (client VirtualMachineExtensionImagesClient) GetPreparer(ctx context.Contex
"version": autorest.Encode("path", version), "version": autorest.Encode("path", version),
} }
const APIVersion = "2018-10-01" const APIVersion = "2019-03-01"
queryParameters := map[string]interface{}{ queryParameters := map[string]interface{}{
"api-version": APIVersion, "api-version": APIVersion,
} }
...@@ -141,7 +141,7 @@ func (client VirtualMachineExtensionImagesClient) ListTypesPreparer(ctx context. ...@@ -141,7 +141,7 @@ func (client VirtualMachineExtensionImagesClient) ListTypesPreparer(ctx context.
"subscriptionId": autorest.Encode("path", client.SubscriptionID), "subscriptionId": autorest.Encode("path", client.SubscriptionID),
} }
const APIVersion = "2018-10-01" const APIVersion = "2019-03-01"
queryParameters := map[string]interface{}{ queryParameters := map[string]interface{}{
"api-version": APIVersion, "api-version": APIVersion,
} }
...@@ -209,7 +209,7 @@ func (client VirtualMachineExtensionImagesClient) ListVersionsPreparer(ctx conte ...@@ -209,7 +209,7 @@ func (client VirtualMachineExtensionImagesClient) ListVersionsPreparer(ctx conte
"type": autorest.Encode("path", typeParameter), "type": autorest.Encode("path", typeParameter),
} }
const APIVersion = "2018-10-01" const APIVersion = "2019-03-01"
queryParameters := map[string]interface{}{ queryParameters := map[string]interface{}{
"api-version": APIVersion, "api-version": APIVersion,
} }
......
...@@ -70,7 +70,7 @@ func (client VirtualMachineExtensionsClient) CreateOrUpdatePreparer(ctx context. ...@@ -70,7 +70,7 @@ func (client VirtualMachineExtensionsClient) CreateOrUpdatePreparer(ctx context.
"vmName": autorest.Encode("path", VMName), "vmName": autorest.Encode("path", VMName),
} }
const APIVersion = "2018-10-01" const APIVersion = "2019-03-01"
queryParameters := map[string]interface{}{ queryParameters := map[string]interface{}{
"api-version": APIVersion, "api-version": APIVersion,
} }
...@@ -94,10 +94,6 @@ func (client VirtualMachineExtensionsClient) CreateOrUpdateSender(req *http.Requ ...@@ -94,10 +94,6 @@ func (client VirtualMachineExtensionsClient) CreateOrUpdateSender(req *http.Requ
if err != nil { if err != nil {
return return
} }
err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
if err != nil {
return
}
future.Future, err = azure.NewFutureFromResponse(resp) future.Future, err = azure.NewFutureFromResponse(resp)
return return
} }
...@@ -145,7 +141,7 @@ func (client VirtualMachineExtensionsClient) DeletePreparer(ctx context.Context, ...@@ -145,7 +141,7 @@ func (client VirtualMachineExtensionsClient) DeletePreparer(ctx context.Context,
"vmName": autorest.Encode("path", VMName), "vmName": autorest.Encode("path", VMName),
} }
const APIVersion = "2018-10-01" const APIVersion = "2019-03-01"
queryParameters := map[string]interface{}{ queryParameters := map[string]interface{}{
"api-version": APIVersion, "api-version": APIVersion,
} }
...@@ -167,10 +163,6 @@ func (client VirtualMachineExtensionsClient) DeleteSender(req *http.Request) (fu ...@@ -167,10 +163,6 @@ func (client VirtualMachineExtensionsClient) DeleteSender(req *http.Request) (fu
if err != nil { if err != nil {
return return
} }
err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
if err != nil {
return
}
future.Future, err = azure.NewFutureFromResponse(resp) future.Future, err = azure.NewFutureFromResponse(resp)
return return
} }
...@@ -224,7 +216,7 @@ func (client VirtualMachineExtensionsClient) GetPreparer(ctx context.Context, re ...@@ -224,7 +216,7 @@ func (client VirtualMachineExtensionsClient) GetPreparer(ctx context.Context, re
"vmName": autorest.Encode("path", VMName), "vmName": autorest.Encode("path", VMName),
} }
const APIVersion = "2018-10-01" const APIVersion = "2019-03-01"
queryParameters := map[string]interface{}{ queryParameters := map[string]interface{}{
"api-version": APIVersion, "api-version": APIVersion,
} }
...@@ -295,7 +287,7 @@ func (client VirtualMachineExtensionsClient) ListPreparer(ctx context.Context, r ...@@ -295,7 +287,7 @@ func (client VirtualMachineExtensionsClient) ListPreparer(ctx context.Context, r
"vmName": autorest.Encode("path", VMName), "vmName": autorest.Encode("path", VMName),
} }
const APIVersion = "2018-10-01" const APIVersion = "2019-03-01"
queryParameters := map[string]interface{}{ queryParameters := map[string]interface{}{
"api-version": APIVersion, "api-version": APIVersion,
} }
...@@ -362,7 +354,7 @@ func (client VirtualMachineExtensionsClient) UpdatePreparer(ctx context.Context, ...@@ -362,7 +354,7 @@ func (client VirtualMachineExtensionsClient) UpdatePreparer(ctx context.Context,
"vmName": autorest.Encode("path", VMName), "vmName": autorest.Encode("path", VMName),
} }
const APIVersion = "2018-10-01" const APIVersion = "2019-03-01"
queryParameters := map[string]interface{}{ queryParameters := map[string]interface{}{
"api-version": APIVersion, "api-version": APIVersion,
} }
...@@ -386,10 +378,6 @@ func (client VirtualMachineExtensionsClient) UpdateSender(req *http.Request) (fu ...@@ -386,10 +378,6 @@ func (client VirtualMachineExtensionsClient) UpdateSender(req *http.Request) (fu
if err != nil { if err != nil {
return return
} }
err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK))
if err != nil {
return
}
future.Future, err = azure.NewFutureFromResponse(resp) future.Future, err = azure.NewFutureFromResponse(resp)
return return
} }
......
...@@ -79,7 +79,7 @@ func (client VirtualMachineImagesClient) GetPreparer(ctx context.Context, locati ...@@ -79,7 +79,7 @@ func (client VirtualMachineImagesClient) GetPreparer(ctx context.Context, locati
"version": autorest.Encode("path", version), "version": autorest.Encode("path", version),
} }
const APIVersion = "2018-10-01" const APIVersion = "2019-03-01"
queryParameters := map[string]interface{}{ queryParameters := map[string]interface{}{
"api-version": APIVersion, "api-version": APIVersion,
} }
...@@ -151,7 +151,7 @@ func (client VirtualMachineImagesClient) ListPreparer(ctx context.Context, locat ...@@ -151,7 +151,7 @@ func (client VirtualMachineImagesClient) ListPreparer(ctx context.Context, locat
"subscriptionId": autorest.Encode("path", client.SubscriptionID), "subscriptionId": autorest.Encode("path", client.SubscriptionID),
} }
const APIVersion = "2018-10-01" const APIVersion = "2019-03-01"
queryParameters := map[string]interface{}{ queryParameters := map[string]interface{}{
"api-version": APIVersion, "api-version": APIVersion,
} }
...@@ -227,7 +227,7 @@ func (client VirtualMachineImagesClient) ListOffersPreparer(ctx context.Context, ...@@ -227,7 +227,7 @@ func (client VirtualMachineImagesClient) ListOffersPreparer(ctx context.Context,
"subscriptionId": autorest.Encode("path", client.SubscriptionID), "subscriptionId": autorest.Encode("path", client.SubscriptionID),
} }
const APIVersion = "2018-10-01" const APIVersion = "2019-03-01"
queryParameters := map[string]interface{}{ queryParameters := map[string]interface{}{
"api-version": APIVersion, "api-version": APIVersion,
} }
...@@ -292,7 +292,7 @@ func (client VirtualMachineImagesClient) ListPublishersPreparer(ctx context.Cont ...@@ -292,7 +292,7 @@ func (client VirtualMachineImagesClient) ListPublishersPreparer(ctx context.Cont
"subscriptionId": autorest.Encode("path", client.SubscriptionID), "subscriptionId": autorest.Encode("path", client.SubscriptionID),
} }
const APIVersion = "2018-10-01" const APIVersion = "2019-03-01"
queryParameters := map[string]interface{}{ queryParameters := map[string]interface{}{
"api-version": APIVersion, "api-version": APIVersion,
} }
...@@ -361,7 +361,7 @@ func (client VirtualMachineImagesClient) ListSkusPreparer(ctx context.Context, l ...@@ -361,7 +361,7 @@ func (client VirtualMachineImagesClient) ListSkusPreparer(ctx context.Context, l
"subscriptionId": autorest.Encode("path", client.SubscriptionID), "subscriptionId": autorest.Encode("path", client.SubscriptionID),
} }
const APIVersion = "2018-10-01" const APIVersion = "2019-03-01"
queryParameters := map[string]interface{}{ queryParameters := map[string]interface{}{
"api-version": APIVersion, "api-version": APIVersion,
} }
......
...@@ -80,7 +80,7 @@ func (client VirtualMachineRunCommandsClient) GetPreparer(ctx context.Context, l ...@@ -80,7 +80,7 @@ func (client VirtualMachineRunCommandsClient) GetPreparer(ctx context.Context, l
"subscriptionId": autorest.Encode("path", client.SubscriptionID), "subscriptionId": autorest.Encode("path", client.SubscriptionID),
} }
const APIVersion = "2018-10-01" const APIVersion = "2019-03-01"
queryParameters := map[string]interface{}{ queryParameters := map[string]interface{}{
"api-version": APIVersion, "api-version": APIVersion,
} }
...@@ -152,7 +152,7 @@ func (client VirtualMachineRunCommandsClient) ListPreparer(ctx context.Context, ...@@ -152,7 +152,7 @@ func (client VirtualMachineRunCommandsClient) ListPreparer(ctx context.Context,
"subscriptionId": autorest.Encode("path", client.SubscriptionID), "subscriptionId": autorest.Encode("path", client.SubscriptionID),
} }
const APIVersion = "2018-10-01" const APIVersion = "2019-03-01"
queryParameters := map[string]interface{}{ queryParameters := map[string]interface{}{
"api-version": APIVersion, "api-version": APIVersion,
} }
......
...@@ -71,7 +71,7 @@ func (client VirtualMachineScaleSetExtensionsClient) CreateOrUpdatePreparer(ctx ...@@ -71,7 +71,7 @@ func (client VirtualMachineScaleSetExtensionsClient) CreateOrUpdatePreparer(ctx
"vmssExtensionName": autorest.Encode("path", vmssExtensionName), "vmssExtensionName": autorest.Encode("path", vmssExtensionName),
} }
const APIVersion = "2018-10-01" const APIVersion = "2019-03-01"
queryParameters := map[string]interface{}{ queryParameters := map[string]interface{}{
"api-version": APIVersion, "api-version": APIVersion,
} }
...@@ -95,10 +95,6 @@ func (client VirtualMachineScaleSetExtensionsClient) CreateOrUpdateSender(req *h ...@@ -95,10 +95,6 @@ func (client VirtualMachineScaleSetExtensionsClient) CreateOrUpdateSender(req *h
if err != nil { if err != nil {
return return
} }
err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
if err != nil {
return
}
future.Future, err = azure.NewFutureFromResponse(resp) future.Future, err = azure.NewFutureFromResponse(resp)
return return
} }
...@@ -146,7 +142,7 @@ func (client VirtualMachineScaleSetExtensionsClient) DeletePreparer(ctx context. ...@@ -146,7 +142,7 @@ func (client VirtualMachineScaleSetExtensionsClient) DeletePreparer(ctx context.
"vmssExtensionName": autorest.Encode("path", vmssExtensionName), "vmssExtensionName": autorest.Encode("path", vmssExtensionName),
} }
const APIVersion = "2018-10-01" const APIVersion = "2019-03-01"
queryParameters := map[string]interface{}{ queryParameters := map[string]interface{}{
"api-version": APIVersion, "api-version": APIVersion,
} }
...@@ -168,10 +164,6 @@ func (client VirtualMachineScaleSetExtensionsClient) DeleteSender(req *http.Requ ...@@ -168,10 +164,6 @@ func (client VirtualMachineScaleSetExtensionsClient) DeleteSender(req *http.Requ
if err != nil { if err != nil {
return return
} }
err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
if err != nil {
return
}
future.Future, err = azure.NewFutureFromResponse(resp) future.Future, err = azure.NewFutureFromResponse(resp)
return return
} }
...@@ -225,7 +217,7 @@ func (client VirtualMachineScaleSetExtensionsClient) GetPreparer(ctx context.Con ...@@ -225,7 +217,7 @@ func (client VirtualMachineScaleSetExtensionsClient) GetPreparer(ctx context.Con
"vmssExtensionName": autorest.Encode("path", vmssExtensionName), "vmssExtensionName": autorest.Encode("path", vmssExtensionName),
} }
const APIVersion = "2018-10-01" const APIVersion = "2019-03-01"
queryParameters := map[string]interface{}{ queryParameters := map[string]interface{}{
"api-version": APIVersion, "api-version": APIVersion,
} }
...@@ -296,7 +288,7 @@ func (client VirtualMachineScaleSetExtensionsClient) ListPreparer(ctx context.Co ...@@ -296,7 +288,7 @@ func (client VirtualMachineScaleSetExtensionsClient) ListPreparer(ctx context.Co
"vmScaleSetName": autorest.Encode("path", VMScaleSetName), "vmScaleSetName": autorest.Encode("path", VMScaleSetName),
} }
const APIVersion = "2018-10-01" const APIVersion = "2019-03-01"
queryParameters := map[string]interface{}{ queryParameters := map[string]interface{}{
"api-version": APIVersion, "api-version": APIVersion,
} }
......
...@@ -69,7 +69,7 @@ func (client VirtualMachineScaleSetRollingUpgradesClient) CancelPreparer(ctx con ...@@ -69,7 +69,7 @@ func (client VirtualMachineScaleSetRollingUpgradesClient) CancelPreparer(ctx con
"vmScaleSetName": autorest.Encode("path", VMScaleSetName), "vmScaleSetName": autorest.Encode("path", VMScaleSetName),
} }
const APIVersion = "2018-10-01" const APIVersion = "2019-03-01"
queryParameters := map[string]interface{}{ queryParameters := map[string]interface{}{
"api-version": APIVersion, "api-version": APIVersion,
} }
...@@ -91,10 +91,6 @@ func (client VirtualMachineScaleSetRollingUpgradesClient) CancelSender(req *http ...@@ -91,10 +91,6 @@ func (client VirtualMachineScaleSetRollingUpgradesClient) CancelSender(req *http
if err != nil { if err != nil {
return return
} }
err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
if err != nil {
return
}
future.Future, err = azure.NewFutureFromResponse(resp) future.Future, err = azure.NewFutureFromResponse(resp)
return return
} }
...@@ -145,7 +141,7 @@ func (client VirtualMachineScaleSetRollingUpgradesClient) GetLatestPreparer(ctx ...@@ -145,7 +141,7 @@ func (client VirtualMachineScaleSetRollingUpgradesClient) GetLatestPreparer(ctx
"vmScaleSetName": autorest.Encode("path", VMScaleSetName), "vmScaleSetName": autorest.Encode("path", VMScaleSetName),
} }
const APIVersion = "2018-10-01" const APIVersion = "2019-03-01"
queryParameters := map[string]interface{}{ queryParameters := map[string]interface{}{
"api-version": APIVersion, "api-version": APIVersion,
} }
...@@ -208,7 +204,7 @@ func (client VirtualMachineScaleSetRollingUpgradesClient) StartExtensionUpgradeP ...@@ -208,7 +204,7 @@ func (client VirtualMachineScaleSetRollingUpgradesClient) StartExtensionUpgradeP
"vmScaleSetName": autorest.Encode("path", VMScaleSetName), "vmScaleSetName": autorest.Encode("path", VMScaleSetName),
} }
const APIVersion = "2018-10-01" const APIVersion = "2019-03-01"
queryParameters := map[string]interface{}{ queryParameters := map[string]interface{}{
"api-version": APIVersion, "api-version": APIVersion,
} }
...@@ -230,10 +226,6 @@ func (client VirtualMachineScaleSetRollingUpgradesClient) StartExtensionUpgradeS ...@@ -230,10 +226,6 @@ func (client VirtualMachineScaleSetRollingUpgradesClient) StartExtensionUpgradeS
if err != nil { if err != nil {
return return
} }
err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
if err != nil {
return
}
future.Future, err = azure.NewFutureFromResponse(resp) future.Future, err = azure.NewFutureFromResponse(resp)
return return
} }
...@@ -279,7 +271,7 @@ func (client VirtualMachineScaleSetRollingUpgradesClient) StartOSUpgradePreparer ...@@ -279,7 +271,7 @@ func (client VirtualMachineScaleSetRollingUpgradesClient) StartOSUpgradePreparer
"vmScaleSetName": autorest.Encode("path", VMScaleSetName), "vmScaleSetName": autorest.Encode("path", VMScaleSetName),
} }
const APIVersion = "2018-10-01" const APIVersion = "2019-03-01"
queryParameters := map[string]interface{}{ queryParameters := map[string]interface{}{
"api-version": APIVersion, "api-version": APIVersion,
} }
...@@ -301,10 +293,6 @@ func (client VirtualMachineScaleSetRollingUpgradesClient) StartOSUpgradeSender(r ...@@ -301,10 +293,6 @@ func (client VirtualMachineScaleSetRollingUpgradesClient) StartOSUpgradeSender(r
if err != nil { if err != nil {
return return
} }
err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
if err != nil {
return
}
future.Future, err = azure.NewFutureFromResponse(resp) future.Future, err = azure.NewFutureFromResponse(resp)
return return
} }
......
...@@ -79,7 +79,7 @@ func (client VirtualMachineSizesClient) ListPreparer(ctx context.Context, locati ...@@ -79,7 +79,7 @@ func (client VirtualMachineSizesClient) ListPreparer(ctx context.Context, locati
"subscriptionId": autorest.Encode("path", client.SubscriptionID), "subscriptionId": autorest.Encode("path", client.SubscriptionID),
} }
const APIVersion = "2018-10-01" const APIVersion = "2019-03-01"
queryParameters := map[string]interface{}{ queryParameters := map[string]interface{}{
"api-version": APIVersion, "api-version": APIVersion,
} }
......
...@@ -18,4 +18,4 @@ package version ...@@ -18,4 +18,4 @@ package version
// Changes may cause incorrect behavior and will be lost if the code is regenerated. // Changes may cause incorrect behavior and will be lost if the code is regenerated.
// Number contains the semantic version of this SDK. // Number contains the semantic version of this SDK.
const Number = "v21.3.0" const Number = "v21.4.0"
...@@ -3,8 +3,8 @@ bitbucket.org/bertimus9/systemstat ...@@ -3,8 +3,8 @@ bitbucket.org/bertimus9/systemstat
# cloud.google.com/go v0.0.0-20160913182117-3b1ae45394a2 => cloud.google.com/go v0.0.0-20160913182117-3b1ae45394a2 # cloud.google.com/go v0.0.0-20160913182117-3b1ae45394a2 => cloud.google.com/go v0.0.0-20160913182117-3b1ae45394a2
cloud.google.com/go/compute/metadata cloud.google.com/go/compute/metadata
cloud.google.com/go/internal cloud.google.com/go/internal
# github.com/Azure/azure-sdk-for-go v21.3.0+incompatible => github.com/Azure/azure-sdk-for-go v21.3.0+incompatible # github.com/Azure/azure-sdk-for-go v21.4.0+incompatible => github.com/Azure/azure-sdk-for-go v21.4.0+incompatible
github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-10-01/compute github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-03-01/compute
github.com/Azure/azure-sdk-for-go/services/containerregistry/mgmt/2017-10-01/containerregistry github.com/Azure/azure-sdk-for-go/services/containerregistry/mgmt/2017-10-01/containerregistry
github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-09-01/network github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-09-01/network
github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2018-07-01/storage github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2018-07-01/storage
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment