client

package
v1.11.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 31, 2026 License: MPL-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const (
	HTTPAddrEnvName         = "CLOUDTEMPLE_HTTP_ADDR"
	HTTPSchemeEnvName       = "CLOUDTEMPLE_HTTP_SCHEME"
	HTTPClientIDEnvName     = "CLOUDTEMPLE_CLIENT_ID"
	HTTPClientSecretEnvName = "CLOUDTEMPLE_SECRET_ID"
	HTTPTimeoutEnvName      = "CLOUDTEMPLE_HTTP_TIMEOUT"
	FastReadTimeoutEnvName  = "CLOUDTEMPLE_FAST_READ_TIMEOUT"
)

Variables

This section is empty.

Functions

func IsTransientActivityFailure added in v1.8.0

func IsTransientActivityFailure(err error) bool

IsTransientActivityFailure reports whether err is an activity that reached the "failed" state for a reason known to be transient platform-side.

Types

type ACL added in v1.5.0

type ACL struct {
	ID   string
	Name string
	Role string
}

type ACLClient added in v1.5.0

type ACLClient struct {
	// contains filtered or unexported fields
}

func (*ACLClient) ListByBucket added in v1.5.0

func (c *ACLClient) ListByBucket(ctx context.Context, bucketName string) ([]*ACL, error)

ListByBucket récupère tous les storage accounts qui ont accès à un bucket spécifique

func (*ACLClient) ListByStorageAccount added in v1.5.0

func (c *ACLClient) ListByStorageAccount(ctx context.Context, storageAccountName string) ([]*ACL, error)

ListByStorageAccount récupère tous les buckets auxquels un storage account a accès

type ACLEntryClient added in v1.5.0

type ACLEntryClient struct {
	// contains filtered or unexported fields
}

func (*ACLEntryClient) Grant added in v1.5.0

func (c *ACLEntryClient) Grant(ctx context.Context, bucket, role, storageAccount string) (string, error)

func (*ACLEntryClient) Revoke added in v1.5.0

func (c *ACLEntryClient) Revoke(ctx context.Context, bucket, role, storageAccount string) (string, error)

type Activity

type Activity struct {
	ID             string
	TenantId       string
	Description    string
	Type           string
	Tags           []string
	CreationDate   time.Time
	ConcernedItems []ActivityConcernedItem
	State          map[string]ActivityState
}

type ActivityClient

type ActivityClient struct {
	// contains filtered or unexported fields
}

func (*ActivityClient) List

func (c *ActivityClient) List(ctx context.Context, filter *struct{}) ([]*Activity, error)

func (*ActivityClient) Read

func (c *ActivityClient) Read(ctx context.Context, id string) (*Activity, error)

func (*ActivityClient) WaitForCompletion

func (c *ActivityClient) WaitForCompletion(ctx context.Context, id string, options *WaiterOptions) (*Activity, error)

type ActivityCompletionError added in v0.2.2

type ActivityCompletionError struct {
	// contains filtered or unexported fields
}

func (*ActivityCompletionError) Error added in v0.2.2

func (a *ActivityCompletionError) Error() string

type ActivityConcernedItem

type ActivityConcernedItem struct {
	ID   string
	Type string
}

type ActivityState

type ActivityState struct {
	StartDate   string
	StopDate    string
	Reason      string
	Result      string
	Progression float64
}

type AssignmentClient

type AssignmentClient struct {
	// contains filtered or unexported fields
}

func (*AssignmentClient) List

func (a *AssignmentClient) List(ctx context.Context, userId, tenantId, roleId string) ([]*TenantAssignment, error)

type AssociateReplicationPolicyToVirtualMachineRequest added in v1.3.0

type AssociateReplicationPolicyToVirtualMachineRequest struct {
	ConfigurationID string `json:"configurationId"`
}

type Backup added in v0.15.0

type Backup struct {
	ID                      string
	InternalID              string
	Mode                    string
	IsVirtualMachineDeleted bool
	Size                    int
	Timestamp               int
	VirtualMachine          BaseObject
	Policy                  BaseObject
}

type BackupAssignVirtualDiskRequest added in v0.6.0

type BackupAssignVirtualDiskRequest struct {
	VirtualDiskId string   `json:"virtualDiskId"`
	SLAPolicies   []string `json:"slaPolicies"`
}

type BackupAssignVirtualMachineRequest added in v0.2.0

type BackupAssignVirtualMachineRequest struct {
	VirtualMachineIds []string `json:"virtualMachineIds"`
	SLAPolicies       []string `json:"slaPolicies"`
}

type BackupBackupClient

type BackupBackupClient struct {
	// contains filtered or unexported fields
}

type BackupClient

type BackupClient struct {
	// contains filtered or unexported fields
}

func (*BackupClient) Backup

func (c *BackupClient) Backup() *BackupBackupClient

func (*BackupClient) Job

func (c *BackupClient) Job() *BackupJobClient

func (*BackupClient) JobSession

func (c *BackupClient) JobSession() *BackupJobSessionClient

func (*BackupClient) Metrics

func (c *BackupClient) Metrics() *BackupMetricsClient

func (*BackupClient) OpenIaaS added in v0.15.0

func (c *BackupClient) OpenIaaS() *BackupOpenIaasClient

func (*BackupClient) SLAPolicy

func (c *BackupClient) SLAPolicy() *BackupSLAPolicyClient

func (*BackupClient) SPPServer

func (c *BackupClient) SPPServer() *BackupSPPServerClient

func (*BackupClient) Site

func (c *BackupClient) Site() *BackupSiteClient

func (*BackupClient) Storage

func (c *BackupClient) Storage() *BackupStorageClient

func (*BackupClient) VCenter

func (c *BackupClient) VCenter() *BackupVCenterClient

func (*BackupClient) VirtualDisk added in v0.14.0

func (c *BackupClient) VirtualDisk() *BackupVirtualDiskClient

func (*BackupClient) VirtualMachine added in v0.6.0

func (c *BackupClient) VirtualMachine() *BackupVirtualMachineClient

type BackupJob

type BackupJob struct {
	ID          string
	Name        string
	DisplayName string
	Type        string
	Status      string
	PolicyId    string
}

type BackupJobClient

type BackupJobClient struct {
	// contains filtered or unexported fields
}

func (*BackupJobClient) List

func (c *BackupJobClient) List(ctx context.Context, filter *BackupJobFilter) ([]*BackupJob, error)

func (*BackupJobClient) Read

func (c *BackupJobClient) Read(ctx context.Context, id string) (*BackupJob, error)

func (*BackupJobClient) Run added in v0.2.0

func (*BackupJobClient) WaitForCompletion added in v0.2.0

func (c *BackupJobClient) WaitForCompletion(ctx context.Context, id string, options *WaiterOptions) (*BackupJob, error)

type BackupJobCompletionError added in v0.3.0

type BackupJobCompletionError struct {
	// contains filtered or unexported fields
}

func (*BackupJobCompletionError) Error added in v0.3.0

func (b *BackupJobCompletionError) Error() string

type BackupJobFilter added in v0.2.0

type BackupJobFilter struct {
	Type string
}

type BackupJobRunRequest added in v0.2.0

type BackupJobRunRequest struct {
	JobId    string `json:"jobId"`
	PolicyId string `json:"policyId,omitempty"`
}

type BackupJobSession

type BackupJobSession struct {
	ID            string
	JobName       string
	SlaPolicyType string
	JobId         string
	Type          string
	Duration      int
	Start         int
	End           int
	Status        string
	Statistics    BackupStatistics
	SLAPolicies   []*BackupSLAPolicyStub
}

type BackupJobSessionClient

type BackupJobSessionClient struct {
	// contains filtered or unexported fields
}

func (*BackupJobSessionClient) List

func (c *BackupJobSessionClient) List(ctx context.Context, filter *struct{}) ([]*BackupJobSession, error)

type BackupMetricsClient

type BackupMetricsClient struct {
	// contains filtered or unexported fields
}

func (*BackupMetricsClient) Coverage

func (*BackupMetricsClient) History

func (*BackupMetricsClient) Platform

func (*BackupMetricsClient) PlatformCPU

func (*BackupMetricsClient) Policies

func (*BackupMetricsClient) VirtualMachines

type BackupMetricsCoverage

type BackupMetricsCoverage struct {
	FailedResources      int
	ProtectedResources   int
	UnprotectedResources int
	TotalResources       int
}

type BackupMetricsHistory

type BackupMetricsHistory struct {
	TotalRuns     int
	SucessPercent float64
	Failed        int
	Warning       int
	Success       int
	Running       int
}

type BackupMetricsPlatform

type BackupMetricsPlatform struct {
	Version        string
	Build          string
	Date           string
	Product        string
	Epoch          int
	DeploymentType string
}

type BackupMetricsPlatformCPU

type BackupMetricsPlatformCPU struct {
	CPUUtil int
}

type BackupMetricsPolicies

type BackupMetricsPolicies struct {
	Name                string
	TriggerType         string
	NumberOfProtectedVM int
}

type BackupMetricsVirtualMachines

type BackupMetricsVirtualMachines struct {
	InSPP               int
	InCompute           int
	WithBackup          int
	InSLA               int
	InOffloadingSLA     int
	TSMOffloadingFactor int
}

type BackupOpenIaasAssignPolicyRequest added in v0.15.0

type BackupOpenIaasAssignPolicyRequest struct {
	VirtualMachineId string   `json:"virtualMachineId"`
	PolicyIds        []string `json:"policyIds"`
}

type BackupOpenIaasBackupClient added in v0.15.0

type BackupOpenIaasBackupClient struct {
	// contains filtered or unexported fields
}

func (*BackupOpenIaasBackupClient) List added in v0.15.0

func (*BackupOpenIaasBackupClient) Read added in v0.15.0

type BackupOpenIaasClient added in v0.15.0

type BackupOpenIaasClient struct {
	// contains filtered or unexported fields
}

func (*BackupOpenIaasClient) Backup added in v0.15.0

func (*BackupOpenIaasClient) Policy added in v0.15.0

type BackupOpenIaasPolicy added in v0.15.0

type BackupOpenIaasPolicy struct {
	ID              string
	Name            string
	InternalID      string
	Running         bool
	Mode            string
	MachineManager  BaseObject
	VirtualMachines []string
	Schedulers      []struct {
		TemporarilyDisabled bool
		Retention           int
		Cron                string
		Timezone            string
	}
}

type BackupOpenIaasPolicyClient added in v0.15.0

type BackupOpenIaasPolicyClient struct {
	// contains filtered or unexported fields
}

func (*BackupOpenIaasPolicyClient) Assign added in v0.15.0

func (*BackupOpenIaasPolicyClient) List added in v0.15.0

func (*BackupOpenIaasPolicyClient) Read added in v0.15.0

type BackupOpenIaasPolicyFilter added in v1.0.0

type BackupOpenIaasPolicyFilter struct {
	Name             string `filter:"name"`
	MachineManagerId string `filter:"machineManagerId"`
	VirtualMachineId string `filter:"virtualMachineId"`
}

type BackupSLAPolicy

type BackupSLAPolicy struct {
	ID          string
	Name        string
	SubPolicies []*BackupSLASubPolicy
}

type BackupSLAPolicyClient

type BackupSLAPolicyClient struct {
	// contains filtered or unexported fields
}

func (*BackupSLAPolicyClient) AssignVirtualDisk added in v0.6.0

func (*BackupSLAPolicyClient) AssignVirtualMachine added in v0.2.0

func (*BackupSLAPolicyClient) List

func (*BackupSLAPolicyClient) Read

type BackupSLAPolicyFilter added in v0.2.0

type BackupSLAPolicyFilter struct {
	VirtualMachineId string `filter:"virtualMachineId"`
	VirtualDiskId    string `filter:"virtualDiskId"`
}

type BackupSLAPolicyRetention

type BackupSLAPolicyRetention struct {
	Age int
}

type BackupSLAPolicyStub

type BackupSLAPolicyStub struct {
	ID   string
	Name string
	HREF string
}

type BackupSLAPolicyTarget

type BackupSLAPolicyTarget struct {
	ID           string
	Href         string
	ResourceType string
}

type BackupSLAPolicyTrigger

type BackupSLAPolicyTrigger struct {
	Frequency    int
	Type         string
	ActivateDate int
}

type BackupSLASubPolicy

type BackupSLASubPolicy struct {
	Type          string
	UseEncryption bool
	Software      bool
	Site          string
	Retention     BackupSLAPolicyRetention
	Trigger       BackupSLAPolicyTrigger
	Target        BackupSLAPolicyTarget
}

type BackupSPPServer

type BackupSPPServer struct {
	ID      string
	Name    string
	Address string
}

type BackupSPPServerClient

type BackupSPPServerClient struct {
	// contains filtered or unexported fields
}

func (*BackupSPPServerClient) List

func (*BackupSPPServerClient) Read

type BackupSPPServerFilter added in v1.0.0

type BackupSPPServerFilter struct {
	TenantId string `filter:"tenantId"`
}

type BackupSite

type BackupSite struct {
	ID   string
	Name string
}

type BackupSiteClient

type BackupSiteClient struct {
	// contains filtered or unexported fields
}

func (*BackupSiteClient) List

func (c *BackupSiteClient) List(ctx context.Context) ([]*BackupSite, error)

type BackupStatistics

type BackupStatistics struct {
	Total   int
	Success int
	Failed  int
	Skipped int
}

type BackupStorage

type BackupStorage struct {
	ID               string
	ResourceType     string
	Type             string
	Site             string
	Name             string
	StorageId        string
	HostAddress      string
	PortNumber       int
	SSLConnection    bool
	InitializeStatus string
	Version          string
	IsReady          bool
	Capacity         BackupStorageCapacity
}

type BackupStorageCapacity

type BackupStorageCapacity struct {
	Free       int
	Total      int
	UpdateTime int
}

type BackupStorageClient

type BackupStorageClient struct {
	// contains filtered or unexported fields
}

func (*BackupStorageClient) List

type BackupVCenter

type BackupVCenter struct {
	ID          string
	InternalId  int
	InstanceId  string
	SppServerId string
	Name        string
}

type BackupVCenterClient

type BackupVCenterClient struct {
	// contains filtered or unexported fields
}

func (*BackupVCenterClient) List

type BackupVCenterFilter added in v1.0.0

type BackupVCenterFilter struct {
	SppServerId string `filter:"sppServerId"`
}

type BackupVirtualDisk added in v0.14.0

type BackupVirtualDisk struct {
	ID               string
	Name             string
	InternalId       string
	InstanceId       string
	SPPServerId      string
	VirtualMachineId string
}

type BackupVirtualDiskClient added in v0.14.0

type BackupVirtualDiskClient struct {
	// contains filtered or unexported fields
}

func (*BackupVirtualDiskClient) Read added in v0.14.0

func (*BackupVirtualDiskClient) WaitForInventory added in v0.14.0

func (c *BackupVirtualDiskClient) WaitForInventory(ctx context.Context, id string, options *WaiterOptions) (*BackupVirtualDisk, error)

type BackupVirtualDiskNotFoundError added in v0.14.0

type BackupVirtualDiskNotFoundError struct {
	// contains filtered or unexported fields
}

func (*BackupVirtualDiskNotFoundError) Error added in v0.14.0

type BackupVirtualMachine added in v0.6.0

type BackupVirtualMachine struct {
	ID                string
	Name              string
	Moref             string
	InternalId        string
	InternalVCenterId int
	VCenterId         string
	Href              string
	MetadataPath      string
	StorageProfiles   []string
	DatacenterName    string
	Volumes           []BackupVirtualMachineVolume
}

type BackupVirtualMachineClient added in v0.6.0

type BackupVirtualMachineClient struct {
	// contains filtered or unexported fields
}

func (*BackupVirtualMachineClient) Read added in v0.6.0

func (*BackupVirtualMachineClient) WaitForInventory added in v0.7.0

func (c *BackupVirtualMachineClient) WaitForInventory(ctx context.Context, id string, options *WaiterOptions) (*BackupVirtualMachine, error)

type BackupVirtualMachineNotFoundError added in v0.7.0

type BackupVirtualMachineNotFoundError struct {
	// contains filtered or unexported fields
}

func (*BackupVirtualMachineNotFoundError) Error added in v0.7.0

type BackupVirtualMachineVolume added in v0.6.0

type BackupVirtualMachineVolume struct {
	Name         string
	Key          string
	Size         int
	ConfigVolume bool
}

type BaseObject added in v0.15.0

type BaseObject struct {
	ID   string
	Name string
}

type BootOptions

type BootOptions struct {
	// Every attribute is a pointer or omitempty: the matching schema
	// attributes are Optional+Computed, so only an explicitly configured
	// value is write intent — an absent value is omitted from the payload
	// while explicit zero values (boot_delay = 0, booleans false) stay
	// expressible (#264 plan, Lot D + FF-4).
	BootDelay            *int   `json:"bootDelay,omitempty"`
	BootRetryDelay       *int   `json:"bootRetryDelay,omitempty"`
	BootRetryEnabled     *bool  `json:"bootRetryEnabled,omitempty"`
	EnterBIOSSetup       *bool  `json:"enterBIOSSetup,omitempty"`
	Firmware             string `json:"firmware,omitempty"`
	EFISecureBootEnabled *bool  `json:"efiSecureBootEnabled,omitempty"`
}

type Bucket added in v1.5.0

type Bucket struct {
	ID        string
	Name      string
	Namespace string
	// AccessType is refreshed from the API so an out-of-band change made in the
	// console (e.g. custom -> private) surfaces as Terraform drift (#490). The
	// explicit json tag is deliberate: this field is state-critical, so it must
	// not rely on encoding/json implicit case-insensitive matching.
	AccessType      string `json:"accessType"`
	RetentionPeriod int64
	Versioning      string
	Endpoint        string
	TotalSize       string
	TotalSizeUnit   string
	TotalObjects    int64
	Tags            []struct {
		Key   string
		Value string
	}
	TotalObjectsDeleted string
	TotalSizeDeleted    string
}

type BucketACLEntry added in v1.5.0

type BucketACLEntry struct {
	ID   string
	Name string
	Role string
}

type BucketClient added in v1.5.0

type BucketClient struct {
	// contains filtered or unexported fields
}

func (*BucketClient) Create added in v1.5.0

func (c *BucketClient) Create(ctx context.Context, req *CreateBucketRequest) (string, error)

func (*BucketClient) Delete added in v1.5.0

func (c *BucketClient) Delete(ctx context.Context, name string) (string, error)

func (*BucketClient) List added in v1.5.0

func (c *BucketClient) List(ctx context.Context) ([]*Bucket, error)

func (*BucketClient) ListACLEntries added in v1.5.0

func (c *BucketClient) ListACLEntries(ctx context.Context, bucket string) ([]*BucketACLEntry, error)

func (*BucketClient) ListStrict added in v1.8.0

func (c *BucketClient) ListStrict(ctx context.Context) ([]*Bucket, error)

