Documentation
¶
Overview ¶
Package cloud documents the request and response payloads for version 2 of the sifi API.
Index ¶
- Constants
- func DatastoreStateStrings() []string
- func DatastoreTypeStrings() []string
- func FilterStrings() []string
- func ImageTypeStrings() []string
- func InstanceRecoveryStrings() []string
- func LCMStateStrings() []string
- func LockLevelStrings() []string
- func MigrationTypeStrings() []string
- func NetworkRecoveryStrings() []string
- func StatusStrings() []string
- type ACL
- type ACLService
- type ACLsResponse
- type AcctHistory
- type AddClusterDatastoreResponse
- type AddClusterHostResponse
- type AddClusterNetworkResponse
- type AddDataCenterClusterResponse
- type AddDataCenterDatastoreResponse
- type AddDataCenterGroupResponse
- type AddDataCenterHostResponse
- type AddDataCenterNetworkResponse
- type AddGroupAdminRequest
- type AddGroupAdminResponse
- type AddInstanceScheduleRequest
- type AddInstanceScheduleResponse
- type AddInstanceSecurityGroupResponse
- type AddNetworkAddressRangeRequest
- type AddNetworkAddressRangeResponse
- type AddUserGroupResponse
- type AllocateDocumentRequest
- type AllocateDocumentResponse
- type CalculateInstancesShowbackRequest
- type Capacity
- type ChangeDatastoreOwnershipRequest
- type ChangeDatastoreOwnershipResponse
- type ChangeDatastorePermissionsRequest
- type ChangeDatastorePermissionsResponse
- type ChangeDocumentOwnershipRequest
- type ChangeDocumentOwnershipResponse
- type ChangeDocumentPermissionsRequest
- type ChangeDocumentPermissionsResponse
- type ChangeImageOwnershipRequest
- type ChangeImageOwnershipResponse
- type ChangeImagePermissionsRequest
- type ChangeImagePermissionsResponse
- type ChangeImageTypeRequest
- type ChangeImageTypeResponse
- type ChangeInstanceGroupOwnershipRequest
- type ChangeInstanceGroupOwnershipResponse
- type ChangeInstanceGroupPermissionsRequest
- type ChangeInstanceGroupPermissionsResponse
- type ChangeInstanceOwnershipRequest
- type ChangeInstanceOwnershipResponse
- type ChangeInstancePermissionsRequest
- type ChangeInstancePermissionsResponse
- type ChangeMarketAppOwnershipRequest
- type ChangeMarketAppOwnershipResponse
- type ChangeMarketAppPermissionsRequest
- type ChangeMarketAppPermissionsResponse
- type ChangeMarketOwnershipRequest
- type ChangeMarketOwnershipResponse
- type ChangeMarketPermissionsRequest
- type ChangeMarketPermissionsResponse
- type ChangeNetworkOwnershipRequest
- type ChangeNetworkOwnershipResponse
- type ChangeNetworkPermissionsRequest
- type ChangeNetworkPermissionsResponse
- type ChangeNetworkTemplateOwnershipRequest
- type ChangeNetworkTemplateOwnershipResponse
- type ChangeNetworkTemplatePermissionsRequest
- type ChangeNetworkTemplatePermissionsResponse
- type ChangeRouterOwnershipRequest
- type ChangeRouterOwnershipResponse
- type ChangeRouterPermissionsRequest
- type ChangeRouterPermissionsResponse
- type ChangeSecurityGroupOwnershipRequest
- type ChangeSecurityGroupOwnershipResponse
- type ChangeSecurityGroupPermissionsRequest
- type ChangeSecurityGroupPermissionsResponse
- type ChangeTemplateOwnershipRequest
- type ChangeTemplateOwnershipResponse
- type ChangeTemplatePermissionsRequest
- type ChangeTemplatePermissionsResponse
- type ChangeUserAuthRequest
- type ChangeUserAuthResponse
- type ChangeUserGroupResponse
- type ChangeUserPasswordRequest
- type ChangeUserPasswordResponse
- type CloneDocumentRequest
- type CloneDocumentResponse
- type CloneImageRequest
- type CloneImageResponse
- type CloneNetworkTemplateRequest
- type CloneNetworkTemplateResponse
- type CloneSecurityGroupRequest
- type CloneSecurityGroupResponse
- type CloneTemplateRequest
- type CloneTemplateResponse
- type Cluster
- type ClusterResponse
- type ClusterService
- func (s ClusterService) AddClusterDatastore(ctx context.Context, id, datastore int) (*AddClusterDatastoreResponse, error)
- func (s ClusterService) AddClusterHost(ctx context.Context, id, host int) (*AddClusterHostResponse, error)
- func (s ClusterService) AddClusterNetwork(ctx context.Context, id, network int) (*AddClusterNetworkResponse, error)
- func (s ClusterService) Cluster(ctx context.Context, id int) (*ClusterResponse, error)
- func (s ClusterService) Clusters(ctx context.Context) (*ClustersResponse, error)
- func (s ClusterService) CreateCluster(ctx context.Context, req CreateClusterRequest) (*CreateClusterResponse, error)
- func (s ClusterService) DeleteCluster(ctx context.Context, id int) error
- func (s ClusterService) DeleteClusterDatastore(ctx context.Context, id, datastore int) error
- func (s ClusterService) DeleteClusterHost(ctx context.Context, id, host int) error
- func (s ClusterService) DeleteClusterNetwork(ctx context.Context, id, network int) error
- func (s ClusterService) RenameCluster(ctx context.Context, id int, req RenameClusterRequest) (*RenameClusterResponse, error)
- func (s ClusterService) UpdateCluster(ctx context.Context, id int, req UpdateClusterRequest) (*UpdateClusterResponse, error)
- type ClusterTemplate
- type ClustersResponse
- type CommitSecurityGroupRequest
- type CommitSecurityGroupResponse
- type Core
- type CreateACLRequest
- type CreateACLResponse
- type CreateClusterRequest
- type CreateClusterResponse
- type CreateDataCenterRequest
- type CreateDataCenterResponse
- type CreateDatastoreRequest
- type CreateDatastoreResponse
- type CreateGroupRequest
- type CreateGroupResponse
- type CreateHookRequest
- type CreateHookResponse
- type CreateHostRequest
- type CreateHostResponse
- type CreateImageRequest
- type CreateImageResponse
- type CreateInstanceDiskImageRequest
- type CreateInstanceDiskImageResponse
- type CreateInstanceDiskRequest
- type CreateInstanceDiskResponse
- type CreateInstanceDiskSnapshotRequest
- type CreateInstanceDiskSnapshotResponse
- type CreateInstanceGroupRequest
- type CreateInstanceGroupResponse
- type CreateInstanceNICRequest
- type CreateInstanceNICResponse
- type CreateInstanceRequest
- type CreateInstanceResponse
- type CreateInstanceSnapshotRequest
- type CreateInstanceSnapshotResponse
- type CreateMarketAppRequest
- type CreateMarketAppResponse
- type CreateMarketRequest
- type CreateMarketResponse
- type CreateNetworkRequest
- type CreateNetworkResponse
- type CreateNetworkTemplateRequest
- type CreateNetworkTemplateResponse
- type CreateRouterNICRequest
- type CreateRouterNICResponse
- type CreateRouterRequest
- type CreateRouterResponse
- type CreateSecurityGroupRequest
- type CreateSecurityGroupResponse
- type CreateTemplateRequest
- type CreateTemplateResponse
- type CreateUserRequest
- type CreateUserResponse
- type CreateVNCProxyRequest
- type CreateVNCProxyResponse
- type CreateZoneRequest
- type CreateZoneResponse
- type DataCenter
- type DataCenterResponse
- type DataCenterService
- func (s DataCenterService) AddDataCenterCluster(ctx context.Context, id, zone, cluster int) (*AddDataCenterClusterResponse, error)
- func (s DataCenterService) AddDataCenterDatastore(ctx context.Context, id, zone, datastore int) (*AddDataCenterDatastoreResponse, error)
- func (s DataCenterService) AddDataCenterGroup(ctx context.Context, id int) (*AddDataCenterGroupResponse, error)
- func (s DataCenterService) AddDataCenterHost(ctx context.Context, id, zone, host int) (*AddDataCenterHostResponse, error)
- func (s DataCenterService) AddDataCenterNetwork(ctx context.Context, id, zone, network int) (*AddDataCenterNetworkResponse, error)
- func (s DataCenterService) CreateDataCenter(ctx context.Context, req CreateDataCenterRequest) (*CreateDataCenterResponse, error)
- func (s DataCenterService) DataCenter(ctx context.Context, id int) (*DataCenterResponse, error)
- func (s DataCenterService) DataCenters(ctx context.Context) (*DataCentersResponse, error)
- func (s DataCenterService) DeleteDataCenter(ctx context.Context, id int) error
- func (s DataCenterService) RemoveDataCenterCluster(ctx context.Context, id, zone, cluster int) error
- func (s DataCenterService) RemoveDataCenterDatastore(ctx context.Context, id, zone, datastore int) error
- func (s DataCenterService) RemoveDataCenterGroup(ctx context.Context, id, group int) error
- func (s DataCenterService) RemoveDataCenterHost(ctx context.Context, id, zone, host int) error
- func (s DataCenterService) RemoveDataCenterNetwork(ctx context.Context, id, zone, network int) error
- func (s DataCenterService) RenameDataCenter(ctx context.Context, id int, req RenameDataCenterRequest) (*RenameDataCenterResponse, error)
- func (s DataCenterService) UpdateDataCenter(ctx context.Context, id int, req UpdateDataCenterRequest) (*UpdateDataCenterResponse, error)
- type DataCenterTemplate
- type DataCentersResponse
- type Datastore
- type DatastoreResponse
- type DatastoreService
- func (s DatastoreService) ChangeDatastoreOwnership(ctx context.Context, id string, req ChangeDatastoreOwnershipRequest) (*ChangeDatastoreOwnershipResponse, error)
- func (s DatastoreService) ChangeDatastorePermissions(ctx context.Context, id string, req ChangeDatastorePermissionsRequest) (*ChangeDatastorePermissionsResponse, error)
- func (s DatastoreService) CreateDatastore(ctx context.Context, req CreateDatastoreRequest) (*CreateDatastoreResponse, error)
- func (s DatastoreService) Datastore(ctx context.Context, id int) (*DatastoreResponse, error)
- func (s DatastoreService) Datastores(ctx context.Context) (*DatastoresResponse, error)
- func (s DatastoreService) DeleteDatastore(ctx context.Context, id string) error
- func (s DatastoreService) EnableDatastore(ctx context.Context, id int, req EnableDatastoreRequest) (*EnableDatastoreResponse, error)
- func (s DatastoreService) RenameDatastore(ctx context.Context, id string, req RenameDatastoreRequest) (*RenameDatastoreResponse, error)
- func (s DatastoreService) UpdateDatastore(ctx context.Context, id int, req UpdateDatastoreRequest) (*UpdateDatastoreResponse, error)
- type DatastoreState
- type DatastoreTemplate
- type DatastoreType
- type Datastores
- type DatastoresResponse
- type DeleteTemplateResponse
- type DeployInstanceRequest
- type DeployInstanceResponse
- type Document
- type DocumentResponse
- type DocumentService
- func (s DocumentService) AllocateDocument(ctx context.Context, req AllocateDocumentRequest) (*AllocateDocumentResponse, error)
- func (s DocumentService) ChangeDocumentOwnership(ctx context.Context, id int, req ChangeDocumentOwnershipRequest) (*ChangeDocumentOwnershipResponse, error)
- func (s DocumentService) ChangeDocumentPermissions(ctx context.Context, id int, req ChangeDocumentPermissionsRequest) (*ChangeDocumentPermissionsResponse, error)
- func (s DocumentService) CloneDocument(ctx context.Context, id int, req CloneDocumentRequest) (*CloneDocumentResponse, error)
- func (s DocumentService) DeleteDocument(ctx context.Context, id int) error
- func (s DocumentService) Document(ctx context.Context, id int) (*DocumentResponse, error)
- func (s DocumentService) Documents(ctx context.Context) (*DocumentsResponse, error)
- func (s DocumentService) LockDocument(ctx context.Context, id int, req LockDocumentRequest) (*LockDocumentResponse, error)
- func (s DocumentService) RenameDocument(ctx context.Context, id int, req RenameDocumentRequest) (*RenameDocumentResponse, error)
- func (s DocumentService) UnlockDocument(ctx context.Context, id int) (*UnlockDocumentResponse, error)
- func (s DocumentService) UpdateDocument(ctx context.Context, id int, req UpdateDocumentRequest) (*UpdateDocumentResponse, error)
- type DocumentsResponse
- type EnableDatastoreRequest
- type EnableDatastoreResponse
- type EnableImageRequest
- type EnableImageResponse
- type EnableMarketAppRequest
- type EnableMarketAppResponse
- type EnableMarketRequest
- type EnableMarketResponse
- type EnableUserRequest
- type EnableUserResponse
- type EnableZoneRequest
- type EnableZoneResponse
- type Filter
- type FlattenImageSnapshotResponse
- type Group
- type GroupQuotaResponse
- type GroupResponse
- type GroupService
- func (s GroupService) AddGroupAdmin(ctx context.Context, id int, req AddGroupAdminRequest) (*AddGroupAdminResponse, error)
- func (s GroupService) CreateGroup(ctx context.Context, req CreateGroupRequest) (*CreateGroupResponse, error)
- func (s GroupService) DeleteGroup(ctx context.Context, id int) error
- func (s GroupService) DeleteGroupAdmin(ctx context.Context, id, user int) error
- func (s GroupService) Group(ctx context.Context, id int) (*GroupResponse, error)
- func (s GroupService) GroupQuota(ctx context.Context) (*GroupQuotaResponse, error)
- func (s GroupService) Groups(ctx context.Context) (*GroupsResponse, error)
- func (s GroupService) SetGroupQuota(ctx context.Context, id int, req SetGroupQuotaRequest) (*SetGroupQuotaResponse, error)
- func (s GroupService) UpdateGroup(ctx context.Context, id int, req UpdateGroupRequest) (*UpdateGroupResponse, error)
- func (s GroupService) UpdateGroupQuota(ctx context.Context, req UpdateGroupQuotaRequest) (*UpdateGroupQuotaResponse, error)
- type GroupTemplate
- type GroupsResponse
- type HoldNetworkRequest
- type HoldNetworkResponse
- type Hook
- type HookExecutionRecord
- type HookExecutionResult
- type HookLog
- type HookLogResponse
- type HookResponse
- type HookService
- func (s HookService) CreateHook(ctx context.Context, req CreateHookRequest) (*CreateHookResponse, error)
- func (s HookService) DeleteHook(ctx context.Context, id int) error
- func (s HookService) Hook(ctx context.Context, id int) (*HookResponse, error)
- func (s HookService) HookLog(ctx context.Context, id int, start, end string) (*HookLogResponse, error)
- func (s HookService) Hooks(ctx context.Context) (*HooksResponse, error)
- func (s HookService) LockHook(ctx context.Context, id int, req LockHookRequest) (*LockHookResponse, error)
- func (s HookService) RenameHook(ctx context.Context, id int, req RenameHookRequest) (*RenameHookResponse, error)
- func (s HookService) RetryHook(ctx context.Context, id int, req RetryHookRequest) (*RetryHookResponse, error)
- func (s HookService) UnlockHook(ctx context.Context, id int, req UnlockHookRequest) (*UnlockHookResponse, error)
- func (s HookService) UpdateHook(ctx context.Context, id int, req UpdateHookRequest) (*UpdateHookResponse, error)
- type HookTemplate
- type HooksResponse
- type Host
- type HostMonitoring
- type HostMonitoringResponse
- type HostResponse
- type HostService
- func (s HostService) CreateHost(ctx context.Context, req CreateHostRequest) (*CreateHostResponse, error)
- func (s HostService) DeleteHost(ctx context.Context, id int) error
- func (s HostService) Host(ctx context.Context, id int) (*HostResponse, error)
- func (s HostService) HostMonitoring(ctx context.Context, id int) (*HostMonitoringResponse, error)
- func (s HostService) Hosts(ctx context.Context) (*HostsResponse, error)
- func (s HostService) HostsMonitoring(ctx context.Context, interval time.Duration) (*HostsMonitoringResponse, error)
- func (s HostService) RenameHost(ctx context.Context, id int, req RenameHostRequest) (*RenameHostResponse, error)
- func (s HostService) SetHostStatus(ctx context.Context, id int, req SetHostStatusRequest) (*SetHostStatusResponse, error)
- func (s HostService) UpdateComputeHost(ctx context.Context, id int, req UpdateHostRequest) (*UpdateHostResponse, error)
- type HostShare
- type HostTemplate
- type HostTemplateInstance
- type HostsMonitoringResponse
- type HostsResponse
- type HugePage
- type HyperCloudConfiguration
- type Image
- type ImageResponse
- type ImageService
- func (s ImageService) ChangeImageOwnership(ctx context.Context, id int, req ChangeImageOwnershipRequest) (*ChangeImageOwnershipResponse, error)
- func (s ImageService) ChangeImagePermissions(ctx context.Context, id int, req ChangeImagePermissionsRequest) (*ChangeImagePermissionsResponse, error)
- func (s ImageService) ChangeImageType(ctx context.Context, id int, req ChangeImageTypeRequest) (*ChangeImageTypeResponse, error)
- func (s ImageService) CloneImage(ctx context.Context, id int, req CloneImageRequest) (*CloneImageResponse, error)
- func (s ImageService) CreateImage(ctx context.Context, req CreateImageRequest) (*CreateImageResponse, error)
- func (s ImageService) DeleteImage(ctx context.Context, id int) error
- func (s ImageService) DeleteImageSnapshot(ctx context.Context, id, snapshot int) error
- func (s ImageService) EnableImage(ctx context.Context, id int, req EnableImageRequest) (*EnableImageResponse, error)
- func (s ImageService) FlattenImageSnapshot(ctx context.Context, id, snapshot int) (*FlattenImageSnapshotResponse, error)
- func (s ImageService) Image(ctx context.Context, id int) (*ImageResponse, error)
- func (s ImageService) Images(ctx context.Context) (*ImagesResponse, error)
- func (s ImageService) LockImage(ctx context.Context, id int, req LockImageRequest) (*LockImageResponse, error)
- func (s ImageService) RenameImage(ctx context.Context, id int, req RenameImageRequest) (*RenameImageResponse, error)
- func (s ImageService) RevertImageSnapshot(ctx context.Context, id, snapshot int) (*RevertImageSnapshotResponse, error)
- func (s ImageService) SetImagePersistent(ctx context.Context, id int, req SetImagePersistentRequest) (*SetImagePersistentResponse, error)
- func (s ImageService) UnlockImage(ctx context.Context, id int) (*UnlockImageResponse, error)
- func (s ImageService) UpdateImage(ctx context.Context, id int, req UpdateImageRequest) (*UpdateImageResponse, error)
- type ImageTemplate
- type ImageType
- type ImagesResponse
- type Instance
- type InstanceGroup
- type InstanceGroupResponse
- type InstanceGroupsResponse
- type InstanceMonitoringResponse
- type InstanceRecovery
- type InstanceResponse
- type InstanceService
- func (s InstanceService) AddInstanceSchedule(ctx context.Context, id int, req AddInstanceScheduleRequest) (*AddInstanceScheduleResponse, error)
- func (s InstanceService) AddInstanceSecurityGroup(ctx context.Context, id, nic, sg int) (*AddInstanceSecurityGroupResponse, error)
- func (s InstanceService) CalculateInstancesShowback(ctx context.Context, req CalculateInstancesShowbackRequest) error
- func (s InstanceService) ChangeInstanceGroupOwnership(ctx context.Context, id int, req ChangeInstanceGroupOwnershipRequest) (*ChangeInstanceGroupOwnershipResponse, error)
- func (s InstanceService) ChangeInstanceGroupPermissions(ctx context.Context, id int, req ChangeInstanceGroupPermissionsRequest) (*ChangeInstanceGroupPermissionsResponse, error)
- func (s InstanceService) ChangeInstanceOwnership(ctx context.Context, id int, req ChangeInstanceOwnershipRequest) (*ChangeInstanceOwnershipResponse, error)
- func (s InstanceService) ChangeInstancePermissions(ctx context.Context, id int, req ChangeInstancePermissionsRequest) (*ChangeInstancePermissionsResponse, error)
- func (s InstanceService) CreateInstance(ctx context.Context, req CreateInstanceRequest) (*CreateInstanceResponse, error)
- func (s InstanceService) CreateInstanceDisk(ctx context.Context, id int, req CreateInstanceDiskRequest) (*CreateInstanceDiskResponse, error)
- func (s InstanceService) CreateInstanceDiskImage(ctx context.Context, id, disk int, req CreateInstanceDiskImageRequest) (*CreateInstanceDiskImageResponse, error)
- func (s InstanceService) CreateInstanceDiskSnapshot(ctx context.Context, id, disk int, req CreateInstanceDiskSnapshotRequest) (*CreateInstanceDiskSnapshotResponse, error)
- func (s InstanceService) CreateInstanceNIC(ctx context.Context, id int, req CreateInstanceNICRequest) (*CreateInstanceNICResponse, error)
- func (s InstanceService) CreateInstanceSnapshot(ctx context.Context, id int, req CreateInstanceSnapshotRequest) (*CreateInstanceSnapshotResponse, error)
- func (s InstanceService) CreateVNCProxy(ctx context.Context, id int, req CreateVNCProxyRequest) (*CreateVNCProxyResponse, error)
- func (s InstanceService) DeleteInstanceDisk(ctx context.Context, id, disk int) error
- func (s InstanceService) DeleteInstanceDiskSnapshot(ctx context.Context, id, disk, snapshot int) error
- func (s InstanceService) DeleteInstanceGroup(ctx context.Context, id int) error
- func (s InstanceService) DeleteInstanceNIC(ctx context.Context, id, nic int) error
- func (s InstanceService) DeleteInstanceSchedule(ctx context.Context, id, schedule int) error
- func (s InstanceService) DeleteInstanceSecurityGroup(ctx context.Context, id, nic int) error
- func (s InstanceService) DeleteInstanceSnapshot(ctx context.Context, id, snapshot int) error
- func (s InstanceService) DeployInstance(ctx context.Context, id int, req DeployInstanceRequest) (*DeployInstanceResponse, error)
- func (s InstanceService) Instance(ctx context.Context, id int) (*InstanceResponse, error)
- func (s InstanceService) InstanceGroup(ctx context.Context, id int) (*InstanceGroupResponse, error)
- func (s InstanceService) InstanceGroups(ctx context.Context) (*InstanceGroupsResponse, error)
- func (s InstanceService) InstanceMonitoringData(ctx context.Context, id int) (*InstanceMonitoringResponse, error)
- func (s InstanceService) InstanceShowback(ctx context.Context, filter Filter, monthStart, monthEnd time.Month, ...) (*InstancesShowbackResponse, error)
- func (s InstanceService) Instances(ctx context.Context, state instance.State, extended bool) (*InstancesResponse, error)
- func (s InstanceService) InstancesAccountingData(ctx context.Context, filter Filter, start, end time.Time) (*InstancesAccountingResponse, error)
- func (s InstanceService) InstancesMonitoringData(ctx context.Context, filter Filter, seconds int) (*InstancesMonitoringResponse, error)
- func (s InstanceService) InstancesSet(ctx context.Context, ids ...int) (*InstancesResponse, error)
- func (s InstanceService) LockInstance(ctx context.Context, id int, req LockInstanceRequest) (*LockInstanceResponse, error)
- func (s InstanceService) LockInstanceGroup(ctx context.Context, id int, req LockInstanceGroupRequest) (*LockInstanceGroupResponse, error)
- func (s InstanceService) MoveInstance(ctx context.Context, id int, req MoveInstanceRequest) (*MoveInstanceResponse, error)
- func (s InstanceService) RecoverInstance(ctx context.Context, id int, req RecoverInstanceRequest) (*RecoverInstanceResponse, error)
- func (s InstanceService) RenameInstance(ctx context.Context, id int, req RenameInstanceRequest) (*RenameInstanceResponse, error)
- func (s InstanceService) RenameInstanceDiskSnapshot(ctx context.Context, id, disk, snapshot int, ...) (*RenameInstanceDiskSnapshotResponse, error)
- func (s InstanceService) RenameInstanceGroup(ctx context.Context, id int, req RenameInstanceGroupRequest) (*RenameInstanceGroupResponse, error)
- func (s InstanceService) ResizeInstance(ctx context.Context, id int, req ResizeInstanceRequest) (*ResizeInstanceResponse, error)
- func (s InstanceService) ResizeInstanceDisk(ctx context.Context, id, disk int, req ResizeInstanceDiskRequest) (*ResizeInstanceDiskResponse, error)
- func (s InstanceService) RevertInstanceDiskSnapshot(ctx context.Context, id, disk, snapshot int) (*RevertInstanceDiskSnapshotResponse, error)
- func (s InstanceService) RevertInstanceSnapshot(ctx context.Context, id, snapshot int) (*RevertInstanceSnapshotResponse, error)
- func (s InstanceService) SetInstanceAction(ctx context.Context, id int, req SetInstanceActionRequest) (*SetInstanceActionResponse, error)
- func (s InstanceService) UnlockInstance(ctx context.Context, id int) (*UnlockInstanceResponse, error)
- func (s InstanceService) UnlockInstanceGroup(ctx context.Context, id int) (*UnlockInstanceGroupResponse, error)
- func (s InstanceService) UpdateInstanceConfig(ctx context.Context, id int, req UpdateInstanceConfigRequest) (*UpdateInstanceConfigResponse, error)
- func (s InstanceService) UpdateInstanceGroup(ctx context.Context, id int, req *UpdateInstanceGroupRequest) (*UpdateInstanceGroupResponse, error)
- func (s InstanceService) UpdateInstanceSchedule(ctx context.Context, id int, req UpdateInstanceScheduleRequest) (*UpdateInstanceScheduleResponse, error)
- func (s InstanceService) UpdateInstanceTemplate(ctx context.Context, id int, req UpdateInstanceTemplateRequest) (*UpdateInstanceTemplateResponse, error)
- type InstanceTemplate
- type InstancesAccountingResponse
- type InstancesMonitoringResponse
- type InstancesResponse
- type InstancesShowbackResponse
- type InstantiateNetworkTemplateRequest
- type InstantiateNetworkTemplateResponse
- type InstantiateRouterRequest
- type InstantiateRouterResponse
- type InstantiateTemplateRequest
- type InstantiateTemplateResponse
- type LCMState
- type Lock
- type LockDocumentRequest
- type LockDocumentResponse
- type LockHookRequest
- type LockHookResponse
- type LockImageRequest
- type LockImageResponse
- type LockInstanceGroupRequest
- type LockInstanceGroupResponse
- type LockInstanceRequest
- type LockInstanceResponse
- type LockLevel
- type LockMarketAppRequest
- type LockMarketAppResponse
- type LockNetworkRequest
- type LockNetworkResponse
- type LockNetworkTemplateRequest
- type LockNetworkTemplateResponse
- type LockRouterRequest
- type LockRouterResponse
- type LockTemplateRequest
- type LockTemplateResponse
- type LockedInstance
- type MarketAppResponse
- type MarketAppsResponse
- type MarketResponse
- type MarketService
- func (s MarketService) ChangeMarketAppOwnership(ctx context.Context, id, app int, req ChangeMarketAppOwnershipRequest) (*ChangeMarketAppOwnershipResponse, error)
- func (s MarketService) ChangeMarketAppPermissions(ctx context.Context, id, app int, req ChangeMarketAppPermissionsRequest) (*ChangeMarketAppPermissionsResponse, error)
- func (s MarketService) ChangeMarketOwnership(ctx context.Context, id int, req ChangeMarketOwnershipRequest) (*ChangeMarketOwnershipResponse, error)
- func (s MarketService) ChangeMarketPermissions(ctx context.Context, id int, req ChangeMarketPermissionsRequest) (*ChangeMarketPermissionsResponse, error)
- func (s MarketService) CreateMarket(ctx context.Context, req CreateMarketRequest) (*CreateMarketResponse, error)
- func (s MarketService) CreateMarketApp(ctx context.Context, id int, req CreateMarketAppRequest) (*CreateMarketAppResponse, error)
- func (s MarketService) DeleteMarket(ctx context.Context, id int) error
- func (s MarketService) DeleteMarketApp(ctx context.Context, id, app int) error
- func (s MarketService) EnableMarket(ctx context.Context, id int, req EnableMarketRequest) (*EnableMarketResponse, error)
- func (s MarketService) EnableMarketApp(ctx context.Context, id, app int, req EnableMarketAppRequest) (*EnableMarketAppResponse, error)
- func (s MarketService) LockMarketApp(ctx context.Context, id, app int, req LockMarketAppRequest) (*LockMarketAppResponse, error)
- func (s MarketService) Market(ctx context.Context, id int) (*MarketResponse, error)
- func (s MarketService) MarketApp(ctx context.Context, id int) (*MarketAppResponse, error)
- func (s MarketService) MarketApps(ctx context.Context) (*MarketAppsResponse, error)
- func (s MarketService) Markets(ctx context.Context) (*MarketsResponse, error)
- func (s MarketService) RenameMarket(ctx context.Context, id int, req RenameMarketRequest) (*RenameMarketResponse, error)
- func (s MarketService) RenameMarketApp(ctx context.Context, id, app int, req RenameMarketAppRequest) (*RenameMarketAppResponse, error)
- func (s MarketService) UnlockMarketApp(ctx context.Context, id, app int) (*UnlockMarketAppResponse, error)
- func (s MarketService) UpdateMarket(ctx context.Context, id int, req UpdateMarketRequest) (*UpdateMarketResponse, error)
- func (s MarketService) UpdateMarketApp(ctx context.Context, id, app int, req UpdateMarketAppRequest) (*UpdateMarketAppResponse, error)
- type Marketplace
- type MarketplaceApp
- type MarketsResponse
- type Memory
- type MigrationType
- type MoveInstanceRequest
- type MoveInstanceResponse
- type Network
- type NetworkRecovery
- type NetworkResponse
- type NetworkService
- func (s NetworkService) AddNetworkAddressRange(ctx context.Context, id int, req AddNetworkAddressRangeRequest) (*AddNetworkAddressRangeResponse, error)
- func (s NetworkService) ChangeNetworkOwnership(ctx context.Context, id int, req ChangeNetworkOwnershipRequest) (*ChangeNetworkOwnershipResponse, error)
- func (s NetworkService) ChangeNetworkPermissions(ctx context.Context, id int, req ChangeNetworkPermissionsRequest) (*ChangeNetworkPermissionsResponse, error)
- func (s NetworkService) ChangeNetworkTemplateOwnership(ctx context.Context, id int, req ChangeNetworkTemplateOwnershipRequest) (*ChangeNetworkTemplateOwnershipResponse, error)
- func (s NetworkService) ChangeNetworkTemplatePermissions(ctx context.Context, id int, req ChangeNetworkTemplatePermissionsRequest) (*ChangeNetworkTemplatePermissionsResponse, error)
- func (s NetworkService) CloneNetworkTemplate(ctx context.Context, id int, req CloneNetworkTemplateRequest) (*CloneNetworkTemplateResponse, error)
- func (s NetworkService) CreateNetwork(ctx context.Context, req CreateNetworkRequest) (*CreateNetworkResponse, error)
- func (s NetworkService) CreateNetworkTemplate(ctx context.Context, req CreateNetworkTemplateRequest) (*CreateNetworkTemplateResponse, error)
- func (s NetworkService) DeleteNetwork(ctx context.Context, id int) error
- func (s NetworkService) DeleteNetworkAddressRange(ctx context.Context, id, ar int) error
- func (s NetworkService) DeleteNetworkTemplate(ctx context.Context, id int) error
- func (s NetworkService) FreeNetworkAddressRange(ctx context.Context, id, ar int) error
- func (s NetworkService) HoldNetwork(ctx context.Context, id int, req HoldNetworkRequest) (*HoldNetworkResponse, error)
- func (s NetworkService) InstantiateNetworkTemplate(ctx context.Context, id int, req InstantiateNetworkTemplateRequest) (*InstantiateNetworkTemplateResponse, error)
- func (s NetworkService) LockNetwork(ctx context.Context, id int, req LockNetworkRequest) (*LockNetworkResponse, error)
- func (s NetworkService) LockNetworkTemplate(ctx context.Context, id int, req LockNetworkTemplateRequest) (*LockNetworkTemplateResponse, error)
- func (s NetworkService) Network(ctx context.Context, id int) (*NetworkResponse, error)
- func (s NetworkService) NetworkTemplate(ctx context.Context, id int) (*NetworkTemplateResponse, error)
- func (s NetworkService) NetworkTemplates(ctx context.Context) (*NetworkTemplatesResponse, error)
- func (s NetworkService) Networks(ctx context.Context) (*NetworksResponse, error)
- func (s NetworkService) RecoverNetworks(ctx context.Context, id int, req RecoverNetworkRequest) (*RecoverNetworkResponse, error)
- func (s NetworkService) ReleaseNetwork(ctx context.Context, id int, req ReleaseNetworkRequest) (*ReleaseNetworkResponse, error)
- func (s NetworkService) RenameNetwork(ctx context.Context, id int, req RenameNetworkRequest) (*RenameNetworkResponse, error)
- func (s NetworkService) RenameNetworkTemplate(ctx context.Context, id int, req RenameNetworkTemplateRequest) (*RenameNetworkTemplateResponse, error)
- func (s NetworkService) ReserveNetwork(ctx context.Context, id int, req ReserveNetworkRequest) (*ReserveNetworkResponse, error)
- func (s NetworkService) UnlockNetwork(ctx context.Context, id int) (*UnlockNetworkResponse, error)
- func (s NetworkService) UnlockNetworkTemplate(ctx context.Context, id int) (*UnlockNetworkTemplateResponse, error)
- func (s NetworkService) UpdateNetwork(ctx context.Context, id int, req UpdateNetworkRequest) (*UpdateNetworkResponse, error)
- func (s NetworkService) UpdateNetworkAddressRange(ctx context.Context, id int, req UpdateNetworkAddressRangeRequest) (*UpdateNetworkAddressRangeResponse, error)
- func (s NetworkService) UpdateNetworkTemplate(ctx context.Context, id int, req UpdateNetworkTemplateRequest) (*UpdateNetworkTemplateResponse, error)
- type NetworkTemplate
- type NetworkTemplateResponse
- type NetworkTemplatesResponse
- type NetworksResponse
- type Node
- type PCI
- type Period
- type Permissions
- type Perms
- type RaftStatus
- type RecoverInstanceRequest
- type RecoverInstanceResponse
- type RecoverNetworkRequest
- type RecoverNetworkResponse
- type ReleaseNetworkRequest
- type ReleaseNetworkResponse
- type RenameClusterRequest
- type RenameClusterResponse
- type RenameDataCenterRequest
- type RenameDataCenterResponse
- type RenameDatastoreRequest
- type RenameDatastoreResponse
- type RenameDocumentRequest
- type RenameDocumentResponse
- type RenameHookRequest
- type RenameHookResponse
- type RenameHostRequest
- type RenameHostResponse
- type RenameImageRequest
- type RenameImageResponse
- type RenameInstanceDiskSnapshotRequest
- type RenameInstanceDiskSnapshotResponse
- type RenameInstanceGroupRequest
- type RenameInstanceGroupResponse
- type RenameInstanceRequest
- type RenameInstanceResponse
- type RenameMarketAppRequest
- type RenameMarketAppResponse
- type RenameMarketRequest
- type RenameMarketResponse
- type RenameNetworkRequest
- type RenameNetworkResponse
- type RenameNetworkTemplateRequest
- type RenameNetworkTemplateResponse
- type RenameRouterRequest
- type RenameRouterResponse
- type RenameSecurityGroupRequest
- type RenameSecurityGroupResponse
- type RenameTemplateRequest
- type RenameTemplateResponse
- type RenameZoneRequest
- type RenameZoneResponse
- type ReserveNetworkRequest
- type ReserveNetworkResponse
- type ResizeInstanceDiskRequest
- type ResizeInstanceDiskResponse
- type ResizeInstanceRequest
- type ResizeInstanceResponse
- type RetryHookRequest
- type RetryHookResponse
- type RevertImageSnapshotResponse
- type RevertInstanceDiskSnapshotResponse
- type RevertInstanceSnapshotResponse
- type Router
- type RouterResponse
- type RouterService
- func (s RouterService) ChangeRouterOwnership(ctx context.Context, id int, req ChangeRouterOwnershipRequest) (*ChangeRouterOwnershipResponse, error)
- func (s RouterService) ChangeRouterPermissions(ctx context.Context, id int, req ChangeRouterPermissionsRequest) (*ChangeRouterPermissionsResponse, error)
- func (s RouterService) CreateRouter(ctx context.Context, req CreateRouterRequest) (*CreateRouterResponse, error)
- func (s RouterService) CreateRouterNIC(ctx context.Context, id int, req CreateRouterNICRequest) (*CreateRouterNICResponse, error)
- func (s RouterService) DeleteRouter(ctx context.Context, id int) error
- func (s RouterService) DeleteRouterNIC(ctx context.Context, id int) error
- func (s RouterService) InstantiateRouter(ctx context.Context, id int, req InstantiateRouterRequest) (*InstantiateRouterResponse, error)
- func (s RouterService) LockRouter(ctx context.Context, id int, req LockRouterRequest) (*LockRouterResponse, error)
- func (s RouterService) RenameRouter(ctx context.Context, id int, req RenameRouterRequest) (*RenameRouterResponse, error)
- func (s RouterService) Router(ctx context.Context, id int) (*RouterResponse, error)
- func (s RouterService) Routers(ctx context.Context) (*RoutersResponse, error)
- func (s RouterService) UnlockRouter(ctx context.Context, id int) (*UnlockRouterResponse, error)
- func (s RouterService) UpdateRouter(ctx context.Context, id int, req UpdateRouterRequest) (*UpdateRouterResponse, error)
- type RoutersResponse
- type SecurityGroup
- type SecurityGroupResponse
- type SecurityGroupRule
- type SecurityGroupService
- func (s SecurityGroupService) ChangeSecurityGroupOwnership(ctx context.Context, id int, req ChangeSecurityGroupOwnershipRequest) (*ChangeSecurityGroupOwnershipResponse, error)
- func (s SecurityGroupService) ChangeSecurityGroupPermissions(ctx context.Context, id int, req ChangeSecurityGroupPermissionsRequest) (*ChangeSecurityGroupPermissionsResponse, error)
- func (s SecurityGroupService) CloneSecurityGroup(ctx context.Context, id int, req CloneSecurityGroupRequest) (*CloneSecurityGroupResponse, error)
- func (s SecurityGroupService) CommitSecurityGroup(ctx context.Context, id int, req CommitSecurityGroupRequest) (*CommitSecurityGroupResponse, error)
- func (s SecurityGroupService) CreateSecurityGroup(ctx context.Context, req CreateSecurityGroupRequest) (*CreateSecurityGroupResponse, error)
- func (s SecurityGroupService) DeleteSecurityGroup(ctx context.Context, id int) error
- func (s SecurityGroupService) RenameSecurityGroup(ctx context.Context, id int, req RenameSecurityGroupRequest) (*RenameSecurityGroupResponse, error)
- func (s SecurityGroupService) SecurityGroup(ctx context.Context, id int) (*SecurityGroupResponse, error)
- func (s SecurityGroupService) SecurityGroups(ctx context.Context) (*SecurityGroupsResponse, error)
- func (s SecurityGroupService) UpdateSecurityGroup(ctx context.Context, id int, req UpdateSecurityGroupRequest) (*UpdateSecurityGroupResponse, error)
- type SecurityGroupTemplate
- type SecurityGroupsResponse
- type Server
- type Service
- type SetGroupQuotaRequest
- type SetGroupQuotaResponse
- type SetHostStatusRequest
- type SetHostStatusResponse
- type SetImagePersistentRequest
- type SetImagePersistentResponse
- type SetInstanceActionRequest
- type SetInstanceActionResponse
- type SetUserQuotaRequest
- type SetUserQuotaResponse
- type Showback
- type Status
- type SunstoneTemplate
- type System
- type SystemConfigResponse
- type SystemService
- type SystemVersionResponse
- type Template
- type TemplateResponse
- type TemplateService
- func (s TemplateService) ChangeTemplateOwnership(ctx context.Context, id int, req ChangeTemplateOwnershipRequest) (*ChangeTemplateOwnershipResponse, error)
- func (s TemplateService) ChangeTemplatePermissions(ctx context.Context, id int, req ChangeTemplatePermissionsRequest) (*ChangeTemplatePermissionsResponse, error)
- func (s TemplateService) CloneTemplate(ctx context.Context, id int, req CloneTemplateRequest) (*CloneTemplateResponse, error)
- func (s TemplateService) CreateTemplate(ctx context.Context, req CreateTemplateRequest) (*CreateTemplateResponse, error)
- func (s TemplateService) DeleteTemplate(ctx context.Context, id int) error
- func (s TemplateService) InstantiateTemplate(ctx context.Context, id int, req InstantiateTemplateRequest) (*InstantiateTemplateResponse, error)
- func (s TemplateService) LockTemplate(ctx context.Context, id int, req LockTemplateRequest) (*LockTemplateResponse, error)
- func (s TemplateService) RenameTemplate(ctx context.Context, id int, req RenameTemplateRequest) (*RenameTemplateResponse, error)
- func (s TemplateService) Template(ctx context.Context, id int) (*TemplateResponse, error)
- func (s TemplateService) Templates(ctx context.Context) (*TemplatesResponse, error)
- func (s TemplateService) UnlockTemplate(ctx context.Context, id int) (*UnlockTemplateResponse, error)
- func (s TemplateService) UpdateTemplate(ctx context.Context, id int, req UpdateTemplateRequest) (*UpdateTemplateResponse, error)
- type TemplatesResponse
- type UnlockDocumentResponse
- type UnlockHookRequest
- type UnlockHookResponse
- type UnlockImageResponse
- type UnlockInstanceGroupResponse
- type UnlockInstanceResponse
- type UnlockMarketAppResponse
- type UnlockNetworkResponse
- type UnlockNetworkTemplateResponse
- type UnlockRouterResponse
- type UnlockTemplateResponse
- type UpdateClusterRequest
- type UpdateClusterResponse
- type UpdateDataCenterRequest
- type UpdateDataCenterResponse
- type UpdateDatastoreRequest
- type UpdateDatastoreResponse
- type UpdateDefaultUserQuotaRequest
- type UpdateDefaultUserQuotaResponse
- type UpdateDocumentRequest
- type UpdateDocumentResponse
- type UpdateGroupQuotaRequest
- type UpdateGroupQuotaResponse
- type UpdateGroupRequest
- type UpdateGroupResponse
- type UpdateHookRequest
- type UpdateHookResponse
- type UpdateHostRequest
- type UpdateHostResponse
- type UpdateImageRequest
- type UpdateImageResponse
- type UpdateInstanceConfigRequest
- type UpdateInstanceConfigResponse
- type UpdateInstanceGroupRequest
- type UpdateInstanceGroupResponse
- type UpdateInstanceScheduleRequest
- type UpdateInstanceScheduleResponse
- type UpdateInstanceTemplateRequest
- type UpdateInstanceTemplateResponse
- type UpdateMarketAppRequest
- type UpdateMarketAppResponse
- type UpdateMarketRequest
- type UpdateMarketResponse
- type UpdateNetworkAddressRangeRequest
- type UpdateNetworkAddressRangeResponse
- type UpdateNetworkRequest
- type UpdateNetworkResponse
- type UpdateNetworkTemplateRequest
- type UpdateNetworkTemplateResponse
- type UpdateRouterRequest
- type UpdateRouterResponse
- type UpdateSecurityGroupRequest
- type UpdateSecurityGroupResponse
- type UpdateTemplateRequest
- type UpdateTemplateResponse
- type UpdateUserRequest
- type UpdateUserResponse
- type UpdateZoneRequest
- type UpdateZoneResponse
- type User
- type UserDatastore
- type UserDefaultQuotas
- type UserImage
- type UserInstance
- type UserLoginRequest
- type UserLoginResponse
- type UserLoginToken
- type UserNetwork
- type UserQuotaResponse
- type UserResponse
- type UserService
- func (s UserService) AddUserGroup(ctx context.Context, id, group int) (*AddUserGroupResponse, error)
- func (s UserService) ChangeUserAuth(ctx context.Context, id int, req ChangeUserAuthRequest) (*ChangeUserAuthResponse, error)
- func (s UserService) ChangeUserGroup(ctx context.Context, id, group int) (*ChangeUserGroupResponse, error)
- func (s UserService) ChangeUserPassword(ctx context.Context, id int, req ChangeUserPasswordRequest) (*ChangeUserPasswordResponse, error)
- func (s UserService) CreateUser(ctx context.Context, req CreateUserRequest) (*CreateUserResponse, error)
- func (s UserService) DeleteUser(ctx context.Context, id int) error
- func (s UserService) DeleteUserGroup(ctx context.Context, id, group int) error
- func (s UserService) EnableUser(ctx context.Context, id int, req EnableUserRequest) (*EnableUserResponse, error)
- func (s UserService) SetUserQuota(ctx context.Context, id int, req SetUserQuotaRequest) (*SetUserQuotaResponse, error)
- func (s UserService) UpdateDefaultUserQuota(ctx context.Context, req UpdateDefaultUserQuotaRequest) (*UpdateDefaultUserQuotaResponse, error)
- func (s UserService) UpdateUser(ctx context.Context, id int, req UpdateUserRequest) (*UpdateUserResponse, error)
- func (s UserService) User(ctx context.Context, id int) (*UserResponse, error)
- func (s UserService) UserQuota(ctx context.Context) (*UserQuotaResponse, error)
- func (s UserService) Users(ctx context.Context) (*UsersResponse, error)
- type UserTemplate
- type UsersResponse
- type Zone
- type ZoneResponse
- type ZoneService
- func (s ZoneService) CreateZone(ctx context.Context, req CreateZoneRequest) (*CreateZoneResponse, error)
- func (s ZoneService) DeleteZone(ctx context.Context, id int) error
- func (s ZoneService) EnableZone(ctx context.Context, id int, req EnableZoneRequest) (*EnableZoneResponse, error)
- func (s ZoneService) RenameZone(ctx context.Context, id int, req RenameZoneRequest) (*RenameZoneResponse, error)
- func (s ZoneService) UpdateZone(ctx context.Context, id int, req UpdateZoneRequest) (*UpdateZoneResponse, error)
- func (s ZoneService) Zone(ctx context.Context, id int) (*ZoneResponse, error)
- func (s ZoneService) Zones(ctx context.Context) (*ZonesResponse, error)
- func (s ZoneService) ZonesRaftStatus(ctx context.Context) (*ZonesRaftStatusResponse, error)
- type ZoneTemplate
- type ZonesRaftStatusResponse
- type ZonesResponse
Constants ¶
const ( PathPrefix = "cloud" AccessControlListPath = "acl" ClusterPath = "cluster" DataCenterPath = "datacenter" DatastorePath = "datastore" DocumentPath = "document" GroupPath = "group" HookPath = "hook" HostPath = "host" ImagePath = "image" InstanceGroupPath = "instance-group" InstancePath = "instance" MarketPath = "market" NetworkPath = "network" RouterPath = "router" SecurityGroupPath = "security-group" SystemPath = "system" TemplatePath = "template" UserPath = "user" ZonePath = "zone" )
Root path for API endpoint.
Variables ¶
This section is empty.
Functions ¶
func DatastoreStateStrings ¶
func DatastoreStateStrings() []string
DatastoreStateStrings returns a slice of all String values of the enum
func DatastoreTypeStrings ¶
func DatastoreTypeStrings() []string
DatastoreTypeStrings returns a slice of all String values of the enum
func FilterStrings ¶
func FilterStrings() []string
FilterStrings returns a slice of all String values of the enum
func ImageTypeStrings ¶
func ImageTypeStrings() []string
ImageTypeStrings returns a slice of all String values of the enum
func InstanceRecoveryStrings ¶
func InstanceRecoveryStrings() []string
InstanceRecoveryStrings returns a slice of all String values of the enum
func LCMStateStrings ¶
func LCMStateStrings() []string
LCMStateStrings returns a slice of all String values of the enum
func LockLevelStrings ¶
func LockLevelStrings() []string
LockLevelStrings returns a slice of all String values of the enum
func MigrationTypeStrings ¶
func MigrationTypeStrings() []string
MigrationTypeStrings returns a slice of all String values of the enum
func NetworkRecoveryStrings ¶ added in v0.4.0
func NetworkRecoveryStrings() []string
NetworkRecoveryStrings returns a slice of all String values of the enum
func StatusStrings ¶
func StatusStrings() []string
StatusStrings returns a slice of all String values of the enum
Types ¶
type ACL ¶
type ACL struct {
ID int `json:"id" yaml:"id"`
// 32 bits 32 bits
// +-----------------------+-----------------------+
// | Type (user,group,all) | user/group ID |
// +-----------------------+-----------------------+
User int64 `json:"user" yaml:"user"`
// 32 bits 32 bits
// +-----------------------+-----------------------+
// | Type (VM, Host...) | resource ID |
// +-----------------------+-----------------------+
Resource int64 `json:"resource" yaml:"resource"`
// 64 bits
// +-----------------------------------------------+
// | Actions (MANAGE, CREATE, USE... |
// +-----------------------------------------------+
Rights int64 `json:"rights" yaml:"rights"`
// 32 bits 32 bits
// +-----------------------+-----------------------+
// | Type (individual,all) | zone ID |
// +-----------------------+-----------------------+
Zone int64 `json:"zone" yaml:"zone"`
String string `json:"string" yaml:"string"`
}
ACL is the API payload based on the legacy xmlrpc backend.
type ACLService ¶ added in v0.4.0
type ACLService struct {
// contains filtered or unexported fields
}
ACLService owns the /cloud/acl methods.
func (ACLService) ACLs ¶ added in v0.4.0
func (s ACLService) ACLs(ctx context.Context) (*ACLsResponse, error)
ACLs returns a slice containing all of the Access Control Lists.
func (ACLService) CreateACL ¶ added in v0.4.0
func (s ACLService) CreateACL(ctx context.Context, req CreateACLRequest) (*CreateACLResponse, error)
CreateACL creates a new Access Control List and returns its id.
type ACLsResponse ¶ added in v0.4.0
type ACLsResponse struct {
ACLs []ACL `json:"acls"`
}
ACLsResponse is the response body for GET /cloud/acl.
type AcctHistory ¶
AcctHistory is the API payload based on the legacy xmlrpc backend.
type AddClusterDatastoreResponse ¶
type AddClusterDatastoreResponse struct {
Datastore int `json:"datastore"`
}
AddClusterDatastoreResponse is the response body for PATCH /cloud/cluster/datastore.
type AddClusterHostResponse ¶
type AddClusterHostResponse struct {
Host int `json:"host"`
}
AddClusterHostResponse is the response body for PATCH /cloud/cluster/host.
type AddClusterNetworkResponse ¶
type AddClusterNetworkResponse struct {
VNet int `json:"vnet"`
}
AddClusterNetworkResponse is the response body for PATCH /cloud/cluster/vnet.
type AddDataCenterClusterResponse ¶ added in v0.4.0
type AddDataCenterClusterResponse struct {
DataCenter int `json:"datacenter"`
}
AddDataCenterClusterResponse is the response body for PATCH /cloud/datacenter/cluster.
type AddDataCenterDatastoreResponse ¶ added in v0.4.0
type AddDataCenterDatastoreResponse struct {
DataCenter int `json:"datacenter"`
}
AddDataCenterDatastoreResponse is the response body for PATCH /cloud/datacenter/datastore.
type AddDataCenterGroupResponse ¶ added in v0.4.0
type AddDataCenterGroupResponse struct {
DataCenter int `json:"datacenter"`
}
AddDataCenterGroupResponse is the response body for PATCH /cloud/datacenter/group.
type AddDataCenterHostResponse ¶ added in v0.4.0
type AddDataCenterHostResponse struct {
DataCenter int `json:"datacenter"`
}
AddDataCenterHostResponse is the response body for PATCH /cloud/datacenter/host.
type AddDataCenterNetworkResponse ¶ added in v0.4.0
type AddDataCenterNetworkResponse struct {
DataCenter int `json:"datacenter"`
}
AddDataCenterNetworkResponse is the response body for PATCH /cloud/datacenter/network.
type AddGroupAdminRequest ¶
type AddGroupAdminRequest struct {
User int `json:"user"`
}
AddGroupAdminRequest is the request body for POST /cloud/group/admin.
type AddGroupAdminResponse ¶
type AddGroupAdminResponse struct {
Group int `json:"group"`
}
AddGroupAdminResponse is the response body for POST /cloud/group/admin.
type AddInstanceScheduleRequest ¶
type AddInstanceScheduleRequest struct {
Template string `json:"template"`
}
AddInstanceScheduleRequest is the request body for POST /cloud/instance/schedule.
type AddInstanceScheduleResponse ¶
type AddInstanceScheduleResponse struct {
Instance int `json:"instance"`
}
AddInstanceScheduleResponse is the response body for POST /cloud/instance/schedule.
type AddInstanceSecurityGroupResponse ¶
type AddInstanceSecurityGroupResponse struct {
Instance int `json:"instance"`
}
AddInstanceSecurityGroupResponse is the response body for POST /cloud/instance/security-group.
type AddNetworkAddressRangeRequest ¶ added in v0.4.0
type AddNetworkAddressRangeRequest struct {
Template string `json:"template"`
}
AddNetworkAddressRangeRequest is the request body for POST /cloud/network/{network}/address-range.
type AddNetworkAddressRangeResponse ¶ added in v0.4.0
type AddNetworkAddressRangeResponse struct {
Network int `json:"network"`
}
AddNetworkAddressRangeResponse is the response body for POST /cloud/network/address-range.
type AddUserGroupResponse ¶
type AddUserGroupResponse struct {
User int `json:"user"`
}
AddUserGroupResponse is the response body for POST /cloud/user/group.
type AllocateDocumentRequest ¶
AllocateDocumentRequest is the request body for POST /cloud/document.
type AllocateDocumentResponse ¶
type AllocateDocumentResponse struct {
Document int `json:"document"`
}
AllocateDocumentResponse is the response body for POST /cloud/document.
type CalculateInstancesShowbackRequest ¶
type CalculateInstancesShowbackRequest struct {
Month Period `json:"month"`
Year Period `json:"year"`
}
CalculateInstancesShowbackRequest is the request body for POST /cloud/instance/showback.
type Capacity ¶
type Capacity struct {
FreeCPU int `json:"free_cpu" yaml:"free_cpu"`
FreeMemory int `json:"free_memory" yaml:"free_memory"`
UsedCPU int `json:"used_cpu" yaml:"used_cpu"`
UsedMemory int `json:"used_memory" yaml:"used_memory"`
}
Capacity is the API payload based on the legacy xmlrpc backend.
type ChangeDatastoreOwnershipRequest ¶
ChangeDatastoreOwnershipRequest is the request body for PATCH /cloud/datastore/{datastore}/ownership.
type ChangeDatastoreOwnershipResponse ¶
type ChangeDatastoreOwnershipResponse struct {
Datastore int `json:"datastore"`
}
ChangeDatastoreOwnershipResponse is the response body for PATCH /cloud/datastore/ownership.
type ChangeDatastorePermissionsRequest ¶
ChangeDatastorePermissionsRequest is the request body for PATCH /cloud/datastore/{datastore}/permissions.
type ChangeDatastorePermissionsResponse ¶
type ChangeDatastorePermissionsResponse struct {
Datastore int `json:"datastore"`
}
ChangeDatastorePermissionsResponse is the response body for PATCH /cloud/datastore/permissions.
type ChangeDocumentOwnershipRequest ¶
ChangeDocumentOwnershipRequest is the request body for PATCH /cloud/document/{document}/ownership.
type ChangeDocumentOwnershipResponse ¶
type ChangeDocumentOwnershipResponse struct {
Document int `json:"document"`
}
ChangeDocumentOwnershipResponse is the response body for PATCH /cloud/document/ownership.
type ChangeDocumentPermissionsRequest ¶
ChangeDocumentPermissionsRequest is the request body for PATCH /cloud/document/{document}/permissions.
type ChangeDocumentPermissionsResponse ¶
type ChangeDocumentPermissionsResponse struct {
Document int `json:"document"`
}
ChangeDocumentPermissionsResponse is the response body for PATCH /cloud/document/permissions.
type ChangeImageOwnershipRequest ¶
ChangeImageOwnershipRequest is the request body for PATCH /cloud/image/{image}/ownership.
type ChangeImageOwnershipResponse ¶
type ChangeImageOwnershipResponse struct {
Image int `json:"image"`
}
ChangeImageOwnershipResponse is the response body for PATCH /cloud/image/ownership.
type ChangeImagePermissionsRequest ¶
ChangeImagePermissionsRequest is the request body for PATCH /cloud/image/{image}/permissions.
type ChangeImagePermissionsResponse ¶
type ChangeImagePermissionsResponse struct {
Image int `json:"image"`
}
ChangeImagePermissionsResponse is the response body for PATCH /cloud/image/permissions.
type ChangeImageTypeRequest ¶
type ChangeImageTypeRequest struct {
Type string `json:"type"`
}
ChangeImageTypeRequest is the request body for PATCH /cloud/image/{image}/type.
type ChangeImageTypeResponse ¶
type ChangeImageTypeResponse struct {
Image int `json:"image"`
}
ChangeImageTypeResponse is the response body for PATCH /cloud/image/type.
type ChangeInstanceGroupOwnershipRequest ¶
type ChangeInstanceGroupOwnershipRequest struct {
User *int `json:"user"`
Group *int `json:"group"`
}
ChangeInstanceGroupOwnershipRequest is the request body for PATCH /cloud/instance-group/{group}/ownership.
type ChangeInstanceGroupOwnershipResponse ¶
type ChangeInstanceGroupOwnershipResponse struct {
Group int `json:"group"`
}
ChangeInstanceGroupOwnershipResponse is the response body for PATCH /cloud/instance-group/ownership.
type ChangeInstanceGroupPermissionsRequest ¶
ChangeInstanceGroupPermissionsRequest is the request body for PATCH /cloud/instance-group/{group}/permissions.
type ChangeInstanceGroupPermissionsResponse ¶
type ChangeInstanceGroupPermissionsResponse struct {
Group int `json:"group"`
}
ChangeInstanceGroupPermissionsResponse is the response body for PATCH /cloud/instance-group/permissions.
type ChangeInstanceOwnershipRequest ¶
ChangeInstanceOwnershipRequest is the request body for PATCH /cloud/instance/{instance}/ownership.
type ChangeInstanceOwnershipResponse ¶
type ChangeInstanceOwnershipResponse struct {
Instance int `json:"instance"`
}
ChangeInstanceOwnershipResponse is the response body for PATCH /cloud/instance/ownership.
type ChangeInstancePermissionsRequest ¶
ChangeInstancePermissionsRequest is the request body for PATCH /cloud/instance/{instance}/permissions.
type ChangeInstancePermissionsResponse ¶
type ChangeInstancePermissionsResponse struct {
Instance int `json:"instance"`
}
ChangeInstancePermissionsResponse is the response body for PATCH /cloud/instance/permissions.
type ChangeMarketAppOwnershipRequest ¶
ChangeMarketAppOwnershipRequest is the request body for PATCH /cloud/market/app/{app}/ownership.
type ChangeMarketAppOwnershipResponse ¶
type ChangeMarketAppOwnershipResponse struct {
MarketApp int `json:"market_app"`
}
ChangeMarketAppOwnershipResponse is the response body for PATCH /cloud/market/app/ownership.
type ChangeMarketAppPermissionsRequest ¶
ChangeMarketAppPermissionsRequest is the request body for PATCH /cloud/market/app/{app}/permissions.
type ChangeMarketAppPermissionsResponse ¶
type ChangeMarketAppPermissionsResponse struct {
MarketApp int `json:"market_app"`
}
ChangeMarketAppPermissionsResponse is the response body for PATCH /cloud/market/app/permissions.
type ChangeMarketOwnershipRequest ¶
ChangeMarketOwnershipRequest is the request body for PATCH /cloud/market/{market}/ownership.
type ChangeMarketOwnershipResponse ¶
type ChangeMarketOwnershipResponse struct {
Market int `json:"market"`
}
ChangeMarketOwnershipResponse is the response body for PATCH /cloud/market/ownership.
type ChangeMarketPermissionsRequest ¶
ChangeMarketPermissionsRequest is the request body for PATCH /cloud/market/{market}/permissions.
type ChangeMarketPermissionsResponse ¶
type ChangeMarketPermissionsResponse struct {
Market int `json:"market"`
}
ChangeMarketPermissionsResponse is the response body for PATCH /cloud/market/permissions.
type ChangeNetworkOwnershipRequest ¶ added in v0.4.0
ChangeNetworkOwnershipRequest is the request body for PATCH /cloud/network/{network}/ownership.
type ChangeNetworkOwnershipResponse ¶ added in v0.4.0
type ChangeNetworkOwnershipResponse struct {
Network int `json:"network"`
}
ChangeNetworkOwnershipResponse is the response body for PATCH /cloud/network/ownership.
type ChangeNetworkPermissionsRequest ¶ added in v0.4.0
ChangeNetworkPermissionsRequest is the request body for PATCH /cloud/network/{network}/permissions.
type ChangeNetworkPermissionsResponse ¶ added in v0.4.0
type ChangeNetworkPermissionsResponse struct {
Network int `json:"network"`
}
ChangeNetworkPermissionsResponse is the response body for PATCH /cloud/network/permissions.
type ChangeNetworkTemplateOwnershipRequest ¶ added in v0.4.0
type ChangeNetworkTemplateOwnershipRequest struct {
User *int `json:"user"`
Group *int `json:"group"`
}
ChangeNetworkTemplateOwnershipRequest is the request body for PATCH /cloud/network/template/{template}/ownership.
type ChangeNetworkTemplateOwnershipResponse ¶ added in v0.4.0
type ChangeNetworkTemplateOwnershipResponse struct {
Template int `json:"template"`
}
ChangeNetworkTemplateOwnershipResponse is the response body for PATCH /cloud/network/template/ownership.
type ChangeNetworkTemplatePermissionsRequest ¶ added in v0.4.0
ChangeNetworkTemplatePermissionsRequest is the request body for PATCH /cloud/network/template/{template}/permissions.
type ChangeNetworkTemplatePermissionsResponse ¶ added in v0.4.0
type ChangeNetworkTemplatePermissionsResponse struct {
Template int `json:"template"`
}
ChangeNetworkTemplatePermissionsResponse is the response body for PATCH /cloud/network/template/permissions.
type ChangeRouterOwnershipRequest ¶ added in v0.4.0
ChangeRouterOwnershipRequest is the request body for PATCH /cloud/router/{router}/ownership.
type ChangeRouterOwnershipResponse ¶ added in v0.4.0
type ChangeRouterOwnershipResponse struct {
Router int `json:"router"`
}
ChangeRouterOwnershipResponse is the response body for PATCH /cloud/router/ownership.
type ChangeRouterPermissionsRequest ¶ added in v0.4.0
ChangeRouterPermissionsRequest is the request body for PATCH /cloud/router/{router}/permissions.
type ChangeRouterPermissionsResponse ¶ added in v0.4.0
type ChangeRouterPermissionsResponse struct {
Router int `json:"router"`
}
ChangeRouterPermissionsResponse is the response body for PATCH /cloud/router/permissions.
type ChangeSecurityGroupOwnershipRequest ¶
type ChangeSecurityGroupOwnershipRequest struct {
User *int `json:"user"`
Group *int `json:"group"`
}
ChangeSecurityGroupOwnershipRequest is the request body for PATCH /cloud/security-group/{sg}/chown.
type ChangeSecurityGroupOwnershipResponse ¶
type ChangeSecurityGroupOwnershipResponse struct {
SecurityGroup int `json:"security_group"`
}
ChangeSecurityGroupOwnershipResponse is the response body for PATCH /cloud/security-group/chown.
type ChangeSecurityGroupPermissionsRequest ¶
ChangeSecurityGroupPermissionsRequest is the request body for PATCH /cloud/security-group/{sg}/chmod.
type ChangeSecurityGroupPermissionsResponse ¶
type ChangeSecurityGroupPermissionsResponse struct {
SecurityGroup int `json:"security_group"`
}
ChangeSecurityGroupPermissionsResponse is the response body for PATCH /cloud/security-group/chmod.
type ChangeTemplateOwnershipRequest ¶
ChangeTemplateOwnershipRequest is the response body for PATCH /cloud/template/{template}/ownership.
type ChangeTemplateOwnershipResponse ¶
type ChangeTemplateOwnershipResponse struct {
Template int `json:"template"`
}
ChangeTemplateOwnershipResponse is the response body for PATCH /cloud/template/ownership.
type ChangeTemplatePermissionsRequest ¶
type ChangeTemplatePermissionsRequest struct {
Permissions hc.Perms `json:"permissions"`
Disk bool `json:"disk"`
}
ChangeTemplatePermissionsRequest is the response body for PATCH /cloud/template/{template}/permissions.
type ChangeTemplatePermissionsResponse ¶
type ChangeTemplatePermissionsResponse struct {
Template int `json:"template"`
}
ChangeTemplatePermissionsResponse is the response body for PATCH /cloud/template/permissions.
type ChangeUserAuthRequest ¶
type ChangeUserAuthRequest struct {
Driver string `json:"driver"`
Password string `json:"password"`
}
ChangeUserAuthRequest is the request body for PATCH /cloud/user/{user}/auth.
type ChangeUserAuthResponse ¶
type ChangeUserAuthResponse struct {
User int `json:"user"`
}
ChangeUserAuthResponse is the response body for PATCH /cloud/user/auth.
type ChangeUserGroupResponse ¶
type ChangeUserGroupResponse struct {
User int `json:"user"`
}
ChangeUserGroupResponse is the response body for PATCH /cloud/user/group.
type ChangeUserPasswordRequest ¶
type ChangeUserPasswordRequest struct {
Password string `json:"password"`
}
ChangeUserPasswordRequest is the request body for PATCH /cloud/user/{user}/password.
type ChangeUserPasswordResponse ¶
type ChangeUserPasswordResponse struct {
User int `json:"user"`
}
ChangeUserPasswordResponse is the response body for PATCH /cloud/user/password.
type CloneDocumentRequest ¶
type CloneDocumentRequest struct {
Name string `json:"name"`
}
CloneDocumentRequest is the request body for POST /cloud/document/{document}/clone.
type CloneDocumentResponse ¶
type CloneDocumentResponse struct {
Document int `json:"document"`
}
CloneDocumentResponse is the response body for POST /cloud/document/clone.
type CloneImageRequest ¶
CloneImageRequest is the request body for POST /cloud/image/clone.
type CloneImageResponse ¶
type CloneImageResponse struct {
Image int `json:"image"`
}
CloneImageResponse is the response body for POST /cloud/image/clone.
type CloneNetworkTemplateRequest ¶ added in v0.4.0
type CloneNetworkTemplateRequest struct {
Name string `json:"name"`
}
CloneNetworkTemplateRequest is the request body for POST /cloud/network/template/clone.
type CloneNetworkTemplateResponse ¶ added in v0.4.0
type CloneNetworkTemplateResponse struct {
Template int `json:"template"`
}
CloneNetworkTemplateResponse is the response body for POST /cloud/network/template/clone.
type CloneSecurityGroupRequest ¶
type CloneSecurityGroupRequest struct {
Name string `json:"name"`
}
CloneSecurityGroupRequest is the request body for POST /cloud/security-group/{sg}/clone.
type CloneSecurityGroupResponse ¶
type CloneSecurityGroupResponse struct {
SecurityGroup int `json:"security_group"`
}
CloneSecurityGroupResponse is the response body for POST /cloud/security-group/clone.
type CloneTemplateRequest ¶
CloneTemplateRequest is the response body for POST /cloud/template/{template}/clone.
type CloneTemplateResponse ¶
type CloneTemplateResponse struct {
Template int `json:"template"`
}
CloneTemplateResponse is the response body for POST /cloud/template/clone.
type Cluster ¶
type Cluster struct {
ID int `json:"id" yaml:"id"`
Name string `json:"name" yaml:"name"`
Hosts []int `json:"hosts" yaml:"hosts"`
Datastores []int `json:"datastores" yaml:"datastores"`
Networks []int `json:"networks" yaml:"networks"`
Template Template `json:"template" yaml:"template"`
}
Cluster is the API payload based on the legacy xmlrpc backend.
func (*Cluster) ParseTemplate ¶ added in v0.14.0
func (c *Cluster) ParseTemplate() (*ClusterTemplate, error)
ParseTemplate returns a structured subset of the nested key x value pair map.
type ClusterResponse ¶ added in v0.4.0
type ClusterResponse struct {
Cluster Cluster `json:"cluster"`
}
ClusterResponse is the response body for GET /cloud/cluster.
type ClusterService ¶ added in v0.4.0
type ClusterService struct {
// contains filtered or unexported fields
}
ClusterService owns the /cloud/cluster methods.
func (ClusterService) AddClusterDatastore ¶ added in v0.4.0
func (s ClusterService) AddClusterDatastore(ctx context.Context, id, datastore int) (*AddClusterDatastoreResponse, error)
AddClusterDatastore adds the datastore to the cluster.
func (ClusterService) AddClusterHost ¶ added in v0.4.0
func (s ClusterService) AddClusterHost(ctx context.Context, id, host int) (*AddClusterHostResponse, error)
AddClusterHost adds the host to the cluster.
func (ClusterService) AddClusterNetwork ¶ added in v0.4.0
func (s ClusterService) AddClusterNetwork(ctx context.Context, id, network int) (*AddClusterNetworkResponse, error)
AddClusterNetwork adds the network to the cluster.
func (ClusterService) Cluster ¶ added in v0.4.0
func (s ClusterService) Cluster(ctx context.Context, id int) (*ClusterResponse, error)
Cluster returns information about a cluster.
func (ClusterService) Clusters ¶ added in v0.4.0
func (s ClusterService) Clusters(ctx context.Context) (*ClustersResponse, error)
Clusters returns information about all clusters.
func (ClusterService) CreateCluster ¶ added in v0.4.0
func (s ClusterService) CreateCluster(ctx context.Context, req CreateClusterRequest) (*CreateClusterResponse, error)
CreateCluster creates a cluster.
func (ClusterService) DeleteCluster ¶ added in v0.4.0
func (s ClusterService) DeleteCluster(ctx context.Context, id int) error
DeleteCluster deletes the cluster with the given ID.
func (ClusterService) DeleteClusterDatastore ¶ added in v0.4.0
func (s ClusterService) DeleteClusterDatastore(ctx context.Context, id, datastore int) error
DeleteClusterDatastore deletes the datastore from the cluster.
func (ClusterService) DeleteClusterHost ¶ added in v0.4.0
func (s ClusterService) DeleteClusterHost(ctx context.Context, id, host int) error
DeleteClusterHost deletes the host from the cluster.
func (ClusterService) DeleteClusterNetwork ¶ added in v0.4.0
func (s ClusterService) DeleteClusterNetwork(ctx context.Context, id, network int) error
DeleteClusterNetwork deletes the network from the cluster.
func (ClusterService) RenameCluster ¶ added in v0.4.0
func (s ClusterService) RenameCluster(ctx context.Context, id int, req RenameClusterRequest) (*RenameClusterResponse, error)
RenameCluster updates the name of the cluster.
func (ClusterService) UpdateCluster ¶ added in v0.4.0
func (s ClusterService) UpdateCluster(ctx context.Context, id int, req UpdateClusterRequest) (*UpdateClusterResponse, error)
UpdateCluster updates the cluster.
type ClusterTemplate ¶
ClusterTemplate is the API payload based on the legacy xmlrpc backend.
type ClustersResponse ¶ added in v0.4.0
type ClustersResponse struct {
Clusters []Cluster `json:"cluster"`
}
ClustersResponse is the response body for GET /cloud/cluster.
type CommitSecurityGroupRequest ¶
type CommitSecurityGroupRequest struct {
All bool `json:"all"`
}
CommitSecurityGroupRequest is the request body for PATCH /cloud/security-group/{sg}/commit.
type CommitSecurityGroupResponse ¶
type CommitSecurityGroupResponse struct {
SecurityGroup int `json:"security_group"`
}
CommitSecurityGroupResponse is the response body for PATCH /cloud/security-group/commit.
type Core ¶
type Core struct {
CPUs string `json:"cpus" yaml:"cpus"`
Dedicated bool `json:"dedicated" yaml:"dedicated"`
Free int `json:"free" yaml:"free"`
ID int `json:"id" yaml:"id"`
}
Core is the API payload based on the legacy xmlrpc backend.
type CreateACLRequest ¶
type CreateACLRequest struct {
User int `json:"user"`
Resource int `json:"resource"`
Rights int `json:"rights"`
Zone *int `json:"zone"`
}
CreateACLRequest is the request body for POST /cloud/acl.
type CreateACLResponse ¶
type CreateACLResponse struct {
ACL int `json:"acl"`
}
CreateACLResponse is the response body for POST /cloud/acl.
type CreateClusterRequest ¶
type CreateClusterRequest struct {
Name string `json:"name"`
}
CreateClusterRequest is request body for POST /cloud/cluster.
type CreateClusterResponse ¶
type CreateClusterResponse struct {
Cluster int `json:"cluster"`
}
CreateClusterResponse is response body for POST /cloud/cluster.
type CreateDataCenterRequest ¶ added in v0.4.0
type CreateDataCenterRequest struct {
Template string `json:"template"`
}
CreateDataCenterRequest is the request body for POST /cloud/datacenter.
type CreateDataCenterResponse ¶ added in v0.4.0
type CreateDataCenterResponse struct {
DataCenter int `json:"datacenter"`
}
CreateDataCenterResponse is the response body for POST /cloud/datacenter.
type CreateDatastoreRequest ¶
type CreateDatastoreRequest struct {
Template string `json:"template"`
Cluster *int `json:"cluster"`
}
CreateDatastoreRequest is the request body for POST /cloud/datastore.
type CreateDatastoreResponse ¶
type CreateDatastoreResponse struct {
Datastore int `json:"datastore"`
}
CreateDatastoreResponse is the response body for POST /cloud/datastore.
type CreateGroupRequest ¶
type CreateGroupRequest struct {
Name string `json:"name"`
}
CreateGroupRequest is the request body for POST /cloud/group.
type CreateGroupResponse ¶
type CreateGroupResponse struct {
Group int `json:"group"`
}
CreateGroupResponse is the response body for POST /cloud/group.
type CreateHookRequest ¶
type CreateHookRequest struct {
Template string `json:"template"`
}
CreateHookRequest is the request body for POST /cloud/hook.
type CreateHookResponse ¶
type CreateHookResponse struct {
Hook int `json:"hook"`
}
CreateHookResponse is the response body for POST /cloud/hook.
type CreateHostRequest ¶ added in v0.4.0
type CreateHostRequest struct {
Hostname string `json:"hostname"`
InfoManager string `json:"info_manager"`
VMManager string `json:"vm_manager"`
Cluster *int `json:"cluster"`
}
CreateHostRequest is the request body for POST /cloud/host.
type CreateHostResponse ¶ added in v0.4.0
type CreateHostResponse struct {
Host int `json:"host"`
}
CreateHostResponse is the response body for POST /cloud/host.
type CreateImageRequest ¶
type CreateImageRequest struct {
Template string `json:"template"`
Datastore int `json:"datastore"`
EnforceCapacity bool `json:"enforce_capacity"`
}
CreateImageRequest is the request body for POST /cloud/image.
func (*CreateImageRequest) SetTemplate ¶ added in v0.17.0
func (r *CreateImageRequest) SetTemplate(t ImageTemplate)
SetTemplate sets r.Template from its structured representation. Either call this of set the template string directly.
type CreateImageResponse ¶
type CreateImageResponse struct {
Image int `json:"image"`
}
CreateImageResponse is the response body for POST /cloud/image.
type CreateInstanceDiskImageRequest ¶
type CreateInstanceDiskImageRequest struct {
Name string `json:"name"`
ImageType string `json:"image_type"`
Snapshot *int `json:"snapshot"`
}
CreateInstanceDiskImageRequest is the request body for POST /cloud/instance/disk/image.
type CreateInstanceDiskImageResponse ¶
type CreateInstanceDiskImageResponse struct {
Image int `json:"image"`
}
CreateInstanceDiskImageResponse is the response body for POST /cloud/instance/disk/image.
type CreateInstanceDiskRequest ¶
type CreateInstanceDiskRequest struct {
DiskTemplate string `json:"disk"`
}
CreateInstanceDiskRequest is the request body for POST /cloud/instance/disk.
type CreateInstanceDiskResponse ¶
type CreateInstanceDiskResponse struct {
Instance int `json:"instance"`
}
CreateInstanceDiskResponse is the response body for POST /cloud/instance/disk.
type CreateInstanceDiskSnapshotRequest ¶
type CreateInstanceDiskSnapshotRequest struct {
Description string `json:"description"`
}
CreateInstanceDiskSnapshotRequest is the request body for POST /cloud/instance/disk/snapshot.
type CreateInstanceDiskSnapshotResponse ¶
type CreateInstanceDiskSnapshotResponse struct {
Instance int `json:"instance"`
}
CreateInstanceDiskSnapshotResponse is the response body for POST /cloud/instance/disk/snapshot.
type CreateInstanceGroupRequest ¶
type CreateInstanceGroupRequest struct {
Template string `json:"template"`
}
CreateInstanceGroupRequest is the request body for POST /cloud/instance-group.
type CreateInstanceGroupResponse ¶
type CreateInstanceGroupResponse struct {
Group int `json:"group"`
}
CreateInstanceGroupResponse is the response body for POST /cloud/instance-group.
type CreateInstanceNICRequest ¶
type CreateInstanceNICRequest struct {
NICTemplate string `json:"nic"`
}
CreateInstanceNICRequest is the request body for POST /cloud/instance/nic.
type CreateInstanceNICResponse ¶
type CreateInstanceNICResponse struct {
Instance int `json:"instance"` // TODO: would make more sense as NIC ID, maybe docs are wrong
}
CreateInstanceNICResponse is the response body for POST /cloud/instance/nic.
type CreateInstanceRequest ¶
type CreateInstanceRequest struct {
Template string `json:"template"`
Pending bool `json:"pending"`
}
CreateInstanceRequest is the request body for POST /cloud/instance.
func (*CreateInstanceRequest) SetTemplate ¶ added in v0.17.0
func (r *CreateInstanceRequest) SetTemplate(t InstanceTemplate)
SetTemplate sets r.Template from its structured representation. Either call this of set the template string directly.
type CreateInstanceResponse ¶
type CreateInstanceResponse struct {
Instance int `json:"instance"`
}
CreateInstanceResponse is the response body for POST /cloud/instance.
type CreateInstanceSnapshotRequest ¶
type CreateInstanceSnapshotRequest struct {
Snapshot string `json:"snapshot"`
}
CreateInstanceSnapshotRequest is the request body for POST /cloud/instance/snapshot.
type CreateInstanceSnapshotResponse ¶
type CreateInstanceSnapshotResponse struct {
Snapshot int `json:"snapshot"`
}
CreateInstanceSnapshotResponse is the response body for POST /cloud/instance/snapshot.
type CreateMarketAppRequest ¶
type CreateMarketAppRequest struct {
Template string `json:"template"`
}
CreateMarketAppRequest is the request body for POST /cloud/market/{market}/app/{app}.
type CreateMarketAppResponse ¶
type CreateMarketAppResponse struct {
MarketApp int `json:"market_app"`
}
CreateMarketAppResponse is the response body for POST /cloud/market/app.
type CreateMarketRequest ¶
type CreateMarketRequest struct {
Template string `json:"template"`
}
CreateMarketRequest is the request body for POST /cloud/market.
type CreateMarketResponse ¶
type CreateMarketResponse struct {
Market int `json:"market"`
}
CreateMarketResponse is the response body for POST /cloud/market.
type CreateNetworkRequest ¶ added in v0.4.0
type CreateNetworkRequest struct {
Template string `json:"template"`
Cluster *int `json:"cluster"`
}
CreateNetworkRequest is the request body for POST /cloud/network.
type CreateNetworkResponse ¶ added in v0.4.0
type CreateNetworkResponse struct {
Network int `json:"network"`
}
CreateNetworkResponse is the response body for POST /cloud/network.
type CreateNetworkTemplateRequest ¶ added in v0.4.0
type CreateNetworkTemplateRequest struct {
Template string `json:"template"`
}
CreateNetworkTemplateRequest is the request body for POST /cloud/network/template.
type CreateNetworkTemplateResponse ¶ added in v0.4.0
type CreateNetworkTemplateResponse struct {
Template int `json:"template"`
}
CreateNetworkTemplateResponse is the response body for POST /cloud/network/template.
type CreateRouterNICRequest ¶ added in v0.4.0
type CreateRouterNICRequest struct {
Template string `json:"template"`
}
CreateRouterNICRequest is the request body for PATCH /cloud/router/nic.
type CreateRouterNICResponse ¶ added in v0.4.0
type CreateRouterNICResponse struct {
Router int `json:"router"`
}
CreateRouterNICResponse is the response body for PATCH /cloud/router/nic.
type CreateRouterRequest ¶ added in v0.4.0
type CreateRouterRequest struct {
Template string `json:"template"`
}
CreateRouterRequest is the request body for POST /cloud/router.
type CreateRouterResponse ¶ added in v0.4.0
type CreateRouterResponse struct {
Router int `json:"router"`
}
CreateRouterResponse is the response body for POST /cloud/router.
type CreateSecurityGroupRequest ¶
type CreateSecurityGroupRequest struct {
Template string `json:"template"`
}
CreateSecurityGroupRequest is the request body for POST /cloud/security-group.
type CreateSecurityGroupResponse ¶
type CreateSecurityGroupResponse struct {
SecurityGroup int `json:"security_group"`
}
CreateSecurityGroupResponse is the response body for POST /cloud/security-group.
type CreateTemplateRequest ¶
type CreateTemplateRequest struct {
Data string `json:"data"`
}
CreateTemplateRequest is the response body for POST /cloud/template.
type CreateTemplateResponse ¶
type CreateTemplateResponse struct {
Template int `json:"template"`
}
CreateTemplateResponse is the response body for POST /cloud/template.
type CreateUserRequest ¶
type CreateUserRequest struct {
Username string `json:"username"`
Password string `json:"password"`
Auth string `json:"auth"`
Gids []int `json:"gids"`
}
CreateUserRequest is the request body for POST /cloud/user.
type CreateUserResponse ¶
type CreateUserResponse struct {
User int `json:"user"`
}
CreateUserResponse is the response body for POST /cloud/user.
type CreateVNCProxyRequest ¶
type CreateVNCProxyRequest struct {
Zone int `json:"zone"`
}
CreateVNCProxyRequest is the request body for POST /cloud/instance/{instance}/vnc.
type CreateVNCProxyResponse ¶
type CreateVNCProxyResponse struct {
Password string `json:"password"`
Token string `json:"token"`
Name string `json:"name"`
}
CreateVNCProxyResponse is the response body for POST /cloud/instance/{instance}/vnc.
type CreateZoneRequest ¶
type CreateZoneRequest struct {
Template string `json:"template"`
}
CreateZoneRequest is the request body for POST /cloud/zone.
type CreateZoneResponse ¶
type CreateZoneResponse struct {
Zone int `json:"zone"`
}
CreateZoneResponse is the response body for POST /cloud/zone.
type DataCenter ¶ added in v0.4.0
type DataCenter struct {
ID int `json:"id" yaml:"id"`
Name string `json:"name" yaml:"name"`
Groups []int `json:"groups" yaml:"groups"`
Clusters []datacenter.Cluster `json:"clusters" yaml:"clusters"`
Hosts []datacenter.Host `json:"hosts" yaml:"hosts"`
Datastores []datacenter.Datastore `json:"datastores" yaml:"datastores"`
Networks []datacenter.Network `json:"networks" yaml:"networks"`
Template Template `json:"template" yaml:"template"`
}
DataCenter is the API payload based on the legacy xmlrpc backend.
func (*DataCenter) ParseTemplate ¶ added in v0.14.0
func (d *DataCenter) ParseTemplate() (*DataCenterTemplate, error)
ParseTemplate returns a structured subset of the nested key x value pair map.
type DataCenterResponse ¶ added in v0.4.0
type DataCenterResponse struct {
DataCenter DataCenter `json:"datacenter"`
}
DataCenterResponse is the response body for GET /cloud/datacenter.
type DataCenterService ¶ added in v0.4.0
type DataCenterService struct {
// contains filtered or unexported fields
}
DataCenterService owns the /cloud/datacenter methods.
func (DataCenterService) AddDataCenterCluster ¶ added in v0.4.0
func (s DataCenterService) AddDataCenterCluster(ctx context.Context, id, zone, cluster int) (*AddDataCenterClusterResponse, error)
AddDataCenterCluster adds a cluster to the Data Center with the given ID.
func (DataCenterService) AddDataCenterDatastore ¶ added in v0.4.0
func (s DataCenterService) AddDataCenterDatastore(ctx context.Context, id, zone, datastore int) (*AddDataCenterDatastoreResponse, error)
AddDataCenterDatastore adds a datastore to the Data Center with the given ID.
func (DataCenterService) AddDataCenterGroup ¶ added in v0.4.0
func (s DataCenterService) AddDataCenterGroup(ctx context.Context, id int) (*AddDataCenterGroupResponse, error)
AddDataCenterGroup adds a group to the Data Center with the given ID.
func (DataCenterService) AddDataCenterHost ¶ added in v0.4.0
func (s DataCenterService) AddDataCenterHost(ctx context.Context, id, zone, host int) (*AddDataCenterHostResponse, error)
AddDataCenterHost adds a host to the Data Center with the given ID.
func (DataCenterService) AddDataCenterNetwork ¶ added in v0.4.0
func (s DataCenterService) AddDataCenterNetwork(ctx context.Context, id, zone, network int) (*AddDataCenterNetworkResponse, error)
AddDataCenterNetwork adds a network to the Data Center with the given ID.
func (DataCenterService) CreateDataCenter ¶ added in v0.4.0
func (s DataCenterService) CreateDataCenter(ctx context.Context, req CreateDataCenterRequest) (*CreateDataCenterResponse, error)
CreateDataCenter creates a new Data Center.
func (DataCenterService) DataCenter ¶ added in v0.4.0
func (s DataCenterService) DataCenter(ctx context.Context, id int) (*DataCenterResponse, error)
DataCenter returns information about a vdc.
func (DataCenterService) DataCenters ¶ added in v0.4.0
func (s DataCenterService) DataCenters(ctx context.Context) (*DataCentersResponse, error)
DataCenters returns information about all vdcs.
func (DataCenterService) DeleteDataCenter ¶ added in v0.4.0
func (s DataCenterService) DeleteDataCenter(ctx context.Context, id int) error
DeleteDataCenter deletes the Data Center with the given ID.
func (DataCenterService) RemoveDataCenterCluster ¶ added in v0.4.0
func (s DataCenterService) RemoveDataCenterCluster(ctx context.Context, id, zone, cluster int) error
RemoveDataCenterCluster removes a cluster from the Data Center with the given ID.
func (DataCenterService) RemoveDataCenterDatastore ¶ added in v0.4.0
func (s DataCenterService) RemoveDataCenterDatastore(ctx context.Context, id, zone, datastore int) error
RemoveDataCenterDatastore removes a datastore from the Data Center with the given ID.
func (DataCenterService) RemoveDataCenterGroup ¶ added in v0.4.0
func (s DataCenterService) RemoveDataCenterGroup(ctx context.Context, id, group int) error
RemoveDataCenterGroup removes a group from the Data Center with the given ID.
func (DataCenterService) RemoveDataCenterHost ¶ added in v0.4.0
func (s DataCenterService) RemoveDataCenterHost(ctx context.Context, id, zone, host int) error
RemoveDataCenterHost removes a host from the Data Center with the given ID.
func (DataCenterService) RemoveDataCenterNetwork ¶ added in v0.4.0
func (s DataCenterService) RemoveDataCenterNetwork(ctx context.Context, id, zone, network int) error
RemoveDataCenterNetwork removes a network from the Data Center with the given ID.
func (DataCenterService) RenameDataCenter ¶ added in v0.4.0
func (s DataCenterService) RenameDataCenter(ctx context.Context, id int, req RenameDataCenterRequest) (*RenameDataCenterResponse, error)
RenameDataCenter renames the Data Center with the given ID.
func (DataCenterService) UpdateDataCenter ¶ added in v0.4.0
func (s DataCenterService) UpdateDataCenter(ctx context.Context, id int, req UpdateDataCenterRequest) (*UpdateDataCenterResponse, error)
UpdateDataCenter updates the Data Center with the given ID.
type DataCenterTemplate ¶ added in v0.4.0
type DataCenterTemplate struct {
Description string
}
DataCenterTemplate is the API payload based on the legacy xmlrpc backend.
type DataCentersResponse ¶ added in v0.4.0
type DataCentersResponse struct {
DataCenters []DataCenter `json:"datacenters"`
}
DataCentersResponse is the response body for GET /cloud/datacenter.
type Datastore ¶
type Datastore struct {
ID int `json:"id" yaml:"id"`
UserID int `json:"user_id" yaml:"user_id"`
GroupID int `json:"group_id" yaml:"group_id"`
UserName string `json:"user_name" yaml:"user_name"`
GroupName string `json:"group_name" yaml:"group_name"`
Name string `json:"name" yaml:"name"`
Permissions Permissions `json:"permissions" yaml:"permissions"`
DatastoreMAD string `json:"datastore_mad" yaml:"datastore_mad"`
TransferManagerMAD string `json:"transfer_manager_mad" yaml:"transfer_manager_mad"`
BasePath string `json:"base_path" yaml:"base_path"`
Type DatastoreType `json:"type" yaml:"type"`
DiskType int `json:"disk_type" yaml:"disk_type"`
State DatastoreState `json:"state" yaml:"state"`
Clusters []int `json:"clusters" yaml:"clusters"`
TotalMB int `json:"total_mb" yaml:"total_mb"`
FreeMB int `json:"free_mb" yaml:"free_mb"`
UsedMB int `json:"used_mb" yaml:"used_mb"`
Images []int `json:"images" yaml:"images"`
Template Template `json:"template" yaml:"template"`
}
Datastore is the API payload based on the legacy xmlrpc backend.
type DatastoreResponse ¶ added in v0.4.0
type DatastoreResponse struct {
Datastore Datastore `json:"datastore"`
}
DatastoreResponse is the response body for GET /cloud/datastore.
type DatastoreService ¶ added in v0.4.0
type DatastoreService struct {
// contains filtered or unexported fields
}
DatastoreService owns the /cloud/datastore methods.
func (DatastoreService) ChangeDatastoreOwnership ¶ added in v0.4.0
func (s DatastoreService) ChangeDatastoreOwnership(ctx context.Context, id string, req ChangeDatastoreOwnershipRequest) (*ChangeDatastoreOwnershipResponse, error)
ChangeDatastoreOwnership changes the datastore ownership with the given ID.
func (DatastoreService) ChangeDatastorePermissions ¶ added in v0.4.0
func (s DatastoreService) ChangeDatastorePermissions(ctx context.Context, id string, req ChangeDatastorePermissionsRequest) (*ChangeDatastorePermissionsResponse, error)
ChangeDatastorePermissions changes the datastore permissions with the given ID.
func (DatastoreService) CreateDatastore ¶ added in v0.4.0
func (s DatastoreService) CreateDatastore(ctx context.Context, req CreateDatastoreRequest) (*CreateDatastoreResponse, error)
CreateDatastore creates a new datastore.
func (DatastoreService) Datastore ¶ added in v0.4.0
func (s DatastoreService) Datastore(ctx context.Context, id int) (*DatastoreResponse, error)
Datastore returns information about a datastore.
func (DatastoreService) Datastores ¶ added in v0.4.0
func (s DatastoreService) Datastores(ctx context.Context) (*DatastoresResponse, error)
Datastores returns information about all datastores.
func (DatastoreService) DeleteDatastore ¶ added in v0.4.0
func (s DatastoreService) DeleteDatastore(ctx context.Context, id string) error
DeleteDatastore deletes the datastore with the given ID.
func (DatastoreService) EnableDatastore ¶ added in v0.4.0
func (s DatastoreService) EnableDatastore(ctx context.Context, id int, req EnableDatastoreRequest) (*EnableDatastoreResponse, error)
EnableDatastore enables the datastore with the given ID.
func (DatastoreService) RenameDatastore ¶ added in v0.4.0
func (s DatastoreService) RenameDatastore(ctx context.Context, id string, req RenameDatastoreRequest) (*RenameDatastoreResponse, error)
RenameDatastore renames the datastore with the given ID.
func (DatastoreService) UpdateDatastore ¶ added in v0.4.0
func (s DatastoreService) UpdateDatastore(ctx context.Context, id int, req UpdateDatastoreRequest) (*UpdateDatastoreResponse, error)
UpdateDatastore updates the datastore with the given ID.
type DatastoreState ¶
type DatastoreState int
DatastoreState is the state of datastore.
const ( DatastoreReady DatastoreState = iota // ready DatastoreDisabled // disabled )
State values.
func DatastoreStateString ¶
func DatastoreStateString(s string) (DatastoreState, error)
DatastoreStateString retrieves an enum value from the enum constants string name. Throws an error if the param is not part of the enum.
func DatastoreStateValues ¶
func DatastoreStateValues() []DatastoreState
DatastoreStateValues returns all values of the enum
func (DatastoreState) IsADatastoreState ¶
func (i DatastoreState) IsADatastoreState() bool
IsADatastoreState returns "true" if the value is listed in the enum definition. "false" otherwise
func (DatastoreState) MarshalText ¶
func (i DatastoreState) MarshalText() ([]byte, error)
MarshalText implements the encoding.TextMarshaler interface for DatastoreState
func (DatastoreState) String ¶
func (i DatastoreState) String() string
func (*DatastoreState) UnmarshalText ¶
func (i *DatastoreState) UnmarshalText(text []byte) error
UnmarshalText implements the encoding.TextUnmarshaler interface for DatastoreState
type DatastoreTemplate ¶
type DatastoreTemplate struct {
AllowOrphans string `json:"allow_orphans" yaml:"allow_orphans"`
BridgeList string `json:"bridge_list" yaml:"bridge_list"`
CloneTarget string `json:"clone_target" yaml:"clone_target"`
CloneTargetSSH string `json:"clone_target_ssh" yaml:"clone_target_ssh"`
DiskType string `json:"disk_type" yaml:"disk_type"`
DiskTypeSSH string `json:"disk_type_ssh" yaml:"disk_type_ssh"`
Driver string `json:"driver" yaml:"driver"`
DatastoreMAD string `json:"ds_mad" yaml:"ds_mad"`
DatastoreMigrate bool `json:"ds_migrate" yaml:"ds_migrate"`
LNTarget string `json:"ln_target" yaml:"ln_target"`
LNTargetSSH string `json:"ln_target_ssh" yaml:"ln_target_ssh"`
PoolName string `json:"pool_name" yaml:"pool_name"`
RestrictedDirs string `json:"restricted_dirs" yaml:"restricted_dirs"`
SafeDirs string `json:"safe_dirs" yaml:"safe_dirs"`
StagingDir string `json:"staging_dir" yaml:"staging_dir"`
TransferManagerMAD string `json:"tm_mad" yaml:"tm_mad"`
TransferManagerMADSystem []string `json:"tm_mad_system" yaml:"tm_mad_system"`
Type string `json:"type" yaml:"type"`
VCenterDCName string `json:"vcenter_dc_name" yaml:"vcenter_dc_name"`
VCenterDCRef string `json:"vcenter_dc_ref" yaml:"vcenter_dc_ref"`
VCenterDSName string `json:"vcenter_ds_name" yaml:"vcenter_ds_name"`
VCenterDSRef string `json:"vcenter_ds_ref" yaml:"vcenter_ds_ref"`
VCenterHost string `json:"vcenter_host" yaml:"vcenter_host"`
VCenterInstanceID string `json:"vcenter_instance_id" yaml:"vcenter_instance_id"`
}
DatastoreTemplate is the API payload based on the legacy xmlrpc backend.
type DatastoreType ¶
type DatastoreType int
DatastoreType is the type of datastore.
const ( DatastoreImage DatastoreType = iota // image DatastoreSystem // system DatastoreFile // file )
Type values.
func DatastoreTypeString ¶
func DatastoreTypeString(s string) (DatastoreType, error)
DatastoreTypeString retrieves an enum value from the enum constants string name. Throws an error if the param is not part of the enum.
func DatastoreTypeValues ¶
func DatastoreTypeValues() []DatastoreType
DatastoreTypeValues returns all values of the enum
func (DatastoreType) IsADatastoreType ¶
func (i DatastoreType) IsADatastoreType() bool
IsADatastoreType returns "true" if the value is listed in the enum definition. "false" otherwise
func (DatastoreType) MarshalText ¶
func (i DatastoreType) MarshalText() ([]byte, error)
MarshalText implements the encoding.TextMarshaler interface for DatastoreType
func (DatastoreType) String ¶
func (i DatastoreType) String() string
func (*DatastoreType) UnmarshalText ¶
func (i *DatastoreType) UnmarshalText(text []byte) error
UnmarshalText implements the encoding.TextUnmarshaler interface for DatastoreType
type Datastores ¶
type Datastores struct {
DiskUsage int `json:"disk_usage" yaml:"disk_usage"`
FreeDisk int `json:"free_disk" yaml:"free_disk"`
MaxDisk int `json:"max_disk" yaml:"max_disk"`
UsedDisk int `json:"used_disk" yaml:"used_disk"`
}
Datastores is the API payload based on the legacy xmlrpc backend.
type DatastoresResponse ¶ added in v0.4.0
type DatastoresResponse struct {
Datastores []Datastore `json:"datastore"`
}
DatastoresResponse is the response body for GET /cloud/datastore.
type DeleteTemplateResponse ¶
type DeleteTemplateResponse struct {
Template int `json:"template"`
}
DeleteTemplateResponse is the response body for DELETE /cloud/template/{template}.
type DeployInstanceRequest ¶
type DeployInstanceRequest struct {
Host int `json:"host"`
Enforce bool `json:"enforce"`
Datastore *int `json:"datastore"`
Template string `json:"template"`
}
DeployInstanceRequest is the request body for POST /cloud/instance/{instance}/deploy.
type DeployInstanceResponse ¶
type DeployInstanceResponse struct {
Instance int `json:"instance"`
}
DeployInstanceResponse is the response body for PATCH /cloud/instance/deploy.
type Document ¶
type Document struct {
ID int `json:"id" yaml:"id"`
UserID int `json:"user_id" yaml:"user_id"`
GroupID int `json:"group_id" yaml:"group_id"`
UserName string `json:"user_name" yaml:"user_name"`
GroupName string `json:"group_name" yaml:"group_name"`
Name string `json:"name" yaml:"name"`
Type string `json:"type" yaml:"type"`
Permissions Permissions `json:"permissions" yaml:"permissions"`
Lock Lock `json:"lock" yaml:"lock"`
Template Template `json:"template" yaml:"template"`
}
Document is the API payload based on the legacy xmlrpc backend.
type DocumentResponse ¶ added in v0.4.0
type DocumentResponse struct {
Document Document `json:"document"`
}
DocumentResponse is the response body for GET /cloud/document.
type DocumentService ¶ added in v0.4.0
type DocumentService struct {
// contains filtered or unexported fields
}
DocumentService owns the /cloud/document methods.
func (DocumentService) AllocateDocument ¶ added in v0.4.0
func (s DocumentService) AllocateDocument(ctx context.Context, req AllocateDocumentRequest) (*AllocateDocumentResponse, error)
AllocateDocument allocates a document.
func (DocumentService) ChangeDocumentOwnership ¶ added in v0.4.0
func (s DocumentService) ChangeDocumentOwnership(ctx context.Context, id int, req ChangeDocumentOwnershipRequest) (*ChangeDocumentOwnershipResponse, error)
ChangeDocumentOwnership changes the ownership of the document with the given ID.
func (DocumentService) ChangeDocumentPermissions ¶ added in v0.4.0
func (s DocumentService) ChangeDocumentPermissions(ctx context.Context, id int, req ChangeDocumentPermissionsRequest) (*ChangeDocumentPermissionsResponse, error)
ChangeDocumentPermissions changes the permissions of the document with the given ID.
func (DocumentService) CloneDocument ¶ added in v0.4.0
func (s DocumentService) CloneDocument(ctx context.Context, id int, req CloneDocumentRequest) (*CloneDocumentResponse, error)
CloneDocument clones the document with the given ID.
func (DocumentService) DeleteDocument ¶ added in v0.4.0
func (s DocumentService) DeleteDocument(ctx context.Context, id int) error
DeleteDocument deletes a document with the given ID.
func (DocumentService) Document ¶ added in v0.4.0
func (s DocumentService) Document(ctx context.Context, id int) (*DocumentResponse, error)
Document returns information about the document with the given ID.
func (DocumentService) Documents ¶ added in v0.4.0
func (s DocumentService) Documents(ctx context.Context) (*DocumentsResponse, error)
Documents returns information about all documents.
func (DocumentService) LockDocument ¶ added in v0.4.0
func (s DocumentService) LockDocument(ctx context.Context, id int, req LockDocumentRequest) (*LockDocumentResponse, error)
LockDocument locks the document with the given ID.
func (DocumentService) RenameDocument ¶ added in v0.4.0
func (s DocumentService) RenameDocument(ctx context.Context, id int, req RenameDocumentRequest) (*RenameDocumentResponse, error)
RenameDocument renames the document with the given ID.
func (DocumentService) UnlockDocument ¶ added in v0.4.0
func (s DocumentService) UnlockDocument(ctx context.Context, id int) (*UnlockDocumentResponse, error)
UnlockDocument unlocks the document with the given ID.
func (DocumentService) UpdateDocument ¶ added in v0.4.0
func (s DocumentService) UpdateDocument(ctx context.Context, id int, req UpdateDocumentRequest) (*UpdateDocumentResponse, error)
UpdateDocument updates the document with the given ID.
type DocumentsResponse ¶ added in v0.4.0
type DocumentsResponse struct {
Documents []Document `json:"document"`
}
DocumentsResponse is the response body for GET /cloud/document.
type EnableDatastoreRequest ¶
type EnableDatastoreRequest struct {
Enable bool `json:"enable"`
}
EnableDatastoreRequest is the request body for PATCH /cloud/datastore/{datastore}/enable.
type EnableDatastoreResponse ¶
type EnableDatastoreResponse struct {
Datastore int `json:"datastore"`
}
EnableDatastoreResponse is the response body for PATCH /cloud/datastore/enable.
type EnableImageRequest ¶
type EnableImageRequest struct {
Enable bool `json:"enable"`
}
EnableImageRequest is the request body for PATCH /cloud/image/{image}/enable.
type EnableImageResponse ¶
type EnableImageResponse struct {
Image int `json:"image"`
}
EnableImageResponse is the response body for PATCH /cloud/image/enable.
type EnableMarketAppRequest ¶
type EnableMarketAppRequest struct {
Enable bool `json:"enable"`
}
EnableMarketAppRequest is the request body for PATCH /cloud/market/app/enable.
type EnableMarketAppResponse ¶
type EnableMarketAppResponse struct {
Market int `json:"market"`
}
EnableMarketAppResponse is the response body for PATCH /cloud/market/app/enable.
type EnableMarketRequest ¶
type EnableMarketRequest struct {
Enable bool `json:"enable"`
}
EnableMarketRequest is the request body for PATCH /cloud/market/{market}/enable.
type EnableMarketResponse ¶
type EnableMarketResponse struct {
Market int `json:"market"`
}
EnableMarketResponse is the response body for PATCH /cloud/market/enable.
type EnableUserRequest ¶
type EnableUserRequest struct {
Enable bool `json:"enable"`
}
EnableUserRequest is the request body for PATCH /cloud/user/{user}/enable.
type EnableUserResponse ¶
type EnableUserResponse struct {
User int `json:"user"`
}
EnableUserResponse is the response body for PATCH /cloud/user/enable.
type EnableZoneRequest ¶
type EnableZoneRequest struct {
Enable bool `json:"enable"`
}
EnableZoneRequest is the request body for PATCH /cloud/zone/{zone}/enable.
type EnableZoneResponse ¶
type EnableZoneResponse struct {
Zone int `json:"zone"`
}
EnableZoneResponse is the response body for PATCH /cloud/zone/enable.
type Filter ¶
type Filter int
Filter is to filter list of object by user and group ownership.
const ( GroupFilter Filter = -4 // group UserFilter Filter = -3 // user AllFilter Filter = -2 // all UserAndGroupFilter Filter = -1 // user_group )
Filter type values.
func FilterString ¶
FilterString retrieves an enum value from the enum constants string name. Throws an error if the param is not part of the enum.
func (Filter) IsAFilter ¶
IsAFilter returns "true" if the value is listed in the enum definition. "false" otherwise
func (Filter) MarshalText ¶
MarshalText implements the encoding.TextMarshaler interface for Filter
func (*Filter) UnmarshalText ¶
UnmarshalText implements the encoding.TextUnmarshaler interface for Filter
type FlattenImageSnapshotResponse ¶
type FlattenImageSnapshotResponse struct {
Image int `json:"image"`
}
FlattenImageSnapshotResponse is the response body for PATCH /cloud/image/snapshot/flatten.
type Group ¶
type Group struct {
ID int `json:"id" yaml:"id"`
Name string `json:"name" yaml:"name"`
Template Template `json:"template" yaml:"template"`
Users []int `json:"users" yaml:"users"`
Admins []int `json:"admins" yaml:"admins"`
DatastoreQuota []UserDatastore `json:"datastore_quota" yaml:"datastore_quota"`
NetworkQuota []UserNetwork `json:"network_quota" yaml:"network_quota"`
InstanceQuota UserInstance `json:"instance_quota" yaml:"instance_quota"`
ImageQuota []UserImage `json:"image_quota" yaml:"image_quota"`
DefaultGroupQuotas UserDefaultQuotas `json:"default_group_quotas" yaml:"default_group_quotas"`
}
Group is the API payload based on the legacy xmlrpc backend.
func (*Group) ParseTemplate ¶ added in v0.14.0
func (g *Group) ParseTemplate() (*GroupTemplate, error)
ParseTemplate return a structured Template based on the given map.
type GroupQuotaResponse ¶ added in v0.4.0
type GroupQuotaResponse struct {
Quota UserDefaultQuotas `json:"quota"`
}
GroupQuotaResponse is the response body for GET /cloud/group/quota.
type GroupResponse ¶ added in v0.4.0
type GroupResponse struct {
Group Group `json:"group"`
}
GroupResponse is the response body for GET /cloud/group.
type GroupService ¶ added in v0.4.0
type GroupService struct {
// contains filtered or unexported fields
}
GroupService owns the /cloud/group methods.
func (GroupService) AddGroupAdmin ¶ added in v0.4.0
func (s GroupService) AddGroupAdmin(ctx context.Context, id int, req AddGroupAdminRequest) (*AddGroupAdminResponse, error)
AddGroupAdmin adds a group admin to the group with the given ID.
func (GroupService) CreateGroup ¶ added in v0.4.0
func (s GroupService) CreateGroup(ctx context.Context, req CreateGroupRequest) (*CreateGroupResponse, error)
CreateGroup creates a new group.
func (GroupService) DeleteGroup ¶ added in v0.4.0
func (s GroupService) DeleteGroup(ctx context.Context, id int) error
DeleteGroup deletes the group with the given ID.
func (GroupService) DeleteGroupAdmin ¶ added in v0.4.0
func (s GroupService) DeleteGroupAdmin(ctx context.Context, id, user int) error
DeleteGroupAdmin deletes the group admin from the group with the given ID.
func (GroupService) Group ¶ added in v0.4.0
func (s GroupService) Group(ctx context.Context, id int) (*GroupResponse, error)
Group returns information about a group.
func (GroupService) GroupQuota ¶ added in v0.4.0
func (s GroupService) GroupQuota(ctx context.Context) (*GroupQuotaResponse, error)
GroupQuota returns the default group quota.
func (GroupService) Groups ¶ added in v0.4.0
func (s GroupService) Groups(ctx context.Context) (*GroupsResponse, error)
Groups returns information about all groups.
func (GroupService) SetGroupQuota ¶ added in v0.4.0
func (s GroupService) SetGroupQuota(ctx context.Context, id int, req SetGroupQuotaRequest) (*SetGroupQuotaResponse, error)
SetGroupQuota sets the quota for the group with the given ID.
func (GroupService) UpdateGroup ¶ added in v0.4.0
func (s GroupService) UpdateGroup(ctx context.Context, id int, req UpdateGroupRequest) (*UpdateGroupResponse, error)
UpdateGroup updates the group with the given ID.
func (GroupService) UpdateGroupQuota ¶ added in v0.4.0
func (s GroupService) UpdateGroupQuota(ctx context.Context, req UpdateGroupQuotaRequest) (*UpdateGroupQuotaResponse, error)
UpdateGroupQuota updates the default group quota.
type GroupTemplate ¶
type GroupTemplate struct {
Sunstone *SunstoneTemplate
}
GroupTemplate is the API payload based on the legacy xmlrpc backend.
type GroupsResponse ¶ added in v0.4.0
type GroupsResponse struct {
Groups []Group `json:"groups"`
}
GroupsResponse is the response body for GET /cloud/group.
type HoldNetworkRequest ¶ added in v0.4.0
type HoldNetworkRequest struct {
Template string `json:"template"`
}
HoldNetworkRequest is the request body for PATCH /cloud/network/{network}/hold.
type HoldNetworkResponse ¶ added in v0.4.0
type HoldNetworkResponse struct {
Network int `json:"network"`
}
HoldNetworkResponse is the response body for PATCH /cloud/network/hold.
type Hook ¶
type Hook struct {
ID int `json:"id" yaml:"id"`
Name string `json:"name" yaml:"name"`
Type string `json:"type" yaml:"type"`
Template Template `json:"template" yaml:"template"`
HookLog HookLog `json:"hook_log" yaml:"hook_log"`
}
Hook is the API payload based on the legacy xmlrpc backend.
func (*Hook) ParseTemplate ¶ added in v0.14.0
func (h *Hook) ParseTemplate() (*HookTemplate, error)
ParseTemplate returns a structured subset of the nested key x value pair map.
type HookExecutionRecord ¶
type HookExecutionRecord struct {
Values map[string]string `json:"values" yaml:"values"`
HookID int `json:"hook_id" yaml:"hook_id"`
ExecutionID int `json:"execution_id" yaml:"execution_id"`
Timestamp int `json:"timestamp" yaml:"timestamp"`
Arguments string `json:"arguments" yaml:"arguments"`
ExecutionResult HookExecutionResult `json:"execution_result" yaml:"execution_result"`
RemoteHost string `json:"remote_host" yaml:"remote_host"`
Retry string `json:"retry" yaml:"retry"`
}
HookExecutionRecord is the API payload based on the legacy xmlrpc backend.
type HookExecutionResult ¶
type HookExecutionResult struct {
Command string `json:"command" yaml:"command"`
Stdout string `json:"stdout" yaml:"stdout"`
Stderr string `json:"stderr" yaml:"stderr"`
Code string `json:"code" yaml:"code"`
}
HookExecutionResult is the API payload based on the legacy xmlrpc backend.
type HookLog ¶
type HookLog struct {
HookExecutionRecord []HookExecutionRecord `json:"execution_record" yaml:"execution_record"`
}
HookLog is the API payload based on the legacy xmlrpc backend.
type HookLogResponse ¶ added in v0.4.0
type HookLogResponse struct {
HookLogs []HookLog `json:"hook_log"`
}
HookLogResponse is the response body for GET /cloud/hook/log.
type HookResponse ¶ added in v0.4.0
type HookResponse struct {
Hook Hook `json:"hook"`
}
HookResponse is the response body for GET /cloud/hook.
type HookService ¶ added in v0.4.0
type HookService struct {
// contains filtered or unexported fields
}
HookService own the /cloud/hook methods.
func (HookService) CreateHook ¶ added in v0.4.0
func (s HookService) CreateHook(ctx context.Context, req CreateHookRequest) (*CreateHookResponse, error)
CreateHook creates a new hook.
func (HookService) DeleteHook ¶ added in v0.4.0
func (s HookService) DeleteHook(ctx context.Context, id int) error
DeleteHook deletes the hook with the given id.
func (HookService) Hook ¶ added in v0.4.0
func (s HookService) Hook(ctx context.Context, id int) (*HookResponse, error)
Hook returns information about a hook.
func (HookService) HookLog ¶ added in v0.4.0
func (s HookService) HookLog(ctx context.Context, id int, start, end string) (*HookLogResponse, error)
HookLog returns the logs for a hook.
func (HookService) Hooks ¶ added in v0.4.0
func (s HookService) Hooks(ctx context.Context) (*HooksResponse, error)
Hooks returns information about all hooks.
func (HookService) LockHook ¶ added in v0.4.0
func (s HookService) LockHook(ctx context.Context, id int, req LockHookRequest) (*LockHookResponse, error)
LockHook locks the hook with the given id.
func (HookService) RenameHook ¶ added in v0.4.0
func (s HookService) RenameHook(ctx context.Context, id int, req RenameHookRequest) (*RenameHookResponse, error)
RenameHook renames the hook with the given id.
func (HookService) RetryHook ¶ added in v0.4.0
func (s HookService) RetryHook(ctx context.Context, id int, req RetryHookRequest) (*RetryHookResponse, error)
RetryHook retries the hook with the given id.
func (HookService) UnlockHook ¶ added in v0.4.0
func (s HookService) UnlockHook(ctx context.Context, id int, req UnlockHookRequest) (*UnlockHookResponse, error)
UnlockHook unlocks the hook with the given id.
func (HookService) UpdateHook ¶ added in v0.4.0
func (s HookService) UpdateHook(ctx context.Context, id int, req UpdateHookRequest) (*UpdateHookResponse, error)
UpdateHook updates the hook with the given id.
type HookTemplate ¶
type HookTemplate struct {
Arguments string
ArgumentsStdin string
Call string
Command string
Remote string
Resource string
State string
LCMState LCMState
}
HookTemplate is the API payload based on the legacy xmlrpc backend.
type HooksResponse ¶ added in v0.4.0
type HooksResponse struct {
Hooks []Hook `json:"hook"`
}
HooksResponse is the response body for GET /cloud/hook.
type Host ¶
type Host struct {
ID int `json:"id" yaml:"id"`
Name string `json:"name" yaml:"name"`
State int `json:"state" yaml:"state"`
PrevState int `json:"prev_state" yaml:"prev_state"`
InformationManagerMAD string `json:"information_manager_mad" yaml:"information_manager_mad"`
InstanceMAD string `json:"instance_mad" yaml:"instance_mad"`
ClusterID int `json:"cluster_id" yaml:"cluster_id"`
Cluster string `json:"cluster" yaml:"cluster"`
Instances []int `json:"instances" yaml:"instances"`
Template Template `json:"template" yaml:"template"`
Monitoring HostMonitoring `json:"monitoring" yaml:"monitoring"`
}
Host is the API payload based on the legacy xmlrpc backend.
func (*Host) ParseTemplate ¶ added in v0.14.0
func (h *Host) ParseTemplate() (*HostTemplate, error)
ParseTemplate returns a structured subset of the nested key x value pair map.
type HostMonitoring ¶
type HostMonitoring struct {
Timestamp int `json:"timestamp" yaml:"timestamp"`
ID int `json:"id" yaml:"id"`
Capacity Capacity `json:"capacity" yaml:"capacity"`
System System `json:"system" yaml:"system"`
}
HostMonitoring is the API payload based on the legacy xmlrpc backend.
type HostMonitoringResponse ¶ added in v0.4.0
type HostMonitoringResponse struct {
Monitoring []HostMonitoring `json:"monitoring"`
}
HostMonitoringResponse is the response body for GET /cloud/host/monitoring.
type HostResponse ¶ added in v0.4.0
type HostResponse struct {
Host Host `json:"host"`
}
HostResponse is the response body for GET /cloud/host.
type HostService ¶ added in v0.4.0
type HostService struct {
// contains filtered or unexported fields
}
HostService owns the /cloud/compute methods.
func (HostService) CreateHost ¶ added in v0.4.0
func (s HostService) CreateHost(ctx context.Context, req CreateHostRequest) (*CreateHostResponse, error)
CreateHost creates a new compute host.
func (HostService) DeleteHost ¶ added in v0.4.0
func (s HostService) DeleteHost(ctx context.Context, id int) error
DeleteHost deletes the compute host with the given ID.
func (HostService) Host ¶ added in v0.4.0
func (s HostService) Host(ctx context.Context, id int) (*HostResponse, error)
Host returns information about a compute host.
func (HostService) HostMonitoring ¶ added in v0.4.0
func (s HostService) HostMonitoring(ctx context.Context, id int) (*HostMonitoringResponse, error)
HostMonitoring returns monitoring data for a compute host.
func (HostService) Hosts ¶ added in v0.4.0
func (s HostService) Hosts(ctx context.Context) (*HostsResponse, error)
Hosts returns information about all compute hosts.
func (HostService) HostsMonitoring ¶ added in v0.4.0
func (s HostService) HostsMonitoring(ctx context.Context, interval time.Duration) (*HostsMonitoringResponse, error)
HostsMonitoring returns monitoring data for all compute hosts.
func (HostService) RenameHost ¶ added in v0.4.0
func (s HostService) RenameHost(ctx context.Context, id int, req RenameHostRequest) (*RenameHostResponse, error)
RenameHost renames the compute host with the given ID.
func (HostService) SetHostStatus ¶ added in v0.4.0
func (s HostService) SetHostStatus(ctx context.Context, id int, req SetHostStatusRequest) (*SetHostStatusResponse, error)
SetHostStatus sets the status of the compute host with the given ID.
func (HostService) UpdateComputeHost ¶ added in v0.4.0
func (s HostService) UpdateComputeHost(ctx context.Context, id int, req UpdateHostRequest) (*UpdateHostResponse, error)
UpdateComputeHost updates the compute host with the given ID.
type HostShare ¶
type HostShare struct {
}
HostShare is the API payload based on the legacy xmlrpc backend.
type HostTemplate ¶
type HostTemplate struct {
Arch string
CGroupsVersion string
CPUSpeed int
Hostname string
Hypervisor string
IMMAD string
KVMCPUModel string
KVMCPUModels []string
KVMMachines []string
ModelName string
ReservedCPU string
ReservedMem string
TotalWilds int
Version string
Instance []HostTemplateInstance
InstanceMAD string
Wilds string
}
HostTemplate is the API payload based on the legacy xmlrpc backend.
type HostTemplateInstance ¶
HostTemplateInstance is the API payload based on the legacy xmlrpc backend.
type HostsMonitoringResponse ¶ added in v0.4.0
type HostsMonitoringResponse struct {
Monitoring []HostMonitoring `json:"monitoring"`
}
HostsMonitoringResponse is the response body for GET /cloud/host/monitoring.
type HostsResponse ¶ added in v0.4.0
type HostsResponse struct {
Hosts []Host `json:"hosts"`
}
HostsResponse is the response body for GET /cloud/host.
type HugePage ¶
type HugePage struct {
Free int `json:"free" yaml:"free"`
Pages int `json:"pages" yaml:"pages"`
Size int `json:"size" yaml:"size"`
Usage int `json:"usage" yaml:"usage"`
}
HugePage is the API payload based on the legacy xmlrpc backend.
type HyperCloudConfiguration ¶
type HyperCloudConfiguration struct {
APIListOrder []string `json:"api_list_order" yaml:"api_list_order"`
AuthMAD []config.AuthMAD `json:"auth_mad" yaml:"auth_mad"`
AuthMADConf []config.AuthMADConf `json:"auth_madconf" yaml:"auth_madconf"`
ClusterEncryptedAttr []string `json:"cluster_encrypted_attr" yaml:"cluster_encrypted_attr"`
DatastoreCapacityCheck []string `json:"datastore_capacity_check" yaml:"datastore_capacity_check"`
DatastoreEncryptedAttr []string `json:"datastore_encrypted_attr" yaml:"datastore_encrypted_attr"`
DatastoreLocation []string `json:"datastore_location" yaml:"datastore_location"`
DatastoreMAD []config.DatastoreMAD `json:"datastore_mad" yaml:"datastore_mad"`
DB config.DB `json:"db" yaml:"db"`
DefaultAuth []string `json:"default_auth" yaml:"default_auth"`
DefaultCdromDevicePrefix []string `json:"default_cdrom_device_prefix" yaml:"default_cdrom_device_prefix"`
DefaultCost []config.DefaultCost `json:"default_cost" yaml:"default_cost"`
DefaultDevicePrefix []string `json:"default_device_prefix" yaml:"default_device_prefix"`
DefaultImagePersistent []string `json:"default_image_persistent" yaml:"default_image_persistent"`
DefaultImagePersistentNew []string `json:"default_image_persistent_new" yaml:"default_image_persistent_new"`
DefaultImageType []string `json:"default_image_type" yaml:"default_image_type"`
DefaultUmask []string `json:"default_umask" yaml:"default_umask"`
DefaultVDCClusterDatastoreACL []string `json:"default_vdccluster_datastore_acl" yaml:"default_vdccluster_datastore_acl"`
DefaultVDCClusterHostACL []string `json:"default_vdccluster_host_acl" yaml:"default_vdccluster_host_acl"`
DefaultVDCClusterNetACL []string `json:"default_vdccluster_net_acl" yaml:"default_vdccluster_net_acl"`
DefaultVDCDatastoreACL []string `json:"default_vdcdatastore_acl" yaml:"default_vdcdatastore_acl"`
DefaultVDCHostACL []string `json:"default_vdchost_acl" yaml:"default_vdchost_acl"`
DefaultVDCVnetACL []string `json:"default_vdcvnet_acl" yaml:"default_vdcvnet_acl"`
DocumentEncryptedAttr []string `json:"document_encrypted_attr" yaml:"document_encrypted_attr"`
DSMADConf []config.DSMADConf `json:"dsmadconf" yaml:"dsmadconf"`
DSMonitorInstanceDisk int `json:"dsmonitor_instance_disk" yaml:"dsmonitor_instance_disk"`
EnableOtherPermissions string `json:"enable_other_permissions" yaml:"enable_other_permissions"`
Federation config.Federation `json:"federation" yaml:"federation"`
GroupRestrictedAttr []string `json:"group_restricted_attr" yaml:"group_restricted_attr"`
HookManagerMAD config.HookManagerMAD `json:"hook_manager_mad" yaml:"hook_manager_mad"`
HookLogConf config.HookLogConf `json:"hook_log_conf" yaml:"hook_log_conf"`
HostEncryptedAttr []string `json:"host_encrypted_attr" yaml:"host_encrypted_attr"`
ImageEncryptedAttr []string `json:"image_encrypted_attr" yaml:"image_encrypted_attr"`
ImageRestrictedAttr []string `json:"image_restricted_attr" yaml:"image_restricted_attr"`
ImMAD []config.ImMAD `json:"im_mad" yaml:"im_mad"`
InheritDatastoreAttr []string `json:"inherit_datastore_attr" yaml:"inherit_datastore_attr"`
InheritImageAttr []string `json:"inherit_image_attr" yaml:"inherit_image_attr"`
InheritVnetAttr []string `json:"inherit_vnet_attr" yaml:"inherit_vnet_attr"`
IpamMAD []config.IpamMAD `json:"ipam_mad" yaml:"ipam_mad"`
KeepaliveMaxConn []int `json:"keepalive_max_conn" yaml:"keepalive_max_conn"`
KeepaliveTimeout []int `json:"keepalive_timeout" yaml:"keepalive_timeout"`
ListenAddress []string `json:"listen_address" yaml:"listen_address"`
Log []config.Log `json:"log" yaml:"log"`
LogCallFormat []string `json:"log_call_format" yaml:"log_call_format"`
MACPrefix []string `json:"macprefix" yaml:"macprefix"`
ManagerTimer []int `json:"manager_timer" yaml:"manager_timer"`
MarketMAD []config.MarketMAD `json:"market_mad" yaml:"market_mad"`
MarketMADConf []config.MarketMADConf `json:"market_madconf" yaml:"market_madconf"`
MaxConn int `json:"max_conn" yaml:"max_conn"`
MaxConnBacklog int `json:"max_conn_backlog" yaml:"max_conn_backlog"`
MessageSize int `json:"message_size" yaml:"message_size"`
MonitoringIntervalDatastore int `json:"monitoring_interval_datastore" yaml:"monitoring_interval_datastore"`
MonitoringIntervalDBUpdate int `json:"monitoring_interval_dbupdate" yaml:"monitoring_interval_dbupdate"`
MonitoringIntervalHost int `json:"monitoring_interval_host" yaml:"monitoring_interval_host"`
MonitoringIntervalMarket int `json:"monitoring_interval_market" yaml:"monitoring_interval_market"`
MonitoringIntervalInstance int `json:"monitoring_interval_instance" yaml:"monitoring_interval_instance"`
NetworkSize int `json:"network_size" yaml:"network_size"`
Key []string `json:"one_key" yaml:"one_key"`
PCIPassthroughBus string `json:"pcipassthrough_bus" yaml:"pcipassthrough_bus"`
Port int `json:"port" yaml:"port"`
Raft config.Raft `json:"raft" yaml:"raft"`
RPCLog string `json:"rpclog" yaml:"rpclog"`
ScriptsRemoteDir string `json:"scripts_remote_dir" yaml:"scripts_remote_dir"`
SessionExpirationTime int `json:"session_expiration_time" yaml:"session_expiration_time"`
ShowbackOnlyRunning string `json:"showback_only_running" yaml:"showback_only_running"`
Timeout int `json:"timeout" yaml:"timeout"`
TmMAD []config.TmMAD `json:"tm_mad" yaml:"tm_mad"`
TmMADConf []config.TmMADConf `json:"tm_madconf" yaml:"tm_madconf"`
UserEncryptedAttr []string `json:"user_encrypted_attr" yaml:"user_encrypted_attr"`
UserRestrictedAttr []string `json:"user_restricted_attr" yaml:"user_restricted_attr"`
VLANIDs config.VLANIDs `json:"vlanids" yaml:"vlanids"`
InstanceAdminOperations string `json:"instance_admin_operations" yaml:"instance_admin_operations"`
InstanceEncryptedAttr []string `json:"instance_encrypted_attr" yaml:"instance_encrypted_attr"`
InstanceMAD []config.InstanceMAD `json:"instance_mad" yaml:"instance_mad"`
InstanceManageOperations string `json:"instance_manage_operations" yaml:"instance_manage_operations"`
InstanceMonitoringExpirationTime []string `json:"instance_monitoring_expiration_time" yaml:"instance_monitoring_expiration_time"`
InstanceRestrictedAttr []string `json:"instance_restricted_attr" yaml:"instance_restricted_attr"`
InstanceSnapshotFactor string `json:"instance_snapshot_factor" yaml:"instance_snapshot_factor"`
InstanceSubmitOnHold string `json:"instance_submit_on_hold" yaml:"instance_submit_on_hold"`
InstanceUseOperations []string `json:"instance_use_operations" yaml:"instance_use_operations"`
VNCPorts config.VNCPorts `json:"vncports" yaml:"vncports"`
VNetEncryptedAttr []string `json:"vnet_encrypted_attr" yaml:"vnet_encrypted_attr"`
VNetRestrictedAttr []string `json:"vnet_restricted_attr" yaml:"vnet_restricted_attr"`
VNMADConf []config.VNetMADConf `json:"vnmadconf" yaml:"vnmadconf"`
VxlanIDs config.VxlanIDs `json:"vxlan_ids" yaml:"vxlan_ids"`
}
HyperCloudConfiguration is the API payload based on the legacy xmlrpc backend.
type Image ¶
type Image struct {
ID int `json:"id" yaml:"id"`
UserID int `json:"user_id" yaml:"user_id"`
GroupID int `json:"group_id" yaml:"group_id"`
UserName string `json:"user_name" yaml:"user_name"`
GroupName string `json:"group_name" yaml:"group_name"`
Name string `json:"name" yaml:"name"`
Lock Lock `json:"lock" yaml:"lock"`
Permissions Permissions `json:"permissions" yaml:"permissions"`
Type int `json:"type" yaml:"type"`
DiskType int `json:"disk_type" yaml:"disk_type"`
Persistent int `json:"persistent" yaml:"persistent"`
RegistrationTime time.Time `json:"registration_time" yaml:"registration_time"`
Source string `json:"source" yaml:"source"`
Path string `json:"path" yaml:"path"`
Format string `json:"format" yaml:"format"`
Filesystem string `json:"filesystem" yaml:"filesystem"`
Size int `json:"size" yaml:"size"`
State int `json:"state" yaml:"state"`
PrevState int `json:"prev_state" yaml:"prev_state"`
RunningInstances int `json:"running_instances" yaml:"running_instances"`
CloningOps int `json:"cloning_ops" yaml:"cloning_ops"`
CloningID int `json:"cloning_id" yaml:"cloning_id"`
TargetSnapshot int `json:"target_snapshot" yaml:"target_snapshot"`
DatastoreID int `json:"datastore_id" yaml:"datastore_id"`
Datastore string `json:"datastore" yaml:"datastore"`
Instances []int `json:"instances" yaml:"instances"`
Clones []int `json:"clones" yaml:"clones"`
AppClones []int `json:"app_clones" yaml:"app_clones"`
Template Template `json:"template" yaml:"template"`
Snapshots instance.Snapshots `json:"snapshots" yaml:"snapshots"`
}
Image is the API payload based on the legacy xmlrpc backend.
func (*Image) ParseTemplate ¶ added in v0.14.0
func (i *Image) ParseTemplate() (*ImageTemplate, error)
ParseTemplate returns a structured subset of the nested key x value pair map.
type ImageResponse ¶ added in v0.4.0
type ImageResponse struct {
Image Image `json:"image"`
}
ImageResponse is the response body for GET /cloud/image.
type ImageService ¶ added in v0.4.0
type ImageService struct {
// contains filtered or unexported fields
}
ImageService owns the /cloud/image methods.
func (ImageService) ChangeImageOwnership ¶ added in v0.4.0
func (s ImageService) ChangeImageOwnership(ctx context.Context, id int, req ChangeImageOwnershipRequest) (*ChangeImageOwnershipResponse, error)
ChangeImageOwnership changes the ownership of the image with the given ID.
func (ImageService) ChangeImagePermissions ¶ added in v0.4.0
func (s ImageService) ChangeImagePermissions(ctx context.Context, id int, req ChangeImagePermissionsRequest) (*ChangeImagePermissionsResponse, error)
ChangeImagePermissions changes the permissions of the image with the given ID.
func (ImageService) ChangeImageType ¶ added in v0.4.0
func (s ImageService) ChangeImageType(ctx context.Context, id int, req ChangeImageTypeRequest) (*ChangeImageTypeResponse, error)
ChangeImageType changes the type of the image with the given ID.
func (ImageService) CloneImage ¶ added in v0.4.0
func (s ImageService) CloneImage(ctx context.Context, id int, req CloneImageRequest) (*CloneImageResponse, error)
CloneImage clones the image with the given ID.
func (ImageService) CreateImage ¶ added in v0.4.0
func (s ImageService) CreateImage(ctx context.Context, req CreateImageRequest) (*CreateImageResponse, error)
CreateImage creates a new image.
func (ImageService) DeleteImage ¶ added in v0.4.0
func (s ImageService) DeleteImage(ctx context.Context, id int) error
DeleteImage deletes the image with the given ID.
func (ImageService) DeleteImageSnapshot ¶ added in v0.4.0
func (s ImageService) DeleteImageSnapshot(ctx context.Context, id, snapshot int) error
DeleteImageSnapshot deletes a snapshot for the image with the given ID.
func (ImageService) EnableImage ¶ added in v0.4.0
func (s ImageService) EnableImage(ctx context.Context, id int, req EnableImageRequest) (*EnableImageResponse, error)
EnableImage enables the image with the given ID.
func (ImageService) FlattenImageSnapshot ¶ added in v0.4.0
func (s ImageService) FlattenImageSnapshot(ctx context.Context, id, snapshot int) (*FlattenImageSnapshotResponse, error)
FlattenImageSnapshot flattens the snapshot of the image with the given ID.
func (ImageService) Image ¶ added in v0.4.0
func (s ImageService) Image(ctx context.Context, id int) (*ImageResponse, error)
Image returns information about a image.
func (ImageService) Images ¶ added in v0.4.0
func (s ImageService) Images(ctx context.Context) (*ImagesResponse, error)
Images returns information about all images.
func (ImageService) LockImage ¶ added in v0.4.0
func (s ImageService) LockImage(ctx context.Context, id int, req LockImageRequest) (*LockImageResponse, error)
LockImage locks the image with the given ID.
func (ImageService) RenameImage ¶ added in v0.4.0
func (s ImageService) RenameImage(ctx context.Context, id int, req RenameImageRequest) (*RenameImageResponse, error)
RenameImage renames the image with the given ID.
func (ImageService) RevertImageSnapshot ¶ added in v0.4.0
func (s ImageService) RevertImageSnapshot(ctx context.Context, id, snapshot int) (*RevertImageSnapshotResponse, error)
RevertImageSnapshot reverts the snapshot of the image with the given ID.
func (ImageService) SetImagePersistent ¶ added in v0.4.0
func (s ImageService) SetImagePersistent(ctx context.Context, id int, req SetImagePersistentRequest) (*SetImagePersistentResponse, error)
SetImagePersistent sets the image with the given ID to be persistent.
func (ImageService) UnlockImage ¶ added in v0.4.0
func (s ImageService) UnlockImage(ctx context.Context, id int) (*UnlockImageResponse, error)
UnlockImage unlocks the image with the given ID.
func (ImageService) UpdateImage ¶ added in v0.4.0
func (s ImageService) UpdateImage(ctx context.Context, id int, req UpdateImageRequest) (*UpdateImageResponse, error)
UpdateImage updates the image with the given ID.
type ImageTemplate ¶
type ImageTemplate struct {
DevPrefix string
Driver string
FromApp string
FromAppMD5 string
FromAppName string
Size int
}
ImageTemplate is the API payload based on the legacy xmlrpc backend.
type ImageType ¶
type ImageType int
ImageType is the type of image.
const ( OS ImageType CDROM DataBlock Kernel RAMDisk Context )
ImageType values.
func ImageTypeString ¶
ImageTypeString retrieves an enum value from the enum constants string name. Throws an error if the param is not part of the enum.
func ImageTypeValues ¶
func ImageTypeValues() []ImageType
ImageTypeValues returns all values of the enum
func (ImageType) IsAImageType ¶
IsAImageType returns "true" if the value is listed in the enum definition. "false" otherwise
func (ImageType) MarshalText ¶
MarshalText implements the encoding.TextMarshaler interface for ImageType
func (*ImageType) UnmarshalText ¶
UnmarshalText implements the encoding.TextUnmarshaler interface for ImageType
type ImagesResponse ¶ added in v0.4.0
type ImagesResponse struct {
Images []Image `json:"images"`
}
ImagesResponse is the response body for GET /cloud/image.
type Instance ¶
type Instance struct {
ID int `json:"id" yaml:"id"`
UserID int `json:"user_id" yaml:"user_id"`
GroupID int `json:"group_id" yaml:"group_id"`
UserName string `json:"user_name" yaml:"user_name"`
GroupName string `json:"group_name" yaml:"group_name"`
Name string `json:"name" yaml:"name"`
Permissions Permissions `json:"permissions" yaml:"permissions"`
LastPoll api.Time `json:"last_poll" yaml:"last_poll"`
State instance.State `json:"state" yaml:"state"`
LCMState LCMState `json:"lcm_state" yaml:"lcm_state"`
PrevState instance.State `json:"prev_state" yaml:"prev_state"`
PrevLCMState LCMState `json:"prev_lcm_state" yaml:"prev_lcm_state"`
Reschedule bool `json:"reschedule" yaml:"reschedule"`
StartTime api.Time `json:"start_time" yaml:"start_time"`
EndTime api.Time `json:"end_time" yaml:"end_time"`
DeployID string `json:"deploy_id" yaml:"deploy_id"`
Monitoring instance.Monitoring `json:"monitoring" yaml:"monitoring"`
Template Template `json:"template" yaml:"template"`
UserTemplate Template `json:"user_template" yaml:"user_template"`
HistoryRecords []instance.History `json:"history_records" yaml:"history_records"`
Snapshots []instance.DiskSnapshots `json:"snapshots" yaml:"snapshots"`
}
Instance is the API payload based on the legacy xmlrpc backend.
type InstanceGroup ¶
type InstanceGroup struct {
ID int `json:"id" yaml:"id"`
UID int `json:"uid" yaml:"uid"`
GID int `json:"gid" yaml:"gid"`
UserName string `json:"user_name" yaml:"user_name"`
GroupName string `json:"group_name" yaml:"group_name"`
Name string `json:"name" yaml:"name"`
Permissions Permissions `json:"permissions" yaml:"permissions"`
Lock Lock `json:"lock" yaml:"lock"`
Roles []instance.GroupRole `json:"roles" yaml:"roles"`
Template Template `json:"template" yaml:"template"`
}
InstanceGroup is the API payload based on the legacy xmlrpc backend.
type InstanceGroupResponse ¶ added in v0.4.0
type InstanceGroupResponse struct {
InstanceGroup InstanceGroup `json:"instance_group"`
}
InstanceGroupResponse is the response body for GET /cloud/instance-group.
type InstanceGroupsResponse ¶ added in v0.4.0
type InstanceGroupsResponse struct {
InstanceGroups []InstanceGroup `json:"instance_groups"`
}
InstanceGroupsResponse is the response body for GET /cloud/instance-group.
type InstanceMonitoringResponse ¶ added in v0.4.0
type InstanceMonitoringResponse struct {
Monitoring []instance.Monitoring `json:"monitoring"`
}
InstanceMonitoringResponse is the response body for GET /cloud/instance/monitoring/{id}.
type InstanceRecovery ¶
type InstanceRecovery int
InstanceRecovery is the recovery action to take when an instance is in error.
const ( FailureRecovery InstanceRecovery = iota // failure SuccessRecovery // success RetryRecovery // retry DeleteRecovery // delete DeleteRecreateRecovery // delete_recreate DeleteDBVNRecovery // delete_dbvn )
InstanceRecovery values.
func InstanceRecoveryString ¶
func InstanceRecoveryString(s string) (InstanceRecovery, error)
InstanceRecoveryString retrieves an enum value from the enum constants string name. Throws an error if the param is not part of the enum.
func InstanceRecoveryValues ¶
func InstanceRecoveryValues() []InstanceRecovery
InstanceRecoveryValues returns all values of the enum
func (InstanceRecovery) IsAInstanceRecovery ¶
func (i InstanceRecovery) IsAInstanceRecovery() bool
IsAInstanceRecovery returns "true" if the value is listed in the enum definition. "false" otherwise
func (InstanceRecovery) MarshalText ¶
func (i InstanceRecovery) MarshalText() ([]byte, error)
MarshalText implements the encoding.TextMarshaler interface for InstanceRecovery
func (InstanceRecovery) String ¶
func (i InstanceRecovery) String() string
func (*InstanceRecovery) UnmarshalText ¶
func (i *InstanceRecovery) UnmarshalText(text []byte) error
UnmarshalText implements the encoding.TextUnmarshaler interface for InstanceRecovery
func (InstanceRecovery) V1 ¶ added in v0.8.0
func (i InstanceRecovery) V1() hc.InstanceRecovery
V1 returns the v1 hc.InstanceRecovery that corresponds to the InstanceRecovery.
type InstanceResponse ¶ added in v0.4.0
type InstanceResponse struct {
Instance LockedInstance `json:"instance"`
}
InstanceResponse is the response body for GET /cloud/instance/{instance}.
type InstanceService ¶ added in v0.4.0
type InstanceService struct {
// contains filtered or unexported fields
}
InstanceService owns the /cloud/instance and /cloud/instance-group methods.
func (InstanceService) AddInstanceSchedule ¶ added in v0.4.0
func (s InstanceService) AddInstanceSchedule(ctx context.Context, id int, req AddInstanceScheduleRequest) (*AddInstanceScheduleResponse, error)
AddInstanceSchedule adds a schedule to the instance with the given id.
func (InstanceService) AddInstanceSecurityGroup ¶ added in v0.4.0
func (s InstanceService) AddInstanceSecurityGroup(ctx context.Context, id, nic, sg int) (*AddInstanceSecurityGroupResponse, error)
AddInstanceSecurityGroup adds a security group to the instance with the given id.
func (InstanceService) CalculateInstancesShowback ¶ added in v0.4.0
func (s InstanceService) CalculateInstancesShowback(ctx context.Context, req CalculateInstancesShowbackRequest) error
CalculateInstancesShowback calculates the showback for all the instances.
func (InstanceService) ChangeInstanceGroupOwnership ¶ added in v0.4.0
func (s InstanceService) ChangeInstanceGroupOwnership(ctx context.Context, id int, req ChangeInstanceGroupOwnershipRequest) (*ChangeInstanceGroupOwnershipResponse, error)
ChangeInstanceGroupOwnership changes the ownership of the instance group with the given ID.
func (InstanceService) ChangeInstanceGroupPermissions ¶ added in v0.4.0
func (s InstanceService) ChangeInstanceGroupPermissions(ctx context.Context, id int, req ChangeInstanceGroupPermissionsRequest) (*ChangeInstanceGroupPermissionsResponse, error)
ChangeInstanceGroupPermissions changes the permissions of the instance group with the given ID.
func (InstanceService) ChangeInstanceOwnership ¶ added in v0.4.0
func (s InstanceService) ChangeInstanceOwnership(ctx context.Context, id int, req ChangeInstanceOwnershipRequest) (*ChangeInstanceOwnershipResponse, error)
ChangeInstanceOwnership changes the ownership of the instance with the given id.
func (InstanceService) ChangeInstancePermissions ¶ added in v0.4.0
func (s InstanceService) ChangeInstancePermissions(ctx context.Context, id int, req ChangeInstancePermissionsRequest) (*ChangeInstancePermissionsResponse, error)
ChangeInstancePermissions changes the permissions of the instance with the given id.
func (InstanceService) CreateInstance ¶ added in v0.4.0
func (s InstanceService) CreateInstance(ctx context.Context, req CreateInstanceRequest) (*CreateInstanceResponse, error)
CreateInstance creates a new instance.
func (InstanceService) CreateInstanceDisk ¶ added in v0.4.0
func (s InstanceService) CreateInstanceDisk(ctx context.Context, id int, req CreateInstanceDiskRequest) (*CreateInstanceDiskResponse, error)
CreateInstanceDisk creates a new disk for the instance with the given id.
func (InstanceService) CreateInstanceDiskImage ¶ added in v0.4.0
func (s InstanceService) CreateInstanceDiskImage(ctx context.Context, id, disk int, req CreateInstanceDiskImageRequest) (*CreateInstanceDiskImageResponse, error)
CreateInstanceDiskImage creates a new disk image for the instance with the given id.
func (InstanceService) CreateInstanceDiskSnapshot ¶ added in v0.4.0
func (s InstanceService) CreateInstanceDiskSnapshot(ctx context.Context, id, disk int, req CreateInstanceDiskSnapshotRequest) (*CreateInstanceDiskSnapshotResponse, error)
CreateInstanceDiskSnapshot creates a new disk snapshot for the instance with the given id.
func (InstanceService) CreateInstanceNIC ¶ added in v0.4.0
func (s InstanceService) CreateInstanceNIC(ctx context.Context, id int, req CreateInstanceNICRequest) (*CreateInstanceNICResponse, error)
CreateInstanceNIC creates a new NIC for the instance with the given id.
func (InstanceService) CreateInstanceSnapshot ¶ added in v0.4.0
func (s InstanceService) CreateInstanceSnapshot(ctx context.Context, id int, req CreateInstanceSnapshotRequest) (*CreateInstanceSnapshotResponse, error)
CreateInstanceSnapshot creates a new snapshot for the instance with the given id.
func (InstanceService) CreateVNCProxy ¶ added in v0.4.0
func (s InstanceService) CreateVNCProxy(ctx context.Context, id int, req CreateVNCProxyRequest) (*CreateVNCProxyResponse, error)
CreateVNCProxy creates a new VNC proxy on the server for a specific VM.
func (InstanceService) DeleteInstanceDisk ¶ added in v0.4.0
func (s InstanceService) DeleteInstanceDisk(ctx context.Context, id, disk int) error
DeleteInstanceDisk deletes a disk from the instance with the given id.
func (InstanceService) DeleteInstanceDiskSnapshot ¶ added in v0.4.0
func (s InstanceService) DeleteInstanceDiskSnapshot(ctx context.Context, id, disk, snapshot int) error
DeleteInstanceDiskSnapshot deletes a snapshot from the instance with the given id.
func (InstanceService) DeleteInstanceGroup ¶ added in v0.4.0
func (s InstanceService) DeleteInstanceGroup(ctx context.Context, id int) error
DeleteInstanceGroup deletes the instance group with the given ID.
func (InstanceService) DeleteInstanceNIC ¶ added in v0.4.0
func (s InstanceService) DeleteInstanceNIC(ctx context.Context, id, nic int) error
DeleteInstanceNIC deletes a NIC from the instance with the given id.
func (InstanceService) DeleteInstanceSchedule ¶ added in v0.4.0
func (s InstanceService) DeleteInstanceSchedule(ctx context.Context, id, schedule int) error
DeleteInstanceSchedule deletes a schedule from the instance with the given id.
func (InstanceService) DeleteInstanceSecurityGroup ¶ added in v0.4.0
func (s InstanceService) DeleteInstanceSecurityGroup(ctx context.Context, id, nic int) error
DeleteInstanceSecurityGroup deletes a security group from the instance with the given id.
func (InstanceService) DeleteInstanceSnapshot ¶ added in v0.4.0
func (s InstanceService) DeleteInstanceSnapshot(ctx context.Context, id, snapshot int) error
DeleteInstanceSnapshot deletes a snapshot from the instance with the given id.
func (InstanceService) DeployInstance ¶ added in v0.4.0
func (s InstanceService) DeployInstance(ctx context.Context, id int, req DeployInstanceRequest) (*DeployInstanceResponse, error)
DeployInstance deploys the instance with the given id.
func (InstanceService) Instance ¶ added in v0.4.0
func (s InstanceService) Instance(ctx context.Context, id int) (*InstanceResponse, error)
Instance returns the Instance for the given id.
func (InstanceService) InstanceGroup ¶ added in v0.4.0
func (s InstanceService) InstanceGroup(ctx context.Context, id int) (*InstanceGroupResponse, error)
InstanceGroup returns information about an instance group.
func (InstanceService) InstanceGroups ¶ added in v0.4.0
func (s InstanceService) InstanceGroups(ctx context.Context) (*InstanceGroupsResponse, error)
InstanceGroups returns information about all instance groups.
func (InstanceService) InstanceMonitoringData ¶ added in v0.4.0
func (s InstanceService) InstanceMonitoringData(ctx context.Context, id int) (*InstanceMonitoringResponse, error)
InstanceMonitoringData returns monitoring data for id.
func (InstanceService) InstanceShowback ¶ added in v0.4.0
func (s InstanceService) InstanceShowback(ctx context.Context, filter Filter, monthStart, monthEnd time.Month, yearStart, yearEnd int) (*InstancesShowbackResponse, error)
InstanceShowback returns showback data for a set of instances.
func (InstanceService) Instances ¶ added in v0.4.0
func (s InstanceService) Instances(ctx context.Context, state instance.State, extended bool) (*InstancesResponse, error)
Instances returns a slice of all the Instances in the given state.
func (InstanceService) InstancesAccountingData ¶ added in v0.4.0
func (s InstanceService) InstancesAccountingData(ctx context.Context, filter Filter, start, end time.Time) (*InstancesAccountingResponse, error)
InstancesAccountingData returns accounting data for a set of instances.
func (InstanceService) InstancesMonitoringData ¶ added in v0.4.0
func (s InstanceService) InstancesMonitoringData(ctx context.Context, filter Filter, seconds int) (*InstancesMonitoringResponse, error)
InstancesMonitoringData returns monitoring data for a set of instances.
func (InstanceService) InstancesSet ¶ added in v0.4.0
func (s InstanceService) InstancesSet(ctx context.Context, ids ...int) (*InstancesResponse, error)
InstancesSet returns a slice of Instances.
func (InstanceService) LockInstance ¶ added in v0.4.0
func (s InstanceService) LockInstance(ctx context.Context, id int, req LockInstanceRequest) (*LockInstanceResponse, error)
LockInstance locks the instance with the given id.
func (InstanceService) LockInstanceGroup ¶ added in v0.4.0
func (s InstanceService) LockInstanceGroup(ctx context.Context, id int, req LockInstanceGroupRequest) (*LockInstanceGroupResponse, error)
LockInstanceGroup locks the instance group with the given ID.
func (InstanceService) MoveInstance ¶ added in v0.4.0
func (s InstanceService) MoveInstance(ctx context.Context, id int, req MoveInstanceRequest) (*MoveInstanceResponse, error)
MoveInstance moves the instance with the given id.
func (InstanceService) RecoverInstance ¶ added in v0.4.0
func (s InstanceService) RecoverInstance(ctx context.Context, id int, req RecoverInstanceRequest) (*RecoverInstanceResponse, error)
RecoverInstance recovers the instance with the given id.
func (InstanceService) RenameInstance ¶ added in v0.4.0
func (s InstanceService) RenameInstance(ctx context.Context, id int, req RenameInstanceRequest) (*RenameInstanceResponse, error)
RenameInstance renames the instance with the given id.
func (InstanceService) RenameInstanceDiskSnapshot ¶ added in v0.4.0
func (s InstanceService) RenameInstanceDiskSnapshot(ctx context.Context, id, disk, snapshot int, req RenameInstanceDiskSnapshotRequest) (*RenameInstanceDiskSnapshotResponse, error)
RenameInstanceDiskSnapshot renames the disk snapshot for the instance with the given id.
func (InstanceService) RenameInstanceGroup ¶ added in v0.4.0
func (s InstanceService) RenameInstanceGroup(ctx context.Context, id int, req RenameInstanceGroupRequest) (*RenameInstanceGroupResponse, error)
RenameInstanceGroup renames the instance group with the given ID.
func (InstanceService) ResizeInstance ¶ added in v0.4.0
func (s InstanceService) ResizeInstance(ctx context.Context, id int, req ResizeInstanceRequest) (*ResizeInstanceResponse, error)
ResizeInstance resizes the instance with the given id.
func (InstanceService) ResizeInstanceDisk ¶ added in v0.4.0
func (s InstanceService) ResizeInstanceDisk(ctx context.Context, id, disk int, req ResizeInstanceDiskRequest) (*ResizeInstanceDiskResponse, error)
ResizeInstanceDisk resizes the disk for the instance with the given id.
func (InstanceService) RevertInstanceDiskSnapshot ¶ added in v0.4.0
func (s InstanceService) RevertInstanceDiskSnapshot(ctx context.Context, id, disk, snapshot int) (*RevertInstanceDiskSnapshotResponse, error)
RevertInstanceDiskSnapshot reverts the disk snapshot for the instance with the given id.
func (InstanceService) RevertInstanceSnapshot ¶ added in v0.4.0
func (s InstanceService) RevertInstanceSnapshot(ctx context.Context, id, snapshot int) (*RevertInstanceSnapshotResponse, error)
RevertInstanceSnapshot reverts the snapshot for the instance with the given id.
func (InstanceService) SetInstanceAction ¶ added in v0.4.0
func (s InstanceService) SetInstanceAction(ctx context.Context, id int, req SetInstanceActionRequest) (*SetInstanceActionResponse, error)
SetInstanceAction sets the action for the instance with the given id.
func (InstanceService) UnlockInstance ¶ added in v0.4.0
func (s InstanceService) UnlockInstance(ctx context.Context, id int) (*UnlockInstanceResponse, error)
UnlockInstance unlocks the instance with the given id.
func (InstanceService) UnlockInstanceGroup ¶ added in v0.4.0
func (s InstanceService) UnlockInstanceGroup(ctx context.Context, id int) (*UnlockInstanceGroupResponse, error)
UnlockInstanceGroup unlocks the instance group with the given ID.
func (InstanceService) UpdateInstanceConfig ¶ added in v0.4.0
func (s InstanceService) UpdateInstanceConfig(ctx context.Context, id int, req UpdateInstanceConfigRequest) (*UpdateInstanceConfigResponse, error)
UpdateInstanceConfig updates the config for the instance with the given id.
func (InstanceService) UpdateInstanceGroup ¶ added in v0.4.0
func (s InstanceService) UpdateInstanceGroup(ctx context.Context, id int, req *UpdateInstanceGroupRequest) (*UpdateInstanceGroupResponse, error)
UpdateInstanceGroup updates the instance group with the given ID.
func (InstanceService) UpdateInstanceSchedule ¶ added in v0.4.0
func (s InstanceService) UpdateInstanceSchedule(ctx context.Context, id int, req UpdateInstanceScheduleRequest) (*UpdateInstanceScheduleResponse, error)
UpdateInstanceSchedule updates the schedule for the instance with the given id.
func (InstanceService) UpdateInstanceTemplate ¶ added in v0.4.0
func (s InstanceService) UpdateInstanceTemplate(ctx context.Context, id int, req UpdateInstanceTemplateRequest) (*UpdateInstanceTemplateResponse, error)
UpdateInstanceTemplate updates the template for the instance with the given id.
type InstanceTemplate ¶
type InstanceTemplate struct {
ID int `json:"id" yaml:"id"`
UID int `json:"uid" yaml:"uid"`
GID int `json:"gid" yaml:"gid"`
Uname string `json:"uname" yaml:"uname"`
Gname string `json:"gname" yaml:"gname"`
Name string `json:"name" yaml:"name"`
Lock Lock `json:"lock" yaml:"lock"`
Permissions Permissions `json:"permissions" yaml:"permissions"`
Regtime int `json:"regtime" yaml:"regtime"`
Template Template `json:"template" yaml:"template"`
}
InstanceTemplate is the API payload based on the legacy xmlrpc backend.
type InstancesAccountingResponse ¶ added in v0.4.0
type InstancesAccountingResponse struct {
Accounting []AcctHistory `json:"accounting"`
}
InstancesAccountingResponse is the response body for GET /cloud/instance/accounting.
type InstancesMonitoringResponse ¶ added in v0.4.0
type InstancesMonitoringResponse struct {
Monitoring []instance.Monitoring `json:"monitoring"`
}
InstancesMonitoringResponse is the response body for GET /cloud/instance/monitoring.
type InstancesResponse ¶ added in v0.4.0
type InstancesResponse struct {
Instances []LockedInstance `json:"instances"`
}
InstancesResponse is the response body for GET /cloud/instance.
type InstancesShowbackResponse ¶ added in v0.4.0
type InstancesShowbackResponse struct {
Showback []Showback `json:"showback"`
}
InstancesShowbackResponse is the response body for GET /cloud/instance/showback.
type InstantiateNetworkTemplateRequest ¶ added in v0.4.0
type InstantiateNetworkTemplateRequest struct {
Name string `json:"name"`
Extra string `json:"extra"`
}
InstantiateNetworkTemplateRequest is the request body for PATCH /cloud/network/template/{template}/instantiate.
type InstantiateNetworkTemplateResponse ¶ added in v0.4.0
type InstantiateNetworkTemplateResponse struct {
Template int `json:"network"`
}
InstantiateNetworkTemplateResponse is the response body for PATCH /cloud/network/template/instantiate.
type InstantiateRouterRequest ¶ added in v0.4.0
type InstantiateRouterRequest struct {
Instances int `json:"instances"`
InstanceTemplate int `json:"instance_template"`
Name string `json:"name"`
Pending bool `json:"pending"`
Extra string `json:"extra"`
}
InstantiateRouterRequest is the request body for PATCH /cloud/router/{router}/instantiate.
type InstantiateRouterResponse ¶ added in v0.4.0
type InstantiateRouterResponse struct {
Router int `json:"router"`
}
InstantiateRouterResponse is the response body for PATCH /cloud/router/instantiate.
type InstantiateTemplateRequest ¶
type InstantiateTemplateRequest struct {
Name string `json:"name"`
Data string `json:"data"`
Hold bool `json:"hold"`
DiskCopy bool `json:"disk_copy"`
}
InstantiateTemplateRequest is the response body for PATCH /cloud/template/{template}/instantiate.
type InstantiateTemplateResponse ¶
type InstantiateTemplateResponse struct {
Template int `json:"template"`
}
InstantiateTemplateResponse is the response body for DELETE /cloud/template/{template}.
type LCMState ¶
type LCMState int
LCMState is the Life Cycle Manager state of an instance.
const ( InitLCMState LCMState = iota // init PrologLCMState // prolog BootLCMState // boot RunningLCMState // running MigrateLCMState // migrate SaveStopLCMState // save_stop SaveSuspendLCMState // save_suspend SaveMigrateLCMState // save_migrate PrologMigrateLCMState // prolog_migrate PrologResumeLCMState // prolog_resume EpilogStopLCMState // epilog_stop EpilogLCMState // epilog ShutdownLCMState // shutdown CleanupResubmitLCMState // cleanup_resubmit UnknownLCMState // unknown HotplugLCMState // hotplug ShutdownPowerOffLCMState // shutdown_poweroff BootUnknownLCMState // boot_unknown BootPowerOffLCMState // boot_poweroff BootSuspendedLCMState // boot_suspended BootStoppedLCMState // boot_stopped CleanupDeleteLCMState // cleanup_delete HotplugSnapshotLCMState // hotplug_snapshot HotplugNICLCMState // hotplug_nic HotplugSaveAsLCMState // hotplug_saveas HotplugSaveAsPowerOffLCMState // hotplug_saveas_poweroff HotplutSaveAsSuspendedLCMState // hotplug_saveas_suspended ShutdownUndeployLCMState // shutdown_undeploy EpilogUndeployLCMState // epilog_undeploy PrologUndeployLCMState // prolog_undeploy BootUndeployLCMState // boot_undeploy HotplugPrologPowerOffLCMState // hotplug_prolog_poweroff HotplugEpilogPowerOffLCMState // hotplug_epilog_poweroff BootMigrateLCMState // boot_migrate BootFailureLCMState // boot_failure BootMigrateFailureLCMState // boot_migrate_failure PrologMigrateFailureLCMState // prolog_migrate_failure PrologFailureLCMState // prolog_failure EpilogFailureLCMState // epilog_failure EpilogStopFailureLCMState // epilog_stop_failure EpilogUndeployFailureLCMState // epilog_undeploy_failure PrologMigratePowerOffLCMState // prolog_migrate_poweroff PrologMigratePowerOffFailureLCMState // prolog_migrate_poweroff_failure PrologMigrageSuspendLCMState // prolog_migrate_suspend PrologMigrageSuspendFailureLCMState // prolog_migrate_suspend_failure BootUndeployFailureLCMState // boot_undeploy_failure BootStoppedFailureLCMState // boot_stopped_failure PrologResumeFailureLCMState // prolog_resume_failure PrologUndeployFailureLCMState // prolog_undeploy_failure DiskSnapshotPowerOffLCMState // disk_snapshot_poweroff DiskSnapshotRevertPowerOffLCMState // disk_snapshot_revert_poweroff DiskSnapshotDeletePowerOffLCMState // disk_snapshot_delete_poweroff DiskSnapshotSuspendLCMState // disk_snapshot_suspend DiskSnapshotRevertSuspendedLCMState // disk_snapshot_revert_suspended DiskSnapshotDeleteSuspendedLCMState // disk_snapshot_delete_suspended DiskSnapshotLCMState // disk_snapshot DiskSnapshotDeleteLCMState // disk_snapshot_delete PrologMigrateUnknownLCMState // prolog_migrate_unknown PrologMigrateUnknownFailureLCMState // prolog_migrate_unknown_failure )
LCMState values.
func LCMStateString ¶
LCMStateString retrieves an enum value from the enum constants string name. Throws an error if the param is not part of the enum.
func LCMStateValues ¶
func LCMStateValues() []LCMState
LCMStateValues returns all values of the enum
func (LCMState) IsALCMState ¶
IsALCMState returns "true" if the value is listed in the enum definition. "false" otherwise
func (LCMState) MarshalText ¶
MarshalText implements the encoding.TextMarshaler interface for LCMState
func (*LCMState) UnmarshalText ¶
UnmarshalText implements the encoding.TextUnmarshaler interface for LCMState
type Lock ¶
type Lock struct {
Locked bool `json:"locked" yaml:"locked"`
Owner int `json:"owner" yaml:"owner"`
Time api.Time `json:"time" yaml:"time"`
ReqID int `json:"req_id" yaml:"req_id"`
}
Lock is the API payload based on the legacy xmlrpc backend.
type LockDocumentRequest ¶
LockDocumentRequest is the request body for PATCH /cloud/document/{document}/lock.
type LockDocumentResponse ¶
LockDocumentResponse is the response body for PATCH /cloud/document/lock.
type LockHookRequest ¶
LockHookRequest is the request body for PATCH /cloud/hook/{hook}/lock.
type LockHookResponse ¶
LockHookResponse is the response body for PATCH /cloud/hook/lock.
type LockImageRequest ¶
LockImageRequest is the request body for PATCH /cloud/image/{image}/lock.
type LockImageResponse ¶
LockImageResponse is the response body for PATCH /cloud/image/lock.
type LockInstanceGroupRequest ¶
LockInstanceGroupRequest is the request body for PATCH /cloud/instance-group/lock.
type LockInstanceGroupResponse ¶
LockInstanceGroupResponse is the response body for PATCH /cloud/instance-group/lock.
type LockInstanceRequest ¶
LockInstanceRequest is the request body for PATCH /cloud/instance/{instance}/lock.
type LockInstanceResponse ¶
LockInstanceResponse is the response body for PATCH /cloud/instance/lock.
type LockLevel ¶
type LockLevel int
LockLevel is the level of lock.
const ( UseLockLevel LockLevel // use ManageLockLevel // manage AdminLockLevel // admin AllLockLevel // all )
Lock levels.
func LockLevelString ¶
LockLevelString retrieves an enum value from the enum constants string name. Throws an error if the param is not part of the enum.
func LockLevelValues ¶
func LockLevelValues() []LockLevel
LockLevelValues returns all values of the enum
func (LockLevel) IsALockLevel ¶
IsALockLevel returns "true" if the value is listed in the enum definition. "false" otherwise
func (LockLevel) MarshalText ¶
MarshalText implements the encoding.TextMarshaler interface for LockLevel
func (*LockLevel) UnmarshalText ¶
UnmarshalText implements the encoding.TextUnmarshaler interface for LockLevel
type LockMarketAppRequest ¶
LockMarketAppRequest is the request body for PATCH /cloud/market/app/{app}/lock.
type LockMarketAppResponse ¶
type LockMarketAppResponse struct {
MarketApp int `json:"market_app"`
}
LockMarketAppResponse is the response body for PATCH /cloud/market/app/lock.
type LockNetworkRequest ¶ added in v0.4.0
LockNetworkRequest is the request body for PATCH /cloud/network/{network}/lock.
type LockNetworkResponse ¶ added in v0.4.0
LockNetworkResponse is the response body for PATCH /cloud/network/lock.
type LockNetworkTemplateRequest ¶ added in v0.4.0
LockNetworkTemplateRequest is the request body for PATCH /cloud/network/template/{template}/lock.
type LockNetworkTemplateResponse ¶ added in v0.4.0
type LockNetworkTemplateResponse struct {
Template int `json:"template"`
Time api.Time `json:"time"`
}
LockNetworkTemplateResponse is the response body for PATCH /cloud/network/template/lock.
type LockRouterRequest ¶ added in v0.4.0
LockRouterRequest is the request body for PATCH /cloud/router/{router}/lock.
type LockRouterResponse ¶ added in v0.4.0
LockRouterResponse is the response body for PATCH /cloud/router/lock.
type LockTemplateRequest ¶
LockTemplateRequest is the response body for PATCH /cloud/template/{template}/lock.
type LockTemplateResponse ¶
type LockTemplateResponse struct {
Template int `json:"template"`
}
LockTemplateResponse is the response body for PATCH /cloud/template/lock.
type LockedInstance ¶
LockedInstance is an Instance with a Lock.
type MarketAppResponse ¶ added in v0.4.0
type MarketAppResponse struct {
App MarketplaceApp `json:"application"`
}
MarketAppResponse is the response body for GET /cloud/market/app.
type MarketAppsResponse ¶ added in v0.4.0
type MarketAppsResponse struct {
Apps []MarketplaceApp `json:"applications"`
}
MarketAppsResponse is the response body for GET /cloud/market/app.
type MarketResponse ¶ added in v0.4.0
type MarketResponse struct {
Market Marketplace `json:"market"`
}
MarketResponse is the response body for GET /cloud/market.
type MarketService ¶ added in v0.4.0
type MarketService struct {
// contains filtered or unexported fields
}
MarketService owns the /cloud/market methods.
func (MarketService) ChangeMarketAppOwnership ¶ added in v0.4.0
func (s MarketService) ChangeMarketAppOwnership(ctx context.Context, id, app int, req ChangeMarketAppOwnershipRequest) (*ChangeMarketAppOwnershipResponse, error)
ChangeMarketAppOwnership changes the ownership of the marketplace application with the given ID.
func (MarketService) ChangeMarketAppPermissions ¶ added in v0.4.0
func (s MarketService) ChangeMarketAppPermissions(ctx context.Context, id, app int, req ChangeMarketAppPermissionsRequest) (*ChangeMarketAppPermissionsResponse, error)
ChangeMarketAppPermissions changes the permissions of the marketplace application with the given ID.
func (MarketService) ChangeMarketOwnership ¶ added in v0.4.0
func (s MarketService) ChangeMarketOwnership(ctx context.Context, id int, req ChangeMarketOwnershipRequest) (*ChangeMarketOwnershipResponse, error)
ChangeMarketOwnership changes the ownership of the marketplace with the given ID.
func (MarketService) ChangeMarketPermissions ¶ added in v0.4.0
func (s MarketService) ChangeMarketPermissions(ctx context.Context, id int, req ChangeMarketPermissionsRequest) (*ChangeMarketPermissionsResponse, error)
ChangeMarketPermissions changes the permissions of the marketplace with the given ID.
func (MarketService) CreateMarket ¶ added in v0.4.0
func (s MarketService) CreateMarket(ctx context.Context, req CreateMarketRequest) (*CreateMarketResponse, error)
CreateMarket creates a new marketplace.
func (MarketService) CreateMarketApp ¶ added in v0.4.0
func (s MarketService) CreateMarketApp(ctx context.Context, id int, req CreateMarketAppRequest) (*CreateMarketAppResponse, error)
CreateMarketApp creates a new marketplace application.
func (MarketService) DeleteMarket ¶ added in v0.4.0
func (s MarketService) DeleteMarket(ctx context.Context, id int) error
DeleteMarket deletes the market with the given ID.
func (MarketService) DeleteMarketApp ¶ added in v0.4.0
func (s MarketService) DeleteMarketApp(ctx context.Context, id, app int) error
DeleteMarketApp deletes the marketplace application with the given ID.
func (MarketService) EnableMarket ¶ added in v0.4.0
func (s MarketService) EnableMarket(ctx context.Context, id int, req EnableMarketRequest) (*EnableMarketResponse, error)
EnableMarket enables the marketplace with the given ID.
func (MarketService) EnableMarketApp ¶ added in v0.4.0
func (s MarketService) EnableMarketApp(ctx context.Context, id, app int, req EnableMarketAppRequest) (*EnableMarketAppResponse, error)
EnableMarketApp enables the marketplace application with the given ID.
func (MarketService) LockMarketApp ¶ added in v0.4.0
func (s MarketService) LockMarketApp(ctx context.Context, id, app int, req LockMarketAppRequest) (*LockMarketAppResponse, error)
LockMarketApp locks the marketplace application with the given ID.
func (MarketService) Market ¶ added in v0.4.0
func (s MarketService) Market(ctx context.Context, id int) (*MarketResponse, error)
Market returns information about a marketplace.
func (MarketService) MarketApp ¶ added in v0.4.0
func (s MarketService) MarketApp(ctx context.Context, id int) (*MarketAppResponse, error)
MarketApp returns information about a marketplace application.
func (MarketService) MarketApps ¶ added in v0.4.0
func (s MarketService) MarketApps(ctx context.Context) (*MarketAppsResponse, error)
MarketApps returns information about all marketplace applications.
func (MarketService) Markets ¶ added in v0.4.0
func (s MarketService) Markets(ctx context.Context) (*MarketsResponse, error)
Markets returns information about all marketplaces.
func (MarketService) RenameMarket ¶ added in v0.4.0
func (s MarketService) RenameMarket(ctx context.Context, id int, req RenameMarketRequest) (*RenameMarketResponse, error)
RenameMarket renames the marketplace with the given ID.
func (MarketService) RenameMarketApp ¶ added in v0.4.0
func (s MarketService) RenameMarketApp(ctx context.Context, id, app int, req RenameMarketAppRequest) (*RenameMarketAppResponse, error)
RenameMarketApp renames the marketplace application with the given ID.
func (MarketService) UnlockMarketApp ¶ added in v0.4.0
func (s MarketService) UnlockMarketApp(ctx context.Context, id, app int) (*UnlockMarketAppResponse, error)
UnlockMarketApp unlocks the marketplace application with the given ID.
func (MarketService) UpdateMarket ¶ added in v0.4.0
func (s MarketService) UpdateMarket(ctx context.Context, id int, req UpdateMarketRequest) (*UpdateMarketResponse, error)
UpdateMarket updates the marketplace with the given ID.
func (MarketService) UpdateMarketApp ¶ added in v0.4.0
func (s MarketService) UpdateMarketApp(ctx context.Context, id, app int, req UpdateMarketAppRequest) (*UpdateMarketAppResponse, error)
UpdateMarketApp updates the marketplace application with the given ID.
type Marketplace ¶
type Marketplace struct {
ID int `json:"id" yaml:"id"`
UID int `json:"uid" yaml:"uid"`
GID int `json:"gid" yaml:"gid"`
UserName string `json:"user_name" yaml:"user_name"`
GroupName string `json:"group_name" yaml:"group_name"`
Name string `json:"name" yaml:"name"`
State int `json:"state" yaml:"state"`
MarketMAD string `json:"market_mad" yaml:"market_mad"`
ZoneID string `json:"zone_id" yaml:"zone_id"`
TotalMB int `json:"total_mb" yaml:"total_mb"`
FreeMB int `json:"free_mb" yaml:"free_mb"`
UsedMB int `json:"used_mb" yaml:"used_mb"`
MarketplaceApps []int `json:"marketplace_apps" yaml:"marketplace_apps"`
Permissions Permissions `json:"permissions" yaml:"permissions"`
Template Template `json:"template" yaml:"template"`
}
Marketplace is the API payload based on the legacy xmlrpc backend.
type MarketplaceApp ¶
type MarketplaceApp struct {
ID int `json:"id" yaml:"id"`
UID int `json:"uid" yaml:"uid"`
GID int `json:"gid" yaml:"gid"`
UserName string `json:"user_name" yaml:"user_name"`
GroupName string `json:"group_name" yaml:"group_name"`
Lock Lock `json:"lock" yaml:"lock"`
Regtime int `json:"regtime" yaml:"regtime"`
Name string `json:"name" yaml:"name"`
ZoneID string `json:"zone_id" yaml:"zone_id"`
OriginID string `json:"origin_id" yaml:"origin_id"`
Source string `json:"source" yaml:"source"`
MD5 string `json:"md5" yaml:"md5"`
Size int `json:"size" yaml:"size"`
Description string `json:"description" yaml:"description"`
Version string `json:"version" yaml:"version"`
Format string `json:"format" yaml:"format"`
AppTemplate64 string `json:"apptemplate64" yaml:"apptemplate64"`
MarketplaceID int `json:"marketplace_id" yaml:"marketplace_id"`
Marketplace string `json:"marketplace" yaml:"marketplace"`
State int `json:"state" yaml:"state"`
Type int `json:"type" yaml:"type"`
Permissions Permissions `json:"permissions" yaml:"permissions"`
Template Template `json:"template" yaml:"template"`
}
MarketplaceApp is the API payload based on the legacy xmlrpc backend.
type MarketsResponse ¶ added in v0.4.0
type MarketsResponse struct {
Markets []Marketplace `json:"market"`
}
MarketsResponse is the response body for GET /cloud/market.
type Memory ¶
type Memory struct {
Distance string `json:"distance" yaml:"distance"`
Free int `json:"free" yaml:"free"`
Total int `json:"total" yaml:"total"`
Usage int `json:"usage" yaml:"usage"`
Used int `json:"used" yaml:"used"`
}
Memory is the API payload based on the legacy xmlrpc backend.
type MigrationType ¶
type MigrationType int
MigrationType is the type of migration.
const ( SaveMigrationType MigrationType // save PowerOffMigrationType // poweroff PowerOffHardMigrationType // poweroff_hard )
MigrationTypes values.
func MigrationTypeString ¶
func MigrationTypeString(s string) (MigrationType, error)
MigrationTypeString retrieves an enum value from the enum constants string name. Throws an error if the param is not part of the enum.
func MigrationTypeValues ¶
func MigrationTypeValues() []MigrationType
MigrationTypeValues returns all values of the enum
func (MigrationType) IsAMigrationType ¶
func (i MigrationType) IsAMigrationType() bool
IsAMigrationType returns "true" if the value is listed in the enum definition. "false" otherwise
func (MigrationType) MarshalText ¶
func (i MigrationType) MarshalText() ([]byte, error)
MarshalText implements the encoding.TextMarshaler interface for MigrationType
func (MigrationType) String ¶
func (i MigrationType) String() string
func (*MigrationType) UnmarshalText ¶
func (i *MigrationType) UnmarshalText(text []byte) error
UnmarshalText implements the encoding.TextUnmarshaler interface for MigrationType
func (MigrationType) V1 ¶ added in v0.8.0
func (m MigrationType) V1() hc.MigrationType
V1 returns the v1 hc.MigrationType that corresponds to the MigrationType.
type MoveInstanceRequest ¶
type MoveInstanceRequest struct {
Host int `json:"host"`
LiveMigrate bool `json:"live_migrate"`
EnforceCapacity bool `json:"enforce_capacity"` // TODO: probably should reverse this logic
MigrationType string `json:"migration_type"`
}
MoveInstanceRequest is the request body for PATCH /cloud/instance/{instance}/move.
type MoveInstanceResponse ¶
type MoveInstanceResponse struct {
Instance int `json:"instance"`
}
MoveInstanceResponse is the response body for PATCH /cloud/instance/move.
type Network ¶ added in v0.4.0
type Network struct {
ID int `json:"id" yaml:"id"`
UID int `json:"uid" yaml:"uid"`
GID int `json:"gid" yaml:"gid"`
UserName string `json:"user_name" yaml:"user_name"`
GroupName string `json:"group_name" yaml:"group_name"`
Name string `json:"name" yaml:"name"`
Lock Lock `json:"lock" yaml:"lock"`
Permissions Permissions `json:"permissions" yaml:"permissions"`
Clusters []int `json:"clusters" yaml:"clusters"`
Bridge string `json:"bridge" yaml:"bridge"`
BridgeType string `json:"bridge_type" yaml:"bridge_type"`
State int `json:"state" yaml:"state"`
PrevState int `json:"prev_state" yaml:"prev_state"`
ParentNetworkID string `json:"parent_network_id" yaml:"parent_network_id"`
VNMAD string `json:"vnmad" yaml:"vnmad"`
Phydev string `json:"phydev" yaml:"phydev"`
VLANID string `json:"vlanid" yaml:"vlanid"`
OuterVLANID string `json:"outer_vlanid" yaml:"outer_vlanid"`
VLANIDAutomatic string `json:"vlanidautomatic" yaml:"vlanidautomatic"`
OuterVLANIDAutomatic string `json:"outer_vlanidautomatic" yaml:"outer_vlanidautomatic"`
UsedLeases int `json:"used_leases" yaml:"used_leases"`
VRouters []int `json:"vrouters" yaml:"vrouters"`
Template Template `json:"template" yaml:"template"`
AddressRanges []network.AddressRange `json:"arpool" yaml:"arpool"`
}
Network is the API payload based on the legacy xmlrpc backend.
type NetworkRecovery ¶ added in v0.4.0
type NetworkRecovery int
NetworkRecovery is the recovery action to take when a vnet is in error.
const ( FailureNetworkRecovery NetworkRecovery = iota // failure SuccessNetworkRecovery // success RetryNetworkRecovery // retry_vnet DeleteNetworkRecovery // delete_vnet )
VNetRecovery values.
func NetworkRecoveryString ¶ added in v0.4.0
func NetworkRecoveryString(s string) (NetworkRecovery, error)
NetworkRecoveryString retrieves an enum value from the enum constants string name. Throws an error if the param is not part of the enum.
func NetworkRecoveryValues ¶ added in v0.4.0
func NetworkRecoveryValues() []NetworkRecovery
NetworkRecoveryValues returns all values of the enum
func (NetworkRecovery) IsANetworkRecovery ¶ added in v0.4.0
func (i NetworkRecovery) IsANetworkRecovery() bool
IsANetworkRecovery returns "true" if the value is listed in the enum definition. "false" otherwise
func (NetworkRecovery) MarshalText ¶ added in v0.4.0
func (i NetworkRecovery) MarshalText() ([]byte, error)
MarshalText implements the encoding.TextMarshaler interface for NetworkRecovery
func (NetworkRecovery) String ¶ added in v0.4.0
func (i NetworkRecovery) String() string
func (*NetworkRecovery) UnmarshalText ¶ added in v0.4.0
func (i *NetworkRecovery) UnmarshalText(text []byte) error
UnmarshalText implements the encoding.TextUnmarshaler interface for NetworkRecovery
func (NetworkRecovery) V1 ¶ added in v0.8.0
func (n NetworkRecovery) V1() hc.VNetRecovery
V1 returns the v1 hc.VNetRecovery that corresponds to the NetworkRecovery.
type NetworkResponse ¶ added in v0.4.0
type NetworkResponse struct {
Network Network `json:"network"`
}
NetworkResponse is the response body for GET /cloud/network.
type NetworkService ¶ added in v0.4.0
type NetworkService struct {
// contains filtered or unexported fields
}
NetworkService owns the /cloud/network methods.
func (NetworkService) AddNetworkAddressRange ¶ added in v0.4.0
func (s NetworkService) AddNetworkAddressRange(ctx context.Context, id int, req AddNetworkAddressRangeRequest) (*AddNetworkAddressRangeResponse, error)
AddNetworkAddressRange adds an address range to the network with the given ID.
func (NetworkService) ChangeNetworkOwnership ¶ added in v0.4.0
func (s NetworkService) ChangeNetworkOwnership(ctx context.Context, id int, req ChangeNetworkOwnershipRequest) (*ChangeNetworkOwnershipResponse, error)
ChangeNetworkOwnership changes the ownership of the network with the given ID.
func (NetworkService) ChangeNetworkPermissions ¶ added in v0.4.0
func (s NetworkService) ChangeNetworkPermissions(ctx context.Context, id int, req ChangeNetworkPermissionsRequest) (*ChangeNetworkPermissionsResponse, error)
ChangeNetworkPermissions changes the permissions of the network with the given ID.
func (NetworkService) ChangeNetworkTemplateOwnership ¶ added in v0.4.0
func (s NetworkService) ChangeNetworkTemplateOwnership(ctx context.Context, id int, req ChangeNetworkTemplateOwnershipRequest) (*ChangeNetworkTemplateOwnershipResponse, error)
ChangeNetworkTemplateOwnership changes the ownership of the network template with the given ID.
func (NetworkService) ChangeNetworkTemplatePermissions ¶ added in v0.4.0
func (s NetworkService) ChangeNetworkTemplatePermissions(ctx context.Context, id int, req ChangeNetworkTemplatePermissionsRequest) (*ChangeNetworkTemplatePermissionsResponse, error)
ChangeNetworkTemplatePermissions changes the permissions of the network template with the given ID.
func (NetworkService) CloneNetworkTemplate ¶ added in v0.4.0
func (s NetworkService) CloneNetworkTemplate(ctx context.Context, id int, req CloneNetworkTemplateRequest) (*CloneNetworkTemplateResponse, error)
CloneNetworkTemplate clones the network template with the given ID.
func (NetworkService) CreateNetwork ¶ added in v0.4.0
func (s NetworkService) CreateNetwork(ctx context.Context, req CreateNetworkRequest) (*CreateNetworkResponse, error)
CreateNetwork creates a new network.
func (NetworkService) CreateNetworkTemplate ¶ added in v0.4.0
func (s NetworkService) CreateNetworkTemplate(ctx context.Context, req CreateNetworkTemplateRequest) (*CreateNetworkTemplateResponse, error)
CreateNetworkTemplate creates a new network template.
func (NetworkService) DeleteNetwork ¶ added in v0.4.0
func (s NetworkService) DeleteNetwork(ctx context.Context, id int) error
DeleteNetwork deletes the network with the given ID.
func (NetworkService) DeleteNetworkAddressRange ¶ added in v0.4.0
func (s NetworkService) DeleteNetworkAddressRange(ctx context.Context, id, ar int) error
DeleteNetworkAddressRange deletes an address range from the network with the given ID.
func (NetworkService) DeleteNetworkTemplate ¶ added in v0.4.0
func (s NetworkService) DeleteNetworkTemplate(ctx context.Context, id int) error
DeleteNetworkTemplate deletes the network template with the given ID.
func (NetworkService) FreeNetworkAddressRange ¶ added in v0.4.0
func (s NetworkService) FreeNetworkAddressRange(ctx context.Context, id, ar int) error
FreeNetworkAddressRange free an address range from the network with the given ID.
func (NetworkService) HoldNetwork ¶ added in v0.4.0
func (s NetworkService) HoldNetwork(ctx context.Context, id int, req HoldNetworkRequest) (*HoldNetworkResponse, error)
HoldNetwork holds the network with the given ID.
func (NetworkService) InstantiateNetworkTemplate ¶ added in v0.4.0
func (s NetworkService) InstantiateNetworkTemplate(ctx context.Context, id int, req InstantiateNetworkTemplateRequest) (*InstantiateNetworkTemplateResponse, error)
InstantiateNetworkTemplate instantiates the network template with the given ID.
func (NetworkService) LockNetwork ¶ added in v0.4.0
func (s NetworkService) LockNetwork(ctx context.Context, id int, req LockNetworkRequest) (*LockNetworkResponse, error)
LockNetwork locks the network with the given ID.
func (NetworkService) LockNetworkTemplate ¶ added in v0.4.0
func (s NetworkService) LockNetworkTemplate(ctx context.Context, id int, req LockNetworkTemplateRequest) (*LockNetworkTemplateResponse, error)
LockNetworkTemplate locks the network template with the given ID.
func (NetworkService) Network ¶ added in v0.4.0
func (s NetworkService) Network(ctx context.Context, id int) (*NetworkResponse, error)
Network returns information about a network.
func (NetworkService) NetworkTemplate ¶ added in v0.4.0
func (s NetworkService) NetworkTemplate(ctx context.Context, id int) (*NetworkTemplateResponse, error)
NetworkTemplate returns information about a networks.
func (NetworkService) NetworkTemplates ¶ added in v0.4.0
func (s NetworkService) NetworkTemplates(ctx context.Context) (*NetworkTemplatesResponse, error)
NetworkTemplates returns information about all networkss.
func (NetworkService) Networks ¶ added in v0.4.0
func (s NetworkService) Networks(ctx context.Context) (*NetworksResponse, error)
Networks returns information about all networks.
func (NetworkService) RecoverNetworks ¶ added in v0.4.0
func (s NetworkService) RecoverNetworks(ctx context.Context, id int, req RecoverNetworkRequest) (*RecoverNetworkResponse, error)
RecoverNetworks recovers the network with the given ID.
func (NetworkService) ReleaseNetwork ¶ added in v0.4.0
func (s NetworkService) ReleaseNetwork(ctx context.Context, id int, req ReleaseNetworkRequest) (*ReleaseNetworkResponse, error)
ReleaseNetwork releases the network with the given ID.
func (NetworkService) RenameNetwork ¶ added in v0.4.0
func (s NetworkService) RenameNetwork(ctx context.Context, id int, req RenameNetworkRequest) (*RenameNetworkResponse, error)
RenameNetwork renames the network with the given ID.
func (NetworkService) RenameNetworkTemplate ¶ added in v0.4.0
func (s NetworkService) RenameNetworkTemplate(ctx context.Context, id int, req RenameNetworkTemplateRequest) (*RenameNetworkTemplateResponse, error)
RenameNetworkTemplate renames the network template with the given ID.
func (NetworkService) ReserveNetwork ¶ added in v0.4.0
func (s NetworkService) ReserveNetwork(ctx context.Context, id int, req ReserveNetworkRequest) (*ReserveNetworkResponse, error)
ReserveNetwork reserves the network with the given ID.
func (NetworkService) UnlockNetwork ¶ added in v0.4.0
func (s NetworkService) UnlockNetwork(ctx context.Context, id int) (*UnlockNetworkResponse, error)
UnlockNetwork unlocks the network with the given ID.
func (NetworkService) UnlockNetworkTemplate ¶ added in v0.4.0
func (s NetworkService) UnlockNetworkTemplate(ctx context.Context, id int) (*UnlockNetworkTemplateResponse, error)
UnlockNetworkTemplate unlocks the network template with the given ID.
func (NetworkService) UpdateNetwork ¶ added in v0.4.0
func (s NetworkService) UpdateNetwork(ctx context.Context, id int, req UpdateNetworkRequest) (*UpdateNetworkResponse, error)
UpdateNetwork updates the network with the given ID.
func (NetworkService) UpdateNetworkAddressRange ¶ added in v0.4.0
func (s NetworkService) UpdateNetworkAddressRange(ctx context.Context, id int, req UpdateNetworkAddressRangeRequest) (*UpdateNetworkAddressRangeResponse, error)
UpdateNetworkAddressRange updates an address range from the network with the given ID.
func (NetworkService) UpdateNetworkTemplate ¶ added in v0.4.0
func (s NetworkService) UpdateNetworkTemplate(ctx context.Context, id int, req UpdateNetworkTemplateRequest) (*UpdateNetworkTemplateResponse, error)
UpdateNetworkTemplate updates the network template with the given ID.
type NetworkTemplate ¶ added in v0.4.0
type NetworkTemplate struct {
ID int `json:"id" yaml:"id"`
UID int `json:"uid" yaml:"uid"`
GID int `json:"gid" yaml:"gid"`
UserName string `json:"user_name" yaml:"user_name"`
GroupName string `json:"group_name" yaml:"group_name"`
Name string `json:"name" yaml:"name"`
Lock Lock `json:"lock" yaml:"lock"`
Permissions Permissions `json:"permissions" yaml:"permissions"`
Regtime int `json:"regtime" yaml:"regtime"`
Template Template `json:"template" yaml:"template"`
}
NetworkTemplate is the API payload based on the legacy xmlrpc backend.
type NetworkTemplateResponse ¶ added in v0.4.0
type NetworkTemplateResponse struct {
Template Template `json:"template"`
}
NetworkTemplateResponse is the response body for GET /cloud/network/template.
type NetworkTemplatesResponse ¶ added in v0.4.0
type NetworkTemplatesResponse struct {
Templates []Template `json:"template"`
}
NetworkTemplatesResponse is the response body for GET /cloud/network/templates.
type NetworksResponse ¶ added in v0.4.0
type NetworksResponse struct {
VNets []Network `json:"networks"`
}
NetworksResponse is the response body for GET /cloud/network.
type Node ¶
type Node struct {
Core []Core `json:"core" yaml:"core"`
Hugepage []HugePage `json:"hugepage" yaml:"hugepage"`
Memory Memory `json:"memory" yaml:"memory"`
NodeID int `json:"node_id" yaml:"node_id"`
}
Node is the API payload based on the legacy xmlrpc backend.
type PCI ¶
type PCI struct {
Address string `json:"address" yaml:"address"`
Bus string `json:"bus" yaml:"bus"`
Class string `json:"class" yaml:"class"`
ClassName string `json:"class_name" yaml:"class_name"`
Device string `json:"device" yaml:"device"`
DeviceName string `json:"device_name" yaml:"device_name"`
Domain string `json:"domain" yaml:"domain"`
Function string `json:"function" yaml:"function"`
NumaNode string `json:"numa_node" yaml:"numa_node"`
ShortAddress string `json:"short_address" yaml:"short_address"`
Slot string `json:"slot" yaml:"slot"`
Type string `json:"type" yaml:"type"`
Vendor string `json:"vendor" yaml:"vendor"`
VendorName string `json:"vendor_name" yaml:"vendor_name"`
InstanceID int `json:"instance_id" yaml:"instance_id"`
}
PCI is the API payload based on the legacy xmlrpc backend.
type Permissions ¶
type Permissions struct {
Owner perms `json:"owner" yaml:"owner"`
Group perms `json:"group" yaml:"group"`
Other perms `json:"other" yaml:"other"`
}
Permissions is the API payload based on the legacy xmlrpc backend.
type Perms ¶
type Perms struct {
OwnerUse *bool `json:"owner_use"`
OwnerManage *bool `json:"owner_manage"`
OwnerAdmin *bool `json:"owner_admin"`
GroupUse *bool `json:"group_use"`
GroupManage *bool `json:"group_manage"`
GroupAdmin *bool `json:"group_admin"`
OtherUse *bool `json:"other_use"`
OtherManage *bool `json:"other_manage"`
OtherAdmin *bool `json:"other_admin"`
}
Perms is a set of owner (user), group, and other permissions. Think UNIX.
type RaftStatus ¶
type RaftStatus struct {
ServerID int `json:"server_id" yaml:"server_id"`
State int `json:"state" yaml:"state"`
Term int `json:"term" yaml:"term"`
VotedFor int `json:"voted_for" yaml:"voted_for"`
Commit int `json:"commit" yaml:"commit"`
LogIndex int `json:"log_index" yaml:"log_index"`
LogTerm int `json:"log_term" yaml:"log_term"`
FedLogIndex int `json:"fed_log_index" yaml:"fed_log_index"`
}
RaftStatus is the API payload based on the legacy xmlrpc backend.
type RecoverInstanceRequest ¶
type RecoverInstanceRequest struct {
Operation string `json:"operation"`
}
RecoverInstanceRequest is the request body for PATCH /cloud/instance/{instance}/recover.
type RecoverInstanceResponse ¶
type RecoverInstanceResponse struct {
Instance int `json:"instance"`
}
RecoverInstanceResponse is the response body for PATCH /cloud/instance/recover.
type RecoverNetworkRequest ¶ added in v0.4.0
type RecoverNetworkRequest struct {
Recovery string `json:"recovery"`
}
RecoverNetworkRequest is the request body for PATCH /cloud/network/{network}/recover.
type RecoverNetworkResponse ¶ added in v0.4.0
type RecoverNetworkResponse struct {
Network int `json:"network"`
}
RecoverNetworkResponse is the response body for PATCH /cloud/network/recover.
type ReleaseNetworkRequest ¶ added in v0.4.0
type ReleaseNetworkRequest struct {
Template string `json:"template"`
}
ReleaseNetworkRequest is the request body for PATCH /cloud/network/{network}/release.
type ReleaseNetworkResponse ¶ added in v0.4.0
type ReleaseNetworkResponse struct {
Network int `json:"network"`
}
ReleaseNetworkResponse is the response body for PATCH /cloud/network/release.
type RenameClusterRequest ¶
type RenameClusterRequest struct {
Name string `json:"name"`
}
RenameClusterRequest is the request body for PATCH /cloud/cluster/{cluster}/name.
type RenameClusterResponse ¶
type RenameClusterResponse struct {
Cluster int `json:"cluster"`
}
RenameClusterResponse is the response body for PATCH /cloud/cluster/name.
type RenameDataCenterRequest ¶ added in v0.4.0
type RenameDataCenterRequest struct {
Name string `json:"name"`
}
RenameDataCenterRequest is the request body for PATCH /cloud/datacenter/{datacenter}/name.
type RenameDataCenterResponse ¶ added in v0.4.0
type RenameDataCenterResponse struct {
DataCenter int `json:"datacenter"`
}
RenameDataCenterResponse is the response body for PATCH /cloud/datacenter/name.
type RenameDatastoreRequest ¶
type RenameDatastoreRequest struct {
Name string `json:"name"`
}
RenameDatastoreRequest is the request body for PATCH /cloud/datastore/{datastore}/name.
type RenameDatastoreResponse ¶
type RenameDatastoreResponse struct {
Datastore int `json:"datastore"`
}
RenameDatastoreResponse is the response body for PATCH /cloud/datastore/name.
type RenameDocumentRequest ¶
type RenameDocumentRequest struct {
Name string `json:"name"`
}
RenameDocumentRequest is the request body for PATCH /cloud/document/{document}/name.
type RenameDocumentResponse ¶
type RenameDocumentResponse struct {
Document int `json:"document"`
}
RenameDocumentResponse is the response body for PATCH /cloud/document/name.
type RenameHookRequest ¶
type RenameHookRequest struct {
Name string `json:"name"`
}
RenameHookRequest is the request body for PATCH /cloud/hook/{hook}/name.
type RenameHookResponse ¶
type RenameHookResponse struct {
Hook int `json:"hook"`
}
RenameHookResponse is the response body for PATCH /cloud/hook/name.
type RenameHostRequest ¶ added in v0.4.0
type RenameHostRequest struct {
Hostname string `json:"hostname"`
}
RenameHostRequest is the request body for PATCH /cloud/host/{host}/name.
type RenameHostResponse ¶ added in v0.4.0
type RenameHostResponse struct {
Host int `json:"host"`
}
RenameHostResponse is the response body for PATCH /cloud/host/name.
type RenameImageRequest ¶
type RenameImageRequest struct {
Name string `json:"name"`
}
RenameImageRequest is the request body for PATCH /cloud/image/{image}/name.
type RenameImageResponse ¶
type RenameImageResponse struct {
Image int `json:"image"`
}
RenameImageResponse is the response body for PATCH /cloud/image/name.
type RenameInstanceDiskSnapshotRequest ¶
type RenameInstanceDiskSnapshotRequest struct {
Name string `json:"name"`
}
RenameInstanceDiskSnapshotRequest is the request body for PATCH /cloud/instance/{instance}/disk/{disk}/snapshot/{snapshot}/name.
type RenameInstanceDiskSnapshotResponse ¶
type RenameInstanceDiskSnapshotResponse struct {
Instance int `json:"instance"`
}
RenameInstanceDiskSnapshotResponse is the response body for PATCH /cloud/instance/disk/snapshot/name.
type RenameInstanceGroupRequest ¶
type RenameInstanceGroupRequest struct {
Name string `json:"name"`
}
RenameInstanceGroupRequest is the request body for PATCH /cloud/instance-group/name.
type RenameInstanceGroupResponse ¶
type RenameInstanceGroupResponse struct {
Group int `json:"group"`
}
RenameInstanceGroupResponse is the response body for PATCH /cloud/instance-group/name.
type RenameInstanceRequest ¶
type RenameInstanceRequest struct {
Name string `json:"name"`
}
RenameInstanceRequest is the request body for PATCH /cloud/instance/{instance}/name.
type RenameInstanceResponse ¶
type RenameInstanceResponse struct {
Instance int `json:"instance"`
}
RenameInstanceResponse is the response body for PATCH /cloud/instance/name.
type RenameMarketAppRequest ¶
type RenameMarketAppRequest struct {
Name string `json:"name"`
}
RenameMarketAppRequest is the request body for PATCH /cloud/market/app/{app}/name.
type RenameMarketAppResponse ¶
type RenameMarketAppResponse struct {
MarketApp int `json:"market_app"`
}
RenameMarketAppResponse is the response body for PATCH /cloud/market/app/name.
type RenameMarketRequest ¶
type RenameMarketRequest struct {
Name string `json:"name"`
}
RenameMarketRequest is the request body for PATCH /cloud/market/{market}/name.
type RenameMarketResponse ¶
type RenameMarketResponse struct {
Market int `json:"market"`
}
RenameMarketResponse is the response body for PATCH /cloud/market/name.
type RenameNetworkRequest ¶ added in v0.4.0
type RenameNetworkRequest struct {
Name string `json:"name"`
}
RenameNetworkRequest is the request body for PATCH /cloud/network/{network}/name.
type RenameNetworkResponse ¶ added in v0.4.0
type RenameNetworkResponse struct {
Network int `json:"network"`
}
RenameNetworkResponse is the response body for PATCH /cloud/network/name.
type RenameNetworkTemplateRequest ¶ added in v0.4.0
type RenameNetworkTemplateRequest struct {
Name string `json:"name"`
}
RenameNetworkTemplateRequest is the request body for PATCH /cloud/network/template/{template}/name.
type RenameNetworkTemplateResponse ¶ added in v0.4.0
type RenameNetworkTemplateResponse struct {
Template int `json:"template"`
}
RenameNetworkTemplateResponse is the response body for PATCH /cloud/network/template/name.
type RenameRouterRequest ¶ added in v0.4.0
type RenameRouterRequest struct {
Name string `json:"name"`
}
RenameRouterRequest is the request body for PATCH /cloud/router/{router}/name.
type RenameRouterResponse ¶ added in v0.4.0
type RenameRouterResponse struct {
Router int `json:"router"`
}
RenameRouterResponse is the response body for PATCH /cloud/router/name.
type RenameSecurityGroupRequest ¶
type RenameSecurityGroupRequest struct {
Name string `json:"name"`
}
RenameSecurityGroupRequest is the request body for PATCH /cloud/security-group/{sg}/rename.
type RenameSecurityGroupResponse ¶
type RenameSecurityGroupResponse struct {
SecurityGroup int `json:"security_group"`
}
RenameSecurityGroupResponse is the response body for PATCH /cloud/security-group/rename.
type RenameTemplateRequest ¶
type RenameTemplateRequest struct {
Name string `json:"name"`
}
RenameTemplateRequest is the response body for PATCH /cloud/template/{template}/name.
type RenameTemplateResponse ¶
type RenameTemplateResponse struct {
Template int `json:"template"`
}
RenameTemplateResponse is the response body for PATCH /cloud/template/name.
type RenameZoneRequest ¶
type RenameZoneRequest struct {
Name string `json:"name"`
}
RenameZoneRequest is the request body for PATCH /cloud/zone/{zone}/name.
type RenameZoneResponse ¶
type RenameZoneResponse struct {
Zone int `json:"zone"`
}
RenameZoneResponse is the response body for PATCH /cloud/zone/name.
type ReserveNetworkRequest ¶ added in v0.4.0
type ReserveNetworkRequest struct {
Template string `json:"template"`
}
ReserveNetworkRequest is the request body for POST /cloud/network/{network}/reserve.
type ReserveNetworkResponse ¶ added in v0.4.0
type ReserveNetworkResponse struct {
Network int `json:"network"`
}
ReserveNetworkResponse is the response body for POST /cloud/network/reserve.
type ResizeInstanceDiskRequest ¶
type ResizeInstanceDiskRequest struct {
Size int `json:"size"`
}
ResizeInstanceDiskRequest is the request body for POST /cloud/instance/{instance}/disk/{disk}/size.
type ResizeInstanceDiskResponse ¶
type ResizeInstanceDiskResponse struct {
Instance int `json:"instance"`
}
ResizeInstanceDiskResponse is the response body for PATCH /cloud/instance/disk/size.
type ResizeInstanceRequest ¶
type ResizeInstanceRequest struct {
Template string `json:"template"`
EnforceCapacity bool `json:"enforce_capacity"` // TODO: probably should reverse this logic
}
ResizeInstanceRequest is the request body for PATCH /cloud/instance/{instance}/size.
type ResizeInstanceResponse ¶
type ResizeInstanceResponse struct {
Instance int `json:"instance"`
}
ResizeInstanceResponse is the response body for PATCH /cloud/instance/size.
type RetryHookRequest ¶
type RetryHookRequest struct {
Execution int `json:"execution"`
}
RetryHookRequest is the request body for PATCH /cloud/hook/{hook}/retry.
type RetryHookResponse ¶
type RetryHookResponse struct {
Hook int `json:"hook"`
}
RetryHookResponse is the response body for PATCH /cloud/hook/retry.
type RevertImageSnapshotResponse ¶
type RevertImageSnapshotResponse struct {
Image int `json:"image"`
}
RevertImageSnapshotResponse is the response body for PATCH /cloud/image/snapshot/revert.
type RevertInstanceDiskSnapshotResponse ¶
type RevertInstanceDiskSnapshotResponse struct {
Snapshot int `json:"snapshot"`
}
RevertInstanceDiskSnapshotResponse is the response body for PATCH /cloud/instance/disk/snapshot/revert.
type RevertInstanceSnapshotResponse ¶
type RevertInstanceSnapshotResponse struct {
Instance int `json:"instance"`
}
RevertInstanceSnapshotResponse is the response body for PATCH /cloud/instance/snapshot/revert.
type Router ¶ added in v0.4.0
type Router struct {
ID int `json:"id" yaml:"id"`
UID int `json:"uid" yaml:"uid"`
GID int `json:"gid" yaml:"gid"`
UserName string `json:"user_name" yaml:"user_name"`
GroupName string `json:"group_name" yaml:"group_name"`
Name string `json:"name" yaml:"name"`
Permissions Permissions `json:"permissions" yaml:"permissions"`
Lock Lock `json:"lock" yaml:"lock"`
Instances []int `json:"instances" yaml:"instances"`
Template Template `json:"template" yaml:"template"`
}
Router is the API payload based on the legacy xmlrpc backend.
type RouterResponse ¶ added in v0.4.0
type RouterResponse struct {
Router Router `json:"router"`
}
RouterResponse is the response body for GET /cloud/router.
type RouterService ¶ added in v0.4.0
type RouterService struct {
// contains filtered or unexported fields
}
RouterService own the /cloud/router methods.
func (RouterService) ChangeRouterOwnership ¶ added in v0.4.0
func (s RouterService) ChangeRouterOwnership(ctx context.Context, id int, req ChangeRouterOwnershipRequest) (*ChangeRouterOwnershipResponse, error)
ChangeRouterOwnership changes the ownership of a Router with the given ID.
func (RouterService) ChangeRouterPermissions ¶ added in v0.4.0
func (s RouterService) ChangeRouterPermissions(ctx context.Context, id int, req ChangeRouterPermissionsRequest) (*ChangeRouterPermissionsResponse, error)
ChangeRouterPermissions changes the permissions of a Router with the given ID.
func (RouterService) CreateRouter ¶ added in v0.4.0
func (s RouterService) CreateRouter(ctx context.Context, req CreateRouterRequest) (*CreateRouterResponse, error)
CreateRouter creates a new Router.
func (RouterService) CreateRouterNIC ¶ added in v0.4.0
func (s RouterService) CreateRouterNIC(ctx context.Context, id int, req CreateRouterNICRequest) (*CreateRouterNICResponse, error)
CreateRouterNIC creates a new NIC for the Router with the given ID.
func (RouterService) DeleteRouter ¶ added in v0.4.0
func (s RouterService) DeleteRouter(ctx context.Context, id int) error
DeleteRouter deletes a Router with the given ID.
func (RouterService) DeleteRouterNIC ¶ added in v0.4.0
func (s RouterService) DeleteRouterNIC(ctx context.Context, id int) error
DeleteRouterNIC deletes a NIC from the Router with the given ID.
func (RouterService) InstantiateRouter ¶ added in v0.4.0
func (s RouterService) InstantiateRouter(ctx context.Context, id int, req InstantiateRouterRequest) (*InstantiateRouterResponse, error)
InstantiateRouter instantiates a Router with the given ID.
func (RouterService) LockRouter ¶ added in v0.4.0
func (s RouterService) LockRouter(ctx context.Context, id int, req LockRouterRequest) (*LockRouterResponse, error)
LockRouter locks a Router with the given ID.
func (RouterService) RenameRouter ¶ added in v0.4.0
func (s RouterService) RenameRouter(ctx context.Context, id int, req RenameRouterRequest) (*RenameRouterResponse, error)
RenameRouter renames a Router with the given ID.
func (RouterService) Router ¶ added in v0.4.0
func (s RouterService) Router(ctx context.Context, id int) (*RouterResponse, error)
Router returns information about a router.
func (RouterService) Routers ¶ added in v0.4.0
func (s RouterService) Routers(ctx context.Context) (*RoutersResponse, error)
Routers returns information about all routers.
func (RouterService) UnlockRouter ¶ added in v0.4.0
func (s RouterService) UnlockRouter(ctx context.Context, id int) (*UnlockRouterResponse, error)
UnlockRouter unlocks a Router with the given ID.
func (RouterService) UpdateRouter ¶ added in v0.4.0
func (s RouterService) UpdateRouter(ctx context.Context, id int, req UpdateRouterRequest) (*UpdateRouterResponse, error)
UpdateRouter updates a Router with the given ID.
type RoutersResponse ¶ added in v0.4.0
type RoutersResponse struct {
Routers []Router `json:"routers"`
}
RoutersResponse is the response body for GET /cloud/router.
type SecurityGroup ¶
type SecurityGroup struct {
ID int `json:"id" yaml:"id"`
UserID int `json:"user_id" yaml:"user_id"`
GroupID int `json:"group_id" yaml:"group_id"`
UserName string `json:"user_name" yaml:"user_name"`
GroupName string `json:"group_name" yaml:"group_name"`
Name string `json:"name" yaml:"name"`
Permissions Permissions `json:"permissions" yaml:"permissions"`
UpdatedInstances []int `json:"updated_instances" yaml:"updated_instances"`
OutdatedInstances []int `json:"outdated_instances" yaml:"outdated_instances"`
UpdatingInstances []int `json:"updating_instances" yaml:"updating_instances"`
ErrorInstances []int `json:"error_instances" yaml:"error_instances"`
Template Template `json:"template" yaml:"template"`
}
SecurityGroup is the API payload based on the legacy xmlrpc backend.
func (*SecurityGroup) ParseTemplate ¶ added in v0.14.0
func (g *SecurityGroup) ParseTemplate() (*SecurityGroupTemplate, error)
ParseTemplate returns a structured subset of the nested key x value pair map.
type SecurityGroupResponse ¶ added in v0.4.0
type SecurityGroupResponse struct {
SecurityGroup SecurityGroup `json:"security_group"`
}
SecurityGroupResponse is the response body for GET /cloud/security-group.
type SecurityGroupRule ¶
type SecurityGroupRule struct {
Protocol string `json:"protocol" yaml:"protocol"`
RuleType string `json:"rule_type" yaml:"rule_type"`
}
SecurityGroupRule is the API payload based on the legacy xmlrpc backend.
type SecurityGroupService ¶ added in v0.4.0
type SecurityGroupService struct {
// contains filtered or unexported fields
}
SecurityGroupService owns the /cloud/security-group methods.
func (SecurityGroupService) ChangeSecurityGroupOwnership ¶ added in v0.4.0
func (s SecurityGroupService) ChangeSecurityGroupOwnership(ctx context.Context, id int, req ChangeSecurityGroupOwnershipRequest) (*ChangeSecurityGroupOwnershipResponse, error)
ChangeSecurityGroupOwnership changes the ownership of the security group with the given ID.
func (SecurityGroupService) ChangeSecurityGroupPermissions ¶ added in v0.4.0
func (s SecurityGroupService) ChangeSecurityGroupPermissions(ctx context.Context, id int, req ChangeSecurityGroupPermissionsRequest) (*ChangeSecurityGroupPermissionsResponse, error)
ChangeSecurityGroupPermissions changes the permissions of the security group with the given ID.
func (SecurityGroupService) CloneSecurityGroup ¶ added in v0.4.0
func (s SecurityGroupService) CloneSecurityGroup(ctx context.Context, id int, req CloneSecurityGroupRequest) (*CloneSecurityGroupResponse, error)
CloneSecurityGroup clones the security group with the given ID.
func (SecurityGroupService) CommitSecurityGroup ¶ added in v0.4.0
func (s SecurityGroupService) CommitSecurityGroup(ctx context.Context, id int, req CommitSecurityGroupRequest) (*CommitSecurityGroupResponse, error)
CommitSecurityGroup commits the security group with the given ID.
func (SecurityGroupService) CreateSecurityGroup ¶ added in v0.4.0
func (s SecurityGroupService) CreateSecurityGroup(ctx context.Context, req CreateSecurityGroupRequest) (*CreateSecurityGroupResponse, error)
CreateSecurityGroup creates a new security group.
func (SecurityGroupService) DeleteSecurityGroup ¶ added in v0.4.0
func (s SecurityGroupService) DeleteSecurityGroup(ctx context.Context, id int) error
DeleteSecurityGroup deletes the security group with the given ID.
func (SecurityGroupService) RenameSecurityGroup ¶ added in v0.4.0
func (s SecurityGroupService) RenameSecurityGroup(ctx context.Context, id int, req RenameSecurityGroupRequest) (*RenameSecurityGroupResponse, error)
RenameSecurityGroup renames the security group with the given ID.
func (SecurityGroupService) SecurityGroup ¶ added in v0.4.0
func (s SecurityGroupService) SecurityGroup(ctx context.Context, id int) (*SecurityGroupResponse, error)
SecurityGroup returns information about a image.
func (SecurityGroupService) SecurityGroups ¶ added in v0.4.0
func (s SecurityGroupService) SecurityGroups(ctx context.Context) (*SecurityGroupsResponse, error)
SecurityGroups returns information about all images.
func (SecurityGroupService) UpdateSecurityGroup ¶ added in v0.4.0
func (s SecurityGroupService) UpdateSecurityGroup(ctx context.Context, id int, req UpdateSecurityGroupRequest) (*UpdateSecurityGroupResponse, error)
UpdateSecurityGroup updates the security group with the given ID.
type SecurityGroupTemplate ¶
type SecurityGroupTemplate struct {
Description string
Rule []SecurityGroupRule
}
SecurityGroupTemplate is the API payload based on the legacy xmlrpc backend.
type SecurityGroupsResponse ¶ added in v0.4.0
type SecurityGroupsResponse struct {
SecurityGroups []SecurityGroup `json:"security_group"`
}
SecurityGroupsResponse is the response body for GET /cloud/security-group.
type Server ¶
type Server struct {
Endpoint string `json:"endpoint" yaml:"endpoint"`
ID int `json:"id" yaml:"id"`
Name string `json:"name" yaml:"name"`
State int `json:"state" yaml:"state"`
Term int `json:"term" yaml:"term"`
VotedFor int `json:"voted_for" yaml:"voted_for"`
Commit int `json:"commit" yaml:"commit"`
LogIndex int `json:"log_index" yaml:"log_index"`
FedLogIndex int `json:"fed_log_index" yaml:"fed_log_index"`
}
Server is the API payload based on the legacy xmlrpc backend.
type Service ¶ added in v0.4.0
type Service struct {
ACLService
ClusterService
HostService
DataCenterService
DatastoreService
DocumentService
GroupService
HookService
ImageService
InstanceService
MarketService
NetworkService
RouterService
SecurityGroupService
SystemService
TemplateService
UserService
ZoneService
// contains filtered or unexported fields
}
Service owns the /cloud methods.
type SetGroupQuotaRequest ¶
type SetGroupQuotaRequest struct {
Template string `json:"template"`
}
SetGroupQuotaRequest is the request body for POST /cloud/group/quota.
type SetGroupQuotaResponse ¶
type SetGroupQuotaResponse struct {
Group int `json:"group"`
}
SetGroupQuotaResponse is the response body for POST /cloud/group/quota.
type SetHostStatusRequest ¶ added in v0.4.0
type SetHostStatusRequest struct {
Status string `json:"status"`
}
SetHostStatusRequest is the request body for PATCH /cloud/host/{host}/status.
type SetHostStatusResponse ¶ added in v0.4.0
type SetHostStatusResponse struct {
Host int `json:"host"`
}
SetHostStatusResponse is the response body for PATCH /cloud/host/status.
type SetImagePersistentRequest ¶
type SetImagePersistentRequest struct {
Persistent bool `json:"persistent"`
}
SetImagePersistentRequest is the request body for PATCH /cloud/image/{image}/persistent.
type SetImagePersistentResponse ¶
type SetImagePersistentResponse struct {
Image int `json:"image"`
}
SetImagePersistentResponse is the response body for PATCH /cloud/image/persistent.
type SetInstanceActionRequest ¶
type SetInstanceActionRequest struct {
// Action to perform
Action string `` /* 152-byte string literal not displayed */
}
SetInstanceActionRequest is the request body for PATCH /cloud/instance/{instance}/action.
type SetInstanceActionResponse ¶
type SetInstanceActionResponse struct {
Instance int `json:"instance"`
}
SetInstanceActionResponse is the response body for POST /cloud/instance/action.
type SetUserQuotaRequest ¶
type SetUserQuotaRequest struct {
Template string `json:"template"`
}
SetUserQuotaRequest is the request body for PATCH /cloud/user/{user}/quota.
type SetUserQuotaResponse ¶
type SetUserQuotaResponse struct {
User int `json:"user"`
}
SetUserQuotaResponse is the response body for PATCH /cloud/user/quota.
type Showback ¶
type Showback struct {
InstanceID int `json:"instance" yaml:"instance"`
InstanceName string `json:"instance_name" yaml:"instance_name"`
UID int `json:"uid" yaml:"uid"`
GID int `json:"gid" yaml:"gid"`
UserName string `json:"user_name" yaml:"user_name"`
GroupName string `json:"group_name" yaml:"group_name"`
Year int `json:"year" yaml:"year"`
Month int `json:"month" yaml:"month"`
CPUCost float32 `json:"cpucost" yaml:"cpucost"`
MemoryCost float32 `json:"memory_cost" yaml:"memory_cost"`
DiskCost float32 `json:"disk_cost" yaml:"disk_cost"`
TotalCost float32 `json:"total_cost" yaml:"total_cost"`
Hours float32 `json:"hours" yaml:"hours"`
Rhours float32 `json:"rhours" yaml:"rhours"`
}
Showback is the API payload based on the legacy xmlrpc backend.
type Status ¶
type Status int
Status is the status of an object (usually an Instance).
const ( EnabledStatus Status = iota // enabled DisabledStatus // disabled OfflineStatus // offline )
Status values.
func StatusString ¶
StatusString retrieves an enum value from the enum constants string name. Throws an error if the param is not part of the enum.
func (Status) IsAStatus ¶
IsAStatus returns "true" if the value is listed in the enum definition. "false" otherwise
func (Status) MarshalText ¶
MarshalText implements the encoding.TextMarshaler interface for Status
func (*Status) UnmarshalText ¶
UnmarshalText implements the encoding.TextUnmarshaler interface for Status
type SunstoneTemplate ¶
type SunstoneTemplate struct {
DefaultView string
GroupAdminDefaultView string
GroupAdminViews []string
Views []string
}
SunstoneTemplate is the API payload based on the legacy xmlrpc backend.
type SystemConfigResponse ¶ added in v0.4.0
type SystemConfigResponse struct {
Config HyperCloudConfiguration `json:"config"`
}
SystemConfigResponse is the response body for GET /cloud/system/config.
type SystemService ¶ added in v0.4.0
type SystemService struct {
// contains filtered or unexported fields
}
SystemService owns the /cloud/system methods.
func (SystemService) SystemConfig ¶ added in v0.4.0
func (s SystemService) SystemConfig(ctx context.Context) (*SystemConfigResponse, error)
SystemConfig returns HC config.
func (SystemService) SystemVersion ¶ added in v0.4.0
func (s SystemService) SystemVersion(ctx context.Context) (*SystemVersionResponse, error)
SystemVersion returns the version of HC.
type SystemVersionResponse ¶ added in v0.4.0
type SystemVersionResponse struct {
Version string `json:"version"`
}
SystemVersionResponse is the response body for GET /cloud/system/version.
type Template ¶ added in v0.13.0
Template is nested map of string key x value pairs.
func NewTemplate ¶ added in v0.17.0
NewTemplate returns a new Template from the struct t. If t is not a struct (or a pointer to one) it panics.
func (Template) String ¶ added in v0.13.0
String implements the Stringer interface for t. Example output:
FOO = "bar" BAZ = [ QUX = "quux", CORGE = "grault" ] BAZ = [ GARPLY = "waldo" ] GARPLY = "waldo"
func (*Template) UnmarshalJSON ¶ added in v0.13.0
UnmarshalJSON implements the json.Unmarshaler interface for t.
type TemplateResponse ¶ added in v0.4.0
type TemplateResponse struct {
Template InstanceTemplate `json:"template"`
}
TemplateResponse is the response body for GET /cloud/template.
type TemplateService ¶ added in v0.4.0
type TemplateService struct {
// contains filtered or unexported fields
}
TemplateService own the /cloud/template methods.
func (TemplateService) ChangeTemplateOwnership ¶ added in v0.4.0
func (s TemplateService) ChangeTemplateOwnership(ctx context.Context, id int, req ChangeTemplateOwnershipRequest) (*ChangeTemplateOwnershipResponse, error)
ChangeTemplateOwnership changes the ownership of the template with the given ID.
func (TemplateService) ChangeTemplatePermissions ¶ added in v0.4.0
func (s TemplateService) ChangeTemplatePermissions(ctx context.Context, id int, req ChangeTemplatePermissionsRequest) (*ChangeTemplatePermissionsResponse, error)
ChangeTemplatePermissions changes the permissions of the template with the given ID.
func (TemplateService) CloneTemplate ¶ added in v0.4.0
func (s TemplateService) CloneTemplate(ctx context.Context, id int, req CloneTemplateRequest) (*CloneTemplateResponse, error)
CloneTemplate clones the template with the given ID.
func (TemplateService) CreateTemplate ¶ added in v0.4.0
func (s TemplateService) CreateTemplate(ctx context.Context, req CreateTemplateRequest) (*CreateTemplateResponse, error)
CreateTemplate creates a new template.
func (TemplateService) DeleteTemplate ¶ added in v0.4.0
func (s TemplateService) DeleteTemplate(ctx context.Context, id int) error
DeleteTemplate deletes the template with the given ID.
func (TemplateService) InstantiateTemplate ¶ added in v0.4.0
func (s TemplateService) InstantiateTemplate(ctx context.Context, id int, req InstantiateTemplateRequest) (*InstantiateTemplateResponse, error)
InstantiateTemplate instantiates the template with the given ID.
func (TemplateService) LockTemplate ¶ added in v0.4.0
func (s TemplateService) LockTemplate(ctx context.Context, id int, req LockTemplateRequest) (*LockTemplateResponse, error)
LockTemplate locks the template with the given ID.
func (TemplateService) RenameTemplate ¶ added in v0.4.0
func (s TemplateService) RenameTemplate(ctx context.Context, id int, req RenameTemplateRequest) (*RenameTemplateResponse, error)
RenameTemplate renames the template with the given ID.
func (TemplateService) Template ¶ added in v0.4.0
func (s TemplateService) Template(ctx context.Context, id int) (*TemplateResponse, error)
Template returns information about a template.
func (TemplateService) Templates ¶ added in v0.4.0
func (s TemplateService) Templates(ctx context.Context) (*TemplatesResponse, error)
Templates returns information about all templates.
func (TemplateService) UnlockTemplate ¶ added in v0.4.0
func (s TemplateService) UnlockTemplate(ctx context.Context, id int) (*UnlockTemplateResponse, error)
UnlockTemplate unlocks the template with the given ID.
func (TemplateService) UpdateTemplate ¶ added in v0.4.0
func (s TemplateService) UpdateTemplate(ctx context.Context, id int, req UpdateTemplateRequest) (*UpdateTemplateResponse, error)
UpdateTemplate updates the template with the given ID.
type TemplatesResponse ¶ added in v0.4.0
type TemplatesResponse struct {
Templates []InstanceTemplate `json:"template"`
}
TemplatesResponse is the response body for GET /cloud/template.
type UnlockDocumentResponse ¶
type UnlockDocumentResponse struct {
Document int `json:"document"`
}
UnlockDocumentResponse is the response body for PATCH /cloud/document/unlock.
type UnlockHookRequest ¶
type UnlockHookRequest struct {
Lock int `json:"lock"`
}
UnlockHookRequest is the request body for PATCH /cloud/hook/{hook}/unlock.
type UnlockHookResponse ¶
type UnlockHookResponse struct {
Hook int `json:"hook"`
}
UnlockHookResponse is the response body for PATCH /cloud/hook/unlock.
type UnlockImageResponse ¶
type UnlockImageResponse struct {
Image int `json:"image"`
}
UnlockImageResponse is the response body for PATCH /cloud/image/unlock.
type UnlockInstanceGroupResponse ¶
type UnlockInstanceGroupResponse struct {
Group int `json:"group"`
}
UnlockInstanceGroupResponse is the response body for PATCH /cloud/instance-group/unlock.
type UnlockInstanceResponse ¶
type UnlockInstanceResponse struct {
Instance int `json:"instance"`
}
UnlockInstanceResponse is the response body for PATCH /cloud/instance/unlock.
type UnlockMarketAppResponse ¶
type UnlockMarketAppResponse struct {
MarketApp int `json:"market_app"`
}
UnlockMarketAppResponse is the response body for PATCH /cloud/market/app/unlock.
type UnlockNetworkResponse ¶ added in v0.4.0
type UnlockNetworkResponse struct {
Network int `json:"network"`
}
UnlockNetworkResponse is the response body for PATCH /cloud/network/unlock.
type UnlockNetworkTemplateResponse ¶ added in v0.4.0
type UnlockNetworkTemplateResponse struct {
Template int `json:"template"`
}
UnlockNetworkTemplateResponse is the response body for PATCH /cloud/network/template/unlock.
type UnlockRouterResponse ¶ added in v0.4.0
type UnlockRouterResponse struct {
Router int `json:"router"`
}
UnlockRouterResponse is the response body for PATCH /cloud/router/unlock.
type UnlockTemplateResponse ¶
type UnlockTemplateResponse struct {
Template int `json:"template"`
}
UnlockTemplateResponse is the response body for PATCH /cloud/template/unlock.
type UpdateClusterRequest ¶
UpdateClusterRequest is request body for PATCH /cloud/cluster/{cluster}.
type UpdateClusterResponse ¶
type UpdateClusterResponse struct {
Cluster int `json:"cluster"`
}
UpdateClusterResponse is response body for PATCH /cloud/cluster.
type UpdateDataCenterRequest ¶ added in v0.4.0
UpdateDataCenterRequest is the request body for PATCH /cloud/datacenter/{datacenter}.
type UpdateDataCenterResponse ¶ added in v0.4.0
type UpdateDataCenterResponse struct {
DataCenter int `json:"datacenter"`
}
UpdateDataCenterResponse is the response body for PATCH /cloud/datacenter.
type UpdateDatastoreRequest ¶
UpdateDatastoreRequest is the request body for PATCH /cloud/datastore/{datastore}.
type UpdateDatastoreResponse ¶
type UpdateDatastoreResponse struct {
Datastore int `json:"datastore"`
}
UpdateDatastoreResponse is the response body for PATCH /cloud/datastore.
type UpdateDefaultUserQuotaRequest ¶
type UpdateDefaultUserQuotaRequest struct {
Template string `json:"template"`
}
UpdateDefaultUserQuotaRequest is the request body for POST /cloud/user/quota.
type UpdateDefaultUserQuotaResponse ¶
type UpdateDefaultUserQuotaResponse struct {
Quota UserDefaultQuotas `json:"quota"`
}
UpdateDefaultUserQuotaResponse is the response body for POST /cloud/user/quota.
type UpdateDocumentRequest ¶
UpdateDocumentRequest is the request body for PATCH /cloud/document/{document}.
type UpdateDocumentResponse ¶
type UpdateDocumentResponse struct {
Document int `json:"document"`
}
UpdateDocumentResponse is the response body for PATCH /cloud/document.
type UpdateGroupQuotaRequest ¶
type UpdateGroupQuotaRequest struct {
Template string `json:"template"`
}
UpdateGroupQuotaRequest is the request body for PATCH /cloud/group/{group}/quota.
type UpdateGroupQuotaResponse ¶
type UpdateGroupQuotaResponse struct {
Quota UserDefaultQuotas `json:"quotas"`
}
UpdateGroupQuotaResponse is the response body for PATCH /cloud/group/{group}/quota.
type UpdateGroupRequest ¶
UpdateGroupRequest is the request body for PATCH /cloud/group.
func (*UpdateGroupRequest) SetTemplate ¶ added in v0.17.0
func (r *UpdateGroupRequest) SetTemplate(t GroupTemplate)
SetTemplate sets r.Template from its structured representation. Either call this of set the template string directly.
type UpdateGroupResponse ¶
type UpdateGroupResponse struct {
Group int `json:"group"`
}
UpdateGroupResponse is the response body for PATCH /cloud/group.
type UpdateHookRequest ¶
UpdateHookRequest is the request body for PATCH /cloud/hook/{hook}.
type UpdateHookResponse ¶
type UpdateHookResponse struct {
Hook int `json:"hook"`
}
UpdateHookResponse is the response body for PATCH /cloud/hook.
type UpdateHostRequest ¶ added in v0.4.0
UpdateHostRequest is the request body for PATCH /cloud/host/{host}.
type UpdateHostResponse ¶ added in v0.4.0
type UpdateHostResponse struct {
Host int `json:"host"`
}
UpdateHostResponse is the response body for PATCH /cloud/host.
type UpdateImageRequest ¶
UpdateImageRequest is the request body for PATCH /cloud/image/{image}.
func (*UpdateImageRequest) SetTemplate ¶ added in v0.17.0
func (r *UpdateImageRequest) SetTemplate(t ImageTemplate)
SetTemplate sets r.Template from its structured representation. Either call this of set the template string directly.
type UpdateImageResponse ¶
type UpdateImageResponse struct {
Image int `json:"image"`
}
UpdateImageResponse is the response body for PATCH /cloud/image.
type UpdateInstanceConfigRequest ¶
type UpdateInstanceConfigRequest struct {
Template string `json:"template"`
Merge bool `json:"merge"`
}
UpdateInstanceConfigRequest is the request body for PATCH /cloud/instance/{instance}/config.
type UpdateInstanceConfigResponse ¶
type UpdateInstanceConfigResponse struct {
Instance int `json:"instance"`
}
UpdateInstanceConfigResponse is the response body for PATCH /cloud/instance/config.
type UpdateInstanceGroupRequest ¶
type UpdateInstanceGroupRequest struct {
Template string `json:"template"`
Merge bool `json:"merge"`
}
UpdateInstanceGroupRequest is the request body for PATCH /cloud/instance-group/{group}.
type UpdateInstanceGroupResponse ¶
type UpdateInstanceGroupResponse struct {
Group int `json:"group"`
}
UpdateInstanceGroupResponse is the response body for PATCH /cloud/instance-group.
type UpdateInstanceScheduleRequest ¶
type UpdateInstanceScheduleRequest struct {
Action int `json:"action"`
Template string `json:"template"`
}
UpdateInstanceScheduleRequest is the request body for PATCH /cloud/instance/{instance}/schedule.
type UpdateInstanceScheduleResponse ¶
type UpdateInstanceScheduleResponse struct {
Instance int `json:"instance"`
}
UpdateInstanceScheduleResponse is the response body for PATCH /cloud/instance/schedule.
type UpdateInstanceTemplateRequest ¶
type UpdateInstanceTemplateRequest struct {
Template string `json:"template"`
Merge bool `json:"merge"`
}
UpdateInstanceTemplateRequest is the request body for PATCH /cloud/instance/{instance}/template.
type UpdateInstanceTemplateResponse ¶
type UpdateInstanceTemplateResponse struct {
Instance int `json:"instance"`
}
UpdateInstanceTemplateResponse is the response body for PATCH /cloud/instance/template.
type UpdateMarketAppRequest ¶
UpdateMarketAppRequest is the request body for PATCH /cloud/market/app/{app}.
type UpdateMarketAppResponse ¶
type UpdateMarketAppResponse struct {
MarketApp int `json:"market_app"`
}
UpdateMarketAppResponse is the response body for PATCH /cloud/market/app.
type UpdateMarketRequest ¶
UpdateMarketRequest is the request body for PATCH /cloud/market/{market}.
type UpdateMarketResponse ¶
type UpdateMarketResponse struct {
Market int `json:"market"`
}
UpdateMarketResponse is the response body for PATCH /cloud/market.
type UpdateNetworkAddressRangeRequest ¶ added in v0.4.0
type UpdateNetworkAddressRangeRequest struct {
Template string `json:"template"`
}
UpdateNetworkAddressRangeRequest is the request body for PATCH /cloud/network/{network}/address-range.
type UpdateNetworkAddressRangeResponse ¶ added in v0.4.0
type UpdateNetworkAddressRangeResponse struct {
Network int `json:"network"`
}
UpdateNetworkAddressRangeResponse is the response body for PATCH /cloud/network/address-range.
type UpdateNetworkRequest ¶ added in v0.4.0
UpdateNetworkRequest is the request body for PATCH /cloud/network/{network}.
type UpdateNetworkResponse ¶ added in v0.4.0
type UpdateNetworkResponse struct {
Network int `json:"network"`
}
UpdateNetworkResponse is the response body for PATCH /cloud/network.
type UpdateNetworkTemplateRequest ¶ added in v0.4.0
type UpdateNetworkTemplateRequest struct {
Template string `json:"template"`
Merge bool `json:"merge"`
}
UpdateNetworkTemplateRequest is the request body for PATCH /cloud/network/{network}/template.
type UpdateNetworkTemplateResponse ¶ added in v0.4.0
type UpdateNetworkTemplateResponse struct {
Template int `json:"template"`
}
UpdateNetworkTemplateResponse is the response body for PATCH /cloud/network/template.
type UpdateRouterRequest ¶ added in v0.4.0
UpdateRouterRequest is the request body for PATCH /cloud/router/{router}.
type UpdateRouterResponse ¶ added in v0.4.0
type UpdateRouterResponse struct {
Router int `json:"router"`
}
UpdateRouterResponse is the response body for PATCH /cloud/router.
type UpdateSecurityGroupRequest ¶
type UpdateSecurityGroupRequest struct {
Template string `json:"template"`
Merge bool `json:"merge"`
}
UpdateSecurityGroupRequest is the request body for PATCH /cloud/security-group/{sg}.
type UpdateSecurityGroupResponse ¶
type UpdateSecurityGroupResponse struct {
SecurityGroup int `json:"security_group"`
}
UpdateSecurityGroupResponse is the response body for PATCH /cloud/security-group.
type UpdateTemplateRequest ¶
UpdateTemplateRequest is the response body for PATCH /cloud/template/{template}.
type UpdateTemplateResponse ¶
type UpdateTemplateResponse struct {
Template int `json:"template"`
}
UpdateTemplateResponse is the response body for PATCH /cloud/template.
type UpdateUserRequest ¶
UpdateUserRequest is the request body for PATCH /cloud/user/{user}.
func (*UpdateUserRequest) SetTemplate ¶ added in v0.17.0
func (r *UpdateUserRequest) SetTemplate(t UserTemplate)
SetTemplate sets r.Template from its structured representation. Either call this of set the template string directly.
type UpdateUserResponse ¶
type UpdateUserResponse struct {
User int `json:"user"`
}
UpdateUserResponse is the response body for PATCH /cloud/user.
type UpdateZoneRequest ¶
UpdateZoneRequest is the request body for PATCH /cloud/zone/{zone}.
type UpdateZoneResponse ¶
type UpdateZoneResponse struct {
Zone int `json:"zone"`
}
UpdateZoneResponse is the response body for PATCH /cloud/zone.
type User ¶
type User struct {
ID int `json:"id" yaml:"id"`
GroupID int `json:"group_id" yaml:"group_id"`
Groups []int `json:"groups" yaml:"groups"`
GroupName string `json:"group_name" yaml:"group_name"`
Name string `json:"name" yaml:"name"`
Password string `json:"password" yaml:"password"`
AuthDriver string `json:"auth_driver" yaml:"auth_driver"`
Enabled bool `json:"enabled" yaml:"enabled"`
LoginToken []UserLoginToken `json:"login_token" yaml:"login_token"`
Template Template `json:"template" yaml:"template"`
DatastoreQuota []UserDatastore `json:"datastore_quota" yaml:"datastore_quota"`
NetworkQuota []UserNetwork `json:"network_quota" yaml:"network_quota"`
InstanceQuota UserInstance `json:"instance_quota" yaml:"instance_quota"`
ImageQuota []UserImage `json:"image_quota" yaml:"image_quota"`
DefaultUserQuotas UserDefaultQuotas `json:"default_user_quotas" yaml:"default_user_quotas"`
}
User is the API payload based on the legacy xmlrpc backend.
type UserDatastore ¶
type UserDatastore struct {
ID string `json:"id" yaml:"id"`
Images string `json:"images" yaml:"images"`
ImagesUsed string `json:"images_used" yaml:"images_used"`
Size string `json:"size" yaml:"size"`
SizeUsed string `json:"size_used" yaml:"size_used"`
}
UserDatastore is the API payload based on the legacy xmlrpc backend.
type UserDefaultQuotas ¶
type UserDefaultQuotas struct {
DatastoreQuota []UserDatastore `json:"datastore_quota" yaml:"datastore_quota"`
NetworkQuota []UserNetwork `json:"network_quota" yaml:"network_quota"`
InstanceQuota UserInstance `json:"instance_quota" yaml:"instance_quota"`
ImageQuota []UserImage `json:"image_quota" yaml:"image_quota"`
}
UserDefaultQuotas is the API payload based on the legacy xmlrpc backend.
type UserImage ¶
type UserImage struct {
ID string `json:"id" yaml:"id"`
RunningInstances string `json:"running_instances" yaml:"running_instances"`
RunningInstancesUsed string `json:"running_instances_used" yaml:"running_instances_used"`
}
UserImage is the API payload based on the legacy xmlrpc backend.
type UserInstance ¶
type UserInstance struct {
CPU float32 `json:"cpu" yaml:"cpu"`
CPUUsed float32 `json:"cpu_used" yaml:"cpu_used"`
Memory int `json:"memory" yaml:"memory"`
MemoryUsed int `json:"memory_used" yaml:"memory_used"`
RunningCPU float32 `json:"running_cpu" yaml:"running_cpu"`
RunningCPUUsed float32 `json:"running_cpu_used" yaml:"running_cpu_used"`
RunningMemory int `json:"running_memory" yaml:"running_memory"`
RunningMemoryUsed int `json:"running_memory_used" yaml:"running_memory_used"`
RunningInstances int `json:"running_instances" yaml:"running_instances"`
RunningInstancesUsed int `json:"running_instances_used" yaml:"running_instances_used"`
SystemDiskSize int64 `json:"system_disk_size" yaml:"system_disk_size"`
SystemDiskSizeUsed int64 `json:"system_disk_size_used" yaml:"system_disk_size_used"`
Instances int `json:"instances" yaml:"instances"`
InstancesUsed int `json:"instances_used" yaml:"instances_used"`
}
UserInstance is the API payload based on the legacy xmlrpc backend.
type UserLoginRequest ¶
type UserLoginRequest struct {
Username string `json:"username"`
Token string `json:"token"`
Duration int `json:"duration"`
Group int `json:"group"`
}
UserLoginRequest is the request body for POST /cloud/user/login.
type UserLoginResponse ¶
type UserLoginResponse struct {
Token string `json:"token"`
}
UserLoginResponse is the response body for POST /cloud/user/login.
type UserLoginToken ¶
type UserLoginToken struct {
Token string `json:"token" yaml:"token"`
ExpirationTime time.Time `json:"expiration_time" yaml:"expiration_time"`
EffectiveGroupID int `json:"effective_group_id" yaml:"effective_group_id"`
}
UserLoginToken is the API payload based on the legacy xmlrpc backend.
type UserNetwork ¶
type UserNetwork struct {
ID string `json:"id" yaml:"id"`
Leases string `json:"leases" yaml:"leases"`
LeasesUsed string `json:"leases_used" yaml:"leases_used"`
}
UserNetwork is the API payload based on the legacy xmlrpc backend.
type UserQuotaResponse ¶ added in v0.4.0
type UserQuotaResponse struct {
Quota UserDefaultQuotas `json:"quota"`
}
UserQuotaResponse is the response body for GET /cloud/user/quota.
type UserResponse ¶ added in v0.4.0
type UserResponse struct {
User User `json:"user"`
}
UserResponse is the response body for GET /cloud/user.
type UserService ¶ added in v0.4.0
type UserService struct {
// contains filtered or unexported fields
}
UserService owns the /cloud/user methods.
func (UserService) AddUserGroup ¶ added in v0.4.0
func (s UserService) AddUserGroup(ctx context.Context, id, group int) (*AddUserGroupResponse, error)
AddUserGroup adds the user to the group with the given ID.
func (UserService) ChangeUserAuth ¶ added in v0.4.0
func (s UserService) ChangeUserAuth(ctx context.Context, id int, req ChangeUserAuthRequest) (*ChangeUserAuthResponse, error)
ChangeUserAuth changes the user's authentication method.
func (UserService) ChangeUserGroup ¶ added in v0.4.0
func (s UserService) ChangeUserGroup(ctx context.Context, id, group int) (*ChangeUserGroupResponse, error)
ChangeUserGroup changes the user's group.
func (UserService) ChangeUserPassword ¶ added in v0.4.0
func (s UserService) ChangeUserPassword(ctx context.Context, id int, req ChangeUserPasswordRequest) (*ChangeUserPasswordResponse, error)
ChangeUserPassword changes the user's password.
func (UserService) CreateUser ¶ added in v0.4.0
func (s UserService) CreateUser(ctx context.Context, req CreateUserRequest) (*CreateUserResponse, error)
CreateUser creates a new user.
func (UserService) DeleteUser ¶ added in v0.4.0
func (s UserService) DeleteUser(ctx context.Context, id int) error
DeleteUser deletes the user with the given ID.
func (UserService) DeleteUserGroup ¶ added in v0.4.0
func (s UserService) DeleteUserGroup(ctx context.Context, id, group int) error
DeleteUserGroup deletes the user from the group with the given ID.
func (UserService) EnableUser ¶ added in v0.4.0
func (s UserService) EnableUser(ctx context.Context, id int, req EnableUserRequest) (*EnableUserResponse, error)
EnableUser enables the user with the given ID.
func (UserService) SetUserQuota ¶ added in v0.4.0
func (s UserService) SetUserQuota(ctx context.Context, id int, req SetUserQuotaRequest) (*SetUserQuotaResponse, error)
SetUserQuota sets the user's quota.
func (UserService) UpdateDefaultUserQuota ¶ added in v0.4.0
func (s UserService) UpdateDefaultUserQuota(ctx context.Context, req UpdateDefaultUserQuotaRequest) (*UpdateDefaultUserQuotaResponse, error)
UpdateDefaultUserQuota updates the default user quota.
func (UserService) UpdateUser ¶ added in v0.4.0
func (s UserService) UpdateUser(ctx context.Context, id int, req UpdateUserRequest) (*UpdateUserResponse, error)
UpdateUser updates the user with the given ID.
func (UserService) User ¶ added in v0.4.0
func (s UserService) User(ctx context.Context, id int) (*UserResponse, error)
User returns information about a user.
func (UserService) UserQuota ¶ added in v0.4.0
func (s UserService) UserQuota(ctx context.Context) (*UserQuotaResponse, error)
UserQuota returns the default user quota.
func (UserService) Users ¶ added in v0.4.0
func (s UserService) Users(ctx context.Context) (*UsersResponse, error)
Users returns information about all users.
type UserTemplate ¶
type UserTemplate struct {
Values map[string]string `json:"values" yaml:"values"`
RadosGW bool `json:"rados_gw" yaml:"rados_gw"`
RadosGWAccessKey string `json:"rados_gw_access_key" yaml:"rados_gw_access_key"`
RadosGWSecretKey string `json:"rados_gw_secret_key" yaml:"rados_gw_secret_key"`
SSHPublicKey string `json:"ssh_public_key" yaml:"ssh_public_key"`
TokenPassword string `json:"token_password" yaml:"token_password"`
}
UserTemplate is the API payload based on the legacy xmlrpc backend.
type UsersResponse ¶ added in v0.4.0
type UsersResponse struct {
Users []User `json:"users"`
}
UsersResponse is the response body for GET /cloud/user.
type Zone ¶
type Zone struct {
ID int `json:"id" yaml:"id"`
Name string `json:"name" yaml:"name"`
State int `json:"state" yaml:"state"`
Template Template `json:"template" yaml:"template"`
Servers []Server `json:"servers" yaml:"servers"`
}
Zone is the API payload based on the legacy xmlrpc backend.
func (*Zone) ParseTemplate ¶ added in v0.14.0
func (z *Zone) ParseTemplate() (*ZoneTemplate, error)
ParseTemplate returns a structured subset of the nested key x value pair map.
type ZoneResponse ¶ added in v0.4.0
type ZoneResponse struct {
Zone Zone `json:"zone"`
}
ZoneResponse is the response body for GET /cloud/zone.
type ZoneService ¶ added in v0.4.0
type ZoneService struct {
// contains filtered or unexported fields
}
ZoneService owns the /cloud/zone methods.
func (ZoneService) CreateZone ¶ added in v0.4.0
func (s ZoneService) CreateZone(ctx context.Context, req CreateZoneRequest) (*CreateZoneResponse, error)
CreateZone creates a new zone.
func (ZoneService) DeleteZone ¶ added in v0.4.0
func (s ZoneService) DeleteZone(ctx context.Context, id int) error
DeleteZone deletes the zone with the given ID.
func (ZoneService) EnableZone ¶ added in v0.4.0
func (s ZoneService) EnableZone(ctx context.Context, id int, req EnableZoneRequest) (*EnableZoneResponse, error)
EnableZone enables the zone with the given ID.
func (ZoneService) RenameZone ¶ added in v0.4.0
func (s ZoneService) RenameZone(ctx context.Context, id int, req RenameZoneRequest) (*RenameZoneResponse, error)
RenameZone renames the zone with the given ID.
func (ZoneService) UpdateZone ¶ added in v0.4.0
func (s ZoneService) UpdateZone(ctx context.Context, id int, req UpdateZoneRequest) (*UpdateZoneResponse, error)
UpdateZone updates the zone with the given ID.
func (ZoneService) Zone ¶ added in v0.4.0
func (s ZoneService) Zone(ctx context.Context, id int) (*ZoneResponse, error)
Zone returns information about a zone.
func (ZoneService) Zones ¶ added in v0.4.0
func (s ZoneService) Zones(ctx context.Context) (*ZonesResponse, error)
Zones returns information about all zones.
func (ZoneService) ZonesRaftStatus ¶ added in v0.4.0
func (s ZoneService) ZonesRaftStatus(ctx context.Context) (*ZonesRaftStatusResponse, error)
ZonesRaftStatus returns the raft status for all zones.
type ZoneTemplate ¶
type ZoneTemplate struct {
Endpoint string
}
ZoneTemplate is the API payload based on the legacy xmlrpc backend.
type ZonesRaftStatusResponse ¶ added in v0.4.0
type ZonesRaftStatusResponse struct {
Status RaftStatus `json:"status"`
}
ZonesRaftStatusResponse is the response body for GET /cloud/zone/raft.
type ZonesResponse ¶ added in v0.4.0
type ZonesResponse struct {
Zones []Zone `json:"zones"`
}
ZonesResponse is the response body for GET /cloud/zone.
Source Files
¶
- cloud.go
- datacenter.go
- datastore.go
- datastorestate_enumer.go
- datastoretype_enumer.go
- enums.go
- filter_enumer.go
- group.go
- hook.go
- host.go
- image.go
- imagetype_enumer.go
- instancerecovery_enumer.go
- lcmstate_enumer.go
- locklevel_enumer.go
- migrationtype_enumer.go
- network.go
- networkrecovery_enumer.go
- payloads.go
- requests.go
- responses.go
- service.go
- service_acl.go
- service_cluster.go
- service_datacenter.go
- service_datastore.go
- service_document.go
- service_group.go
- service_hook.go
- service_host.go
- service_image.go
- service_instance.go
- service_market.go
- service_network.go
- service_router.go
- service_sg.go
- service_system.go
- service_template.go
- service_user.go
- service_zone.go
- sg.go
- status_enumer.go
- template.go
- user.go
- zone.go
Directories
¶
| Path | Synopsis |
|---|---|
|
Package config contains struct for the HyperCloudConfiguration payload.
|
Package config contains struct for the HyperCloudConfiguration payload. |
|
Package datacenter provides structs for the Datacenter payload.
|
Package datacenter provides structs for the Datacenter payload. |
|
Package instance contains structs for the Instance payload.
|
Package instance contains structs for the Instance payload. |
|
Package network provides structs for the VNet payload.
|
Package network provides structs for the VNet payload. |