provider/azurerm: Bumped AzureRM/compute SDK to v8.1.0-beta

This commit is contained in:
Brandon Tosch 2017-03-01 17:10:27 -08:00
parent d1bca91cee
commit 637915337f
19 changed files with 375 additions and 67 deletions

View File

@ -8,6 +8,7 @@ import (
"net/http/httputil"
"github.com/Azure/azure-sdk-for-go/arm/cdn"
"github.com/Azure/azure-sdk-for-go/arm/compute"
"github.com/Azure/azure-sdk-for-go/arm/containerregistry"
"github.com/Azure/azure-sdk-for-go/arm/containerservice"
"github.com/Azure/azure-sdk-for-go/arm/eventhub"
@ -24,7 +25,6 @@ import (
"github.com/Azure/go-autorest/autorest/azure"
"github.com/hashicorp/terraform/terraform"
riviera "github.com/jen20/riviera/azure"
"github.com/mcardosos/azure-sdk-for-go/arm/compute"
)
// ArmClient contains the handles to all the specific Azure Resource Manager

View File

@ -5,9 +5,9 @@ import (
"log"
"net/http"
"github.com/Azure/azure-sdk-for-go/arm/compute"
"github.com/hashicorp/terraform/helper/schema"
"github.com/jen20/riviera/azure"
"github.com/mcardosos/azure-sdk-for-go/arm/compute"
)
func resourceArmAvailabilitySet() *schema.Resource {

View File

@ -9,11 +9,11 @@ import (
"net/url"
"strings"
"github.com/Azure/azure-sdk-for-go/arm/compute"
"github.com/hashicorp/terraform/helper/hashcode"
"github.com/hashicorp/terraform/helper/schema"
"github.com/hashicorp/terraform/helper/validation"
riviera "github.com/jen20/riviera/azure"
"github.com/mcardosos/azure-sdk-for-go/arm/compute"
)
func resourceArmVirtualMachine() *schema.Resource {

View File

@ -6,8 +6,8 @@ import (
"net/http"
"reflect"
"github.com/Azure/azure-sdk-for-go/arm/compute"
"github.com/hashicorp/terraform/helper/schema"
"github.com/mcardosos/azure-sdk-for-go/arm/compute"
)
func resourceArmVirtualMachineExtensions() *schema.Resource {

View File

@ -7,9 +7,9 @@ import (
"log"
"net/http"
"github.com/Azure/azure-sdk-for-go/arm/compute"
"github.com/hashicorp/terraform/helper/hashcode"
"github.com/hashicorp/terraform/helper/schema"
"github.com/mcardosos/azure-sdk-for-go/arm/compute"
)
func resourceArmVirtualMachineScaleSet() *schema.Resource {

View File

@ -6,10 +6,10 @@ import (
"strings"
"testing"
"github.com/Azure/azure-sdk-for-go/arm/compute"
"github.com/hashicorp/terraform/helper/acctest"
"github.com/hashicorp/terraform/helper/resource"
"github.com/hashicorp/terraform/terraform"
"github.com/mcardosos/azure-sdk-for-go/arm/compute"
)
func TestAccAzureRMVirtualMachine_basicLinuxMachine(t *testing.T) {

View File

@ -14,7 +14,7 @@ package compute
// See the License for the specific language governing permissions and
// limitations under the License.
//
// Code generated by Microsoft (R) AutoRest Code Generator 1.0.0.0
// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.

View File

@ -1,5 +1,5 @@
// Package compute implements the Azure ARM Compute service API version
// 2016-03-30.
// 2016-04-30-preview.
//
// The Compute Management Client.
package compute
@ -18,7 +18,7 @@ package compute
// See the License for the specific language governing permissions and
// limitations under the License.
//
// Code generated by Microsoft (R) AutoRest Code Generator 1.0.0.0
// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.
@ -28,7 +28,7 @@ import (
const (
// APIVersion is the version of the Compute
APIVersion = "2016-03-30"
APIVersion = "2016-04-30-preview"
// DefaultBaseURI is the default URI used for the service Compute
DefaultBaseURI = "https://management.azure.com"

View File

@ -14,7 +14,7 @@ package compute
// See the License for the specific language governing permissions and
// limitations under the License.
//
// Code generated by Microsoft (R) AutoRest Code Generator 1.0.0.0
// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.
@ -66,6 +66,19 @@ const (
InstanceView InstanceViewTypes = "instanceView"
)
// OperatingSystemStateTypes enumerates the values for operating system state
// types.
type OperatingSystemStateTypes string
const (
// Generalized specifies the generalized state for operating system state
// types.
Generalized OperatingSystemStateTypes = "Generalized"
// Specialized specifies the specialized state for operating system state
// types.
Specialized OperatingSystemStateTypes = "Specialized"
)
// OperatingSystemTypes enumerates the values for operating system types.
type OperatingSystemTypes string
@ -117,6 +130,16 @@ const (
Warning StatusLevelTypes = "Warning"
)
// StorageAccountTypes enumerates the values for storage account types.
type StorageAccountTypes string
const (
// PremiumLRS specifies the premium lrs state for storage account types.
PremiumLRS StorageAccountTypes = "Premium_LRS"
// StandardLRS specifies the standard lrs state for storage account types.
StandardLRS StorageAccountTypes = "Standard_LRS"
)
// UpgradeMode enumerates the values for upgrade mode.
type UpgradeMode string
@ -374,6 +397,7 @@ type AvailabilitySet struct {
Location *string `json:"location,omitempty"`
Tags *map[string]*string `json:"tags,omitempty"`
*AvailabilitySetProperties `json:"properties,omitempty"`
Sku *Sku `json:"sku,omitempty"`
}
// AvailabilitySetListResult is the List Availability Set operation response.
@ -388,6 +412,7 @@ type AvailabilitySetProperties struct {
PlatformFaultDomainCount *int32 `json:"platformFaultDomainCount,omitempty"`
VirtualMachines *[]SubResource `json:"virtualMachines,omitempty"`
Statuses *[]InstanceViewStatus `json:"statuses,omitempty"`
Managed *bool `json:"managed,omitempty"`
}
// BootDiagnostics is describes Boot Diagnostics.
@ -405,13 +430,14 @@ type BootDiagnosticsInstanceView struct {
// DataDisk is describes a data disk.
type DataDisk struct {
Lun *int32 `json:"lun,omitempty"`
Name *string `json:"name,omitempty"`
Vhd *VirtualHardDisk `json:"vhd,omitempty"`
Image *VirtualHardDisk `json:"image,omitempty"`
Caching CachingTypes `json:"caching,omitempty"`
CreateOption DiskCreateOptionTypes `json:"createOption,omitempty"`
DiskSizeGB *int32 `json:"diskSizeGB,omitempty"`
Lun *int32 `json:"lun,omitempty"`
Name *string `json:"name,omitempty"`
Vhd *VirtualHardDisk `json:"vhd,omitempty"`
Image *VirtualHardDisk `json:"image,omitempty"`
Caching CachingTypes `json:"caching,omitempty"`
CreateOption DiskCreateOptionTypes `json:"createOption,omitempty"`
DiskSizeGB *int32 `json:"diskSizeGB,omitempty"`
ManagedDisk *ManagedDiskParameters `json:"managedDisk,omitempty"`
}
// DataDiskImage is contains the data disk images information.
@ -442,14 +468,79 @@ type HardwareProfile struct {
VMSize VirtualMachineSizeTypes `json:"vmSize,omitempty"`
}
// Image is describes an Image.
type Image struct {
autorest.Response `json:"-"`
ID *string `json:"id,omitempty"`
Name *string `json:"name,omitempty"`
Type *string `json:"type,omitempty"`
Location *string `json:"location,omitempty"`
Tags *map[string]*string `json:"tags,omitempty"`
*ImageProperties `json:"properties,omitempty"`
}
// ImageDataDisk is describes a data disk.
type ImageDataDisk struct {
Lun *int32 `json:"lun,omitempty"`
Snapshot *SubResource `json:"snapshot,omitempty"`
ManagedDisk *SubResource `json:"managedDisk,omitempty"`
BlobURI *string `json:"blobUri,omitempty"`
Caching CachingTypes `json:"caching,omitempty"`
DiskSizeGB *int32 `json:"diskSizeGB,omitempty"`
}
// ImageListResult is the List Image operation response.
type ImageListResult struct {
autorest.Response `json:"-"`
Value *[]Image `json:"value,omitempty"`
NextLink *string `json:"nextLink,omitempty"`
}
// ImageListResultPreparer prepares a request to retrieve the next set of results. It returns
// nil if no more results exist.
func (client ImageListResult) ImageListResultPreparer() (*http.Request, error) {
if client.NextLink == nil || len(to.String(client.NextLink)) <= 0 {
return nil, nil
}
return autorest.Prepare(&http.Request{},
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(client.NextLink)))
}
// ImageOSDisk is describes an Operating System disk.
type ImageOSDisk struct {
OsType OperatingSystemTypes `json:"osType,omitempty"`
OsState OperatingSystemStateTypes `json:"osState,omitempty"`
Snapshot *SubResource `json:"snapshot,omitempty"`
ManagedDisk *SubResource `json:"managedDisk,omitempty"`
BlobURI *string `json:"blobUri,omitempty"`
Caching CachingTypes `json:"caching,omitempty"`
DiskSizeGB *int32 `json:"diskSizeGB,omitempty"`
}
// ImageProperties is describes the properties of an Image.
type ImageProperties struct {
SourceVirtualMachine *SubResource `json:"sourceVirtualMachine,omitempty"`
StorageProfile *ImageStorageProfile `json:"storageProfile,omitempty"`
ProvisioningState *string `json:"provisioningState,omitempty"`
}
// ImageReference is the image reference.
type ImageReference struct {
ID *string `json:"id,omitempty"`
Publisher *string `json:"publisher,omitempty"`
Offer *string `json:"offer,omitempty"`
Sku *string `json:"sku,omitempty"`
Version *string `json:"version,omitempty"`
}
// ImageStorageProfile is describes a storage profile.
type ImageStorageProfile struct {
OsDisk *ImageOSDisk `json:"osDisk,omitempty"`
DataDisks *[]ImageDataDisk `json:"dataDisks,omitempty"`
}
// InnerError is inner error details.
type InnerError struct {
Exceptiontype *string `json:"exceptiontype,omitempty"`
@ -520,6 +611,12 @@ type LongRunningOperationProperties struct {
Output *map[string]interface{} `json:"output,omitempty"`
}
// ManagedDiskParameters is the parameters of a managed disk.
type ManagedDiskParameters struct {
ID *string `json:"id,omitempty"`
StorageAccountType StorageAccountTypes `json:"storageAccountType,omitempty"`
}
// NetworkInterfaceReference is describes a network interface reference.
type NetworkInterfaceReference struct {
ID *string `json:"id,omitempty"`
@ -557,6 +654,7 @@ type OSDisk struct {
Caching CachingTypes `json:"caching,omitempty"`
CreateOption DiskCreateOptionTypes `json:"createOption,omitempty"`
DiskSizeGB *int32 `json:"diskSizeGB,omitempty"`
ManagedDisk *ManagedDiskParameters `json:"managedDisk,omitempty"`
}
// OSDiskImage is contains the os disk image information.
@ -631,6 +729,11 @@ type SubResource struct {
ID *string `json:"id,omitempty"`
}
// SubResourceReadOnly is
type SubResourceReadOnly struct {
ID *string `json:"id,omitempty"`
}
// UpgradePolicy is describes an upgrade policy - automatic or manual.
type UpgradePolicy struct {
Mode UpgradeMode `json:"mode,omitempty"`
@ -854,9 +957,21 @@ type VirtualMachineScaleSet struct {
Location *string `json:"location,omitempty"`
Tags *map[string]*string `json:"tags,omitempty"`
Sku *Sku `json:"sku,omitempty"`
Plan *Plan `json:"plan,omitempty"`
*VirtualMachineScaleSetProperties `json:"properties,omitempty"`
}
// VirtualMachineScaleSetDataDisk is describes a virtual machine scale set data
// disk.
type VirtualMachineScaleSetDataDisk struct {
Name *string `json:"name,omitempty"`
Lun *int32 `json:"lun,omitempty"`
Caching CachingTypes `json:"caching,omitempty"`
CreateOption DiskCreateOptionTypes `json:"createOption,omitempty"`
DiskSizeGB *int32 `json:"diskSizeGB,omitempty"`
ManagedDisk *VirtualMachineScaleSetManagedDiskParameters `json:"managedDisk,omitempty"`
}
// VirtualMachineScaleSetExtension is describes a Virtual Machine Scale Set
// Extension.
type VirtualMachineScaleSetExtension struct {
@ -975,6 +1090,12 @@ func (client VirtualMachineScaleSetListWithLinkResult) VirtualMachineScaleSetLis
autorest.WithBaseURL(to.String(client.NextLink)))
}
// VirtualMachineScaleSetManagedDiskParameters is describes the parameters of a
// ScaleSet managed disk.
type VirtualMachineScaleSetManagedDiskParameters struct {
StorageAccountType StorageAccountTypes `json:"storageAccountType,omitempty"`
}
// VirtualMachineScaleSetNetworkConfiguration is describes a virtual machine
// scale set network profile's network configurations.
type VirtualMachineScaleSetNetworkConfiguration struct {
@ -999,12 +1120,13 @@ type VirtualMachineScaleSetNetworkProfile struct {
// VirtualMachineScaleSetOSDisk is describes a virtual machine scale set
// operating system disk.
type VirtualMachineScaleSetOSDisk struct {
Name *string `json:"name,omitempty"`
Caching CachingTypes `json:"caching,omitempty"`
CreateOption DiskCreateOptionTypes `json:"createOption,omitempty"`
OsType OperatingSystemTypes `json:"osType,omitempty"`
Image *VirtualHardDisk `json:"image,omitempty"`
VhdContainers *[]string `json:"vhdContainers,omitempty"`
Name *string `json:"name,omitempty"`
Caching CachingTypes `json:"caching,omitempty"`
CreateOption DiskCreateOptionTypes `json:"createOption,omitempty"`
OsType OperatingSystemTypes `json:"osType,omitempty"`
Image *VirtualHardDisk `json:"image,omitempty"`
VhdContainers *[]string `json:"vhdContainers,omitempty"`
ManagedDisk *VirtualMachineScaleSetManagedDiskParameters `json:"managedDisk,omitempty"`
}
// VirtualMachineScaleSetOSProfile is describes a virtual machine scale set OS
@ -1026,6 +1148,7 @@ type VirtualMachineScaleSetProperties struct {
VirtualMachineProfile *VirtualMachineScaleSetVMProfile `json:"virtualMachineProfile,omitempty"`
ProvisioningState *string `json:"provisioningState,omitempty"`
Overprovision *bool `json:"overprovision,omitempty"`
SinglePlacementGroup *bool `json:"singlePlacementGroup,omitempty"`
}
// VirtualMachineScaleSetSku is describes an available virtual machine scale
@ -1047,8 +1170,9 @@ type VirtualMachineScaleSetSkuCapacity struct {
// VirtualMachineScaleSetStorageProfile is describes a virtual machine scale
// set storage profile.
type VirtualMachineScaleSetStorageProfile struct {
ImageReference *ImageReference `json:"imageReference,omitempty"`
OsDisk *VirtualMachineScaleSetOSDisk `json:"osDisk,omitempty"`
ImageReference *ImageReference `json:"imageReference,omitempty"`
OsDisk *VirtualMachineScaleSetOSDisk `json:"osDisk,omitempty"`
DataDisks *[]VirtualMachineScaleSetDataDisk `json:"dataDisks,omitempty"`
}
// VirtualMachineScaleSetVM is describes a virtual machine scale set virtual
@ -1098,6 +1222,7 @@ type VirtualMachineScaleSetVMInstanceView struct {
Extensions *[]VirtualMachineExtensionInstanceView `json:"extensions,omitempty"`
BootDiagnostics *BootDiagnosticsInstanceView `json:"bootDiagnostics,omitempty"`
Statuses *[]InstanceViewStatus `json:"statuses,omitempty"`
PlacementGroupID *string `json:"placementGroupId,omitempty"`
}
// VirtualMachineScaleSetVMListResult is the List Virtual Machine Scale Set VMs

View File

@ -14,7 +14,7 @@ package compute
// See the License for the specific language governing permissions and
// limitations under the License.
//
// Code generated by Microsoft (R) AutoRest Code Generator 1.0.0.0
// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.

View File

@ -14,7 +14,7 @@ package compute
// See the License for the specific language governing permissions and
// limitations under the License.
//
// Code generated by Microsoft (R) AutoRest Code Generator 1.0.0.0
// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.
@ -26,7 +26,7 @@ import (
const (
major = "8"
minor = "0"
minor = "1"
patch = "0"
tag = "beta"
userAgentFormat = "Azure-SDK-For-Go/%s arm-%s/%s"
@ -41,7 +41,7 @@ var (
// UserAgent returns the UserAgent string to use when sending http.Requests.
func UserAgent() string {
if userAgent == "" {
userAgent = fmt.Sprintf(userAgentFormat, Version(), "compute", "2016-03-30")
userAgent = fmt.Sprintf(userAgentFormat, Version(), "compute", "2016-04-30-preview")
}
return userAgent
}

View File

@ -14,7 +14,7 @@ package compute
// See the License for the specific language governing permissions and
// limitations under the License.
//
// Code generated by Microsoft (R) AutoRest Code Generator 1.0.0.0
// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.

View File

@ -14,7 +14,7 @@ package compute
// See the License for the specific language governing permissions and
// limitations under the License.
//
// Code generated by Microsoft (R) AutoRest Code Generator 1.0.0.0
// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.

View File

@ -14,7 +14,7 @@ package compute
// See the License for the specific language governing permissions and
// limitations under the License.
//
// Code generated by Microsoft (R) AutoRest Code Generator 1.0.0.0
// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.

View File

@ -14,7 +14,7 @@ package compute
// See the License for the specific language governing permissions and
// limitations under the License.
//
// Code generated by Microsoft (R) AutoRest Code Generator 1.0.0.0
// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.
@ -121,6 +121,74 @@ func (client VirtualMachinesClient) CaptureResponder(resp *http.Response) (resul
return
}
// ConvertToManagedDisks converts virtual machine disks from blob-based to
// managed disks. Virtual machine must be stop-deallocated before invoking this
// operation. This method may poll for completion. Polling can be canceled by
// passing the cancel channel argument. The channel will be used to cancel
// polling and any outstanding HTTP requests.
//
// resourceGroupName is the name of the resource group. vmName is the name of
// the virtual machine.
func (client VirtualMachinesClient) ConvertToManagedDisks(resourceGroupName string, vmName string, cancel <-chan struct{}) (result autorest.Response, err error) {
req, err := client.ConvertToManagedDisksPreparer(resourceGroupName, vmName, cancel)
if err != nil {
return result, autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "ConvertToManagedDisks", nil, "Failure preparing request")
}
resp, err := client.ConvertToManagedDisksSender(req)
if err != nil {
result.Response = resp
return result, autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "ConvertToManagedDisks", resp, "Failure sending request")
}
result, err = client.ConvertToManagedDisksResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "ConvertToManagedDisks", resp, "Failure responding to request")
}
return
}
// ConvertToManagedDisksPreparer prepares the ConvertToManagedDisks request.
func (client VirtualMachinesClient) ConvertToManagedDisksPreparer(resourceGroupName string, vmName string, cancel <-chan struct{}) (*http.Request, error) {
pathParameters := map[string]interface{}{
"resourceGroupName": autorest.Encode("path", resourceGroupName),
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
"vmName": autorest.Encode("path", vmName),
}
queryParameters := map[string]interface{}{
"api-version": client.APIVersion,
}
preparer := autorest.CreatePreparer(
autorest.AsPost(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/convertToManagedDisks", pathParameters),
autorest.WithQueryParameters(queryParameters))
return preparer.Prepare(&http.Request{Cancel: cancel})
}
// ConvertToManagedDisksSender sends the ConvertToManagedDisks request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualMachinesClient) ConvertToManagedDisksSender(req *http.Request) (*http.Response, error) {
return autorest.SendWithSender(client,
req,
azure.DoPollForAsynchronous(client.PollingDelay))
}
// ConvertToManagedDisksResponder handles the response to the ConvertToManagedDisks request. The method always
// closes the http.Response Body.
func (client VirtualMachinesClient) ConvertToManagedDisksResponder(resp *http.Response) (result autorest.Response, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted),
autorest.ByClosing())
result.Response = resp
return
}
// CreateOrUpdate the operation to create or update a virtual machine. This
// method may poll for completion. Polling can be canceled by passing the
// cancel channel argument. The channel will be used to cancel polling and any
@ -145,8 +213,6 @@ func (client VirtualMachinesClient) CreateOrUpdate(resourceGroupName string, vmN
{Target: "parameters.VirtualMachineProperties.StorageProfile.OsDisk.EncryptionSettings.KeyEncryptionKey.SourceVault", Name: validation.Null, Rule: true, Chain: nil},
}},
}},
{Target: "parameters.VirtualMachineProperties.StorageProfile.OsDisk.Name", Name: validation.Null, Rule: true, Chain: nil},
{Target: "parameters.VirtualMachineProperties.StorageProfile.OsDisk.Vhd", Name: validation.Null, Rule: true, Chain: nil},
}},
}},
}}}}}); err != nil {

View File

@ -14,7 +14,7 @@ package compute
// See the License for the specific language governing permissions and
// limitations under the License.
//
// Code generated by Microsoft (R) AutoRest Code Generator 1.0.0.0
// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.
@ -50,19 +50,6 @@ func NewVirtualMachineScaleSetsClientWithBaseURI(baseURI string, subscriptionID
// resourceGroupName is the name of the resource group. name is the name of the
// VM scale set to create or update. parameters is the scale set object.
func (client VirtualMachineScaleSetsClient) CreateOrUpdate(resourceGroupName string, name string, parameters VirtualMachineScaleSet, cancel <-chan struct{}) (result autorest.Response, err error) {
if err := validation.Validate([]validation.Validation{
{TargetValue: parameters,
Constraints: []validation.Constraint{{Target: "parameters.VirtualMachineScaleSetProperties", Name: validation.Null, Rule: false,
Chain: []validation.Constraint{{Target: "parameters.VirtualMachineScaleSetProperties.VirtualMachineProfile", Name: validation.Null, Rule: false,
Chain: []validation.Constraint{{Target: "parameters.VirtualMachineScaleSetProperties.VirtualMachineProfile.StorageProfile", Name: validation.Null, Rule: false,
Chain: []validation.Constraint{{Target: "parameters.VirtualMachineScaleSetProperties.VirtualMachineProfile.StorageProfile.OsDisk", Name: validation.Null, Rule: false,
Chain: []validation.Constraint{{Target: "parameters.VirtualMachineScaleSetProperties.VirtualMachineProfile.StorageProfile.OsDisk.Name", Name: validation.Null, Rule: true, Chain: nil}}},
}},
}},
}}}}}); err != nil {
return result, validation.NewErrorWithValidationError(err, "compute.VirtualMachineScaleSetsClient", "CreateOrUpdate")
}
req, err := client.CreateOrUpdatePreparer(resourceGroupName, name, parameters, cancel)
if err != nil {
return result, autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "CreateOrUpdate", nil, "Failure preparing request")
@ -867,6 +854,74 @@ func (client VirtualMachineScaleSetsClient) ReimageResponder(resp *http.Response
return
}
// ReimageAll reimages all the disks ( including data disks ) in the virtual
// machines in a virtual machine scale set. This operation is only supported
// for managed disks. This method may poll for completion. Polling can be
// canceled by passing the cancel channel argument. The channel will be used to
// cancel polling and any outstanding HTTP requests.
//
// resourceGroupName is the name of the resource group. vmScaleSetName is the
// name of the VM scale set.
func (client VirtualMachineScaleSetsClient) ReimageAll(resourceGroupName string, vmScaleSetName string, cancel <-chan struct{}) (result autorest.Response, err error) {
req, err := client.ReimageAllPreparer(resourceGroupName, vmScaleSetName, cancel)
if err != nil {
return result, autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "ReimageAll", nil, "Failure preparing request")
}
resp, err := client.ReimageAllSender(req)
if err != nil {
result.Response = resp
return result, autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "ReimageAll", resp, "Failure sending request")
}
result, err = client.ReimageAllResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "ReimageAll", resp, "Failure responding to request")
}
return
}
// ReimageAllPreparer prepares the ReimageAll request.
func (client VirtualMachineScaleSetsClient) ReimageAllPreparer(resourceGroupName string, vmScaleSetName string, cancel <-chan struct{}) (*http.Request, error) {
pathParameters := map[string]interface{}{
"resourceGroupName": autorest.Encode("path", resourceGroupName),
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
"vmScaleSetName": autorest.Encode("path", vmScaleSetName),
}
queryParameters := map[string]interface{}{
"api-version": client.APIVersion,
}
preparer := autorest.CreatePreparer(
autorest.AsPost(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/reimageall", pathParameters),
autorest.WithQueryParameters(queryParameters))
return preparer.Prepare(&http.Request{Cancel: cancel})
}
// ReimageAllSender sends the ReimageAll request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualMachineScaleSetsClient) ReimageAllSender(req *http.Request) (*http.Response, error) {
return autorest.SendWithSender(client,
req,
azure.DoPollForAsynchronous(client.PollingDelay))
}
// ReimageAllResponder handles the response to the ReimageAll request. The method always
// closes the http.Response Body.
func (client VirtualMachineScaleSetsClient) ReimageAllResponder(resp *http.Response) (result autorest.Response, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted),
autorest.ByClosing())
result.Response = resp
return
}
// Restart restarts one or more virtual machines in a VM scale set. This method
// may poll for completion. Polling can be canceled by passing the cancel
// channel argument. The channel will be used to cancel polling and any

View File

@ -14,7 +14,7 @@ package compute
// See the License for the specific language governing permissions and
// limitations under the License.
//
// Code generated by Microsoft (R) AutoRest Code Generator 1.0.0.0
// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.
@ -549,6 +549,76 @@ func (client VirtualMachineScaleSetVMsClient) ReimageResponder(resp *http.Respon
return
}
// ReimageAll allows you to re-image all the disks ( including data disks ) in
// the a virtual machine scale set instance. This operation is only supported
// for managed disks. This method may poll for completion. Polling can be
// canceled by passing the cancel channel argument. The channel will be used to
// cancel polling and any outstanding HTTP requests.
//
// resourceGroupName is the name of the resource group. vmScaleSetName is the
// name of the VM scale set. instanceID is the instance ID of the virtual
// machine.
func (client VirtualMachineScaleSetVMsClient) ReimageAll(resourceGroupName string, vmScaleSetName string, instanceID string, cancel <-chan struct{}) (result autorest.Response, err error) {
req, err := client.ReimageAllPreparer(resourceGroupName, vmScaleSetName, instanceID, cancel)
if err != nil {
return result, autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsClient", "ReimageAll", nil, "Failure preparing request")
}
resp, err := client.ReimageAllSender(req)
if err != nil {
result.Response = resp
return result, autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsClient", "ReimageAll", resp, "Failure sending request")
}
result, err = client.ReimageAllResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsClient", "ReimageAll", resp, "Failure responding to request")
}
return
}
// ReimageAllPreparer prepares the ReimageAll request.
func (client VirtualMachineScaleSetVMsClient) ReimageAllPreparer(resourceGroupName string, vmScaleSetName string, instanceID string, cancel <-chan struct{}) (*http.Request, error) {
pathParameters := map[string]interface{}{
"instanceId": autorest.Encode("path", instanceID),
"resourceGroupName": autorest.Encode("path", resourceGroupName),
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
"vmScaleSetName": autorest.Encode("path", vmScaleSetName),
}
queryParameters := map[string]interface{}{
"api-version": client.APIVersion,
}
preparer := autorest.CreatePreparer(
autorest.AsPost(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/reimageall", pathParameters),
autorest.WithQueryParameters(queryParameters))
return preparer.Prepare(&http.Request{Cancel: cancel})
}
// ReimageAllSender sends the ReimageAll request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualMachineScaleSetVMsClient) ReimageAllSender(req *http.Request) (*http.Response, error) {
return autorest.SendWithSender(client,
req,
azure.DoPollForAsynchronous(client.PollingDelay))
}
// ReimageAllResponder handles the response to the ReimageAll request. The method always
// closes the http.Response Body.
func (client VirtualMachineScaleSetVMsClient) ReimageAllResponder(resp *http.Response) (result autorest.Response, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted),
autorest.ByClosing())
result.Response = resp
return
}
// Restart restarts a virtual machine in a VM scale set. This method may poll
// for completion. Polling can be canceled by passing the cancel channel
// argument. The channel will be used to cancel polling and any outstanding

