Documentation
¶
Overview ¶
API Actor for use external networks
Index ¶
- type Excluded
- type ExtNet
- func (e ExtNet) Get(ctx context.Context, req GetRequest) (*RecordExtNet, error)
- func (e ExtNet) GetDefault(ctx context.Context) (uint64, error)
- func (e ExtNet) List(ctx context.Context, req ListRequest) (*ListExtNets, error)
- func (e ExtNet) ListComputes(ctx context.Context, req ListComputesRequest) (*ListExtNetComputes, error)
- type GetRequest
- type ItemExtNet
- type ItemExtNetCompute
- type ItemExtNetExtend
- type ItemReservation
- type ListComputesRequest
- type ListExtNetComputes
- type ListExtNetExtends
- type ListExtNets
- func (lenet ListExtNets) FilterByID(id uint64) ListExtNets
- func (lenet ListExtNets) FilterByName(name string) ListExtNets
- func (lenet ListExtNets) FilterByStatus(status string) ListExtNets
- func (lenet ListExtNets) FilterFunc(predicate func(ItemExtNet) bool) ListExtNets
- func (lenet ListExtNets) FindOne() ItemExtNet
- func (lenet ListExtNets) Serialize(params ...string) (serialization.Serialized, error)
- type ListRequest
- type ListReservations
- type QOS
- type RecordExtNet
- type VNFs
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Excluded ¶ added in v1.3.1
type Excluded struct { // ClientType ClientType string `json:"clientType"` // Domain name DomainName string `json:"domainname"` // Host name HostName string `json:"hostname"` // IP IP string `json:"ip"` // MAC MAC string `json:"mac"` // Type Type string `json:"type"` // VMID VMID uint64 `json:"vmId"` }
type ExtNet ¶
type ExtNet struct {
// contains filtered or unexported fields
}
Structure for creating request to extnet
func (ExtNet) Get ¶
func (e ExtNet) Get(ctx context.Context, req GetRequest) (*RecordExtNet, error)
Get gets detailed information about external network
func (ExtNet) GetDefault ¶
GetDefault get default external network ID
func (ExtNet) List ¶
func (e ExtNet) List(ctx context.Context, req ListRequest) (*ListExtNets, error)
List gets list all available external networks
func (ExtNet) ListComputes ¶
func (e ExtNet) ListComputes(ctx context.Context, req ListComputesRequest) (*ListExtNetComputes, error)
ListComputes gets computes from account with extnets
type GetRequest ¶
type GetRequest struct { // ID of external network // Required: true NetID uint64 `url:"net_id" json:"net_id" validate:"required"` }
Request struct for get detailed information about external network
type ItemExtNet ¶
type ItemExtNet struct { // ID ID uint64 `json:"id"` // IPCIDR IPCIDR string `json:"ipcidr"` // Name Name string `json:"name"` // Status Status string `json:"status"` }
Main information about external network
func (ItemExtNet) Serialize ¶
func (ienet ItemExtNet) 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 ItemExtNetCompute ¶
type ItemExtNetCompute struct { // Account ID AccountID uint64 `json:"accountId"` // Account name AccountName string `json:"accountName"` // List of extend information about external network ExtNets ListExtNetExtends `json:"extnets"` // ID ID uint64 `json:"id"` // Name Name string `json:"name"` // Resource group ID RGID uint64 `json:"rgId"` // Resource group name RGName string `json:"rgName"` }
Main information about compute with external network
type ItemExtNetExtend ¶
type ItemExtNetExtend struct { // Main information about external network ItemExtNet // IP address IPAddr string `json:"ipaddr"` }
Extend information about external network
type ItemReservation ¶
type ItemReservation struct { // ClientType ClientType string `json:"clientType"` // Description Description string `json:"desc"` // Domain name DomainName string `json:"domainname"` // Hostname Hostname string `json:"hostname"` // 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 reservations
type ListComputesRequest ¶
type ListComputesRequest struct { // Filter by account ID // Required: true AccountID uint64 `url:"accountId" json:"accountId" validate:"required"` // Find by rg ID // Required: false RGID uint64 `url:"rgId,omitempty" json:"rgId,omitempty"` // Find by compute ID // Required: false ComputeID uint64 `url:"computeId,omitempty" json:"computeId,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 computes
type ListExtNetComputes ¶
type ListExtNetComputes struct { // Data Data []ItemExtNetCompute `json:"data"` // Entry count EntryCount uint64 `json:"entryCount"` }
List of information about computes with external network
type ListExtNetExtends ¶
type ListExtNetExtends []ItemExtNetExtend
List of extend information about external network
type ListExtNets ¶
type ListExtNets struct { Data []ItemExtNet `json:"data"` EntryCount uint64 `json:"entryCount"` }
List of information about external network
func (ListExtNets) FilterByID ¶
func (lenet ListExtNets) FilterByID(id uint64) ListExtNets
FilterByID returns ListExtNets with specified ID.
func (ListExtNets) FilterByName ¶
func (lenet ListExtNets) FilterByName(name string) ListExtNets
FilterByName returns ListExtNets with specified Name.
func (ListExtNets) FilterByStatus ¶
func (lenet ListExtNets) FilterByStatus(status string) ListExtNets
FilterByStatus returns ListExtNets with specified Status.
func (ListExtNets) FilterFunc ¶
func (lenet ListExtNets) FilterFunc(predicate func(ItemExtNet) bool) ListExtNets
FilterFunc allows filtering ListExtNets based on a user-specified predicate.
func (ListExtNets) FindOne ¶
func (lenet ListExtNets) FindOne() ItemExtNet
FindOne returns first found ItemExtNet If none was found, returns an empty struct.
func (ListExtNets) Serialize ¶
func (lenet ListExtNets) 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 ListRequest ¶
type ListRequest struct { // Find by account ID // Required: false AccountID uint64 `url:"accountId,omitempty" json:"accountId,omitempty"` // 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 network ip address // Required: false Network string `url:"network,omitempty" json:"network,omitempty"` // Find by vlan ID // Required: false VLANID uint64 `url:"vlanId,omitempty" json:"vlanId,omitempty"` // Find by vnfDevices ID // Required: false VNFDevID uint64 `url:"vnfDevId,omitempty" json:"vnfDevId,omitempty"` // Find by status // Required: false Status string `url:"status,omitempty" json:"status,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 external network
type ListReservations ¶
type ListReservations []ItemReservation
List of information about reservations
type QOS ¶
type QOS struct { // EBurst EBurst uint64 `json:"eBurst"` // ERate ERate uint64 `json:"eRate"` // GUID GUID string `json:"guid"` // InBurst InBurst uint64 `json:"inBurst"` // InRate InRate uint64 `json:"inRate"` }
QOS
type RecordExtNet ¶
type RecordExtNet struct { // CKey CKey string `json:"_ckey"` // Meta Meta []interface{} `json:"_meta"` // CheckIps CheckIPs []string `json:"checkIps"` // Default Default bool `json:"default"` // Default QOS DefaultQOS QOS `json:"defaultQos"` // Description Description string `json:"desc"` // list of DNS DNS []string `json:"dns"` // Excluded Excluded []Excluded `json:"excluded"` // Free IPs FreeIPs uint64 `json:"free_ips"` // Gateway Gateway string `json:"gateway"` // Grid ID GID uint64 `json:"gid"` // GUID GUID uint64 `json:"guid"` // ID ID uint64 `json:"id"` // IPCIDR IPCIDR string `json:"ipcidr"` // Milestones Milestones uint64 `json:"milestones"` // Name Name string `json:"name"` // Network Network string `json:"network"` // Network ID NetworkID uint64 `json:"networkId"` // OVS Bridge OVSBridge string `json:"ovsBridge"` // PreReservation IP num PreReservationsNum uint64 `json:"preReservationsNum"` // Prefix Prefix uint64 `json:"prefix"` // PriVNFDevID PriVNFDevID uint64 `json:"priVnfDevId"` // List reservations Reservations ListReservations `json:"reservations"` SharedWith []uint64 `json:"sharedWith"` // Status Status string `json:"status"` // VLAN ID VLANID uint64 `json:"vlanId"` // VNFs VNFs VNFs `json:"vnfs"` }
Detailed information about external network