Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.xensource.xenapi
Class Network

    java.lang.Object
      com.xensource.xenapi.XenAPIObject
          com.xensource.xenapi.Network

    public class Network

extends XenAPIObject

A virtual network

Nested Class Summary
`static class` | `Network.Record` Represents all the fields in a Network

Field Summary
`protected String` | `ref` The XenAPI reference (OpaqueRef) to this object.

Method Summary
`void` | `addTags(Connection c, String value)` Add the given value to the tags field of the given network.
`void` | `addToOtherConfig(Connection c, String key, String value)` Add the given key-value pair to the other_config field of the given network.
`static Network` | `create(Connection c, Network.Record record)` Create a new network instance, and return its handle.
`static Task` | `createAsync(Connection c, Network.Record record)` Create a new network instance, and return its handle.
`Blob` | `createNewBlob(Connection c, String name, String mimeType, Boolean _public)` Create a placeholder for a named binary blob of data that is associated with this pool
`Task` | `createNewBlobAsync(Connection c, String name, String mimeType, Boolean _public)` Create a placeholder for a named binary blob of data that is associated with this pool
`void` | `destroy(Connection c)` Destroy the specified network instance.
`Task` | `destroyAsync(Connection c)` Destroy the specified network instance.
`boolean` | `equals(Object obj)` If obj is a Network, compares XenAPI references for equality.
`static Set<Network>` | `getAll(Connection c)` Return a list of all the networks known to the system.
`Set<Types.NetworkOperations>` | `getAllowedOperations(Connection c)` Get the allowed_operations field of the given network.
`static Map<Network,Network.Record>` | `getAllRecords(Connection c)` Return a map of network references to network records for all networks known to the system.
`Map<String,Blob>` | `getBlobs(Connection c)` Get the blobs field of the given network.
`String` | `getBridge(Connection c)` Get the bridge field of the given network.
`static Set<Network>` | `getByNameLabel(Connection c, String label)` Get all the network instances with the given label.
`static Network` | `getByUuid(Connection c, String uuid)` Get a reference to the network instance with the specified UUID.
`Map<String,Types.NetworkOperations>` | `getCurrentOperations(Connection c)` Get the current_operations field of the given network.
`Types.NetworkDefaultLockingMode` | `getDefaultLockingMode(Connection c)` Get the default_locking_mode field of the given network.
`Long` | `getMTU(Connection c)` Get the MTU field of the given network.
`String` | `getNameDescription(Connection c)` Get the name/description field of the given network.
`String` | `getNameLabel(Connection c)` Get the name/label field of the given network.
`Map<String,String>` | `getOtherConfig(Connection c)` Get the other_config field of the given network.
`Set<PIF>` | `getPIFs(Connection c)` Get the PIFs field of the given network.
`Network.Record` | `getRecord(Connection c)` Get a record containing the current state of the given network.
`Set<String>` | `getTags(Connection c)` Get the tags field of the given network.
`String` | `getUuid(Connection c)` Get the uuid field of the given network.
`Set<VIF>` | `getVIFs(Connection c)` Get the VIFs field of the given network.
`int` | `hashCode()`
`void` | `removeFromOtherConfig(Connection c, String key)` Remove the given key and its corresponding value from the other_config field of the given network.
`void` | `removeTags(Connection c, String value)` Remove the given value from the tags field of the given network.
`void` | `setDefaultLockingMode(Connection c, Types.NetworkDefaultLockingMode value)` Set the default locking mode for VIFs attached to this network
`Task` | `setDefaultLockingModeAsync(Connection c, Types.NetworkDefaultLockingMode value)` Set the default locking mode for VIFs attached to this network
`void` | `setMTU(Connection c, Long MTU)` Set the MTU field of the given network.
`void` | `setNameDescription(Connection c, String description)` Set the name/description field of the given network.
`void` | `setNameLabel(Connection c, String label)` Set the name/label field of the given network.
`void` | `setOtherConfig(Connection c, Map<String,String> otherConfig)` Set the other_config field of the given network.
`void` | `setTags(Connection c, Set<String> tags)` Set the tags field of the given network.
`String` | `toWireString()`