View File

@ -14,7 +14,7 @@ package compute
// See the License for the specific language governing permissions and
// limitations under the License.
//
// Code generated by Microsoft (R) AutoRest Code Generator 1.0.0.0
// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.

22
vendor/vendor.json vendored
View File

@ -23,15 +23,15 @@
"version": "v8.0.1-beta",
"versionExact": "v8.0.1-beta"
},
/*{
"checksumSHA1": "+w9njWehvjvkFK4JHAEtTgvmVgE=",
{
"checksumSHA1": "xOt4xQmO/KFcJYjQ678DL5ynub4=",
"comment": "v2.1.1-beta-8-gca4d906",
"path": "github.com/Azure/azure-sdk-for-go/arm/compute",
"revision": "8e625d1702a32d01cef05a9252198d231c4af113",
"revisionTime": "2017-02-08T01:01:20Z",
"version": "v8.0.1-beta",
"versionExact": "v8.0.1-beta"
},*/
"revision": "ecf40e315d5ab0ca6d7b3b7f7fbb5c1577814813",
"revisionTime": "2017-03-02T00:14:02Z",
"version": "v8.1.0-beta",
"versionExact": "v8.1.0-beta"
},
{
"checksumSHA1": "JbbZWArn6iqSs+neT5X8AxxH6o0=",
"comment": "v2.1.1-beta-8-gca4d906",
@ -2347,14 +2347,6 @@
"path": "github.com/maximilien/softlayer-go/softlayer",
"revision": "85659debe44fab5792fc92cf755c04b115b9dc19"
},
{
"checksumSHA1": "MJ2PfEAmNJ0/H+uFcNYKWdiQIiM=",
"path": "github.com/mcardosos/azure-sdk-for-go/arm/compute",
"revision": "a7cd8005acf2eb9ffa8298450616e042370c22bc",
"revisionTime": "2017-02-28T01:51:47Z",
"version": "=v8.1.0-beta",
"versionExact": "v8.1.0-beta"
},
{
"checksumSHA1": "GSum+utW01N3KeMdvAPnsW0TemM=",
"path": "github.com/michaelklishin/rabbit-hole",