diff --git a/Godeps/Godeps.json b/Godeps/Godeps.json
index 4d4643db0b..c56a9acdb6 100644
--- a/Godeps/Godeps.json
+++ b/Godeps/Godeps.json
@@ -36,34 +36,34 @@
"Rev": "3b1ae45394a234c385be014e9a488f2bb6eef821"
},
{
- "ImportPath": "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-10-01/compute",
- "Comment": "v21.3.0",
- "Rev": "da91af54816b4cf72949c225a2d0980f51fab01b"
+ "ImportPath": "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-03-01/compute",
+ "Comment": "v21.4.0",
+ "Rev": "32916f57ad7b421f5fdaab86b73a795632fff117"
},
{
"ImportPath": "github.com/Azure/azure-sdk-for-go/services/containerregistry/mgmt/2017-10-01/containerregistry",
- "Comment": "v21.3.0",
- "Rev": "da91af54816b4cf72949c225a2d0980f51fab01b"
+ "Comment": "v21.4.0",
+ "Rev": "32916f57ad7b421f5fdaab86b73a795632fff117"
},
{
"ImportPath": "github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-09-01/network",
- "Comment": "v21.3.0",
- "Rev": "da91af54816b4cf72949c225a2d0980f51fab01b"
+ "Comment": "v21.4.0",
+ "Rev": "32916f57ad7b421f5fdaab86b73a795632fff117"
},
{
"ImportPath": "github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2018-07-01/storage",
- "Comment": "v21.3.0",
- "Rev": "da91af54816b4cf72949c225a2d0980f51fab01b"
+ "Comment": "v21.4.0",
+ "Rev": "32916f57ad7b421f5fdaab86b73a795632fff117"
},
{
"ImportPath": "github.com/Azure/azure-sdk-for-go/storage",
- "Comment": "v21.3.0",
- "Rev": "da91af54816b4cf72949c225a2d0980f51fab01b"
+ "Comment": "v21.4.0",
+ "Rev": "32916f57ad7b421f5fdaab86b73a795632fff117"
},
{
"ImportPath": "github.com/Azure/azure-sdk-for-go/version",
- "Comment": "v21.3.0",
- "Rev": "da91af54816b4cf72949c225a2d0980f51fab01b"
+ "Comment": "v21.4.0",
+ "Rev": "32916f57ad7b421f5fdaab86b73a795632fff117"
},
{
"ImportPath": "github.com/Azure/go-ansiterm",
diff --git a/Godeps/LICENSES b/Godeps/LICENSES
index 6887574bee..eab3324eb0 100644
--- a/Godeps/LICENSES
+++ b/Godeps/LICENSES
@@ -8692,7 +8692,7 @@ SOFTWARE.
================================================================================
-= vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-10-01/compute licensed under: =
+= vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-03-01/compute licensed under: =
Apache License
diff --git a/pkg/cloudprovider/providers/azure/BUILD b/pkg/cloudprovider/providers/azure/BUILD
index bbe2482526..3f9249e93c 100644
--- a/pkg/cloudprovider/providers/azure/BUILD
+++ b/pkg/cloudprovider/providers/azure/BUILD
@@ -58,7 +58,7 @@ go_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/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/storage/mgmt/2018-07-01/storage:go_default_library",
"//vendor/github.com/Azure/azure-sdk-for-go/storage:go_default_library",
@@ -102,7 +102,7 @@ go_test(
"//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/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/storage/mgmt/2018-07-01/storage:go_default_library",
"//vendor/github.com/Azure/go-autorest/autorest:go_default_library",
diff --git a/pkg/cloudprovider/providers/azure/azure.go b/pkg/cloudprovider/providers/azure/azure.go
index e1cd9bbfa2..e7169a37fa 100644
--- a/pkg/cloudprovider/providers/azure/azure.go
+++ b/pkg/cloudprovider/providers/azure/azure.go
@@ -38,7 +38,7 @@ import (
cloudprovider "k8s.io/cloud-provider"
"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/azure"
"k8s.io/klog"
diff --git a/pkg/cloudprovider/providers/azure/azure_backoff.go b/pkg/cloudprovider/providers/azure/azure_backoff.go
index 6545ec1c44..79560532f2 100644
--- a/pkg/cloudprovider/providers/azure/azure_backoff.go
+++ b/pkg/cloudprovider/providers/azure/azure_backoff.go
@@ -20,7 +20,7 @@ import (
"fmt"
"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"
"k8s.io/api/core/v1"
diff --git a/pkg/cloudprovider/providers/azure/azure_client.go b/pkg/cloudprovider/providers/azure/azure_client.go
index 8559c1cd37..7870285348 100644
--- a/pkg/cloudprovider/providers/azure/azure_client.go
+++ b/pkg/cloudprovider/providers/azure/azure_client.go
@@ -22,7 +22,7 @@ import (
"net/http"
"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/storage/mgmt/2018-07-01/storage"
"github.com/Azure/go-autorest/autorest"
@@ -89,10 +89,8 @@ type SecurityGroupsClient interface {
// VirtualMachineScaleSetsClient defines needed functions for azure compute.VirtualMachineScaleSetsClient
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)
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
@@ -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) {
if !az.rateLimiterReader.TryAccept() {
err = createRateLimitErr(false, "VMSSGet")
@@ -906,30 +880,6 @@ func (az *azVirtualMachineScaleSetsClient) List(ctx context.Context, resourceGro
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.
type azVirtualMachineScaleSetVMsClient struct {
client compute.VirtualMachineScaleSetVMsClient
diff --git a/pkg/cloudprovider/providers/azure/azure_controller_common.go b/pkg/cloudprovider/providers/azure/azure_controller_common.go
index b4b2e53289..7a6f49b79b 100644
--- a/pkg/cloudprovider/providers/azure/azure_controller_common.go
+++ b/pkg/cloudprovider/providers/azure/azure_controller_common.go
@@ -21,7 +21,7 @@ import (
"fmt"
"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/apimachinery/pkg/types"
diff --git a/pkg/cloudprovider/providers/azure/azure_controller_common_test.go b/pkg/cloudprovider/providers/azure/azure_controller_common_test.go
index e4b30d41cf..c6bd2807bc 100644
--- a/pkg/cloudprovider/providers/azure/azure_controller_common_test.go
+++ b/pkg/cloudprovider/providers/azure/azure_controller_common_test.go
@@ -20,7 +20,7 @@ import (
"fmt"
"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) {
diff --git a/pkg/cloudprovider/providers/azure/azure_controller_standard.go b/pkg/cloudprovider/providers/azure/azure_controller_standard.go
index 644b4ff88b..8e10fc7508 100644
--- a/pkg/cloudprovider/providers/azure/azure_controller_standard.go
+++ b/pkg/cloudprovider/providers/azure/azure_controller_standard.go
@@ -21,7 +21,7 @@ import (
"net/http"
"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/apimachinery/pkg/types"
diff --git a/pkg/cloudprovider/providers/azure/azure_controller_vmss.go b/pkg/cloudprovider/providers/azure/azure_controller_vmss.go
index 60748d8c9f..db914c2c9a 100644
--- a/pkg/cloudprovider/providers/azure/azure_controller_vmss.go
+++ b/pkg/cloudprovider/providers/azure/azure_controller_vmss.go
@@ -21,7 +21,7 @@ import (
"net/http"
"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/apimachinery/pkg/types"
diff --git a/pkg/cloudprovider/providers/azure/azure_fakes.go b/pkg/cloudprovider/providers/azure/azure_fakes.go
index af8e47abbb..17bbb8f99a 100644
--- a/pkg/cloudprovider/providers/azure/azure_fakes.go
+++ b/pkg/cloudprovider/providers/azure/azure_fakes.go
@@ -29,7 +29,7 @@ import (
"k8s.io/apimachinery/pkg/types"
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/storage/mgmt/2018-07-01/storage"
"github.com/Azure/go-autorest/autorest"
@@ -902,7 +902,11 @@ func (f *fakeVMSet) EnsureHostsInPool(service *v1.Service, nodes []*v1.Node, bac
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")
}
diff --git a/pkg/cloudprovider/providers/azure/azure_instances_test.go b/pkg/cloudprovider/providers/azure/azure_instances_test.go
index 40c92beb9d..71f8114a3d 100644
--- a/pkg/cloudprovider/providers/azure/azure_instances_test.go
+++ b/pkg/cloudprovider/providers/azure/azure_instances_test.go
@@ -24,7 +24,7 @@ import (
"reflect"
"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"
"k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/types"
diff --git a/pkg/cloudprovider/providers/azure/azure_loadbalancer.go b/pkg/cloudprovider/providers/azure/azure_loadbalancer.go
index cf9bab1433..96edec5a8e 100644
--- a/pkg/cloudprovider/providers/azure/azure_loadbalancer.go
+++ b/pkg/cloudprovider/providers/azure/azure_loadbalancer.go
@@ -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.
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)
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
}
- 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.
klog.V(10).Infof("reconcileLoadBalancer: az.DeleteLB(%q): start", lbName)
diff --git a/pkg/cloudprovider/providers/azure/azure_managedDiskController.go b/pkg/cloudprovider/providers/azure/azure_managedDiskController.go
index b1b945d398..c6acbf280d 100644
--- a/pkg/cloudprovider/providers/azure/azure_managedDiskController.go
+++ b/pkg/cloudprovider/providers/azure/azure_managedDiskController.go
@@ -23,7 +23,7 @@ import (
"strconv"
"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"
"k8s.io/klog"
diff --git a/pkg/cloudprovider/providers/azure/azure_standard.go b/pkg/cloudprovider/providers/azure/azure_standard.go
index c2b22e1e6d..87ba3f2f5f 100644
--- a/pkg/cloudprovider/providers/azure/azure_standard.go
+++ b/pkg/cloudprovider/providers/azure/azure_standard.go
@@ -26,7 +26,7 @@ import (
"strconv"
"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/go-autorest/autorest/to"
@@ -632,24 +632,24 @@ func (as *availabilitySet) getPrimaryInterfaceWithVMSet(nodeName, vmSetName stri
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.
-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)
serviceName := getServiceName(service)
nic, err := as.getPrimaryInterfaceWithVMSet(vmName, vmSetName)
if err != nil {
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
}
- 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
}
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
}
@@ -726,7 +726,7 @@ func (as *availabilitySet) EnsureHostsInPool(service *v1.Service, nodes []*v1.No
}
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 {
return fmt.Errorf("ensure(%s): backendPoolID(%s) - failed to ensure host in pool: %q", getServiceName(service), backendPoolID, err)
}
@@ -743,8 +743,8 @@ func (as *availabilitySet) EnsureHostsInPool(service *v1.Service, nodes []*v1.No
return nil
}
-// EnsureBackendPoolDeleted ensures the loadBalancer backendAddressPools deleted from the specified vmSet.
-func (as *availabilitySet) EnsureBackendPoolDeleted(service *v1.Service, poolID, vmSetName string, backendAddressPools *[]network.BackendAddressPool) error {
+// EnsureBackendPoolDeleted ensures the loadBalancer backendAddressPools deleted from the specified nodes.
+func (as *availabilitySet) EnsureBackendPoolDeleted(service *v1.Service, backendPoolID, vmSetName string, backendAddressPools *[]network.BackendAddressPool) error {
// Do nothing for availability set.
return nil
}
diff --git a/pkg/cloudprovider/providers/azure/azure_test.go b/pkg/cloudprovider/providers/azure/azure_test.go
index e30b0d9297..21ee22542e 100644
--- a/pkg/cloudprovider/providers/azure/azure_test.go
+++ b/pkg/cloudprovider/providers/azure/azure_test.go
@@ -33,7 +33,7 @@ import (
servicehelpers "k8s.io/cloud-provider/service/helpers"
"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/go-autorest/autorest/to"
"github.com/stretchr/testify/assert"
diff --git a/pkg/cloudprovider/providers/azure/azure_vmsets.go b/pkg/cloudprovider/providers/azure/azure_vmsets.go
index 6dbdc1dd65..f8c0ee6170 100644
--- a/pkg/cloudprovider/providers/azure/azure_vmsets.go
+++ b/pkg/cloudprovider/providers/azure/azure_vmsets.go
@@ -19,7 +19,7 @@ package azure
import (
"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"
"k8s.io/api/core/v1"
@@ -57,8 +57,11 @@ type VMSet interface {
// EnsureHostsInPool ensures the given Node's primary IP configurations are
// participating in the specified LoadBalancer Backend Pool.
EnsureHostsInPool(service *v1.Service, nodes []*v1.Node, backendPoolID string, vmSetName string, isInternal bool) error
- // EnsureBackendPoolDeleted ensures the loadBalancer backendAddressPools deleted from the specified vmSet.
- EnsureBackendPoolDeleted(service *v1.Service, poolID, vmSetName string, backendAddressPools *[]network.BackendAddressPool) error
+ // EnsureHostInPool ensures the given VM's Primary NIC's Primary IP Configuration is
+ // 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(isManagedDisk bool, diskName, diskURI string, nodeName types.NodeName, lun int32, cachingMode compute.CachingTypes) error
diff --git a/pkg/cloudprovider/providers/azure/azure_vmss.go b/pkg/cloudprovider/providers/azure/azure_vmss.go
index b0e20b8ce0..ae3aa81871 100644
--- a/pkg/cloudprovider/providers/azure/azure_vmss.go
+++ b/pkg/cloudprovider/providers/azure/azure_vmss.go
@@ -24,14 +24,13 @@ import (
"strconv"
"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/go-autorest/autorest/to"
"k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/types"
- "k8s.io/apimachinery/pkg/util/sets"
- "k8s.io/apimachinery/pkg/util/wait"
+ utilerrors "k8s.io/apimachinery/pkg/util/errors"
cloudprovider "k8s.io/cloud-provider"
"k8s.io/klog"
)
@@ -44,6 +43,7 @@ var (
resourceGroupRE = regexp.MustCompile(`.*/subscriptions/(?:.*)/resourceGroups/(.+)/providers/Microsoft.Compute/virtualMachineScaleSets/(?:.*)/virtualMachines(?:.*)`)
vmssNicResourceGroupRE = regexp.MustCompile(`.*/subscriptions/(?:.*)/resourceGroups/(.+)/providers/Microsoft.Compute/virtualMachineScaleSets/(?:.*)/virtualMachines/(?:.*)/networkInterfaces/(?:.*)`)
vmssMachineIDTemplate = "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Compute/virtualMachineScaleSets/%s/virtualMachines/%s"
+ vmssIPConfigurationRE = regexp.MustCompile(`.*/subscriptions/(?:.*)/resourceGroups/(.+)/providers/Microsoft.Compute/virtualMachineScaleSets/(.+)/virtualMachines/(.+)/networkInterfaces(?:.*)`)
)
// scaleSet implements VMSet interface for Azure scale set.
@@ -351,6 +351,16 @@ func (ss *scaleSet) getPrimaryInterfaceID(machine compute.VirtualMachineScaleSet
return "", fmt.Errorf("failed to find a primary nic for the vm. vmname=%q", *machine.Name)
}
+// getVmssMachineID returns the full identifier of a vmss virtual machine.
+func (az *Cloud) getVmssMachineID(resourceGroup, scaleSetName, instanceID string) string {
+ return fmt.Sprintf(
+ vmssMachineIDTemplate,
+ az.SubscriptionID,
+ strings.ToLower(resourceGroup),
+ scaleSetName,
+ instanceID)
+}
+
// machineName is composed of computerNamePrefix and 36-based instanceID.
// And instanceID part if in fixed length of 6 characters.
// Refer https://msftstack.wordpress.com/2017/05/10/figuring-out-azure-vm-scale-set-machine-names/.
@@ -569,58 +579,8 @@ func (ss *scaleSet) GetPrimaryInterface(nodeName string) (network.Interface, err
return nic, nil
}
-// getScaleSet gets scale set with exponential backoff retry
-func (ss *scaleSet) getScaleSet(service *v1.Service, name string) (compute.VirtualMachineScaleSet, bool, error) {
- if ss.Config.shouldOmitCloudProviderBackoff() {
- var result compute.VirtualMachineScaleSet
- var exists bool
-
- cached, err := ss.vmssCache.Get(name)
- if err != nil {
- ss.Event(service, v1.EventTypeWarning, "GetVirtualMachineScaleSet", err.Error())
- klog.Errorf("backoff: failure for scale set %q, will retry,err=%v", name, err)
- return result, false, nil
- }
-
- if cached != nil {
- exists = true
- result = *(cached.(*compute.VirtualMachineScaleSet))
- }
-
- return result, exists, err
- }
-
- return ss.getScaleSetWithRetry(service, name)
-}
-
-// getScaleSetWithRetry gets scale set with exponential backoff retry
-func (ss *scaleSet) getScaleSetWithRetry(service *v1.Service, name string) (compute.VirtualMachineScaleSet, bool, error) {
- var result compute.VirtualMachineScaleSet
- var exists bool
-
- err := wait.ExponentialBackoff(ss.requestBackoff(), func() (bool, error) {
- cached, retryErr := ss.vmssCache.Get(name)
- if retryErr != nil {
- ss.Event(service, v1.EventTypeWarning, "GetVirtualMachineScaleSet", retryErr.Error())
- klog.Errorf("backoff: failure for scale set %q, will retry,err=%v", name, retryErr)
- return false, nil
- }
- klog.V(4).Infof("backoff: success for scale set %q", name)
-
- if cached != nil {
- exists = true
- result = *(cached.(*compute.VirtualMachineScaleSet))
- }
-
- return true, nil
- })
-
- return result, exists, err
-}
-
-// getPrimaryNetworkConfiguration gets primary network interface configuration for scale sets.
-func (ss *scaleSet) getPrimaryNetworkConfiguration(networkConfigurationList *[]compute.VirtualMachineScaleSetNetworkConfiguration, scaleSetName string) (*compute.VirtualMachineScaleSetNetworkConfiguration, error) {
- networkConfigurations := *networkConfigurationList
+// getPrimarynetworkInterfaceConfiguration gets primary network interface configuration for scale set virtual machine.
+func (ss *scaleSet) getPrimarynetworkInterfaceConfiguration(networkConfigurations []compute.VirtualMachineScaleSetNetworkConfiguration, nodeName string) (*compute.VirtualMachineScaleSetNetworkConfiguration, error) {
if len(networkConfigurations) == 1 {
return &networkConfigurations[0], nil
}
@@ -632,10 +592,10 @@ func (ss *scaleSet) getPrimaryNetworkConfiguration(networkConfigurationList *[]c
}
}
- return nil, fmt.Errorf("failed to find a primary network configuration for the scale set %q", scaleSetName)
+ return nil, fmt.Errorf("failed to find a primary network configuration for the scale set VM %q", nodeName)
}
-func (ss *scaleSet) getPrimaryIPConfigForScaleSet(config *compute.VirtualMachineScaleSetNetworkConfiguration, scaleSetName string) (*compute.VirtualMachineScaleSetIPConfiguration, error) {
+func (ss *scaleSet) getPrimaryIPConfigForScaleSet(config *compute.VirtualMachineScaleSetNetworkConfiguration, nodeName string) (*compute.VirtualMachineScaleSetIPConfiguration, error) {
ipConfigurations := *config.IPConfigurations
if len(ipConfigurations) == 1 {
return &ipConfigurations[0], nil
@@ -648,121 +608,38 @@ func (ss *scaleSet) getPrimaryIPConfigForScaleSet(config *compute.VirtualMachine
}
}
- return nil, fmt.Errorf("failed to find a primary IP configuration for the scale set %q", scaleSetName)
+ return nil, fmt.Errorf("failed to find a primary IP configuration for the scale set VM %q", nodeName)
}
-// createOrUpdateVMSS invokes ss.VirtualMachineScaleSetsClient.CreateOrUpdate with exponential backoff retry.
-func (ss *scaleSet) createOrUpdateVMSS(service *v1.Service, virtualMachineScaleSet compute.VirtualMachineScaleSet) error {
- if ss.Config.shouldOmitCloudProviderBackoff() {
- ctx, cancel := getContextWithCancel()
- defer cancel()
- resp, err := ss.VirtualMachineScaleSetsClient.CreateOrUpdate(ctx, ss.ResourceGroup, *virtualMachineScaleSet.Name, virtualMachineScaleSet)
- klog.V(10).Infof("VirtualMachineScaleSetsClient.CreateOrUpdate(%s): end", *virtualMachineScaleSet.Name)
- return ss.processHTTPResponse(service, "CreateOrUpdateVMSS", resp, err)
- }
-
- return ss.createOrUpdateVMSSWithRetry(service, virtualMachineScaleSet)
-}
-
-// createOrUpdateVMSSWithRetry invokes ss.VirtualMachineScaleSetsClient.CreateOrUpdate with exponential backoff retry.
-func (ss *scaleSet) createOrUpdateVMSSWithRetry(service *v1.Service, virtualMachineScaleSet compute.VirtualMachineScaleSet) error {
- return wait.ExponentialBackoff(ss.requestBackoff(), func() (bool, error) {
- ctx, cancel := getContextWithCancel()
- defer cancel()
- resp, err := ss.VirtualMachineScaleSetsClient.CreateOrUpdate(ctx, ss.ResourceGroup, *virtualMachineScaleSet.Name, virtualMachineScaleSet)
- klog.V(10).Infof("VirtualMachineScaleSetsClient.CreateOrUpdate(%s): end", *virtualMachineScaleSet.Name)
- return ss.processHTTPRetryResponse(service, "CreateOrUpdateVMSS", resp, err)
- })
-}
-
-// updateVMSSInstances invokes ss.VirtualMachineScaleSetsClient.UpdateInstances with exponential backoff retry.
-func (ss *scaleSet) updateVMSSInstances(service *v1.Service, scaleSetName string, vmInstanceIDs compute.VirtualMachineScaleSetVMInstanceRequiredIDs) error {
- if ss.Config.shouldOmitCloudProviderBackoff() {
- ctx, cancel := getContextWithCancel()
- defer cancel()
- resp, err := ss.VirtualMachineScaleSetsClient.UpdateInstances(ctx, ss.ResourceGroup, scaleSetName, vmInstanceIDs)
- klog.V(10).Infof("VirtualMachineScaleSetsClient.UpdateInstances(%s): end", scaleSetName)
- return ss.processHTTPResponse(service, "CreateOrUpdateVMSSInstance", resp, err)
- }
-
- return ss.updateVMSSInstancesWithRetry(service, scaleSetName, vmInstanceIDs)
-}
-
-// updateVMSSInstancesWithRetry invokes ss.VirtualMachineScaleSetsClient.UpdateInstances with exponential backoff retry.
-func (ss *scaleSet) updateVMSSInstancesWithRetry(service *v1.Service, scaleSetName string, vmInstanceIDs compute.VirtualMachineScaleSetVMInstanceRequiredIDs) error {
- return wait.ExponentialBackoff(ss.requestBackoff(), func() (bool, error) {
- ctx, cancel := getContextWithCancel()
- defer cancel()
- resp, err := ss.VirtualMachineScaleSetsClient.UpdateInstances(ctx, ss.ResourceGroup, scaleSetName, vmInstanceIDs)
- klog.V(10).Infof("VirtualMachineScaleSetsClient.UpdateInstances(%s): end", scaleSetName)
- return ss.processHTTPRetryResponse(service, "CreateOrUpdateVMSSInstance", resp, err)
- })
-}
-
-// getNodesScaleSets returns scalesets with instanceIDs and standard node names for given nodes.
-func (ss *scaleSet) getNodesScaleSets(nodes []*v1.Node) (map[string]sets.String, []*v1.Node, error) {
- scalesets := make(map[string]sets.String)
- standardNodes := []*v1.Node{}
-
- for _, curNode := range nodes {
- if ss.useStandardLoadBalancer() && ss.excludeMasterNodesFromStandardLB() && isMasterNode(curNode) {
- klog.V(4).Infof("Excluding master node %q from load balancer backendpool", curNode.Name)
- continue
- }
-
- if ss.ShouldNodeExcludedFromLoadBalancer(curNode) {
- klog.V(4).Infof("Excluding unmanaged/external-resource-group node %q", curNode.Name)
- continue
- }
-
- curScaleSetName, err := extractScaleSetNameByProviderID(curNode.Spec.ProviderID)
- if err != nil {
- klog.V(4).Infof("Node %q is not belonging to any scale sets, assuming it is belong to availability sets", curNode.Name)
- standardNodes = append(standardNodes, curNode)
- continue
- }
-
- if _, ok := scalesets[curScaleSetName]; !ok {
- scalesets[curScaleSetName] = sets.NewString()
- }
-
- instanceID, err := getLastSegment(curNode.Spec.ProviderID)
- if err != nil {
- klog.Errorf("Failed to get instance ID for node %q: %v", curNode.Spec.ProviderID, err)
- return nil, nil, err
- }
-
- scalesets[curScaleSetName].Insert(instanceID)
- }
-
- return scalesets, standardNodes, nil
-}
-
-// ensureHostsInVMSetPool ensures the given Node's primary IP configurations are
-// participating in the vmSet's LoadBalancer Backend Pool.
-func (ss *scaleSet) ensureHostsInVMSetPool(service *v1.Service, backendPoolID string, vmSetName string, instanceIDs []string, isInternal bool) error {
- klog.V(3).Infof("ensuring hosts %q of scaleset %q in LB backendpool %q", instanceIDs, vmSetName, backendPoolID)
- serviceName := getServiceName(service)
- virtualMachineScaleSet, exists, err := ss.getScaleSet(service, vmSetName)
+// EnsureHostInPool ensures the given VM's Primary NIC's Primary IP Configuration is
+// participating in the specified LoadBalancer Backend Pool.
+func (ss *scaleSet) EnsureHostInPool(service *v1.Service, nodeName types.NodeName, backendPoolID string, vmSetName string, isInternal bool) error {
+ klog.V(3).Infof("ensuring node %q of scaleset %q in LB backendpool %q", nodeName, vmSetName, backendPoolID)
+ vmName := mapNodeNameToVMName(nodeName)
+ ssName, instanceID, vm, err := ss.getVmssVM(vmName)
if err != nil {
- klog.Errorf("ss.getScaleSet(%s) for service %q failed: %v", vmSetName, serviceName, err)
return err
}
- if !exists {
- errorMessage := fmt.Errorf("Scale set %q not found", vmSetName)
- klog.Errorf("%v", errorMessage)
- return errorMessage
+
+ // Check scale set name:
+ // - For basic SKU load balancer, errNotInVMSet should be returned if the node's
+ // scale set is mismatched with vmSetName.
+ // - For standard SKU load balancer, backend could belong to multiple VMSS, so we
+ // don't check vmSet for it.
+ if vmSetName != "" && !ss.useStandardLoadBalancer() && !strings.EqualFold(vmSetName, ssName) {
+ klog.V(3).Infof("EnsureHostInPool skips node %s because it is not in the scaleSet %s", vmName, vmSetName)
+ return nil
}
// Find primary network interface configuration.
- networkConfigureList := virtualMachineScaleSet.VirtualMachineProfile.NetworkProfile.NetworkInterfaceConfigurations
- primaryNetworkConfiguration, err := ss.getPrimaryNetworkConfiguration(networkConfigureList, vmSetName)
+ networkInterfaceConfigurations := *vm.NetworkProfileConfiguration.NetworkInterfaceConfigurations
+ primaryNetworkInterfaceConfiguration, err := ss.getPrimarynetworkInterfaceConfiguration(networkInterfaceConfigurations, vmName)
if err != nil {
return err
}
// Find primary IP configuration.
- primaryIPConfiguration, err := ss.getPrimaryIPConfigForScaleSet(primaryNetworkConfiguration, vmSetName)
+ primaryIPConfiguration, err := ss.getPrimaryIPConfigForScaleSet(primaryNetworkInterfaceConfiguration, vmName)
if err != nil {
return err
}
@@ -779,217 +656,288 @@ func (ss *scaleSet) ensureHostsInVMSetPool(service *v1.Service, backendPoolID st
break
}
}
- if !foundPool {
- if ss.useStandardLoadBalancer() && len(newBackendPools) > 0 {
- // Although standard load balancer supports backends from multiple vmss,
- // the same network interface couldn't be added to more than one load balancer of
- // the same type. Omit those nodes (e.g. masters) so Azure ARM won't complain
- // about this.
- newBackendPoolsIDs := make([]string, 0, len(newBackendPools))
- for _, pool := range newBackendPools {
- if pool.ID != nil {
- newBackendPoolsIDs = append(newBackendPoolsIDs, *pool.ID)
- }
- }
- isSameLB, oldLBName, err := isBackendPoolOnSameLB(backendPoolID, newBackendPoolsIDs)
- if err != nil {
- return err
- }
- if !isSameLB {
- klog.V(4).Infof("VMSS %q has already been added to LB %q, omit adding it to a new one", vmSetName, oldLBName)
- return nil
+
+ // The backendPoolID has already been found from existing LoadBalancerBackendAddressPools.
+ if foundPool {
+ return nil
+ }
+
+ if ss.useStandardLoadBalancer() && len(newBackendPools) > 0 {
+ // Although standard load balancer supports backends from multiple scale
+ // sets, the same network interface couldn't be added to more than one load balancer of
+ // the same type. Omit those nodes (e.g. masters) so Azure ARM won't complain
+ // about this.
+ newBackendPoolsIDs := make([]string, 0, len(newBackendPools))
+ for _, pool := range newBackendPools {
+ if pool.ID != nil {
+ newBackendPoolsIDs = append(newBackendPoolsIDs, *pool.ID)
}
}
-
- newBackendPools = append(newBackendPools,
- compute.SubResource{
- ID: to.StringPtr(backendPoolID),
- })
- primaryIPConfiguration.LoadBalancerBackendAddressPools = &newBackendPools
-
- err := ss.createOrUpdateVMSS(service, virtualMachineScaleSet)
+ isSameLB, oldLBName, err := isBackendPoolOnSameLB(backendPoolID, newBackendPoolsIDs)
if err != nil {
return err
}
+ if !isSameLB {
+ klog.V(4).Infof("Node %q has already been added to LB %q, omit adding it to a new one", nodeName, oldLBName)
+ return nil
+ }
}
- // Update instances to latest VMSS model.
- vmInstanceIDs := compute.VirtualMachineScaleSetVMInstanceRequiredIDs{
- InstanceIds: &instanceIDs,
+ // Compose a new vmssVM with added backendPoolID.
+ newBackendPools = append(newBackendPools,
+ compute.SubResource{
+ ID: to.StringPtr(backendPoolID),
+ })
+ primaryIPConfiguration.LoadBalancerBackendAddressPools = &newBackendPools
+ newVM := compute.VirtualMachineScaleSetVM{
+ Sku: vm.Sku,
+ Location: vm.Location,
+ VirtualMachineScaleSetVMProperties: &compute.VirtualMachineScaleSetVMProperties{
+ HardwareProfile: vm.HardwareProfile,
+ NetworkProfileConfiguration: &compute.VirtualMachineScaleSetVMNetworkProfileConfiguration{
+ NetworkInterfaceConfigurations: &networkInterfaceConfigurations,
+ },
+ },
}
- err = ss.updateVMSSInstances(service, vmSetName, vmInstanceIDs)
+
+ // Get the node resource group.
+ nodeResourceGroup, err := ss.GetNodeResourceGroup(vmName)
if err != nil {
return err
}
- return nil
+ // Invalidate the cache since we would update it.
+ key := buildVmssCacheKey(nodeResourceGroup, ss.makeVmssVMName(ssName, instanceID))
+ defer ss.vmssVMCache.Delete(key)
+
+ // Update vmssVM with backoff.
+ ctx, cancel := getContextWithCancel()
+ defer cancel()
+ klog.V(2).Infof("EnsureHostInPool begins to update vmssVM(%s) with new backendPoolID %s", vmName, backendPoolID)
+ resp, err := ss.VirtualMachineScaleSetVMsClient.Update(ctx, nodeResourceGroup, ssName, instanceID, newVM)
+ if ss.CloudProviderBackoff && shouldRetryHTTPRequest(resp, err) {
+ klog.V(2).Infof("EnsureHostInPool update backing off vmssVM(%s) with new backendPoolID %s, err: %v", vmName, backendPoolID, err)
+ retryErr := ss.UpdateVmssVMWithRetry(nodeResourceGroup, ssName, instanceID, newVM)
+ if retryErr != nil {
+ err = retryErr
+ klog.Errorf("EnsureHostInPool update abort backoff vmssVM(%s) with new backendPoolID %s, err: %v", vmName, backendPoolID, err)
+ }
+ }
+
+ return err
}
// EnsureHostsInPool ensures the given Node's primary IP configurations are
// participating in the specified LoadBalancer Backend Pool.
func (ss *scaleSet) EnsureHostsInPool(service *v1.Service, nodes []*v1.Node, backendPoolID string, vmSetName string, isInternal bool) error {
- serviceName := getServiceName(service)
- scalesets, standardNodes, err := ss.getNodesScaleSets(nodes)
- if err != nil {
- klog.Errorf("getNodesScaleSets() for service %q failed: %v", serviceName, err)
- return err
- }
+ hostUpdates := make([]func() error, 0, len(nodes))
+ for _, node := range nodes {
+ localNodeName := node.Name
- for ssName, instanceIDs := range scalesets {
- // Only add nodes belonging to specified vmSet for basic SKU LB.
- if !ss.useStandardLoadBalancer() && !strings.EqualFold(ssName, vmSetName) {
+ if ss.useStandardLoadBalancer() && ss.excludeMasterNodesFromStandardLB() && isMasterNode(node) {
+ klog.V(4).Infof("Excluding master node %q from load balancer backendpool %q", localNodeName, backendPoolID)
continue
}
- if instanceIDs.Len() == 0 {
- // This may happen when scaling a vmss capacity to 0.
- klog.V(3).Infof("scale set %q has 0 nodes, adding it to load balancer anyway", ssName)
- // InstanceIDs is required to update vmss, use * instead here since there are no nodes actually.
- instanceIDs.Insert("*")
+ if ss.ShouldNodeExcludedFromLoadBalancer(node) {
+ klog.V(4).Infof("Excluding unmanaged/external-resource-group node %q", localNodeName)
+ continue
}
- err := ss.ensureHostsInVMSetPool(service, backendPoolID, ssName, instanceIDs.List(), isInternal)
- if err != nil {
- klog.Errorf("ensureHostsInVMSetPool() with scaleSet %q for service %q failed: %v", ssName, serviceName, err)
- return err
+ f := func() error {
+ // VMAS nodes should also be added to the SLB backends.
+ if ss.useStandardLoadBalancer() {
+ // Check whether the node is VMAS virtual machine.
+ managedByAS, err := ss.isNodeManagedByAvailabilitySet(localNodeName)
+ if err != nil {
+ klog.Errorf("Failed to check isNodeManagedByAvailabilitySet(%s): %v", localNodeName, err)
+ return err
+ }
+ if managedByAS {
+ return ss.availabilitySet.EnsureHostInPool(service, types.NodeName(localNodeName), backendPoolID, vmSetName, isInternal)
+ }
+ }
+
+ err := ss.EnsureHostInPool(service, types.NodeName(localNodeName), backendPoolID, vmSetName, isInternal)
+ if err != nil {
+ return fmt.Errorf("EnsureHostInPool(%s): backendPoolID(%s) - failed to ensure host in pool: %q", getServiceName(service), backendPoolID, err)
+ }
+ return nil
}
+ hostUpdates = append(hostUpdates, f)
}
- if ss.useStandardLoadBalancer() && len(standardNodes) > 0 {
- err := ss.availabilitySet.EnsureHostsInPool(service, standardNodes, backendPoolID, "", isInternal)
- if err != nil {
- klog.Errorf("availabilitySet.EnsureHostsInPool() for service %q failed: %v", serviceName, err)
- return err
- }
+ errs := utilerrors.AggregateGoroutines(hostUpdates...)
+ if errs != nil {
+ return utilerrors.Flatten(errs)
}
return nil
}
-// ensureScaleSetBackendPoolDeleted ensures the loadBalancer backendAddressPools deleted from the specified scaleset.
-func (ss *scaleSet) ensureScaleSetBackendPoolDeleted(service *v1.Service, poolID, ssName string) error {
- klog.V(3).Infof("ensuring backend pool %q deleted from scaleset %q", poolID, ssName)
- virtualMachineScaleSet, exists, err := ss.getScaleSet(service, ssName)
+// ensureBackendPoolDeletedFromNode ensures the loadBalancer backendAddressPools deleted from the specified node.
+func (ss *scaleSet) ensureBackendPoolDeletedFromNode(service *v1.Service, nodeName, backendPoolID string) error {
+ ssName, instanceID, vm, err := ss.getVmssVM(nodeName)
if err != nil {
- klog.Errorf("ss.ensureScaleSetBackendPoolDeleted(%s, %s) getScaleSet(%s) failed: %v", poolID, ssName, ssName, err)
return err
}
- if !exists {
- klog.V(2).Infof("ss.ensureScaleSetBackendPoolDeleted(%s, %s), scale set %s has already been non-exist", poolID, ssName, ssName)
- return nil
- }
// Find primary network interface configuration.
- networkConfigureList := virtualMachineScaleSet.VirtualMachineProfile.NetworkProfile.NetworkInterfaceConfigurations
- primaryNetworkConfiguration, err := ss.getPrimaryNetworkConfiguration(networkConfigureList, ssName)
+ networkInterfaceConfigurations := *vm.NetworkProfileConfiguration.NetworkInterfaceConfigurations
+ primaryNetworkInterfaceConfiguration, err := ss.getPrimarynetworkInterfaceConfiguration(networkInterfaceConfigurations, nodeName)
if err != nil {
return err
}
- // Find primary IP configuration.
- primaryIPConfiguration, err := ss.getPrimaryIPConfigForScaleSet(primaryNetworkConfiguration, ssName)
+ // Find primary IP configuration.4
+ primaryIPConfiguration, err := ss.getPrimaryIPConfigForScaleSet(primaryNetworkInterfaceConfiguration, nodeName)
if err != nil {
return err
}
-
- // Construct new loadBalancerBackendAddressPools and remove backendAddressPools from primary IP configuration.
if primaryIPConfiguration.LoadBalancerBackendAddressPools == nil || len(*primaryIPConfiguration.LoadBalancerBackendAddressPools) == 0 {
return nil
}
+
+ // Construct new loadBalancerBackendAddressPools and remove backendAddressPools from primary IP configuration.
existingBackendPools := *primaryIPConfiguration.LoadBalancerBackendAddressPools
newBackendPools := []compute.SubResource{}
foundPool := false
for i := len(existingBackendPools) - 1; i >= 0; i-- {
curPool := existingBackendPools[i]
- if strings.EqualFold(poolID, *curPool.ID) {
- klog.V(10).Infof("ensureScaleSetBackendPoolDeleted gets unwanted backend pool %q for scale set %q", poolID, ssName)
+ if strings.EqualFold(backendPoolID, *curPool.ID) {
+ klog.V(10).Infof("ensureBackendPoolDeletedFromNode gets unwanted backend pool %q for node %s", backendPoolID, nodeName)
foundPool = true
newBackendPools = append(existingBackendPools[:i], existingBackendPools[i+1:]...)
}
}
+
+ // Pool not found, assume it has been already removed.
if !foundPool {
- // Pool not found, assume it has been already removed.
return nil
}
- // Update scale set with backoff.
+ // Compose a new vmssVM with added backendPoolID.
primaryIPConfiguration.LoadBalancerBackendAddressPools = &newBackendPools
- klog.V(3).Infof("VirtualMachineScaleSetsClient.CreateOrUpdate: scale set (%s) - updating", ssName)
- err = ss.createOrUpdateVMSS(service, virtualMachineScaleSet)
+ newVM := compute.VirtualMachineScaleSetVM{
+ Sku: vm.Sku,
+ Location: vm.Location,
+ VirtualMachineScaleSetVMProperties: &compute.VirtualMachineScaleSetVMProperties{
+ HardwareProfile: vm.HardwareProfile,
+ NetworkProfileConfiguration: &compute.VirtualMachineScaleSetVMNetworkProfileConfiguration{
+ NetworkInterfaceConfigurations: &networkInterfaceConfigurations,
+ },
+ },
+ }
+
+ // Get the node resource group.
+ nodeResourceGroup, err := ss.GetNodeResourceGroup(nodeName)
if err != nil {
return err
}
- // Update instances to latest VMSS model.
- instanceIDs := []string{"*"}
- vmInstanceIDs := compute.VirtualMachineScaleSetVMInstanceRequiredIDs{
- InstanceIds: &instanceIDs,
- }
- err = ss.updateVMSSInstances(service, ssName, vmInstanceIDs)
- if err != nil {
- return err
- }
+ // Invalidate the cache since we would update it.
+ key := buildVmssCacheKey(nodeResourceGroup, ss.makeVmssVMName(ssName, instanceID))
+ defer ss.vmssVMCache.Delete(key)
- // Update virtualMachineScaleSet again. This is a workaround for removing VMSS reference from LB.
- // TODO: remove this workaround when figuring out the root cause.
- if len(newBackendPools) == 0 {
- err = ss.createOrUpdateVMSS(service, virtualMachineScaleSet)
- if err != nil {
- klog.V(2).Infof("VirtualMachineScaleSetsClient.CreateOrUpdate abort backoff: scale set (%s) - updating", ssName)
+ // Update vmssVM with backoff.
+ ctx, cancel := getContextWithCancel()
+ defer cancel()
+ klog.V(2).Infof("ensureBackendPoolDeletedFromNode begins to update vmssVM(%s) with backendPoolID %s", nodeName, backendPoolID)
+ resp, err := ss.VirtualMachineScaleSetVMsClient.Update(ctx, nodeResourceGroup, ssName, instanceID, newVM)
+ if ss.CloudProviderBackoff && shouldRetryHTTPRequest(resp, err) {
+ klog.V(2).Infof("ensureBackendPoolDeletedFromNode update backing off vmssVM(%s) with backendPoolID %s, err: %v", nodeName, backendPoolID, err)
+ retryErr := ss.UpdateVmssVMWithRetry(nodeResourceGroup, ssName, instanceID, newVM)
+ if retryErr != nil {
+ err = retryErr
+ klog.Errorf("ensureBackendPoolDeletedFromNode update abort backoff vmssVM(%s) with backendPoolID %s, err: %v", nodeName, backendPoolID, err)
}
}
-
- return nil
+ if err != nil {
+ klog.Errorf("ensureBackendPoolDeletedFromNode failed to update vmssVM(%s) with backendPoolID %s: %v", nodeName, backendPoolID, err)
+ } else {
+ klog.V(2).Infof("ensureBackendPoolDeletedFromNode update vmssVM(%s) with backendPoolID %s succeeded", nodeName, backendPoolID)
+ }
+ return err
}
-// EnsureBackendPoolDeleted ensures the loadBalancer backendAddressPools deleted from the specified vmSet.
-func (ss *scaleSet) EnsureBackendPoolDeleted(service *v1.Service, poolID, vmSetName string, backendAddressPools *[]network.BackendAddressPool) error {
+// getNodeNameByIPConfigurationID gets the node name by IP configuration ID.
+func (ss *scaleSet) getNodeNameByIPConfigurationID(ipConfigurationID string) (string, error) {
+ matches := vmssIPConfigurationRE.FindStringSubmatch(ipConfigurationID)
+ if len(matches) != 4 {
+ klog.V(4).Infof("Can not extract scale set name from ipConfigurationID (%s), assuming it is mananaged by availability set", ipConfigurationID)
+ return "", ErrorNotVmssInstance
+ }
+
+ resourceGroup := matches[1]
+ scaleSetName := matches[2]
+ instanceID := matches[3]
+ vm, err := ss.getVmssVMByInstanceID(resourceGroup, scaleSetName, instanceID)
+ if err != nil {
+ return "", err
+ }
+
+ if vm.OsProfile != nil && vm.OsProfile.ComputerName != nil {
+ return strings.ToLower(*vm.OsProfile.ComputerName), nil
+ }
+
+ return "", nil
+}
+
+// EnsureBackendPoolDeleted ensures the loadBalancer backendAddressPools deleted from the specified nodes.
+func (ss *scaleSet) EnsureBackendPoolDeleted(service *v1.Service, backendPoolID, vmSetName string, backendAddressPools *[]network.BackendAddressPool) error {
+ // Returns nil if backend address pools already deleted.
if backendAddressPools == nil {
return nil
}
- scalesets := sets.NewString()
+ ipConfigurationIDs := []string{}
for _, backendPool := range *backendAddressPools {
- if strings.EqualFold(*backendPool.ID, poolID) && backendPool.BackendIPConfigurations != nil {
- for _, ipConfigurations := range *backendPool.BackendIPConfigurations {
- if ipConfigurations.ID == nil {
+ if strings.EqualFold(*backendPool.ID, backendPoolID) && backendPool.BackendIPConfigurations != nil {
+ for _, ipConf := range *backendPool.BackendIPConfigurations {
+ if ipConf.ID == nil {
continue
}
- ssName, err := extractScaleSetNameByProviderID(*ipConfigurations.ID)
- if err != nil {
- klog.V(4).Infof("backend IP configuration %q is not belonging to any vmss, omit it", *ipConfigurations.ID)
- continue
- }
-
- scalesets.Insert(ssName)
+ ipConfigurationIDs = append(ipConfigurationIDs, *ipConf.ID)
}
- break
}
}
- for ssName := range scalesets {
- // Only remove nodes belonging to specified vmSet to basic LB backends.
- if !ss.useStandardLoadBalancer() && !strings.EqualFold(ssName, vmSetName) {
- continue
- }
+ hostUpdates := make([]func() error, 0, len(ipConfigurationIDs))
+ for i := range ipConfigurationIDs {
+ ipConfigurationID := ipConfigurationIDs[i]
- err := ss.ensureScaleSetBackendPoolDeleted(service, poolID, ssName)
- if err != nil {
- klog.Errorf("ensureScaleSetBackendPoolDeleted() with scaleSet %q failed: %v", ssName, err)
- return err
+ f := func() error {
+ if scaleSetName, err := extractScaleSetNameByProviderID(ipConfigurationID); err == nil {
+ // Only remove nodes belonging to specified vmSet to basic LB backends.
+ if !ss.useStandardLoadBalancer() && !strings.EqualFold(scaleSetName, vmSetName) {
+ return nil
+ }
+ }
+
+ nodeName, err := ss.getNodeNameByIPConfigurationID(ipConfigurationID)
+ if err != nil {
+ if err == ErrorNotVmssInstance { // Do nothing for the VMAS nodes.
+ return nil
+ }
+ klog.Errorf("Failed to getNodeNameByIPConfigurationID(%s): %v", ipConfigurationID, err)
+ return err
+ }
+
+ err = ss.ensureBackendPoolDeletedFromNode(service, nodeName, backendPoolID)
+ if err != nil {
+ return fmt.Errorf("failed to ensure backend pool %s deleted from node %s: %v", backendPoolID, nodeName, err)
+ }
+
+ return nil
}
+ hostUpdates = append(hostUpdates, f)
+ }
+
+ errs := utilerrors.AggregateGoroutines(hostUpdates...)
+ if errs != nil {
+ return utilerrors.Flatten(errs)
}
return nil
}
-
-// getVmssMachineID returns the full identifier of a vmss virtual machine.
-func (az *Cloud) getVmssMachineID(resourceGroup, scaleSetName, instanceID string) string {
- return fmt.Sprintf(
- vmssMachineIDTemplate,
- az.SubscriptionID,
- strings.ToLower(resourceGroup),
- scaleSetName,
- instanceID)
-}
diff --git a/pkg/cloudprovider/providers/azure/azure_vmss_test.go b/pkg/cloudprovider/providers/azure/azure_vmss_test.go
index 54ebff15fa..b1d818c56f 100644
--- a/pkg/cloudprovider/providers/azure/azure_vmss_test.go
+++ b/pkg/cloudprovider/providers/azure/azure_vmss_test.go
@@ -20,7 +20,7 @@ import (
"fmt"
"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/go-autorest/autorest/to"
"github.com/stretchr/testify/assert"
@@ -80,6 +80,21 @@ func setTestVirtualMachineCloud(ss *Cloud, scaleSetName, zone string, faultDomai
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{
VirtualMachineScaleSetVMProperties: &compute.VirtualMachineScaleSetVMProperties{
OsProfile: &compute.OSProfile{
@@ -88,6 +103,9 @@ func setTestVirtualMachineCloud(ss *Cloud, scaleSetName, zone string, faultDomai
NetworkProfile: &compute.NetworkProfile{
NetworkInterfaces: &networkInterfaces,
},
+ NetworkProfileConfiguration: &compute.VirtualMachineScaleSetVMNetworkProfileConfiguration{
+ NetworkInterfaceConfigurations: &networkConfigurations,
+ },
InstanceView: &compute.VirtualMachineScaleSetVMInstanceView{
PlatformFaultDomain: &faultDomain,
},
@@ -307,3 +325,52 @@ func TestGetIPByNodeName(t *testing.T) {
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)
+ }
+}
diff --git a/pkg/cloudprovider/providers/azure/azure_wrap.go b/pkg/cloudprovider/providers/azure/azure_wrap.go
index 15cdf4534f..6113fc10c8 100644
--- a/pkg/cloudprovider/providers/azure/azure_wrap.go
+++ b/pkg/cloudprovider/providers/azure/azure_wrap.go
@@ -23,7 +23,7 @@ import (
"strings"
"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/go-autorest/autorest"
"k8s.io/apimachinery/pkg/types"
diff --git a/pkg/volume/azure_dd/BUILD b/pkg/volume/azure_dd/BUILD
index a894b6ee53..6ec2eaf5ff 100644
--- a/pkg/volume/azure_dd/BUILD
+++ b/pkg/volume/azure_dd/BUILD
@@ -37,7 +37,7 @@ go_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/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/k8s.io/klog:go_default_library",
"//vendor/k8s.io/utils/strings:go_default_library",
@@ -74,7 +74,7 @@ go_test(
"//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/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/stretchr/testify/assert:go_default_library",
],
diff --git a/pkg/volume/azure_dd/attacher.go b/pkg/volume/azure_dd/attacher.go
index f7486e1e1d..a009be39da 100644
--- a/pkg/volume/azure_dd/attacher.go
+++ b/pkg/volume/azure_dd/attacher.go
@@ -24,7 +24,7 @@ import (
"strconv"
"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/api/core/v1"
diff --git a/pkg/volume/azure_dd/azure_common.go b/pkg/volume/azure_dd/azure_common.go
index 905369d695..a6b0c2704d 100644
--- a/pkg/volume/azure_dd/azure_common.go
+++ b/pkg/volume/azure_dd/azure_common.go
@@ -25,7 +25,7 @@ import (
"strconv"
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/apimachinery/pkg/types"
diff --git a/pkg/volume/azure_dd/azure_common_test.go b/pkg/volume/azure_dd/azure_common_test.go
index f100d1792b..ad07492301 100644
--- a/pkg/volume/azure_dd/azure_common_test.go
+++ b/pkg/volume/azure_dd/azure_common_test.go
@@ -24,7 +24,7 @@ import (
"testing"
"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"
"k8s.io/kubernetes/pkg/util/mount"
diff --git a/pkg/volume/azure_dd/azure_dd.go b/pkg/volume/azure_dd/azure_dd.go
index a85fb712aa..4d2a730d13 100644
--- a/pkg/volume/azure_dd/azure_dd.go
+++ b/pkg/volume/azure_dd/azure_dd.go
@@ -22,7 +22,7 @@ import (
"strings"
"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"
"k8s.io/klog"
diff --git a/pkg/volume/azure_dd/azure_dd_test.go b/pkg/volume/azure_dd/azure_dd_test.go
index 965e9d3207..dfe922872e 100644
--- a/pkg/volume/azure_dd/azure_dd_test.go
+++ b/pkg/volume/azure_dd/azure_dd_test.go
@@ -20,7 +20,7 @@ import (
"os"
"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/stretchr/testify/assert"
diff --git a/vendor/BUILD b/vendor/BUILD
index ffa563d7b1..357a00612a 100644
--- a/vendor/BUILD
+++ b/vendor/BUILD
@@ -12,7 +12,7 @@ filegroup(
"//vendor/bitbucket.org/bertimus9/systemstat:all-srcs",
"//vendor/cloud.google.com/go/compute/metadata: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/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",
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-10-01/compute/BUILD b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-03-01/compute/BUILD
similarity index 95%
rename from vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-10-01/compute/BUILD
rename to vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-03-01/compute/BUILD
index efa5d228da..2f8fb9e769 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-10-01/compute/BUILD
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-03-01/compute/BUILD
@@ -29,8 +29,8 @@ go_library(
"virtualmachinescalesetvms.go",
"virtualmachinesizes.go",
],
- importmap = "k8s.io/kubernetes/vendor/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/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/2019-03-01/compute",
visibility = ["//visibility:public"],
deps = [
"//vendor/github.com/Azure/azure-sdk-for-go/version:go_default_library",
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-10-01/compute/availabilitysets.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-03-01/compute/availabilitysets.go
similarity index 99%
rename from vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-10-01/compute/availabilitysets.go
rename to vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-03-01/compute/availabilitysets.go
index afad9559b6..32a4301ee8 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-10-01/compute/availabilitysets.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-03-01/compute/availabilitysets.go
@@ -74,7 +74,7 @@ func (client AvailabilitySetsClient) CreateOrUpdatePreparer(ctx context.Context,
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
}
- const APIVersion = "2018-10-01"
+ const APIVersion = "2019-03-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
@@ -143,7 +143,7 @@ func (client AvailabilitySetsClient) DeletePreparer(ctx context.Context, resourc
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
}
- const APIVersion = "2018-10-01"
+ const APIVersion = "2019-03-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
@@ -209,7 +209,7 @@ func (client AvailabilitySetsClient) GetPreparer(ctx context.Context, resourceGr
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
}
- const APIVersion = "2018-10-01"
+ const APIVersion = "2019-03-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
@@ -275,7 +275,7 @@ func (client AvailabilitySetsClient) ListPreparer(ctx context.Context, resourceG
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
}
- const APIVersion = "2018-10-01"
+ const APIVersion = "2019-03-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
@@ -370,7 +370,7 @@ func (client AvailabilitySetsClient) ListAvailableSizesPreparer(ctx context.Cont
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
}
- const APIVersion = "2018-10-01"
+ const APIVersion = "2019-03-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
@@ -433,7 +433,7 @@ func (client AvailabilitySetsClient) ListBySubscriptionPreparer(ctx context.Cont
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
}
- const APIVersion = "2018-10-01"
+ const APIVersion = "2019-03-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
@@ -528,7 +528,7 @@ func (client AvailabilitySetsClient) UpdatePreparer(ctx context.Context, resourc
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
}
- const APIVersion = "2018-10-01"
+ const APIVersion = "2019-03-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-10-01/compute/client.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-03-01/compute/client.go
similarity index 100%
rename from vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-10-01/compute/client.go
rename to vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-03-01/compute/client.go
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-10-01/compute/containerservices.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-03-01/compute/containerservices.go
similarity index 98%
rename from vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-10-01/compute/containerservices.go
rename to vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-03-01/compute/containerservices.go
index b16788bfa5..f29e552d66 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-10-01/compute/containerservices.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-03-01/compute/containerservices.go
@@ -125,10 +125,6 @@ func (client ContainerServicesClient) CreateOrUpdateSender(req *http.Request) (f
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -199,10 +195,6 @@ func (client ContainerServicesClient) DeleteSender(req *http.Request) (future Co
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-10-01/compute/disks.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-03-01/compute/disks.go
similarity index 93%
rename from vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-10-01/compute/disks.go
rename to vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-03-01/compute/disks.go
index 9cbbd79fd6..c15d270502 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-10-01/compute/disks.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-03-01/compute/disks.go
@@ -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.ID", Name: validation.Null, Rule: true, Chain: nil}}},
}},
- {Target: "disk.DiskProperties.EncryptionSettings", Name: validation.Null, Rule: false,
- Chain: []validation.Constraint{{Target: "disk.DiskProperties.EncryptionSettings.DiskEncryptionKey", Name: validation.Null, Rule: false,
- 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},
- }},
- }},
+ {Target: "disk.DiskProperties.EncryptionSettingsCollection", Name: validation.Null, Rule: false,
+ Chain: []validation.Constraint{{Target: "disk.DiskProperties.EncryptionSettingsCollection.Enabled", Name: validation.Null, Rule: true, Chain: nil}}},
}}}}}); err != nil {
return result, validation.NewError("compute.DisksClient", "CreateOrUpdate", err.Error())
}
@@ -92,7 +84,7 @@ func (client DisksClient) CreateOrUpdatePreparer(ctx context.Context, resourceGr
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
}
- const APIVersion = "2018-06-01"
+ const APIVersion = "2018-09-30"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
@@ -116,10 +108,6 @@ func (client DisksClient) CreateOrUpdateSender(req *http.Request) (future DisksC
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -167,7 +155,7 @@ func (client DisksClient) DeletePreparer(ctx context.Context, resourceGroupName
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
}
- const APIVersion = "2018-06-01"
+ const APIVersion = "2018-09-30"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
@@ -189,10 +177,6 @@ func (client DisksClient) DeleteSender(req *http.Request) (future DisksDeleteFut
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -245,7 +229,7 @@ func (client DisksClient) GetPreparer(ctx context.Context, resourceGroupName str
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
}
- const APIVersion = "2018-06-01"
+ const APIVersion = "2018-09-30"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
@@ -315,7 +299,7 @@ func (client DisksClient) GrantAccessPreparer(ctx context.Context, resourceGroup
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
}
- const APIVersion = "2018-06-01"
+ const APIVersion = "2018-09-30"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
@@ -339,10 +323,6 @@ func (client DisksClient) GrantAccessSender(req *http.Request) (future DisksGran
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -390,7 +370,7 @@ func (client DisksClient) ListPreparer(ctx context.Context) (*http.Request, erro
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
}
- const APIVersion = "2018-06-01"
+ const APIVersion = "2018-09-30"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
@@ -483,7 +463,7 @@ func (client DisksClient) ListByResourceGroupPreparer(ctx context.Context, resou
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
}
- const APIVersion = "2018-06-01"
+ const APIVersion = "2018-09-30"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
@@ -573,7 +553,7 @@ func (client DisksClient) RevokeAccessPreparer(ctx context.Context, resourceGrou
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
}
- const APIVersion = "2018-06-01"
+ const APIVersion = "2018-09-30"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
@@ -595,10 +575,6 @@ func (client DisksClient) RevokeAccessSender(req *http.Request) (future DisksRev
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -646,7 +622,7 @@ func (client DisksClient) UpdatePreparer(ctx context.Context, resourceGroupName
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
}
- const APIVersion = "2018-06-01"
+ const APIVersion = "2018-09-30"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
@@ -670,10 +646,6 @@ func (client DisksClient) UpdateSender(req *http.Request) (future DisksUpdateFut
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-10-01/compute/galleries.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-03-01/compute/galleries.go
similarity index 97%
rename from vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-10-01/compute/galleries.go
rename to vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-03-01/compute/galleries.go
index bc55068685..15163b9d29 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-10-01/compute/galleries.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-03-01/compute/galleries.go
@@ -69,7 +69,7 @@ func (client GalleriesClient) CreateOrUpdatePreparer(ctx context.Context, resour
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
}
- const APIVersion = "2018-06-01"
+ const APIVersion = "2019-03-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
@@ -93,10 +93,6 @@ func (client GalleriesClient) CreateOrUpdateSender(req *http.Request) (future Ga
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -142,7 +138,7 @@ func (client GalleriesClient) DeletePreparer(ctx context.Context, resourceGroupN
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
}
- const APIVersion = "2018-06-01"
+ const APIVersion = "2019-03-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
@@ -164,10 +160,6 @@ func (client GalleriesClient) DeleteSender(req *http.Request) (future GalleriesD
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -218,7 +210,7 @@ func (client GalleriesClient) GetPreparer(ctx context.Context, resourceGroupName
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
}
- const APIVersion = "2018-06-01"
+ const APIVersion = "2019-03-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
@@ -281,7 +273,7 @@ func (client GalleriesClient) ListPreparer(ctx context.Context) (*http.Request,
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
}
- const APIVersion = "2018-06-01"
+ const APIVersion = "2019-03-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
@@ -374,7 +366,7 @@ func (client GalleriesClient) ListByResourceGroupPreparer(ctx context.Context, r
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
}
- const APIVersion = "2018-06-01"
+ const APIVersion = "2019-03-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-10-01/compute/galleryimages.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-03-01/compute/galleryimages.go
similarity index 97%
rename from vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-10-01/compute/galleryimages.go
rename to vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-03-01/compute/galleryimages.go
index 670ea7ee29..59c93b275d 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-10-01/compute/galleryimages.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-03-01/compute/galleryimages.go
@@ -85,7 +85,7 @@ func (client GalleryImagesClient) CreateOrUpdatePreparer(ctx context.Context, re
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
}
- const APIVersion = "2018-06-01"
+ const APIVersion = "2019-03-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
@@ -109,10 +109,6 @@ func (client GalleryImagesClient) CreateOrUpdateSender(req *http.Request) (futur
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -160,7 +156,7 @@ func (client GalleryImagesClient) DeletePreparer(ctx context.Context, resourceGr
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
}
- const APIVersion = "2018-06-01"
+ const APIVersion = "2019-03-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
@@ -182,10 +178,6 @@ func (client GalleryImagesClient) DeleteSender(req *http.Request) (future Galler
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -238,7 +230,7 @@ func (client GalleryImagesClient) GetPreparer(ctx context.Context, resourceGroup
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
}
- const APIVersion = "2018-06-01"
+ const APIVersion = "2019-03-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
@@ -306,7 +298,7 @@ func (client GalleryImagesClient) ListByGalleryPreparer(ctx context.Context, res
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
}
- const APIVersion = "2018-06-01"
+ const APIVersion = "2019-03-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-10-01/compute/galleryimageversions.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-03-01/compute/galleryimageversions.go
similarity index 97%
rename from vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-10-01/compute/galleryimageversions.go
rename to vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-03-01/compute/galleryimageversions.go
index d179443ade..24be8d551d 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-10-01/compute/galleryimageversions.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-03-01/compute/galleryimageversions.go
@@ -82,7 +82,7 @@ func (client GalleryImageVersionsClient) CreateOrUpdatePreparer(ctx context.Cont
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
}
- const APIVersion = "2018-06-01"
+ const APIVersion = "2019-03-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
@@ -106,10 +106,6 @@ func (client GalleryImageVersionsClient) CreateOrUpdateSender(req *http.Request)
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -159,7 +155,7 @@ func (client GalleryImageVersionsClient) DeletePreparer(ctx context.Context, res
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
}
- const APIVersion = "2018-06-01"
+ const APIVersion = "2019-03-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
@@ -181,10 +177,6 @@ func (client GalleryImageVersionsClient) DeleteSender(req *http.Request) (future
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -240,7 +232,7 @@ func (client GalleryImageVersionsClient) GetPreparer(ctx context.Context, resour
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
}
- const APIVersion = "2018-06-01"
+ const APIVersion = "2019-03-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
@@ -314,7 +306,7 @@ func (client GalleryImageVersionsClient) ListByGalleryImagePreparer(ctx context.
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
}
- const APIVersion = "2018-06-01"
+ const APIVersion = "2019-03-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-10-01/compute/images.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-03-01/compute/images.go
similarity index 96%
rename from vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-10-01/compute/images.go
rename to vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-03-01/compute/images.go
index 2afe53551f..a7a32d5524 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-10-01/compute/images.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-03-01/compute/images.go
@@ -68,7 +68,7 @@ func (client ImagesClient) CreateOrUpdatePreparer(ctx context.Context, resourceG
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
}
- const APIVersion = "2018-10-01"
+ const APIVersion = "2019-03-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
@@ -92,10 +92,6 @@ func (client ImagesClient) CreateOrUpdateSender(req *http.Request) (future Image
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -141,7 +137,7 @@ func (client ImagesClient) DeletePreparer(ctx context.Context, resourceGroupName
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
}
- const APIVersion = "2018-10-01"
+ const APIVersion = "2019-03-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
@@ -163,10 +159,6 @@ func (client ImagesClient) DeleteSender(req *http.Request) (future ImagesDeleteF
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -218,7 +210,7 @@ func (client ImagesClient) GetPreparer(ctx context.Context, resourceGroupName st
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
}
- const APIVersion = "2018-10-01"
+ const APIVersion = "2019-03-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
@@ -285,7 +277,7 @@ func (client ImagesClient) ListPreparer(ctx context.Context) (*http.Request, err
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
}
- const APIVersion = "2018-10-01"
+ const APIVersion = "2019-03-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
@@ -378,7 +370,7 @@ func (client ImagesClient) ListByResourceGroupPreparer(ctx context.Context, reso
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
}
- const APIVersion = "2018-10-01"
+ const APIVersion = "2019-03-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
@@ -467,7 +459,7 @@ func (client ImagesClient) UpdatePreparer(ctx context.Context, resourceGroupName
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
}
- const APIVersion = "2018-10-01"
+ const APIVersion = "2019-03-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
@@ -491,10 +483,6 @@ func (client ImagesClient) UpdateSender(req *http.Request) (future ImagesUpdateF
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-10-01/compute/loganalytics.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-03-01/compute/loganalytics.go
similarity index 96%
rename from vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-10-01/compute/loganalytics.go
rename to vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-03-01/compute/loganalytics.go
index f72c02202e..856ded45ab 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-10-01/compute/loganalytics.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-03-01/compute/loganalytics.go
@@ -74,7 +74,7 @@ func (client LogAnalyticsClient) ExportRequestRateByIntervalPreparer(ctx context
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
}
- const APIVersion = "2018-10-01"
+ const APIVersion = "2019-03-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
@@ -98,10 +98,6 @@ func (client LogAnalyticsClient) ExportRequestRateByIntervalSender(req *http.Req
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -153,7 +149,7 @@ func (client LogAnalyticsClient) ExportThrottledRequestsPreparer(ctx context.Con
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
}
- const APIVersion = "2018-10-01"
+ const APIVersion = "2019-03-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
@@ -177,10 +173,6 @@ func (client LogAnalyticsClient) ExportThrottledRequestsSender(req *http.Request
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-10-01/compute/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-03-01/compute/models.go
similarity index 96%
rename from vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-10-01/compute/models.go
rename to vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-03-01/compute/models.go
index 6499e4d052..cdb0aea0e6 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-10-01/compute/models.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-03-01/compute/models.go
@@ -34,11 +34,13 @@ const (
None AccessLevel = "None"
// Read ...
Read AccessLevel = "Read"
+ // Write ...
+ Write AccessLevel = "Write"
)
// PossibleAccessLevelValues returns an array of possible values for the AccessLevel const type.
func PossibleAccessLevelValues() []AccessLevel {
- return []AccessLevel{None, Read}
+ return []AccessLevel{None, Read, Write}
}
// AggregatedReplicationState enumerates the values for aggregated replication state.
@@ -258,11 +260,13 @@ const (
Import DiskCreateOption = "Import"
// Restore ...
Restore DiskCreateOption = "Restore"
+ // Upload ...
+ Upload DiskCreateOption = "Upload"
)
// PossibleDiskCreateOptionValues returns an array of possible values for the DiskCreateOption const type.
func PossibleDiskCreateOptionValues() []DiskCreateOption {
- return []DiskCreateOption{Attach, Copy, Empty, FromImage, Import, Restore}
+ return []DiskCreateOption{Attach, Copy, Empty, FromImage, Import, Restore, Upload}
}
// DiskCreateOptionTypes enumerates the values for disk create option types.
@@ -282,6 +286,29 @@ func PossibleDiskCreateOptionTypesValues() []DiskCreateOptionTypes {
return []DiskCreateOptionTypes{DiskCreateOptionTypesAttach, DiskCreateOptionTypesEmpty, DiskCreateOptionTypesFromImage}
}
+// DiskState enumerates the values for disk state.
+type DiskState string
+
+const (
+ // ActiveSAS ...
+ ActiveSAS DiskState = "ActiveSAS"
+ // ActiveUpload ...
+ ActiveUpload DiskState = "ActiveUpload"
+ // Attached ...
+ Attached DiskState = "Attached"
+ // ReadyToUpload ...
+ ReadyToUpload DiskState = "ReadyToUpload"
+ // Reserved ...
+ Reserved DiskState = "Reserved"
+ // Unattached ...
+ Unattached DiskState = "Unattached"
+)
+
+// PossibleDiskStateValues returns an array of possible values for the DiskState const type.
+func PossibleDiskStateValues() []DiskState {
+ return []DiskState{ActiveSAS, ActiveUpload, Attached, ReadyToUpload, Reserved, Unattached}
+}
+
// DiskStorageAccountTypes enumerates the values for disk storage account types.
type DiskStorageAccountTypes string
@@ -318,6 +345,21 @@ func PossibleHostCachingValues() []HostCaching {
return []HostCaching{HostCachingNone, HostCachingReadOnly, HostCachingReadWrite}
}
+// HyperVGeneration enumerates the values for hyper v generation.
+type HyperVGeneration string
+
+const (
+ // V1 ...
+ V1 HyperVGeneration = "V1"
+ // V2 ...
+ V2 HyperVGeneration = "V2"
+)
+
+// PossibleHyperVGenerationValues returns an array of possible values for the HyperVGeneration const type.
+func PossibleHyperVGenerationValues() []HyperVGeneration {
+ return []HyperVGeneration{V1, V2}
+}
+
// InstanceViewTypes enumerates the values for instance view types.
type InstanceViewTypes string
@@ -692,6 +734,21 @@ func PossibleStatusLevelTypesValues() []StatusLevelTypes {
return []StatusLevelTypes{Error, Info, Warning}
}
+// StorageAccountType enumerates the values for storage account type.
+type StorageAccountType string
+
+const (
+ // StorageAccountTypeStandardLRS ...
+ StorageAccountTypeStandardLRS StorageAccountType = "Standard_LRS"
+ // StorageAccountTypeStandardZRS ...
+ StorageAccountTypeStandardZRS StorageAccountType = "Standard_ZRS"
+)
+
+// PossibleStorageAccountTypeValues returns an array of possible values for the StorageAccountType const type.
+func PossibleStorageAccountTypeValues() []StorageAccountType {
+ return []StorageAccountType{StorageAccountTypeStandardLRS, StorageAccountTypeStandardZRS}
+}
+
// StorageAccountTypes enumerates the values for storage account types.
type StorageAccountTypes string
@@ -1181,7 +1238,7 @@ type AdditionalUnattendContent struct {
// APIEntityReference the API entity reference.
type APIEntityReference struct {
- // ID - The ARM resource id in the form of /subscriptions/{SubcriptionId}/resourceGroups/{ResourceGroupName}/...
+ // ID - The ARM resource id in the form of /subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/...
ID *string `json:"id,omitempty"`
}
@@ -1217,11 +1274,17 @@ type AutomaticOSUpgradePolicy struct {
DisableAutomaticRollback *bool `json:"disableAutomaticRollback,omitempty"`
}
+// AutomaticOSUpgradeProperties describes automatic OS upgrade properties on the image.
+type AutomaticOSUpgradeProperties struct {
+ // AutomaticOSUpgradeSupported - Specifies whether automatic OS upgrade is supported on the image.
+ AutomaticOSUpgradeSupported *bool `json:"automaticOSUpgradeSupported,omitempty"`
+}
+
// AvailabilitySet specifies information about the availability set that the virtual machine should be assigned to.
// Virtual machines specified in the same availability set are allocated to different nodes to maximize
// availability. For more information about availability sets, see [Manage the availability of virtual
// machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-manage-availability?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json).
-//
For more information on Azure planned maintainance, see [Planned maintenance for virtual machines in
+//
For more information on Azure planned maintenance, see [Planned maintenance for virtual machines in
// Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-planned-maintenance?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json)
//
Currently, a VM can only be added to availability set at creation time. An existing VM cannot be added
// to an availability set.
@@ -1529,9 +1592,8 @@ func (asu *AvailabilitySetUpdate) UnmarshalJSON(body []byte) error {
}
// BootDiagnostics boot Diagnostics is a debugging feature which allows you to view Console Output and Screenshot
-// to diagnose VM status.
For Linux Virtual Machines, you can easily view the output of your console log.
-//
For both Windows and Linux virtual machines, Azure also enables you to see a screenshot of the VM from
-// the hypervisor.
+// to diagnose VM status.
You can easily view the output of your console log.
Azure also enables
+// you to see a screenshot of the VM from the hypervisor.
type BootDiagnostics struct {
// Enabled - Whether boot diagnostics should be enabled on the Virtual Machine.
Enabled *bool `json:"enabled,omitempty"`
@@ -1545,6 +1607,8 @@ type BootDiagnosticsInstanceView struct {
ConsoleScreenshotBlobURI *string `json:"consoleScreenshotBlobUri,omitempty"`
// SerialConsoleLogBlobURI - The Linux serial console log blob Uri.
SerialConsoleLogBlobURI *string `json:"serialConsoleLogBlobUri,omitempty"`
+ // Status - The boot diagnostics status information for the VM.
NOTE: It will be set only if there are errors encountered in enabling boot diagnostics.
+ Status *InstanceViewStatus `json:"status,omitempty"`
}
// CloudError an error response from the Gallery service.
@@ -1671,7 +1735,7 @@ type ContainerServiceAgentPoolProfile struct {
VMSize ContainerServiceVMSizeTypes `json:"vmSize,omitempty"`
// DNSPrefix - DNS prefix to be used to create the FQDN for the agent pool.
DNSPrefix *string `json:"dnsPrefix,omitempty"`
- // Fqdn - FDQN for the agent pool.
+ // Fqdn - FQDN for the agent pool.
Fqdn *string `json:"fqdn,omitempty"`
}
@@ -1803,7 +1867,7 @@ type ContainerServiceMasterProfile struct {
Count *int32 `json:"count,omitempty"`
// DNSPrefix - DNS prefix to be used to create the FQDN for master.
DNSPrefix *string `json:"dnsPrefix,omitempty"`
- // Fqdn - FDQN for the master.
+ // Fqdn - FQDN for the master.
Fqdn *string `json:"fqdn,omitempty"`
}
@@ -1926,7 +1990,7 @@ type ContainerServiceWindowsProfile struct {
// CreationData data used when creating a disk.
type CreationData struct {
- // CreateOption - This enumerates the possible sources of a disk's creation. Possible values include: 'Empty', 'Attach', 'FromImage', 'Import', 'Copy', 'Restore'
+ // CreateOption - This enumerates the possible sources of a disk's creation. Possible values include: 'Empty', 'Attach', 'FromImage', 'Import', 'Copy', 'Restore', 'Upload'
CreateOption DiskCreateOption `json:"createOption,omitempty"`
// StorageAccountID - If createOption is Import, the Azure Resource Manager identifier of the storage account containing the blob to import as a disk. Required only if the blob is in a different subscription
StorageAccountID *string `json:"storageAccountId,omitempty"`
@@ -1968,14 +2032,14 @@ type DataDiskImage struct {
// DiagnosticsProfile specifies the boot diagnostic settings state.
Minimum api-version: 2015-06-15.
type DiagnosticsProfile struct {
- // BootDiagnostics - Boot Diagnostics is a debugging feature which allows you to view Console Output and Screenshot to diagnose VM status.
For Linux Virtual Machines, you can easily view the output of your console log.
For both Windows and Linux virtual machines, Azure also enables you to see a screenshot of the VM from the hypervisor.
+ // BootDiagnostics - Boot Diagnostics is a debugging feature which allows you to view Console Output and Screenshot to diagnose VM status.
You can easily view the output of your console log.
Azure also enables you to see a screenshot of the VM from the hypervisor.
BootDiagnostics *BootDiagnostics `json:"bootDiagnostics,omitempty"`
}
-// DiffDiskSettings describes the parameters of differencing disk settings that can be be specified for operating
-// system disk.
NOTE: The differencing disk settings can only be specified for managed disk.
+// DiffDiskSettings describes the parameters of ephemeral disk settings that can be specified for operating system
+// disk.
NOTE: The ephemeral disk settings can only be specified for managed disk.
type DiffDiskSettings struct {
- // Option - Specifies the differencing disk settings for operating system disk. Possible values include: 'Local'
+ // Option - Specifies the ephemeral disk settings for operating system disk. Possible values include: 'Local'
Option DiffDiskOptions `json:"option,omitempty"`
}
@@ -2263,18 +2327,22 @@ type DiskProperties struct {
TimeCreated *date.Time `json:"timeCreated,omitempty"`
// OsType - The Operating System type. Possible values include: 'Windows', 'Linux'
OsType OperatingSystemTypes `json:"osType,omitempty"`
+ // HyperVGeneration - The hypervisor generation of the Virtual Machine. Applicable to OS disks only. Possible values include: 'V1', 'V2'
+ HyperVGeneration HyperVGeneration `json:"hyperVGeneration,omitempty"`
// CreationData - Disk source information. CreationData information cannot be changed after the disk has been created.
CreationData *CreationData `json:"creationData,omitempty"`
// DiskSizeGB - If creationData.createOption is Empty, this field is mandatory and it indicates the size of the VHD to create. If this field is present for updates or creation with other options, it indicates a resize. Resizes are only allowed if the disk is not attached to a running VM, and can only increase the disk's size.
DiskSizeGB *int32 `json:"diskSizeGB,omitempty"`
- // EncryptionSettings - Encryption settings for disk or snapshot
- EncryptionSettings *EncryptionSettings `json:"encryptionSettings,omitempty"`
+ // EncryptionSettingsCollection - Encryption settings collection used for Azure Disk Encryption, can contain multiple encryption settings per disk or snapshot.
+ EncryptionSettingsCollection *EncryptionSettingsCollection `json:"encryptionSettingsCollection,omitempty"`
// ProvisioningState - The disk provisioning state.
ProvisioningState *string `json:"provisioningState,omitempty"`
// DiskIOPSReadWrite - The number of IOPS allowed for this disk; only settable for UltraSSD disks. One operation can transfer between 4k and 256k bytes.
DiskIOPSReadWrite *int64 `json:"diskIOPSReadWrite,omitempty"`
// DiskMBpsReadWrite - The bandwidth allowed for this disk; only settable for UltraSSD disks. MBps means millions of bytes per second - MB here uses the ISO notation, of powers of 10.
DiskMBpsReadWrite *int32 `json:"diskMBpsReadWrite,omitempty"`
+ // DiskState - The state of the disk. Possible values include: 'Unattached', 'Attached', 'Reserved', 'ActiveSAS', 'ReadyToUpload', 'ActiveUpload'
+ DiskState DiskState `json:"diskState,omitempty"`
}
// DisksCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
@@ -2484,21 +2552,27 @@ type DiskUpdateProperties struct {
OsType OperatingSystemTypes `json:"osType,omitempty"`
// DiskSizeGB - If creationData.createOption is Empty, this field is mandatory and it indicates the size of the VHD to create. If this field is present for updates or creation with other options, it indicates a resize. Resizes are only allowed if the disk is not attached to a running VM, and can only increase the disk's size.
DiskSizeGB *int32 `json:"diskSizeGB,omitempty"`
- // EncryptionSettings - Encryption settings for disk or snapshot
- EncryptionSettings *EncryptionSettings `json:"encryptionSettings,omitempty"`
+ // EncryptionSettingsCollection - Encryption settings collection used be Azure Disk Encryption, can contain multiple encryption settings per disk or snapshot.
+ EncryptionSettingsCollection *EncryptionSettingsCollection `json:"encryptionSettingsCollection,omitempty"`
// DiskIOPSReadWrite - The number of IOPS allowed for this disk; only settable for UltraSSD disks. One operation can transfer between 4k and 256k bytes.
DiskIOPSReadWrite *int64 `json:"diskIOPSReadWrite,omitempty"`
// DiskMBpsReadWrite - The bandwidth allowed for this disk; only settable for UltraSSD disks. MBps means millions of bytes per second - MB here uses the ISO notation, of powers of 10.
DiskMBpsReadWrite *int32 `json:"diskMBpsReadWrite,omitempty"`
}
-// EncryptionSettings encryption settings for disk or snapshot
-type EncryptionSettings struct {
+// EncryptionSettingsCollection encryption settings for disk or snapshot
+type EncryptionSettingsCollection struct {
// Enabled - Set this flag to true and provide DiskEncryptionKey and optional KeyEncryptionKey to enable encryption. Set this flag to false and remove DiskEncryptionKey and KeyEncryptionKey to disable encryption. If EncryptionSettings is null in the request object, the existing settings remain unchanged.
Enabled *bool `json:"enabled,omitempty"`
+ // EncryptionSettings - A collection of encryption settings, one for each disk volume.
+ EncryptionSettings *[]EncryptionSettingsElement `json:"encryptionSettings,omitempty"`
+}
+
+// EncryptionSettingsElement encryption settings for one disk volume.
+type EncryptionSettingsElement struct {
// DiskEncryptionKey - Key Vault Secret Url and vault id of the disk encryption key
DiskEncryptionKey *KeyVaultAndSecretReference `json:"diskEncryptionKey,omitempty"`
- // KeyEncryptionKey - Key Vault Key Url and vault id of the key encryption key
+ // KeyEncryptionKey - Key Vault Key Url and vault id of the key encryption key. KeyEncryptionKey is optional and when provided is used to unwrap the disk encryption key.
KeyEncryptionKey *KeyVaultAndKeyReference `json:"keyEncryptionKey,omitempty"`
}
@@ -2664,7 +2738,7 @@ func (g *Gallery) UnmarshalJSON(body []byte) error {
// GalleryArtifactPublishingProfileBase describes the basic gallery artifact publishing profile.
type GalleryArtifactPublishingProfileBase struct {
- // TargetRegions - The target regions where the Image Version is going to be replicated to. This property is updateable.
+ // TargetRegions - The target regions where the Image Version is going to be replicated to. This property is updatable.
TargetRegions *[]TargetRegion `json:"targetRegions,omitempty"`
Source *GalleryArtifactSource `json:"source,omitempty"`
}
@@ -2921,7 +2995,7 @@ func (page GalleryImageListPage) Values() []GalleryImage {
// GalleryImageProperties describes the properties of a gallery Image Definition.
type GalleryImageProperties struct {
- // Description - The description of this gallery Image Definition resource. This property is updateable.
+ // Description - The description of this gallery Image Definition resource. This property is updatable.
Description *string `json:"description,omitempty"`
// Eula - The Eula agreement for the gallery Image Definition.
Eula *string `json:"eula,omitempty"`
@@ -2933,7 +3007,7 @@ type GalleryImageProperties struct {
OsType OperatingSystemTypes `json:"osType,omitempty"`
// OsState - The allowed values for OS State are 'Generalized'. Possible values include: 'Generalized', 'Specialized'
OsState OperatingSystemStateTypes `json:"osState,omitempty"`
- // EndOfLifeDate - The end of life date of the gallery Image Definition. This property can be used for decommissioning purposes. This property is updateable.
+ // EndOfLifeDate - The end of life date of the gallery Image Definition. This property can be used for decommissioning purposes. This property is updatable.
EndOfLifeDate *date.Time `json:"endOfLifeDate,omitempty"`
Identifier *GalleryImageIdentifier `json:"identifier,omitempty"`
Recommended *RecommendedMachineConfiguration `json:"recommended,omitempty"`
@@ -3216,15 +3290,17 @@ type GalleryImageVersionProperties struct {
// GalleryImageVersionPublishingProfile the publishing profile of a gallery Image Version.
type GalleryImageVersionPublishingProfile struct {
- // ReplicaCount - The number of replicas of the Image Version to be created per region. This property would take effect for a region when regionalReplicaCount is not specified. This property is updateable.
+ // ReplicaCount - The number of replicas of the Image Version to be created per region. This property would take effect for a region when regionalReplicaCount is not specified. This property is updatable.
ReplicaCount *int32 `json:"replicaCount,omitempty"`
// ExcludeFromLatest - If set to true, Virtual Machines deployed from the latest version of the Image Definition won't use this Image Version.
ExcludeFromLatest *bool `json:"excludeFromLatest,omitempty"`
// PublishedDate - The timestamp for when the gallery Image Version is published.
PublishedDate *date.Time `json:"publishedDate,omitempty"`
- // EndOfLifeDate - The end of life date of the gallery Image Version. This property can be used for decommissioning purposes. This property is updateable.
+ // EndOfLifeDate - The end of life date of the gallery Image Version. This property can be used for decommissioning purposes. This property is updatable.
EndOfLifeDate *date.Time `json:"endOfLifeDate,omitempty"`
- // TargetRegions - The target regions where the Image Version is going to be replicated to. This property is updateable.
+ // StorageAccountType - Specifies the storage account type to be used to store the image. This property is not updatable. Possible values include: 'StorageAccountTypeStandardLRS', 'StorageAccountTypeStandardZRS'
+ StorageAccountType StorageAccountType `json:"storageAccountType,omitempty"`
+ // TargetRegions - The target regions where the Image Version is going to be replicated to. This property is updatable.
TargetRegions *[]TargetRegion `json:"targetRegions,omitempty"`
Source *GalleryArtifactSource `json:"source,omitempty"`
}
@@ -3400,7 +3476,7 @@ type GalleryOSDiskImage struct {
// GalleryProperties describes the properties of a Shared Image Gallery.
type GalleryProperties struct {
- // Description - The description of this Shared Image Gallery resource. This property is updateable.
+ // Description - The description of this Shared Image Gallery resource. This property is updatable.
Description *string `json:"description,omitempty"`
Identifier *GalleryIdentifier `json:"identifier,omitempty"`
// ProvisioningState - The provisioning state, which only appears in the response. Possible values include: 'ProvisioningStateCreating', 'ProvisioningStateUpdating', 'ProvisioningStateFailed', 'ProvisioningStateSucceeded', 'ProvisioningStateDeleting', 'ProvisioningStateMigrating'
@@ -3409,7 +3485,7 @@ type GalleryProperties struct {
// GrantAccessData data used for requesting a SAS.
type GrantAccessData struct {
- // Access - Possible values include: 'None', 'Read'
+ // Access - Possible values include: 'None', 'Read', 'Write'
Access AccessLevel `json:"access,omitempty"`
// DurationInSeconds - Time duration in seconds until the SAS access expires.
DurationInSeconds *int32 `json:"durationInSeconds,omitempty"`
@@ -3551,7 +3627,7 @@ type ImageDataDisk struct {
// ImageDiskReference the source image used for creating the disk.
type ImageDiskReference struct {
- // ID - A relative uri containing either a Platform Imgage Repository or user image reference.
+ // ID - A relative uri containing either a Platform Image Repository or user image reference.
ID *string `json:"id,omitempty"`
// Lun - If the disk is created from an image's data disk, this is an index that indicates which of the data disks in the image to use. For OS disks, this field is null.
Lun *int32 `json:"lun,omitempty"`
@@ -4106,7 +4182,7 @@ type LogAnalyticsInputBase struct {
ToTime *date.Time `json:"toTime,omitempty"`
// GroupByThrottlePolicy - Group query result by Throttle Policy applied.
GroupByThrottlePolicy *bool `json:"groupByThrottlePolicy,omitempty"`
- // GroupByOperationName - Group query result by by Operation Name.
+ // GroupByOperationName - Group query result by Operation Name.
GroupByOperationName *bool `json:"groupByOperationName,omitempty"`
// GroupByResourceName - Group query result by Resource Name.
GroupByResourceName *bool `json:"groupByResourceName,omitempty"`
@@ -4324,7 +4400,7 @@ type OSDisk struct {
Caching CachingTypes `json:"caching,omitempty"`
// WriteAcceleratorEnabled - Specifies whether writeAccelerator should be enabled or disabled on the disk.
WriteAcceleratorEnabled *bool `json:"writeAcceleratorEnabled,omitempty"`
- // DiffDiskSettings - Specifies the differencing Disk Settings for the operating system disk used by the virtual machine.
+ // DiffDiskSettings - Specifies the ephemeral Disk Settings for the operating system disk used by the virtual machine.
DiffDiskSettings *DiffDiskSettings `json:"diffDiskSettings,omitempty"`
// CreateOption - Specifies how the virtual machine should be created.
Possible values are:
**Attach** \u2013 This value is used when you are using a specialized disk to create the virtual machine.
**FromImage** \u2013 This value is used when you are using an image to create the virtual machine. If you are using a platform image, you also use the imageReference element described above. If you are using a marketplace image, you also use the plan element previously described. Possible values include: 'DiskCreateOptionTypesFromImage', 'DiskCreateOptionTypesEmpty', 'DiskCreateOptionTypesAttach'
CreateOption DiskCreateOptionTypes `json:"createOption,omitempty"`
@@ -4342,7 +4418,7 @@ type OSDiskImage struct {
// OSProfile specifies the operating system settings for the virtual machine.
type OSProfile struct {
- // ComputerName - Specifies the host OS name of the virtual machine.
**Max-length (Windows):** 15 characters
**Max-length (Linux):** 64 characters.
For naming conventions and restrictions see [Azure infrastructure services implementation guidelines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-infrastructure-subscription-accounts-guidelines?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json#1-naming-conventions).
+ // ComputerName - Specifies the host OS name of the virtual machine.
This name cannot be updated after the VM is created.
**Max-length (Windows):** 15 characters
**Max-length (Linux):** 64 characters.
For naming conventions and restrictions see [Azure infrastructure services implementation guidelines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-infrastructure-subscription-accounts-guidelines?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json#1-naming-conventions).
ComputerName *string `json:"computerName,omitempty"`
// AdminUsername - Specifies the name of the administrator account.
**Windows-only restriction:** Cannot end in "."
**Disallowed values:** "administrator", "admin", "user", "user1", "test", "user2", "test1", "user3", "admin1", "1", "123", "a", "actuser", "adm", "admin2", "aspnet", "backup", "console", "david", "guest", "john", "owner", "root", "server", "sql", "support", "support_388945a0", "sys", "test2", "test3", "user4", "user5".
**Minimum-length (Linux):** 1 character
**Max-length (Linux):** 64 characters
**Max-length (Windows):** 20 characters