- Home
- API Enriched
- Ce Management
- config
- Replace Network Interface.
Replace Network Interface.
const url = 'https://example-corp.console.ves.volterra.io/api/v1/api/production/us-east-1/namespaces/default/api/config/namespaces/example/network_interfaces/example';const options = { method: 'PUT', headers: {Authorization: '<Authorization>', 'Content-Type': 'application/json'}, body: '{"metadata":{"annotations":{},"description":"example","disable":true,"labels":{},"name":"example","namespace":"example"},"spec":{"dedicated_interface":{"cluster":{},"device":"example","is_primary":{},"monitor":{},"monitor_disabled":{},"mtu":1,"node":"example","not_primary":{},"priority":1},"dedicated_management_interface":{"cluster":{},"device":"example","mtu":1,"node":"example"},"ethernet_interface":{"cluster":{},"device":"example","dhcp_client":{},"dhcp_server":{"automatic_from_end":{},"automatic_from_start":{},"dhcp_networks":[{"dgw_address":"example","dns_address":"example","first_address":{},"last_address":{},"network_prefix":"example","pool_settings":"INCLUDE_IP_ADDRESSES_FROM_DHCP_POOLS","pools":[{"end_ip":"example","start_ip":"example"}],"same_as_dgw":{}}],"fixed_ip_map":{},"interface_ip_map":{"interface_ip_map":{}}},"ipv6_auto_config":{"host":{},"router":{"dns_config":{"configured_list":{"dns_list":["example"]},"local_dns":{"configured_address":"example","first_address":{},"last_address":{}}},"network_prefix":"example","stateful":{"automatic_from_end":{},"automatic_from_start":{},"dhcp_networks":[{"network_prefix":"example","pool_settings":"INCLUDE_IP_ADDRESSES_FROM_DHCP_POOLS","pools":[{"end_ip":"example","start_ip":"example"}]}],"fixed_ip_map":{},"interface_ip_map":{"interface_ip_map":{}}}}},"is_primary":{},"monitor":{},"monitor_disabled":{},"mtu":1,"no_ipv6_address":{},"node":"example","not_primary":{},"priority":1,"site_local_inside_network":{},"site_local_network":{},"static_ip":{"cluster_static_ip":{"interface_ip_map":{}},"node_static_ip":{"default_gw":"example","ip_address":"example"}},"static_ipv6_address":{"cluster_static_ip":{"interface_ip_map":{}},"node_static_ip":{"default_gw":"example","ip_address":"example"}},"storage_network":{},"untagged":{},"vlan_id":1},"layer2_interface":{"l2sriov_interface":{"device":"example","untagged":{},"vlan_id":1},"l2vlan_interface":{"device":"example","vlan_id":1},"l2vlan_slo_interface":{"vlan_id":1}},"legacy_interface":{"DHCP_server":"NETWORK_INTERFACE_DHCP_SERVER_DISABLE","DNS_server":{"dns_mode":"NETWORK_INTERFACE_DNS_DISABLE","dns_server":[{"addr":"example"}]},"address_allocator":[{"name":"example","namespace":"example"}],"default_gateway":{"default_gateway_address":{"addr":"example"},"default_gateway_mode":"NETWORK_INTERFACE_GATEWAY_DISABLE"},"device_name":"example","dhcp_address":"NETWORK_INTERFACE_DHCP_DISABLE","monitor":{},"monitor_disabled":{},"mtu":1,"priority":1,"static_addresses":[{"plen":1,"prefix":"example"}],"tunnel":{"tunnel":[{"name":"example","namespace":"example"}]},"type":"NETWORK_INTERFACE_ETHERNET","virtual_network":[{"name":"example","namespace":"example"}],"vlan_tag":1,"vlan_tagging":"NETWORK_INTERFACE_VLAN_TAGGING_DISABLE"},"tunnel_interface":{"mtu":1,"node":"example","priority":1,"site_local_inside_network":{},"site_local_network":{},"static_ip":{"cluster_static_ip":{"interface_ip_map":{}},"node_static_ip":{"default_gw":"example","ip_address":"example"}},"tunnel":{"name":"example","namespace":"example"}}}}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PUT \ --url https://example-corp.console.ves.volterra.io/api/v1/api/production/us-east-1/namespaces/default/api/config/namespaces/example/network_interfaces/example \ --header 'Authorization: <Authorization>' \ --header 'Content-Type: application/json' \ --data '{ "metadata": { "annotations": {}, "description": "example", "disable": true, "labels": {}, "name": "example", "namespace": "example" }, "spec": { "dedicated_interface": { "cluster": {}, "device": "example", "is_primary": {}, "monitor": {}, "monitor_disabled": {}, "mtu": 1, "node": "example", "not_primary": {}, "priority": 1 }, "dedicated_management_interface": { "cluster": {}, "device": "example", "mtu": 1, "node": "example" }, "ethernet_interface": { "cluster": {}, "device": "example", "dhcp_client": {}, "dhcp_server": { "automatic_from_end": {}, "automatic_from_start": {}, "dhcp_networks": [ { "dgw_address": "example", "dns_address": "example", "first_address": {}, "last_address": {}, "network_prefix": "example", "pool_settings": "INCLUDE_IP_ADDRESSES_FROM_DHCP_POOLS", "pools": [ { "end_ip": "example", "start_ip": "example" } ], "same_as_dgw": {} } ], "fixed_ip_map": {}, "interface_ip_map": { "interface_ip_map": {} } }, "ipv6_auto_config": { "host": {}, "router": { "dns_config": { "configured_list": { "dns_list": [ "example" ] }, "local_dns": { "configured_address": "example", "first_address": {}, "last_address": {} } }, "network_prefix": "example", "stateful": { "automatic_from_end": {}, "automatic_from_start": {}, "dhcp_networks": [ { "network_prefix": "example", "pool_settings": "INCLUDE_IP_ADDRESSES_FROM_DHCP_POOLS", "pools": [ { "end_ip": "example", "start_ip": "example" } ] } ], "fixed_ip_map": {}, "interface_ip_map": { "interface_ip_map": {} } } } }, "is_primary": {}, "monitor": {}, "monitor_disabled": {}, "mtu": 1, "no_ipv6_address": {}, "node": "example", "not_primary": {}, "priority": 1, "site_local_inside_network": {}, "site_local_network": {}, "static_ip": { "cluster_static_ip": { "interface_ip_map": {} }, "node_static_ip": { "default_gw": "example", "ip_address": "example" } }, "static_ipv6_address": { "cluster_static_ip": { "interface_ip_map": {} }, "node_static_ip": { "default_gw": "example", "ip_address": "example" } }, "storage_network": {}, "untagged": {}, "vlan_id": 1 }, "layer2_interface": { "l2sriov_interface": { "device": "example", "untagged": {}, "vlan_id": 1 }, "l2vlan_interface": { "device": "example", "vlan_id": 1 }, "l2vlan_slo_interface": { "vlan_id": 1 } }, "legacy_interface": { "DHCP_server": "NETWORK_INTERFACE_DHCP_SERVER_DISABLE", "DNS_server": { "dns_mode": "NETWORK_INTERFACE_DNS_DISABLE", "dns_server": [ { "addr": "example" } ] }, "address_allocator": [ { "name": "example", "namespace": "example" } ], "default_gateway": { "default_gateway_address": { "addr": "example" }, "default_gateway_mode": "NETWORK_INTERFACE_GATEWAY_DISABLE" }, "device_name": "example", "dhcp_address": "NETWORK_INTERFACE_DHCP_DISABLE", "monitor": {}, "monitor_disabled": {}, "mtu": 1, "priority": 1, "static_addresses": [ { "plen": 1, "prefix": "example" } ], "tunnel": { "tunnel": [ { "name": "example", "namespace": "example" } ] }, "type": "NETWORK_INTERFACE_ETHERNET", "virtual_network": [ { "name": "example", "namespace": "example" } ], "vlan_tag": 1, "vlan_tagging": "NETWORK_INTERFACE_VLAN_TAGGING_DISABLE" }, "tunnel_interface": { "mtu": 1, "node": "example", "priority": 1, "site_local_inside_network": {}, "site_local_network": {}, "static_ip": { "cluster_static_ip": { "interface_ip_map": {} }, "node_static_ip": { "default_gw": "example", "ip_address": "example" } }, "tunnel": { "name": "example", "namespace": "example" } } } }'Network interface represents configuration of a network device. Replace network interface will replace the contents of given network interface object.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Namespace This defines the workspace within which each the configuration object is to be created. Must be a DNS_LABEL format. For a namespace object itself, namespace value will be ""
Name The configuration object to be replaced will be looked up by name.
Request Bodyrequired
Section titled “Request Bodyrequired”This is the input message of the ‘Replace’ RPC.
object
object
Annotations is an unstructured key value map stored with a resource that may be set by external tools to store and retrieve arbitrary metadata. They are not queryable and should be preserved when modifying objects.
object
Human readable description for the object.
A value of true will administratively disable the object.
Map of string keys and values that can be used to organize and categorize (scope and select) objects as chosen by the user. Values specified here will be used by selector expression.
object
This is the name of configuration object. It has to be unique within the namespace. It can only be specified during create API and cannot be changed during replace API. The value of name has to follow DNS-1035 format. Required: YES.
This defines the workspace within which each the configuration object is to be created. Must be a DNS_LABEL format. For a namespace object itself, namespace value will be ""
object
object
object
Name of the device for which interface is configured. Use wwan0 for 4G/LTE. Required: YES.
object
object
object
Maximum packet size (Maximum Transfer Unit) of the interface When configured, MTU must be between 512 and 16384.
Exclusive with [cluster] Configuration will apply to a device on the given node of the site.
object
Priority of the network interface when multiple network interfaces are present in outside network Greater the value, higher the priority.
object
object
Name of the device for which interface is configured Required: YES.
Maximum packet size (Maximum Transfer Unit) of the interface When configured, MTU must be between 512 and 16384.
Exclusive with [cluster] Configuration will apply to a device on the given node of the site.
object
object
Interface configuration for the ethernet device Required: YES.
object
object
object
object
List of networks from which DHCP Server can allocate IPv4 Addresses
Required: YES.
DHCP network configuration.
object
Exclusive with [first_address last_address] Enter a IPv4 address from the network prefix to be used as the default gateway.
Exclusive with [same_as_dgw] Enter a IPv4 address from the network prefix to be used as the DNS server.
object
object
Exclusive with [] Set the network prefix for the site. Ex: 10.1.1.0/24.
List of non overlapping IP address ranges.
DHCP pool is a range of IP addresses (start IP and end IP).
object
Ending IP of the pool range. In case of address allocator, offset is derived based on network prefix. 10.1.1.200 with prefix length of 24, end offset is 0.0.0.200.
Starting IP of the pool range. In case of address allocator, offset is derived based on network prefix. 10.1.1.5 with prefix length of 24, start offset is 0.0.0.5.
object
Assign fixed IPv4 addresses based on the MAC Address of the DHCP Client.
object
object
Specify static IPv4 addresses per site:node.
object
object
object
object
object
object
List of IPv6 Addresses acting as DNS servers Required: YES.
object
Exclusive with [first_address last_address] Configured address from the network prefix is chosen as DNS server.
object
object
Exclusive with [stateful] Nework prefix that is used as Prefix information Allowed only /64 prefix length as per RFC 4862.
object
object
object
List of networks from which DHCP server can allocate IP addresses
Required: YES.
DHCP IPv6 network type configuration.
object
Exclusive with [] Network Prefix to be used for IPv6 address auto configuration.
List of non overlapping IP address ranges.
DHCP IPv6 pool is a range of IP addresses (start IP and end IP).
object
Ending IPv6 address of the pool range. In case of address allocator, offset is derived based on network prefix.
Starting IPv6 address of the pool range. In case of address allocator, offset is derived based on network prefix. 2001::1 with prefix length of 64, start offset is 5.
Fixed MAC address to IPv6 assignments, Key: MAC address, Value: IPv6 Address Assign fixed IPv6 addresses based on the MAC Address of the DHCP Client.
object
object
Map of Site:Node to IPv6 address.
object
object
object
object
Maximum packet size (Maximum Transfer Unit) of the interface When configured, MTU must be between 512 and 16384.
object
Exclusive with [cluster] Configuration will apply to a device on the given node.
object
Priority of the network interface when multiple network interfaces are present in outside network Greater the value, higher the priority.
object
object
object
object
Map of Node to Static IP configuration value, Key:Node, Value:IP Address.
object
object
IP address of the default gateway.
IP address of the interface and prefix length Required: YES.
object
object
Map of Node to Static IP configuration value, Key:Node, Value:IP Address.
object
object
IP address of the default gateway.
IP address of the interface and prefix length Required: YES.
object
object
Exclusive with [untagged] Configure a VLAN tagged ethernet interface.
object
object
Physical ethernet interface Required: YES.
object
Exclusive with [untagged] Configure a VLAN tagged interface.
object
Physical ethernet interface Required: YES.
VLAN ID Required: YES.
object
VLAN ID Required: YES.
object
object
Address of DNS server when mode is “use-configured”
IPv4 Address in dot-decimal notation.
object
IPv4 Address in string form with dot-decimal notation.
Reference to an address allocator for the network interface. When set, the allocator is used to allocate a subnet for the interface and an address from the subnet is set on the interface.
This type establishes a ‘direct reference’ from one object(the referrer) to another(the referred). Such a reference is in form of tenant/namespace/name for public API and Uid for private API This type of reference is called direct because the relation is explicit and concrete (as opposed to selector reference which builds a group based on labels of selectee objects)
object
When a configuration object(e.g. Virtual_host) refers to another(e.g route) then kind will hold the referred object’s kind (e.g. “route”)
When a configuration object(e.g. Virtual_host) refers to another(e.g route) then name will hold the referred object’s(e.g. Route’s) name.
When a configuration object(e.g. Virtual_host) refers to another(e.g route) then namespace will hold the referred object’s(e.g. Route’s) namespace.
When a configuration object(e.g. Virtual_host) refers to another(e.g route) then tenant will hold the referred object’s(e.g. Route’s) tenant.
When a configuration object(e.g. Virtual_host) refers to another(e.g route) then uid will hold the referred object’s(e.g. Route’s) uid.
object
object
IPv4 Address in string form with dot-decimal notation.
Name of the physical network interface device which this network interface represents. Required: YES.
object
object
Maximum Transfer Unit (Max packet length) of the interface When configured, MTU must be between 512 and 16384.
Priority of the network interface when multiple network interfaces are present in the fleet object Greater the value, higher the priority.
If DHCP server is enabled, configures the subnet to be used for IP allocation.
IPv4 subnets specified as prefix and prefix-length. Prefix length must be <= 32.
object
Prefix-length of the IPv4 subnet. Must be <= 32.
Prefix part of the IPv4 subnet in string form with dot-decimal notation.
object
Tunnel which is attached to this interface.
This type establishes a ‘direct reference’ from one object(the referrer) to another(the referred). Such a reference is in form of tenant/namespace/name for public API and Uid for private API This type of reference is called direct because the relation is explicit and concrete (as opposed to selector reference which builds a group based on labels of selectee objects)
object
When a configuration object(e.g. Virtual_host) refers to another(e.g route) then kind will hold the referred object’s kind (e.g. “route”)
When a configuration object(e.g. Virtual_host) refers to another(e.g route) then name will hold the referred object’s(e.g. Route’s) name.
When a configuration object(e.g. Virtual_host) refers to another(e.g route) then namespace will hold the referred object’s(e.g. Route’s) namespace.
When a configuration object(e.g. Virtual_host) refers to another(e.g route) then tenant will hold the referred object’s(e.g. Route’s) tenant.
When a configuration object(e.g. Virtual_host) refers to another(e.g route) then uid will hold the referred object’s(e.g. Route’s) uid.
Virtual-network for the interface This is optional and can contain at most one entry.
This type establishes a ‘direct reference’ from one object(the referrer) to another(the referred). Such a reference is in form of tenant/namespace/name for public API and Uid for private API This type of reference is called direct because the relation is explicit and concrete (as opposed to selector reference which builds a group based on labels of selectee objects)
object
When a configuration object(e.g. Virtual_host) refers to another(e.g route) then kind will hold the referred object’s kind (e.g. “route”)
When a configuration object(e.g. Virtual_host) refers to another(e.g route) then name will hold the referred object’s(e.g. Route’s) name.
When a configuration object(e.g. Virtual_host) refers to another(e.g route) then namespace will hold the referred object’s(e.g. Route’s) namespace.
When a configuration object(e.g. Virtual_host) refers to another(e.g route) then tenant will hold the referred object’s(e.g. Route’s) tenant.
When a configuration object(e.g. Virtual_host) refers to another(e.g route) then uid will hold the referred object’s(e.g. Route’s) uid.
VLAN tag of the interface, valid only if VLAN tagging is enabled when vlan_tagging is enabled, value must be between 1 - 4094.
object
Maximum packet size (Maximum Transfer Unit) of the interface When configured, MTU must be between 512 and 16384.
Exclusive with [] Configuration will apply to a given device on the given node.
Priority of the network interface when multiple network interfaces are present in outside network Greater the value, higher the priority.
object
object
object
object
Map of Node to Static IP configuration value, Key:Node, Value:IP Address.
object
object
IP address of the default gateway.
IP address of the interface and prefix length Required: YES.
object
When a configuration object(e.g. Virtual_host) refers to another(e.g route) then name will hold the referred object’s(e.g. Route’s) name. Required: YES.
When a configuration object(e.g. Virtual_host) refers to another(e.g route) then namespace will hold the referred object’s(e.g. Route’s) namespace.
When a configuration object(e.g. Virtual_host) refers to another(e.g route) then tenant will hold the referred object’s(e.g. Route’s) tenant.
Responses
Section titled “Responses”A successful response.
object
Examplegenerated
{}Returned when operation is not authorized.
Examplegenerated
exampleReturned when there is no permission to access resource.
Examplegenerated
exampleReturned when resource is not found.
Examplegenerated
exampleReturned when operation on resource is conflicting with current value.
Examplegenerated
exampleReturned when operation has been rejected as it is happening too frequently.
Examplegenerated
exampleReturned when server encountered an error in processing API.
Examplegenerated
exampleReturned when service is unavailable temporarily.
Examplegenerated
exampleReturned when server timed out processing request.
Examplegenerated
example