Documentation
¶
Overview ¶
API Actor for configure and use external networks
Index ¶
- type AccessAddRequest
- type AccessRemoveRequest
- type CreateRequest
- type DNSApplyRequest
- type DefaultQOSUpdateRequest
- type DestroyRequest
- type DeviceDeployRequest
- type DeviceMigrateRequest
- type DeviceRemoveRequest
- type DeviceRestartRequest
- type DisableRequest
- type EnableRequest
- type ExtNet
- func (e ExtNet) AccessAdd(ctx context.Context, req AccessAddRequest) ([]uint64, error)
- func (e ExtNet) AccessRemove(ctx context.Context, req AccessRemoveRequest) ([]uint64, error)
- func (e ExtNet) Create(ctx context.Context, req CreateRequest) (uint64, error)
- func (e ExtNet) DNSApply(ctx context.Context, req DNSApplyRequest) (bool, error)
- func (e ExtNet) DefaultQOSUpdate(ctx context.Context, req DefaultQOSUpdateRequest) (bool, error)
- func (e ExtNet) Destroy(ctx context.Context, req DestroyRequest) (bool, error)
- func (e ExtNet) DeviceDeploy(ctx context.Context, req DeviceDeployRequest) (bool, error)
- func (e ExtNet) DeviceMigrate(ctx context.Context, req DeviceMigrateRequest) (bool, error)
- func (e ExtNet) DeviceRemove(ctx context.Context, req DeviceRemoveRequest) (bool, error)
- func (e ExtNet) DeviceRestart(ctx context.Context, req DeviceRestartRequest) (bool, error)
- func (e ExtNet) Disable(ctx context.Context, req DisableRequest) (bool, error)
- func (e ExtNet) Enable(ctx context.Context, req EnableRequest) (bool, error)
- func (e ExtNet) Get(ctx context.Context, req GetRequest) (*RecordExtNet, error)
- func (e ExtNet) GetDefault(ctx context.Context) (uint64, error)
- func (e ExtNet) IPsExclude(ctx context.Context, req IPsExcludeRequest) (bool, error)
- func (e ExtNet) IPsExcludeRange(ctx context.Context, req IPsExcludeRangeRequest) (bool, error)
- func (e ExtNet) IPsInclude(ctx context.Context, req IPsIncludeRequest) (bool, error)
- func (e ExtNet) IPsIncludeRange(ctx context.Context, req IPsIncludeRangeRequest) (bool, error)
- func (e ExtNet) List(ctx context.Context, req ListRequest) (*ListExtNet, error)
- func (e ExtNet) NTPApply(ctx context.Context, req NTPApplyRequest) (bool, error)
- func (e ExtNet) RaiseDown(ctx context.Context) (bool, error)
- func (e ExtNet) SetDefault(ctx context.Context, req SetDefaultRequest) (bool, error)
- func (e ExtNet) Update(ctx context.Context, req UpdateRequest) (bool, error)
- type GetRequest
- type IPsExcludeRangeRequest
- type IPsExcludeRequest
- type IPsIncludeRangeRequest
- type IPsIncludeRequest
- type ItemExtNet
- type ItemReservation
- type ListExtNet
- func (lenet ListExtNet) FilterByID(id uint64) ListExtNet
- func (lenet ListExtNet) FilterByName(name string) ListExtNet
- func (lenet ListExtNet) FilterByStatus(status string) ListExtNet
- func (lenet ListExtNet) FilterFunc(predicate func(ItemExtNet) bool) ListExtNet
- func (lenet ListExtNet) FindOne() ItemExtNet
- func (lenet ListExtNet) Serialize(params ...string) (serialization.Serialized, error)
- type ListRequest
- type ListReservations
- type NTPApplyRequest
- type QOS
- type RecordExtNet
- type SetDefaultRequest
- type UpdateRequest
- type VNFs
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AccessAddRequest ¶
type AccessAddRequest struct { // ID of external network // Required: true NetID uint64 `url:"net_id" json:"net_id" validate:"required"` // Account ID // Required: true AccountID uint64 `url:"accountId" json:"accountId" validate:"required"` }
Request struct for grant access
type AccessRemoveRequest ¶
type AccessRemoveRequest struct { // ID of external network // Required: true NetID uint64 `url:"net_id" json:"net_id" validate:"required"` // Account ID // Required: true AccountID uint64 `url:"accountId" json:"accountId" validate:"required"` }
Request struct for remove access
type CreateRequest ¶
type CreateRequest struct { // External network name // Required: true Name string `url:"name" json:"name" validate:"required"` // Grid (platform) ID // Required: true GID uint64 `url:"gid" json:"gid" validate:"required"` // IP network CIDR // For example 192.168.0.0/24 // Required: true IPCIDR string `url:"ipcidr" json:"ipcidr" validate:"required"` // VLAN ID // Required: true VLANID uint64 `url:"vlanId" json:"vlanId" validate:"required"` // External network gateway IP address // Required: false Gateway string `url:"gateway,omitempty" json:"gateway,omitempty"` // List of DNS addresses // Required: false DNS []string `url:"dns,omitempty" json:"dns,omitempty"` // List of NTP addresses // Required: false NTP []string `url:"ntp,omitempty" json:"ntp,omitempty"` // IPs to check network availability // Required: false CheckIPs []string `url:"checkIps,omitempty" json:"checkIps,omitempty"` // If true - platform DHCP server will not be created // Required: false Virtual bool `url:"virtual,omitempty" json:"virtual,omitempty"` // Optional description // Required: false Description string `url:"desc,omitempty" json:"desc,omitempty"` // Start of IP range to be explicitly included // Required: false StartIP string `url:"startIP,omitempty" json:"startIP,omitempty"` // End of IP range to be explicitly included // Required: false EndIP string `url:"endIP,omitempty" json:"endIP,omitempty"` // IP to create VNFDev with // Required: false VNFDevIP string `url:"vnfdevIP,omitempty" json:"vnfdevIP,omitempty"` // Number of pre created reservations // Required: false PreReservationsNum uint64 `url:"preReservationsNum,omitempty" json:"preReservationsNum,omitempty"` // OpenvSwith bridge name for ExtNet connection // Required: false OVSBridge string `url:"ovsBridge,omitempty" json:"ovsBridge,omitempty"` }
Request struct for create external network
type DNSApplyRequest ¶
type DNSApplyRequest struct { // ID of external network // Required: true NetID uint64 `url:"net_id" json:"net_id" validate:"required"` // List of DNS to apply // Required: false DNSList []string `url:"dns_list,omitempty" json:"dns_list,omitempty"` }
Request struct for set new DNS
type DefaultQOSUpdateRequest ¶
type DefaultQOSUpdateRequest struct { // ID of external network // Required: true NetID uint64 `url:"net_id" json:"net_id" validate:"required"` // Internal traffic, kbit // Required: false IngressRate uint64 `url:"ingress_rate,omitempty" json:"ingress_rate,omitempty"` // Internal traffic burst, kbit // Required: false IngressBurst 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"` }
Request struct for update QOS
type DestroyRequest ¶
type DestroyRequest struct { // ID of external network // Required: true NetID uint64 `url:"net_id" json:"net_id" validate:"required"` }
Request struct for destroy
type DeviceDeployRequest ¶
type DeviceDeployRequest struct { // ID of external network // Required: true NetID uint64 `url:"net_id" json:"net_id" validate:"required"` }
Request struct for deploy network device
type DeviceMigrateRequest ¶
type DeviceMigrateRequest struct { // ID of external network // Required: true NetID uint64 `url:"net_id" json:"net_id" validate:"required"` // Target stack ID to migrate to StackID uint64 `url:"stackId" json:"stackId" validate:"required"` }
Request struct for migrate VNF
type DeviceRemoveRequest ¶
type DeviceRemoveRequest struct { // ID of external network // Required: true NetID uint64 `url:"net_id" json:"net_id" validate:"required"` }
Request struct for remove network device
type DeviceRestartRequest ¶
type DeviceRestartRequest struct { // ID of external network // Required: true NetID uint64 `url:"net_id" json:"net_id" validate:"required"` }
Request struct for restart VNF device
type DisableRequest ¶
type DisableRequest struct { // ID of external network // Required: true NetID uint64 `url:"net_id" json:"net_id" validate:"required"` }
Request struct for disable external network
type EnableRequest ¶
type EnableRequest struct { // ID of external network // Required: true NetID uint64 `url:"net_id" json:"net_id" validate:"required"` }
Request struct for enable external network
type ExtNet ¶
type ExtNet struct {
// contains filtered or unexported fields
}
Structure for creating request to extnet
func (ExtNet) AccessRemove ¶
AccessRemove remove access from external network for account ID
func (ExtNet) DefaultQOSUpdate ¶
DefaultQOSUpdate updates default qos values
func (ExtNet) DeviceDeploy ¶
DeviceDeploy deploys network device for external network (make not virtual, "physical")
func (ExtNet) DeviceMigrate ¶
DeviceMigrate migrate external network VNF device
func (ExtNet) DeviceRemove ¶
DeviceRemove removes network device of external network (make it virtual, not "physical")
func (ExtNet) DeviceRestart ¶
DeviceRestart restarts external network VNF device
func (ExtNet) Get ¶
func (e ExtNet) Get(ctx context.Context, req GetRequest) (*RecordExtNet, error)
Get gets external network details
func (ExtNet) GetDefault ¶
GetDefault get default external network ID
func (ExtNet) IPsExclude ¶
IPsExclude exclude list IPs from external network pool
func (ExtNet) IPsExcludeRange ¶
IPsExcludeRange exclude range of IPs from external network pool
func (ExtNet) IPsInclude ¶
IPsInclude include list IPs to external network pool
func (ExtNet) IPsIncludeRange ¶
IPsIncludeRange include range of IPs to external network pool
func (ExtNet) List ¶
func (e ExtNet) List(ctx context.Context, req ListRequest) (*ListExtNet, error)
List gets list all available external networks
func (ExtNet) SetDefault ¶
SetDefault sets external network as default for platform
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 information about external network
type IPsExcludeRangeRequest ¶
type IPsExcludeRangeRequest struct { // ID of external network // Required: true NetID uint64 `url:"net_id" json:"net_id" validate:"required"` // Starting IP // Required: true IPStart string `url:"ip_start" json:"ip_start" validate:"required"` // Ending IP // Required: true IPEnd string `url:"ip_end" json:"ip_end" validate:"required"` }
Request struct for exclude range of IPs
type IPsExcludeRequest ¶
type IPsExcludeRequest struct { // ID of external network // Required: true NetID uint64 `url:"net_id" json:"net_id" validate:"required"` // List of IPs for exclude from external network // Required: true IPs []string `url:"ips" json:"ips" validate:"min=1"` }
Request struct for exclude list IPs
type IPsIncludeRangeRequest ¶
type IPsIncludeRangeRequest struct { // ID of external network // Required: true NetID uint64 `url:"net_id" json:"net_id" validate:"required"` // Starting IP // Required: true IPStart string `url:"ip_start" json:"ip_start" validate:"required"` // Ending IP // Required: true IPEnd string `url:"ip_end" json:"ip_end" validate:"required"` }
Request struct for include range of IPs
type IPsIncludeRequest ¶
type IPsIncludeRequest struct { // ID of external network // Required: true NetID uint64 `url:"net_id" json:"net_id" validate:"required"` // List of IPs for include to external network // Required: true IPs []string `url:"ips" json:"ips" validate:"min=1"` }
Request struct for include list IPs
type ItemExtNet ¶
type ItemExtNet 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"` // Free IPs number FreeIPs uint64 `json:"freeIps"` // 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 ID NetworkID uint64 `json:"networkId"` // OVSBridge OVSBridge string `json:"ovsBridge"` // PreReservationsNum PreReservationsNum uint64 `json:"preReservationsNum"` // PriVNFDevID PriVNFDevID uint64 `json:"priVnfDevId"` SharedWith []interface{} `json:"sharedWith"` // Status Status string `json:"status"` // VLAN ID VLANID uint64 `json:"vlanId"` // VNFs VNFs VNFs `json:"vnfs"` }
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 ItemReservation ¶
type ItemReservation struct { // Client type ClientType string `json:"clientType"` // Description Description string `json:"desc"` // IP IP string `json:"ip"` // MAC MAC string `json:"mac"` // Type Type string `json:"type"` // Virtual machine ID VMID uint64 `json:"vmId"` // Domain name DomainName string `json:"domainname"` // Hostname Hostname string `json:"hostname"` }
Main information about reservations
type ListExtNet ¶
type ListExtNet struct { // Data Data []ItemExtNet `json:"data"` // Entry count EntryCount uint64 `json:"entryCount"` }
List external networks
func (ListExtNet) FilterByID ¶
func (lenet ListExtNet) FilterByID(id uint64) ListExtNet
FilterByID returns ListExtNet with specified ID.
func (ListExtNet) FilterByName ¶
func (lenet ListExtNet) FilterByName(name string) ListExtNet
FilterByName returns ListExtNet with specified Name.
func (ListExtNet) FilterByStatus ¶
func (lenet ListExtNet) FilterByStatus(status string) ListExtNet
FilterByStatus returns ListExtNet with specified Status.
func (ListExtNet) FilterFunc ¶
func (lenet ListExtNet) FilterFunc(predicate func(ItemExtNet) bool) ListExtNet
FilterFunc allows filtering ListExtNet based on a user-specified predicate.
func (ListExtNet) FindOne ¶
func (lenet ListExtNet) FindOne() ItemExtNet
FindOne returns first found ItemExtNet If none was found, returns an empty struct.
func (ListExtNet) Serialize ¶
func (lenet ListExtNet) 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 NTPApplyRequest ¶
type NTPApplyRequest struct { // ID of external network // Required: true NetID uint64 `url:"net_id" json:"net_id" validate:"required"` // List of NTP to apply // Required: false NTPList []string `url:"ntp_list,omitempty" json:"ntp_list,omitempty"` }
Request struct for set new NTP
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"` }
QOS
type RecordExtNet ¶
type RecordExtNet struct { // Main information about external network ItemExtNet // CheckIps CheckIPs []string `json:"checkIps"` // List DNS DNS []string `json:"dns"` // List excludes Excluded ListReservations `json:"excluded"` // Gateway Gateway string `json:"gateway"` // Network Network string `json:"network"` // Prefix Prefix uint64 `json:"prefix"` // List reservations Reservations ListReservations `json:"reservations"` }
Detailed information about external network
type SetDefaultRequest ¶
type SetDefaultRequest struct { // ID of external network // Required: true NetID uint64 `url:"net_id" json:"net_id" validate:"required"` }
Request struct for set external network as default
type UpdateRequest ¶
type UpdateRequest struct { // ID of external network // Required: true NetID uint64 `url:"net_id" json:"net_id" validate:"required"` // New external network name // Required: false Name string `url:"name,omitempty" json:"name,omitempty"` // New external network description // Required: false Description string `url:"desc,omitempty" json:"desc,omitempty"` }
Request struct for update external network
Source Files
¶
- access_add.go
- access_remove.go
- create.go
- default_qos_update.go
- destroy.go
- device_deploy.go
- device_migrate.go
- device_remove.go
- device_restart.go
- disable.go
- dns_apply.go
- enable.go
- extnet.go
- filter.go
- get.go
- get_default.go
- ips_exclude.go
- ips_exclude_range.go
- ips_include.go
- ips_include_range.go
- list.go
- models.go
- ntp_apply.go
- raise_down.go
- serialize.go
- set_default.go
- update.go