Class: network
A virtual network
Fields for class: network
| Field | Type | Qualifier | Description |
|---|---|---|---|
allowed_operations |
network_operations set |
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. |
assigned_ips |
(VIF ref -> string) map |
RO/runtime | The IP addresses assigned to VIFs on networks that have active xapi-managed DHCP |
blobs |
(string -> blob ref) map |
RO/runtime | Binary blobs associated with this network |
bridge |
string |
RO/constructor | name of the bridge corresponding to this network on the local host |
current_operations |
(string -> network_operations) map |
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_locking_mode |
network_default_locking_mode |
RO/runtime | The network will use this value to determine the behaviour of all VIFs where locking_mode = default |
managed |
bool |
RO/constructor | true if the bridge is managed by xapi |
MTU |
int |
RW | MTU in octets |
name_description |
string |
RW | a notes field containing human-readable description |
name_label |
string |
RW | a human-readable name |
other_config |
(string -> string) map |
RW | additional configuration |
PIFs |
PIF ref set |
RO/runtime | list of connected pifs |
purpose |
network_purpose set |
RO/runtime | Set of purposes for which the server will use this network |
tags |
string set |
RW | user-specified tags for categorization purposes |
uuid |
string |
RO/runtime | Unique identifier/object reference |
VIFs |
VIF ref set |
RO/runtime | list of connected vifs |
RPCs associated with class: network
RPC name: addpurpose
Overview:
Give a network a new purpose if not present already
Signature:
void add_purpose (session ref session_ref, network ref self, network_purpose value)
Arguments:
| Type | Name | Description |
|---|---|---|
session ref |
session_ref |
Reference to a valid session |
network ref |
self |
The network |
network_purpose |
value |
The purpose to add |
Minimum Role: pool-admin
Return Type:
void
Possible Error Codes:
NETWORK_INCOMPATIBLE_PURPOSES
RPC name: addtootherconfig
Overview:
Add the given keyvalue pair to the otherconfig field of the given network.
Signature:
void add_to_other_config (session ref session_ref, network ref self, string key, string value)
Arguments:
| Type | Name | Description |
|---|---|---|
session ref |
session_ref |
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
Return Type:
void
RPC name: create
Overview:
Create a new network instance, and return its handle.
Signature:
network ref create (session ref session_ref, network record args)
Arguments:
| Type | Name | Description |
|---|---|---|
session ref |
session_ref |
Reference to a valid session |
network record |
args |
All constructor arguments |
Minimum Role: vm-admin
Return Type:
network ref
reference to the newly created object
RPC name: createnewblob
Overview:
Create a placeholder for a named binary blob of data that is associated with this pool
Signature:
blob ref create_new_blob (session ref session_ref, network ref network, string name, string mime_type, bool public)
Arguments:
| Type | Name | Description |
|---|---|---|
session ref |
session_ref |
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
Return Type:
blob ref
The reference of the blob, needed for populating its data
RPC name: destroy
Overview:
Destroy the specified network instance.
Signature:
void destroy (session ref session_ref, network ref self)
Arguments:
| Type | Name | Description |
|---|---|---|
session ref |
session_ref |
Reference to a valid session |
network ref |
self |
reference to the object |
Minimum Role: vm-admin
Return Type:
void
RPC name: getall
Overview:
Return a list of all the networks known to the system.
Signature:
network ref set get_all (session ref session_ref)
Arguments:
| Type | Name | Description |
|---|---|---|
session ref |
session_ref |
Reference to a valid session |
Minimum Role: read-only
Return Type:
network ref set
references to all objects
RPC name: getallrecords
Overview:
Return a map of network references to network records for all networks known to the system.
Signature:
(network ref -> network record) map get_all_records (session ref session_ref)
Arguments:
| Type | Name | Description |
|---|---|---|
session ref |
session_ref |
Reference to a valid session |
Minimum Role: read-only
Return Type:
(network ref -> network record) map
records of all objects
RPC name: getallowedoperations
Overview:
Get the allowedoperations field of the given network.
Signature:
network_operations set get_allowed_operations (session ref session_ref, network ref self)
Arguments:
| Type | Name | Description |
|---|---|---|
session ref |
session_ref |
Reference to a valid session |
network ref |
self |
reference to the object |
Minimum Role: read-only
Return Type:
network_operations set
value of the field
RPC name: getassignedips
Overview:
Get the assignedips field of the given network.
Signature:
(VIF ref -> string) map get_assigned_ips (session ref session_ref, network ref self)
Arguments:
| Type | Name | Description |
|---|---|---|
session ref |
session_ref |
Reference to a valid session |
network ref |
self |
reference to the object |
Minimum Role: read-only
Return Type:
(VIF ref -> string) map
value of the field
RPC name: getblobs
Overview:
Get the blobs field of the given network.
Signature:
(string -> blob ref) map get_blobs (session ref session_ref, network ref self)
Arguments:
| Type | Name | Description |
|---|---|---|
session ref |
session_ref |
Reference to a valid session |
network ref |
self |
reference to the object |
Minimum Role: read-only
Return Type:
(string -> blob ref) map
value of the field
RPC name: getbridge
Overview:
Get the bridge field of the given network.
Signature:
string get_bridge (session ref session_ref, network ref self)
Arguments:
| Type | Name | Description |
|---|---|---|
session ref |
session_ref |
Reference to a valid session |
network ref |
self |
reference to the object |
Minimum Role: read-only
Return Type:
string
value of the field
RPC name: getbynamelabel
Overview:
Get all the network instances with the given label.
Signature:
network ref set get_by_name_label (session ref session_ref, string label)
Arguments:
| Type | Name | Description |
|---|---|---|
session ref |
session_ref |
Reference to a valid session |
string |
label |
label of object to return |
Minimum Role: read-only
Return Type:
network ref set
references to objects with matching names
RPC name: getbyuuid
Overview:
Get a reference to the network instance with the specified UUID.
Signature:
network ref get_by_uuid (session ref session_ref, string uuid)
Arguments:
| Type | Name | Description |
|---|---|---|
session ref |
session_ref |
Reference to a valid session |
string |
uuid |
UUID of object to return |
Minimum Role: read-only
Return Type:
network ref
reference to the object
RPC name: getcurrentoperations
Overview:
Get the currentoperations field of the given network.
Signature:
(string -> network_operations) map get_current_operations (session ref session_ref, network ref self)
Arguments:
| Type | Name | Description |
|---|---|---|
session ref |
session_ref |
Reference to a valid session |
network ref |
self |
reference to the object |
Minimum Role: read-only
Return Type:
(string -> network_operations) map
value of the field
RPC name: getdefaultlockingmode
Overview:
Get the defaultlockingmode field of the given network.
Signature:
network_default_locking_mode get_default_locking_mode (session ref session_ref, network ref self)
Arguments:
| Type | Name | Description |
|---|---|---|
session ref |
session_ref |
Reference to a valid session |
network ref |
self |
reference to the object |
Minimum Role: read-only
Return Type:
network_default_locking_mode
value of the field
RPC name: getmanaged
Overview:
Get the managed field of the given network.
Signature:
bool get_managed (session ref session_ref, network ref self)
Arguments:
| Type | Name | Description |
|---|---|---|
session ref |
session_ref |
Reference to a valid session |
network ref |
self |
reference to the object |
Minimum Role: read-only
Return Type:
bool
value of the field
RPC name: getMTU
Overview:
Get the MTU field of the given network.
Signature:
int get_MTU (session ref session_ref, network ref self)
Arguments:
| Type | Name | Description |
|---|---|---|
session ref |
session_ref |
Reference to a valid session |
network ref |
self |
reference to the object |
Minimum Role: read-only
Return Type:
int
value of the field
RPC name: getnamedescription
Overview:
Get the name/description field of the given network.
Signature:
string get_name_description (session ref session_ref, network ref self)
Arguments:
| Type | Name | Description |
|---|---|---|
session ref |
session_ref |
Reference to a valid session |
network ref |
self |
reference to the object |
Minimum Role: read-only
Return Type:
string
value of the field
RPC name: getnamelabel
Overview:
Get the name/label field of the given network.
Signature:
string get_name_label (session ref session_ref, network ref self)
Arguments:
| Type | Name | Description |
|---|---|---|
session ref |
session_ref |
Reference to a valid session |
network ref |
self |
reference to the object |
Minimum Role: read-only
Return Type:
string
value of the field
RPC name: getotherconfig
Overview:
Get the otherconfig field of the given network.
Signature:
(string -> string) map get_other_config (session ref session_ref, network ref self)
Arguments:
| Type | Name | Description |
|---|---|---|
session ref |
session_ref |
Reference to a valid session |
network ref |
self |
reference to the object |
Minimum Role: read-only
Return Type:
(string -> string) map
value of the field
RPC name: getPIFs
Overview:
Get the PIFs field of the given network.
Signature:
PIF ref set get_PIFs (session ref session_ref, network ref self)
Arguments:
| Type | Name | Description |
|---|---|---|
session ref |
session_ref |
Reference to a valid session |
network ref |
self |
reference to the object |
Minimum Role: read-only
Return Type:
PIF ref set
value of the field
RPC name: getpurpose
Overview:
Get the purpose field of the given network.
Signature:
network_purpose set get_purpose (session ref session_ref, network ref self)
Arguments:
| Type | Name | Description |
|---|---|---|
session ref |
session_ref |
Reference to a valid session |
network ref |
self |
reference to the object |
Minimum Role: read-only
Return Type:
network_purpose set
value of the field
RPC name: getrecord
Overview:
Get a record containing the current state of the given network.
Signature:
network record get_record (session ref session_ref, network ref self)
Arguments:
| Type | Name | Description |
|---|---|---|
session ref |
session_ref |
Reference to a valid session |
network ref |
self |
reference to the object |
Minimum Role: read-only
Return Type:
network record
all fields from the object
RPC name: getuuid
Overview:
Get the uuid field of the given network.
Signature:
string get_uuid (session ref session_ref, network ref self)
Arguments:
| Type | Name | Description |
|---|---|---|
session ref |
session_ref |
Reference to a valid session |
network ref |
self |
reference to the object |
Minimum Role: read-only
Return Type:
string
value of the field
RPC name: getVIFs
Overview:
Get the VIFs field of the given network.
Signature:
VIF ref set get_VIFs (session ref session_ref, network ref self)
Arguments:
| Type | Name | Description |
|---|---|---|
session ref |
session_ref |
Reference to a valid session |
network ref |
self |
reference to the object |
Minimum Role: read-only
Return Type:
VIF ref set
value of the field
RPC name: removefromotherconfig
Overview:
Remove the given key and its corresponding value from the otherconfig field of the given network. If the key is not in that Map, then do nothing.
Signature:
void remove_from_other_config (session ref session_ref, network ref self, string key)
Arguments:
| Type | Name | Description |
|---|---|---|
session ref |
session_ref |
Reference to a valid session |
network ref |
self |
reference to the object |
string |
key |
Key to remove |
Minimum Role: pool-operator
Return Type:
void
RPC name: removepurpose
Overview:
Remove a purpose from a network if present
Signature:
void remove_purpose (session ref session_ref, network ref self, network_purpose value)
Arguments:
| Type | Name | Description |
|---|---|---|
session ref |
session_ref |
Reference to a valid session |
network ref |
self |
The network |
network_purpose |
value |
The purpose to remove |
Minimum Role: pool-admin
Return Type:
void
RPC name: setdefaultlockingmode
Overview:
Set the default locking mode for VIFs attached to this network
Signature:
void set_default_locking_mode (session ref session_ref, network ref network, network_default_locking_mode value)
Arguments:
| Type | Name | Description |
|---|---|---|
session ref |
session_ref |
Reference to a valid session |
network ref |
network |
The network |
network_default_locking_mode |
value |
The default locking mode for VIFs attached to this network. |
Minimum Role: pool-operator
Return Type:
void
RPC name: setMTU
Overview:
Set the MTU field of the given network.
Signature:
void set_MTU (session ref session_ref, network ref self, int value)
Arguments:
| Type | Name | Description |
|---|---|---|
session ref |
session_ref |
Reference to a valid session |
network ref |
self |
reference to the object |
int |
value |
New value to set |
Minimum Role: vm-admin
Return Type:
void
RPC name: setnamedescription
Overview:
Set the name/description field of the given network.
Signature:
void set_name_description (session ref session_ref, network ref self, string value)
Arguments:
| Type | Name | Description |
|---|---|---|
session ref |
session_ref |
Reference to a valid session |
network ref |
self |
reference to the object |
string |
value |
New value to set |
Minimum Role: pool-operator
Return Type:
void
RPC name: setnamelabel
Overview:
Set the name/label field of the given network.
Signature:
void set_name_label (session ref session_ref, network ref self, string value)
Arguments:
| Type | Name | Description |
|---|---|---|
session ref |
session_ref |
Reference to a valid session |
network ref |
self |
reference to the object |
string |
value |
New value to set |
Minimum Role: pool-operator
Return Type:
void
RPC name: setotherconfig
Overview:
Set the otherconfig field of the given network.
Signature:
void set_other_config (session ref session_ref, network ref self, (string -> string) map value)
Arguments:
| Type | Name | Description |
|---|---|---|
session ref |
session_ref |
Reference to a valid session |
network ref |
self |
reference to the object |
(string -> string) map |
value |
New value to set |
Minimum Role: pool-operator
Return Type:
void