Documentation ¶
Overview ¶
Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the Apache v2.0 License.
Index ¶
- type Service
- type VirtualHardDiskClient
- func (c *VirtualHardDiskClient) CreateOrUpdate(ctx context.Context, group, container, name string, ...) (*storage.VirtualHardDisk, error)
- func (c *VirtualHardDiskClient) Delete(ctx context.Context, group, container, name string) error
- func (c *VirtualHardDiskClient) DownloadVhdFromHttp(ctx context.Context, group, container, name string, ...) (*storage.VirtualHardDisk, error)
- func (c *VirtualHardDiskClient) Get(ctx context.Context, group, container, name string) (*[]storage.VirtualHardDisk, error)
- func (c *VirtualHardDiskClient) Hydrate(ctx context.Context, group, container, name string, ...) (*storage.VirtualHardDisk, error)
- func (c *VirtualHardDiskClient) Precheck(ctx context.Context, group, container string, vhds []*storage.VirtualHardDisk) (bool, error)
- func (c *VirtualHardDiskClient) Resize(ctx context.Context, group, container, name string, newSize int64) error
- func (c *VirtualHardDiskClient) Upload(ctx context.Context, group, container, name string, targetUrl string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Service ¶
type Service interface { Get(context.Context, string, string, string) (*[]storage.VirtualHardDisk, error) Hydrate(context.Context, string, string, string, *storage.VirtualHardDisk) (*storage.VirtualHardDisk, error) CreateOrUpdate(context.Context, string, string, string, *storage.VirtualHardDisk, string, common.ImageSource) (*storage.VirtualHardDisk, error) Delete(context.Context, string, string, string) error Precheck(context.Context, string, string, []*storage.VirtualHardDisk) (bool, error) Upload(context.Context, string, string, *storage.VirtualHardDisk, string) error }
Service interface
type VirtualHardDiskClient ¶
type VirtualHardDiskClient struct { storage.BaseClient // contains filtered or unexported fields }
Client structure
func NewVirtualHardDiskClient ¶
func NewVirtualHardDiskClient(cloudFQDN string, authorizer auth.Authorizer) (*VirtualHardDiskClient, error)
NewClient method returns new client
func (*VirtualHardDiskClient) CreateOrUpdate ¶
func (c *VirtualHardDiskClient) CreateOrUpdate(ctx context.Context, group, container, name string, storage *storage.VirtualHardDisk) (*storage.VirtualHardDisk, error)
CreateOrUpdate methods invokes create or update on the client
func (*VirtualHardDiskClient) Delete ¶
func (c *VirtualHardDiskClient) Delete(ctx context.Context, group, container, name string) error
Delete methods invokes delete of the storage resource
func (*VirtualHardDiskClient) DownloadVhdFromHttp ¶ added in v0.22.1
func (c *VirtualHardDiskClient) DownloadVhdFromHttp(ctx context.Context, group, container, name string, storage *storage.VirtualHardDisk, azHttpImg *compute.AzureGalleryImageProperties) (*storage.VirtualHardDisk, error)
func (*VirtualHardDiskClient) Get ¶
func (c *VirtualHardDiskClient) Get(ctx context.Context, group, container, name string) (*[]storage.VirtualHardDisk, error)
Get methods invokes the client Get method
func (*VirtualHardDiskClient) Hydrate ¶ added in v0.25.1
func (c *VirtualHardDiskClient) Hydrate(ctx context.Context, group, container, name string, storage *storage.VirtualHardDisk) (*storage.VirtualHardDisk, error)
The entry point for the hydrate call takes the group name, container name and the name of the disk file. The group is standard input for every call. Ultimately, we need the full path on disk to the disk file which we assemble from the path of the container plus the file name of the disk. (e.g. "C:\ClusterStorage\Userdata_1\abc123" for the container path and "my_disk.vhd" for the disk name)
func (*VirtualHardDiskClient) Precheck ¶ added in v0.19.1
func (c *VirtualHardDiskClient) Precheck(ctx context.Context, group, container string, vhds []*storage.VirtualHardDisk) (bool, error)
Prechecks whether the system is able to create specified virtual hard disks. Returns true with virtual hard disk placement in mapping from virtual hard disk names to container names; or false with reason in error message.