Class Network


public class Network extends XenAPIObject
A virtual network First published in XenServer 4.0.
Author:
Cloud Software Group, Inc.
  • Field Details

    • ref

      protected final String ref
      The XenAPI reference (OpaqueRef) to this object.
  • Method Details

    • 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. Minimum allowed role: read-only First published in XenServer 4.0.
      Parameters:
      c - The connection the call is made on
      Returns:
      all fields from the object
      Throws:
      Types.BadServerResponse - Thrown if the response from the server contains an invalid status.
      Types.XenAPIException - Thrown if the call failed.
      org.apache.xmlrpc.XmlRpcException - Thrown if the result of an asynchronous call could not be parsed.
    • 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. Minimum allowed role: read-only First published in XenServer 4.0.
      Parameters:
      c - The connection the call is made on
      uuid - UUID of object to return
      Returns:
      reference to the object
      Throws:
      Types.BadServerResponse - Thrown if the response from the server contains an invalid status.
      Types.XenAPIException - Thrown if the call failed.
      org.apache.xmlrpc.XmlRpcException - Thrown if the result of an asynchronous call could not be parsed.
    • 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. Minimum allowed role: vm-admin First published in XenServer 4.0.
      Parameters:
      c - The connection the call is made on
      record - All constructor arguments
      Returns:
      Task
      Throws:
      Types.BadServerResponse - Thrown if the response from the server contains an invalid status.
      Types.XenAPIException - Thrown if the call failed.
      org.apache.xmlrpc.XmlRpcException - Thrown if the result of an asynchronous call could not be parsed.
    • 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. Minimum allowed role: vm-admin First published in XenServer 4.0.
      Parameters:
      c - The connection the call is made on
      record - All constructor arguments
      Returns:
      reference to the newly created object
      Throws:
      Types.BadServerResponse - Thrown if the response from the server contains an invalid status.
      Types.XenAPIException - Thrown if the call failed.
      org.apache.xmlrpc.XmlRpcException - Thrown if the result of an asynchronous call could not be parsed.
    • destroyAsync

      public Task destroyAsync(Connection c) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException
      Destroy the specified network instance. Minimum allowed role: vm-admin First published in XenServer 4.0.
      Parameters:
      c - The connection the call is made on
      Returns:
      Task
      Throws:
      Types.BadServerResponse - Thrown if the response from the server contains an invalid status.
      Types.XenAPIException - Thrown if the call failed.
      org.apache.xmlrpc.XmlRpcException - Thrown if the result of an asynchronous call could not be parsed.
    • destroy

      public void destroy(Connection c) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException
      Destroy the specified network instance. Minimum allowed role: vm-admin First published in XenServer 4.0.
      Parameters:
      c - The connection the call is made on
      Throws:
      Types.BadServerResponse - Thrown if the response from the server contains an invalid status.
      Types.XenAPIException - Thrown if the call failed.
      org.apache.xmlrpc.XmlRpcException - Thrown if the result of an asynchronous call could not be parsed.
    • 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. Minimum allowed role: read-only First published in XenServer 4.0.
      Parameters:
      c - The connection the call is made on
      label - label of object to return
      Returns:
      references to objects with matching names
      Throws:
      Types.BadServerResponse - Thrown if the response from the server contains an invalid status.
      Types.XenAPIException - Thrown if the call failed.
      org.apache.xmlrpc.XmlRpcException - Thrown if the result of an asynchronous call could not be parsed.
    • getUuid

      public String getUuid(Connection c) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException
      Get the uuid field of the given network. Minimum allowed role: read-only First published in XenServer 4.0.
      Parameters:
      c - The connection the call is made on
      Returns:
      value of the field
      Throws:
      Types.BadServerResponse - Thrown if the response from the server contains an invalid status.
      Types.XenAPIException - Thrown if the call failed.
      org.apache.xmlrpc.XmlRpcException - Thrown if the result of an asynchronous call could not be parsed.
    • getNameLabel

      public String getNameLabel(Connection c) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException
      Get the name/label field of the given network. Minimum allowed role: read-only First published in XenServer 4.0.
      Parameters:
      c - The connection the call is made on
      Returns:
      value of the field
      Throws:
      Types.BadServerResponse - Thrown if the response from the server contains an invalid status.
      Types.XenAPIException - Thrown if the call failed.
      org.apache.xmlrpc.XmlRpcException - Thrown if the result of an asynchronous call could not be parsed.
    • getNameDescription

      public String getNameDescription(Connection c) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException
      Get the name/description field of the given network. Minimum allowed role: read-only First published in XenServer 4.0.
      Parameters:
      c - The connection the call is made on
      Returns:
      value of the field
      Throws:
      Types.BadServerResponse - Thrown if the response from the server contains an invalid status.
      Types.XenAPIException - Thrown if the call failed.
      org.apache.xmlrpc.XmlRpcException - Thrown if the result of an asynchronous call could not be parsed.
    • 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. Minimum allowed role: read-only First published in XenServer 4.0.
      Parameters:
      c - The connection the call is made on
      Returns:
      value of the field
      Throws:
      Types.BadServerResponse - Thrown if the response from the server contains an invalid status.
      Types.XenAPIException - Thrown if the call failed.
      org.apache.xmlrpc.XmlRpcException - Thrown if the result of an asynchronous call could not be parsed.
    • 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. Minimum allowed role: read-only First published in XenServer 4.0.
      Parameters:
      c - The connection the call is made on
      Returns:
      value of the field
      Throws:
      Types.BadServerResponse - Thrown if the response from the server contains an invalid status.
      Types.XenAPIException - Thrown if the call failed.
      org.apache.xmlrpc.XmlRpcException - Thrown if the result of an asynchronous call could not be parsed.
    • getVIFs

      public Set<VIF> getVIFs(Connection c) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException
      Get the VIFs field of the given network. Minimum allowed role: read-only First published in XenServer 4.0.
      Parameters:
      c - The connection the call is made on
      Returns:
      value of the field
      Throws:
      Types.BadServerResponse - Thrown if the response from the server contains an invalid status.
      Types.XenAPIException - Thrown if the call failed.
      org.apache.xmlrpc.XmlRpcException - Thrown if the result of an asynchronous call could not be parsed.
    • getPIFs

      public Set<PIF> getPIFs(Connection c) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException
      Get the PIFs field of the given network. Minimum allowed role: read-only First published in XenServer 4.0.
      Parameters:
      c - The connection the call is made on
      Returns:
      value of the field
      Throws:
      Types.BadServerResponse - Thrown if the response from the server contains an invalid status.
      Types.XenAPIException - Thrown if the call failed.
      org.apache.xmlrpc.XmlRpcException - Thrown if the result of an asynchronous call could not be parsed.
    • getMTU

      public Long getMTU(Connection c) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException
      Get the MTU field of the given network. Minimum allowed role: read-only First published in XenServer 5.6.
      Parameters:
      c - The connection the call is made on
      Returns:
      value of the field
      Throws:
      Types.BadServerResponse - Thrown if the response from the server contains an invalid status.
      Types.XenAPIException - Thrown if the call failed.
      org.apache.xmlrpc.XmlRpcException - Thrown if the result of an asynchronous call could not be parsed.
    • 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. Minimum allowed role: read-only First published in XenServer 4.0.
      Parameters:
      c - The connection the call is made on
      Returns:
      value of the field
      Throws:
      Types.BadServerResponse - Thrown if the response from the server contains an invalid status.
      Types.XenAPIException - Thrown if the call failed.
      org.apache.xmlrpc.XmlRpcException - Thrown if the result of an asynchronous call could not be parsed.
    • getBridge

      public String getBridge(Connection c) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException
      Get the bridge field of the given network. Minimum allowed role: read-only First published in XenServer 4.0.
      Parameters:
      c - The connection the call is made on
      Returns:
      value of the field
      Throws:
      Types.BadServerResponse - Thrown if the response from the server contains an invalid status.
      Types.XenAPIException - Thrown if the call failed.
      org.apache.xmlrpc.XmlRpcException - Thrown if the result of an asynchronous call could not be parsed.
    • getManaged

      public Boolean getManaged(Connection c) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException
      Get the managed field of the given network. Minimum allowed role: read-only First published in XenServer 7.2.
      Parameters:
      c - The connection the call is made on
      Returns:
      value of the field
      Throws:
      Types.BadServerResponse - Thrown if the response from the server contains an invalid status.
      Types.XenAPIException - Thrown if the call failed.
      org.apache.xmlrpc.XmlRpcException - Thrown if the result of an asynchronous call could not be parsed.
    • 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. Minimum allowed role: read-only First published in XenServer 5.0.
      Parameters:
      c - The connection the call is made on
      Returns:
      value of the field
      Throws:
      Types.BadServerResponse - Thrown if the response from the server contains an invalid status.
      Types.XenAPIException - Thrown if the call failed.
      org.apache.xmlrpc.XmlRpcException - Thrown if the result of an asynchronous call could not be parsed.
    • getTags

      public Set<String> getTags(Connection c) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException
      Get the tags field of the given network. Minimum allowed role: read-only First published in XenServer 5.0.
      Parameters:
      c - The connection the call is made on
      Returns:
      value of the field
      Throws:
      Types.BadServerResponse - Thrown if the response from the server contains an invalid status.
      Types.XenAPIException - Thrown if the call failed.
      org.apache.xmlrpc.XmlRpcException - Thrown if the result of an asynchronous call could not be parsed.
    • 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. Minimum allowed role: read-only First published in XenServer 6.1.
      Parameters:
      c - The connection the call is made on
      Returns:
      value of the field
      Throws:
      Types.BadServerResponse - Thrown if the response from the server contains an invalid status.
      Types.XenAPIException - Thrown if the call failed.
      org.apache.xmlrpc.XmlRpcException - Thrown if the result of an asynchronous call could not be parsed.
    • getAssignedIps

      public Map<VIF,String> getAssignedIps(Connection c) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException
      Get the assigned_ips field of the given network. Minimum allowed role: read-only First published in XenServer 6.5.
      Parameters:
      c - The connection the call is made on
      Returns:
      value of the field
      Throws:
      Types.BadServerResponse - Thrown if the response from the server contains an invalid status.
      Types.XenAPIException - Thrown if the call failed.
      org.apache.xmlrpc.XmlRpcException - Thrown if the result of an asynchronous call could not be parsed.
    • getPurpose

      public Set<Types.NetworkPurpose> getPurpose(Connection c) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException
      Get the purpose field of the given network. Minimum allowed role: read-only First published in XenServer 7.3.
      Parameters:
      c - The connection the call is made on
      Returns:
      value of the field
      Throws:
      Types.BadServerResponse - Thrown if the response from the server contains an invalid status.
      Types.XenAPIException - Thrown if the call failed.
      org.apache.xmlrpc.XmlRpcException - Thrown if the result of an asynchronous call could not be parsed.
    • 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. Minimum allowed role: pool-operator First published in XenServer 4.0.
      Parameters:
      c - The connection the call is made on
      label - New value to set
      Throws:
      Types.BadServerResponse - Thrown if the response from the server contains an invalid status.
      Types.XenAPIException - Thrown if the call failed.
      org.apache.xmlrpc.XmlRpcException - Thrown if the result of an asynchronous call could not be parsed.
    • 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. Minimum allowed role: pool-operator First published in XenServer 4.0.
      Parameters:
      c - The connection the call is made on
      description - New value to set
      Throws:
      Types.BadServerResponse - Thrown if the response from the server contains an invalid status.
      Types.XenAPIException - Thrown if the call failed.
      org.apache.xmlrpc.XmlRpcException - Thrown if the result of an asynchronous call could not be parsed.
    • 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. Minimum allowed role: vm-admin First published in XenServer 5.6.
      Parameters:
      c - The connection the call is made on
      MTU - New value to set
      Throws:
      Types.BadServerResponse - Thrown if the response from the server contains an invalid status.
      Types.XenAPIException - Thrown if the call failed.
      org.apache.xmlrpc.XmlRpcException - Thrown if the result of an asynchronous call could not be parsed.
    • 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. Minimum allowed role: pool-operator First published in XenServer 4.0.
      Parameters:
      c - The connection the call is made on
      otherConfig - New value to set
      Throws:
      Types.BadServerResponse - Thrown if the response from the server contains an invalid status.
      Types.XenAPIException - Thrown if the call failed.
      org.apache.xmlrpc.XmlRpcException - Thrown if the result of an asynchronous call could not be parsed.
    • 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. Minimum allowed role: pool-operator First published in XenServer 4.0.
      Parameters:
      c - The connection the call is made on
      key - Key to add
      value - Value to add
      Throws:
      Types.BadServerResponse - Thrown if the response from the server contains an invalid status.
      Types.XenAPIException - Thrown if the call failed.
      org.apache.xmlrpc.XmlRpcException - Thrown if the result of an asynchronous call could not be parsed.
    • 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. Minimum allowed role: pool-operator First published in XenServer 4.0.
      Parameters:
      c - The connection the call is made on
      key - Key to remove
      Throws:
      Types.BadServerResponse - Thrown if the response from the server contains an invalid status.
      Types.XenAPIException - Thrown if the call failed.
      org.apache.xmlrpc.XmlRpcException - Thrown if the result of an asynchronous call could not be parsed.
    • 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. Minimum allowed role: vm-operator First published in XenServer 5.0.
      Parameters:
      c - The connection the call is made on
      tags - New value to set
      Throws:
      Types.BadServerResponse - Thrown if the response from the server contains an invalid status.
      Types.XenAPIException - Thrown if the call failed.
      org.apache.xmlrpc.XmlRpcException - Thrown if the result of an asynchronous call could not be parsed.
    • 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. Minimum allowed role: vm-operator First published in XenServer 5.0.
      Parameters:
      c - The connection the call is made on
      value - New value to add
      Throws:
      Types.BadServerResponse - Thrown if the response from the server contains an invalid status.
      Types.XenAPIException - Thrown if the call failed.
      org.apache.xmlrpc.XmlRpcException - Thrown if the result of an asynchronous call could not be parsed.
    • 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. Minimum allowed role: vm-operator First published in XenServer 5.0.
      Parameters:
      c - The connection the call is made on
      value - Value to remove
      Throws:
      Types.BadServerResponse - Thrown if the response from the server contains an invalid status.
      Types.XenAPIException - Thrown if the call failed.
      org.apache.xmlrpc.XmlRpcException - Thrown if the result of an asynchronous call could not be parsed.
    • createNewBlobAsync

      public Task createNewBlobAsync(Connection c, String name, String mimeType) 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 Minimum allowed role: pool-operator First published in XenServer 5.0.
      Parameters:
      c - The connection the call is made on
      name - The name associated with the blob
      mimeType - The mime type for the data. Empty string translates to application/octet-stream
      Returns:
      Task
      Throws:
      Types.BadServerResponse - Thrown if the response from the server contains an invalid status.
      Types.XenAPIException - Thrown if the call failed.
      org.apache.xmlrpc.XmlRpcException - Thrown if the result of an asynchronous call could not be parsed.
    • createNewBlob

      public Blob createNewBlob(Connection c, String name, String mimeType) 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 Minimum allowed role: pool-operator First published in XenServer 5.0.
      Parameters:
      c - The connection the call is made on
      name - The name associated with the blob
      mimeType - The mime type for the data. Empty string translates to application/octet-stream
      Returns:
      The reference of the blob, needed for populating its data
      Throws:
      Types.BadServerResponse - Thrown if the response from the server contains an invalid status.
      Types.XenAPIException - Thrown if the call failed.
      org.apache.xmlrpc.XmlRpcException - Thrown if the result of an asynchronous call could not be parsed.
    • 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 Minimum allowed role: pool-operator First published in XenServer 5.0.
      Parameters:
      c - The connection the call is made on
      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 First published in XenServer 6.1.
      Returns:
      Task
      Throws:
      Types.BadServerResponse - Thrown if the response from the server contains an invalid status.
      Types.XenAPIException - Thrown if the call failed.
      org.apache.xmlrpc.XmlRpcException - Thrown if the result of an asynchronous call could not be parsed.
    • 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 Minimum allowed role: pool-operator First published in XenServer 5.0.
      Parameters:
      c - The connection the call is made on
      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 First published in XenServer 6.1.
      Returns:
      The reference of the blob, needed for populating its data
      Throws:
      Types.BadServerResponse - Thrown if the response from the server contains an invalid status.
      Types.XenAPIException - Thrown if the call failed.
      org.apache.xmlrpc.XmlRpcException - Thrown if the result of an asynchronous call could not be parsed.
    • 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 Minimum allowed role: pool-operator First published in XenServer 6.1.
      Parameters:
      c - The connection the call is made on
      value - The default locking mode for VIFs attached to this network.
      Returns:
      Task
      Throws:
      Types.BadServerResponse - Thrown if the response from the server contains an invalid status.
      Types.XenAPIException - Thrown if the call failed.
      org.apache.xmlrpc.XmlRpcException - Thrown if the result of an asynchronous call could not be parsed.
    • 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 Minimum allowed role: pool-operator First published in XenServer 6.1.
      Parameters:
      c - The connection the call is made on
      value - The default locking mode for VIFs attached to this network.
      Throws:
      Types.BadServerResponse - Thrown if the response from the server contains an invalid status.
      Types.XenAPIException - Thrown if the call failed.
      org.apache.xmlrpc.XmlRpcException - Thrown if the result of an asynchronous call could not be parsed.
    • addPurposeAsync

      public Task addPurposeAsync(Connection c, Types.NetworkPurpose value) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException, Types.NetworkIncompatiblePurposes
      Give a network a new purpose (if not present already) Minimum allowed role: pool-admin First published in XenServer 7.3.
      Parameters:
      c - The connection the call is made on
      value - The purpose to add
      Returns:
      Task
      Throws:
      Types.BadServerResponse - Thrown if the response from the server contains an invalid status.
      Types.XenAPIException - Thrown if the call failed.
      org.apache.xmlrpc.XmlRpcException - Thrown if the result of an asynchronous call could not be parsed.
      Types.NetworkIncompatiblePurposes - You tried to add a purpose to a network but the new purpose is not compatible with an existing purpose of the network or other networks.
    • addPurpose

      public void addPurpose(Connection c, Types.NetworkPurpose value) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException, Types.NetworkIncompatiblePurposes
      Give a network a new purpose (if not present already) Minimum allowed role: pool-admin First published in XenServer 7.3.
      Parameters:
      c - The connection the call is made on
      value - The purpose to add
      Throws:
      Types.BadServerResponse - Thrown if the response from the server contains an invalid status.
      Types.XenAPIException - Thrown if the call failed.
      org.apache.xmlrpc.XmlRpcException - Thrown if the result of an asynchronous call could not be parsed.
      Types.NetworkIncompatiblePurposes - You tried to add a purpose to a network but the new purpose is not compatible with an existing purpose of the network or other networks.
    • removePurposeAsync

      public Task removePurposeAsync(Connection c, Types.NetworkPurpose value) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException
      Remove a purpose from a network (if present) Minimum allowed role: pool-admin First published in XenServer 7.3.
      Parameters:
      c - The connection the call is made on
      value - The purpose to remove
      Returns:
      Task
      Throws:
      Types.BadServerResponse - Thrown if the response from the server contains an invalid status.
      Types.XenAPIException - Thrown if the call failed.
      org.apache.xmlrpc.XmlRpcException - Thrown if the result of an asynchronous call could not be parsed.
    • removePurpose

      public void removePurpose(Connection c, Types.NetworkPurpose value) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException
      Remove a purpose from a network (if present) Minimum allowed role: pool-admin First published in XenServer 7.3.
      Parameters:
      c - The connection the call is made on
      value - The purpose to remove
      Throws:
      Types.BadServerResponse - Thrown if the response from the server contains an invalid status.
      Types.XenAPIException - Thrown if the call failed.
      org.apache.xmlrpc.XmlRpcException - Thrown if the result of an asynchronous call could not be parsed.
    • 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. Minimum allowed role: read-only First published in XenServer 4.0.
      Parameters:
      c - The connection the call is made on
      Returns:
      references to all objects
      Throws:
      Types.BadServerResponse - Thrown if the response from the server contains an invalid status.
      Types.XenAPIException - Thrown if the call failed.
      org.apache.xmlrpc.XmlRpcException - Thrown if the result of an asynchronous call could not be parsed.
    • 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. Minimum allowed role: read-only First published in XenServer 4.0.
      Parameters:
      c - The connection the call is made on
      Returns:
      records of all objects
      Throws:
      Types.BadServerResponse - Thrown if the response from the server contains an invalid status.
      Types.XenAPIException - Thrown if the call failed.
      org.apache.xmlrpc.XmlRpcException - Thrown if the result of an asynchronous call could not be parsed.