Methods inherited from class java.lang.Object
`clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### ref

    protected final String ref

  The XenAPI reference (OpaqueRef) to this object.

Method Detail

### toWireString

    public String toWireString()

  Specified by:
    `toWireString` in class `XenAPIObject`
  Returns:
    The XenAPI reference (OpaqueRef) to this object.

### equals

    public boolean equals(Object obj)

  If obj is a Network, compares XenAPI references for equality.

  Overrides:
    `equals` in class `Object`

### hashCode

    public int hashCode()

  Overrides:
    `hashCode` in class `Object`

### getRecord

    public Network.Record getRecord(Connection c)
                             throws Types.BadServerResponse,
                                    Types.XenAPIException,
                                    org.apache.xmlrpc.XmlRpcException

  Get a record containing the current state of the given network.

  Returns:
    all fields from the object
  Throws:
    `Types.BadServerResponse`
    `Types.XenAPIException`
    `org.apache.xmlrpc.XmlRpcException`

### getByUuid

    public static Network getByUuid(Connection c,
                                    String uuid)
                             throws Types.BadServerResponse,
                                    Types.XenAPIException,
                                    org.apache.xmlrpc.XmlRpcException

  Get a reference to the network instance with the specified UUID.

  Parameters:
    `uuid` - UUID of object to return
  Returns:
    reference to the object
  Throws:
    `Types.BadServerResponse`
    `Types.XenAPIException`
    `org.apache.xmlrpc.XmlRpcException`

### createAsync

    public static Task createAsync(Connection c,
                                   Network.Record record)
                            throws Types.BadServerResponse,
                                   Types.XenAPIException,
                                   org.apache.xmlrpc.XmlRpcException

  Create a new network instance, and return its handle.

  Parameters:
    `record` - All constructor arguments
  Returns:
    Task
  Throws:
    `Types.BadServerResponse`
    `Types.XenAPIException`
    `org.apache.xmlrpc.XmlRpcException`

### create

    public static Network create(Connection c,
                                 Network.Record record)
                          throws Types.BadServerResponse,
                                 Types.XenAPIException,
                                 org.apache.xmlrpc.XmlRpcException

  Create a new network instance, and return its handle.

  Parameters:
    `record` - All constructor arguments
  Returns:
    reference to the newly created object
  Throws:
    `Types.BadServerResponse`
    `Types.XenAPIException`
    `org.apache.xmlrpc.XmlRpcException`

### destroyAsync

    public Task destroyAsync(Connection c)
                      throws Types.BadServerResponse,
                             Types.XenAPIException,
                             org.apache.xmlrpc.XmlRpcException

  Destroy the specified network instance.

  Returns:
    Task
  Throws:
    `Types.BadServerResponse`
    `Types.XenAPIException`
    `org.apache.xmlrpc.XmlRpcException`

### destroy

    public void destroy(Connection c)
                 throws Types.BadServerResponse,
                        Types.XenAPIException,
                        org.apache.xmlrpc.XmlRpcException

  Destroy the specified network instance.

  Throws:
    `Types.BadServerResponse`
    `Types.XenAPIException`
    `org.apache.xmlrpc.XmlRpcException`

### getByNameLabel

    public static Set<Network> getByNameLabel(Connection c,
                                              String label)
                                       throws Types.BadServerResponse,
                                              Types.XenAPIException,
                                              org.apache.xmlrpc.XmlRpcException

  Get all the network instances with the given label.

  Parameters:
    `label` - label of object to return
  Returns:
    references to objects with matching names
  Throws:
    `Types.BadServerResponse`
    `Types.XenAPIException`
    `org.apache.xmlrpc.XmlRpcException`

### getUuid

    public String getUuid(Connection c)
                   throws Types.BadServerResponse,
                          Types.XenAPIException,
                          org.apache.xmlrpc.XmlRpcException

  Get the uuid field of the given network.

  Returns:
    value of the field
  Throws:
    `Types.BadServerResponse`
    `Types.XenAPIException`
    `org.apache.xmlrpc.XmlRpcException`

### getNameLabel

    public String getNameLabel(Connection c)
                        throws Types.BadServerResponse,
                               Types.XenAPIException,
                               org.apache.xmlrpc.XmlRpcException

  Get the name/label field of the given network.

  Returns:
    value of the field
  Throws:
    `Types.BadServerResponse`
    `Types.XenAPIException`
    `org.apache.xmlrpc.XmlRpcException`

### getNameDescription

    public String getNameDescription(Connection c)
                              throws Types.BadServerResponse,
                                     Types.XenAPIException,
                                     org.apache.xmlrpc.XmlRpcException

  Get the name/description field of the given network.

  Returns:
    value of the field
  Throws:
    `Types.BadServerResponse`
    `Types.XenAPIException`
    `org.apache.xmlrpc.XmlRpcException`

### getAllowedOperations

    public Set<Types.NetworkOperations> getAllowedOperations(Connection c)
                                                      throws Types.BadServerResponse,
                                                             Types.XenAPIException,
                                                             org.apache.xmlrpc.XmlRpcException

  Get the allowed_operations field of the given network.

  Returns:
    value of the field
  Throws:
    `Types.BadServerResponse`
    `Types.XenAPIException`
    `org.apache.xmlrpc.XmlRpcException`

### getCurrentOperations

    public Map<String,Types.NetworkOperations> getCurrentOperations(Connection c)
                                                             throws Types.BadServerResponse,
                                                                    Types.XenAPIException,
                                                                    org.apache.xmlrpc.XmlRpcException

  Get the current_operations field of the given network.

  Returns:
    value of the field
  Throws:
    `Types.BadServerResponse`
    `Types.XenAPIException`
    `org.apache.xmlrpc.XmlRpcException`

### getVIFs

    public Set<VIF> getVIFs(Connection c)
                     throws Types.BadServerResponse,
                            Types.XenAPIException,
                            org.apache.xmlrpc.XmlRpcException

  Get the VIFs field of the given network.

  Returns:
    value of the field
  Throws:
    `Types.BadServerResponse`
    `Types.XenAPIException`
    `org.apache.xmlrpc.XmlRpcException`

### getPIFs

    public Set<PIF> getPIFs(Connection c)
                     throws Types.BadServerResponse,
                            Types.XenAPIException,
                            org.apache.xmlrpc.XmlRpcException

  Get the PIFs field of the given network.

  Returns:
    value of the field
  Throws:
    `Types.BadServerResponse`
    `Types.XenAPIException`
    `org.apache.xmlrpc.XmlRpcException`

### getMTU

    public Long getMTU(Connection c)
                throws Types.BadServerResponse,
                       Types.XenAPIException,
                       org.apache.xmlrpc.XmlRpcException

  Get the MTU field of the given network.

  Returns:
    value of the field
  Throws:
    `Types.BadServerResponse`
    `Types.XenAPIException`
    `org.apache.xmlrpc.XmlRpcException`

### getOtherConfig

    public Map<String,String> getOtherConfig(Connection c)
                                      throws Types.BadServerResponse,
                                             Types.XenAPIException,
                                             org.apache.xmlrpc.XmlRpcException

  Get the other_config field of the given network.

  Returns:
    value of the field
  Throws:
    `Types.BadServerResponse`
    `Types.XenAPIException`
    `org.apache.xmlrpc.XmlRpcException`

### getBridge

    public String getBridge(Connection c)
                     throws Types.BadServerResponse,
                            Types.XenAPIException,
                            org.apache.xmlrpc.XmlRpcException

  Get the bridge field of the given network.

  Returns:
    value of the field
  Throws:
    `Types.BadServerResponse`
    `Types.XenAPIException`
    `org.apache.xmlrpc.XmlRpcException`

### getBlobs

    public Map<String,Blob> getBlobs(Connection c)
                              throws Types.BadServerResponse,
                                     Types.XenAPIException,
                                     org.apache.xmlrpc.XmlRpcException

  Get the blobs field of the given network.

  Returns:
    value of the field
  Throws:
    `Types.BadServerResponse`
    `Types.XenAPIException`
    `org.apache.xmlrpc.XmlRpcException`

### getTags

    public Set<String> getTags(Connection c)
                        throws Types.BadServerResponse,
                               Types.XenAPIException,
                               org.apache.xmlrpc.XmlRpcException

  Get the tags field of the given network.

  Returns:
    value of the field
  Throws:
    `Types.BadServerResponse`
    `Types.XenAPIException`
    `org.apache.xmlrpc.XmlRpcException`

### getDefaultLockingMode

    public Types.NetworkDefaultLockingMode getDefaultLockingMode(Connection c)
                                                          throws Types.BadServerResponse,
                                                                 Types.XenAPIException,
                                                                 org.apache.xmlrpc.XmlRpcException

  Get the default_locking_mode field of the given network.

  Returns:
    value of the field
  Throws:
    `Types.BadServerResponse`
    `Types.XenAPIException`
    `org.apache.xmlrpc.XmlRpcException`

### setNameLabel

    public void setNameLabel(Connection c,
                             String label)
                      throws Types.BadServerResponse,
                             Types.XenAPIException,
                             org.apache.xmlrpc.XmlRpcException

  Set the name/label field of the given network.

  Parameters:
    `label` - New value to set
  Throws:
    `Types.BadServerResponse`
    `Types.XenAPIException`
    `org.apache.xmlrpc.XmlRpcException`

### setNameDescription

    public void setNameDescription(Connection c,
                                   String description)
                            throws Types.BadServerResponse,
                                   Types.XenAPIException,
                                   org.apache.xmlrpc.XmlRpcException

  Set the name/description field of the given network.

  Parameters:
    `description` - New value to set
  Throws:
    `Types.BadServerResponse`
    `Types.XenAPIException`
    `org.apache.xmlrpc.XmlRpcException`

### setMTU

    public void setMTU(Connection c,
                       Long MTU)
                throws Types.BadServerResponse,
                       Types.XenAPIException,
                       org.apache.xmlrpc.XmlRpcException

  Set the MTU field of the given network.

  Parameters:
    `MTU` - New value to set
  Throws:
    `Types.BadServerResponse`
    `Types.XenAPIException`
    `org.apache.xmlrpc.XmlRpcException`

### setOtherConfig

    public void setOtherConfig(Connection c,
                               Map<String,String> otherConfig)
                        throws Types.BadServerResponse,
                               Types.XenAPIException,
                               org.apache.xmlrpc.XmlRpcException

  Set the other_config field of the given network.

  Parameters:
    `otherConfig` - New value to set
  Throws:
    `Types.BadServerResponse`
    `Types.XenAPIException`
    `org.apache.xmlrpc.XmlRpcException`

### addToOtherConfig

    public void addToOtherConfig(Connection c,
                                 String key,
                                 String value)
                          throws Types.BadServerResponse,
                                 Types.XenAPIException,
                                 org.apache.xmlrpc.XmlRpcException

  Add the given key-value pair to the other_config field of the given network.

  Parameters:
    `key` - Key to add
    `value` - Value to add
  Throws:
    `Types.BadServerResponse`
    `Types.XenAPIException`
    `org.apache.xmlrpc.XmlRpcException`

### removeFromOtherConfig

    public void removeFromOtherConfig(Connection c,
                                      String key)
                               throws Types.BadServerResponse,
                                      Types.XenAPIException,
                                      org.apache.xmlrpc.XmlRpcException

  Remove the given key and its corresponding value from the other_config field of the given network. If the key is not in that Map, then do nothing.

  Parameters:
    `key` - Key to remove
  Throws:
    `Types.BadServerResponse`
    `Types.XenAPIException`
    `org.apache.xmlrpc.XmlRpcException`

### setTags

    public void setTags(Connection c,
                        Set<String> tags)
                 throws Types.BadServerResponse,
                        Types.XenAPIException,
                        org.apache.xmlrpc.XmlRpcException

  Set the tags field of the given network.

  Parameters:
    `tags` - New value to set
  Throws:
    `Types.BadServerResponse`
    `Types.XenAPIException`
    `org.apache.xmlrpc.XmlRpcException`

### addTags

    public void addTags(Connection c,
                        String value)
                 throws Types.BadServerResponse,
                        Types.XenAPIException,
                        org.apache.xmlrpc.XmlRpcException

  Add the given value to the tags field of the given network. If the value is already in that Set, then do nothing.

  Parameters:
    `value` - New value to add
  Throws:
    `Types.BadServerResponse`
    `Types.XenAPIException`
    `org.apache.xmlrpc.XmlRpcException`

### removeTags

    public void removeTags(Connection c,
                           String value)
                    throws Types.BadServerResponse,
                           Types.XenAPIException,
                           org.apache.xmlrpc.XmlRpcException

  Remove the given value from the tags field of the given network. If the value is not in that Set, then do nothing.

  Parameters:
    `value` - Value to remove
  Throws:
    `Types.BadServerResponse`
    `Types.XenAPIException`
    `org.apache.xmlrpc.XmlRpcException`

### createNewBlobAsync

    public Task createNewBlobAsync(Connection c,
                                   String name,
                                   String mimeType,
                                   Boolean _public)
                            throws Types.BadServerResponse,
                                   Types.XenAPIException,
                                   org.apache.xmlrpc.XmlRpcException

  Create a placeholder for a named binary blob of data that is associated with this pool

  Parameters:
    `name` - The name associated with the blob
    `mimeType` - The mime type for the data. Empty string translates to application/octet-stream
    `_public` - True if the blob should be publicly available
  Returns:
    Task
  Throws:
    `Types.BadServerResponse`
    `Types.XenAPIException`
    `org.apache.xmlrpc.XmlRpcException`

### createNewBlob

    public Blob createNewBlob(Connection c,
                              String name,
                              String mimeType,
                              Boolean _public)
                       throws Types.BadServerResponse,
                              Types.XenAPIException,
                              org.apache.xmlrpc.XmlRpcException

  Create a placeholder for a named binary blob of data that is associated with this pool

  Parameters:
    `name` - The name associated with the blob
    `mimeType` - The mime type for the data. Empty string translates to application/octet-stream
    `_public` - True if the blob should be publicly available
  Returns:
    The reference of the blob, needed for populating its data
  Throws:
    `Types.BadServerResponse`
    `Types.XenAPIException`
    `org.apache.xmlrpc.XmlRpcException`

### setDefaultLockingModeAsync

    public Task setDefaultLockingModeAsync(Connection c,
                                           Types.NetworkDefaultLockingMode value)
                                    throws Types.BadServerResponse,
                                           Types.XenAPIException,
                                           org.apache.xmlrpc.XmlRpcException

  Set the default locking mode for VIFs attached to this network

  Parameters:
    `value` - The default locking mode for VIFs attached to this network.
  Returns:
    Task
  Throws:
    `Types.BadServerResponse`
    `Types.XenAPIException`
    `org.apache.xmlrpc.XmlRpcException`

### setDefaultLockingMode

    public void setDefaultLockingMode(Connection c,
                                      Types.NetworkDefaultLockingMode value)
                               throws Types.BadServerResponse,
                                      Types.XenAPIException,
                                      org.apache.xmlrpc.XmlRpcException

  Set the default locking mode for VIFs attached to this network

  Parameters:
    `value` - The default locking mode for VIFs attached to this network.
  Throws:
    `Types.BadServerResponse`
    `Types.XenAPIException`
    `org.apache.xmlrpc.XmlRpcException`

### getAll

    public static Set<Network> getAll(Connection c)
                               throws Types.BadServerResponse,
                                      Types.XenAPIException,
                                      org.apache.xmlrpc.XmlRpcException

  Return a list of all the networks known to the system.

  Returns:
    references to all objects
  Throws:
    `Types.BadServerResponse`
    `Types.XenAPIException`
    `org.apache.xmlrpc.XmlRpcException`

### getAllRecords

    public static Map<Network,Network.Record> getAllRecords(Connection c)
                                                     throws Types.BadServerResponse,
                                                            Types.XenAPIException,
                                                            org.apache.xmlrpc.XmlRpcException

  Return a map of network references to network records for all networks known to the system.

  Returns:
    records of all objects
  Throws:
    `Types.BadServerResponse`
    `Types.XenAPIException`
    `org.apache.xmlrpc.XmlRpcException`

Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD