Documentation
¶
Overview ¶
API Actor for managing VINS. This actor is a final API for endusers to manage VINS
Index ¶
- type AuditsRequest
- type Computes
- type Config
- type CreateInAccountRequest
- type CreateInRGRequest
- type DNSApplyRequest
- type DefaultQOSUpdateRequest
- type DeleteRequest
- type Devices
- type DisableRequest
- type EnableRequest
- type ExtNetConnectRequest
- type ExtNetDisconnectRequest
- type ExtNetListRequest
- type GWConfig
- type GetRequest
- type IPListRequest
- type IPReleaseRequest
- type IPReserveRequest
- type InfoVNF
- type ItemAudit
- type ItemExtNet
- type ItemIP
- type ItemInterface
- type ItemNATRule
- type ItemReservation
- type ItemRoutes
- type ItemVINS
- type ItemVNFs
- type LibvirtSettings
- type ListAudits
- type ListDeletedRequest
- type ListExtNets
- type ListIPs
- type ListInterfaces
- type ListNATRule
- type ListNATRules
- type ListRequest
- type ListReservations
- type ListRoutes
- type ListStaticRoutes
- type ListVINS
- func (lv ListVINS) FilterByAccountID(accountID uint64) ListVINS
- func (lv ListVINS) FilterByCreatedBy(createdBy string) ListVINS
- func (lv ListVINS) FilterByDeletedBy(deletedBy string) ListVINS
- func (lv ListVINS) FilterByID(id uint64) ListVINS
- func (lv ListVINS) FilterByName(name string) ListVINS
- func (lv ListVINS) FilterByUpdatedBy(updatedBy string) ListVINS
- func (lv ListVINS) FilterFunc(predicate func(ItemVINS) bool) ListVINS
- func (lv ListVINS) FindOne() ItemVINS
- func (lv ListVINS) IDs() []uint64
- func (lv ListVINS) Serialize(params ...string) (serialization.Serialized, error)
- func (lv ListVINS) SortByCreatedTime(inverse bool) ListVINS
- func (lv ListVINS) SortByDeletedTime(inverse bool) ListVINS
- func (lv ListVINS) SortByUpdatedTime(inverse bool) ListVINS
- type MGMT
- type MassDeleteRequest
- type MassDisableRequest
- type MassEnableRequest
- type NATConfig
- type NATRuleAddRequest
- type NATRuleDelRequest
- type NATRuleListRequest
- type NetQOSRequest
- type Primary
- type QOS
- type RecordDHCP
- type RecordGW
- type RecordNAT
- type RecordVINS
- type RecordVNFs
- type Resources
- type RestoreRequest
- type Route
- type SearchRequest
- type SearchVINS
- type StaticRouteAccessGrantRequest
- type StaticRouteAccessRevokeRequest
- type StaticRouteAddRequest
- type StaticRouteDelRequest
- type StaticRouteListRequest
- type VINS
- func (v VINS) Audits(ctx context.Context, req AuditsRequest) (ListAudits, error)
- func (v VINS) CreateInAccount(ctx context.Context, req CreateInAccountRequest) (uint64, error)
- func (v VINS) CreateInRG(ctx context.Context, req CreateInRGRequest) (uint64, error)
- func (v VINS) DNSApply(ctx context.Context, req DNSApplyRequest) (bool, error)
- func (v VINS) DefaultQOSUpdate(ctx context.Context, req DefaultQOSUpdateRequest) (bool, error)
- func (v VINS) Delete(ctx context.Context, req DeleteRequest) (bool, error)
- func (v VINS) Disable(ctx context.Context, req DisableRequest) (bool, error)
- func (v VINS) Enable(ctx context.Context, req EnableRequest) (bool, error)
- func (v VINS) ExtNetConnect(ctx context.Context, req ExtNetConnectRequest) (bool, error)
- func (v VINS) ExtNetDisconnect(ctx context.Context, req ExtNetDisconnectRequest) (bool, error)
- func (v VINS) ExtNetList(ctx context.Context, req ExtNetListRequest) (*ListExtNets, error)
- func (v VINS) Get(ctx context.Context, req GetRequest) (*RecordVINS, error)
- func (v VINS) GetRaw(ctx context.Context, req GetRequest) ([]byte, error)
- func (v VINS) IPList(ctx context.Context, req IPListRequest) (*ListIPs, error)
- func (v VINS) IPRelease(ctx context.Context, req IPReleaseRequest) (bool, error)
- func (v VINS) IPReserve(ctx context.Context, req IPReserveRequest) (string, error)
- func (v VINS) List(ctx context.Context, req ListRequest) (*ListVINS, error)
- func (v VINS) ListDeleted(ctx context.Context, req ListDeletedRequest) (*ListVINS, error)
- func (v VINS) ListRaw(ctx context.Context, req ListRequest) ([]byte, error)
- func (v VINS) MassDelete(ctx context.Context, req MassDeleteRequest) (bool, error)
- func (v VINS) MassDisable(ctx context.Context, req MassDisableRequest) (bool, error)
- func (v VINS) MassEnable(ctx context.Context, req MassEnableRequest) (bool, error)
- func (v VINS) NATRuleAdd(ctx context.Context, req NATRuleAddRequest) (uint64, error)
- func (v VINS) NATRuleDel(ctx context.Context, req NATRuleDelRequest) (bool, error)
- func (v VINS) NATRuleList(ctx context.Context, req NATRuleListRequest) (*ListNATRules, error)
- func (v VINS) NetQOS(ctx context.Context, req NetQOSRequest) (bool, error)
- func (v VINS) RaiseDown(ctx context.Context) (bool, error)
- func (v VINS) Restore(ctx context.Context, req RestoreRequest) (bool, error)
- func (v VINS) Search(ctx context.Context, req SearchRequest) (SearchVINS, error)
- func (v VINS) StaticRouteAccessGrant(ctx context.Context, req StaticRouteAccessGrantRequest) (bool, error)
- func (v VINS) StaticRouteAccessRevoke(ctx context.Context, req StaticRouteAccessRevokeRequest) (bool, error)
- func (v VINS) StaticRouteAdd(ctx context.Context, req StaticRouteAddRequest) (bool, error)
- func (v VINS) StaticRouteDel(ctx context.Context, req StaticRouteDelRequest) (bool, error)
- func (v VINS) StaticRouteList(ctx context.Context, req StaticRouteListRequest) (*ListStaticRoutes, error)
- func (v VINS) VNFDevRedeploy(ctx context.Context, req VNFDevRedeployRequest) (bool, error)
- func (v VINS) VNFDevReset(ctx context.Context, req VNFDevResetRequest) (bool, error)
- func (v VINS) VNFDevRestart(ctx context.Context, req VNFDevRestartRequest) (bool, error)
- func (v VINS) VNFDevStart(ctx context.Context, req VNFDevStartRequest) (bool, error)
- func (v VINS) VNFDevStop(ctx context.Context, req VNFDevStopRequest) (bool, error)
- type VNFDev
- type VNFDevRedeployRequest
- type VNFDevResetRequest
- type VNFDevRestartRequest
- type VNFDevStartRequest
- type VNFDevStopRequest
- type VNFsConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AuditsRequest ¶
type AuditsRequest struct { // ID of the VINS // Required: true VINSID uint64 `url:"vinsId" json:"vinsId" validate:"required"` }
AuditsRequest struct to get audits
type Config ¶
type Config struct { // MGMT MGMT MGMT `json:"mgmt"` // Resources Resources Resources `json:"resources"` }
VNF config
type CreateInAccountRequest ¶
type CreateInAccountRequest struct { // VINS name // Required: true Name string `url:"name" json:"name" validate:"required"` // ID of account // Required: true AccountID uint64 `url:"accountId" json:"accountId" validate:"required"` // Grid ID // Required: false GID uint64 `url:"gid,omitempty" json:"gid,omitempty"` // Private network IP CIDR // Required: false IPCIDR string `url:"ipcidr,omitempty" json:"ipcidr,omitempty"` // Description // Required: false Description string `url:"desc,omitempty" json:"desc,omitempty"` // Number of pre created reservations // Required: false PreReservationsNum uint64 `url:"preReservationsNum,omitempty" json:"preReservationsNum,omitempty"` // List of DNS ip address // Required: false DNSList []string `url:"dnsList" json:"dnsList,omitempty"` // List of static routes, each item must have destination, netmask, and gateway fields // Required: false Routes []Route `url:"-" json:"routes,omitempty" validate:"omitempty,dive"` }
CreateInAccountRequest struct to create VINS in account
type CreateInRGRequest ¶
type CreateInRGRequest struct { // VINS name // Required: true Name string `url:"name" json:"name" validate:"required"` // Resource group ID // Required: true RGID uint64 `url:"rgId" json:"rgId" validate:"required"` // Private network IP CIDR // Required: false IPCIDR string `url:"ipcidr,omitempty" json:"ipcidr,omitempty"` // External network ID // Required: false // -1 - not connect to extnet, 0 - auto select, 1+ - extnet ID ExtNetID int64 `url:"extNetId" json:"extNetId"` // External IP, related only for extNetId >= 0 // Required: false ExtIP string `url:"extIp,omitempty" json:"extIp,omitempty"` // Description // Required: false Description string `url:"desc,omitempty" json:"desc,omitempty"` // Number of pre created reservations // Required: false PreReservationsNum uint64 `url:"preReservationsNum,omitempty" json:"preReservationsNum,omitempty"` // List of DNS ip address // Required: false DNSList []string `url:"dnsList" json:"dnsList,omitempty"` // List of static routes, each item must have destination, netmask, and gateway fields // Required: false Routes []Route `url:"-" json:"routes,omitempty" validate:"omitempty,dive"` }
CreateInRGRequest struct to create VINS in resource group
type DNSApplyRequest ¶ added in v1.8.0
type DNSApplyRequest struct { // VINS ID // Required: true VINSID uint64 `url:"vinsId" json:"vinsId" validate:"required"` // List of DNS ip address // Required: false DNSList []string `url:"dnsList" json:"dnsList"` }
DNSApplyRequest struct to apply new DNS list in VINS
type DefaultQOSUpdateRequest ¶
type DefaultQOSUpdateRequest struct { // ID of VINS // Required: true VINSID uint64 `url:"vinsId" json:"vinsId" validate:"required"` // Internal traffic, kbit // Required: false IngressRate uint64 `url:"ingress_rate,omitempty" json:"ingress_rate,omitempty"` // Internal traffic burst, kbit // Required: false IngressBirst uint64 `url:"ingress_burst,omitempty" json:"ingress_burst,omitempty"` // External traffic rate, kbit // Required: false EgressRate uint64 `url:"egress_rate,omitempty" json:"egress_rate,omitempty"` }
DefaultQOSUpdateRequest struct to update QOS
type DeleteRequest ¶
type DeleteRequest struct { // VINS ID // Required: true VINSID uint64 `url:"vinsId" json:"vinsId" validate:"required"` // Set to True if you want force delete non-empty VINS. // Primarily, VINS is considered non-empty if it has virtual machines connected to it, // and force flag will detach them from the VINS being deleted. // Otherwise method will return an error // Required: false Force bool `url:"force,omitempty" json:"force,omitempty"` // Set to True if you want to destroy VINS and all linked resources, if any, immediately. // Otherwise, they will be placed into recycle bin and could be restored later within the recycle bin's purge period // Required: false Permanently bool `url:"permanently,omitempty" json:"permanently,omitempty"` }
DeleteRequest struct to delete VINS
type DisableRequest ¶
type DisableRequest struct { // VINS ID // Required: true VINSID uint64 `url:"vinsId" json:"vinsId" validate:"required"` }
DisableRequest struct to disable VINS
type EnableRequest ¶
type EnableRequest struct { // VINS ID // Required: true VINSID uint64 `url:"vinsId" json:"vinsId" validate:"required"` }
EnableRequest struct to enable VINS
type ExtNetConnectRequest ¶
type ExtNetConnectRequest struct { // VINS ID // Required: true VINSID uint64 `url:"vinsId" json:"vinsId" validate:"required"` // External network ID // Required: false NetID uint64 `url:"netId,omitempty" json:"netId,omitempty"` // Directly set IP address // Required: false IP string `url:"ip,omitempty" json:"ip,omitempty"` }
ExtNetConnectRequest struct to connect external network
type ExtNetDisconnectRequest ¶
type ExtNetDisconnectRequest struct { // VINS ID // Required: true VINSID uint64 `url:"vinsId" json:"vinsId" validate:"required"` }
ExtNetDisconnectRequest struct to disconnect VINS from external network
type ExtNetListRequest ¶
type ExtNetListRequest struct { // VINS ID // Required: true VINSID uint64 `url:"vinsId" json:"vinsId" validate:"required"` }
ExtNetListRequest struct to get list of VINS external network connections
type GWConfig ¶
type GWConfig struct { // Default GW DefaultGW string `json:"default_gw"` // External network ID ExtNetID uint64 `json:"ext_net_id"` // External network IP ExtNetIP string `json:"ext_net_ip"` // External network mask ExtNetMask uint64 `json:"ext_netmask"` // QOS QOS QOS `json:"qos"` }
GW config
type GetRequest ¶
type GetRequest struct { // VINS ID // Required: true VINSID uint64 `url:"vinsId" json:"vinsId" validate:"required"` }
GetRequest struct to get information about VINS
type IPListRequest ¶
type IPListRequest struct { // VINS ID // Required: true VINSID uint64 `url:"vinsId" json:"vinsId" validate:"required"` }
IPListRequest struct for DHCP IP
type IPReleaseRequest ¶
type IPReleaseRequest struct { // VINS ID // Required: true VINSID uint64 `url:"vinsId" json:"vinsId" validate:"required"` // IP address // Required: false IPAddr string `url:"ipAddr,omitempty" json:"ipAddr,omitempty"` // MAC address // Required: false MAC string `url:"mac,omitempty" json:"mac,omitempty"` }
IPReleaseRequest struct for IP release
type IPReserveRequest ¶
type IPReserveRequest struct { // VINS ID // Required: true VINSID uint64 `url:"vinsId" json:"vinsId" validate:"required"` // Type of the reservation // Should be one of: // - DHCP // - VIP // - EXCLUDE // Required: true Type string `url:"type" json:"type" validate:"vinsType"` // IP address to use. Non-empty string is required for type "EXCLUDE". // Ignored for types "DHCP" and "VIP". // Required: false IPAddr string `url:"ipAddr,omitempty" json:"ipAddr,omitempty"` // MAC address to associate with IP reservation. // Ignored for type "EXCLUDE", // non-empty string is required for "DHCP" and "VIP" // Required: false MAC string `url:"mac,omitempty" json:"mac,omitempty"` // ID of the compute, associated with this reservation of type "DHCP". // Ignored for other types // Required: false ComputeID uint64 `url:"computeId,omitempty" json:"computeId,omitempty"` }
IPReserveRequest struct for IP reserve
type InfoVNF ¶
type InfoVNF struct { // CKey CKey string `json:"_ckey"` // Meta Meta []interface{} `json:"_meta"` // Account ID AccountID uint64 `json:"accountId"` // CreatedTime CreatedTime uint64 `json:"createdTime"` // Devices Devices Devices `json:"devices"` // 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"` // Owner ID OwnerID uint64 `json:"ownerId"` // Owner type OwnerType string `json:"ownerType"` // Pure virtual PureVirtual bool `json:"pureVirtual"` // Routes Routes ListRoutes `json:"routes"` // Status Status string `json:"status"` // Tech status TechStatus string `json:"techStatus"` // Type Type string `json:"type"` }
DHCP/GW/NAT details
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 ItemExtNet ¶
type ItemExtNet struct { // Default GW DefaultGW string `json:"default_gw"` // External network ID ExtNetID uint64 `json:"ext_net_id"` // IP IP string `json:"ip"` // Prefix len PrefixLen uint64 `json:"prefixlen"` // Status Status string `json:"status"` // Tech status TechStatus string `json:"techStatus"` }
Main information about external network
type ItemIP ¶
type ItemIP struct { // IP IP string `json:"ip"` // MAC MAC string `json:"mac"` // Type Type string `json:"type"` // Virtual machine ID VMID uint64 `json:"vmId"` // Client type ClientType string `json:"clientType"` // Domain name DomainName string `json:"domainname"` // Hostname Hostname string `json:"hostname"` }
Main information about IP
type ItemInterface ¶
type ItemInterface struct { // Bus number BusNumber uint64 `json:"bus_number"` // Connection ID ConnID uint64 `json:"connId"` // Connection type ConnType string `json:"connType"` // Default GW DefGW string `json:"defGw"` // Enabled Enabled bool `json:"enabled"` // FLIPGroup ID FLIPGroupID uint64 `json:"flipgroupId"` // GUID GUID string `json:"guid"` // IP address IPAddress string `json:"ipAddress"` // Listen SSH ListenSSH bool `json:"listenSsh"` // MAC MAC string `json:"mac"` // Maximum transmission unit MTU uint64 `json:"mtu"` // Libvirt Settings LibvirtSettings LibvirtSettings `json:"libvirtSettings"` // Name Name string `json:"name"` // Network type NetID uint64 `json:"netId"` // Network mask NetMask uint64 `json:"netMask"` // Network type NetType string `json:"netType"` // NodeID NodeID int64 `json:"nodeId"` // PCI slot PCISlot int64 `json:"pciSlot"` // QOS QOS QOS `json:"qos"` // Target Target string `json:"target"` // Type Type string `json:"type"` // List of VNF IDs VNFs []uint64 `json:"vnfs"` }
Main information about interface
type ItemNATRule ¶
type ItemNATRule struct { // ID ID uint64 `json:"id"` // Local IP LocalIP string `json:"localIp"` // Local port LocalPort uint64 `json:"localPort"` // Protocol Protocol string `json:"protocol"` // Public port end PublicPortEnd uint64 `json:"publicPortEnd"` // Public port start PublicPortStart uint64 `json:"publicPortStart"` // Virtual machine ID VMID uint64 `json:"vmId"` // Virtual machine name VMName string `json:"vmName"` }
Main information about NAT rule
type ItemReservation ¶
type ItemReservation struct { // Account ID AccountID uint64 `json:"account_id"` // IP IP string `json:"ip"` // MAC MAC string `json:"mac"` // Type Type string `json:"type"` // Virtual machine ID VMID uint64 `json:"vmId"` }
Main information about reservation
type ItemRoutes ¶ added in v1.5.8
type ItemRoutes struct { //Compute Id ComputeIds []uint64 `json:"computeIds"` // Destination network Destination string `json:"destination"` //Next hop host, IP address from ViNS ID free IP pool Gateway string `json:"gateway"` // GUID GUID string `json:"guid"` // ID ID uint64 `json:"id"` //Destination network mask in 255.255.255.255 format Netmask string `json:"netmask"` }
Detailed information about Routes
type ItemVINS ¶
type ItemVINS struct { // Account ID AccountID uint64 `json:"accountId"` // Account name AccountName string `json:"accountName"` // Created by CreatedBy string `json:"createdBy"` // Created time CreatedTime uint64 `json:"createdTime"` // Default GW DefaultGW string `json:"defaultGW"` // Default QOS DefaultQOS QOS `json:"defaultQos"` // Deleted by DeletedBy string `json:"deletedBy"` // Deleted time DeletedTime uint64 `json:"deletedTime"` // Description Description string `json:"desc"` // External IP ExternalIP string `json:"externalIP"` // Extnet ID ExtnetId uint64 `json:"extnetId"` // Free IPs FreeIPs int64 `json:"freeIPs"` // Grid ID GID uint64 `json:"gid"` // GUID GUID uint64 `json:"guid"` // ID ID uint64 `json:"id"` // Lock status LockStatus string `json:"lockStatus"` // Manager ID ManagerID uint64 `json:"managerId"` // Manager type ManagerType string `json:"managerType"` // Milestones Milestones uint64 `json:"milestones"` // Name Name string `json:"name"` // Network mask NetMask uint64 `json:"netMask"` // Network Network string `json:"network"` // PreReservationsNum PreReservationsNum uint64 `json:"preReservationsNum"` // PriVNFDevID PriVNFDevID uint64 `json:"priVnfDevId"` // Redundant Redundant bool `json:"redundant"` // Resource group ID RGID uint64 `json:"rgId"` // Resource group name RGName string `json:"rgName"` // SecVNFDevID SecVNFDevID uint64 `json:"secVnfDevId"` // Status Status string `json:"status"` // Updated by UpdatedBy string `json:"updatedBy"` // Updated time UpdatedTime uint64 `json:"updatedTime"` // User managed UserManaged bool `json:"userManaged"` // VNFs VNFs ItemVNFs `json:"vnfs"` // VXLAN ID VXLANID uint64 `json:"vxlanId"` }
Main information about VINS
func (ItemVINS) Serialize ¶
func (iv ItemVINS) 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 ItemVNFs ¶
type ItemVNFs struct { // DHCP DHCP uint64 `json:"dhcp"` // DNS DNS uint64 `json:"dns"` // FW FW uint64 `json:"fw"` // GW GW uint64 `json:"gw"` // NAT NAT uint64 `json:"nat"` // VPN VPN uint64 `json:"vpn"` }
Shorted information about VNF
type LibvirtSettings ¶ added in v1.9.0
type LibvirtSettings struct { // TX mode TXMode string `json:"txmode"` // IO event IOEventFD string `json:"ioeventfd"` // Event ID EventIDx string `json:"event_idx"` // Number of queues Queues uint64 `json:"queues"` // RX queue size RXQueueSize uint64 `json:"rx_queue_size"` // TX queue size TXQueueSize uint64 `json:"tx_queue_size"` // GUID GUID string `json:"guid"` }
Information about libvirt settings
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 resource group id // Required: false RGID uint64 `url:"rgId,omitempty" json:"rgId,omitempty"` // Find by external network IP // Required: false ExtIP string `url:"extIp,omitempty" json:"extIp,omitempty"` // Find by VNF Device id // Required: false VNFDevId uint64 `url:"vnfdevId,omitempty" json:"vnfdevId,omitempty"` // Sort by one of supported fields, format +|-(field) // Required: false SortBy string `url:"sortBy,omitempty" json:"sortBy,omitempty" validate:"omitempty,sortBy"` // Page number // Required: false Page uint64 `url:"page,omitempty" json:"page,omitempty"` // Page size // Required: false Size uint64 `url:"size,omitempty" json:"size,omitempty"` }
ListDeletedRequest struct to get list of deleted VINSes
type ListExtNets ¶
type ListExtNets struct { // Data Data []ItemExtNet `json:"data"` // Entry count EntryCount uint64 `json:"entryCount"` }
List of external networks
func (ListExtNets) IDs ¶ added in v1.6.8
func (le ListExtNets) IDs() []uint64
IDs gets array of ExtNetIDs from ListExtNets struct
type ListIPs ¶
type ListIPs struct { // Data Data []ItemIP `json:"data"` // Entry count EntryCount uint64 `json:"entryCount"` }
List of information about IPs
type ListNATRule ¶ added in v1.8.0
type ListNATRule []ItemNATRule
List NATRules
func (ListNATRule) IDs ¶ added in v1.8.0
func (lnrc ListNATRule) IDs() []uint64
IDs gets array of NATRuleConfigIDs from ListNATRule struct
type ListNATRules ¶
type ListNATRules struct { // Data Data []ItemNATRule `json:"data"` // Entry count EntryCount uint64 `json:"entryCount"` }
List NAT rules
func (ListNATRules) IDs ¶ added in v1.6.8
func (lnr ListNATRules) IDs() []uint64
IDs gets array of NATRuleIDs from ListNATRules struct
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 resource group id // Required: false RGID uint64 `url:"rgId,omitempty" json:"rgId,omitempty"` // Find by external network IP // Required: false ExtIP string `url:"extIp,omitempty" json:"extIp,omitempty"` // Find by VNF Device id // Required: false VNFDevID uint64 `url:"vnfdevId,omitempty" json:"vnfdevId,omitempty"` // Include deleted // Required: false IncludeDeleted bool `url:"includeDeleted,omitempty" json:"includeDeleted,omitempty"` // Sort by one of supported fields, format +|-(field) // Required: false SortBy string `url:"sortBy,omitempty" json:"sortBy,omitempty" validate:"omitempty,sortBy"` // Page number // Required: false Page uint64 `url:"page,omitempty" json:"page,omitempty"` // Page size // Required: false Size uint64 `url:"size,omitempty" json:"size,omitempty"` }
ListRequest struct to get list of VINSes
type ListRoutes ¶ added in v1.5.8
type ListRoutes []ItemRoutes
List of Routes
func (ListRoutes) IDs ¶ added in v1.6.8
func (lr ListRoutes) IDs() []uint64
IDs gets array of RouteIDs from ListRoutes struct
type ListStaticRoutes ¶ added in v1.6.0
type ListStaticRoutes struct { // Data Data []ItemRoutes `json:"data"` // Entry count EntryCount uint64 `json:"entryCount"` }
List of static routes
func (ListStaticRoutes) IDs ¶ added in v1.6.8
func (lsr ListStaticRoutes) IDs() []uint64
IDs gets array of StaticRouteIDs from ListStaticRoutes struct
type ListVINS ¶
type ListVINS struct { // Data Data []ItemVINS `json:"data"` // Entry count EntryCount uint64 `json:"entryCount"` }
List of VINS
func (ListVINS) FilterByAccountID ¶
FilterByAccountID returns ListVINS with specified AccountID.
func (ListVINS) FilterByCreatedBy ¶
FilterByCreatedBy returns ListVINS created by specified user.
func (ListVINS) FilterByDeletedBy ¶
FilterByDeletedBy returns ListVINS deleted by specified user.
func (ListVINS) FilterByID ¶
FilterByID returns ListVINS with specified ID.
func (ListVINS) FilterByName ¶
FilterByName returns ListVINS with specified Name.
func (ListVINS) FilterByUpdatedBy ¶
FilterByUpdatedBy returns ListVINS updated by specified user.
func (ListVINS) FilterFunc ¶
FilterFunc allows filtering ListVINS based on a user-specified predicate.
func (ListVINS) FindOne ¶
FindOne returns first found ItemVINS If none was found, returns an empty struct.
func (ListVINS) Serialize ¶
func (lv ListVINS) 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 (ListVINS) SortByCreatedTime ¶
SortByCreatedTime sorts ListVINS by the CreatedTime field in ascending order.
If inverse param is set to true, the order is reversed.
func (ListVINS) SortByDeletedTime ¶
SortByDeletedTime sorts ListVINS by the DeletedTime field in ascending order.
If inverse param is set to true, the order is reversed.
func (ListVINS) SortByUpdatedTime ¶
SortByUpdatedTime sorts ListVINS by the UpdatedTime field in ascending order.
If inverse param is set to true, the order is reversed.
type MGMT ¶
type MGMT struct { // IP address IPAddress string `json:"ipaddr"` // Password Password string `json:"password"` // SSH key SSHKey string `json:"sshkey"` // User User string `json:"user"` }
MGMT
type MassDeleteRequest ¶
type MassDeleteRequest struct { // VINS IDs // Required: true VINSIDs []uint64 `url:"vinsIds" json:"vinsIds" validate:"min=1"` // Set to true if you want force delete non-empty VINS. Primarily, // VINS is considered non-empty if it has VMs connected to it, // and force flag will detach them from the VINS being deleted. // Otherwise method will return an error // Required: false Force bool `url:"force,omitempty" json:"force,omitempty"` // Set to true if you want to destroy VINS and all linked resources, if any, immediately. // Otherwise, they will be placed into recycle bin and could be restored later // within the recycle bins purge period // Required: false Permanently bool `url:"permanently,omitempty" json:"permanently,omitempty"` }
MassDeleteRequest struct to delete several VINSes
type MassDisableRequest ¶
type MassDisableRequest struct { // VINS IDs // Required: true VINSIDs []uint64 `url:"vinsIds" json:"vinsIds" validate:"min=1"` }
MassDisableRequest struct to disable several VINSes
type MassEnableRequest ¶
type MassEnableRequest struct { // VINS IDs // Required: true VINSIDs []uint64 `url:"vinsIds" json:"vinsIds" validate:"min=1"` }
MassEnableRequest struct to enable several VINSes
type NATConfig ¶
type NATConfig struct { // Network mask NetMask uint64 `json:"netmask"` // Network Network string `json:"network"` // Rules Rules ListNATRule `json:"rules"` }
NAT config
type NATRuleAddRequest ¶
type NATRuleAddRequest struct { // VINS ID // Required: true VINSID uint64 `url:"vinsId" json:"vinsId" validate:"required"` // Internal IP address to apply this rule to // Required: true IntIP string `url:"intIp" json:"intIp" validate:"required"` // External IP start port to use for this rule // Required: true ExtPortStart uint64 `url:"extPortStart" json:"extPortStart" validate:"required"` // Internal IP port number to use for this rule // Required: false IntPort uint64 `url:"intPort,omitempty" json:"intPort,omitempty"` // External IP end port to use for this rule // Required: false ExtPortEnd uint64 `url:"extPortEnd,omitempty" json:"extPortEnd,omitempty"` // IP protocol type // Should be one of: // - "tcp" // - "udp" // Required: false Proto string `url:"proto,omitempty" json:"proto,omitempty" validate:"omitempty,proto"` }
NATRuleAddRequest struct to create NAT rules
type NATRuleDelRequest ¶
type NATRuleDelRequest struct { // VINS ID // Required: true VINSID uint64 `url:"vinsId" json:"vinsId" validate:"required"` // ID of the rule to delete. // Pass -1 to clear all rules at once // Required: true RuleID int64 `url:"ruleId" json:"ruleId" validate:"required"` }
NATRuleDelRequest struct to delete NAT rule
type NATRuleListRequest ¶
type NATRuleListRequest struct { // VINS ID // Required: true VINSID uint64 `url:"vinsId" json:"vinsId" validate:"required"` }
NATRuleListRequest struct to get list of NAT rules
type NetQOSRequest ¶
type NetQOSRequest struct { // VINS ID // Required: true VINSID uint64 `url:"vinsId" json:"vinsId" validate:"required"` // Internal traffic, kbit // Required: false IngressRate uint64 `url:"ingress_rate,omitempty" json:"ingress_rate,omitempty"` // Internal traffic burst, kbit // Required: false IngressBirst uint64 `url:"ingress_burst,omitempty" json:"ingress_burst,omitempty"` // External traffic rate, kbit // Required: false EgressRate uint64 `url:"egress_rate,omitempty" json:"egress_rate,omitempty"` }
NetQOSRequest struct to update all VINS interfaces QOS
type Primary ¶
type Primary struct { // Device ID DevID uint64 `json:"devId"` // IFace01 IFace01 string `json:"iface01"` // IFace02 IFace02 string `json:"iface02"` }
Primary
type QOS ¶
type QOS struct { // ERate ERate uint64 `json:"eRate"` // GUID GUID string `json:"guid"` // InBurst InBurst uint64 `json:"inBurst"` // InRate InRate uint64 `json:"inRate"` }
Main information about QOS
type RecordDHCP ¶
type RecordDHCP struct { // Config Config VNFsConfig `json:"config"` // DHCP details InfoVNF }
Main information about DHCP
type RecordVINS ¶
type RecordVINS struct { // VNF device VNFDev VNFDev `json:"VNFDev"` // Account ID AccountID uint64 `json:"accountId"` // Account name AccountName string `json:"accountName"` // Computes Computes []Computes `json:"computes"` // Created by CreatedBy string `json:"createdBy"` // Created time CreatedTime uint64 `json:"createdTime"` // Default GW DefaultGW string `json:"defaultGW"` // Default QOS DefaultQOS QOS `json:"defaultQos"` // 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"` // Manager ID ManagerID uint64 `json:"managerId"` // Manager type ManagerType string `json:"managerType"` // Milestones Milestones uint64 `json:"milestones"` // Name Name string `json:"name"` // Network mask NetMask uint64 `json:"netMask"` // Network Network string `json:"network"` // PreReservationsNum PreReservationsNum uint64 `json:"preReservationsNum"` // Redundant Redundant bool `json:"redundant"` // Resource group ID RGID uint64 `json:"rgId"` // Resource group name RGName string `json:"rgName"` // SecVNFDevID SecVNFDevID uint64 `json:"secVnfDevId"` // Status Status string `json:"status"` // Updated by UpdatedBy string `json:"updatedBy"` // Updated time UpdatedTime uint64 `json:"updatedTime"` // User managed UserManaged bool `json:"userManaged"` // VNFs information VNFs RecordVNFs `json:"vnfs"` // VXLAN ID VXLANID uint64 `json:"vxlanId"` }
Detailed information about VINS
type RecordVNFs ¶
type RecordVNFs struct { // DHCP DHCP RecordDHCP `json:"DHCP"` // GW GW RecordGW `json:"GW"` // NAT NAT RecordNAT `json:"NAT"` }
main information about VNF
type Resources ¶
type Resources struct { // Number of CPU CPU uint64 `json:"cpu"` // Number of RAM RAM uint64 `json:"ram"` // Stack ID StackID uint64 `json:"stackId"` // UUID UUID string `json:"uuid"` }
Main information about resource
type RestoreRequest ¶
type RestoreRequest struct { // VINS ID // Required: true VINSID uint64 `url:"vinsId" json:"vinsId" validate:"required"` }
RestoreRequest struct for restore
type Route ¶ added in v1.5.8
type Route struct { // Destination network Destination string `url:"destination" json:"destination" validate:"required"` //Destination network mask in 255.255.255.255 format Netmask string `url:"netmask" json:"netmask" validate:"required"` //Next hop host, IP address from ViNS ID free IP pool Gateway string `url:"gateway" json:"gateway" validate:"required"` }
type SearchRequest ¶
type SearchRequest struct { // ID of the account to search for the ViNSes // Required: false AccountID uint64 `url:"accountId,omitempty" json:"accountId,omitempty"` // ID of the resource group to limit search to the specified RG level only // Required: false RGID uint64 `url:"rgId,omitempty" json:"rgId,omitempty"` // Name of the ViNS to search for // Required: false Name string `url:"name,omitempty" json:"name,omitempty"` // If False, then VINSes having one of the statuses are not listed for // Required: false ShowAll bool `url:"show_all,omitempty" json:"show_all,omitempty"` }
SearchRequest struct to search VINSes
type SearchVINS ¶ added in v1.5.0
type SearchVINS []ItemVINS
type StaticRouteAccessGrantRequest ¶ added in v1.6.0
type StaticRouteAccessGrantRequest struct { // ViNS ID to grant access // Required: true VINSID uint64 `url:"vinsId" json:"vinsId" validate:"required"` // Route ID to grant access, can be found in staticRouteList // Required: true RouteId uint64 `url:"routeId" json:"routeId" validate:"required"` // List of Compute IDs to grant access to this route // Required: false ComputeIds []uint64 `url:"computeIds,omitempty" json:"computeIds,omitempty"` }
StaticRouteAccessGrantRequest struct to grant access to static route to Compute/ViNS
type StaticRouteAccessRevokeRequest ¶ added in v1.6.0
type StaticRouteAccessRevokeRequest struct { // ViNS ID to revoke access // Required: true VINSID uint64 `url:"vinsId" json:"vinsId" validate:"required"` // Route ID to revoke access, can be found in staticRouteList // Required: true RouteId uint64 `url:"routeId" json:"routeId" validate:"required"` // List of Compute IDs to revoke access to this route // Required: false ComputeIds []uint64 `url:"computeIds,omitempty" json:"computeIds,omitempty"` }
StaticRouteAccessRevokeRequest struct to revoke access to static route to Compute/ViNS
type StaticRouteAddRequest ¶ added in v1.6.0
type StaticRouteAddRequest struct { // VINS ID // Required: true VINSID uint64 `url:"vinsId" json:"vinsId" validate:"required"` // Destination network // Required: true Destination string `url:"destination" json:"destination" validate:"required"` // Destination network mask in 255.255.255.255 format // Required: true Netmask string `url:"netmask" json:"netmask" validate:"required"` // Next hop host, IP address from ViNS ID free IP pool // Required: true Gateway string `url:"gateway" json:"gateway" validate:"required"` }
StaticRouteAddRequest struct to add static route
type StaticRouteDelRequest ¶ added in v1.6.0
type StaticRouteDelRequest struct { // ViNS ID to remove static route from // Required: true VINSID uint64 `url:"vinsId" json:"vinsId" validate:"required"` // Route ID to remove, can be found in staticRouteList // Required: true RouteId uint64 `url:"routeId" json:"routeId" validate:"required"` }
StaticRouteDelRequest struct to remove static route from ViNS
type StaticRouteListRequest ¶ added in v1.6.0
type StaticRouteListRequest struct { // ViNS ID to show list of static routes // Required: true VINSID uint64 `url:"vinsId" json:"vinsId" validate:"required"` }
StaticRouteListRequest struct for static route list
type VINS ¶
type VINS struct {
// contains filtered or unexported fields
}
Structure for creating request to VINS
func (VINS) Audits ¶
func (v VINS) Audits(ctx context.Context, req AuditsRequest) (ListAudits, error)
Audits gets audit records for the specified VINS object
func (VINS) CreateInAccount ¶
CreateInAccount creates VINS in account level
func (VINS) CreateInRG ¶
CreateInRG creates VINS in resource group level
func (VINS) DefaultQOSUpdate ¶
DefaultQOSUpdate updates default QOS values
func (VINS) ExtNetConnect ¶
ExtNetConnect connects VINS to external network
func (VINS) ExtNetDisconnect ¶
ExtNetDisconnect disconnects VINS from external network
func (VINS) ExtNetList ¶
func (v VINS) ExtNetList(ctx context.Context, req ExtNetListRequest) (*ListExtNets, error)
ExtNetList shows list of VINS external network connections
func (VINS) Get ¶
func (v VINS) Get(ctx context.Context, req GetRequest) (*RecordVINS, error)
Get gets information about VINS by ID as a RecordVINS struct
func (VINS) IPRelease ¶
IPRelease delete IP reservation matched by specified IP & MAC address combination. If both IP and MAC address are empty strings, all IP reservations will be deleted.
func (VINS) ListDeleted ¶
ListDeleted gets list of deleted VINSes
func (VINS) MassDelete ¶
MassDelete start jobs to delete several VINSes
func (VINS) MassDisable ¶
MassDisable start jobs to disable several VINSes
func (VINS) MassEnable ¶
MassEnable start jobs to enable several VINSes
func (VINS) NATRuleAdd ¶
NATRuleAdd creates NAT (port forwarding) rule on VINS
func (VINS) NATRuleDel ¶
NATRuleDel deletes NAT (port forwarding) rule on VINS
func (VINS) NATRuleList ¶
func (v VINS) NATRuleList(ctx context.Context, req NATRuleListRequest) (*ListNATRules, error)
NATRuleList gets list of NAT (port forwarding) rules
func (VINS) Search ¶
func (v VINS) Search(ctx context.Context, req SearchRequest) (SearchVINS, error)
Search searches VINSes
func (VINS) StaticRouteAccessGrant ¶ added in v1.6.0
func (v VINS) StaticRouteAccessGrant(ctx context.Context, req StaticRouteAccessGrantRequest) (bool, error)
StaticRouteAccessGrant grants access to static route to Compute/ViNS
func (VINS) StaticRouteAccessRevoke ¶ added in v1.6.0
func (v VINS) StaticRouteAccessRevoke(ctx context.Context, req StaticRouteAccessRevokeRequest) (bool, error)
StaticRouteAccessRevoke revokes access to static route to Compute/ViNS
func (VINS) StaticRouteAdd ¶ added in v1.6.0
StaticRouteAdd adds new static route to ViNS
func (VINS) StaticRouteDel ¶ added in v1.6.0
StaticRouteDel removes static route from ViNS
func (VINS) StaticRouteList ¶ added in v1.6.0
func (v VINS) StaticRouteList(ctx context.Context, req StaticRouteListRequest) (*ListStaticRoutes, error)
StaticRouteList shows list of static routes for ViNS
func (VINS) VNFDevRedeploy ¶
VNFDevRedeploy redeploys VINS VNFDevs
func (VINS) VNFDevReset ¶
VNFDevReset resets VINSes primary VNF device
func (VINS) VNFDevRestart ¶
VNFDevRestart reboots VINSes primary VNF device
func (VINS) VNFDevStart ¶
VNFDevStart starts VINSes primary VNF device
func (VINS) VNFDevStop ¶
VNFDevStop stops VINSes primary VNF device
type VNFDev ¶
type VNFDev struct { // CKey CKey string `json:"_ckey"` // Meta Meta []interface{} `json:"_meta"` // Account ID AccountID uint64 `json:"accountId"` // Capabilities Capabilities []string `json:"capabilities"` // Config Config Config `json:"config"` // Config saved ConfigSaved bool `json:"configSaved"` // CustomPreConfig CustomPreConfig bool `json:"customPrecfg"` // Description Description string `json:"desc"` // Grid ID GID uint64 `json:"gid"` // GUID GUID uint64 `json:"guid"` // ID ID uint64 `json:"id"` // List of interfaces Interfaces ListInterfaces `json:"interfaces"` // Lock status LockStatus string `json:"lockStatus"` // Milestones Milestones uint64 `json:"milestones"` // Name Name string `json:"name"` // Status Status string `json:"status"` // TechStatus TechStatus string `json:"techStatus"` // Type Type string `json:"type"` //List of VINS IDs VINS []uint64 `json:"vins"` // VNC password VNCPassword string `json:"vncPasswd"` }
Main information about VNF device
type VNFDevRedeployRequest ¶
type VNFDevRedeployRequest struct { // VINS ID // Required: true VINSID uint64 `url:"vinsId" json:"vinsId" validate:"required"` }
VNFDevRedeployRequest struct to redeploy VNF devices
type VNFDevResetRequest ¶
type VNFDevResetRequest struct { // VINS ID // Required: true VINSID uint64 `url:"vinsId" json:"vinsId" validate:"required"` }
VNFDevResetRequest struct to reset VNF device
type VNFDevRestartRequest ¶
type VNFDevRestartRequest struct { // VINS ID // Required: true VINSID uint64 `url:"vinsId" json:"vinsId" validate:"required"` }
VNFDevRestartRequest struct to reboot VINSes primary VNF device
type VNFDevStartRequest ¶
type VNFDevStartRequest struct { // VINS ID // Required: true VINSID uint64 `url:"vinsId" json:"vinsId" validate:"required"` }
VNFDevStartRequest struct to start VNF devices
type VNFDevStopRequest ¶
type VNFDevStopRequest struct { // VINS ID // Required: true VINSID uint64 `url:"vinsId" json:"vinsId" validate:"required"` }
VNFDevStopRequest struct to stop VNF devices
type VNFsConfig ¶
type VNFsConfig struct { // Default GW DefaultGW string `json:"default_gw"` // List of DNS DNS []string `json:"dns"` // IP end IPEnd string `json:"ip_end"` // IP start IPStart string `json:"ip_start"` // Lease Lease uint64 `json:"lease"` // Network mask NetMask uint64 `json:"netmask"` // Network Network string `json:"network"` // List of reservations Reservations ListReservations `json:"reservations"` }
VNFs sonfig
Source Files
¶
- audits.go
- create_in_account.go
- create_in_rg.go
- default_qos_update.go
- delete.go
- disable.go
- dns_apply.go
- enable.go
- extnet_connect.go
- extnet_disconnect.go
- extnet_list.go
- filter.go
- get.go
- ids.go
- ip_list.go
- ip_release.go
- ip_reserve.go
- list.go
- list_deleted.go
- mass_delete.go
- mass_disable.go
- mass_enable.go
- models.go
- nat_rule_add.go
- nat_rule_del.go
- nat_rule_list.go
- net_qos.go
- raise_down.go
- restore.go
- search.go
- serialize.go
- sorting.go
- static_route_access_grant.go
- static_route_access_revoke.go
- static_route_add.go
- static_route_del.go
- static_route_list.go
- vins.go
- vnfdev_redeploy.go
- vnfdev_reset.go
- vnfdev_restart.go
- vnfdev_start.go
- vnfdev_stop.go