This commit is contained in:
stSolo
2022-12-22 17:56:47 +03:00
parent 8712561853
commit d4b1ab7133
672 changed files with 28509 additions and 4419 deletions

View File

@@ -1,229 +1,547 @@
package account
type AccountACLRecord struct {
IsExplicit bool `json:"explicit"`
GUID string `json:"guid"`
Rights string `json:"right"`
Status string `json:"status"`
Type string `json:"type"`
UgroupID string `json:"userGroupId"`
CanBeDeleted bool `json:"canBeDeleted"`
// Access Control List
type RecordACL struct {
// Whether access is explicitly specified
IsExplicit bool `json:"explicit"`
// GUID
GUID string `json:"guid"`
// Access rights
Rights string `json:"right"`
// Status
Status string `json:"status"`
// Account Type
Type string `json:"type"`
// Account owner ID
UgroupID string `json:"userGroupId"`
// Is it possible to remove
CanBeDeleted bool `json:"canBeDeleted"`
}
// Resource limits
type ResourceLimits struct {
CUC float64 `json:"CU_C"`
CUD float64 `json:"CU_D"`
CUI float64 `json:"CU_I"`
CUM float64 `json:"CU_M"`
CUNP float64 `json:"CU_NP"`
// Number of cores
CUC float64 `json:"CU_C"`
// Disk size, GB
CUD float64 `json:"CU_D"`
// Number of public IP addresses
CUI float64 `json:"CU_I"`
// RAM size, MB
CUM float64 `json:"CU_M"`
// Traffic volume, GB
CUNP float64 `json:"CU_NP"`
// Number of graphics cores
GPUUnits float64 `json:"gpu_units"`
}
type AccountRecord struct {
DCLocation string `json:"DCLocation"`
CKey string `jspn:"_ckey"`
Meta []interface{} `json:"_meta"`
ACL []AccountACLRecord `json:"acl"`
Company string `json:"company"`
CompanyURL string `json:"companyurl"`
CreatedBy string `jspn:"createdBy"`
CreatedTime uint64 `json:"createdTime"`
DeactiovationTime float64 `json:"deactivationTime"`
DeletedBy string `json:"deletedBy"`
DeletedTime uint64 `json:"deletedTime"`
DisplayName string `json:"displayname"`
GUID uint64 `json:"guid"`
ID uint64 `json:"id"`
Name string `json:"name"`
ResourceLimits ResourceLimits `json:"resourceLimits"`
SendAccessEmails bool `json:"sendAccessEmails"`
ServiceAccount bool `json:"serviceAccount"`
Status string `json:"status"`
UpdatedTime uint64 `json:"updatedTime"`
Version uint64 `json:"version"`
VINS []uint64 `json:"vins"`
// Main information of account
type InfoAccount struct {
// Segment
DCLocation string `json:"DCLocation"`
// Key
CKey string `jspn:"_ckey"`
// Meta
Meta []interface{} `json:"_meta"`
// Access Control List
ACL []RecordACL `json:"acl"`
// Company
Company string `json:"company"`
// Company URL
CompanyURL string `json:"companyurl"`
// Created by
CreatedBy string `jspn:"createdBy"`
// Created time
CreatedTime uint64 `json:"createdTime"`
// Deactiovation time
DeactiovationTime float64 `json:"deactivationTime"`
// Deleted by
DeletedBy string `json:"deletedBy"`
// Deleted time
DeletedTime uint64 `json:"deletedTime"`
// Display name
DisplayName string `json:"displayname"`
// GUID
GUID uint64 `json:"guid"`
// ID
ID uint64 `json:"id"`
// Name
Name string `json:"name"`
// Resource Limits
ResourceLimits ResourceLimits `json:"resourceLimits"`
// If true send emails when a user is granted access to resources
SendAccessEmails bool `json:"sendAccessEmails"`
// Service Account
ServiceAccount bool `json:"serviceAccount"`
// Status
Status string `json:"status"`
// Updated time
UpdatedTime uint64 `json:"updatedTime"`
// Version
Version uint64 `json:"version"`
// List VINS in account
VINS []uint64 `json:"vins"`
}
type AccountList []AccountRecord
// Main information in one of if the list of accounts
type ItemAccount struct {
// Access Control List
ACL []RecordACL `json:"acl"`
type AccountCloudApi struct {
ACL []AccountACLRecord `json:"acl"`
CreatedTime uint64 `json:"createdTime"`
DeletedTime uint64 `json:"deletedTime"`
ID uint64 `json:"id"`
Name string `json:"name"`
Status string `json:"status"`
UpdatedTime uint64 `json:"updatedTime"`
// Created time
CreatedTime uint64 `json:"createdTime"`
// Deleted time
DeletedTime uint64 `json:"deletedTime"`
// ID
ID uint64 `json:"id"`
// Name
Name string `json:"name"`
// Status
Status string `json:"status"`
// Updated time
UpdatedTime uint64 `json:"updatedTime"`
}
type AccountCloudApiList []AccountCloudApi
// List of accounts
type ListAccounts []ItemAccount
// Resources used
type Resource struct {
CPU int64 `json:"cpu"`
DiskSize int64 `json:"disksize"`
ExtIPs int64 `json:"extips"`
// Number of cores
CPU int64 `json:"cpu"`
// Disk size
DiskSize int64 `json:"disksize"`
// Number of External IPs
ExtIPs int64 `json:"extips"`
// External traffic
ExtTraffic int64 `json:"exttraffic"`
GPU int64 `json:"gpu"`
RAM int64 `json:"ram"`
// Number of grafic cores
GPU int64 `json:"gpu"`
// Number of RAM
RAM int64 `json:"ram"`
}
// Information about resources
type Resources struct {
Current Resource `json:"Current"`
// Current information about resources
Current Resource `json:"Current"`
// Reserved information about resources
Reserved Resource `json:"Reserved"`
}
// Information about computes
type Computes struct {
// Number of started computes
Started uint64 `json:"started"`
// Number of stopped computes
Stopped uint64 `json:"stopped"`
}
// Information about machines
type Machines struct {
// Number of running machines
Running uint64 `json:"running"`
Halted uint64 `json:"halted"`
// Number of halted machines
Halted uint64 `json:"halted"`
}
type AccountWithResources struct {
Account
// Сomplete information about account
type RecordAccount struct {
// Main information about account
InfoAccount
// Resources
Resources Resources `json:"Resources"`
Computes Computes `json:"computes"`
Machines Machines `json:"machines"`
VINSes uint64 `json:"vinses"`
// Computes
Computes Computes `json:"computes"`
// Machines
Machines Machines `json:"machines"`
// Number of VINSes
VINSes uint64 `json:"vinses"`
}
type AccountCompute struct {
AccountID uint64 `json:"accountId"`
AccountName string `json:"accountName"`
CPUs uint64 `json:"cpus"`
CreatedBy string `json:"createdBy"`
CreatedTime uint64 `json:"createdTime"`
DeletedBy string `json:"deletedBy"`
DeletedTime uint64 `json:"deletedTime"`
ComputeID uint64 `json:"id"`
ComputeName string `json:"name"`
RAM uint64 `json:"ram"`
Registered bool `json:"registered"`
RGID uint64 `json:"rgId"`
RGName string `json:"rgName"`
Status string `json:"status"`
TechStatus string `json:"techStatus"`
TotalDisksSize uint64 `json:"totalDisksSize"`
UpdatedBy string `json:"updatedBy"`
UpdatedTime uint64 `json:"updatedTime"`
UserManaged bool `json:"userManaged"`
VINSConnected uint64 `json:"vinsConnected"`
}
// Main information about compute
type ItemCompute struct {
// ID an account
AccountID uint64 `json:"accountId"`
type AccountComputesList []AccountCompute
type AccountDisk struct {
ID uint64 `json:"id"`
Name string `json:"name"`
Pool string `json:"pool"`
SepID uint64 `json:"sepId"`
SizeMax uint64 `json:"sizeMax"`
Type string `json:"type"`
}
type AccountDisksList []AccountDisk
type AccountVIN struct {
AccountID uint64 `json:"accountId"`
// Account name
AccountName string `json:"accountName"`
Computes uint64 `json:"computes"`
CreatedBy string `json:"createdBy"`
// Number of CPU
CPUs uint64 `json:"cpus"`
// Created by
CreatedBy string `json:"createdBy"`
// Created time
CreatedTime uint64 `json:"createdTime"`
DeletedBy string `json:"deletedBy"`
// Deleted by
DeletedBy string `json:"deletedBy"`
// Deleted time
DeletedTime uint64 `json:"deletedTime"`
ExternalIP string `json:"externalIP"`
ID uint64 `json:"id"`
Name string `json:"name"`
Network string `json:"network"`
PriVnfDevID uint64 `json:"priVnfDevId"`
RGID uint64 `json:"rgId"`
RGName string `json:"rgName"`
Status string `json:"status"`
UpdatedBy string `json:"updatedBy"`
// ID compute
ComputeID uint64 `json:"id"`
// Compute name
ComputeName string `json:"name"`
// Number of RAM
RAM uint64 `json:"ram"`
// Registered or not
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 controlled or not
UserManaged bool `json:"userManaged"`
// Number of connected VINS
VINSConnected uint64 `json:"vinsConnected"`
}
// List of computes
type ListComputes []ItemCompute
// Main information about disk
type ItemDisk struct {
// ID
ID uint64 `json:"id"`
// Name
Name string `json:"name"`
// Pool
Pool string `json:"pool"`
// ID SEP
SEPID uint64 `json:"sepId"`
// Max size
SizeMax uint64 `json:"sizeMax"`
// Disk type
Type string `json:"type"`
}
// List of disks
type ListDisks []ItemDisk
// Main information about VINS
type ItemVINS struct {
// Account ID
AccountID uint64 `json:"accountId"`
// Name of account
AccountName string `json:"accountName"`
// Number of 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"`
// NNFDev 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"`
}
type AccountVINSList []AccountVIN
// List of VINS
type ListVINS []ItemVINS
type AccountAudit struct {
Call string `json:"call"`
// Main info about audit
type ItemAudit struct {
// Call
Call string `json:"call"`
// Response time
ResponseTime float64 `json:"responsetime"`
StatusCode uint64 `json:"statuscode"`
Timestamp float64 `json:"timestamp"`
User string `json:"user"`
// Status code
StatusCode uint64 `json:"statuscode"`
// Timestamp
Timestamp float64 `json:"timestamp"`
// User
User string `json:"user"`
}
type AccountAuditsList []AccountAudit
// List of audits
type ListAudits []ItemAudit
type AccountRGComputes struct {
Started uint64 `json:"Started"`
Stopped uint64 `json:"Stopped"`
// Information compute in resource group
type RGComputes struct {
// Number of started computes
Started uint64 `json:"started"`
// Number of stopped computes
Stopped uint64 `json:"stopped"`
}
type AccountRGResources struct {
// Resources of Resource group
type RGResources struct {
// Consumed
Consumed Resource `json:"Consumed"`
Limits Resource `json:"Limits"`
// Limits
Limits Resource `json:"Limits"`
// Reserved
Reserved Resource `json:"Reserved"`
}
type AccountRG struct {
Computes AccountRGComputes `json:"Computes"`
Resources AccountRGResources `json:"Resources"`
CreatedBy string `json:"createdBy"`
CreatedTime uint64 `json:"createdTime"`
DeletedBy string `json:"deletedBy"`
DeletedTime uint64 `json:"deletedTime"`
RGID uint64 `json:"id"`
Milestones uint64 `json:"milestones"`
RGName string `json:"name"`
Status string `json:"status"`
UpdatedBy string `json:"updatedBy"`
UpdatedTime uint64 `json:"updatedTime"`
VINSes uint64 `json:"vinses"`
}
// Main information about resource group
type ItemRG struct {
// Computes
Computes RGComputes `json:"Computes"`
type AccountRGList []AccountRG
// Resources
Resources RGResources `json:"Resources"`
type AccountTemplate struct {
UNCPath string `json:"UNCPath"`
AccountID uint64 `json:"accountId"`
Description string `json:"desc"`
ID uint64 `json:"id"`
Name string `json:"name"`
Public bool `json:"public"`
Size uint64 `json:"size"`
Status string `json:"status"`
Type string `json:"type"`
Username string `json:"username"`
}
// Created by
CreatedBy string `json:"createdBy"`
type AccountTemplatesList []AccountTemplate
type AccountFlipGroup struct {
AccountID uint64 `json:"accountId"`
ClientType string `json:"clientType"`
ConnType string `json:"connType"`
CreatedBy string `json:"createdBy"`
// Created time
CreatedTime uint64 `json:"createdTime"`
DefaultGW string `json:"defaultGW"`
DeletedBy string `json:"deletedBy"`
// Deleted by
DeletedBy string `json:"deletedBy"`
// Deleted time
DeletedTime uint64 `json:"deletedTime"`
// Resource group ID
RGID uint64 `json:"id"`
// Milestones
Milestones uint64 `json:"milestones"`
// Resource group name
RGName string `json:"name"`
// Status
Status string `json:"status"`
// Updated by
UpdatedBy string `json:"updatedBy"`
// Updated time
UpdatedTime uint64 `json:"updatedTime"`
// Number of VINS
VINSes uint64 `json:"vinses"`
}
// List of Resource groups
type ListRG []ItemRG
// Main information about template
type ItemTemplate struct {
// UNCPath
UNCPath string `json:"UNCPath"`
// Account ID
AccountID uint64 `json:"accountId"`
// Description
Description string `json:"desc"`
GID uint64 `json:"gid"`
GUID uint64 `json:"guid"`
ID uint64 `json:"id"`
IP string `json:"ip"`
Milestones uint64 `json:"milestones"`
Name string `json:"name"`
NetID uint64 `json:"netId"`
NetType string `json:"netType"`
NetMask uint64 `json:"netmask"`
Status string `json:"status"`
UpdatedBy string `json:"updatedBy"`
// ID
ID uint64 `json:"id"`
// Name
Name string `json:"name"`
// Public or not
Public bool `json:"public"`
// Size
Size uint64 `json:"size"`
// Status
Status string `json:"status"`
// Type
Type string `json:"type"`
// Username
Username string `json:"username"`
}
// List of templates
type ListTemplates []ItemTemplate
// Main information about FLIPGroup
type ItemFLIPGroup struct {
// Account ID
AccountID uint64 `json:"accountId"`
// Client type
ClientType string `json:"clientType"`
// Connection type
ConnType string `json:"connType"`
// Created by
CreatedBy string `json:"createdBy"`
// Created time
CreatedTime uint64 `json:"createdTime"`
// Default GW
DefaultGW string `json:"defaultGW"`
// 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"`
// IP
IP string `json:"ip"`
// Milestones
Milestones uint64 `json:"milestones"`
// Name
Name string `json:"name"`
// Network ID
NetID uint64 `json:"netId"`
// Network type
NetType string `json:"netType"`
// Network mask
NetMask uint64 `json:"netmask"`
// Status
Status string `json:"status"`
// Updated by
UpdatedBy string `json:"updatedBy"`
// Updated time
UpdatedTime uint64 `json:"updatedTime"`
}
type AccountFlipGroupsList []AccountFlipGroup
// List of FLIPGroups
type ListFLIPGroups []ItemFLIPGroup