Package com.xensource.xenapi
Class Network
java.lang.Object
com.xensource.xenapi.XenAPIObject
com.xensource.xenapi.Network
A virtual network
First published in XenServer 4.0.
- Author:
- Cloud Software Group, Inc.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
Represents all the fields in a Network -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionvoid
addPurpose
(Connection c, Types.NetworkPurpose value) Give a network a new purpose (if not present already) Minimum allowed role: pool-admin First published in XenServer 7.3.addPurposeAsync
(Connection c, Types.NetworkPurpose value) Give a network a new purpose (if not present already) Minimum allowed role: pool-admin First published in XenServer 7.3.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.createNewBlob
(Connection c, String name, String mimeType) 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.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 Minimum allowed role: pool-operator First published in XenServer 5.0.createNewBlobAsync
(Connection c, String name, String mimeType) 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.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 Minimum allowed role: pool-operator First published in XenServer 5.0.void
Destroy the specified network instance.Destroy the specified network instance.boolean
If obj is a Network, compares XenAPI references for equality.getAll
(Connection c) Return a list of all the networks known to the system.Get the allowed_operations field of the given network.static Map<Network,
Network.Record> Return a map of network references to network records for all networks known to the system.Get the assigned_ips field of the given network.Get the blobs field of the given network.Get the bridge field of the given 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.Get the current_operations field of the given network.Get the default_locking_mode field of the given network.Get the managed field of the given network.getMTU
(Connection c) Get the MTU field of the given network.Get the name/description field of the given network.Get the name/label field of the given network.Get the other_config field of the given network.Get the PIFs field of the given network.Get the purpose field of the given network.Get a record containing the current state of the given network.Get the tags field of the given network.Get the uuid field of the given network.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
removePurpose
(Connection c, Types.NetworkPurpose value) Remove a purpose from a network (if present) Minimum allowed role: pool-admin First published in XenServer 7.3.removePurposeAsync
(Connection c, Types.NetworkPurpose value) Remove a purpose from a network (if present) Minimum allowed role: pool-admin First published in XenServer 7.3.void
removeTags
(Connection c, String value) Remove the given value from the tags field of the given network.void
Set the default locking mode for VIFs attached to this network Minimum allowed role: pool-operator First published in XenServer 6.1.Set the default locking mode for VIFs attached to this network Minimum allowed role: pool-operator First published in XenServer 6.1.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.Methods inherited from class com.xensource.xenapi.XenAPIObject
isNull
-
Field Details
-
ref
The XenAPI reference (OpaqueRef) to this object.
-
-
Method Details
-
toWireString
- Specified by:
toWireString
in classXenAPIObject
- Returns:
- The XenAPI reference (OpaqueRef) to this object.
-
equals
If obj is a Network, compares XenAPI references for equality. -
hashCode
public int hashCode() -
getRecord
public Network.Record getRecord(Connection c) throws Types.BadServerResponse, Types.XenAPIException, IOException 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
- if the call failed.IOException
- if an error occurs during a send or receive. This includes cases where a payload is invalid JSON.
-
getByUuid
public static Network getByUuid(Connection c, String uuid) throws Types.BadServerResponse, Types.XenAPIException, IOException 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 onuuid
- 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
- if the call failed.IOException
- if an error occurs during a send or receive. This includes cases where a payload is invalid JSON.
-
create
public static Network create(Connection c, Network.Record record) throws Types.BadServerResponse, Types.XenAPIException, IOException 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 onrecord
- 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
- if the call failed.IOException
- if an error occurs during a send or receive. This includes cases where a payload is invalid JSON.
-
createAsync
public static Task createAsync(Connection c, Network.Record record) throws Types.BadServerResponse, Types.XenAPIException, IOException 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 onrecord
- All constructor arguments- Returns:
- Task
- Throws:
Types.BadServerResponse
- Thrown if the response from the server contains an invalid status.Types.XenAPIException
- if the call failed.IOException
- if an error occurs during a send or receive. This includes cases where a payload is invalid JSON.
-
destroy
public void destroy(Connection c) throws Types.BadServerResponse, Types.XenAPIException, IOException 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
- if the call failed.IOException
- if an error occurs during a send or receive. This includes cases where a payload is invalid JSON.
-
destroyAsync
public Task destroyAsync(Connection c) throws Types.BadServerResponse, Types.XenAPIException, IOException 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
- if the call failed.IOException
- if an error occurs during a send or receive. This includes cases where a payload is invalid JSON.
-
getByNameLabel
public static Set<Network> getByNameLabel(Connection c, String label) throws Types.BadServerResponse, Types.XenAPIException, IOException 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 onlabel
- 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
- if the call failed.IOException
- if an error occurs during a send or receive. This includes cases where a payload is invalid JSON.
-
getUuid
public String getUuid(Connection c) throws Types.BadServerResponse, Types.XenAPIException, IOException 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
- if the call failed.IOException
- if an error occurs during a send or receive. This includes cases where a payload is invalid JSON.
-
getNameLabel
public String getNameLabel(Connection c) throws Types.BadServerResponse, Types.XenAPIException, IOException 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
- if the call failed.IOException
- if an error occurs during a send or receive. This includes cases where a payload is invalid JSON.
-
getNameDescription
public String getNameDescription(Connection c) throws Types.BadServerResponse, Types.XenAPIException, IOException 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
- if the call failed.IOException
- if an error occurs during a send or receive. This includes cases where a payload is invalid JSON.
-
getAllowedOperations
public Set<Types.NetworkOperations> getAllowedOperations(Connection c) throws Types.BadServerResponse, Types.XenAPIException, IOException 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
- if the call failed.IOException
- if an error occurs during a send or receive. This includes cases where a payload is invalid JSON.
-
getCurrentOperations
public Map<String,Types.NetworkOperations> getCurrentOperations(Connection c) throws Types.BadServerResponse, Types.XenAPIException, IOException 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
- if the call failed.IOException
- if an error occurs during a send or receive. This includes cases where a payload is invalid JSON.
-
getVIFs
public Set<VIF> getVIFs(Connection c) throws Types.BadServerResponse, Types.XenAPIException, IOException 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
- if the call failed.IOException
- if an error occurs during a send or receive. This includes cases where a payload is invalid JSON.
-
getPIFs
public Set<PIF> getPIFs(Connection c) throws Types.BadServerResponse, Types.XenAPIException, IOException 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
- if the call failed.IOException
- if an error occurs during a send or receive. This includes cases where a payload is invalid JSON.
-
getMTU
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
- if the call failed.IOException
- if an error occurs during a send or receive. This includes cases where a payload is invalid JSON.
-
getOtherConfig
public Map<String,String> getOtherConfig(Connection c) throws Types.BadServerResponse, Types.XenAPIException, IOException 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
- if the call failed.IOException
- if an error occurs during a send or receive. This includes cases where a payload is invalid JSON.
-
getBridge
public String getBridge(Connection c) throws Types.BadServerResponse, Types.XenAPIException, IOException 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
- if the call failed.IOException
- if an error occurs during a send or receive. This includes cases where a payload is invalid JSON.
-
getManaged
public Boolean getManaged(Connection c) throws Types.BadServerResponse, Types.XenAPIException, IOException 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
- if the call failed.IOException
- if an error occurs during a send or receive. This includes cases where a payload is invalid JSON.
-
getBlobs
public Map<String,Blob> getBlobs(Connection c) throws Types.BadServerResponse, Types.XenAPIException, IOException 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
- if the call failed.IOException
- if an error occurs during a send or receive. This includes cases where a payload is invalid JSON.
-
getTags
public Set<String> getTags(Connection c) throws Types.BadServerResponse, Types.XenAPIException, IOException 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
- if the call failed.IOException
- if an error occurs during a send or receive. This includes cases where a payload is invalid JSON.
-
getDefaultLockingMode
public Types.NetworkDefaultLockingMode getDefaultLockingMode(Connection c) throws Types.BadServerResponse, Types.XenAPIException, IOException 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
- if the call failed.IOException
- if an error occurs during a send or receive. This includes cases where a payload is invalid JSON.
-
getAssignedIps
public Map<VIF,String> getAssignedIps(Connection c) throws Types.BadServerResponse, Types.XenAPIException, IOException 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
- if the call failed.IOException
- if an error occurs during a send or receive. This includes cases where a payload is invalid JSON.
-
getPurpose
public Set<Types.NetworkPurpose> getPurpose(Connection c) throws Types.BadServerResponse, Types.XenAPIException, IOException 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
- if the call failed.IOException
- if an error occurs during a send or receive. This includes cases where a payload is invalid JSON.
-
setNameLabel
public void setNameLabel(Connection c, String label) throws Types.BadServerResponse, Types.XenAPIException, IOException 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 onlabel
- New value to set- Throws:
Types.BadServerResponse
- Thrown if the response from the server contains an invalid status.Types.XenAPIException
- if the call failed.IOException
- if an error occurs during a send or receive. This includes cases where a payload is invalid JSON.
-
setNameDescription
public void setNameDescription(Connection c, String description) throws Types.BadServerResponse, Types.XenAPIException, IOException 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 ondescription
- New value to set- Throws:
Types.BadServerResponse
- Thrown if the response from the server contains an invalid status.Types.XenAPIException
- if the call failed.IOException
- if an error occurs during a send or receive. This includes cases where a payload is invalid JSON.
-
setMTU
public void setMTU(Connection c, Long MTU) throws Types.BadServerResponse, Types.XenAPIException, IOException 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 onMTU
- New value to set- Throws:
Types.BadServerResponse
- Thrown if the response from the server contains an invalid status.Types.XenAPIException
- if the call failed.IOException
- if an error occurs during a send or receive. This includes cases where a payload is invalid JSON.
-
setOtherConfig
public void setOtherConfig(Connection c, Map<String, String> otherConfig) throws Types.BadServerResponse, Types.XenAPIException, IOExceptionSet 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 onotherConfig
- New value to set- Throws:
Types.BadServerResponse
- Thrown if the response from the server contains an invalid status.Types.XenAPIException
- if the call failed.IOException
- if an error occurs during a send or receive. This includes cases where a payload is invalid JSON.
-
addToOtherConfig
public void addToOtherConfig(Connection c, String key, String value) throws Types.BadServerResponse, Types.XenAPIException, IOException 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 onkey
- Key to addvalue
- Value to add- Throws:
Types.BadServerResponse
- Thrown if the response from the server contains an invalid status.Types.XenAPIException
- if the call failed.IOException
- if an error occurs during a send or receive. This includes cases where a payload is invalid JSON.
-
removeFromOtherConfig
public void removeFromOtherConfig(Connection c, String key) throws Types.BadServerResponse, Types.XenAPIException, IOException 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 onkey
- Key to remove- Throws:
Types.BadServerResponse
- Thrown if the response from the server contains an invalid status.Types.XenAPIException
- if the call failed.IOException
- if an error occurs during a send or receive. This includes cases where a payload is invalid JSON.
-
setTags
public void setTags(Connection c, Set<String> tags) throws Types.BadServerResponse, Types.XenAPIException, IOException 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 ontags
- New value to set- Throws:
Types.BadServerResponse
- Thrown if the response from the server contains an invalid status.Types.XenAPIException
- if the call failed.IOException
- if an error occurs during a send or receive. This includes cases where a payload is invalid JSON.
-
addTags
public void addTags(Connection c, String value) throws Types.BadServerResponse, Types.XenAPIException, IOException 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 onvalue
- New value to add- Throws:
Types.BadServerResponse
- Thrown if the response from the server contains an invalid status.Types.XenAPIException
- if the call failed.IOException
- if an error occurs during a send or receive. This includes cases where a payload is invalid JSON.
-
removeTags
public void removeTags(Connection c, String value) throws Types.BadServerResponse, Types.XenAPIException, IOException 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 onvalue
- Value to remove- Throws:
Types.BadServerResponse
- Thrown if the response from the server contains an invalid status.Types.XenAPIException
- if the call failed.IOException
- if an error occurs during a send or receive. This includes cases where a payload is invalid JSON.
-
createNewBlob
public Blob createNewBlob(Connection c, String name, String mimeType) throws Types.BadServerResponse, Types.XenAPIException, IOException 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 onname
- The name associated with the blobmimeType
- 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
- if the call failed.IOException
- if an error occurs during a send or receive. This includes cases where a payload is invalid JSON.
-
createNewBlob
public Blob createNewBlob(Connection c, String name, String mimeType, Boolean _public) throws Types.BadServerResponse, Types.XenAPIException, IOException 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 onname
- The name associated with the blobmimeType
- 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
- if the call failed.IOException
- if an error occurs during a send or receive. This includes cases where a payload is invalid JSON.
-
createNewBlobAsync
public Task createNewBlobAsync(Connection c, String name, String mimeType) throws Types.BadServerResponse, Types.XenAPIException, IOException 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 onname
- The name associated with the blobmimeType
- 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
- if the call failed.IOException
- if an error occurs during a send or receive. This includes cases where a payload is invalid JSON.
-
createNewBlobAsync
public Task createNewBlobAsync(Connection c, String name, String mimeType, Boolean _public) throws Types.BadServerResponse, Types.XenAPIException, IOException 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 onname
- The name associated with the blobmimeType
- 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
- if the call failed.IOException
- if an error occurs during a send or receive. This includes cases where a payload is invalid JSON.
-
setDefaultLockingMode
public void setDefaultLockingMode(Connection c, Types.NetworkDefaultLockingMode value) throws Types.BadServerResponse, Types.XenAPIException, IOException 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 onvalue
- 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
- if the call failed.IOException
- if an error occurs during a send or receive. This includes cases where a payload is invalid JSON.
-
setDefaultLockingModeAsync
public Task setDefaultLockingModeAsync(Connection c, Types.NetworkDefaultLockingMode value) throws Types.BadServerResponse, Types.XenAPIException, IOException 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 onvalue
- 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
- if the call failed.IOException
- if an error occurs during a send or receive. This includes cases where a payload is invalid JSON.
-
addPurpose
public void addPurpose(Connection c, Types.NetworkPurpose value) throws Types.BadServerResponse, Types.XenAPIException, IOException, 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 onvalue
- The purpose to add- Throws:
Types.BadServerResponse
- Thrown if the response from the server contains an invalid status.Types.XenAPIException
- if the call failed.IOException
- if an error occurs during a send or receive. This includes cases where a payload is invalid JSON.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.
-
addPurposeAsync
public Task addPurposeAsync(Connection c, Types.NetworkPurpose value) throws Types.BadServerResponse, Types.XenAPIException, IOException, 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 onvalue
- The purpose to add- Returns:
- Task
- Throws:
Types.BadServerResponse
- Thrown if the response from the server contains an invalid status.Types.XenAPIException
- if the call failed.IOException
- if an error occurs during a send or receive. This includes cases where a payload is invalid JSON.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.
-
removePurpose
public void removePurpose(Connection c, Types.NetworkPurpose value) throws Types.BadServerResponse, Types.XenAPIException, IOException 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 onvalue
- The purpose to remove- Throws:
Types.BadServerResponse
- Thrown if the response from the server contains an invalid status.Types.XenAPIException
- if the call failed.IOException
- if an error occurs during a send or receive. This includes cases where a payload is invalid JSON.
-
removePurposeAsync
public Task removePurposeAsync(Connection c, Types.NetworkPurpose value) throws Types.BadServerResponse, Types.XenAPIException, IOException 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 onvalue
- The purpose to remove- Returns:
- Task
- Throws:
Types.BadServerResponse
- Thrown if the response from the server contains an invalid status.Types.XenAPIException
- if the call failed.IOException
- if an error occurs during a send or receive. This includes cases where a payload is invalid JSON.
-
getAll
public static Set<Network> getAll(Connection c) throws Types.BadServerResponse, Types.XenAPIException, IOException 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
- if the call failed.IOException
- if an error occurs during a send or receive. This includes cases where a payload is invalid JSON.
-
getAllRecords
public static Map<Network,Network.Record> getAllRecords(Connection c) throws Types.BadServerResponse, Types.XenAPIException, IOException 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
- if the call failed.IOException
- if an error occurs during a send or receive. This includes cases where a payload is invalid JSON.
-