Class: network A virtual network
Published in: XenServer 4.0 (rio) A virtual network
Enums network_operations
Values: attaching Indicates this network is attaching to a VIF or PIF
network_default_locking_mode
Values: unlocked Treat all VIFs on this network with locking_mode = 'default' as if they have locking_mode = 'unlocked' disabled Treat all VIFs on this network with locking_mode = 'default' as if they have locking_mode = 'disabled'
network_purpose
Values: nbd Network Block Device service using TLS insecure_nbd Network Block Device service without integrity or confidentiality: NOT RECOMMENDED
Fields
enum network_operations set
allowed_operations
[RO/runtime]
list of the operations allowed in this state. This list is advisory only and the server state may have changed by the time this field is read by a client.
Default value: {} Published in: XenServer 4.0 (rio) list of the operations allowed in this state. This list is advisory only and the server state may have changed by the time this field is read by a client.
(VIF ref → string) map
assigned_ips
[RO/runtime]
The IP addresses assigned to VIFs on networks that have active xapi-managed DHCP
Default value: {} Published in: XenServer 6.5 (creedence) The IP addresses assigned to VIFs on networks that have active xapi-managed DHCP
(string → blob ref) map
blobs
[RO/runtime]
Binary blobs associated with this network
Default value: {} Published in: XenServer 5.0 (orlando) Binary blobs associated with this network
string
bridge
[RO/constructor]
name of the bridge corresponding to this network on the local host
Default value: "" Published in: XenServer 4.0 (rio) Changed in: XenServer 7.2 (falcon) Added to the constructor (network.create)
(string → enum network_operations) map
current_operations
[RO/runtime]
links each of the running tasks using this object (by reference) to a current_operation enum which describes the nature of the task.
Default value: {} Published in: XenServer 4.0 (rio) links each of the running tasks using this object (by reference) to a current_operation enum which describes the nature of the task.
enum network_default_locking_mode
default_locking_mode
[RO/runtime]
The network will use this value to determine the behaviour of all VIFs where locking_mode = default
Default value: unlocked Published in: XenServer 6.1 (tampa) The network will use this value to determine the behaviour of all VIFs where locking_mode = default
bool
managed
[RO/constructor]
true if the bridge is managed by xapi
Default value: true Published in: XenServer 7.2 (falcon)
int
MTU
[RW]
MTU in octets
Default value: 1500 Published in: XenServer 5.6 (midnight-ride) MTU in octets
string
name_description
[RW]
a notes field containing human-readable description
Default value: "" Published in: XenServer 4.0 (rio) a notes field containing human-readable description
string
name_label
[RW]
a human-readable name
Default value: "" Published in: XenServer 4.0 (rio) a human-readable name
(string → string) map
other_config
[RW]
additional configuration
Published in: XenServer 4.0 (rio) additional configuration
PIF ref set
PIFs
[RO/runtime]
list of connected pifs
Published in: XenServer 4.0 (rio) list of connected pifs
enum network_purpose set
purpose
[RO/runtime]
Set of purposes for which the server will use this network
Default value: {} Published in: XenServer 7.3 (inverness) Set of purposes for which the server will use this network
string
uuid
[RO/runtime]
Unique identifier/object reference
Published in: XenServer 4.0 (rio) Unique identifier/object reference
VIF ref set
VIFs
[RO/runtime]
list of connected vifs
Published in: XenServer 4.0 (rio) list of connected vifs
Messages
Hide implicit
void
add_purpose
(session ref, network ref, enum network_purpose)
Give a network a new purpose (if not present already)
Parameters: session ref session_id Reference to a valid session network ref self The network enum network_purpose value The purpose to add Minimum role: pool-admin Errors: NETWORK_INCOMPATIBLE_PURPOSES 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. Published in: XenServer 7.3 (inverness) Give a network a new purpose (if not present already)
void
add_tags
(session ref, network ref, string)
void
add_to_other_config
(session ref, network ref, string, string)
Add the given key-value pair to the other_config field of the given network.
Parameters: session ref session_id Reference to a valid session network ref self reference to the object string key Key to add string value Value to add Minimum role: pool-operator Published in: XenServer 4.0 (rio) additional configuration
network ref
create
(session ref, network record)
Create a new network instance, and return its handle.
The constructor args are: name_label, name_description, MTU, other_config*, bridge, managed, tags (* = non-optional).
Parameters: session ref session_id Reference to a valid session network record args All constructor arguments Minimum role: vm-admin Result: reference to the newly created object Published in: XenServer 4.0 (rio) A virtual network
blob ref
create_new_blob
(session ref, network ref, string, string, bool)
Create a placeholder for a named binary blob of data that is associated with this pool
Parameters: session ref session_id Reference to a valid session network ref network The network string name The name associated with the blob string mime_type The mime type for the data. Empty string translates to application/octet-stream bool public True if the blob should be publicly available Minimum role: pool-operator Result: The reference of the blob, needed for populating its data Published in: XenServer 5.0 (orlando) Create a placeholder for a named binary blob of data that is associated with this pool
void
destroy
(session ref, network ref)
Destroy the specified network instance.
Parameters: session ref session_id Reference to a valid session network ref self reference to the object Minimum role: vm-admin Published in: XenServer 4.0 (rio) A virtual network
network ref set
get_all
(session ref)
Return a list of all the networks known to the system.
Parameters: session ref session_id Reference to a valid session Minimum role: read-only Result: references to all objects Published in: XenServer 4.0 (rio) A virtual network
(network ref → network record) map
get_all_records
(session ref)
Return a map of network references to network records for all networks known to the system.
Parameters: session ref session_id Reference to a valid session Minimum role: read-only Result: records of all objects Published in: XenServer 4.0 (rio) A virtual network
enum network_operations set
get_allowed_operations
(session ref, network ref)
Get the allowed_operations field of the given network.
Parameters: session ref session_id Reference to a valid session network ref self reference to the object Minimum role: read-only Result: value of the field Published in: XenServer 4.0 (rio) list of the operations allowed in this state. This list is advisory only and the server state may have changed by the time this field is read by a client.
(VIF ref → string) map
get_assigned_ips
(session ref, network ref)
Get the assigned_ips field of the given network.
Parameters: session ref session_id Reference to a valid session network ref self reference to the object Minimum role: read-only Result: value of the field Published in: XenServer 6.5 (creedence) The IP addresses assigned to VIFs on networks that have active xapi-managed DHCP
(string → blob ref) map
get_blobs
(session ref, network ref)
Get the blobs field of the given network.
Parameters: session ref session_id Reference to a valid session network ref self reference to the object Minimum role: read-only Result: value of the field Published in: XenServer 5.0 (orlando) Binary blobs associated with this network
string
get_bridge
(session ref, network ref)
Get the bridge field of the given network.
Parameters: session ref session_id Reference to a valid session network ref self reference to the object Minimum role: read-only Result: value of the field Published in: XenServer 4.0 (rio) Changed in: XenServer 7.2 (falcon) Added to the constructor (network.create)
network ref set
get_by_name_label
(session ref, string)
Get all the network instances with the given label.
Parameters: session ref session_id Reference to a valid session string label label of object to return Minimum role: read-only Result: references to objects with matching names Published in: XenServer 4.0 (rio) A virtual network
network ref
get_by_uuid
(session ref, string)
Get a reference to the network instance with the specified UUID.
Parameters: session ref session_id Reference to a valid session string uuid UUID of object to return Minimum role: read-only Result: reference to the object Published in: XenServer 4.0 (rio) A virtual network
(string → enum network_operations) map
get_current_operations
(session ref, network ref)
Get the current_operations field of the given network.
Parameters: session ref session_id Reference to a valid session network ref self reference to the object Minimum role: read-only Result: value of the field Published in: XenServer 4.0 (rio) links each of the running tasks using this object (by reference) to a current_operation enum which describes the nature of the task.
enum network_default_locking_mode
get_default_locking_mode
(session ref, network ref)
Get the default_locking_mode field of the given network.
Parameters: session ref session_id Reference to a valid session network ref self reference to the object Minimum role: read-only Result: value of the field Published in: XenServer 6.1 (tampa) The network will use this value to determine the behaviour of all VIFs where locking_mode = default
bool
get_managed
(session ref, network ref)
Get the managed field of the given network.
Parameters: session ref session_id Reference to a valid session network ref self reference to the object Minimum role: read-only Result: value of the field Published in: XenServer 7.2 (falcon)
int
get_MTU
(session ref, network ref)
Get the MTU field of the given network.
Parameters: session ref session_id Reference to a valid session network ref self reference to the object Minimum role: read-only Result: value of the field Published in: XenServer 5.6 (midnight-ride) MTU in octets
string
get_name_description
(session ref, network ref)
Get the name/description field of the given network.
Parameters: session ref session_id Reference to a valid session network ref self reference to the object Minimum role: read-only Result: value of the field Published in: XenServer 4.0 (rio) a notes field containing human-readable description
string
get_name_label
(session ref, network ref)
Get the name/label field of the given network.
Parameters: session ref session_id Reference to a valid session network ref self reference to the object Minimum role: read-only Result: value of the field Published in: XenServer 4.0 (rio) a human-readable name
(string → string) map
get_other_config
(session ref, network ref)
Get the other_config field of the given network.
Parameters: session ref session_id Reference to a valid session network ref self reference to the object Minimum role: read-only Result: value of the field Published in: XenServer 4.0 (rio) additional configuration
PIF ref set
get_PIFs
(session ref, network ref)
Get the PIFs field of the given network.
Parameters: session ref session_id Reference to a valid session network ref self reference to the object Minimum role: read-only Result: value of the field Published in: XenServer 4.0 (rio) list of connected pifs
enum network_purpose set
get_purpose
(session ref, network ref)
Get the purpose field of the given network.
Parameters: session ref session_id Reference to a valid session network ref self reference to the object Minimum role: read-only Result: value of the field Published in: XenServer 7.3 (inverness) Set of purposes for which the server will use this network
network record
get_record
(session ref, network ref)
Get a record containing the current state of the given network.
Parameters: session ref session_id Reference to a valid session network ref self reference to the object Minimum role: read-only Result: all fields from the object Published in: XenServer 4.0 (rio) A virtual network
string set
get_tags
(session ref, network ref)
string
get_uuid
(session ref, network ref)
Get the uuid field of the given network.
Parameters: session ref session_id Reference to a valid session network ref self reference to the object Minimum role: read-only Result: value of the field Published in: XenServer 4.0 (rio) Unique identifier/object reference
VIF ref set
get_VIFs
(session ref, network ref)
Get the VIFs field of the given network.
Parameters: session ref session_id Reference to a valid session network ref self reference to the object Minimum role: read-only Result: value of the field Published in: XenServer 4.0 (rio) list of connected vifs
void
remove_from_other_config
(session ref, network ref, string)
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: session ref session_id Reference to a valid session network ref self reference to the object string key Key to remove Minimum role: pool-operator Published in: XenServer 4.0 (rio) additional configuration
void
remove_purpose
(session ref, network ref, enum network_purpose)
Remove a purpose from a network (if present)
Parameters: session ref session_id Reference to a valid session network ref self The network enum network_purpose value The purpose to remove Minimum role: pool-admin Published in: XenServer 7.3 (inverness) Remove a purpose from a network (if present)
void
remove_tags
(session ref, network ref, string)
void
set_default_locking_mode
(session ref, network ref, enum network_default_locking_mode)
Set the default locking mode for VIFs attached to this network
Parameters: session ref session_id Reference to a valid session network ref network The network enum network_default_locking_mode value The default locking mode for VIFs attached to this network. Minimum role: pool-operator Published in: XenServer 6.1 (tampa) Set the default locking mode for VIFs attached to this network
void
set_MTU
(session ref, network ref, int)
Set the MTU field of the given network.
Parameters: session ref session_id Reference to a valid session network ref self reference to the object int value New value to set Minimum role: vm-admin Published in: XenServer 5.6 (midnight-ride) MTU in octets
void
set_name_description
(session ref, network ref, string)
Set the name/description field of the given network.
Parameters: session ref session_id Reference to a valid session network ref self reference to the object string value New value to set Minimum role: pool-operator Published in: XenServer 4.0 (rio) a notes field containing human-readable description
void
set_name_label
(session ref, network ref, string)
Set the name/label field of the given network.
Parameters: session ref session_id Reference to a valid session network ref self reference to the object string value New value to set Minimum role: pool-operator Published in: XenServer 4.0 (rio) a human-readable name
void
set_other_config
(session ref, network ref, (string → string) map)
Set the other_config field of the given network.
Parameters: session ref session_id Reference to a valid session network ref self reference to the object (string → string) map value New value to set Minimum role: pool-operator Published in: XenServer 4.0 (rio) additional configuration
void
set_tags
(session ref, network ref, string set)