Documentation
¶
Overview ¶
API Actors for managing resource groups. These actors are the final API for end users to manage resource groups
Index ¶
- type ACL
- type AccessGrantRequest
- type AccessRevokeRequest
- type AffinityGroupComputesRequest
- type AffinityGroupsGetRequest
- type AffinityGroupsListRequest
- type AuditsRequest
- type CreateRequest
- type DeleteRequest
- type DisableRequest
- type DiskUsage
- type EnableRequest
- type GetRequest
- type GetResourceConsumptionRequest
- type ItemAffinityGroupCompute
- type ItemAudit
- type ItemBackend
- type ItemBinding
- type ItemCompute
- type ItemFrontend
- type ItemLB
- type ItemPFW
- type ItemRG
- type ItemResourceConsumption
- type ItemRule
- type ItemServer
- type ItemVINS
- type ListACL
- type ListAffinityGroup
- type ListAffinityGroupCompute
- type ListAudits
- type ListBackends
- type ListBindings
- type ListComputes
- type ListComputesRequest
- type ListDeletedRequest
- type ListFrontends
- type ListLB
- type ListLBRequest
- type ListPFW
- type ListPFWRequest
- type ListRG
- func (lrg ListRG) FilterByCreatedBy(createdBy string) ListRG
- func (lrg ListRG) FilterByDefNetID(defNetID int64) ListRG
- func (lrg ListRG) FilterByDefNetType(defNetType string) ListRG
- func (lrg ListRG) FilterByID(id uint64) ListRG
- func (lrg ListRG) FilterByLockStatus(lockStatus string) ListRG
- func (lrg ListRG) FilterByName(name string) ListRG
- func (lrg ListRG) FilterByStatus(status string) ListRG
- func (lrg ListRG) FilterFunc(predicate func(ItemRG) bool) ListRG
- func (lrg ListRG) FindOne() ItemRG
- func (lrg ListRG) Serialize(params ...string) (serialization.Serialized, error)
- func (lrg ListRG) SortByCreatedTime(inverse bool) ListRG
- func (lrg ListRG) SortByDeletedTime(inverse bool) ListRG
- func (lrg ListRG) SortByUpdatedTime(inverse bool) ListRG
- type ListRequest
- type ListResourceConsumption
- type ListRules
- type ListServers
- type ListVINS
- type ListVINSRequest
- type MassDeleteRequest
- type MassDisableRequest
- type MassEnableRequest
- type RG
- func (r RG) AccessGrant(ctx context.Context, req AccessGrantRequest) (bool, error)
- func (r RG) AccessRevoke(ctx context.Context, req AccessRevokeRequest) (bool, error)
- func (r RG) AffinityGroupComputes(ctx context.Context, req AffinityGroupComputesRequest) (ListAffinityGroupCompute, error)
- func (r RG) AffinityGroupsGet(ctx context.Context, req AffinityGroupsGetRequest) ([]uint64, error)
- func (r RG) AffinityGroupsList(ctx context.Context, req AffinityGroupsListRequest) (*ListAffinityGroup, error)
- func (r RG) Audits(ctx context.Context, req AuditsRequest) (ListAudits, error)
- func (r RG) Create(ctx context.Context, req CreateRequest) (uint64, error)
- func (r RG) Delete(ctx context.Context, req DeleteRequest) (bool, error)
- func (r RG) Disable(ctx context.Context, req DisableRequest) (bool, error)
- func (r RG) Enable(ctx context.Context, req EnableRequest) (bool, error)
- func (r RG) Get(ctx context.Context, req GetRequest) (*RecordRG, error)
- func (r RG) GetResourceConsumption(ctx context.Context, req GetResourceConsumptionRequest) (*ItemResourceConsumption, error)
- func (r RG) List(ctx context.Context, req ListRequest) (*ListRG, error)
- func (r RG) ListComputes(ctx context.Context, req ListComputesRequest) (*ListComputes, error)
- func (r RG) ListDeleted(ctx context.Context, req ListDeletedRequest) (*ListRG, error)
- func (r RG) ListLB(ctx context.Context, req ListLBRequest) (*ListLB, error)
- func (r RG) ListPFW(ctx context.Context, req ListPFWRequest) (*ListPFW, error)
- func (r RG) ListResourceConsumption(ctx context.Context) (*ListResourceConsumption, error)
- func (r RG) ListVINS(ctx context.Context, req ListVINSRequest) (*ListVINS, error)
- func (r RG) MassDelete(ctx context.Context, req MassDeleteRequest) (bool, error)
- func (r RG) MassDisable(ctx context.Context, req MassDisableRequest) (bool, error)
- func (r RG) MassEnable(ctx context.Context, req MassEnableRequest) (bool, error)
- func (r RG) Restore(ctx context.Context, req RestoreRequest) (bool, error)
- func (r RG) SetCPUAllocationParameter(ctx context.Context, req SetCPUAllocationParameterRequest) (bool, error)
- func (r RG) SetCPUAllocationRatio(ctx context.Context, req SetCPUAllocationRatioRequest) (bool, error)
- func (r RG) SetDefNet(ctx context.Context, req SetDefNetRequest) (uint64, error)
- func (r RG) Update(ctx context.Context, req UpdateRequest) (bool, error)
- func (r RG) UpdateResourceTypes(ctx context.Context, req UpdateResourceTypesRequest) (bool, error)
- func (r RG) Usage(ctx context.Context, req UsageRequest) (*Reservation, error)
- type RecordNode
- type RecordRG
- type Reservation
- type ResourceLimits
- type RestoreRequest
- type ServerSettings
- type SetCPUAllocationParameterRequest
- type SetCPUAllocationRatioRequest
- type SetDefNetRequest
- type UpdateRequest
- type UpdateResourceTypesRequest
- type UsageRequest
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ACL ¶
type ACL struct { // Explicit Explicit bool `json:"explicit"` // GUID GUID string `json:"guid"` // Right Right string `json:"right"` // Status Status string `json:"status"` // Type Type string `json:"type"` // User group ID UserGroupID string `json:"userGroupId"` }
Access Control List
type AccessGrantRequest ¶
type AccessGrantRequest struct { // Resource group ID // Required: true RGID uint64 `url:"rgId" json:"rgId" validate:"required"` // User or group name to grant access // Required: true User string `url:"user" json:"user" validate:"required"` // Access rights to set, // Should be one of: // - "R" // - "RCX" // - "ARCXDU" // Required: true Right string `url:"right" json:"right" validate:"accessType"` // Reason for action // Required: false Reason string `url:"reason,omitempty" json:"reason,omitempty"` }
Request struct for grant access to resource group
type AccessRevokeRequest ¶
type AccessRevokeRequest struct { // Resource group ID // Required: true RGID uint64 `url:"rgId" json:"rgId" validate:"required"` // User or group name to revoke access // Required: true User string `url:"user" json:"user" validate:"required"` // Reason for action // Required: false Reason string `url:"reason,omitempty" json:"reason,omitempty"` }
Request struct for revoke access
type AffinityGroupComputesRequest ¶
type AffinityGroupComputesRequest struct { // Resource group ID // Required: true RGID uint64 `url:"rgId" json:"rgId" validate:"required"` // Affinity group label // Required: true AffinityGroup string `url:"affinityGroup" json:"affinityGroup" validate:"required"` }
Request struct for get list of all computes with their relationships
type AffinityGroupsGetRequest ¶
type AffinityGroupsGetRequest struct { // Resource group ID // Required: true RGID uint64 `url:"rgId" json:"rgId" validate:"required"` // Label affinity group // Required: true AffinityGroup string `url:"affinityGroup" json:"affinityGroup" validate:"required"` }
Request struct for get list computes from affinity group
type AffinityGroupsListRequest ¶
type AffinityGroupsListRequest struct { // Resource group ID // Required: true RGID uint64 `url:"rgId" json:"rgId" validate:"required"` }
Request struct for get list of affinity groups from resource group
type AuditsRequest ¶
type AuditsRequest struct { // Resource group ID // Required: true RGID uint64 `url:"rgId" json:"rgId" validate:"required"` }
Request struct for get audit
type CreateRequest ¶
type CreateRequest struct { // Account, which will own this resource group // Required: true AccountID uint64 `url:"accountId" json:"accountId" validate:"required"` // Grid ID // Required: true GID uint64 `url:"gid" json:"gid" validate:"required"` // Name of this resource group. Must be unique within the account // Required: true Name string `url:"name" json:"name" validate:"required"` // Max size of memory in MB // Required: false MaxMemoryCapacity int64 `url:"maxMemoryCapacity,omitempty" json:"maxMemoryCapacity,omitempty"` // Max size of aggregated virtual disks in GB // Required: false MaxVDiskCapacity int64 `url:"maxVDiskCapacity,omitempty" json:"maxVDiskCapacity,omitempty"` // Max number of CPU cores // Required: false MaxCPUCapacity int64 `url:"maxCPUCapacity,omitempty" json:"maxCPUCapacity,omitempty"` // Max sent/received network transfer peering // Required: false MaxNetworkPeerTransfer int64 `url:"maxNetworkPeerTransfer,omitempty" json:"maxNetworkPeerTransfer,omitempty"` // Max number of assigned public IPs // Required: false MaxNumPublicIP int64 `url:"maxNumPublicIP,omitempty" json:"maxNumPublicIP,omitempty"` // Username - owner of this resource group. // Leave blank to set current user as owner // Required: false Owner string `url:"owner,omitempty" json:"owner,omitempty"` // Type of the default network for this resource group. // virtual machines created in this resource group will be by default connected to this network. // Should be one of: // - PRIVATE // - PUBLIC // - NONE // Required: false DefNet string `url:"def_net,omitempty" json:"def_net,omitempty" validate:"omitempty,rgDefNet"` // Private network IP CIDR if default network PRIVATE // Required: false IPCIDR string `url:"ipcidr,omitempty" json:"ipcidr,omitempty"` // Text description of this resource group // Required: false Description string `url:"desc,omitempty" json:"desc,omitempty"` // Reason for action // Required: false Reason string `url:"reason,omitempty" json:"reason,omitempty"` // External network ID // Required: false ExtNetID uint64 `url:"extNetId,omitempty" json:"extNetId,omitempty"` // External IP address // Required: false ExtIP string `url:"extIp,omitempty" json:"extIp,omitempty"` // Register computes in registration system // Required: false RegisterComputes bool `url:"registerComputes,omitempty" json:"registerComputes,omitempty"` // List of strings with pools i.e.: ["sep1_poolName1", "sep2_poolName2"] // Required: false UniqPools []string `url:"unuqPools,omitempty" json:"unuqPools,omitempty"` }
Request struct for create resource group
type DeleteRequest ¶
type DeleteRequest struct { // Resource group ID // Required: true RGID uint64 `url:"rgId" json:"rgId" validate:"required"` // Set to True if you want force delete non-empty resource group // Required: false Force bool `url:"force,omitempty" json:"force,omitempty"` // Set to True if you want to destroy resource group and all linked resources, if any, immediately. // Otherwise, they will be placed into recycle bin and could be restored later within recycle bin's purge period // Required: false Permanently bool `url:"permanently,omitempty" json:"permanently,omitempty"` // Reason for action // Required: false Reason string `url:"reason,omitempty" json:"reason,omitempty"` }
Request struct for delete resource group
type DisableRequest ¶
type DisableRequest struct { // Resource group ID // Required: true RGID uint64 `url:"rgId" json:"rgId" validate:"required"` // Reason for action // Required: false Reason string `url:"reason,omitempty" json:"reason,omitempty"` }
Request struct for disable resource group
type DiskUsage ¶
type DiskUsage struct { // Disk size DiskSize float64 `json:"disksize"` // Disk size max DiskSizeMax float64 `json:"disksizemax"` }
Disk usage
type EnableRequest ¶
type EnableRequest struct { // Resource group ID // Required: true RGID uint64 `url:"rgId" json:"rgId" validate:"required"` // Reason for action // Required: false Reason string `url:"reason,omitempty" json:"reason,omitempty"` }
Request struct for enable resource group
type GetRequest ¶
type GetRequest struct { // Resource group ID // Required: true RGID uint64 `url:"rgId" json:"rgId" validate:"required"` // Reason for action // Required: false Reason string `url:"reason,omitempty" json:"reason,omitempty"` }
Request struct for get detailed information about resource group
type GetResourceConsumptionRequest ¶ added in v1.5.0
type GetResourceConsumptionRequest struct { // Resource group ID // Required: true RGID uint64 `url:"rgId" json:"rgId" validate:"required"` }
Request struct for get detailed information about resource consumption for ResGroup
type ItemAffinityGroupCompute ¶
type ItemAffinityGroupCompute struct { // Compute ID ComputeID uint64 `json:"computeId"` // Other node OtherNode []uint64 `json:"otherNode"` // Other node indirect OtherNodeIndirect []uint64 `json:"otherNodeIndirect"` // Other node indirect soft OtherNodeIndirectSoft []uint64 `json:"otherNodeIndirectSoft"` // Other node soft OtherNodeSoft []uint64 `json:"otherNodeSoft"` // Same node SameNode []uint64 `json:"sameNode"` // Same node soft SameNodeSoft []uint64 `json:"sameNodeSoft"` }
Main information about affinity group
type ItemAudit ¶
type ItemAudit struct { // Call Call string `json:"call"` // Response time ResponseTime float64 `json:"responsetime"` // Status code StatusCode uint64 `json:"statuscode"` // Timestamp Timestamp float64 `json:"timestamp"` // User User string `json:"user"` }
Main information about audit
type ItemBackend ¶
type ItemBackend struct { // Algorithm Algorithm string `json:"algorithm"` // GUID GUID string `json:"guid"` // Name Name string `json:"name"` // Server settings ServerDefaultSettings ServerSettings `json:"serverDefaultSettings"` // List of servers Servers ListServers `json:"servers"` }
Main information about backend
type ItemBinding ¶
type ItemBinding struct { // Address Address string `json:"address"` // GUID GUID string `json:"guid"` // Name Name string `json:"name"` // Port Port uint64 `json:"port"` }
Main information of binding
type ItemCompute ¶
type ItemCompute struct { // Account ID AccountID uint64 `json:"accountId"` // Account name AccountName string `json:"accountName"` // Affinity label AffinityLabel string `json:"affinityLabel"` // List affinity rules AffinityRules ListRules `json:"affinityRules"` // Affinity weight AffinityWeight uint64 `json:"affinityWeight"` // Anti affinity rules AntiAffinityRules ListRules `json:"antiAffinityRules"` // Number of CPU CPUs uint64 `json:"cpus"` // Created by CreatedBy string `json:"createdBy"` // Created time CreatedTime uint64 `json:"createdTime"` // Deleted by DeletedBy string `json:"deletedBy"` // Deleted time DeletedTime uint64 `json:"deletedTime"` // ID ID uint64 `json:"id"` // Name Name string `json:"name"` // Number of RAM RAM uint64 `json:"ram"` // Registered Registered bool `json:"registered"` // Resource group ID RGID uint64 `json:"rgId"` // Resource group name RGName string `json:"rgName"` // Status Status string `json:"status"` // Tech status TechStatus string `json:"techStatus"` // Total disks size TotalDisksSize uint64 `json:"totalDisksSize"` // Updated by UpdatedBy string `json:"updatedBy"` // Updated time UpdatedTime uint64 `json:"updatedTime"` // User managed UserManaged bool `json:"userManaged"` // VINS connected VINSConnected uint64 `json:"vinsConnected"` }
Main information about compute
type ItemFrontend ¶
type ItemFrontend struct { // Backend Backend string `json:"backend"` // List of bindings Bindings ListBindings `json:"bindings"` // GUID GUID string `json:"guid"` // Name Name string `json:"name"` }
Main information about frontend
type ItemLB ¶
type ItemLB struct { // HAMode HAMode bool `json:"HAmode"` // List ACL ACL ListACL `json:"acl"` // List backends Backends ListBackends `json:"backends"` // Created by CreatedBy string `json:"createdBy"` // Created time CreatedTime uint64 `json:"createdTime"` // Deleted by DeletedBy string `json:"deletedBy"` // Deleted time DeletedTime uint64 `json:"deletedTime"` // Description Description string `json:"desc"` // DPAPI user DPAPIUser string `json:"dpApiUser"` // External network ID ExtNetID uint64 `json:"extnetId"` // List of frontends Frontends ListFrontends `json:"frontends"` // Grid ID GID uint64 `json:"gid"` // GUID GUID uint64 `json:"guid"` // ID ID uint64 `json:"id"` // Image ID ImageID uint64 `json:"imageId"` // Milestones Milestones uint64 `json:"milestones"` // Name Name string `json:"name"` // Primary node PrimaryNode RecordNode `json:"primaryNode"` // Resource group ID RGID uint64 `json:"rgId"` // Resource group name RGName string `json:"rgName"` // Secondary node SecondaryNode RecordNode `json:"secondaryNode"` // Status Status string `json:"status"` // Tech status TechStatus string `json:"techStatus"` // Updated by UpdatedBy string `json:"updatedBy"` // Updated time UpdatedTime uint64 `json:"updatedTime"` // VINS ID VINSID uint64 `json:"vinsId"` }
Main information about load balancer
type ItemPFW ¶
type ItemPFW struct { // Public port end PublicPortEnd uint64 `json:"Public Port End"` // Public port start PublicPortStart uint64 `json:"Public Port Start"` // Virtual machine ID VMID uint64 `json:"VM ID"` // Virtual machine IP VMIP string `json:"VM IP"` // Virtual machine name VMName string `json:"VM Name"` // Virtual machine port VMPort uint64 `json:"VM Port"` // VINS ID VINSID uint64 `json:"ViNS ID"` // VINS name VINSName string `json:"ViNS Name"` }
Main information about port forward
type ItemRG ¶
type ItemRG struct { // Account ID AccountID uint64 `json:"accountId"` // Account name AccountName string `json:"accountName"` // List ACL ACL ListACL `json:"acl"` // CPU allocation parameter CPUAllocationParameter string `json:"cpu_allocation_parameter"` // CPU allocation ratio CPUAllocationRatio float64 `json:"cpu_allocation_ratio"` // Created by CreatedBy string `json:"createdBy"` // Created time CreatedTime uint64 `json:"createdTime"` // DefNet ID DefNetID int64 `json:"def_net_id"` // DefNet type DefNetType string `json:"def_net_type"` // Deleted by DeletedBy string `json:"deletedBy"` // Deleted time DeletedTime uint64 `json:"deletedTime"` // Description Description string `json:"desc"` // Dirty Dirty bool `json:"dirty"` // Grid ID GID uint64 `json:"gid"` // GUID GUID uint64 `json:"guid"` // ID ID uint64 `json:"id"` // Lock status LockStatus string `json:"lockStatus"` // Milestones Milestones uint64 `json:"milestones"` // Name Name string `json:"name"` // Register computes RegisterComputes bool `json:"registerComputes"` // Resource limits ResourceLimits ResourceLimits `json:"resourceLimits"` // Resource types list ResTypes []string `json:"resourceTypes"` // Secret Secret string `json:"secret"` // Status Status string `json:"status"` // Uniq pools UniqPools []string `json:"uniqPools"` // Updated by UpdatedBy string `json:"updatedBy"` // Updated time UpdatedTime uint64 `json:"updatedTime"` // List VINS IDs VINS []uint64 `json:"vins"` // List virtual machine IDs VMs []uint64 `json:"vms"` }
Main information about resource group
func (ItemRG) Serialize ¶
func (irg ItemRG) Serialize(params ...string) (serialization.Serialized, error)
Serialize returns JSON-serialized []byte. Used as a wrapper over json.Marshal and json.MarshalIndent functions.
In order to serialize with indent make sure to follow these guidelines:
- First argument -> prefix
- Second argument -> indent
type ItemResourceConsumption ¶ added in v1.5.0
type ItemResourceConsumption struct { // Current information Consumed Reservation `json:"Consumed"` // Reserved information Reserved Reservation `json:"Reserved"` RGID uint64 `json:"rgid"` }
Resources usage information
type ItemRule ¶
type ItemRule struct { // GUID GUID string `json:"guid"` // Key Key string `json:"key"` // Mode Mode string `json:"mode"` // Policy Policy string `json:"policy"` // Topology Topology string `json:"topology"` // Value Value string `json:"value"` }
Main information about affinity rule
type ItemServer ¶
type ItemServer struct { // Address Address string `json:"address"` // Check Check string `json:"check"` // GUID GUID string `json:"guid"` // Name Name string `json:"name"` // Port Port uint64 `json:"port"` // Server settings ServerSettings ServerSettings `json:"serverSettings"` }
Main information about server
type ItemVINS ¶
type ItemVINS struct { // Account ID AccountID uint64 `json:"accountId"` // Account name AccountName string `json:"accountName"` // Computes Computes uint64 `json:"computes"` // Created by CreatedBy string `json:"createdBy"` // Created time CreatedTime uint64 `json:"createdTime"` // Deleted by DeletedBy string `json:"deletedBy"` // Deleted time DeletedTime uint64 `json:"deletedTime"` // External IP ExternalIP string `json:"externalIP"` // ID ID uint64 `json:"id"` // Name Name string `json:"name"` // Network Network string `json:"network"` // PriVNFDev ID PriVNFDevID uint64 `json:"priVnfDevId"` // Resource group ID RGID uint64 `json:"rgId"` // Resource group name RGName string `json:"rgName"` // Status Status string `json:"status"` // Updated by UpdatedBy string `json:"updatedBy"` // Updated time UpdatedTime uint64 `json:"updatedTime"` }
Main information about VINS
type ListAffinityGroup ¶ added in v1.5.0
type ListAffinityGroupCompute ¶
type ListAffinityGroupCompute []ItemAffinityGroupCompute
List of affinity groups
type ListComputes ¶
type ListComputes struct { // Data Data []ItemCompute `json:"data"` // Entry count EntryCount uint64 `json:"entryCount"` }
List computes
type ListComputesRequest ¶
type ListComputesRequest struct { // Resource group ID // Required: true RGID uint64 `url:"rgId" json:"rgId" validate:"required"` // Find by compute id // Required: false ComputeID uint64 `url:"computeId,omitempty" json:"computeId,omitempty"` // Find by name // Required: false Name string `url:"name,omitempty" json:"name,omitempty"` // ID an account // Required: false AccountID uint64 `url:"accountId,omitempty" json:"accountId,omitempty"` // Find by tech status // Required: false TechStatus string `url:"techStatus,omitempty" json:"techStatus,omitempty"` // Find by status // Required: false Status string `url:"status,omitempty" json:"status,omitempty"` // Find by ip address // Required: false IPAddress string `url:"ipAddress,omitempty" json:"ipAddress,omitempty"` // Find by external network name // Required: false ExtNetName string `url:"extNetName,omitempty" json:"extNetName,omitempty"` // Find by external network id // Required: false ExtNetID uint64 `url:"extNetId,omitempty" json:"extNetId,omitempty"` // Page number // Required: false Page uint64 `url:"page,omitempty" json:"page,omitempty"` // Page size // Required: false Size uint64 `url:"size,omitempty" json:"size,omitempty"` }
Request struct for get list of computes
type ListDeletedRequest ¶
type ListDeletedRequest struct { // Find by ID // Required: false ByID uint64 `url:"by_id,omitempty" json:"by_id,omitempty"` // Find by name // Required: false Name string `url:"name,omitempty" json:"name,omitempty"` // Find by account ID // Required: false AccountID uint64 `url:"accountId,omitempty" json:"accountId,omitempty"` // Find by name account // Required: false AccountName string `url:"accountName,omitempty" json:"accountName,omitempty"` // Find by created after time (unix timestamp) // Required: false CreatedAfter uint64 `url:"createdAfter,omitempty" json:"createdAfter,omitempty"` // Find by created before time (unix timestamp) // Required: false CreatedBefore uint64 `url:"createdBefore,omitempty" json:"createdBefore,omitempty"` // Find by status lock // Required: false LockStatus string `url:"lockStatus,omitempty" json:"lockStatus,omitempty"` // Page number // Required: false Page uint64 `url:"page,omitempty" json:"page,omitempty"` // Page size // Required: false Size uint64 `url:"size,omitempty" json:"size,omitempty"` }
Request struct for get list deleted resource groups
type ListLB ¶
type ListLB struct { // Data Data []ItemLB `json:"data"` // Entry count EntryCount uint64 `json:"entryCount"` }
List load balancers
type ListLBRequest ¶
type ListLBRequest struct { // Resource group ID // Required: true RGID uint64 `url:"rgId" json:"rgId" validate:"required"` // Find by ID // Required: false ByID uint64 `url:"by_id,omitempty" json:"by_id,omitempty"` // Find by name // Required: false Name string `url:"name,omitempty" json:"name,omitempty"` // Find by account ID // Required: false AccountID uint64 `url:"accountID,omitempty" json:"accountID,omitempty"` // Find by tech status // Required: false TechStatus string `url:"techStatus,omitempty" json:"techStatus,omitempty"` // Find by status // Required: false Status string `url:"status,omitempty" json:"status,omitempty"` // Find by frontend Ip // Required: false FrontIP string `url:"frontIp,omitempty" json:"frontIp,omitempty"` // Find by backend Ip // Required: false BackIP string `url:"backIp,omitempty" json:"backIp,omitempty"` // Page number // Required: false Page uint64 `url:"page,omitempty" json:"page,omitempty"` // Page size // Required: false Size uint64 `url:"size,omitempty" json:"size,omitempty"` }
Request struct for get list load balancers
type ListPFW ¶
type ListPFW struct { // Data Data []ItemPFW `json:"data"` // Entry count EntryCount uint64 `json:"entryCount"` }
List PFWs
type ListPFWRequest ¶
type ListPFWRequest struct { // Resource group ID // Required: true RGID uint64 `url:"rgId" json:"rgId" validate:"required"` }
Request struct for get list port forward rules
type ListRG ¶
type ListRG struct { // Data Data []ItemRG `json:"data"` // Entry count EntryCount uint64 `json:"entryCount"` }
List resource groups
func (ListRG) FilterByCreatedBy ¶
FilterByCreatedBy return ListRG created by specified user.
func (ListRG) FilterByDefNetID ¶
FilterByDefNetID returns ListRG with specified DefNetID.
func (ListRG) FilterByDefNetType ¶
FilterByDefNetType returns ListRG with specified DefNetType.
func (ListRG) FilterByID ¶
FilterByID returns ListRG with specified ID.
func (ListRG) FilterByLockStatus ¶
FilterByLockStatus return ListRG with specified LockStatus.
func (ListRG) FilterByName ¶
FilterByName returns ListRG with specified Name.
func (ListRG) FilterByStatus ¶
FilterByStatus returns ListRG with specified Status.
func (ListRG) FilterFunc ¶
FilterFunc allows filtering ListRG based on a user-specified predicate.
func (ListRG) FindOne ¶
FindOne returns first found ItemRG. If none was found, returns an empty struct.
func (ListRG) Serialize ¶
func (lrg ListRG) Serialize(params ...string) (serialization.Serialized, error)
Serialize returns JSON-serialized []byte. Used as a wrapper over json.Marshal and json.MarshalIndent functions.
In order to serialize with indent make sure to follow these guidelines:
- First argument -> prefix
- Second argument -> indent
func (ListRG) SortByCreatedTime ¶
SortByCreatedTime sorts ListRG by the CreatedTime field in ascending order.
If inverse param is set to true, the order is reversed.
func (ListRG) SortByDeletedTime ¶
SortByDeletedTime sorts ListRG by the DeletedTime field in ascending order.
If inverse param is set to true, the order is reversed.
func (ListRG) SortByUpdatedTime ¶
SortByUpdatedTime sorts ListRG by the UpdatedTime field in ascending order.
If inverse param is set to true, the order is reversed.
type ListRequest ¶
type ListRequest struct { // Find by ID // Required: false ByID uint64 `url:"by_id,omitempty" json:"by_id,omitempty"` // Find by name // Required: false Name string `url:"name,omitempty" json:"name,omitempty"` // Find by account ID // Required: false AccountID uint64 `url:"accountId,omitempty" json:"accountId,omitempty"` // Find by name account // Required: false AccountName string `url:"accountName,omitempty" json:"accountName,omitempty"` // Find by created after time (unix timestamp) // Required: false CreatedAfter uint64 `url:"createdAfter,omitempty" json:"createdAfter,omitempty"` // Find by created before time (unix timestamp) // Required: false CreatedBefore uint64 `url:"createdBefore,omitempty" json:"createdBefore,omitempty"` // Find by status // Required: false Status string `url:"status,omitempty" json:"status,omitempty"` // Included deleted resource groups // Required: false IncludeDeleted bool `url:"includedeleted,omitempty" json:"includedeleted,omitempty"` // Page number // Required: false Page uint64 `url:"page,omitempty" json:"page,omitempty"` // Page size // Required: false Size uint64 `url:"size,omitempty" json:"size,omitempty"` }
Request struct for get list of resource groups
type ListResourceConsumption ¶ added in v1.5.0
type ListResourceConsumption struct { // Data Data []ItemResourceConsumption `json:"data"` // Entry count EntryCount uint64 `json:"entryCount"` }
type ListVINS ¶
type ListVINS struct { // Data Data []ItemVINS `json:"data"` // Entry count EntryCount uint64 `json:"entryCount"` }
List VINSes
type ListVINSRequest ¶
type ListVINSRequest struct { // Resource group ID // Required: true RGID uint64 `url:"rgId" json:"rgId" validate:"required"` // Find by name // Required: false Name string `url:"name,omitempty" json:"name,omitempty"` // ID an account // Required: false AccountID uint64 `url:"accountId,omitempty" json:"accountId,omitempty"` // Find by ip extnet address // Required: false ExtIP string `url:"extIp,omitempty" json:"extIp,omitempty"` // Find by vins id // Required: false VINSID uint64 `url:"vinsId,omitempty" json:"vinsId,omitempty"` // Page number // Required: false Page uint64 `url:"page,omitempty" json:"page,omitempty"` // Page size // Required: false Size uint64 `url:"size,omitempty" json:"size,omitempty"` }
Request struct for get list VINSes
type MassDeleteRequest ¶
type MassDeleteRequest struct { // IDs of the resource groups // Required: true RGIDs []uint64 `url:"rgIds" json:"rgIds" validate:"min=1"` // Set to true if you want force delete non-empty resource groups // Required: false Force bool `url:"force,omitempty" json:"force,omitempty"` // Set to true if you want to destroy resource group and all linked // resources, if any, immediately. // Otherwise, they will be placed into recycle bin and could be // restored later within recycle bins purge period // Required: false Permanently bool `url:"permanently,omitempty" json:"permanently,omitempty"` // Reason for action // Required: false Reason string `url:"reason,omitempty" json:"reason,omitempty"` }
Request struct for delete several resource groups
type MassDisableRequest ¶
type MassDisableRequest struct { // IDs of the resource groups // Required: true RGIDs []uint64 `url:"rgIds" json:"rgIds" validate:"min=1"` // Reason for action // Required: false Reason string `url:"reason,omitempty" json:"reason,omitempty"` }
Request struct for disable several resource groups
type MassEnableRequest ¶
type MassEnableRequest struct { // IDs of the resource groups // Required: true RGIDs []uint64 `url:"rgIds" json:"rgIds" validate:"min=1"` // Reason for action // Required: false Reason string `url:"reason,omitempty" json:"reason,omitempty"` }
Request struct for enable several resource groups
type RG ¶
type RG struct {
// contains filtered or unexported fields
}
Structure for creating request to resource group
func (RG) AccessGrant ¶
AccessGrant grants user or group access to the resource group as specified
func (RG) AccessRevoke ¶
AccessRevoke revokes specified user or group access from the resource group
func (RG) AffinityGroupComputes ¶
func (r RG) AffinityGroupComputes(ctx context.Context, req AffinityGroupComputesRequest) (ListAffinityGroupCompute, error)
AffinityGroupComputes gets list of all computes with their relationships to another computes
func (RG) AffinityGroupsGet ¶
AffinityGroupsGet gets list computes in the specified affinity group
func (RG) AffinityGroupsList ¶
func (r RG) AffinityGroupsList(ctx context.Context, req AffinityGroupsListRequest) (*ListAffinityGroup, error)
AffinityGroupsList gets all currently defined affinity groups in this resource group with compute IDs
func (RG) Audits ¶
func (r RG) Audits(ctx context.Context, req AuditsRequest) (ListAudits, error)
Audits gets audit records for the specified resource group object
func (RG) GetResourceConsumption ¶ added in v1.5.0
func (r RG) GetResourceConsumption(ctx context.Context, req GetResourceConsumptionRequest) (*ItemResourceConsumption, error)
GetResourceConsumption gets resource consumption of the resource group
func (RG) ListComputes ¶
func (r RG) ListComputes(ctx context.Context, req ListComputesRequest) (*ListComputes, error)
ListComputes gets list of all compute instances under specified resource group, accessible by the user
func (RG) ListDeleted ¶
ListDeleted gets list all deleted resource groups the user has access to
func (RG) ListLB ¶
ListLB gets list all load balancers in the specified resource group, accessible by the user
func (RG) ListResourceConsumption ¶ added in v1.5.0
func (r RG) ListResourceConsumption(ctx context.Context) (*ListResourceConsumption, error)
ListResourceConsumption gets resource consumptions of the resource groups
func (RG) ListVINS ¶
ListVINS gets list all ViNSes under specified resource group, accessible by the user
func (RG) MassDelete ¶
MassDelete starts jobs to delete several resource groups
func (RG) MassDisable ¶
MassDisable start jobs to disable several resource groups
func (RG) MassEnable ¶
MassEnable start jobs to enable several resource groups
func (RG) SetCPUAllocationParameter ¶ added in v1.4.0
func (r RG) SetCPUAllocationParameter(ctx context.Context, req SetCPUAllocationParameterRequest) (bool, error)
SetCPUAllocationParameter sets CPU allocation parameter
func (RG) SetCPUAllocationRatio ¶ added in v1.4.0
func (r RG) SetCPUAllocationRatio(ctx context.Context, req SetCPUAllocationRatioRequest) (bool, error)
SetCPUAllocationRatio sets CPU allocation ratio
func (RG) UpdateResourceTypes ¶
func (RG) Usage ¶
func (r RG) Usage(ctx context.Context, req UsageRequest) (*Reservation, error)
Usage gets report resource usage on the resource group
type RecordNode ¶
type RecordNode struct { // Backend IP BackendIP string `json:"backendIp"` // Compute ID ComputeID uint64 `json:"computeId"` // Frontend IP FrontendIP string `json:"frontendIp"` // GUID GUID string `json:"guid"` // MGMT IP MGMTIP string `json:"mgmtIp"` // Network ID NetworkID uint64 `json:"networkId"` }
Main information about node
type RecordRG ¶
type RecordRG struct { // Main information about resource group ItemRG }
Detailed information about resource group
type Reservation ¶
type Reservation struct { // Number of CPU CPU int64 `json:"cpu"` // Disk size DiskSize float64 `json:"disksize"` // Max disk size DiskSizeMax float64 `json:"disksizemax"` // External IPs ExtIPs int64 `json:"extips"` // External traffic ExtTraffic int64 `json:"exttraffic"` // Number of GPU GPU int64 `json:"gpu"` // Number of RAM RAM int64 `json:"ram"` // SEPs SEPs map[string]map[string]DiskUsage `json:"seps"` }
Reservation information of usage
type ResourceLimits ¶
type ResourceLimits struct { // CUC CUC float64 `json:"CU_C"` // CUD CuD float64 `json:"CU_D"` // CUDM CUDM float64 `json:"CU_DM"` // CUI CUI float64 `json:"CU_I"` // CUM CUM float64 `json:"CU_M"` // CUNP CUNP float64 `json:"CU_NP"` // GPU units GPUUnits float64 `json:"gpu_units"` }
Resource limits
type RestoreRequest ¶
type RestoreRequest struct { // Resource group ID // Required: true RGID uint64 `url:"rgId" json:"rgId" validate:"required"` // Reason for action // Required: false Reason string `url:"reason,omitempty" json:"reason,omitempty"` }
Request struct for restore resource group
type ServerSettings ¶
type ServerSettings struct { // Inter Inter uint64 `json:"inter"` // GUID GUID string `json:"guid"` // Down inter DownInter uint64 `json:"downinter"` // Rise Rise uint64 `json:"rise"` // Fall Fall uint64 `json:"fall"` // Slow start SlowStart uint64 `json:"slowstart"` // Max connections MaxConn uint64 `json:"maxconn"` // Max queue MaxQueue uint64 `json:"maxqueue"` // Weight Weight uint64 `json:"weight"` }
Server settings
type SetCPUAllocationParameterRequest ¶ added in v1.4.0
type SetCPUAllocationParameterRequest struct { // Resource group ID // Required: true RGID uint64 `url:"rgId" json:"rgId" validate:"required"` // CPU allocation parameter. // If "strict" VM can't be run if not enough CPU resources. // "loose" allow running VM if not enough resources. // Required: true StrictLoose string `url:"strict_loose" json:"strict_loose" validate:"required,strict_loose"` }
Request for setting CPU allocation parameter
type SetCPUAllocationRatioRequest ¶ added in v1.4.0
type SetCPUAllocationRatioRequest struct { // Resource group ID // Required: true RGID uint64 `url:"rgId" json:"rgId" validate:"required"` // CPU allocation ratio, i.e. one pCPU = ratio*vCPU // Required: true Ratio float64 `url:"ratio" json:"ratio" validate:"required"` }
Request for setting CPU allocation ratio
type SetDefNetRequest ¶
type SetDefNetRequest struct { // Resource group ID // Required: true RGID uint64 `url:"rgId" json:"rgId" validate:"required"` // Network type // Should be one of: // - "PUBLIC" // - "PRIVATE" // Required: true NetType string `url:"netType" json:"netType" validate:"rgNetType"` // Network ID // Required: false NetID uint64 `url:"netId,omitempty" json:"netId,omitempty"` // Reason for action // Required: false Reason string `url:"reason,omitempty" json:"reason,omitempty"` }
Request struct for set default network
type UpdateRequest ¶
type UpdateRequest struct { // Resource group ID // Required: true RGID uint64 `url:"rgId" json:"rgId" validate:"required"` // New name // Required: false Name string `url:"name,omitempty" json:"name,omitempty"` // New description // Required: false Description string `url:"desc,omitempty" json:"desc,omitempty"` // Max size of memory in MB // Required: false MaxMemoryCapacity int64 `url:"maxMemoryCapacity,omitempty" json:"maxMemoryCapacity,omitempty"` // Max size of aggregated virtual disks in GB // Required: false MaxVDiskCapacity int64 `url:"maxVDiskCapacity,omitempty" json:"maxVDiskCapacity,omitempty"` // Max number of CPU cores // Required: false MaxCPUCapacity int64 `url:"maxCPUCapacity,omitempty" json:"maxCPUCapacity,omitempty"` // Max sent/received network transfer peering // Required: false MaxNetworkPeerTransfer int64 `url:"maxNetworkPeerTransfer,omitempty" json:"maxNetworkPeerTransfer,omitempty"` // Max number of assigned public IPs // Required: false MaxNumPublicIP int64 `url:"maxNumPublicIP,omitempty" json:"maxNumPublicIP,omitempty"` // Register computes in registration system // Required: false RegisterComputes bool `url:"registerComputes,omitempty" json:"registerComputes,omitempty"` // Reason for action // Required: false Reason string `url:"reason,omitempty" json:"reason,omitempty"` // List of strings with pools i.e.: ["sep1_poolName1", "sep2_poolName2", etc] // Required: false UniqPools []string `url:"uniqPools,omitempty" json:"uniqPools,omitempty"` }
Request struct for update resource group
type UpdateResourceTypesRequest ¶
type UpdateResourceTypesRequest struct { // ID of resource group // Required: true RGID uint64 `url:"rgId" json:"rgId" validate:"required"` // Resource types available to create in this resource group // Each element in a resource type slice must be one of: // - compute // - vins // - k8s // - openshift // - lb // - flipgroup // Required: true ResTypes []string `url:"resourceTypes" json:"resourceTypes" validate:"min=1,resTypes"` }
Request struct for update resource types in account
type UsageRequest ¶
type UsageRequest struct { // Resource group ID // Required: true RGID uint64 `url:"rgId" json:"rgId" validate:"required"` // Reason for action // Required: false Reason string `url:"reason,omitempty" json:"reason,omitempty"` }
Request struct for get report of resource usage
Source Files
¶
- access_grant.go
- access_revoke.go
- affinity_group_computes.go
- affinity_groups_get.go
- affinity_groups_list.go
- audits.go
- create.go
- delete.go
- disable.go
- enable.go
- filter.go
- get.go
- get_resource_consumption.go
- list.go
- list_computes.go
- list_deleted.go
- list_lb.go
- list_pfw.go
- list_resource_consumption.go
- list_vins.go
- mass_delete.go
- mass_disable.go
- mass_enable.go
- models.go
- restore.go
- rg.go
- serialize.go
- set_cpu_allocation_parameter.go
- set_cpu_allocation_ratio.go
- set_def_net.go
- sorting.go
- update.go
- update_resource_types.go
- usage.go