Documentation
¶
Index ¶
- func Delete(client *golangsdk.ServiceClient, centralNetworkId string) error
- type AssociateErInstance
- type AssociateErTable
- type CentralNetwork
- type CentralNetworkConnectionInfo
- type CentralNetworkErInstance
- type CentralNetworkPlane
- type CentralNetworkResp
- type ConnectionPoint
- type CreateOpts
- type ListCentralNetworkResp
- type ListOpts
- type PageInfo
- type PlaneDocument
- type PolicyDocument
- type UpdateOpts
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AssociateErInstance ¶
type AssociateErInstance struct {
// Enterprise router ID.
EnterpriseRouterId string `json:"enterprise_router_id,omitempty"`
// Project ID.
ProjectId string `json:"project_id,omitempty"`
// Region ID.
RegionId string `json:"region_id,omitempty"`
}
AssociateErInstance describes an enterprise router instance on a central network.
type AssociateErTable ¶
type AssociateErTable struct {
// Project ID.
ProjectId string `json:"project_id,omitempty"`
// Region ID.
RegionId string `json:"region_id,omitempty"`
// Enterprise router ID.
EnterpriseRouterId string `json:"enterprise_router_id,omitempty"`
// Enterprise router route table ID.
EnterpriseRouterTableId string `json:"enterprise_router_table_id,omitempty"`
}
AssociateErTable describes an associated enterprise router route table.
type CentralNetwork ¶
type CentralNetwork struct {
// Central network ID.
ID string `json:"id"`
// Central network name.
Name string `json:"name"`
// Resource description.
Description string `json:"description"`
// Time when the resource was created.
CreatedAt string `json:"created_at"`
// Time when the resource was updated.
UpdatedAt string `json:"updated_at"`
// ID of the account that the central network belongs to.
DomainId string `json:"domain_id"`
// Central network status. Value options: AVAILABLE, CREATING, UPDATING, FAILED, DELETING, DELETED, RESTORING.
State string `json:"state"`
// ID of the enterprise project that the central network belongs to.
EnterpriseProjectId string `json:"enterprise_project_id"`
// Default plane ID.
DefaultPlaneId string `json:"default_plane_id"`
// Deprecated.
AutoAssociateRouteEnabled bool `json:"auto_associate_route_enabled"`
// Deprecated.
AutoPropagateRouteEnabled bool `json:"auto_propagate_route_enabled"`
// Central network planes.
Planes []CentralNetworkPlane `json:"planes"`
// Enterprise routers on the central network.
ErInstances []CentralNetworkErInstance `json:"er_instances"`
// Connections on the central network.
Connections []CentralNetworkConnectionInfo `json:"connections"`
}
CentralNetwork is the central network instance.
func Create ¶
func Create(client *golangsdk.ServiceClient, opts CreateOpts) (*CentralNetwork, error)
func Get ¶
func Get(client *golangsdk.ServiceClient, centralNetworkId string) (*CentralNetwork, error)
func Update ¶
func Update(client *golangsdk.ServiceClient, opts UpdateOpts) (*CentralNetwork, error)
type CentralNetworkConnectionInfo ¶
type CentralNetworkConnectionInfo struct {
// Instance ID.
ID string `json:"id"`
// Plane ID.
PlaneId string `json:"plane_id"`
// Global connection bandwidth ID.
GlobalConnectionBandwidthId string `json:"global_connection_bandwidth_id"`
// Bandwidth size in Mbit/s.
BandwidthSize int64 `json:"bandwidth_size"`
// Connection type. Value options: ER-ER, ER-GDGW, ER-ER_ROUTE_TABLE.
ConnectionType string `json:"connection_type"`
// Two connection endpoints.
ConnectionPointPair []ConnectionPoint `json:"connection_point_pair"`
// Connection status.
State string `json:"state"`
}
CentralNetworkConnectionInfo describes a connection on the central network.
type CentralNetworkErInstance ¶
type CentralNetworkErInstance struct {
// Instance ID.
ID string `json:"id"`
// Enterprise router ID.
EnterpriseRouterId string `json:"enterprise_router_id"`
// Project ID.
ProjectId string `json:"project_id"`
// Region ID.
RegionId string `json:"region_id"`
// BGP autonomous system number.
Asn int64 `json:"asn"`
// Geographic site code.
SiteCode string `json:"site_code"`
}
CentralNetworkErInstance describes an enterprise router on the central network.
type CentralNetworkPlane ¶
type CentralNetworkPlane struct {
// Plane ID.
ID string `json:"id"`
// Plane name.
Name string `json:"name"`
// Enterprise router route tables associated with the plane.
AssociateErTables []AssociateErTable `json:"associate_er_tables"`
// Connections between enterprise routers excluded from the plane.
ExcludeErConnections [][]AssociateErInstance `json:"exclude_er_connections"`
}
CentralNetworkPlane describes a plane returned by the API.
type CentralNetworkResp ¶
type CentralNetworkResp struct {
// Request ID.
RequestId string `json:"request_id"`
// Central network.
CentralNetwork CentralNetwork `json:"central_network"`
}
CentralNetworkResp is the wrapper for a single central network response.
type ConnectionPoint ¶
type ConnectionPoint struct {
// Instance ID.
ID string `json:"id"`
// Project ID.
ProjectId string `json:"project_id"`
// Region ID.
RegionId string `json:"region_id"`
// Geographic site code.
SiteCode string `json:"site_code"`
// Connection endpoint ID.
InstanceId string `json:"instance_id"`
// Parent resource ID.
ParentInstanceId string `json:"parent_instance_id"`
// Resource type. Value options: ER, GDGW, ER_ROUTE_TABLE.
Type string `json:"type"`
}
ConnectionPoint describes a single connection endpoint.
type CreateOpts ¶
type CreateOpts struct {
// Central network name.
Name string `json:"name" required:"true"`
// Resource description. Angle brackets (<>) are not allowed.
Description string `json:"description,omitempty"`
// ID of the enterprise project that the central network belongs to.
EnterpriseProjectId string `json:"enterprise_project_id,omitempty"`
// Central network policy document.
PolicyDocument *PolicyDocument `json:"policy_document,omitempty"`
// Name of the default central network plane.
DefaultPlane string `json:"default_plane,omitempty"`
// List of the central network planes.
Planes []PlaneDocument `json:"planes,omitempty"`
// List of the enterprise routers on a central network.
ErInstances []AssociateErInstance `json:"er_instances,omitempty"`
}
type ListCentralNetworkResp ¶
type ListCentralNetworkResp struct {
// Request ID.
RequestId string `json:"request_id"`
// Pagination query information.
PageInfo PageInfo `json:"page_info"`
// Central network list.
CentralNetworks []CentralNetwork `json:"central_networks"`
}
func List ¶
func List(client *golangsdk.ServiceClient, opts ListOpts) (*ListCentralNetworkResp, error)
type ListOpts ¶
type ListOpts struct {
// Number of records returned on each page. Value range: 1 to 2000.
Limit int `q:"limit"`
// ID of the last record on the previous page.
Marker string `q:"marker"`
// Keyword for sorting.
SortKey string `q:"sort_key"`
// Sorting order. Value options: asc, desc.
SortDir string `q:"sort_dir"`
// Filter by resource IDs.
ID []string `q:"id"`
// Filter by resource names.
Name []string `q:"name"`
// Filter by status.
State []string `q:"state"`
// Filter by enterprise project IDs.
EnterpriseProjectId []string `q:"enterprise_project_id"`
// Filter by enterprise router IDs.
EnterpriseRouterId []string `q:"enterprise_router_id"`
// Filter by attachment IDs.
AttachmentInstanceId []string `q:"attachment_instance_id"`
// Filter by global connection bandwidth IDs.
GlobalConnectionBandwidthId []string `q:"global_connection_bandwidth_id"`
// Filter by connection IDs.
ConnectionId []string `q:"connection_id"`
}
type PageInfo ¶
type PageInfo struct {
// Marker of the next page.
NextMarker string `json:"next_marker"`
// Marker of the previous page.
PreviousMarker string `json:"previous_marker"`
// Number of records in the current page.
CurrentCount int `json:"current_count"`
}
PageInfo is the pagination information returned by list operations.
type PlaneDocument ¶
type PlaneDocument struct {
// Central network plane name.
Name string `json:"name,omitempty"`
// Enterprise router route tables associated with the central network plane.
AssociateErTables []AssociateErTable `json:"associate_er_tables,omitempty"`
// Connections between enterprise routers excluded from the central network plane.
ExcludeErConnections [][]AssociateErInstance `json:"exclude_er_connections,omitempty"`
}
PlaneDocument describes a central network plane.
type PolicyDocument ¶
type PolicyDocument struct {
// Name of the default central network plane.
DefaultPlane string `json:"default_plane,omitempty"`
// List of the central network planes.
Planes []PlaneDocument `json:"planes,omitempty"`
// List of the enterprise routers on a central network.
ErInstances []AssociateErInstance `json:"er_instances,omitempty"`
}
PolicyDocument is the central network policy document.