github.com/chnsz/golangsdk@v0.0.0-20240506093406-85a3fbfa605b/openstack/dc/v3/interfaces/results.go (about)

     1  package interfaces
     2  
     3  import (
     4  	"github.com/chnsz/golangsdk/openstack/common/tags"
     5  )
     6  
     7  // createResp is the structure that represents the API response of the 'Create' method, which contains request ID and
     8  // the virtual interface details.
     9  type createResp struct {
    10  	RequestId string `json:"request_id"`
    11  	// The response detail of the virtual gateway.
    12  	VirtualInterface VirtualInterface `json:"virtual_interface"`
    13  }
    14  
    15  // VirtualInterface is the structure that represents the details of the virtual interface.
    16  type VirtualInterface struct {
    17  	// The ID of the virtual interface.
    18  	ID string `json:"id"`
    19  	// Specifies the name of the virtual interface.
    20  	// The valid length is limited from 0 to 64, only chinese and english letters, digits, hyphens (-), underscores (_)
    21  	// and dots (.) are allowed.
    22  	// The name must start with a chinese or english letter, and the Chinese characters must be in **UTF-8** or
    23  	// **Unicode** format.
    24  	Name string `json:"name"`
    25  	// Manage status.
    26  	// The valid values are 'true' and 'false'.
    27  	AdminStateUp bool `json:"admin_state_up"`
    28  	// The ingress bandwidth size of the virtual interface.
    29  	Bandwidth int `json:"bandwidth"`
    30  	// The creation time of the virtual interface.
    31  	CreatedAt string `json:"create_time"`
    32  	// The latest update time of the virtual interface.
    33  	UpdatedAt string `json:"update_time"`
    34  	// Specifies the description of the virtual interface.
    35  	// The description contain a maximum of 128 characters and the angle brackets (< and >) are not allowed.
    36  	// Chinese characters must be in **UTF-8** or **Unicode** format.
    37  	Description string `json:"description"`
    38  	// The ID of the direct connection associated with the virtual interface.
    39  	DirectConnectId string `json:"direct_connect_id"`
    40  	// The service type of the virtual interface.
    41  	ServiceType string `json:"service_type"`
    42  	// The current status of the virtual interface.
    43  	// The valid values are as follows:
    44  	// + ACTIVE
    45  	// + DOWN
    46  	// + BUILD
    47  	// + ERROR
    48  	// + PENDING_CREATE
    49  	// + PENDING_UPDATE
    50  	// + PENDING_DELETE
    51  	// + DELETED
    52  	// + AUTHORIZATION
    53  	// + REJECTED
    54  	Status string `json:"status"`
    55  	// The ID of the target tenant ID, which is used for cross tenant virtual interface creation.
    56  	TenantId string `json:"tenant_id"`
    57  	// The type of the virtual interface.
    58  	Type string `json:"type"`
    59  	// The ID of the virtual gateway to which the virtual interface is connected.
    60  	VgwId string `json:"vgw_id"`
    61  	// The VLAN for constom side.
    62  	Vlan int `json:"vlan"`
    63  	// The route specification of the remote VIF network.
    64  	RouteLimit int `json:"route_limit"`
    65  	// Whether to enable the Bidirectional Forwarding Detection (BFD) function.
    66  	EnableBfd bool `json:"enable_bfd"`
    67  	// Whether to enable the Network Quality Analysis (NQA) function.
    68  	EnableNqa bool `json:"enable_nqa"`
    69  	// The ID of the Intelligent EdgeSite (IES) associated with the virtual interface.
    70  	IesId string `json:"ies_id"`
    71  	// The ID of the link aggregation group (LAG) associated with the virtual interface.
    72  	LagId string `json:"lag_id"`
    73  	// The ID of the local gateway (LGW) associated with the virtual interface.
    74  	LgwId string `json:"lgw_id"`
    75  	// The local BGP ASN in client side.
    76  	BgpAsn int `json:"bgp_asn"`
    77  	// The (MD5) password for the local BGP.
    78  	BgpMd5 string `json:"bgp_md5"`
    79  	// The attributed Device ID.
    80  	DeviceId string `json:"device_id"`
    81  	// The IPv4 address of the virtual interface in cloud side.
    82  	LocalGatewayV4Ip string `json:"local_gateway_v4_ip"`
    83  	// The IPv4 address of the virtual interface in client side.
    84  	RemoteGatewayV4Ip string `json:"remote_gateway_v4_ip"`
    85  	// The address family type.
    86  	AddressFamily string `json:"address_family"`
    87  	// The IPv6 address of the virtual interface in cloud side.
    88  	LocalGatewayV6Ip string `json:"local_gateway_v6_ip"`
    89  	// The IPv6 address of the virtual interface in client side.
    90  	RemoteGatewayV6Ip string `json:"remote_gateway_v6_ip"`
    91  	// The CIDR list of remote subnets.
    92  	RemoteEpGroup []string `json:"remote_ep_group"`
    93  	// The CIDR list of subnets in service side.
    94  	ServiceEpGroup []string `json:"service_ep_group"`
    95  	// The route mode of the virtual interface.
    96  	RouteMode string `json:"route_mode"`
    97  	// Whether limit rate.
    98  	RateLimit bool `json:"rate_limit"`
    99  	// The VLAN for constom side.
   100  	VifPeers []VifPeer `json:"vif_peer"`
   101  	// The Peer details of the VIF.
   102  	ExtendAttribute VifExtendAttribute `json:"extend_attribute"`
   103  	// The enterprise project ID to which the virtual interface belongs.
   104  	EnterpriseProjectId string `json:"enterprise_project_id"`
   105  	// The key/value pairs to associate with the virtual interface.
   106  	Tags []tags.ResourceTag `json:"tags"`
   107  }
   108  
   109  // VifPeer is the structure that represents the related information of each peer.
   110  type VifPeer struct {
   111  	// Resource ID.
   112  	ID string `json:"id"`
   113  	// The ID of the target tenant ID, which is used for cross tenant virtual interface creation.
   114  	TenantId string `json:"tenant_id"`
   115  	// Specifies the name of the VIF peer.
   116  	// The valid length is limited from 0 to 64, only chinese and english letters, digits, hyphens (-), underscores (_)
   117  	// and dots (.) are allowed.
   118  	// The name must start with a chinese or english letter, and the Chinese characters must be in **UTF-8** or
   119  	// **Unicode** format.
   120  	Name string `json:"name"`
   121  	// Specifies the description of the virtual interface.
   122  	// The description contain a maximum of 128 characters and the angle brackets (< and >) are not allowed.
   123  	// Chinese characters must be in **UTF-8** or **Unicode** format.
   124  	Description string `json:"description"`
   125  	// The address family type.
   126  	AddressFamily string `json:"address_family"`
   127  	// Local gateway IP.
   128  	LocalGatewayIp string `json:"local_gateway_ip"`
   129  	// Remote gateway IP.
   130  	RemoteGatewayIp string `json:"remote_gateway_ip"`
   131  	// BGP ASN.
   132  	BgpAsn int `json:"bgp_asn"`
   133  	// BGP MD5 password.
   134  	BgpMd5 string `json:"bgp_md5"`
   135  	// The CIDR list of remote subnets.
   136  	RemoteEpGroup []string `json:"remote_ep_group"`
   137  	// The CIDR list of subnets in service side.
   138  	ServiceEpGroup string `json:"service_ep_group"`
   139  	// Attributed Device ID.
   140  	DeviceId string `json:"device_id"`
   141  	// Attributed Device ID.
   142  	BgpRouteLimit int `json:"bgp_route_limit"`
   143  	// Attributed Device ID.
   144  	BgpStatus string `json:"bgp_status"`
   145  	// The virtual interface ID corresponding to the VIF peer.
   146  	VifId string `json:"vif_id"`
   147  }
   148  
   149  // VifExtendAttribute is the structure that represents the reliability detection information of BFD/NQA.
   150  type VifExtendAttribute struct {
   151  	// The availability detection types for virtual interface.
   152  	// + nqa
   153  	// + bfd
   154  	HaType string `json:"ha_type"`
   155  	// The specific configuration mode detected for virtual interface.
   156  	// + auto_single
   157  	// + auto_multi
   158  	// + static_single
   159  	// + static_multi
   160  	// + enhance_nqa
   161  	HaMode string `json:"ha_mode"`
   162  	// The detection retries.
   163  	DetectMultiplier string `json:"detect_multiplier"`
   164  	// The receive time interval for detection.
   165  	MinRxInterval string `json:"min_rx_interval"`
   166  	// The transmit time interval for detection.
   167  	MinTxInterval string `json:"min_tx_interval"`
   168  	// The identifier of the detected remote side, used for static BFD.
   169  	RemoteDisclaim string `json:"remote_disclaim"`
   170  	// The identifier of the detected local side, used for static BFD.
   171  	LocalDisclaim string `json:"local_disclaim"`
   172  }
   173  
   174  // getResp is the structure that represents the API response of the 'Get' method, which contains request ID and the
   175  // virtual interface details.
   176  type getResp struct {
   177  	RequestId string `json:"request_id"`
   178  	// The response detail of the virtual interface.
   179  	VirtualInterface VirtualInterface `json:"virtual_interface"`
   180  }
   181  
   182  // createResp is the structure that represents the API response of the 'Update' method, which contains request ID and
   183  // the virtual interface details.
   184  type updateResp struct {
   185  	RequestId string `json:"request_id"`
   186  	// The response detail of the virtual gateway.
   187  	VirtualInterface VirtualInterface `json:"virtual_interface"`
   188  }