api.network.base

/network

api.network.base.views.net_list(*args, **kwargs)

List (GET) all networks.

GET /network
DC-bound?:
Permissions:
Asynchronous?:
Parameters:
  • data.full (boolean) – Return list of objects with all network details (default: false)
  • data.extended (boolean) – Return list of objects with extended network details (default: false)
  • data.order_by (string) – Available fields for sorting: name, created (default: name)
Status Codes:

es example:

es get /network
{
    "url": "https://my.erigones.com/api/network/",
    "status": 200,
    "method": "GET",
    "text": {
        "status": "SUCCESS",
        "result": [
            "testlan",
            "private1"
        ],
        "task_id": "1e1d1-6f75849b-0fbe-4295-9df3"
    }
}

/network/(name)

api.network.base.views.net_manage(*args, **kwargs)

Show (GET), create (POST, update (PUT) or delete (DELETE) a virtual network.

GET /network/(name)
DC-bound?:
  • - dc_bound=true
  • - dc_bound=false
Permissions:
Asynchronous?:
Parameters:
  • name (string) – required - Network name
  • data.extended (boolean) – Display extended network details (default: false)
Status Codes:
POST /network/(name)
DC-bound?:
  • - dc_bound=true
  • - dc_bound=false
Permissions:
Asynchronous?:
Parameters:
  • name (string) – required - Network name
  • data.alias (string) – Short network name (default: name)
  • data.access (integer) – Access type (1 - Public, 3 - Private, 4 - Deleted) (default: 3)
  • data.owner (string) – User that owns the network (default: logged in user)
  • data.desc (string) – Network description
  • data.network (string) – required - IPv4 network prefix in quad-dotted format
  • data.netmask (string) – required - IPv4 subnet mask in quad-dotted format
  • data.gateway (string) – required - IPv4 gateway in quad-dotted format
  • data.nic_tag (string) – required - NIC tag or device name on compute node
  • data.vlan_id (integer) – required - 802.1Q virtual LAN ID (0 - 4096; 0 = none)
  • data.vxlan_id (integer) – VXLAN ID required for overlay NIC tags (1 - 16777215, default: null)
  • data.mtu (integer) – MTU for the network vNIC (576 - 9000)
  • data.resolvers (array) – List of IPv4 addresses that can be used as resolvers
  • data.dns_domain (string) – Existing domain name used for creating A records for VMs
  • data.ptr_domain (string) – Existing in-addr.arpa domain used for creating PTR associations with VMs
  • data.dhcp_passthrough (boolean) – When true, IP addresses for this network are managed by an external service (default: false)
  • data.dc_bound (boolean) – Whether the network is bound to a datacenter (requires SuperAdmin permission) (default: true)
  • data.dc (string) – Name of the datacenter the network will be attached to (required if DC-bound)
Status Codes:
PUT /network/(name)
DC-bound?:
  • - dc_bound=true
  • - dc_bound=false
Permissions:
Asynchronous?:
Parameters:
  • name (string) – required - Network name
  • data.alias (string) – Short network name
  • data.access (integer) – Access type (1 - Public, 3 - Private, 4 - Deleted)
  • data.owner (string) – User that owns the network
  • data.desc (string) – Network description
  • data.network (string) – IPv4 network prefix in quad-dotted format
  • data.netmask (string) – IPv4 subnet mask in quad-dotted format
  • data.gateway (string) – IPv4 gateway in quad-dotted format
  • data.nic_tag (string) – NIC tag or device name on compute node
  • data.vlan_id (integer) – 802.1Q virtual LAN ID (0 - 4096; 0 = none)
  • data.vxlan_id (integer) – VXLAN ID required for overlay NIC tags (1 - 16777215)
  • data.mtu (integer) – MTU for the network vNIC (576 - 9000)
  • data.resolvers (array) – List of IPv4 addresses that can be used as resolvers
  • data.dns_domain (string) – Existing domain name used for creating A records for VMs
  • data.ptr_domain (string) – Existing in-addr.arpa domain used for creating PTR associations with VMs
  • data.dhcp_passthrough (boolean) – When true, IP addresses for this network are managed by an external service
  • data.dc_bound (boolean) – Whether the network is bound to a datacenter (requires SuperAdmin permission)
Status Codes:
DELETE /network/(name)

Note

A virtual network cannot be deleted when it is used by even one virtual server. In order to disable further use of such a virtual network, the network can be marked as deleted by changing its access property to deleted (4).

DC-bound?:
  • - dc_bound=true
  • - dc_bound=false
Permissions:
Asynchronous?:
Parameters:
  • name (string) – required - Network name
Status Codes:

es example:

es create /network/private1 -network 10.1.1.0 -netmask 255.255.255.0 -gateway 10.1.1.1 -nic_tag internal -vlan_id 101
{
    "url": "https://my.erigones.com/api/network/private1/",
    "status": 200,
    "method": "POST",
    "text": {
        "status": "SUCCESS",
        "result": {
            "resolvers": [],
            "ptr_domain": "",
            "name": "private1",
            "nic_tag": "internal",
            "dns_domain": "",
            "access": 3,
            "alias": "private1",
            "netmask": "255.255.255.0",
            "owner": "admin",
            "dc_bound": false,
            "desc": "",
            "gateway": "10.1.1.1",
            "vlan_id": 101,
            "network": "10.1.1.0"
        },
        "task_id": "1e1d23-6f75849b-2018-4919-8164"
    }
}