ListStrict behaves like List but requires a complete HTTP 200 answer: 206 is a partial listing and cannot prove an absence, and any other code (including 403) is an error rather than being mapped to an empty result. Callers using the listing as state-safety evidence must fail closed on anything else (#281).

func (*BucketClient) Read added in v1.5.0

func (c *BucketClient) Read(ctx context.Context, name string) (*Bucket, error)

func (*BucketClient) UpdateVersioning added in v1.5.0

func (c *BucketClient) UpdateVersioning(ctx context.Context, name string, req *UpdateVersioningRequest) (string, error)

func (*BucketClient) UpdateWhitelist added in v1.5.0

func (c *BucketClient) UpdateWhitelist(ctx context.Context, name string, req *UpdateWhitelistRequest) (string, error)

type BucketFile added in v1.5.0

type BucketFile struct {
	Key          string
	LastModified string
	Size         int64
	Tags         []struct {
		Key   string
		Value string
	}
	Versions []BucketFileVersion
}

type BucketFileVersion added in v1.5.0

type BucketFileVersion struct {
	VersionID      string
	IsLatest       bool
	LastModified   string
	Size           int64
	IsDeleteMarker bool
}

type BucketFilesClient added in v1.5.0

type BucketFilesClient struct {
	// contains filtered or unexported fields
}

func (*BucketFilesClient) List added in v1.5.0

func (c *BucketFilesClient) List(ctx context.Context, bucketName string, filter *BucketFilesFilter) ([]*BucketFile, error)

type BucketFilesFilter added in v1.5.0

type BucketFilesFilter struct {
	FolderPath string `filter:"folderPath"`
}

type ChangeVMNetworkAdapterRequest added in v1.10.0

type ChangeVMNetworkAdapterRequest struct {
	NetworkID string `json:"networkId"`
	IPAddress string `json:"ipAddress,omitempty"`
}

ChangeVMNetworkAdapterRequest is the body of PATCH .../{nicID} (change-network). Only the target network (and an optional VPC static IP) can change; deviceIndex is immutable.

type Client

type Client struct {
	SavedToken *jwt.Token

	UserAgent string
	// contains filtered or unexported fields
}

func NewClient

func NewClient(config *Config) (*Client, error)

func (*Client) Activity

func (c *Client) Activity() *ActivityClient

func (*Client) Backup

func (c *Client) Backup() *BackupClient

func (*Client) Compute

func (c *Client) Compute() *ComputeClient

func (*Client) IAM

func (c *Client) IAM() *IAM

func (*Client) JWT added in v1.0.0

func (c *Client) JWT(ctx context.Context) (*jwt.Token, error)

func (*Client) Marketplace added in v1.4.0

func (c *Client) Marketplace() *MarketplaceClient

func (*Client) ObjectStorage added in v1.5.0

func (c *Client) ObjectStorage() *ObjectStorage

func (*Client) PublicCloudVM added in v1.10.0

func (c *Client) PublicCloudVM() *PublicCloudVMClient

PublicCloudVM returns the Public Cloud VM Instances sub-client.

func (*Client) Tag

func (c *Client) Tag() *TagClient

func (*Client) Token

func (c *Client) Token(ctx context.Context) (*LoginToken, error)

func (*Client) VPC added in v1.8.0

func (c *Client) VPC() *VPCClient

VPC returns the VPC sub-client root.

type CloneVirtualMachineRequest added in v0.2.0

type CloneVirtualMachineRequest struct {
	Name              string `json:"name"`
	VirtualMachineId  string `json:"-"`
	PowerOn           bool   `json:"powerOn,omitempty"`
	DatacenterId      string `json:"datacenterId,omitempty"`
	HostClusterId     string `json:"hostClusterId,omitempty"`
	HostId            string `json:"hostId,omitempty"`
	DatatoreClusterId string `json:"datastoreClusterId,omitempty"`
	DatastoreId       string `json:"datastoreId,omitempty"`
}

type CloudInit added in v0.16.0

type CloudInit struct {
	CloudConfig   string `json:"cloudConfig,omitempty"`
	NetworkConfig string `json:"networkConfig,omitempty"`
}

type Company

type Company struct {
	ID   string
	Name string
}

type CompanyClient

type CompanyClient struct {
	// contains filtered or unexported fields
}

func (*CompanyClient) Read

func (c *CompanyClient) Read(ctx context.Context, companyID string) (*Company, error)

type ComputeClient

type ComputeClient struct {
	// contains filtered or unexported fields
}

func (*ComputeClient) ContentLibrary

func (c *ComputeClient) ContentLibrary() *ContentLibraryClient

func (*ComputeClient) Datastore

func (c *ComputeClient) Datastore() *DatastoreClient

func (*ComputeClient) DatastoreCluster

func (c *ComputeClient) DatastoreCluster() *DatastoreClusterClient

func (*ComputeClient) Folder

func (c *ComputeClient) Folder() *FolderClient

func (*ComputeClient) GuestOperatingSystem

func (c *ComputeClient) GuestOperatingSystem() *GuestOperatingSystemClient

func (*ComputeClient) Host

func (c *ComputeClient) Host() *HostClient

func (*ComputeClient) HostCluster

func (c *ComputeClient) HostCluster() *HostClusterClient

func (*ComputeClient) Network

func (c *ComputeClient) Network() *NetworkClient

func (*ComputeClient) NetworkAdapter

func (c *ComputeClient) NetworkAdapter() *NetworkAdapterClient

func (*ComputeClient) OpenIaaS added in v0.15.0

func (c *ComputeClient) OpenIaaS() *ComputeOpenIaaSClient

func (*ComputeClient) ResourcePool

func (c *ComputeClient) ResourcePool() *ResourcePoolClient

func (*ComputeClient) Snapshot

func (c *ComputeClient) Snapshot() *SnapshotClient

func (*ComputeClient) VirtualController

func (c *ComputeClient) VirtualController() *VirtualControllerClient

func (*ComputeClient) VirtualDatacenter

func (c *ComputeClient) VirtualDatacenter() *VirtualDatacenterClient

func (*ComputeClient) VirtualDisk

func (c *ComputeClient) VirtualDisk() *VirtualDiskClient

func (*ComputeClient) VirtualMachine

func (c *ComputeClient) VirtualMachine() *VirtualMachineClient

func (*ComputeClient) VirtualSwitch

func (c *ComputeClient) VirtualSwitch() *VirtualSwitchClient

func (*ComputeClient) Worker

func (c *ComputeClient) Worker() *WorkerClient

type ComputeContentLibraryItemDeployRequest added in v0.3.0

type ComputeContentLibraryItemDeployRequest struct {
	ContentLibraryId      string          `json:"-"`
	ContentLibraryItemId  string          `json:"contentLibraryItemId"`
	Name                  string          `json:"name"`
	HostClusterId         string          `json:"hostClusterId,omitempty"`
	HostId                string          `json:"hostId,omitempty"`
	DatastoreId           string          `json:"datastoreId,"`
	DatacenterId          string          `json:"datacenterId,omitempty"`
	PowerOn               bool            `json:"powerOn,omitempty"`
	DisksProvisioningType string          `json:"disksProvisioningType,omitempty"`
	DeployOptions         []*DeployOption `json:"deployOptions,omitempty"`
	NetworkData           []*NetworkData  `json:"networkData,omitempty"`
}

type ComputeOpenIaaSClient added in v0.15.0

type ComputeOpenIaaSClient struct {
	// contains filtered or unexported fields
}

func (*ComputeOpenIaaSClient) Host added in v0.15.0

func (*ComputeOpenIaaSClient) MachineManager added in v0.15.0

func (*ComputeOpenIaaSClient) Network added in v0.15.0

func (*ComputeOpenIaaSClient) NetworkAdapter added in v0.15.0

func (*ComputeOpenIaaSClient) Pool added in v0.15.0

func (*ComputeOpenIaaSClient) Replication added in v1.3.0

func (*ComputeOpenIaaSClient) Snapshot added in v0.15.0

func (*ComputeOpenIaaSClient) StorageRepository added in v0.15.0

func (*ComputeOpenIaaSClient) Template added in v0.15.0

func (*ComputeOpenIaaSClient) VirtualDisk added in v0.15.0

func (*ComputeOpenIaaSClient) VirtualMachine added in v0.15.0

type ComputeOpenIaaSReplicationClient added in v1.3.0

type ComputeOpenIaaSReplicationClient struct {
	// contains filtered or unexported fields
}

func (*ComputeOpenIaaSReplicationClient) Policy added in v1.3.0

type ComputeOpenIaaSReplicationPolicyClient added in v1.3.0

type ComputeOpenIaaSReplicationPolicyClient struct {
	// contains filtered or unexported fields
}

func (*ComputeOpenIaaSReplicationPolicyClient) Create added in v1.3.0

func (*ComputeOpenIaaSReplicationPolicyClient) Delete added in v1.3.0

func (*ComputeOpenIaaSReplicationPolicyClient) List added in v1.3.0

func (*ComputeOpenIaaSReplicationPolicyClient) ListStrict added in v1.8.0

ListStrict behaves like List but requires a complete 200 answer: callers using the listing as EVIDENCE for state-shrinking decisions must fail closed on access-denied or partial answers (#275 doctrine, FF-5).

func (*ComputeOpenIaaSReplicationPolicyClient) Read added in v1.3.0

func (*ComputeOpenIaaSReplicationPolicyClient) VirtualMachine added in v1.3.0

type ComputeOpenIaaSReplicationPolicyVirtualMachineClient added in v1.3.0

type ComputeOpenIaaSReplicationPolicyVirtualMachineClient struct {
	// contains filtered or unexported fields
}

func (*ComputeOpenIaaSReplicationPolicyVirtualMachineClient) Associate added in v1.3.0

func (*ComputeOpenIaaSReplicationPolicyVirtualMachineClient) Dissociate added in v1.3.0

func (*ComputeOpenIaaSReplicationPolicyVirtualMachineClient) Read added in v1.3.0

type Config

type Config struct {
	Address string

	ApiSuffix bool

	Scheme string

	HttpClient *http.Client

	Transport http.RoundTripper

	ClientID, SecretID string

	// HTTPTimeout bounds each HTTP request. 0 means "use the default"
	// (defaultHTTPTimeout); NewClient applies it to the http.Client it builds, and
	// to a caller-supplied HttpClient that has no timeout of its own, so every
	// client carries the hang guard regardless of how Config was created.
	HTTPTimeout time.Duration

	// FastReadTimeout is an OPT-IN, shorter per-call timeout applied ONLY to reads
	// that opt in (currently the backup OpenIaaS policies List). 0 disables it (the
	// read uses the global HTTPTimeout). Unlike HTTPTimeout, a per-call timeout that
	// fires IS retried (bounded). DefaultConfig sets it; NewClient does NOT backfill
	// it, so a bare Config{} keeps it disabled.
	FastReadTimeout time.Duration

	// ReadRetryMax is the total number of attempts for an idempotent GET read (and
	// the auth POST), 1 meaning no retry. DefaultConfig sets it; a zero value
	// disables retry. It is intentionally NOT backfilled by NewClient, so only a
	// DefaultConfig-derived (production) client retries transient read failures — a
	// minimal/bare Config{} keeps single-shot, deterministic behaviour.
	ReadRetryMax int

	// this parameter will only be used during the tests and not exposed to
	// clients
	ErrorOnUnexpectedActivity bool
}

func DefaultConfig

func DefaultConfig() *Config

type ContentLibrary

type ContentLibrary struct {
	ID             string
	Name           string
	MachineManager BaseObject
	Datastore      BaseObject
}

type ContentLibraryClient

type ContentLibraryClient struct {
	// contains filtered or unexported fields
}

func (*ContentLibraryClient) Deploy added in v0.3.0

func (*ContentLibraryClient) List

func (*ContentLibraryClient) ListItems

func (*ContentLibraryClient) Read

func (*ContentLibraryClient) ReadItem

func (c *ContentLibraryClient) ReadItem(ctx context.Context, contentLibraryId, contentLibraryItemId string) (*ContentLibraryItem, error)

type ContentLibraryFilter added in v0.8.0

type ContentLibraryFilter struct {
	Name             string `filter:"name"`
	MachineManagerId string `filter:"machineManagerId"`
}

type ContentLibraryItem

type ContentLibraryItem struct {
	ID               string
	Name             string
	Description      string
	Type             string
	CreationTime     time.Time
	Size             int
	LastModifiedTime string
	OvfProperties    []string
}

type ContentLibraryItemFilter added in v0.8.0

type ContentLibraryItemFilter struct {
	Name             string `filter:"name"`
	ContentLibraryId string
}

type CreateBucketRequest added in v1.5.0

type CreateBucketRequest struct {
	Name       string   `json:"name"`
	AccessType string   `json:"accessType"`
	Whitelist  []string `json:"whitelist,omitempty"`
}

type CreateNetworkAdapterRequest

type CreateNetworkAdapterRequest struct {
	VirtualMachineId string `json:"virtualMachineId"`
	NetworkId        string `json:"networkId"`
	Type             string `json:"type"`
	MacAddress       string `json:"macAddress,omitempty"`
	// IPAddress is the VPC static IP to assign when the target network is
	// VPC-backed (compute API #1854, source=vmware). Ignored on a plain network.
	IPAddress string `json:"ipAddress,omitempty"`
}

type CreateOpenIaaSReplicationPolicyRequest added in v1.3.0

type CreateOpenIaaSReplicationPolicyRequest struct {
	Name                string                    `json:"name"`
	StorageRepositoryID string                    `json:"storageRepositoryId"`
	Interval            ReplicationPolicyInterval `json:"interval"`
}

type CreateOpenIaasNetworkAdapterRequest added in v0.15.0

type CreateOpenIaasNetworkAdapterRequest struct {
	VirtualMachineID string `json:"virtualMachineId"`
	NetworkID        string `json:"networkId"`
	MAC              string `json:"mac,omitempty"`
	// IPAddress is the VPC static IP to assign when the target network is
	// VPC-backed (compute API #1854). When set, the create registers a static
	// IP at this address on the private network for the adapter's MAC; when
	// omitted the platform auto-assigns one. Ignored on a non-VPC network.
	IPAddress string `json:"ipAddress,omitempty"`
}

type CreateOpenIaasVirtualMachineRequest added in v0.15.0

type CreateOpenIaasVirtualMachineRequest struct {
	Name            string             `json:"name"`
	TemplateID      string             `json:"templateId"`
	CPU             int                `json:"cpu"`
	Memory          int                `json:"memory"`
	CloudInit       *CloudInit         `json:"cloudInit,omitempty"`
	NetworkAdapters []OSNetworkAdapter `json:"networkAdapters,omitempty"`
}

type CreateStaticIPRequest added in v1.8.0

type CreateStaticIPRequest struct {
	MacAddress          string `json:"macAddress"`
	IPAddress           string `json:"ipAddress,omitempty"`
	ResourceDescription string `json:"resourceDescription"`
}

CreateStaticIPRequest is the body of POST /vpc/v1/private_networks/{privateNetworkId}/static_ips (schema CreateStaticIp). MacAddress is required; IPAddress is optional (auto-assigned when omitted, so it keeps omitempty).

ResourceDescription is REQUIRED by the live create contract: an empty or omitted value is rejected by the deployed API (live evidence, 2026-06 — the swagger's "optional" is wrong for this field). It therefore carries NO omitempty: an empty string must surface as a CreateStart precondition error (an actionable diagnostic BEFORE the POST), never be silently elided from the body and bounced server-side.

type CreateStorageAccountRequest added in v1.5.0

type CreateStorageAccountRequest struct {
	Name string `json:"name"`
}

type CreateStorageAccountResponse added in v1.5.0

type CreateStorageAccountResponse struct {
	AccessKeyID     string `json:"accessKeyId"`
	SecretAccessKey string `json:"secretAccessKey"`
}

type CreateTagRequest

type CreateTagRequest struct {
	Key       string                      `json:"key"`
	Value     string                      `json:"value"`
	Resources []*CreateTagRequestResource `json:"resources"`
}

type CreateTagRequestResource

type CreateTagRequestResource struct {
	UUID   string `json:"uuid"`
	Type   string `json:"type"`
	Source string `json:"source"`
}

type CreateVMDiskRequest added in v1.10.0

type CreateVMDiskRequest struct {
	Size        int    `json:"size"`
	StorageType string `json:"storageType,omitempty"`
	Name        string `json:"name,omitempty"`
}

CreateVMDiskRequest is the body of POST .../disks. Only Size is required; StorageType (a storage-type UUID) and Name default server-side when omitted. This endpoint only ever adds a DATA disk.

type CreateVMInstanceCloudInit added in v1.10.0

type CreateVMInstanceCloudInit struct {
	CloudConfig   string `json:"cloudConfig,omitempty"`
	NetworkConfig string `json:"networkConfig,omitempty"`
}

CreateVMInstanceCloudInit is the optional cloud-init payload of the create body.

type CreateVMInstanceNIC added in v1.10.0

type CreateVMInstanceNIC struct {
	DeviceIndex int    `json:"deviceIndex"`
	NetworkID   string `json:"networkId"`
	IPAddress   string `json:"ipAddress,omitempty"`
}

CreateVMInstanceNIC is one network interface of the create body. The whole structure is immutable (ForceNew) on the resource; NIC changes go through the standalone network_adapter resource.

type CreateVMInstanceRequest added in v1.10.0

type CreateVMInstanceRequest struct {
	Name               string                     `json:"name"`
	AvailabilityZoneID string                     `json:"availabilityZoneId"`
	ImageID            string                     `json:"imageId"`
	InstanceFamilyID   string                     `json:"instanceFamilyId"`
	CPU                int                        `json:"cpu"`
	Memory             int                        `json:"memory"`
	BackupPolicyID     string                     `json:"backupPolicyId"`
	NetworkInterfaces  []CreateVMInstanceNIC      `json:"networkInterfaces"`
	CloudInit          *CreateVMInstanceCloudInit `json:"cloudInit,omitempty"`
	PowerState         string                     `json:"powerState,omitempty"`
}

CreateVMInstanceRequest is the body of POST /vm_instances/v1/virtual_machines. disks[] is deliberately NOT modelled: the resource never creates disks (the image provides the system disk); data disks are the standalone disk resource. PowerState is passed through so the VM boots (or stays off) from the first apply; when empty the API leaves the VM stopped.

type CreateVMNetworkAdapterRequest added in v1.10.0

type CreateVMNetworkAdapterRequest struct {
	NetworkID   string `json:"networkId"`
	DeviceIndex int    `json:"deviceIndex"`
	IPAddress   string `json:"ipAddress,omitempty"`
}

CreateVMNetworkAdapterRequest is the body of POST .../network_adapters. IPAddress is only honoured for VPC networks (the worker registers a static IP only when the network type is VPC); it is silently ignored on Private Backbone networks, so it is omitted when empty.

type CreateVirtualControllerRequest added in v0.11.0

type CreateVirtualControllerRequest struct {
	VirtualMachineId string `json:"virtualMachineId"`
	Type             string `json:"type"`
	SubType          string `json:"subType,omitempty"`
}

type CreateVirtualDiskRequest

type CreateVirtualDiskRequest struct {
	ControllerId       string `json:"controllerId,omitempty"`
	ProvisioningType   string `json:"provisioningType"`
	DiskMode           string `json:"diskMode"`
	Capacity           int    `json:"capacity"`
	VirtualMachineId   string `json:"virtualMachineId"`
	DatastoreId        string `json:"datastoreId,omitempty"`
	DatastoreClusterId string `json:"datastoreClusterId,omitempty"`
}

type CreateVirtualMachineRequest

type CreateVirtualMachineRequest struct {
	DatacenterId              string `json:"datacenterId,omitempty"`
	HostId                    string `json:"hostId,omitempty"`
	HostClusterId             string `json:"hostClusterId,omitempty"`
	DatastoreId               string `json:"datastoreId,omitempty"`
	DatastoreClusterId        string `json:"datastoreClusterId,omitempty"`
	Name                      string `json:"name,omitempty"`
	Memory                    int    `json:"memory,omitempty"`
	CPU                       int    `json:"cpu,omitempty"`
	GuestOperatingSystemMoref string `json:"guestOperatingSystemMoref,omitempty"`
}

type CustomAdapterConfig added in v0.12.0

type CustomAdapterConfig struct {
	MacAddress string `json:"macAddress,omitempty"`
	IpAddress  string `json:"ipAddress"`
	SubnetMask string `json:"subnetMask"`
	Gateway    string `json:"gateway"`
}

type CustomGuestNetworkConfig added in v0.12.0

type CustomGuestNetworkConfig struct {
	Hostname      string                 `json:"hostname"`
	Domain        string                 `json:"domain"`
	DnsServerList []string               `json:"dnsServerList,omitempty"`
	DnsSuffixList []string               `json:"dnsSuffixList,omitempty"`
	Adapters      []*CustomAdapterConfig `json:"adapters,omitempty"`
}

type CustomGuestWindowsConfig added in v0.12.0

type CustomGuestWindowsConfig struct {
	AutoLogon           bool   `json:"autoLogon"`
	AutoLogonCount      int    `json:"autoLogonCount"`
	TimeZone            int    `json:"timezone"`
	Password            string `json:"password"`
	JoinDomain          string `json:"joinDomain,omitempty"`
	DomainAdmin         string `json:"domainAdmin,omitempty"`
	DomainAdminPassword string `json:"domainAdminPassword,omitempty"`
	JoinWorkgroup       string `json:"joinWorkgroup,omitempty"`
}

type CustomizeGuestOSRequest added in v0.12.0

type CustomizeGuestOSRequest struct {
	NetworkConfig *CustomGuestNetworkConfig `json:"networkConfig"`
	WindowsConfig *CustomGuestWindowsConfig `json:"windowsConfig,omitempty"`
}

type Datastore

type Datastore struct {
	ID                    string
	Name                  string
	MachineManager        BaseObject
	Moref                 string
	MaxCapacity           int
	FreeCapacity          int
	Accessible            int
	MaintenanceMode       bool
	UniqueId              string
	Type                  string
	VirtualMachinesNumber int
	HostsNumber           int
	HostsNames            []string
	AssociatedFolder      string
}

type DatastoreClient

type DatastoreClient struct {
	// contains filtered or unexported fields
}

func (*DatastoreClient) List

func (d *DatastoreClient) List(
	ctx context.Context,
	filter *DatastoreFilter) ([]*Datastore, error)

func (*DatastoreClient) Read

func (d *DatastoreClient) Read(ctx context.Context, id string) (*Datastore, error)

type DatastoreCluster

type DatastoreCluster struct {
	ID             string
	Name           string
	Moref          string
	Datastores     []string
	Metrics        DatastoreClusterMetrics
	MachineManager BaseObject
	Datacenter     BaseObject
}

type DatastoreClusterClient

type DatastoreClusterClient struct {
	// contains filtered or unexported fields
}

func (*DatastoreClusterClient) List

func (*DatastoreClusterClient) Read

type DatastoreClusterFilter added in v0.6.0

type DatastoreClusterFilter struct {
	Name             string `filter:"name"`
	MachineManagerId string `filter:"machineManagerId"`
	DatacenterId     string `filter:"datacenterId"`
	HostId           string `filter:"hostId"`
	HostClusterId    string `filter:"hostClusterId"`
}

type DatastoreClusterMetrics

type DatastoreClusterMetrics struct {
	FreeCapacity                  int
	MaxCapacity                   int
	Enabled                       bool
	DefaultVmBehavior             string
	LoadBalanceInterval           int
	SpaceThresholdMode            string
	SpaceUtilizationThreshold     int
	MinSpaceUtilizationDifference int
	ReservablePercentThreshold    int
	ReservableThresholdMode       string
	IoLatencyThreshold            int
	IoLoadImbalanceThreshold      int
	IoLoadBalanceEnabled          bool
}

type DatastoreFilter added in v0.6.0

type DatastoreFilter struct {
	Name               string `filter:"name"`
	MachineManagerId   string `filter:"machineManagerId"`
	DatacenterId       string `filter:"datacenterId"`
	HostId             string `filter:"hostId"`
	HostClusterId      string `filter:"hostClusterId"`
	DatastoreClusterId string `filter:"datastoreClusterId"`
}

type DeployOption added in v0.3.0

type DeployOption struct {
	ID    string `json:"id"`
	Value string `json:"value"`
}

type DiskPlacement added in v0.4.0

type DiskPlacement struct {
	VirtualDiskId      string `json:"virtualDiskId"`
	VirtualMachineId   string `json:"virtualMachineId"`
	DatastoreId        string `json:"datastoreId"`
	DatastoreClusterId string `json:"datastoreClusterId"`
}

type DvdDrive added in v0.15.0

type DvdDrive struct {
	Name     string
	Attached bool
}

type Feature

type Feature struct {
	ID   string
	Name string

	SubFeatures []*Feature
}

type FeatureAssignment

type FeatureAssignment struct {
	FeatureID string
	TenantID  string
}

type FeatureClient

type FeatureClient struct {
	// contains filtered or unexported fields
}

func (*FeatureClient) List

func (f *FeatureClient) List(ctx context.Context) ([]*Feature, error)

func (*FeatureClient) ListAssignments

func (f *FeatureClient) ListAssignments(ctx context.Context, tenantID string) ([]*FeatureAssignment, error)

type FloatingIP added in v1.8.0

type FloatingIP struct {
	ID             string              `json:"id"`
	IPAddress      string              `json:"ipAddress"`
	Description    string              `json:"description"`
	StaticIP       *FloatingIPStaticIP `json:"staticIp"`
	VPC            *BaseObject         `json:"vpc"`
	PrivateNetwork *BaseObject         `json:"privateNetwork"`
}

FloatingIP represents a floating IP as returned by GET /vpc/v1/floating_ips[/{id}].

staticIp, vpc and privateNetwork are nullable in the API: they are populated only when the floating IP is bound to a static IP.

type FloatingIPBindingState added in v1.8.0

type FloatingIPBindingState int

FloatingIPBindingState classifies, from a strict 200 listing, whether a floating IP is present and how it is bound, relative to a target static IP.

const (
	// FloatingIPBindingInconclusive means the listing could not prove anything
	// about the pair: the listing was not a provably complete 200 array, an
	// entry lacked an id, or the floating IP was simply not seen in the listing.
	// IMPORTANT: a floating IP not seen in a listing is NEVER treated as "the FIP
	// is provably absent" — listing completeness for floating IPs is not proven
	// live, so absence-from-listing is inconclusive, not negative evidence.
	FloatingIPBindingInconclusive FloatingIPBindingState = iota
	// FloatingIPBindingUnbound means the floating IP is present in the listing
	// and is NOT bound to any static IP (staticIp nil). This is the only state
	// that positively proves the FIP is FREE to bind to our target.
	FloatingIPBindingUnbound
	// FloatingIPBindingBoundToTarget means the floating IP is present and bound
	// to the target static IP (positive same-pair corroboration).
	FloatingIPBindingBoundToTarget
	// FloatingIPBindingBoundToOther means the floating IP is present and bound to
	// a DIFFERENT static IP, observed with a NON-EMPTY nested staticIp.id. Binding
	// our pair would clobber that out-of-band binding, so this is FAIL-CLOSED for
	// create; for delete it means "no longer bound to OUR pair", i.e. our unbind
	// took effect. The non-empty id is what makes this a DEFINITIVE not-our-pair:
	// a present-but-id-less nested staticIp is Inconclusive, never BoundToOther.
	FloatingIPBindingBoundToOther
)

func ClassifyFloatingIPBinding added in v1.8.0

func ClassifyFloatingIPBinding(fip *FloatingIP, staticID string) FloatingIPBindingState

ClassifyFloatingIPBinding classifies a SINGLE, positively observed floating IP (a per-id read body or a listing entry) relative to a target static IP id. It is the one place the four-way rule lives, so the client (CorroborateBinding) and the provider (read stable-negative, delete confirm, create pre-bind) can never drift apart on how a nested staticIp is read.

The caller MUST have already established that fip is non-nil and is THE target floating IP (its top-level id matches); this helper only inspects the nested staticIp relative to staticID:

  • staticIp == nil -> Unbound (definitively free)
  • staticIp != nil && staticIp.id == "" -> Inconclusive (structurally incomplete: the API returned a staticIp OBJECT but omitted its id; this is NOT proof of unbound nor of bound-elsewhere, so it must NEVER be used as negative evidence to drop state or accept an unbind — #312 R6 lesson applied to the nested id)
  • staticIp != nil && staticIp.id == staticID -> BoundToTarget (our pair)
  • staticIp != nil && staticIp.id != "" && != staticID -> BoundToOther (definitively not our pair)

type FloatingIPFilter added in v1.8.0

type FloatingIPFilter struct {
	VpcID string `filter:"vpcId"`
}

FloatingIPFilter narrows a floating-IP listing.

type FloatingIPStaticIP added in v1.8.0

type FloatingIPStaticIP struct {
	ID      string `json:"id"`
	Address string `json:"address"`
}

FloatingIPStaticIP is the static IP a floating IP is bound to, as nested in the FloatingIp schema. The API names the address field "address" here (distinct from StaticIP.FloatingIP which uses "ipAddress").

type Folder

type Folder struct {
	ID             string
	Name           string
	MachineManager BaseObject
}

type FolderClient

type FolderClient struct {
	// contains filtered or unexported fields
}

func (*FolderClient) List

func (f *FolderClient) List(ctx context.Context, filter *FolderFilter) ([]*Folder, error)

func (*FolderClient) Read

func (f *FolderClient) Read(ctx context.Context, id string) (*Folder, error)

type FolderFilter added in v1.0.0

type FolderFilter struct {
	Name             string `filter:"name"`
	MachineManagerID string `filter:"machineManagerId"`
	DatacenterID     string `filter:"datacenterId"`
}

type GlobalAccessKeyClient added in v1.5.0

type GlobalAccessKeyClient struct {
	// contains filtered or unexported fields
}

func (*GlobalAccessKeyClient) Renew added in v1.5.0

type GuestOperatingSystem

type GuestOperatingSystem struct {
	Moref    string
	Family   string
	FullName string
}

type GuestOperatingSystemClient

type GuestOperatingSystemClient struct {
	// contains filtered or unexported fields
}

func (*GuestOperatingSystemClient) List

func (*GuestOperatingSystemClient) Read

type GuestOperatingSystemFilter added in v1.0.0

type GuestOperatingSystemFilter struct {
	HostID        string `filter:"hostId"`
	HostClusterID string `filter:"hostClusterId"`
	OsFamily      string `filter:"osFamily"`
	Version       string `filter:"version"`
}

type Host

type Host struct {
	ID              string
	Name            string
	Moref           string
	MachineManager  BaseObject
	Metrics         HostMetrics
	VirtualMachines []HostVirtualMachinesStub
}

type HostClient

type HostClient struct {
	// contains filtered or unexported fields
}

func (*HostClient) List

func (h *HostClient) List(ctx context.Context, filter *HostFilter) ([]*Host, error)

func (*HostClient) Read

func (h *HostClient) Read(ctx context.Context, id string) (*Host, error)

type HostCluster

type HostCluster struct {
	ID                    string
	Name                  string
	Moref                 string
	Hosts                 []HostClusterHostStub
	Metrics               HostClusterMetrics
	VirtualMachinesNumber int
	MachineManager        BaseObject
	Datacenter            BaseObject
}

type HostClusterClient

type HostClusterClient struct {
	// contains filtered or unexported fields
}

func (*HostClusterClient) List

func (h *HostClusterClient) List(
	ctx context.Context,
	filter *HostClusterFilter) ([]*HostCluster, error)

func (*HostClusterClient) Read

type HostClusterFilter added in v0.6.0

type HostClusterFilter struct {
	Name               string `filter:"name"`
	MachineManagerId   string `filter:"machineManagerId"`
	DatacenterId       string `filter:"datacenterId"`
	DatastoreId        string `filter:"datastoreId"`
	DatastoreClusterId string `filter:"datastoreClusterId"`
}

type HostClusterHostStub

type HostClusterHostStub struct {
	ID   string
	Type string
}

type HostClusterMetrics

type HostClusterMetrics struct {
	TotalCpu     int
	TotalMemory  int
	TotalStorage int
	CpuUsed      int
	MemoryUsed   int
	StorageUsed  int
}

type HostFilter added in v1.0.0

type HostFilter struct {
	Name             string `filter:"name"`
	MachineManagerID string `filter:"machineManagerId"`
	DatacenterID     string `filter:"datacenterId"`
	HostClusterID    string `filter:"hostClusterId"`
	DatastoreID      string `filter:"datastoreId"`
}

type HostMetrics

type HostMetrics struct {
	ESX             HostMetricsESXStub
	CPU             HostMetricsCPUStub
	Memory          HostMetricsMemoryStub
	MaintenanceMode bool
	Uptime          int
	Connected       bool
}

type HostMetricsCPUStub

type HostMetricsCPUStub struct {
	OverallCPUUsage int
	CPUMhz          int
	CPUCores        int
	CPUThreads      int
}

type HostMetricsESXStub

type HostMetricsESXStub struct {
	Version  string
	Build    int
	FullName string
}

type HostMetricsMemoryStub

type HostMetricsMemoryStub struct {
	MemorySize  int
	MemoryUsage int
}

type HostVirtualMachinesStub

type HostVirtualMachinesStub struct {
	ID   string
	Type string
}

type IAM

type IAM struct {
	// contains filtered or unexported fields
}

func (*IAM) Assignment

func (i *IAM) Assignment() *AssignmentClient

func (*IAM) Company

func (i *IAM) Company() *CompanyClient

func (*IAM) Feature

func (i *IAM) Feature() *FeatureClient

func (*IAM) PAT

func (i *IAM) PAT() *PATClient

func (*IAM) Role

func (i *IAM) Role() *RoleClient

func (*IAM) Tenant

func (i *IAM) Tenant() *TenantClient

func (*IAM) User

func (i *IAM) User() *UserClient

type LoginToken

type LoginToken struct {
	// contains filtered or unexported fields
}

func (*LoginToken) CompanyID

func (l *LoginToken) CompanyID() string

func (*LoginToken) TenantID

func (l *LoginToken) TenantID() string

func (*LoginToken) UserID

func (l *LoginToken) UserID() string

type MarketplaceClient added in v1.4.0

type MarketplaceClient struct {
	// contains filtered or unexported fields
}

func (*MarketplaceClient) Item added in v1.4.0

type MarketplaceItem added in v1.4.0

type MarketplaceItem struct {
	ID            string
	Name          string
	Editor        string
	Icon          string
	Description   string
	DescriptionEN string
	CreationDate  string
	LastUpdate    string
	Categories    []string
	Type          string
	Version       string
	Build         string
	Details       struct {
		Overview           string
		HowToUse           string
		Support            string
		TermsAndConditions string
	}
	DetailsEN struct {
		Overview           string
		HowToUse           string
		Support            string
		TermsAndConditions string
	}
	DeploymentOptions struct {
		Targets []struct {
			Key   string
			Name  string
			SKUs  []string
			Files []string
		}
	}
}

type MarketplaceItemClient added in v1.4.0

type MarketplaceItemClient struct {
	// contains filtered or unexported fields
}

func (*MarketplaceItemClient) DeployOpenIaasItem added in v1.4.0

func (*MarketplaceItemClient) DeployVMWareItem added in v1.4.0

func (*MarketplaceItemClient) List added in v1.4.0

func (*MarketplaceItemClient) Read added in v1.4.0

func (*MarketplaceItemClient) ReadInfo added in v1.4.0

type MarketplaceOpenIaasDeployementRequest added in v1.4.0

type MarketplaceOpenIaasDeployementRequest struct {
	ID                  string               `json:"id"`
	Name                string               `json:"name"`
	StorageRepositoryID string               `json:"storageRepositoryId"`
	NetworkData         []NetworkDataMapping `json:"networkData,omitempty"`
	CloudInit           *CloudInit           `json:"cloudInit,omitempty"`
}

type MarketplaceOpenIaasItemInfo added in v1.4.0

type MarketplaceOpenIaasItemInfo struct {
	Name        string
	Description string
	CPU         struct {
		Count          int
		CoresPerSocket int
	}
	Memory          int
	OperatingSystem struct {
		Name    string
		Distro  string
		Version string
	}
	Disks []struct {
		Name                string
		VirtualSize         int
		PhysicalUtilisation int
		Type                string
	}
	NetworkAdapters []struct {
		Name        string
		NetworkName string
		MTU         int
	}
	HighAvailability struct {
		Enabled         bool
		RestartPriority string
	}
	PVDrivers struct {
		Detected bool
		Version  string
		UpToDate bool
	}
}

type MarketplaceVMWareDeployementRequest added in v1.4.0

type MarketplaceVMWareDeployementRequest struct {
	ID            string               `json:"id"`
	Name          string               `json:"name"`
	DatacenterID  string               `json:"datacenterId"`
	HostClusterID string               `json:"hostClusterId,omitempty"`
	HostID        string               `json:"hostId,omitempty"`
	DatastoreID   string               `json:"datastoreId"`
	NetworkData   []NetworkDataMapping `json:"networkData,omitempty"`
	DeployOptions []*DeployOption      `json:"deployOptions,omitempty"`
}

type MarketplaceVMWareItemInfo added in v1.4.0

type MarketplaceVMWareItemInfo struct {
	Name string
	CPU  struct {
		Count             int
		NumCoresPerSocket int
	}
	Memory          int
	OperatingSystem struct {
		ID   string
		Name string
	}
	HardwareVersion string
	NetworkAdapters []struct {
		Name        string
		NetworkName string
		Type        string
	}
	Controllers []struct {
		ID      string
		Name    string
		Type    string
		SubType string
	}
	Disks []struct {
		Name          string
		Capacity      int
		ControllerId  string
		PopulatedSize int
	}
	ExtraConfig []struct {
		Key      string
		Value    string
		Required bool
	}
}

type MountVirtualControllerRequest added in v0.11.0

type MountVirtualControllerRequest struct {
	ID                   string `json:"id"`
	IsoPath              string `json:"isoPath,omitempty"`
	ContentLibraryItemId string `json:"contentLibraryItemId,omitempty"`
}

type Namespace added in v1.5.0

type Namespace struct {
	ID          string
	Name        string
	Region      string
	AccessKeyID string
}

type NamespaceClient added in v1.5.0

type NamespaceClient struct {
	// contains filtered or unexported fields
}

func (*NamespaceClient) Read added in v1.5.0

func (c *NamespaceClient) Read(ctx context.Context) (*Namespace, error)

type Network

type Network struct {
	ID                    string
	Name                  string
	Moref                 string
	MachineManager        BaseObject
	VirtualMachinesNumber int
	HostNumber            int
	HostNames             []string
	// VPC is the network's VPC association. POINTER: the API emits the `vpc`
	// object only for a VPC-backed (vStack/VPC) portgroup, so a plain network
	// decodes it to nil. Used to reject ip_address on a non-VPC network before
	// any side effect (#375, confirmed live: the listing exposes `vpc`).
	VPC *OpenIaaSNetworkAdapterVPC `json:"vpc"`
}

type NetworkAdapter

type NetworkAdapter struct {
	ID               string
	VirtualMachineId string
	Name             string
	Network          BaseObject
	Type             string
	MacType          string
	MacAddress       string
	Connected        bool
	AutoConnect      bool
	// VPC carries the VPC association of the adapter (vpcDetails, shared with the
	// OpenIaaS shape). POINTER: the API emits the `vpc` object only when the
	// adapter is on a VPC-backed network; a plain-network adapter decodes it to
	// nil (#375, confirmed live on the recette vCenter).
	VPC *OpenIaaSNetworkAdapterVPC `json:"vpc"`
}

type NetworkAdapterClient

type NetworkAdapterClient struct {
	// contains filtered or unexported fields
}

func (*NetworkAdapterClient) Connect

func (n *NetworkAdapterClient) Connect(ctx context.Context, id string) (string, error)

func (*NetworkAdapterClient) Create

func (*NetworkAdapterClient) Delete

func (n *NetworkAdapterClient) Delete(ctx context.Context, id string) (string, error)

func (*NetworkAdapterClient) Disconnect

func (n *NetworkAdapterClient) Disconnect(ctx context.Context, id string) (string, error)

func (*NetworkAdapterClient) List

func (*NetworkAdapterClient) ListStrict added in v1.8.0

ListStrict behaves like List but requires a complete HTTP 200 answer: 206 is a partial listing and cannot prove an absence, and any other code (including 403) is an error rather than being mapped to an empty result. Callers using the listing as state-safety evidence must fail closed on anything else (#281).

func (*NetworkAdapterClient) Read

func (*NetworkAdapterClient) Update

type NetworkAdapterFilter added in v1.0.0

type NetworkAdapterFilter struct {
	VirtualMachineID string `filter:"virtualMachineId"`
}

type NetworkClient

type NetworkClient struct {
	// contains filtered or unexported fields
}

func (*NetworkClient) List

func (n *NetworkClient) List(
	ctx context.Context,
	filter *NetworkFilter) ([]*Network, error)

func (*NetworkClient) Read

func (n *NetworkClient) Read(ctx context.Context, id string) (*Network, error)

type NetworkData added in v0.3.0

type NetworkData struct {
	NetworkAdapterId string `json:"networkAdapterId"`
	NetworkId        string `json:"networkId"`
}

type NetworkDataMapping added in v1.4.0

type NetworkDataMapping struct {
	// Deprecated by the marketplace API in favor of NetworkAdapterName, kept
	// for backward compatibility with older backends.
	SourceNetworkName string `json:"sourceNetworkName,omitempty"`
	// Adapter name mapping (e.g. "VIF #0"). Takes priority over
	// SourceNetworkName server-side.
	NetworkAdapterName   string `json:"networkAdapterName,omitempty"`
	DestinationNetworkId string `json:"destinationNetworkId"`
}

type NetworkFilter added in v0.8.1

type NetworkFilter struct {
	Name             string `filter:"name"`
	MachineManagerId string `filter:"machineManagerId"`
	DatacenterId     string `filter:"datacenterId"`
	VirtualMachineId string `filter:"virtualMachineId"`
	Type             string `filter:"type"`
	VirtualSwitchId  string `filter:"virtualSwitchId"`
	HostId           string `filter:"hostId"`
	HostClusterId    string `filter:"hostClusterId"`
	FolderId         string `filter:"folderId"`
}

type OSNetworkAdapter added in v1.3.0

type OSNetworkAdapter struct {
	NetworkID string `json:"networkId"`
	MAC       string `json:"mac,omitempty"`
}

type ObjectStorage added in v1.5.0

type ObjectStorage struct {
	// contains filtered or unexported fields
}

func (*ObjectStorage) ACL added in v1.5.0

func (c *ObjectStorage) ACL() *ACLClient

func (*ObjectStorage) ACLEntry added in v1.5.0

func (c *ObjectStorage) ACLEntry() *ACLEntryClient

func (*ObjectStorage) Bucket added in v1.5.0

func (c *ObjectStorage) Bucket() *BucketClient

func (*ObjectStorage) BucketFiles added in v1.5.0

func (c *ObjectStorage) BucketFiles() *BucketFilesClient

func (*ObjectStorage) GlobalAccessKey added in v1.5.0

func (c *ObjectStorage) GlobalAccessKey() *GlobalAccessKeyClient

func (*ObjectStorage) Namespace added in v1.5.0

func (c *ObjectStorage) Namespace() *NamespaceClient

func (*ObjectStorage) Role added in v1.5.0

func (*ObjectStorage) StorageAccount added in v1.5.0

func (c *ObjectStorage) StorageAccount() *StorageAccountClient

type ObjectStorageRole added in v1.5.0

type ObjectStorageRole struct {
	ID          string
	Name        string
	Description string
	Permissions []string
}

type ObjectStorageRoleClient added in v1.5.0

type ObjectStorageRoleClient struct {
	// contains filtered or unexported fields
}

func (*ObjectStorageRoleClient) List added in v1.5.0

type OpenIaaSHost added in v0.15.0

type OpenIaaSHost struct {
	ID             string
	MachineManager BaseObject
	InternalId     string
	Pool           struct {
		ID   string
		Name string
		Type struct {
			Key         string
			Description string
		}
	}
	Name       string
	Master     bool
	Uptime     int
	PowerState string
	UpdateData struct {
		MaintenanceMode bool
		Status          string
	}
	RebootRequired  bool
	VirtualMachines []string
	Metrics         struct {
		XOA struct {
			Version  string
			FullName string
			Build    string
		}
		Memory struct {
			Usage int
			Size  int
		}
		Cpu struct {
			Sockets   int
			Cores     int
			Model     string
			ModelName string
		}
	}
}

type OpenIaaSHostClient added in v0.15.0

type OpenIaaSHostClient struct {
	// contains filtered or unexported fields
}

func (*OpenIaaSHostClient) List added in v0.15.0

func (*OpenIaaSHostClient) Read added in v0.15.0

type OpenIaaSMachineManager added in v0.15.0

type OpenIaaSMachineManager struct {
	ID        string
	Name      string
	OSVersion string
	OSName    string
}

type OpenIaaSMachineManagerClient added in v0.15.0

type OpenIaaSMachineManagerClient struct {
	// contains filtered or unexported fields
}

func (*OpenIaaSMachineManagerClient) List added in v0.15.0

func (*OpenIaaSMachineManagerClient) Read added in v0.15.0

type OpenIaaSNetwork added in v0.15.0

type OpenIaaSNetwork struct {
	ID                         string
	MachineManager             BaseObject
	InternalID                 string
	Name                       string
	Pool                       BaseObject
	MaximumTransmissionUnit    int
	NetworkAdapters            []string
	NetworkBlockDevice         bool
	InsecureNetworkBlockDevice bool
	// VPC is the network's VPC association (swagger.comput.yml openIaasNetwork
	// `vpc`). It is a POINTER: the API emits the `vpc` object only for a
	// VPC-backed network, so a plain network decodes it to nil. The provider
	// uses VPC != nil to tell a VPC-backed network apart from a plain one
	// before assigning a static IP (#1854).
	VPC *OpenIaaSNetworkAdapterVPC `json:"vpc"`
}

type OpenIaaSNetworkAdapter added in v0.15.0

type OpenIaaSNetworkAdapter struct {
	ID               string
	Name             string
	InternalID       string
	VirtualMachineID string
	MacAddress       string
	MTU              int
	Attached         bool
	TxChecksumming   bool
	Network          BaseObject
	MachineManager   BaseObject
	// IPv4Address / IPv6Address are the adapter's IP addresses as reported by
	// the platform (swagger.comput.yml openIaasNetworkAdapter). They are
	// READ-ONLY: the provider never writes them.
	IPv4Address string `json:"ipv4Address"`
	IPv6Address string `json:"ipv6Address"`
	// VPC carries the VPC association of the adapter. It is a POINTER because
	// the API only emits the `vpc` object when the adapter is on a VPC
	// network; an adapter on a plain network decodes it to nil (#238).
	VPC *OpenIaaSNetworkAdapterVPC `json:"vpc"`
}

type OpenIaaSNetworkAdapterClient added in v0.15.0

type OpenIaaSNetworkAdapterClient struct {
	// contains filtered or unexported fields
}

func (*OpenIaaSNetworkAdapterClient) Connect added in v0.15.0

func (*OpenIaaSNetworkAdapterClient) Create added in v0.15.0

func (*OpenIaaSNetworkAdapterClient) Delete added in v0.15.0

func (*OpenIaaSNetworkAdapterClient) Disconnect added in v0.15.0

func (v *OpenIaaSNetworkAdapterClient) Disconnect(ctx context.Context, id string) (string, error)

func (*OpenIaaSNetworkAdapterClient) List added in v0.15.0

func (*OpenIaaSNetworkAdapterClient) ListStrict added in v1.8.0

ListStrict behaves like List but treats an access-denied answer as an error instead of an empty result: callers using the listing as EVIDENCE for state-shrinking decisions must fail closed (#273).

func (*OpenIaaSNetworkAdapterClient) Read added in v0.15.0

func (*OpenIaaSNetworkAdapterClient) Update added in v0.15.0

type OpenIaaSNetworkAdapterFilter added in v1.0.0

type OpenIaaSNetworkAdapterFilter struct {
	VirtualMachineID string `filter:"virtualMachineId"`
}

type OpenIaaSNetworkAdapterVPC added in v1.8.0

type OpenIaaSNetworkAdapterVPC struct {
	ID             string `json:"id"`
	Name           string `json:"name"`
	PrivateNetwork struct {
		ID   string `json:"id"`
		Name string `json:"name"`
	} `json:"privateNetwork"`
	StaticIPAddress string `json:"staticIpAddress"`
}

OpenIaaSNetworkAdapterVPC mirrors the API `vpcDetails` schema attached to an OpenIaaS network adapter (swagger.comput.yml). Only the NON-deprecated nested privateNetwork{id,name} is decoded; the deprecated top-level privateNetworkId / privateNetworkName are intentionally ignored (#238).

type OpenIaaSNetworkClient added in v0.15.0

type OpenIaaSNetworkClient struct {
	// contains filtered or unexported fields
}

func (*OpenIaaSNetworkClient) List added in v0.15.0

func (*OpenIaaSNetworkClient) Read added in v0.15.0

type OpenIaaSNetworkFilter added in v0.15.0

type OpenIaaSNetworkFilter struct {
	MachineManagerID string `filter:"machineManagerId"`
	PoolID           string `filter:"poolId"`
}

type OpenIaaSReplicationPolicy added in v1.3.0

type OpenIaaSReplicationPolicy struct {
	ID                string
	Name              string
	StorageRepository struct {
		ID   string
		Name string
	}
	Pool struct {
		ID    string
		Name  string
		Label string
	}
	MachineManager struct {
		ID   string
		Name string
	}
	LastRun struct {
		Start  int
		End    int
		Status string
	}
	Interval struct {
		Hours   int
		Minutes int
	}
}

type OpenIaaSSnapshot added in v0.15.0

type OpenIaaSSnapshot struct {
	ID               string
	Description      string
	VirtualMachineID string
	Name             string
	CreateTime       int
}

type OpenIaaSSnapshotClient added in v0.15.0

type OpenIaaSSnapshotClient struct {
	// contains filtered or unexported fields
}

func (*OpenIaaSSnapshotClient) List added in v0.15.0

func (*OpenIaaSSnapshotClient) Read added in v0.15.0

type OpenIaaSSnapshotFilter added in v1.0.0

type OpenIaaSSnapshotFilter struct {
	VirtualMachineID string `filter:"virtualMachineId"`
}

type OpenIaaSStorageRepository added in v0.15.0

type OpenIaaSStorageRepository struct {
	ID              string
	InternalId      string
	Name            string
	Description     string
	MaintenanceMode bool
	MaxCapacity     int
	FreeCapacity    int
	StorageType     string
	VirtualDisks    []string
	Shared          bool
	Accessible      int
	Host            BaseObject
	Pool            BaseObject
	MachineManager  BaseObject
}

type OpenIaaSStorageRepositoryClient added in v0.15.0

type OpenIaaSStorageRepositoryClient struct {
	// contains filtered or unexported fields
}

func (*OpenIaaSStorageRepositoryClient) List added in v0.15.0

func (*OpenIaaSStorageRepositoryClient) Read added in v0.15.0

type OpenIaaSTemplateFilter added in v0.15.0

type OpenIaaSTemplateFilter struct {
	MachineManagerId string `filter:"machineManagerId"`
	PoolId           string `filter:"poolId,omitempty"`
}

type OpenIaaSVirtualDisk added in v0.15.0

type OpenIaaSVirtualDisk struct {
	ID                string
	InternalID        string
	Name              string
	Description       string
	Size              int
	Usage             int
	IsSnapshot        bool
	StorageRepository BaseObject
	VirtualMachines   []OpenIaaSVirtualDiskConnection
	Templates         []struct {
		ID       string
		Name     string
		ReadOnly bool
	}
}

type OpenIaaSVirtualDiskAttachRequest added in v0.15.0

type OpenIaaSVirtualDiskAttachRequest struct {
	VirtualMachineID string `json:"virtualMachineId"`
	Bootable         bool   `json:"bootable,omitempty"`
	Mode             string `json:"mode"`
	Position         string `json:"position,omitempty"`
}

type OpenIaaSVirtualDiskClient added in v0.15.0

type OpenIaaSVirtualDiskClient struct {
	// contains filtered or unexported fields
}

func (*OpenIaaSVirtualDiskClient) Attach added in v0.15.0

func (*OpenIaaSVirtualDiskClient) Connect added in v1.3.0

func (*OpenIaaSVirtualDiskClient) Create added in v0.15.0

func (*OpenIaaSVirtualDiskClient) Delete added in v0.15.0

func (*OpenIaaSVirtualDiskClient) Detach added in v1.3.0

func (*OpenIaaSVirtualDiskClient) Disconnect added in v1.3.0

func (*OpenIaaSVirtualDiskClient) List added in v0.15.0

func (*OpenIaaSVirtualDiskClient) ListStrict added in v1.8.0

ListStrict behaves like List but treats an access-denied answer as an error instead of an empty result: callers using the listing as EVIDENCE for state-shrinking decisions must fail closed (#273). The regular List maps a definitive 404 to an empty result; since #384 a genuine 403 surfaces as an access-denied error rather than being masked as empty.

func (*OpenIaaSVirtualDiskClient) Read added in v0.15.0

func (*OpenIaaSVirtualDiskClient) Relocate added in v1.3.0

func (*OpenIaaSVirtualDiskClient) Update added in v1.3.0

type OpenIaaSVirtualDiskConnection added in v1.3.0

type OpenIaaSVirtualDiskConnection struct {
	ID        string
	Name      string
	ReadOnly  bool
	Connected bool
}

type OpenIaaSVirtualDiskConnectionRequest added in v1.3.0

type OpenIaaSVirtualDiskConnectionRequest struct {
	VirtualMachineID string `json:"virtualMachineId"`
}

type OpenIaaSVirtualDiskCreateRequest added in v0.15.0

type OpenIaaSVirtualDiskCreateRequest struct {
	Name                string `json:"name"`
	Size                int    `json:"size"`
	Mode                string `json:"mode"`
	StorageRepositoryID string `json:"storageRepositoryId"`
	VirtualMachineID    string `json:"virtualMachineId"`
	Bootable            bool   `json:"bootable"`
}

type OpenIaaSVirtualDiskDetachRequest added in v1.3.0

type OpenIaaSVirtualDiskDetachRequest struct {
	VirtualMachineID string `json:"virtualMachineId"`
}

type OpenIaaSVirtualDiskFilter added in v1.0.0

type OpenIaaSVirtualDiskFilter struct {
	VirtualMachineID    string `filter:"virtualMachineId"`
	TemplateID          string `filter:"templateId"`
	StorageRepositoryID string `filter:"storageRepositoryId"`
}

type OpenIaaSVirtualDiskRelocateRequest added in v1.3.0

type OpenIaaSVirtualDiskRelocateRequest struct {
	StorageRepositoryID string `json:"storageRepositoryId"`
}

type OpenIaaSVirtualDiskUpdateRequest added in v1.3.0

type OpenIaaSVirtualDiskUpdateRequest struct {
	Name string `json:"name,omitempty"`
	Size int    `json:"size,omitempty"`
}

type OpenIaaSVirtualMachine added in v0.15.0

type OpenIaaSVirtualMachine struct {
	ID                  string
	Name                string
	InternalID          string
	PowerState          string
	SecureBoot          bool
	HighAvailability    string
	BootFirmware        string
	AutoPowerOn         bool
	DvdDrive            DvdDrive
	BootOrder           []string
	OperatingSystemName string
	CPU                 int
	NumCoresPerSocket   int
	Memory              int
	Tools               struct {
		Detected bool
		Version  string
	}
	PVDrivers struct {
		Detected    bool
		Version     string
		AreUpToDate bool
	}
	ManagementAgent struct {
		Detected bool
	}
	// Addresses is an OBJECT with COMPOSITE keys of the form
	// "<device>/<family>/<index>" (e.g. "0/ipv4/0", "0/ipv6/0"), per the
	// compute API contract (swagger.comput.yml openIaasVirtualMachine). The
	// previous flat {IPv4, IPv6} struct bound NO key, so addresses were always
	// empty in state. Decoding into a map captures every composite key without
	// loss; the device-0 primary IPv4/IPv6 are projected back to the existing
	// {ipv4, ipv6} state block by FlattenOpenIaaSVirtualMachine (#238).
	Addresses      map[string]string `json:"addresses"`
	MachineManager BaseObject
	Host           BaseObject
	Pool           BaseObject
}

type OpenIaaSVirtualMachineClient added in v0.15.0

type OpenIaaSVirtualMachineClient struct {
	// contains filtered or unexported fields
}

func (*OpenIaaSVirtualMachineClient) Create added in v0.15.0

func (*OpenIaaSVirtualMachineClient) Delete added in v0.15.0

func (*OpenIaaSVirtualMachineClient) List added in v0.15.0

func (*OpenIaaSVirtualMachineClient) ListStrict added in v1.8.0

ListStrict behaves like List but requires a complete 200 answer: callers using the listing as EVIDENCE for state-shrinking decisions must fail closed on access-denied or partial answers (#275 doctrine, FF-5).

func (*OpenIaaSVirtualMachineClient) MountISO added in v0.15.1

func (v *OpenIaaSVirtualMachineClient) MountISO(ctx context.Context, id string, virtualDiskId string) (string, error)

func (*OpenIaaSVirtualMachineClient) Power added in v0.15.0

func (*OpenIaaSVirtualMachineClient) Read added in v0.15.0

func (*OpenIaaSVirtualMachineClient) Relocate added in v1.8.0

func (*OpenIaaSVirtualMachineClient) UnmountISO added in v0.15.1

func (v *OpenIaaSVirtualMachineClient) UnmountISO(ctx context.Context, id string) (string, error)

func (*OpenIaaSVirtualMachineClient) Update added in v0.15.0

func (*OpenIaaSVirtualMachineClient) UpdateBootOrder added in v0.15.0

func (v *OpenIaaSVirtualMachineClient) UpdateBootOrder(ctx context.Context, id string, bootOrder []string) (string, error)

func (*OpenIaaSVirtualMachineClient) WaitForDrivers added in v1.6.0

func (c *OpenIaaSVirtualMachineClient) WaitForDrivers(
	ctx context.Context,
	id string,
	timeout time.Duration,
	options *WaiterOptions,
) (*OpenIaaSVirtualMachine, error)

type OpenIaaSVirtualMachineFilter added in v0.15.0

type OpenIaaSVirtualMachineFilter struct {
	MachineManagerID string `filter:"machineManagerId"`
}

type OpenIaasBackupFilter added in v0.15.0

type OpenIaasBackupFilter struct {
	MachineManagerId string `filter:"machineManagerId"`
	VirtualMachineId string `filter:"virtualMachineId"`
	Deleted          bool   `filter:"deleted"`
}

type OpenIaasHostFilter added in v0.15.0

type OpenIaasHostFilter struct {
	MachineManagerId string `filter:"machineManagerId"`
	PoolId           string `filter:"poolId"`
}

type OpenIaasPool added in v0.15.0

type OpenIaasPool struct {
	ID                      string
	MachineManager          BaseObject
	InternalID              string
	Name                    string
	Label                   string
	HighAvailabilityEnabled bool
	Master                  string
	Hosts                   []string
	Memory                  struct {
		Usage int
		Size  int
	}
	Cpu struct {
		Cores   int
		Sockets int
	}
	Type struct {
		Key         string
		Description string
	}
}

type OpenIaasPoolClient added in v0.15.0

type OpenIaasPoolClient struct {
	// contains filtered or unexported fields
}

func (*OpenIaasPoolClient) List added in v0.15.0

func (*OpenIaasPoolClient) Read added in v0.15.0

type OpenIaasPoolFilter added in v0.15.0

type OpenIaasPoolFilter struct {
	MachineManagerId string `filter:"machineManagerId"`
}

type OpenIaasTemplate added in v0.15.0

type OpenIaasTemplate struct {
	ID                string
	MachineManager    BaseObject
	InternalID        string
	Name              string
	CPU               int
	NumCoresPerSocket int
	Memory            int
	PowerState        string
	Snapshots         []string
	SLAPolicies       []string
	Disks             []TemplateDisk
	NetworkAdapters   []TemplateNetworkAdapter
}

type OpenIaasTemplateClient added in v0.15.0

type OpenIaasTemplateClient struct {
	// contains filtered or unexported fields
}

func (*OpenIaasTemplateClient) List added in v0.15.0

func (*OpenIaasTemplateClient) Read added in v0.15.0

type PATClient

type PATClient struct {
	// contains filtered or unexported fields
}

func (*PATClient) Create

func (p *PATClient) Create(ctx context.Context, name string, roles []string, expirationDate int) (*Token, error)

func (*PATClient) Delete

func (p *PATClient) Delete(ctx context.Context, patID string) error

func (*PATClient) List

func (p *PATClient) List(ctx context.Context) ([]*Token, error)

func (*PATClient) ListStrict added in v1.8.0

func (p *PATClient) ListStrict(ctx context.Context) ([]*Token, error)

ListStrict behaves like List but requires a complete HTTP 200 answer. Callers using the listing as EVIDENCE for a state-shrinking decision must fail closed on anything else: 206 is a partial listing and cannot prove an absence, 201/403/5xx are not usable evidence either. Unlike List, it does NOT go through requireOK (which also accepts 201 and 206).

func (*PATClient) Read

func (p *PATClient) Read(ctx context.Context, patID string) (*Token, error)

type PatchVMInstanceRequest added in v1.10.0

type PatchVMInstanceRequest struct {
	Name           *string `json:"name,omitempty"`
	BackupPolicyID *string `json:"backupPolicyId,omitempty"`
}

PatchVMInstanceRequest is the body of PATCH /vm_instances/v1/virtual_machines/{id} (in-place metadata update). Both fields are pointers with omitempty so a diff-driven update sends only the attributes that actually changed.

type PowerRequest

type PowerRequest struct {
	ID             string                             `json:"id,omitempty"`
	DatacenterId   string                             `json:"datacenterId,omitempty"`
	PowerAction    string                             `json:"powerAction,omitempty"`
	ForceEnterBIOS bool                               `json:"forceEnterBIOS,omitempty"`
	Recommendation *VirtualMachinePowerRecommendation `json:"recommendation,omitempty"`
}

type PrivateNetwork added in v1.8.0

type PrivateNetwork struct {
	ID            string     `json:"id"`
	IPAddress     string     `json:"ipAddress"`
	Name          *string    `json:"name"`
	VlanID        int        `json:"vlanId"`
	StaticIPCount int        `json:"staticIpCount"`
	VPC           BaseObject `json:"vpc"`
}

PrivateNetwork represents a private network as returned by GET /vpc/v1/private_networks[/{id}].

ipAddress carries the network address in CIDR notation (e.g. 192.168.1.0/24). name is nullable in the API. The gateway is NOT exposed by the API yet and is therefore intentionally absent.

type PrivateNetworkFilter added in v1.8.0

type PrivateNetworkFilter struct {
	VpcID string `filter:"vpcId"`
}

PrivateNetworkFilter narrows a private-network listing.

type PublicCloudVMAvailabilityZone added in v1.10.0

type PublicCloudVMAvailabilityZone struct {
	ID                 string
	Name               string
	Description        string
	RegionID           string
	IsEnabled          bool
	CompatibleFamilies []PublicCloudVMFamilyRef
	CreatedAt          string
	UpdatedAt          string
}

PublicCloudVMAvailabilityZone mirrors an element of GET /vm_instances/v1/availability_zones. camelCase is matched case-insensitively by encoding/json; description is nullable (decodes to "").

type PublicCloudVMAvailabilityZoneClient added in v1.10.0

type PublicCloudVMAvailabilityZoneClient struct {
	// contains filtered or unexported fields
}

func (*PublicCloudVMAvailabilityZoneClient) List added in v1.10.0

List returns the availability zones of the tenant (bare JSON array), optionally filtered by region.

func (*PublicCloudVMAvailabilityZoneClient) Read added in v1.10.0

Read returns a single availability zone by UUID. A positive 404 maps to (nil, nil); any other non-OK code (403, 5xx) fails closed with an error.

type PublicCloudVMAvailabilityZoneFilter added in v1.10.0

type PublicCloudVMAvailabilityZoneFilter struct {
	RegionID string `filter:"regionId"`
}

PublicCloudVMAvailabilityZoneFilter carries the optional list filters.

type PublicCloudVMBackupPolicy added in v1.10.0

type PublicCloudVMBackupPolicy struct {
	ID                            string
	Name                          string
	Description                   string
	Retention                     int
	ScheduleCron                  string
	ScheduleWindowStartHour       int
	ScheduleWindowDurationMinutes int
}

PublicCloudVMBackupPolicy mirrors an element of GET /vm_instances/v1/backup_policies (bare array, camelCase). Several fields are documented as nullable and decode to their zero value when null.

type PublicCloudVMBackupPolicyClient added in v1.10.0

type PublicCloudVMBackupPolicyClient struct {
	// contains filtered or unexported fields
}

func (*PublicCloudVMBackupPolicyClient) List added in v1.10.0

List returns the tenant's backup policies (bare JSON array, no server-side filter).

type PublicCloudVMClient added in v1.10.0

type PublicCloudVMClient struct {
	// contains filtered or unexported fields
}

PublicCloudVMClient is the sub-client for the "Public Cloud VM Instances" product (gateway service prefix /vm_instances, permission namespace public_cloud_vm_instances_*). It carries the shared *Client and therefore reuses the existing auth (Bearer JWT/IAM), HTTP transport, retry and activity polling machinery unchanged — no new auth/HTTP/polling code is introduced here (E0-2 / #411).

func (*PublicCloudVMClient) AvailabilityZone added in v1.10.0

AvailabilityZone returns the availability-zone catalogue sub-client (read-only).

func (*PublicCloudVMClient) BackupPolicy added in v1.10.0

BackupPolicy returns the backup-policy catalogue sub-client (read-only, list-only: the API returns the whole tenant policy list with no by-id endpoint or server-side filter). A backup policy is a mandatory input of the VM resource (backup_policy_id is required at VM create).

func (*PublicCloudVMClient) Disk added in v1.10.0

Disk returns the VM disk sub-client. Disks are VM-scoped (/vm_instances/v1/virtual_machines/{vmID}/disks...); every write is asynchronous (201 + Location:<activityId>). This resource layer manages DATA disks only — the system/primary disk is provided by the image and cannot be created or deleted here.

func (*PublicCloudVMClient) Flavor added in v1.10.0

Flavor returns the flavor catalogue sub-client (read-only, list-only: the API has no by-id endpoint for flavors).

func (*PublicCloudVMClient) Image added in v1.11.0

Image returns the image (OS image) catalogue sub-client (read-only).

func (*PublicCloudVMClient) Instance added in v1.10.0

Instance returns the VM instance sub-client — the core writable entity of the Public Cloud VM Instances product (service /vm_instances, mount /v1/virtual_machines). Every write is ASYNCHRONOUS: it returns 201 + Location:<activityId>, so the write methods return the raw activityId and the caller (the resource) tracks it through the shared Shiva Activities waiter, extracts the VM id from the completed activity and never guesses it.

func (*PublicCloudVMClient) InstanceFamily added in v1.10.0

InstanceFamily returns the instance-family catalogue sub-client (read-only).

func (*PublicCloudVMClient) Network added in v1.10.0

Network returns the VM network catalogue sub-client. Networks are a read-only catalogue provisioned upstream (Saturne/VPC): the provider never creates or deletes them, and both endpoints (GET /networks, GET /networks/{id}) are synchronous — there is no activity to poll.

func (*PublicCloudVMClient) NetworkAdapter added in v1.10.0

NetworkAdapter returns the VM network-adapter (NIC) sub-client. NICs are VM-scoped (/vm_instances/v1/virtual_machines/{vmID}/network_adapters); every write is asynchronous (201 + Location:<activityId>). The broker remaps the worker's nic_id to `id`.

func (*PublicCloudVMClient) Quota added in v1.10.0

Quota returns the quota sub-client (read-only, singleton scoped to the JWT tenant).

func (*PublicCloudVMClient) Region added in v1.10.0

Region returns the region catalogue sub-client (read-only).

func (*PublicCloudVMClient) Snapshot added in v1.10.0

Snapshot returns the VM snapshot sub-client. Snapshots are VM-scoped (/vm_instances/v1/virtual_machines/{vmID}/snapshots...); create and delete are asynchronous (201 + Location:<activityId>). Revert is intentionally not exposed.

func (*PublicCloudVMClient) StorageType added in v1.10.0

StorageType returns the storage-type catalogue sub-client (read-only, list-only: the API has no by-id endpoint for storage types).

func (*PublicCloudVMClient) Task added in v1.10.0

Task returns the task sub-client (read-only). Tasks are a DIAGNOSTIC object (upstream machine-manager / xo-server tasks); they are UNRELATED to the activities used to track writes and are never used to follow a write.

type PublicCloudVMDisk added in v1.10.0

type PublicCloudVMDisk struct {
	ID          string
	Position    int
	Label       string
	SizeGb      int
	StorageType string
	IsPrimary   bool
}

PublicCloudVMDisk mirrors an element of GET .../disks (camelCase, verified live). Position 0 / IsPrimary true is the system disk; position >= 1 are data disks. StorageType is a storage-type UUID.

type PublicCloudVMDiskClient added in v1.10.0

type PublicCloudVMDiskClient struct {
	// contains filtered or unexported fields
}

func (*PublicCloudVMDiskClient) Create added in v1.10.0

Create adds a data disk and returns the activityId. The completed activity's result carries the new disk id.

func (*PublicCloudVMDiskClient) Delete added in v1.10.0

func (d *PublicCloudVMDiskClient) Delete(ctx context.Context, vmID, diskID string) (string, error)

Delete removes a data disk and returns the activityId. Deleting the primary disk is refused downstream (and guarded by the resource before calling this).

func (*PublicCloudVMDiskClient) ExtendById added in v1.10.0

func (d *PublicCloudVMDiskClient) ExtendById(ctx context.Context, vmID, diskID string, size int) (string, error)

ExtendById grows a specific disk (grow-only, and the VM must be stopped — both enforced downstream; a violation surfaces as a failed activity). Returns the activityId.

func (*PublicCloudVMDiskClient) ExtendSystem added in v1.10.0

func (d *PublicCloudVMDiskClient) ExtendSystem(ctx context.Context, vmID string, size int) (string, error)

ExtendSystem grows the VM's system (primary) disk via the dedicated endpoint (POST /disks/extend, no diskId — the worker targets the primary disk). Like a by-id extend it is grow-only and requires the VM to be stopped (enforced downstream). Used by the VM resource's os_disk, not by the data-disk resource.

func (*PublicCloudVMDiskClient) List added in v1.10.0

List returns the VM's disks (lenient success contract).

func (*PublicCloudVMDiskClient) ListStrict added in v1.10.0

func (d *PublicCloudVMDiskClient) ListStrict(ctx context.Context, vmID string) ([]*PublicCloudVMDisk, error)

ListStrict returns the VM's disks with a 200-only contract AND a completeness check (total == len(disks)): a truncated page can never serve as absence evidence. It is the authoritative source for a disk deletion decision (E0-9).

func (*PublicCloudVMDiskClient) Read added in v1.10.0

func (d *PublicCloudVMDiskClient) Read(ctx context.Context, vmID, diskID string) (*PublicCloudVMDisk, error)

Read returns a single disk by id. A positive 404 (disk OR its VM absent) maps to (nil, nil); any other non-OK code (403, 5xx) fails closed with an error.

type PublicCloudVMFamilyRef added in v1.10.0

type PublicCloudVMFamilyRef struct {
	ID   string
	Name string
}

PublicCloudVMFamilyRef is a summary reference to an instance family ({id, name}), as embedded in an availability zone's compatibleFamilies.

type PublicCloudVMFlavor added in v1.10.0

type PublicCloudVMFlavor struct {
	ID               string
	InstanceFamilyID string
	Name             string
	Vcpu             int
	RamGb            int
}

PublicCloudVMFlavor is a predefined (vCPU, RAM) sizing pair of an instance family. It is NOT consumed directly by the VM resource (which sizes by instance_family_id + cpu + memory); it exists to discover valid combinations.

type PublicCloudVMFlavorClient added in v1.10.0

type PublicCloudVMFlavorClient struct {
	// contains filtered or unexported fields
}

func (*PublicCloudVMFlavorClient) List added in v1.10.0

List returns the flavors of the tenant, optionally filtered by instance family.

type PublicCloudVMFlavorFilter added in v1.10.0

type PublicCloudVMFlavorFilter struct {
	FamilyID string `filter:"familyId"`
}

PublicCloudVMFlavorFilter carries the optional list filters.

type PublicCloudVMImage added in v1.11.0

type PublicCloudVMImage struct {
	ID                 string
	Name               string
	OsFamily           string
	OsName             string
	OsVersion          string
	DiskSizesGb        []int
	CompatibleFamilies []string
	Categories         []string
	Family             string
	Version            string
	Editor             string
	DescriptionEn      string
	ImageType          string
	Icon               string
}

PublicCloudVMImage mirrors an element of GET /vm_instances/v1/images (bare array, camelCase). Only the stable/core fields are modelled here; the editorial marketplace fields (details_en, deployment_options, ...) and the networkInterfaces block are intentionally left out of the provider surface for iteration 1 (nested shapes to confirm live). The struct carries no json tags: encoding/json matches the camelCase keys case-insensitively, so the Go field ImageType matches the API's imageType without an explicit tag.

type PublicCloudVMImageClient added in v1.11.0

type PublicCloudVMImageClient struct {
	// contains filtered or unexported fields
}

func (*PublicCloudVMImageClient) List added in v1.11.0

List returns the images of the tenant (bare JSON array), optionally filtered by instance family and/or availability zone.

func (*PublicCloudVMImageClient) Read added in v1.11.0

Read returns a single image by UUID. A positive 404 maps to (nil, nil); any other non-OK code (403, 5xx) fails closed with an error.

type PublicCloudVMImageFilter added in v1.11.0

type PublicCloudVMImageFilter struct {
	InstanceFamilyID   string `filter:"instanceFamilyId"`
	AvailabilityZoneID string `filter:"availabilityZoneId"`
}

PublicCloudVMImageFilter carries the optional list filters.

type PublicCloudVMInstance added in v1.10.0

type PublicCloudVMInstance struct {
	ID                  string
	Name                string
	Status              string
	AZ                  PublicCloudVMInstanceRef
	Image               PublicCloudVMInstanceRef
	InstanceFamily      PublicCloudVMInstanceRef
	VCPU                int
	RAMGb               int
	DisksSizeGb         int
	BackupPolicy        *PublicCloudVMInstanceRef
	GuestToolsInstalled bool
	CreatedAt           string
	UpdatedAt           string
}

PublicCloudVMInstance mirrors an element of GET /vm_instances/v1/virtual_machines and the GET /{id} detail. The broker camelizes responses (ramGb, disksSizeGb, guestToolsInstalled, ...); Go's encoding/json matches struct fields case-insensitively, so no json tags are needed on the read path. BackupPolicy is nullable in the API and decodes to nil when null.

type PublicCloudVMInstanceClient added in v1.10.0

type PublicCloudVMInstanceClient struct {
	// contains filtered or unexported fields
}

func (*PublicCloudVMInstanceClient) Create added in v1.10.0

Create submits the async VM creation and returns the raw activityId from the Location header. The caller waits on the activity and extracts the VM id from the completed activity (result / concernedItems type "vmi").

func (*PublicCloudVMInstanceClient) Delete added in v1.10.0

Delete submits the async VM deletion and returns the activityId.

func (*PublicCloudVMInstanceClient) List added in v1.10.0

List returns every VM instance matching the filter, auto-paginating over the full result set. Pages are accepted with requireOK (200/201/206).

func (*PublicCloudVMInstanceClient) ListStrict added in v1.10.0

ListStrict is List with a 200-ONLY contract on every page (206/partial is rejected as an error). It is the authoritative source of truth for an absence decision (E0-9): a VM is only accepted as deleted when a complete, strictly successful listing does not contain its id. A partial or access-denied listing must fail closed (never drop state on an incomplete listing).

func (*PublicCloudVMInstanceClient) PatchMetadata added in v1.10.0

PatchMetadata submits the async in-place metadata update (name / backup policy) and returns the activityId.

func (*PublicCloudVMInstanceClient) Read added in v1.10.0

Read returns a single VM instance by UUID. A positive 404 maps to (nil, nil) (absence); any other non-OK code (403, 5xx) is returned as an error so the caller fails closed and never treats a permission/backend blip as a deletion.

func (*PublicCloudVMInstanceClient) Resize added in v1.10.0

Resize submits the async vCPU/RAM resize and returns the activityId.

func (*PublicCloudVMInstanceClient) Start added in v1.10.0

Start submits the async power-on transition and returns the activityId.

func (*PublicCloudVMInstanceClient) Stop added in v1.10.0

Stop submits the async power-off transition and returns the activityId.

type PublicCloudVMInstanceFamily added in v1.10.0

type PublicCloudVMInstanceFamily struct {
	ID          string
	Name        string
	Description string
	VcpuMin     int
	VcpuMax     int
	RamMinGb    int
	RamMaxGb    int
	// Skus is the priced billing catalogue (vCPU and RAM) of the family. The
	// API returns it on both the list and the single-item endpoints (#506).
	// PublicCloudVMSku is the shared SKU type (defined with the storage-type
	// sibling in public_cloud_vm_storage_type.go, #507): the same priced-SKU
	// shape the VM Instances API returns across catalogue resources.
	Skus []PublicCloudVMSku `json:"skus"`
}

PublicCloudVMInstanceFamily mirrors an element of GET /vm_instances/v1/instance_families (bare array, camelCase). This is the id the VM resource consumes (instance_family_id).

type PublicCloudVMInstanceFamilyClient added in v1.10.0

type PublicCloudVMInstanceFamilyClient struct {
	// contains filtered or unexported fields
}

func (*PublicCloudVMInstanceFamilyClient) List added in v1.10.0

List returns the instance families of the tenant (bare JSON array, no filter).

func (*PublicCloudVMInstanceFamilyClient) Read added in v1.10.0

Read returns a single instance family by id. A positive 404 maps to (nil, nil); any other non-OK code (403, 5xx) fails closed with an error.

type PublicCloudVMInstanceFilter added in v1.10.0

type PublicCloudVMInstanceFilter struct {
	Name               string `filter:"name"`
	Status             string `filter:"status"`
	AvailabilityZoneID string `filter:"availabilityZoneId"`
	FamilyID           string `filter:"familyId"`
	OrderBy            string `filter:"orderBy"`
	OrderDir           string `filter:"orderDir"`
}

PublicCloudVMInstanceFilter carries the server-side query filters of the list endpoint. Only string fields are represented here because addFilter maps string/bool/[]string tags; the int limit/offset pagination cursor is added manually by the list loop. Note the query parameter for the instance family is `familyId` (≠ the create body's `instanceFamilyId`).

type PublicCloudVMInstanceRef added in v1.10.0

type PublicCloudVMInstanceRef struct {
	ID   string
	Name string
}

PublicCloudVMInstanceRef is the {id, name} shape used for the resolved availability zone, image, instance family and backup policy references returned by the API.

type PublicCloudVMNetwork added in v1.10.0

type PublicCloudVMNetwork struct {
	ID   string
	Name string
	VPC  *PublicCloudVMNetworkVPC
}

PublicCloudVMNetwork mirrors an element of GET /networks (bare JSON array, verified live). VPC-backed networks carry a `vpc` block (verified live since 2026-07); the key is omitted entirely on Private Backbone networks, so VPC is nil there — which is how a caller tells the two kinds apart.

type PublicCloudVMNetworkAdapter added in v1.10.0

type PublicCloudVMNetworkAdapter struct {
	ID              string
	DeviceIndex     int
	NetworkID       string
	NetworkName     string
	Type            string
	ProvisionStatus string
	MacAddress      string
	IPv4Address     string
	IPv6Address     string
}

PublicCloudVMNetworkAdapter mirrors an element of GET .../network_adapters (camelCase, verified live). ipv4Address/ipv6Address arrive as JSON null until the guest agent reports them, decoding to "". The spec's `vif_uuid` is NOT returned by the live API (neither the list nor the single GET) and is intentionally not modelled.

type PublicCloudVMNetworkAdapterClient added in v1.10.0

type PublicCloudVMNetworkAdapterClient struct {
	// contains filtered or unexported fields
}

func (*PublicCloudVMNetworkAdapterClient) ChangeNetwork added in v1.10.0

ChangeNetwork re-points a NIC to another network (async). The completed activity's result is the vmId (NOT the NIC id, which is unchanged). Requires the VM to be stopped — enforced by the worker; a running VM fails the activity.

func (*PublicCloudVMNetworkAdapterClient) Create added in v1.10.0

Create attaches a NIC and returns the activityId. The completed activity's result — and a concernedItem of type network_adapter — carries the new NIC id.

func (*PublicCloudVMNetworkAdapterClient) Delete added in v1.10.0

func (a *PublicCloudVMNetworkAdapterClient) Delete(ctx context.Context, vmID, nicID string) (string, error)

Delete detaches a NIC (async) and returns the activityId. The completed activity's result is the vmId. Requires the VM to be stopped (enforced by the worker; a running VM fails the activity — guarded by the resource beforehand).

func (*PublicCloudVMNetworkAdapterClient) List added in v1.10.0

List returns the VM's NICs (lenient success contract).

func (*PublicCloudVMNetworkAdapterClient) ListStrict added in v1.10.0

ListStrict returns the VM's NICs with a 200-only contract AND a completeness check (total == len(networks)) plus structural integrity checks: a truncated page, a wrapper scoped to a different vmId, or a malformed entry can never serve as absence evidence. It is the authoritative source for a NIC deletion decision (E0-9) — the single-GET code (400 for an unknown NIC) is never trusted as absence.

func (*PublicCloudVMNetworkAdapterClient) Read added in v1.10.0

Read returns a single NIC by id. A positive 404 maps to (nil, nil); every other non-OK code fails closed with an error. NOTE (verified live): an unknown NIC returns 400, not 404 — so a caller must NEVER treat a Read error as absence. The resource's Read falls back to a complete ListStrict for any drop decision.

type PublicCloudVMNetworkClient added in v1.10.0

type PublicCloudVMNetworkClient struct {
	// contains filtered or unexported fields
}

func (*PublicCloudVMNetworkClient) List added in v1.10.0

List returns the network catalogue (bare JSON array, lenient success contract).

func (*PublicCloudVMNetworkClient) ListStrict added in v1.10.0

ListStrict returns the catalogue with a 200-only contract. The response is a bare array with no `total`, so there is no completeness cross-check to run — and a read-only catalogue is never the basis for a state-drop decision, so a 200-only contract is sufficient.

func (*PublicCloudVMNetworkClient) Read added in v1.10.0

Read returns a single network by id. Absence does NOT surface as a clean 404: the live platform returns 400 (well-formed unknown id) or 500 (nil UUID), so any non-200 fails closed with an error. That is correct for a read-only data source — it errors on a bad id rather than dropping anything from state.

type PublicCloudVMNetworkRef added in v1.10.0

type PublicCloudVMNetworkRef struct {
	ID   string
	Name string
}

PublicCloudVMNetworkRef is a minimal {id,name} reference.

type PublicCloudVMNetworkVPC added in v1.10.0

type PublicCloudVMNetworkVPC struct {
	ID             string
	Name           string
	PrivateNetwork *PublicCloudVMNetworkRef
}

PublicCloudVMNetworkVPC is the `vpc` block of a VPC-backed network: {"id","name","privateNetwork":{"id","name"}}.

type PublicCloudVMQuota added in v1.10.0

type PublicCloudVMQuota struct {
	VcpuLimit      int
	RamLimitMb     int
	StorageLimitGb int
	VcpuUsed       int
	RamUsedMb      int
	StorageUsedGb  int
}

PublicCloudVMQuota mirrors GET /vm_instances/v1/quotas (a single object). Units are strict: RAM in MB, storage in GB, vCPU in units.

type PublicCloudVMQuotaClient added in v1.10.0

type PublicCloudVMQuotaClient struct {
	// contains filtered or unexported fields
}

func (*PublicCloudVMQuotaClient) Read added in v1.10.0

Read returns the tenant quota. Note: a 404 here means "no worker found for the tenant" (a configuration error), NOT "no quota" — so it is surfaced as an error (requireOK), never as an absence.

type PublicCloudVMRegion added in v1.10.0

type PublicCloudVMRegion struct {
	ID          string
	Name        string
	Description string
	CountryCode string
	Geography   string
	IsEnabled   bool
	AzCount     int
	CreatedAt   string
	UpdatedAt   string
}

PublicCloudVMRegion mirrors an element of GET /vm_instances/v1/regions. The broker camelizes responses (countryCode, azCount, isEnabled, ...); Go's encoding/json matches struct fields case-insensitively, so no json tags are needed. Description is nullable in the API and decodes to "" when null.

type PublicCloudVMRegionClient added in v1.10.0

type PublicCloudVMRegionClient struct {
	// contains filtered or unexported fields
}

func (*PublicCloudVMRegionClient) List added in v1.10.0

List returns every region of the tenant (bare JSON array, no server-side filter or pagination on this endpoint).

func (*PublicCloudVMRegionClient) Read added in v1.10.0

Read returns a single region by UUID. A positive 404 maps to (nil, nil) (absence); any other non-OK code (403, 5xx) is returned as an error so the caller fails closed (never silently treats a permission/backend blip as absence).

type PublicCloudVMSku added in v1.11.0

type PublicCloudVMSku struct {
	Name          string  `json:"name"`
	Price         float64 `json:"price"`
	Unit          string  `json:"unit"`
	Description   string  `json:"description"`
	DescriptionEn string  `json:"descriptionEn"`
}

PublicCloudVMSku is the priced SKU the VM Instances API carries on each storage type. Unlike its sibling fields, this struct pins EXPLICIT json tags: they lock the exact API spelling of these billing fields (notably the French/English description pair) instead of relying on case-insensitive matching.

type PublicCloudVMSnapshot added in v1.10.0

type PublicCloudVMSnapshot struct {
	ID        string
	VmID      string
	TenantID  string
	Name      string
	Status    string
	CreatedAt string
}

PublicCloudVMSnapshot mirrors an element of GET .../snapshots (camelCase, verified live). There is no size/description field.

type PublicCloudVMSnapshotClient added in v1.10.0

type PublicCloudVMSnapshotClient struct {
	// contains filtered or unexported fields
}

func (*PublicCloudVMSnapshotClient) Create added in v1.10.0

func (s *PublicCloudVMSnapshotClient) Create(ctx context.Context, vmID, name string) (string, error)

Create takes a snapshot and returns the activityId. The completed activity's result / concernedItems ("snapshot") carries the new snapshot id.

func (*PublicCloudVMSnapshotClient) Delete added in v1.10.0

func (s *PublicCloudVMSnapshotClient) Delete(ctx context.Context, vmID, snapshotID string) (string, error)

Delete removes a snapshot and returns the activityId (the completed activity's result is the vmId, not the snapshotId).

func (*PublicCloudVMSnapshotClient) List added in v1.10.0

List returns the VM's snapshots (lenient success contract).

func (*PublicCloudVMSnapshotClient) ListStrict added in v1.10.0

ListStrict returns the VM's snapshots with a 200-only contract AND a completeness check (total == len): the authoritative absence evidence (E0-9).

func (*PublicCloudVMSnapshotClient) Read added in v1.10.0

func (s *PublicCloudVMSnapshotClient) Read(ctx context.Context, vmID, snapshotID string) (*PublicCloudVMSnapshot, error)

Read returns a single snapshot by id. A positive 404 maps to (nil, nil); any other non-OK code (403, 5xx) fails closed with an error.

type PublicCloudVMStorageType added in v1.10.0

type PublicCloudVMStorageType struct {
	ID          string
	Name        string
	Description string
	IopsHint    string
	MinSizeGb   int
	MaxSizeGb   int
	IsAvailable bool
	// Sku is the priced SKU of the storage resource. It is a pointer because
	// the API may omit it (or send null) for a given storage type; a nil Sku
	// then flattens to an empty list rather than a phantom zero-priced object.
	Sku *PublicCloudVMSku
}

PublicCloudVMStorageType mirrors an element of GET /vm_instances/v1/storage_types. The endpoint returns a WRAPPED object { "storageTypes": [...] }.

type PublicCloudVMStorageTypeClient added in v1.10.0

type PublicCloudVMStorageTypeClient struct {
	// contains filtered or unexported fields
}

func (*PublicCloudVMStorageTypeClient) List added in v1.10.0

List returns the storage types available to the tenant (wrapped response), optionally filtered by an availability-zone/instance-family pair. filter may be nil; when non-nil, its two fields must be both set or both empty.

type PublicCloudVMStorageTypeFilter added in v1.11.0

type PublicCloudVMStorageTypeFilter struct {
	AvailabilityZoneID string `filter:"availabilityZoneId"`
	InstanceFamilyID   string `filter:"instanceFamilyId"`
}

PublicCloudVMStorageTypeFilter carries the optional list filters. The two fields are optional but PAIRED: the storage-types API answers an opaque 500 to a request carrying only one of them (live-probed), so List refuses a lone filter up-front with an actionable error instead of letting it reach the wire.

type PublicCloudVMTask added in v1.10.0

type PublicCloudVMTask struct {
	ID            string
	VmID          string
	TaskType      string
	Status        string
	Message       string
	FailureCode   string
	RetriedFromID string
	CreatedAt     string
	UpdatedAt     string
	CompletedAt   string
}

PublicCloudVMTask mirrors an element of GET /vm_instances/v1/tasks (bare array, camelCase). Diagnostic only.

type PublicCloudVMTaskClient added in v1.10.0

type PublicCloudVMTaskClient struct {
	// contains filtered or unexported fields
}

func (*PublicCloudVMTaskClient) List added in v1.10.0

func (t *PublicCloudVMTaskClient) List(ctx context.Context, vmID string, limit int) ([]*PublicCloudVMTask, error)

List returns tasks. When vmID is non-empty the per-VM endpoint (/virtual_machines/{vmID}/tasks) is used; otherwise the global list (/v1/tasks). limit, when > 0, is passed through as the `limit` query param (max 500 global / 200 per-VM per the API). This is a diagnostic listing and is not auto-paginated.

func (*PublicCloudVMTaskClient) Read added in v1.10.0

Read returns a single task by id. A positive 404 maps to (nil, nil); any other non-OK code (403, 5xx) fails closed with an error.

type RelocateOpenIaasVirtualMachineRequest added in v1.8.0

type RelocateOpenIaasVirtualMachineRequest struct {
	HostId string `json:"hostId,omitempty"`
}

RelocateOpenIaasVirtualMachineRequest relocates (migrates) a virtual machine to another host. For an intra-pool (same-cluster) live migration of a running VM, only HostId is required (the API documents this case explicitly). The optional storageRepositoryId / networkData fields of the endpoint are out of scope here (host-only migration, #355) and tracked separately if needed.

type RelocateVirtualMachineRequest added in v0.4.0

type RelocateVirtualMachineRequest struct {
	VirtualMachines    []string         `json:"virtualMachines"`
	Priority           string           `json:"priority"`
	DatacenterId       string           `json:"datacenterId,omitempty"`
	HostId             string           `json:"hostId,omitempty"`
	HostClusterId      string           `json:"hostClusterId,omitempty"`
	DatastoreId        string           `json:"datastoreId,omitempty"`
	DatastoreClusterId string           `json:"datastoreClusterId,omitempty"`
	NetworkData        []*NetworkData   `json:"networkData,omitempty"`
	DiskPlacements     []*DiskPlacement `json:"diskPlacements,omitempty"`
}

type RenewAccessKeyResponse added in v1.5.0

type RenewAccessKeyResponse struct {
	AccessKeyID     string
	AccessSecretKey string
}

type ReplicationPolicyInterval added in v1.3.0

type ReplicationPolicyInterval struct {
	Hours   int `json:"hours,omitempty"`
	Minutes int `json:"minute,omitempty"`
}

type ResizeVMInstanceRequest added in v1.10.0

type ResizeVMInstanceRequest struct {
	CPU    *int `json:"cpu,omitempty"`
	Memory *int `json:"memory,omitempty"`
}

ResizeVMInstanceRequest is the body of POST /vm_instances/v1/virtual_machines/{id}/resize. Both dimensions are optional (a resize may change only cpu or only memory). The "VM must be stopped" precondition is enforced downstream (worker); a violation surfaces as a failed activity.

type ResourcePool

type ResourcePool struct {
	ID             string
	Name           string
	Moref          string
	Parent         ResourcePoolParent
	Metrics        ResourcePoolMetrics
	MachineManager BaseObject
}

type ResourcePoolCPUMetrics

type ResourcePoolCPUMetrics struct {
	MaxUsage        int
	ReservationUsed int
}

type ResourcePoolClient

type ResourcePoolClient struct {
	// contains filtered or unexported fields
}

func (*ResourcePoolClient) List

func (*ResourcePoolClient) Read

type ResourcePoolFilter added in v1.0.0

type ResourcePoolFilter struct {
	MachineManagerID string `filter:"machineManagerId"`
	DatacenterID     string `filter:"datacenterId"`
	HostClusterID    string `filter:"hostClusterId"`
}

type ResourcePoolMemoryMetrics

type ResourcePoolMemoryMetrics struct {
	MaxUsage        int
	ReservationUsed int
	BalloonedMemory int
}

type ResourcePoolMetrics

type ResourcePoolMetrics struct {
	CPU    ResourcePoolCPUMetrics
	Memory ResourcePoolMemoryMetrics
}

type ResourcePoolParent

type ResourcePoolParent struct {
	ID   string
	Type string
}

type Role

type Role struct {
	ID   string
	Name string
}

type RoleClient

type RoleClient struct {
	// contains filtered or unexported fields
}

func (*RoleClient) List

func (r *RoleClient) List(ctx context.Context) ([]*Role, error)

func (*RoleClient) Read

func (r *RoleClient) Read(ctx context.Context, roleID string) (*Role, error)

type Snapshot

type Snapshot struct {
	ID               string
	VirtualMachineId string
	Name             string
	CreateTime       int
}

type SnapshotClient

type SnapshotClient struct {
	// contains filtered or unexported fields
}

func (*SnapshotClient) List

func (s *SnapshotClient) List(ctx context.Context, filter *SnapshotFilter) ([]*Snapshot, error)

type SnapshotFilter added in v1.0.0

type SnapshotFilter struct {
	VirtualMachineID string `filter:"virtualMachineId"`
}

type StaticIP added in v1.8.0

type StaticIP struct {
	ID                  string              `json:"id"`
	IPAddress           string              `json:"ipAddress"`
	MacAddress          string              `json:"macAddress"`
	VirtualMachine      *BaseObject         `json:"virtualMachine"`
	NetworkAdapter      *BaseObject         `json:"networkAdapter"`
	Source              string              `json:"source"`
	ResourceDescription *string             `json:"resourceDescription"`
	FloatingIP          *StaticIPFloatingIP `json:"floatingIp"`
	VPC                 BaseObject          `json:"vpc"`
	PrivateNetwork      BaseObject          `json:"privateNetwork"`
}

StaticIP represents a static IP as returned by GET /vpc/v1/static_ips/{id}, GET /vpc/v1/static_ips/mac/{mac} and GET /vpc/v1/private_networks/{id}/static_ips.

virtualMachine, networkAdapter, resourceDescription and floatingIp are nullable in the API. source is one of xoa, vmware or custom.

type StaticIPFilter added in v1.8.0

type StaticIPFilter struct {
	VirtualMachineID string `filter:"virtualMachineId"`
}

StaticIPFilter narrows a per-private-network static IP listing.

type StaticIPFloatingIP added in v1.8.0

type StaticIPFloatingIP struct {
	ID        string `json:"id"`
	IPAddress string `json:"ipAddress"`
}

StaticIPFloatingIP is the floating IP bound to a static IP, as nested in the StaticIp schema. It carries the floating IP id and address; the API names the address field "ipAddress" here (distinct from FloatingIP.StaticIP which uses "address").

type StatusError

type StatusError struct {
	Code int
	Body string
}

func (StatusError) Error

func (e StatusError) Error() string

type StorageAccount added in v1.5.0

type StorageAccount struct {
	ID          string
	Name        string
	AccessKeyID string
	ARN         string
	CreateDate  string
	Path        string
	Tags        []struct {
		Key   string
		Value string
	}
}

type StorageAccountACLEntry added in v1.5.0

type StorageAccountACLEntry struct {
	ID   string
	Name string
	Role string
}

type StorageAccountClient added in v1.5.0

type StorageAccountClient struct {
	// contains filtered or unexported fields
}

func (*StorageAccountClient) Create added in v1.5.0

func (*StorageAccountClient) Delete added in v1.5.0

func (c *StorageAccountClient) Delete(ctx context.Context, name string) (string, error)

func (*StorageAccountClient) List added in v1.5.0

func (*StorageAccountClient) ListACLEntries added in v1.5.0

func (c *StorageAccountClient) ListACLEntries(ctx context.Context, storageAccount string) ([]*StorageAccountACLEntry, error)

func (*StorageAccountClient) ListStrict added in v1.8.0

func (c *StorageAccountClient) ListStrict(ctx context.Context) ([]*StorageAccount, error)

ListStrict behaves like List but requires a complete HTTP 200 answer: 206 is a partial listing and cannot prove an absence, and any other code (including 403) is an error rather than being mapped to an empty result. Callers using the listing as state-safety evidence must fail closed on anything else (#281).

func (*StorageAccountClient) Read added in v1.5.0

type StorageRepositoryFilter added in v0.15.0

type StorageRepositoryFilter struct {
	MachineManagerId string   `filter:"machineManagerId"`
	PoolId           string   `filter:"poolId"`
	HostId           string   `filter:"hostId"`
	StorageTypes     []string `filter:"types,omitempty"`
	Shared           bool     `filter:"shared"`
}

type Tag

type Tag struct {
	Key      string
	Value    string
	Tenant   string
	Resource string
}

type TagClient

type TagClient struct {
	// contains filtered or unexported fields
}

func (*TagClient) Resource

func (c *TagClient) Resource() *TagResourceClient

type TagResourceClient

type TagResourceClient struct {
	// contains filtered or unexported fields
}

func (*TagResourceClient) Create

func (*TagResourceClient) Delete

func (c *TagResourceClient) Delete(ctx context.Context, resourceId string, key string) error

func (*TagResourceClient) Read

func (c *TagResourceClient) Read(ctx context.Context, resourceId string) ([]*Tag, error)

type TemplateDisk added in v0.15.0

type TemplateDisk struct {
	ID                string
	Name              string
	Description       string
	Size              int
	StorageRepository BaseObject
}

type TemplateNetworkAdapter added in v0.15.0

type TemplateNetworkAdapter struct {
	Name       string
	MacAddress string
	MTU        int
	Attached   bool
	Network    BaseObject
}

type Tenant

type Tenant struct {
	ID        string
	Name      string
	SNC       bool
	CompanyID string
}

type TenantAssignment

type TenantAssignment struct {
	UserID   string
	TenantID string
	RoleID   string
}

type TenantClient

type TenantClient struct {
	// contains filtered or unexported fields
}

func (*TenantClient) List

func (t *TenantClient) List(ctx context.Context) ([]*Tenant, error)

type Token

type Token struct {
	ID             string
	Name           string
	Secret         string
	Roles          []string
	ExpirationDate string
	UserId         string
	TenantId       string
	TenantName     string
}

type UpdateGuestRequest added in v0.6.0

type UpdateGuestRequest struct {
	GuestOperatingSystemMoref string `json:"guestOperatingSystemMoref"`
}

type UpdateNetworkAdapterRequest

type UpdateNetworkAdapterRequest struct {
	ID           string `json:"id"`
	NewNetworkId string `json:"newNetworkId"`
	AutoConnect  bool   `json:"autoConnect"`
	MacAddress   string `json:"macAddress,omitempty"`
	// IPAddress relocates the VPC static IP of a VPC-backed adapter to this
	// address (compute API #1854, source=vmware). Sent only by the VPC IP
	// reconciliation step, on a genuine divergence.
	IPAddress string `json:"ipAddress,omitempty"`
}

type UpdateOpenIaasNetworkAdapterRequest added in v0.15.0

type UpdateOpenIaasNetworkAdapterRequest struct {
	// All fields are optional (PATCH semantics): callers only set the
	// fields that actually diverge — re-sending the current networkId/mac
	// is rejected platform-side as a VPC Static IP self-conflict (#246).
	NetworkID string `json:"networkId,omitempty"`
	MAC       string `json:"mac,omitempty"`
	Attached  bool   `json:"attached,omitempty"`
	// Pointer so that an explicit `false` is serialized: with a plain bool
	// and omitempty, disabling TX checksumming could never be sent (#246).
	TxChecksumming *bool `json:"txChecksumming,omitempty"`
	// IPAddress relocates the VPC static IP of a VPC-backed adapter to this
	// address (compute API #1854). The API requires networkId alongside
	// ipAddress, so callers set NetworkID when they set IPAddress.
	IPAddress string `json:"ipAddress,omitempty"`
}

type UpdateOpenIaasVirtualMachinePowerRequest added in v0.15.0

type UpdateOpenIaasVirtualMachinePowerRequest struct {
	PowerState              string `json:"powerState"`
	HostId                  string `json:"hostId,omitempty"`
	Force                   bool   `json:"force,omitempty"`
	BypassMacAddressesCheck bool   `json:"bypassMacAddressesCheck,omitempty"`
	ForceShutdownDelay      int    `json:"forceShutdownDelay,omitempty"`
	BypassBlockedOperation  bool   `json:"bypassBlockedOperation,omitempty"`
}

type UpdateOpenIaasVirtualMachineRequest added in v0.15.0

type UpdateOpenIaasVirtualMachineRequest struct {
	// All fields are optional (PATCH semantics): callers only set the
	// fields that actually diverge from the live state. The booleans are
	// pointers so an absent value is omitted from the payload while an
	// explicit false stays expressible (#267).
	Name              string `json:"name,omitempty"`
	CPU               int    `json:"cpu,omitempty"`
	NumCoresPerSocket int    `json:"numCoresPerSocket,omitempty"`
	Memory            int    `json:"memory,omitempty"`
	SecureBoot        *bool  `json:"secureBoot,omitempty"`
	BootFirmware      string `json:"bootFirmware,omitempty"`
	AutoPowerOn       *bool  `json:"autoPowerOn,omitempty"`
	HighAvailability  string `json:"highAvailability,omitempty"`
}

type UpdateStaticIPRequest added in v1.8.0

type UpdateStaticIPRequest struct {
	ResourceDescription *string `json:"resourceDescription,omitempty"`
	MacAddress          *string `json:"macAddress,omitempty"`
}

UpdateStaticIPRequest is the body of PATCH /vpc/v1/static_ips/{id} (schema UpdateStaticIpPayload). The real payload contains ONLY resourceDescription and macAddress (verified against the swagger): there is deliberately no ipAddress here, because the address is auto-assigned at creation and is not updatable. Both fields are omitempty (the schema requires minProperties: 1) so only the changed fields are sent in a diff-driven PATCH.

type UpdateVersioningRequest added in v1.5.0

type UpdateVersioningRequest struct {
	Status string `json:"status"`
}

type UpdateVirtualDiskRequest

type UpdateVirtualDiskRequest struct {
	ID          string `json:"id"`
	NewCapacity int    `json:"newCapacity,omitempty"`
	DiskMode    string `json:"diskMode,omitempty"`
}

type UpdateVirtualMachineRequest

type UpdateVirtualMachineRequest struct {
	Id                           string       `json:"id"`
	Ram                          int          `json:"ram"`
	MemoryReservation            int          `json:"memoryReservation"`
	Cpu                          int          `json:"cpu"`
	CorePerSocket                int          `json:"corePerSocket"`
	HotCpuAdd                    bool         `json:"hotCpuAdd"`
	HotCpuRemove                 bool         `json:"hotCpuRemove"`
	HotMemAdd                    bool         `json:"hotMemAdd"`
	BootOptions                  *BootOptions `json:"bootOptions,omitempty"`
	ExposeHardwareVirtualization bool         `json:"exposeHardwareVirtualization,omitempty"`
}

type UpdateWhitelistRequest added in v1.5.0

type UpdateWhitelistRequest struct {
	AccessType string   `json:"accessType"`
	Whitelist  []string `json:"whitelist,omitempty"`
}

type User

type User struct {
	ID            string
	InternalID    string
	Name          string
	Type          string
	Source        []string
	SourceID      string
	EmailVerified bool
	Email         string
}

type UserClient

type UserClient struct {
	// contains filtered or unexported fields
}

func (*UserClient) List

func (t *UserClient) List(ctx context.Context, filter *UserFilter) ([]*User, error)

func (*UserClient) Read

func (t *UserClient) Read(ctx context.Context, userID string) (*User, error)

type UserFilter added in v1.0.0

type UserFilter struct {
	CompanyID string `filter:"companyId"`
}

type VPC added in v1.8.0

type VPC struct {
	ID                  string  `json:"id"`
	Name                string  `json:"name"`
	InternetIP          *string `json:"internetIp"`
	PrivateNetworkCount int     `json:"privateNetworkCount"`
	StaticIPCount       int     `json:"staticIpCount"`
	FloatingIPCount     int     `json:"floatingIpCount"`
}

VPC represents a VPC as returned by GET /vpc/v1/vpc[/{id}].

Field names and JSON tags follow the Shiva VPC API swagger (v0.15.0). internetIp is nullable in the API, so it is modelled as *string to distinguish "no internet IP" from an empty value.

type VPCClient added in v1.8.0

type VPCClient struct {
	// contains filtered or unexported fields
}

VPC client for the Shiva /vpc/v1 API — UNDER ACTIVE REBUILD (v1.9.0).

History: the platform replaced /vpc/v1 with breaking changes UNDER THE SAME URL (no /v2 coexistence). v1.8.0 removed the client-facing provider surface (the cloudtemple_vpc_* datasources and resources) and FROZE this client, to avoid shipping endpoints that would break server-side with no client recourse.

v1.9.0 rebuilds VPC against the new contract, chunk by chunk: this client is the foundation, updated first (e.g. static IP create is now ASYNC — see vpc_static_ip.go CreateStart/WaitCreate), then the provider surface (Layer A) is restored on top in later chunks. So this package is NO LONGER FROZEN — changes here ARE the rebuild — but it is also not yet complete.

SAFETY (kept until the rebuild is end-to-end validated): no provider surface references this client on the default path, and ct-validate exercises the /vpc/v1 WRITE cycle ONLY via the explicit, opt-in "-cycles vpc -write" — never the blanket "-cycles all" (see vpcCycle.Quarantined in cmd/ct-validate/cycle_vpc.go). A routine sweep can therefore never fire VPC writes against this still-evolving contract.

VPCClient is the entry point for the (rebuilding) /vpc/v1 API.

func (*VPCClient) FloatingIP added in v1.8.0

func (v *VPCClient) FloatingIP() *VPCFloatingIPClient

FloatingIP returns the client for VPC floating IPs.

func (*VPCClient) PrivateNetwork added in v1.8.0

func (v *VPCClient) PrivateNetwork() *VPCPrivateNetworkClient

PrivateNetwork returns the client for VPC private networks.

func (*VPCClient) StaticIP added in v1.8.0

func (v *VPCClient) StaticIP() *VPCStaticIPClient

StaticIP returns the client for VPC static IPs.

func (*VPCClient) VPC added in v1.8.0

func (v *VPCClient) VPC() *VPCVPCClient

VPC returns the client for the VPC resource itself.

type VPCFloatingIPClient added in v1.8.0

type VPCFloatingIPClient struct {
	// contains filtered or unexported fields
}

VPCFloatingIPClient handles the FULL lifecycle of VPC floating IPs: provision (async create), description update (PATCH), gated deprovision (async delete), strict by-id resolution, and bind/unbind to a static IP. A floating IP is a BILLABLE public IP, so deprovision is gated by construction (only a provably fully-unbound IP is ever deleted) and every destructive decision rests on strict positive evidence — see DeprovisionUnbound.

func (*VPCFloatingIPClient) Bind added in v1.8.0

func (f *VPCFloatingIPClient) Bind(ctx context.Context, fipID, staticID string) (string, error)

Bind associates a PRE-EXISTING floating IP with a static IP (asynchronous). The POST returns an activity (Location header); the caller waits for its completion. This does NOT create the floating IP — it only establishes the FIP -> static IP relationship.

Tolerance for the live API (the vendor swagger is not authoritative):

  • the call is async (2xx + Location); an empty/sync body is tolerated by doRequestAndReturnActivity, which reads only the Location header;
  • a 409 Conflict is treated as a non-error idempotent success: the live API may return it when the floating IP is ALREADY bound to the SAME static IP. A 409 returns an empty activity id with a nil error, so the resource layer confirms the actual relationship by a read (a 409 is NOT proof the pair is ours — only the read can establish that). A bind to a DIFFERENT static IP is rejected by the resource layer BEFORE Bind is called: either the pre-bind per-id read, or, when that read is ambiguous, the strict-listing corroboration, which classifies "bound to other" and fails closed.

func (*VPCFloatingIPClient) CorroborateBinding added in v1.8.0

func (f *VPCFloatingIPClient) CorroborateBinding(ctx context.Context, fipID, staticID string) (FloatingIPBindingState, error)

CorroborateBinding strictly classifies the FIP/static relationship from a COMPLETE HTTP 200 listing. Like vpc_static_ip's ListStrict, it FAILS CLOSED to "inconclusive": a listing that cannot prove the floating IP's state (null / empty / non-array body, an id-less entry, or the FIP simply not present) is NEVER read as negative evidence. Even when the FIP IS observed, the nested staticIp can itself be structurally incomplete (a staticIp object present but with an empty/omitted id): that too is Inconclusive, never negative evidence. Only a structurally COMPLETE observation yields a definite present-and- (unbound|bound-to-target|bound-to-other) classification.

The states are kept DISTINCT so the create path can never collapse "present & unbound" (safe to bind) with "present & bound to a DIFFERENT static IP" (must fail closed, never bind): that collapse was the anti-clobber defect. The classification itself is delegated to ClassifyFloatingIPBinding so the rule (including the id-less-nested-staticIp -> Inconclusive case) cannot drift between the client and the provider paths.

The "id" the live API returns inside FloatingIP.StaticIP is the static IP id (FloatingIPStaticIP.ID), so the same-pair test compares fip.StaticIP.ID to the target static IP id.

func (*VPCFloatingIPClient) DeprovisionUnbound added in v1.9.0

func (f *VPCFloatingIPClient) DeprovisionUnbound(ctx context.Context, fipID string, options *WaiterOptions) error

DeprovisionUnbound is the ONLY exported deletion path for a floating IP. It is gated AND confirmed BY CONSTRUCTION so a billable IP is deleted ONLY when it is provably safe and the deletion is provably complete:

  1. resolveUnboundProof: 404 -> nil (idempotent, the IP is authoritatively absent); error -> error; present -> continue, carrying POSITIVE proof of whether the RAW body shows all three associations PRESENT-and-null.
  2. Gate on that POSITIVE proof. A clearly-bound IP (non-empty nested staticIp.id) gets a typed refusal; ANY other not-proven-unbound state — a contradictory or id-less association, OR a body that simply OMITS the association fields (an omitted pointer is indistinguishable from null after decode, so absence of the fields is NOT proof of unbound) — FAILS CLOSED with NO DELETE issued ("association evidence inconclusive"). There is no listing-fallback-then-delete: a strict by-id read is sufficient and safer.
  3. deprovisionRaw: gone -> confirm; activityID -> wait; sync 2xx -> confirm.
  4. POSITIVE confirmation REQUIRED: a final ResolveByID MUST be 404. A still-200 is an error ("deprovision did not remove it"); 403/err fail closed. Success ALWAYS rests on a positive 404, never on a bare 2xx or an empty result.

func (*VPCFloatingIPClient) List added in v1.8.0

List retrieves floating IPs, optionally filtered by VPC ID.

func (*VPCFloatingIPClient) ListStrict added in v1.8.0

func (f *VPCFloatingIPClient) ListStrict(ctx context.Context) ([]*FloatingIP, error)

ListStrict retrieves the floating IPs and accepts ONLY a complete, structurally valid HTTP 200 array. It mirrors vpc_static_ip's ListStrict: it is the corroboration channel for the binding resource, so it must prove completeness or FAIL CLOSED — a listing that cannot prove the floating IP's state must never be read as negative evidence (the FIP "absent" or "not bound to our static IP") (#275/#281 hardening style applied to floating IPs).

Enforced beyond the 200 status:

  • a partial 206 — or any non-200 (201/403/5xx) — is rejected;
  • the body MUST be a JSON ARRAY. A 200 whose body is "null", empty, or a JSON object is NOT a list and cannot prove anything (json.Decoder would silently turn "null" into an empty slice);
  • every entry MUST carry a non-empty id, otherwise the snapshot is structurally incomplete and id-matching against it is unreliable.

No vpcId filter is applied: the corroboration must be able to observe the target floating IP wherever it lives.

func (*VPCFloatingIPClient) Provision added in v1.9.0

func (f *VPCFloatingIPClient) Provision(ctx context.Context, options *WaiterOptions) (string, error)

Provision provisions ONE floating IP and returns its id by composing ProvisionStart + WaitProvision, EXACTLY like static Create: a SYNC body id (if any) short-circuits and is returned directly (NEVER waited on with an empty activityID); otherwise it waits on the provision activity. A wait failure is wrapped WITH the activityID and manual-recovery text (the IP is billable) and NEVER yields (id, nil).

NOTE: the orphan-critical provider Create path does NOT call this composed helper — it inlines the split so it can log the activity id BEFORE waiting (see resource_vpc_floating_ip.go, C4 phase 3). Provision is the convenience path for ct-validate and tests; both honor the same syncID short-circuit.

func (*VPCFloatingIPClient) ProvisionStart added in v1.9.0

func (f *VPCFloatingIPClient) ProvisionStart(ctx context.Context) (activityID, syncID string, err error)

ProvisionStart issues POST /vpc/v1/floating_ips {"count":1} and reports how the platform acknowledged the provision WITHOUT waiting. It mirrors the static-IP CreateStart split exactly and returns EXACTLY ONE of:

  • activityID: the ASYNC path — a 201 carrying a Location header; the new floating IP id is resolved once that activity completes (see WaitProvision). This is the deployed live contract (201 + Location, EMPTY body).
  • syncID: the SYNC path — a 201 carrying a body id. Retained as a DEFENSIVE contract guard so a hypothetical sync 201 surfaces a usable id instead of an orphan; never observed live.

A 201 with NEITHER a Location nor a body id is a hard error (fail closed): the provision may have allocated a BILLABLE IP server-side, so the never-orphan backstop is the caller's pre-provision diagnostics / manual audit, NOT a silent id guess.

Like CreateStart it goes through doRequestWithToken (not doRequest): the live async provision returns a Location, so it must bypass the suite-wide ErrorOnUnexpectedActivity test guard that doRequest would trip on the EXPECTED Location.

func (*VPCFloatingIPClient) Read added in v1.8.0

Read retrieves a single floating IP by ID, for DATASOURCE use. It returns (nil, nil) when the floating IP is absent (404). Since #384 it uses requireNotFoundOrOK(resp, 404), so a genuine 403 is surfaced as an access-denied error rather than masked as not-found. The RESOURCE must not use this: it reads via ResolveByID, which treats 403 as a fail-closed error and ONLY an authoritative 404 as absence.

func (*VPCFloatingIPClient) ResolveBinding added in v1.9.0

func (f *VPCFloatingIPClient) ResolveBinding(ctx context.Context, fipID, staticID string) (FloatingIPBindingState, *FloatingIP, bool, error)

ResolveBinding is the binding RESOURCE's authoritative by-id read. Unlike the CorroborateBinding listing (which proves only that top-level ids are present, NOT that a per-entry staticIp key is present), this reads the floating IP by id and inspects the RAW 200 body, so it distinguishes a staticIp key that is OMITTED (structurally incomplete -> Inconclusive) from an explicit staticIp:null (-> Unbound). It mirrors resolveUnboundProof's raw-body discipline.

transport / 403 / 206 / other  -> (Inconclusive, nil, false, err)  fail closed
404                            -> (Inconclusive, nil, false, nil)  AUTHORITATIVE ABSENT
                                  (found=false is the SOLE drop signal for the binding)
200 + duplicate top-level keys -> (Inconclusive, nil, true, nil)
                                  (json keeps the LAST value, so a duplicated
                                  staticIp/id could decode to a false Unbound/target)
200 + empty/mismatched id      -> (Inconclusive, nil, true, err)   id guard
200 + staticIp OMITTED         -> (Inconclusive, fip, true, nil)
200 + staticIp PRESENT         -> ClassifyFloatingIPBinding(fip, staticID), fip, true, nil

found reports only "a 200 was received" (the FIP exists); the caller uses it as the sole authoritative-absence signal. fip is returned whenever the body decoded (for flattening floating_ip_address); the caller uses it only on a definite state.

func (*VPCFloatingIPClient) ResolveByID added in v1.9.0

func (f *VPCFloatingIPClient) ResolveByID(ctx context.Context, id string) (*FloatingIP, bool, error)

ResolveByID is the STRICT by-id read used by the floating-IP RESOURCE (create read-back, refresh, delete confirmation) — distinct from Read (datasources), which since #384 maps 404 to not-found and surfaces 403 as an error. ResolveByID returns a tri-state result and uses an EXPLICIT status switch instead of requireNotFoundOrOK, because for the resource only an AUTHORITATIVE 404 may drop state. The floating IP has NO listing-omission drop channel (unlike static IP's per-network strict listing), so a by-id 404 is the SOLE absence signal:

  • 200 -> decode + id-consistency guard -> (fip, true, nil)
  • 404 -> (nil, false, nil) AUTHORITATIVE ABSENT (the sole drop channel)
  • 403 -> (nil, false, err) forbidden is NOT absence (#303) — keep + fail
  • 206 / other -> (nil, false, err) a partial/unexpected status is never absence

The id-consistency guard fails closed when the 200 body carries an empty id or an id that does not match the requested one: a mismatched body must never be trusted to represent the requested floating IP.

func (*VPCFloatingIPClient) Unbind added in v1.8.0

func (f *VPCFloatingIPClient) Unbind(ctx context.Context, fipID, staticID string) (string, error)

Unbind removes the association between a floating IP and a static IP (asynchronous). The DELETE returns an activity (Location header); the caller waits for its completion. The floating IP itself is left intact (it is provisioned out-of-band and is not deletable here).

Tolerance mirrors Bind: an empty/sync body is tolerated, and a 409 Conflict is treated as a non-error idempotent success (the relationship may already be gone). The resource layer confirms the unbind by a read; a 404/403 on the call itself is surfaced as an error so the resource layer can apply its strict positive-confirmation idempotency rule.

func (*VPCFloatingIPClient) UpdateDescription added in v1.9.0

func (f *VPCFloatingIPClient) UpdateDescription(ctx context.Context, fipID, description string) (string, error)

UpdateDescription issues PATCH /vpc/v1/floating_ips/{id} {"description": value} and reports the async handle WITHOUT waiting. Unlike the static-IP PATCH (which is async-only and is always waited on), the floating-IP PATCH may be sync OR async, so the status is classified FIRST and a Location is read as an async handle ONLY on a success status (mirroring CreateStart, which calls requireHttpCodes before reading Location):

  • success {200,201,202,204} WITH Location -> (activityID, nil); caller WAITS.
  • 200/201/204 WITHOUT Location -> ("", nil) sync success; NO wait.
  • 202 WITHOUT Location -> FAIL CLOSED: a 202 Accepted with no activity handle is async-without-a-handle, so the update cannot be confirmed and must never be reported as success.
  • 206 / other -> error (requireHttpCodes).

Like CreateStart/ProvisionStart it uses doRequestWithToken so a legitimate Location bypasses the suite-wide ErrorOnUnexpectedActivity guard. The CALLER waits ONLY when the returned activityID is non-empty.

func (*VPCFloatingIPClient) WaitProvision added in v1.9.0

func (f *VPCFloatingIPClient) WaitProvision(ctx context.Context, activityID string, options *WaiterOptions) (string, error)

WaitProvision waits for a provision activity and returns the new floating IP id from the completed activity's single state Result. It uses the SAME R-M1 core as static WaitCreate (waitCreatedIDFromActivity, vpc.go): exactly one state, non-empty Result, NO UUID-format check. options controls activity-poll logging.

type VPCPrivateNetworkClient added in v1.8.0

type VPCPrivateNetworkClient struct {
	// contains filtered or unexported fields
}

VPCPrivateNetworkClient handles read operations on VPC private networks.

func (*VPCPrivateNetworkClient) List added in v1.8.0

List retrieves private networks, optionally filtered by VPC ID.

func (*VPCPrivateNetworkClient) Read added in v1.8.0

Read retrieves a single private network by ID. It returns (nil, nil) when the private network does not exist (404; since #384 the VPC API returns 404 for an absent resource, 403 only for access denied).

type VPCStaticIPClient added in v1.8.0

type VPCStaticIPClient struct {
	// contains filtered or unexported fields
}

VPCStaticIPClient handles read operations on VPC static IPs.

func (*VPCStaticIPClient) Create added in v1.8.0

func (s *VPCStaticIPClient) Create(ctx context.Context, privateNetworkID string, req *CreateStaticIPRequest, options *WaiterOptions) (string, error)

Create creates a static IP mapping on a private network and returns the new id by composing CreateStart + WaitCreate: a SYNC body id (if any) is returned directly; otherwise it waits on the create activity. A wait failure is wrapped WITH the activityID (so a caller/postmortem can correlate the orphan window) and NEVER yields (id, nil) — the provider must fail closed and not SetId (R-Q2).

func (*VPCStaticIPClient) CreateStart added in v1.9.0

func (s *VPCStaticIPClient) CreateStart(ctx context.Context, privateNetworkID string, req *CreateStaticIPRequest) (activityID, syncID string, err error)

CreateStart issues POST /vpc/v1/private_networks/{id}/static_ips and reports how the platform acknowledged the create WITHOUT waiting. It returns EXACTLY ONE of:

  • activityID: the ASYNC path — a 201 carrying a Location header; the new static IP id is resolved once that activity completes (see WaitCreate). This is the deployed live contract (2026-06: 201 + Location, EMPTY body).
  • syncID: the SYNC path — a 201 carrying a body static_ip_id. Retained as a DEFENSIVE contract guard so a hypothetical sync 201 surfaces a usable id instead of an orphan; never observed live.

A 201 with NEITHER a Location nor a static_ip_id is a hard error (fail closed): the create may have taken effect server-side, so the never-orphan backstop is the pre-create teardown net (cmd/ct-validate), NOT a silent id guess. This removes the old "resolve the id by listing the network and matching MAC+custom" path, which was orphan-prone (it could bind to a co-resident xoa IP, #311) and is moot now that the contract is proven async.

ResourceDescription is REQUIRED (see CreateStaticIPRequest): an empty/whitespace value is rejected HERE, before the POST, with an actionable error — a doomed request never reaches the API.

func (*VPCStaticIPClient) Delete added in v1.8.0

func (s *VPCStaticIPClient) Delete(ctx context.Context, id string) (string, error)

Delete deletes a static IP (asynchronous). The DELETE returns an activity (Location header); the caller waits for its completion.

func (*VPCStaticIPClient) List added in v1.8.0

func (s *VPCStaticIPClient) List(ctx context.Context, privateNetworkID string, filter *StaticIPFilter) ([]*StaticIP, error)

List retrieves the static IP mappings of a private network, optionally filtered by virtual machine ID.

func (*VPCStaticIPClient) ListStrict added in v1.8.0

func (s *VPCStaticIPClient) ListStrict(ctx context.Context, privateNetworkID string) ([]*StaticIP, error)

ListStrict retrieves the static IP mappings of a private network and accepts ONLY a complete, structurally valid HTTP 200 listing. Unlike List (which uses requireOK and would accept a 206 partial page), ListStrict is the deletion-evidence channel: it is what lets Read confirm a deletion and what lets Delete confirm a 403-absence, so it must prove completeness or FAIL CLOSED — a listing that cannot prove "every static IP on this network" must never be read as "the static IP is not present" (#275/#281).

"Provably complete" is enforced beyond the 200 status:

  • a partial 206 — or any non-200 (201/403/5xx) — is rejected;
  • the body MUST be a JSON ARRAY. A 200 whose body is "null", empty, or a JSON object is NOT a list and cannot prove absence (json.Decoder would silently turn "null" into an empty slice, i.e. a false "empty network");
  • every entry MUST carry a non-empty id. An entry without an id means the response is structurally incomplete, so id-matching against it is unreliable and the listing cannot be trusted as evidence.

No VirtualMachineID filter is applied: the confirmation must see every static IP on the network, not a VM-scoped subset.

func (*VPCStaticIPClient) Read added in v1.8.0

func (s *VPCStaticIPClient) Read(ctx context.Context, id string) (*StaticIP, error)

Read retrieves a single static IP by ID. It returns (nil, nil) when the static IP is absent (404). Since #384 it uses requireNotFoundOrOK(resp, 404): a genuine 403 is surfaced as an access-denied error, not masked as not-found.

func (*VPCStaticIPClient) ReadByMAC added in v1.8.0

func (s *VPCStaticIPClient) ReadByMAC(ctx context.Context, mac string) (*StaticIP, error)

ReadByMAC retrieves a single static IP by MAC address. It returns (nil, nil) when no static IP matches (404). Since #384 it uses requireNotFoundOrOK(resp, 404): a genuine 403 is surfaced as an access-denied error, not masked as not-found.

func (*VPCStaticIPClient) Update added in v1.8.0

Update patches a static IP (asynchronous). The PATCH returns an activity (Location header); the caller waits for its completion. Only the changed updatable fields should be set on req.

func (*VPCStaticIPClient) WaitCreate added in v1.9.0

func (s *VPCStaticIPClient) WaitCreate(ctx context.Context, activityID string, options *WaiterOptions) (string, error)

WaitCreate waits for a create activity and returns the new static IP id from the completed activity's single state Result — the same channel the provider reads via setIdFromActivityState. It fails closed when the activity does not complete with EXACTLY ONE state, or completes with an EMPTY Result (R-M1): a created id we cannot read must be an error, never an empty id that would orphan the resource via SetId(""). options controls activity-poll logging (caller-supplied, like every other waiter in this client).

The R-M1 core is shared with floating-IP provisioning via waitCreatedIDFromActivity (vpc.go); this method only supplies the static-IP diagnostic label, so static behavior is UNCHANGED (the error strings are byte-identical to the pre-extraction implementation).

type VPCVPCClient added in v1.8.0

type VPCVPCClient struct {
	// contains filtered or unexported fields
}

VPCVPCClient handles read operations on VPCs.

func (*VPCVPCClient) List added in v1.8.0

func (v *VPCVPCClient) List(ctx context.Context) ([]*VPC, error)

List retrieves all VPCs the caller can read.

func (*VPCVPCClient) Read added in v1.8.0

func (v *VPCVPCClient) Read(ctx context.Context, id string) (*VPC, error)

Read retrieves a single VPC by ID. It returns (nil, nil) when the VPC does not exist (404; since #384 the VPC API returns 404 for an absent resource, and 403 only for access denied) so callers can surface a precise not-found error.

type VirtualController

type VirtualController struct {
	ID               string
	VirtualMachineId string
	HotAddRemove     bool
	Type             string
	SubType          string
	Label            string
	Summary          string
	VirtualDisks     []string
}

type VirtualControllerClient

type VirtualControllerClient struct {
	// contains filtered or unexported fields
}

func (*VirtualControllerClient) Connect added in v0.11.0

func (n *VirtualControllerClient) Connect(ctx context.Context, id string) (string, error)

func (*VirtualControllerClient) Create added in v0.11.0

func (*VirtualControllerClient) Delete added in v0.11.0

func (n *VirtualControllerClient) Delete(ctx context.Context, id string) (string, error)

func (*VirtualControllerClient) Disconnect added in v0.11.0

func (n *VirtualControllerClient) Disconnect(ctx context.Context, id string) (string, error)

func (*VirtualControllerClient) List

func (*VirtualControllerClient) ListStrict added in v1.8.0

ListStrict behaves like List but requires a complete HTTP 200 answer: 206 is a partial listing and cannot prove an absence, and any other code (including 403) is an error rather than being mapped to an empty result. Callers using the listing as state-safety evidence must fail closed on anything else (#281).

func (*VirtualControllerClient) Mount added in v0.11.0

func (*VirtualControllerClient) Read added in v0.11.0

func (*VirtualControllerClient) Unmount added in v0.11.0

func (n *VirtualControllerClient) Unmount(ctx context.Context, id string) (string, error)

type VirtualControllerFilter added in v1.0.0

type VirtualControllerFilter struct {
	VirtualMachineId string   `filter:"virtualMachineId"`
	Types            []string `filter:"types"`
}

type VirtualDatacenter

type VirtualDatacenter struct {
	ID             string
	Name           string
	TenantID       string
	MachineManager BaseObject
	VCenter        BaseObject
}

type VirtualDatacenterClient

type VirtualDatacenterClient struct {
	// contains filtered or unexported fields
}

func (*VirtualDatacenterClient) List

func (*VirtualDatacenterClient) Read

type VirtualDatacenterFilter added in v0.6.0

type VirtualDatacenterFilter struct {
	Name             string `filter:"name"`
	MachineManagerId string `filter:"machineManagerId"`
}

type VirtualDisk

type VirtualDisk struct {
	ID               string
	Name             string
	VirtualMachineId string
	MachineManager   BaseObject
	Datastore        BaseObject
	Capacity         int
	DiskUnitNumber   int
	InstantAccess    bool
	NativeId         string
	DiskPath         string
	ProvisioningType string
	DiskMode         string
	Editable         bool
	Controller       struct {
		ID        string
		BusNumber int
		Type      string
	}
}

type VirtualDiskClient

type VirtualDiskClient struct {
	// contains filtered or unexported fields
}

func (*VirtualDiskClient) Create

func (*VirtualDiskClient) Delete

func (n *VirtualDiskClient) Delete(ctx context.Context, id string) (string, error)

func (*VirtualDiskClient) List

func (*VirtualDiskClient) ListStrict added in v1.8.0

func (v *VirtualDiskClient) ListStrict(ctx context.Context, filter *VirtualDiskFilter) ([]*VirtualDisk, error)

ListStrict behaves like List but requires a complete HTTP 200 answer: 206 is a partial listing and cannot prove an absence, and any other code (including 403) is an error rather than being mapped to an empty result. Callers using the listing as state-safety evidence must fail closed on anything else (#281).

func (*VirtualDiskClient) Mount

func (n *VirtualDiskClient) Mount(ctx context.Context, virtualMachineId string, path string) (string, error)

func (*VirtualDiskClient) Read

func (*VirtualDiskClient) Unmount

func (n *VirtualDiskClient) Unmount(ctx context.Context, id string) (string, error)

func (*VirtualDiskClient) Update

type VirtualDiskFilter added in v1.0.0

type VirtualDiskFilter struct {
	Name             string `filter:"name"`
	VirtualMachineID string `filter:"virtualMachineId"`
}

type VirtualMachine

type VirtualMachine struct {
	ID                  string
	Name                string
	Moref               string
	MachineManager      BaseObject
	Datacenter          BaseObject
	HostCluster         BaseObject
	Datastore           BaseObject
	DatastoreCluster    BaseObject
	ConsolidationNeeded bool
	Template            bool
	PowerState          string
	HardwareVersion     string
	NumCoresPerSocket   int
	OperatingSystem     struct {
		Name string
	}
	OperatingSystemMoref           string
	Cpu                            int
	CpuHotAddEnabled               bool
	CpuHotRemoveEnabled            bool
	MemoryHotAddEnabled            bool
	Memory                         int
	CpuUsage                       int
	MemoryUsage                    int
	Tools                          string
	ToolsVersion                   int
	DistributedVirtualPortGroupIds []string
	SppMode                        string
	Snapshoted                     bool
	TriggeredAlarms                []VirtualMachineTriggeredAlarm
	ReplicationConfig              VirtualMachineReplicationConfig
	ExtraConfig                    []VirtualMachineExtraConfig
	Storage                        VirtualMachineStorage
	BootOptions                    VirtualMachineBootOptions
	ExposeHardwareVirtualization   bool
}

type VirtualMachineBootOptions

type VirtualMachineBootOptions struct {
	Firmware             string
	BootDelay            int
	EnterBIOSSetup       bool
	BootRetryEnabled     bool
	BootRetryDelay       int
	EFISecureBootEnabled bool
}

type VirtualMachineClient

type VirtualMachineClient struct {
	// contains filtered or unexported fields
}

func (*VirtualMachineClient) Clone added in v0.2.0

func (*VirtualMachineClient) Create

func (*VirtualMachineClient) CustomizeGuestOS added in v0.12.0

func (v *VirtualMachineClient) CustomizeGuestOS(ctx context.Context, id string, req *CustomizeGuestOSRequest) (string, error)

func (*VirtualMachineClient) Delete

func (v *VirtualMachineClient) Delete(ctx context.Context, id string) (string, error)

func (*VirtualMachineClient) Guest added in v0.6.0

func (*VirtualMachineClient) List

func (*VirtualMachineClient) ListStrict added in v1.8.0

ListStrict behaves like List but requires a complete HTTP 200 answer: 206 is a partial listing and cannot prove an absence, and any other code (including 403) is an error rather than being mapped to an empty result. Callers using the listing as state-safety evidence must fail closed on anything else (#281).

func (*VirtualMachineClient) Power

func (*VirtualMachineClient) Read

func (*VirtualMachineClient) Recommendation added in v0.6.0

func (*VirtualMachineClient) Relocate added in v0.4.0

func (*VirtualMachineClient) Rename

func (v *VirtualMachineClient) Rename(ctx context.Context, id string, name string) (string, error)

func (*VirtualMachineClient) Update

func (*VirtualMachineClient) UpdateExtraConfig added in v1.3.0

func (v *VirtualMachineClient) UpdateExtraConfig(ctx context.Context, id string, req map[string]interface{}) (string, error)

type VirtualMachineDisk

type VirtualMachineDisk struct {
	Key               int
	DiskReplicationId string
}

type VirtualMachineExtraConfig

type VirtualMachineExtraConfig struct {
	Key   string
	Value string
}

type VirtualMachineFilter added in v1.0.0

type VirtualMachineFilter struct {
	Name             string   `filter:"name"`
	MachineManagerID string   `filter:"machineManagerId"`
	AllOptions       bool     `filter:"allOptions"`
	Datacenters      []string `filter:"datacenters"`
	Networks         []string `filter:"networks"`
	Datastores       []string `filter:"datastores"`
	Hosts            []string `filter:"hosts"`
	HostClusters     []string `filter:"hostClusters"`
}

type VirtualMachinePowerRecommendation added in v0.6.0

type VirtualMachinePowerRecommendation struct {
	Key             int    `json:"key"`
	HostClusterId   string `json:"hostClusterId"`
	HostId          string `json:"hostId"`
	HostClusterName string `json:"hostClusterName"`
	HostName        string `json:"hostName"`
}

type VirtualMachineRecommendationFilter added in v0.6.0

type VirtualMachineRecommendationFilter struct {
	Id            string `filter:"virtualMachineId"`
	DatacenterId  string `filter:"datacenterId"`
	HostClusterId string `filter:"hostClusterId"`
}

type VirtualMachineReplicationConfig

type VirtualMachineReplicationConfig struct {
	Generation            int
	VmReplicationId       string
	Rpo                   int
	QuiesceGuestEnabled   bool
	Paused                bool
	OppUpdatesEnabled     bool
	NetCompressionEnabled bool
	NetEncryptionEnabled  bool
	EncryptionDestination bool
	Disk                  []VirtualMachineDisk
}

type VirtualMachineStorage

type VirtualMachineStorage struct {
	Committed   int
	Uncommitted int
}

type VirtualMachineTriggeredAlarm added in v0.2.1

type VirtualMachineTriggeredAlarm struct {
	ID     string
	Status string
}

type VirtualSwitch

type VirtualSwitch struct {
	ID             string
	Name           string
	Moref          string
	FolderId       string
	MachineManager BaseObject
}

type VirtualSwitchClient

type VirtualSwitchClient struct {
	// contains filtered or unexported fields
}

func (*VirtualSwitchClient) List

func (*VirtualSwitchClient) Read

type VirtualSwitchFilter added in v0.8.1

type VirtualSwitchFilter struct {
	Name             string `filter:"name"`
	MachineManagerId string `filter:"machineManagerId"`
	DatacenterId     string `filter:"datacenterId"`
	HostClusterId    string `filter:"hostClusterId"`
}

type WaiterOptions added in v0.3.0

type WaiterOptions struct {
	Logger func(msg string)

	// NotFoundRetries bounds how many not-found reads of the activity are
	// tolerated BEFORE it is first seen — the eventual-consistency window that
	// opens right after a write returns its Location header and before
	// GET /activity/v1/activities/{id} becomes readable (#415). It counts the
	// TOTAL pre-seen not-found observations, and is deliberately NOT reset by an
	// interleaved transient read error (that has its own independent budget,
	// maxActivityReadRetries — FF-3). A value < 1 (the zero value / unset)
	// preserves the historical behaviour of tolerating exactly one initial
	// not-found. It NEVER relaxes the disappearance rule: an activity that was
	// seen and then vanished stays permanently failed regardless of this budget.
	NotFoundRetries int
}

type Worker

type Worker struct {
	ID                    string
	Name                  string
	FullName              string
	Vendor                string
	Version               string
	Build                 int
	LocaleVersion         string
	LocaleBuild           int
	OsType                string
	ProductLineID         string
	ApiType               string
	ApiVersion            string
	InstanceUuid          string
	LicenseProductName    string
	LicenseProductVersion int
	TenantID              string
	TenantName            string
}

type WorkerClient

type WorkerClient struct {
	// contains filtered or unexported fields
}

func (*WorkerClient) List

func (v *WorkerClient) List(ctx context.Context, name string) ([]*Worker, error)

func (*WorkerClient) Read

func (v *WorkerClient) Read(ctx context.Context, id string) (*Worker, error)

Source Files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL