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 ItemAffinityGroupCompute
- type ItemAudit
- type ItemBackend
- type ItemBinding
- type ItemCompute
- type ItemFrontend
- type ItemLB
- type ItemPFW
- type ItemRG
- type ItemRule
- type ItemServer
- type ItemVINS
- type ListACL
- 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
- type ListRequest
- 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) (map[string][]uint64, 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) 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) 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) 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 Resources
- type RestoreRequest
- type ServerSettings
- 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"`
// User or group name to grant access
// Required: true
User string `url:"user" json:"user"`
// Access rights to set,
// Should be one of:
// - "R"
// - "RCX"
// - "ARCXDU"
// Required: true
Right string `url:"right" json:"right"`
// 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"`
// User or group name to revoke access
// Required: true
User string `url:"user" json:"user"`
// 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"`
// Affinity group label
// Required: true
AffinityGroup string `url:"affinityGroup" json:"affinityGroup"`
}
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"`
// Label affinity group
// Required: true
AffinityGroup string `url:"affinityGroup" json:"affinityGroup"`
}
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"`
}
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"`
}
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"`
// Grid ID
// Required: true
GID uint64 `url:"gid" json:"gid"`
// Name of this resource group. Must be unique within the account
// Required: true
Name string `url:"name" json:"name"`
// 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"`
// 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"`
// 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"`
// Reason for action
// Required: false
Reason string `url:"reason,omitempty" json:"reason,omitempty"`
}
Request struct for disable resource group
type DiskUsage ¶ added in v1.1.0
type DiskUsage struct {
// Disk size
DiskSize float64 `json:"disksize"`
// Disk size max
DiskSizeMax uint64 `json:"disksizemax"`
}
Disk usage
type EnableRequest ¶
type EnableRequest struct {
// Resource group ID
// Required: true
RGID uint64 `url:"rgId" json:"rgId"`
// 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"`
// Reason for action
// Required: false
Reason string `url:"reason,omitempty" json:"reason,omitempty"`
}
Request struct for get detailed information about resource group
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"`
// Created by
CreatedBy string `json:"createdBy"`
// Created time
CreatedTime uint64 `json:"createdTime"`
// DefNet ID
DefNetID uint64 `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"`
// 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"`
// Secret
Secret string `json:"secret"`
// Status
Status string `json:"status"`
// 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"`
// Resource types list
ResTypes []string `json:"resourceTypes"`
// Uniq pools
UniqPools []string `json:"uniqPools"`
}
Main information about resource group
type ItemRule ¶ added in v1.1.0
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 ListAffinityGroupCompute ¶
type ListAffinityGroupCompute []ItemAffinityGroupCompute
List of affinity groups
type ListComputesRequest ¶
type ListComputesRequest struct {
// Resource group ID
// Required: true
RGID uint64 `url:"rgId" json:"rgId"`
// Reason for action
// Required: false
Reason string `url:"reason,omitempty" json:"reason,omitempty"`
}
Request struct for get list of computes
type ListDeletedRequest ¶
type ListDeletedRequest struct {
// 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 ListLBRequest ¶
type ListLBRequest struct {
// Resource group ID
// Required: true
RGID uint64 `url:"rgId" json:"rgId"`
}
Request struct for get list load balancers
type ListPFWRequest ¶
type ListPFWRequest struct {
// Resource group ID
// Required: true
RGID uint64 `url:"rgId" json:"rgId"`
}
Request struct for get list port forward rules
type ListRequest ¶
type ListRequest struct {
// 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 ListVINSRequest ¶
type ListVINSRequest struct {
// Resource group ID
// Required: true
RGID uint64 `url:"rgId" json:"rgId"`
// Reason for action
// Required: false
Reason string `url:"reason,omitempty" json:"reason,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"`
// 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"`
// 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"`
// 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) (map[string][]uint64, 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) 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) 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) UpdateResourceTypes ¶ added in v1.1.0
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 {
// Resource information
Resources Resources `json:"Resources"`
// 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 uint64 `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"`
// 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 Resources ¶
type Resources struct {
// Current information
Current Reservation `json:"Current"`
// Reserved information
Reserved Reservation `json:"Reserved"`
}
Resources usage information
type RestoreRequest ¶
type RestoreRequest struct {
// Resource group ID
// Required: true
RGID uint64 `url:"rgId" json:"rgId"`
// 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 SetDefNetRequest ¶
type SetDefNetRequest struct {
// Resource group ID
// Required: true
RGID uint64 `url:"rgId" json:"rgId"`
// Network type
// Should be one of:
// - "PUBLIC"
// - "PRIVATE"
// Required: true
NetType string `url:"netType" json:"netType"`
// Network ID
// Required: false
NetID uint64 `url:"netId" json:"netId"`
// 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"`
// 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 uint64 `url:"maxMemoryCapacity,omitempty" json:"maxMemoryCapacity,omitempty"`
// Max size of aggregated virtual disks in GB
// Required: false
MaxVDiskCapacity uint64 `url:"maxVDiskCapacity,omitempty" json:"maxVDiskCapacity,omitempty"`
// Max number of CPU cores
// Required: false
MaxCPUCapacity uint64 `url:"maxCPUCapacity,omitempty" json:"maxCPUCapacity,omitempty"`
// Max sent/received network transfer peering
// Required: false
MaxNetworkPeerTransfer uint64 `url:"maxNetworkPeerTransfer,omitempty" json:"maxNetworkPeerTransfer,omitempty"`
// Max number of assigned public IPs
// Required: false
MaxNumPublicIP uint64 `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 ¶ added in v1.1.0
type UpdateResourceTypesRequest struct {
// ID of resource group
// Required: true
RGID uint64 `url:"rgId" json:"rgId"`
// 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"`
}
Request struct for update resource types in account
type UsageRequest ¶
type UsageRequest struct {
// Resource group ID
// Required: true
RGID uint64 `url:"rgId" json:"rgId"`
// 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
- get.go
- list.go
- list_computes.go
- list_deleted.go
- list_lb.go
- list_pfw.go
- list_vins.go
- mass_delete.go
- mass_disable.go
- mass_enable.go
- models.go
- restore.go
- rg.go
- set_def_net.go
- update.go
- update_resource_types.go
- usage.go