Package enomalism2 :: Package modules :: Package static_networks :: Module rest
[hide private]

Module rest

Defines the REST controllers for static networks.


Requires:

Status: Stable

Functions [hide private]
Dictionary
rest_networks(self, *args, **kw)
If the request method is PUT, create a new static network instance.
Dictionary
rest_networks_UUID(self, *args, **kw)
If the request method is POST, we update the specified network.
Dictionary
rest_networks_UUID_iprange(self, *args, **kw)
If the request method is GET, we return the IP range instance of the specified network.
Dictionary
rest_networks_iprange_UUID(self, *args, **kw)
Return the specified IP range instance.
Dictionary
rest_networks_UUID_cluster(self, *args, **kw)
Return the cluster instance of the specified network.
Function Details [hide private]

rest_networks(self, *args, **kw)

 

If the request method is PUT, create a new static network instance. If the request method is GET, return a list of static network instances.

URL Format:

   /rest/networks/
Parameters:
  • self (enomalism2.REST.rest) - The method class.
  • cluster (Sting) - The cluster uuid.
  • name (String) - The network name.
  • bridge (String) - The network bridge.
  • ip (String) - The network IP address.
  • netmask (String) - The network netmask.
  • gateway (String) - The network gateway.
Returns: Dictionary
A dictionary containing the result of the action.
Decorators:
  • @register_extension("networks", allowed_methods= ['PUT', 'GET'])
Raises:
  • None - No exceptions are raised by this method.

rest_networks_UUID(self, *args, **kw)

 

If the request method is POST, we update the specified network. If the request method is GET, we return the specified network. If the request method is DELETE, we delete the specified network.

URL Format:

   /rest/networks/<UUID>/
Parameters:
  • self (enomalism2.REST.rest) - The method class.
  • name (String) - The network name.
  • description (String) - The network description.
  • bridge (String) - The network bridge.
  • cluster (String.) - The network cluster.
Returns: Dictionary
A dictionary containing the result of the action.
Decorators:
  • @register_extension('networks/*', allowed_methods= ['GET', 'POST', 'DELETE'])
Raises:
  • None - No exceptions are raised by this method.

Status: Stable

See Also: static_networks.model.StaticNetworkTools

rest_networks_UUID_iprange(self, *args, **kw)

 

If the request method is GET, we return the IP range instance of the specified network. If the method is POST, we create a new IP range for the specified network.

URL Format:

   /rest/networks/<UUID>/iprange/
Parameters:
  • self (enomalism2.REST.rest) - The method class.
  • start_ip (String) - The start IP of the range.
  • end_ip (String) - The end IP of the range.
Returns: Dictionary
A dictionary containing the result of the command.
Decorators:
  • @register_extension('networks/*/iprange', allowed_methods= ['GET', 'POST'])
Raises:
  • None - No exceptions are raised by this method.

rest_networks_iprange_UUID(self, *args, **kw)

 

Return the specified IP range instance.

URL Format:

   /rest/networks/iprange/<UUID>/
Parameters:
Returns: Dictionary
A dictionary containing the specified IP range.
Decorators:
  • @register_extension('networks/iprange/*', allowed_methods= ['GET', 'PUT'])
Raises:
  • None - No exceptions are raised by this method.

Status: Stable

See Also: static_networks.model.StaticIPRange

rest_networks_UUID_cluster(self, *args, **kw)

 

Return the cluster instance of the specified network.

URL Format:

   /rest/networks/<UUID>/cluster/
Parameters:
Returns: Dictionary
A dictionary containing the cluster instance.
Decorators:
  • @register_extension('networks/*/cluster', allowed_methods= ['GET', 'PUT'])
Raises:
  • None - No exceptions are raised by this method.

Status: Stable

See Also: static_networks.model.StaticNetwork