8. network – Network

Network functionality.

8.1. Resources

8.1.1. Network

class network.Network

This resource represents a method in which to create a new virtual network.

Resource URI:

/rest/hosting/network/
PUT(name, vlan_id)

Create a new virtual network by submitting an HTTP PUT request.

Note

This resource requires create permission on the elastic_hosting extension module.

Parameters:
  • name – New virtual network name.
  • vlan_id – The vlan ID this network is associated with.
Return type:

network.RepNetwork

8.1.2. NetworkUUID

class network.NetworkUUID

This resource represents a specific virtual network.

Resource URI:

/rest/hosting/network/<UUID>/
GET()

Retrieve the specified virtual network by submitting an HTTP GET request. The UUID in the resource URI should be the UUID of the target virtual network.

Note

This resource requires read permission on the elastic_hosting extension module.

Return type:network.RepNetworkUUID
POST(name, vlan_id)

Update the specified virtual network by submitting an HTTP POST request. The UUID in the resource URI should be the UUID of the target virtual network.

Note

This resource requires read permission on the elastic_hosting extension module.

Parameters:
  • name – The virtual network name.
  • vlan_id – The vlan ID this network is associated with.
Return type:

network.RepNetworkUUID

DELETE()
Delete the specified virtual network by submitting an HTTP DELETE request. The UUID in the resource URI should be the UUID of the target virtual network.

8.1.3. NetworkList

class network.NetworkList

This resource represents a list of virtual networks.

Resource URI:

/rest/hosting/network/list/
GET()

Retrieve a list of virtual networks.

Note

This resource requires read permission on the elastic_hosting extension module.

Return type:RepNetworkList

8.2. Representations

8.2.1. RepNetwork

class network.RepNetwork
This is a representation of a newly created virtual network.
errno
This attribute represents the general error number generated by the resource.
message
This attribute represents the general message generated by the resource.
network
This attribute represents the newly created network.

Representation:

{"errno": response.errno,
 "message": response.message,
 "network": network_obj}

8.2.2. RepNetworkUUID

class network.RepNetworkUUID
This is a representation of a specific virtual network.
errno
This attribute represents the general error number generated by the resource.
message
This attribute represents the general message generated by the resource.
network.uuid
This attribute represents the UUID of the virtual network.
network.name
This attribute represents the name of the virtual network.
network.vlan_id
This attribute represents the vlan ID of the virtual network.

Representation:

{"errno": response.errno,
 "message": response.message,
 "network":{"uuid": network.uuid,
            "name": network.name,
            "vlan_id": network.vlan_id}}

8.2.3. RepNetworkList

class network.RepNetworkList

This is a representation of a list of virtual networks.

errno
This attribute represents the general error number generated by the resource.
message
This attribute represents the general message generated by the resource.
networks
This attribute represents the list of virtual network representations.

Representation:

{"errno": response.errno,
 "message": response.message,
 "networks": [network_obj1, network_obj2]}