public class PIF extends XenAPIObject
Modifier and Type | Class and Description |
---|---|
static class |
PIF.Record
Represents all the fields in a PIF
|
Modifier and Type | Field and Description |
---|---|
protected String |
ref
The XenAPI reference to this object.
|
Modifier and Type | Method and Description |
---|---|
void |
addToOtherConfig(Connection c,
String key,
String value)
Add the given key-value pair to the other_config field of the given PIF.
|
static PIF |
createVLAN(Connection c,
String device,
Network network,
Host host,
Long VLAN)
Deprecated.
|
static Task |
createVLANAsync(Connection c,
String device,
Network network,
Host host,
Long VLAN)
Deprecated.
|
void |
dbForget(Connection c)
Destroy a PIF database record.
|
Task |
dbForgetAsync(Connection c)
Destroy a PIF database record.
|
static PIF |
dbIntroduce(Connection c,
String device,
Network network,
Host host,
String MAC,
Long MTU,
Long VLAN,
Boolean physical,
Types.IpConfigurationMode ipConfigurationMode,
String IP,
String netmask,
String gateway,
String DNS,
Bond bondSlaveOf,
VLAN VLANMasterOf,
Boolean management,
Map<String,String> otherConfig,
Boolean disallowUnplug)
Create a new PIF record in the database only
|
static Task |
dbIntroduceAsync(Connection c,
String device,
Network network,
Host host,
String MAC,
Long MTU,
Long VLAN,
Boolean physical,
Types.IpConfigurationMode ipConfigurationMode,
String IP,
String netmask,
String gateway,
String DNS,
Bond bondSlaveOf,
VLAN VLANMasterOf,
Boolean management,
Map<String,String> otherConfig,
Boolean disallowUnplug)
Create a new PIF record in the database only
|
void |
destroy(Connection c)
Deprecated.
|
Task |
destroyAsync(Connection c)
Deprecated.
|
boolean |
equals(Object obj)
If obj is a PIF, compares XenAPI references for equality.
|
void |
forget(Connection c)
Destroy the PIF object matching a particular network interface
|
Task |
forgetAsync(Connection c)
Destroy the PIF object matching a particular network interface
|
static Set<PIF> |
getAll(Connection c)
Return a list of all the PIFs known to the system.
|
static Map<PIF,PIF.Record> |
getAllRecords(Connection c)
Return a map of PIF references to PIF records for all PIFs known to the system.
|
Set<Bond> |
getBondMasterOf(Connection c)
Get the bond_master_of field of the given PIF.
|
Bond |
getBondSlaveOf(Connection c)
Get the bond_slave_of field of the given PIF.
|
static PIF |
getByUuid(Connection c,
String uuid)
Get a reference to the PIF instance with the specified UUID.
|
Boolean |
getCurrentlyAttached(Connection c)
Get the currently_attached field of the given PIF.
|
String |
getDevice(Connection c)
Get the device field of the given PIF.
|
Boolean |
getDisallowUnplug(Connection c)
Get the disallow_unplug field of the given PIF.
|
String |
getDNS(Connection c)
Get the DNS field of the given PIF.
|
String |
getGateway(Connection c)
Get the gateway field of the given PIF.
|
Host |
getHost(Connection c)
Get the host field of the given PIF.
|
String |
getIP(Connection c)
Get the IP field of the given PIF.
|
Types.IpConfigurationMode |
getIpConfigurationMode(Connection c)
Get the ip_configuration_mode field of the given PIF.
|
String |
getMAC(Connection c)
Get the MAC field of the given PIF.
|
Boolean |
getManagement(Connection c)
Get the management field of the given PIF.
|
PIFMetrics |
getMetrics(Connection c)
Get the metrics field of the given PIF.
|
Long |
getMTU(Connection c)
Get the MTU field of the given PIF.
|
String |
getNetmask(Connection c)
Get the netmask field of the given PIF.
|
Network |
getNetwork(Connection c)
Get the network field of the given PIF.
|
Map<String,String> |
getOtherConfig(Connection c)
Get the other_config field of the given PIF.
|
Boolean |
getPhysical(Connection c)
Get the physical field of the given PIF.
|
PIF.Record |
getRecord(Connection c)
Get a record containing the current state of the given PIF.
|
Set<Tunnel> |
getTunnelAccessPIFOf(Connection c)
Get the tunnel_access_PIF_of field of the given PIF.
|
Set<Tunnel> |
getTunnelTransportPIFOf(Connection c)
Get the tunnel_transport_PIF_of field of the given PIF.
|
String |
getUuid(Connection c)
Get the uuid field of the given PIF.
|
Long |
getVLAN(Connection c)
Get the VLAN field of the given PIF.
|
VLAN |
getVLANMasterOf(Connection c)
Get the VLAN_master_of field of the given PIF.
|
Set<VLAN> |
getVLANSlaveOf(Connection c)
Get the VLAN_slave_of field of the given PIF.
|
int |
hashCode() |
static PIF |
introduce(Connection c,
Host host,
String MAC,
String device)
Create a PIF object matching a particular network interface
|
static Task |
introduceAsync(Connection c,
Host host,
String MAC,
String device)
Create a PIF object matching a particular network interface
|
void |
plug(Connection c)
Attempt to bring up a physical interface
|
Task |
plugAsync(Connection c)
Attempt to bring up a physical interface
|
void |
reconfigureIp(Connection c,
Types.IpConfigurationMode mode,
String IP,
String netmask,
String gateway,
String DNS)
Reconfigure the IP address settings for this interface
|
Task |
reconfigureIpAsync(Connection c,
Types.IpConfigurationMode mode,
String IP,
String netmask,
String gateway,
String DNS)
Reconfigure the IP address settings for this interface
|
void |
removeFromOtherConfig(Connection c,
String key)
Remove the given key and its corresponding value from the other_config field of the given PIF.
|
static void |
scan(Connection c,
Host host)
Scan for physical interfaces on a host and create PIF objects to represent them
|
static Task |
scanAsync(Connection c,
Host host)
Scan for physical interfaces on a host and create PIF objects to represent them
|
static Set<PIF> |
scanBios(Connection c,
Host host)
Scan for physical interfaces on a host and create PIF objects to represent them.
|
static Task |
scanBiosAsync(Connection c,
Host host)
Scan for physical interfaces on a host and create PIF objects to represent them.
|
void |
setDisallowUnplug(Connection c,
Boolean disallowUnplug)
Set the disallow_unplug field of the given PIF.
|
void |
setOtherConfig(Connection c,
Map<String,String> otherConfig)
Set the other_config field of the given PIF.
|
String |
toWireString() |
void |
unplug(Connection c)
Attempt to bring down a physical interface
|
Task |
unplugAsync(Connection c)
Attempt to bring down a physical interface
|
protected final String ref
public String toWireString()
toWireString
in class XenAPIObject
public boolean equals(Object obj)
public PIF.Record getRecord(Connection c) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException
Types.BadServerResponse
Types.XenAPIException
org.apache.xmlrpc.XmlRpcException
public static PIF getByUuid(Connection c, String uuid) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException
uuid
- UUID of object to returnTypes.BadServerResponse
Types.XenAPIException
org.apache.xmlrpc.XmlRpcException
public String getUuid(Connection c) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException
Types.BadServerResponse
Types.XenAPIException
org.apache.xmlrpc.XmlRpcException
public String getDevice(Connection c) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException
Types.BadServerResponse
Types.XenAPIException
org.apache.xmlrpc.XmlRpcException
public Network getNetwork(Connection c) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException
Types.BadServerResponse
Types.XenAPIException
org.apache.xmlrpc.XmlRpcException
public Host getHost(Connection c) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException
Types.BadServerResponse
Types.XenAPIException
org.apache.xmlrpc.XmlRpcException
public String getMAC(Connection c) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException
Types.BadServerResponse
Types.XenAPIException
org.apache.xmlrpc.XmlRpcException
public Long getMTU(Connection c) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException
Types.BadServerResponse
Types.XenAPIException
org.apache.xmlrpc.XmlRpcException
public Long getVLAN(Connection c) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException
Types.BadServerResponse
Types.XenAPIException
org.apache.xmlrpc.XmlRpcException
public PIFMetrics getMetrics(Connection c) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException
Types.BadServerResponse
Types.XenAPIException
org.apache.xmlrpc.XmlRpcException
public Boolean getPhysical(Connection c) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException
Types.BadServerResponse
Types.XenAPIException
org.apache.xmlrpc.XmlRpcException
public Boolean getCurrentlyAttached(Connection c) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException
Types.BadServerResponse
Types.XenAPIException
org.apache.xmlrpc.XmlRpcException
public Types.IpConfigurationMode getIpConfigurationMode(Connection c) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException
Types.BadServerResponse
Types.XenAPIException
org.apache.xmlrpc.XmlRpcException
public String getIP(Connection c) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException
Types.BadServerResponse
Types.XenAPIException
org.apache.xmlrpc.XmlRpcException
public String getNetmask(Connection c) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException
Types.BadServerResponse
Types.XenAPIException
org.apache.xmlrpc.XmlRpcException
public String getGateway(Connection c) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException
Types.BadServerResponse
Types.XenAPIException
org.apache.xmlrpc.XmlRpcException
public String getDNS(Connection c) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException
Types.BadServerResponse
Types.XenAPIException
org.apache.xmlrpc.XmlRpcException
public Bond getBondSlaveOf(Connection c) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException
Types.BadServerResponse
Types.XenAPIException
org.apache.xmlrpc.XmlRpcException
public Set<Bond> getBondMasterOf(Connection c) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException
Types.BadServerResponse
Types.XenAPIException
org.apache.xmlrpc.XmlRpcException
public VLAN getVLANMasterOf(Connection c) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException
Types.BadServerResponse
Types.XenAPIException
org.apache.xmlrpc.XmlRpcException
public Set<VLAN> getVLANSlaveOf(Connection c) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException
Types.BadServerResponse
Types.XenAPIException
org.apache.xmlrpc.XmlRpcException
public Boolean getManagement(Connection c) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException
Types.BadServerResponse
Types.XenAPIException
org.apache.xmlrpc.XmlRpcException
public Map<String,String> getOtherConfig(Connection c) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException
Types.BadServerResponse
Types.XenAPIException
org.apache.xmlrpc.XmlRpcException
public Boolean getDisallowUnplug(Connection c) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException
Types.BadServerResponse
Types.XenAPIException
org.apache.xmlrpc.XmlRpcException
public Set<Tunnel> getTunnelAccessPIFOf(Connection c) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException
Types.BadServerResponse
Types.XenAPIException
org.apache.xmlrpc.XmlRpcException
public Set<Tunnel> getTunnelTransportPIFOf(Connection c) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException
Types.BadServerResponse
Types.XenAPIException
org.apache.xmlrpc.XmlRpcException
public void setOtherConfig(Connection c, Map<String,String> otherConfig) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException
otherConfig
- New value to setTypes.BadServerResponse
Types.XenAPIException
org.apache.xmlrpc.XmlRpcException
public void addToOtherConfig(Connection c, String key, String value) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException
key
- Key to addvalue
- Value to addTypes.BadServerResponse
Types.XenAPIException
org.apache.xmlrpc.XmlRpcException
public void removeFromOtherConfig(Connection c, String key) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException
key
- Key to removeTypes.BadServerResponse
Types.XenAPIException
org.apache.xmlrpc.XmlRpcException
public void setDisallowUnplug(Connection c, Boolean disallowUnplug) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException
disallowUnplug
- New value to setTypes.BadServerResponse
Types.XenAPIException
org.apache.xmlrpc.XmlRpcException
@Deprecated public static Task createVLANAsync(Connection c, String device, Network network, Host host, Long VLAN) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException, Types.VlanTagInvalid
device
- physical interface on which to create the VLAN interfacenetwork
- network to which this interface should be connectedhost
- physical machine to which this PIF is connectedVLAN
- VLAN tag for the new interfaceTypes.BadServerResponse
Types.XenAPIException
org.apache.xmlrpc.XmlRpcException
Types.VlanTagInvalid
@Deprecated public static PIF createVLAN(Connection c, String device, Network network, Host host, Long VLAN) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException, Types.VlanTagInvalid
device
- physical interface on which to create the VLAN interfacenetwork
- network to which this interface should be connectedhost
- physical machine to which this PIF is connectedVLAN
- VLAN tag for the new interfaceTypes.BadServerResponse
Types.XenAPIException
org.apache.xmlrpc.XmlRpcException
Types.VlanTagInvalid
@Deprecated public Task destroyAsync(Connection c) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException, Types.PifIsPhysical
Types.BadServerResponse
Types.XenAPIException
org.apache.xmlrpc.XmlRpcException
Types.PifIsPhysical
@Deprecated public void destroy(Connection c) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException, Types.PifIsPhysical
Types.BadServerResponse
Types.XenAPIException
org.apache.xmlrpc.XmlRpcException
Types.PifIsPhysical
public Task reconfigureIpAsync(Connection c, Types.IpConfigurationMode mode, String IP, String netmask, String gateway, String DNS) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException
mode
- whether to use dynamic/static/no-assignmentIP
- the new IP addressnetmask
- the new netmaskgateway
- the new gatewayDNS
- the new DNS settingsTypes.BadServerResponse
Types.XenAPIException
org.apache.xmlrpc.XmlRpcException
public void reconfigureIp(Connection c, Types.IpConfigurationMode mode, String IP, String netmask, String gateway, String DNS) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException
mode
- whether to use dynamic/static/no-assignmentIP
- the new IP addressnetmask
- the new netmaskgateway
- the new gatewayDNS
- the new DNS settingsTypes.BadServerResponse
Types.XenAPIException
org.apache.xmlrpc.XmlRpcException
public static Task scanAsync(Connection c, Host host) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException
host
- The host on which to scanTypes.BadServerResponse
Types.XenAPIException
org.apache.xmlrpc.XmlRpcException
public static void scan(Connection c, Host host) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException
host
- The host on which to scanTypes.BadServerResponse
Types.XenAPIException
org.apache.xmlrpc.XmlRpcException
public static Task scanBiosAsync(Connection c, Host host) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException
host
- The host on which to scanTypes.BadServerResponse
Types.XenAPIException
org.apache.xmlrpc.XmlRpcException
public static Set<PIF> scanBios(Connection c, Host host) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException
host
- The host on which to scanTypes.BadServerResponse
Types.XenAPIException
org.apache.xmlrpc.XmlRpcException
public static Task introduceAsync(Connection c, Host host, String MAC, String device) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException
host
- The host on which the interface existsMAC
- The MAC address of the interfacedevice
- The device name to use for the interfaceTypes.BadServerResponse
Types.XenAPIException
org.apache.xmlrpc.XmlRpcException
public static PIF introduce(Connection c, Host host, String MAC, String device) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException
host
- The host on which the interface existsMAC
- The MAC address of the interfacedevice
- The device name to use for the interfaceTypes.BadServerResponse
Types.XenAPIException
org.apache.xmlrpc.XmlRpcException
public Task forgetAsync(Connection c) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException, Types.PifTunnelStillExists
Types.BadServerResponse
Types.XenAPIException
org.apache.xmlrpc.XmlRpcException
Types.PifTunnelStillExists
public void forget(Connection c) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException, Types.PifTunnelStillExists
Types.BadServerResponse
Types.XenAPIException
org.apache.xmlrpc.XmlRpcException
Types.PifTunnelStillExists
public Task unplugAsync(Connection c) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException
Types.BadServerResponse
Types.XenAPIException
org.apache.xmlrpc.XmlRpcException
public void unplug(Connection c) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException
Types.BadServerResponse
Types.XenAPIException
org.apache.xmlrpc.XmlRpcException
public Task plugAsync(Connection c) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException, Types.TransportPifNotConfigured
Types.BadServerResponse
Types.XenAPIException
org.apache.xmlrpc.XmlRpcException
Types.TransportPifNotConfigured
public void plug(Connection c) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException, Types.TransportPifNotConfigured
Types.BadServerResponse
Types.XenAPIException
org.apache.xmlrpc.XmlRpcException
Types.TransportPifNotConfigured
public static Task dbIntroduceAsync(Connection c, String device, Network network, Host host, String MAC, Long MTU, Long VLAN, Boolean physical, Types.IpConfigurationMode ipConfigurationMode, String IP, String netmask, String gateway, String DNS, Bond bondSlaveOf, VLAN VLANMasterOf, Boolean management, Map<String,String> otherConfig, Boolean disallowUnplug) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException
device
- network
- host
- MAC
- MTU
- VLAN
- physical
- ipConfigurationMode
- IP
- netmask
- gateway
- DNS
- bondSlaveOf
- VLANMasterOf
- management
- otherConfig
- disallowUnplug
- Types.BadServerResponse
Types.XenAPIException
org.apache.xmlrpc.XmlRpcException
public static PIF dbIntroduce(Connection c, String device, Network network, Host host, String MAC, Long MTU, Long VLAN, Boolean physical, Types.IpConfigurationMode ipConfigurationMode, String IP, String netmask, String gateway, String DNS, Bond bondSlaveOf, VLAN VLANMasterOf, Boolean management, Map<String,String> otherConfig, Boolean disallowUnplug) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException
device
- network
- host
- MAC
- MTU
- VLAN
- physical
- ipConfigurationMode
- IP
- netmask
- gateway
- DNS
- bondSlaveOf
- VLANMasterOf
- management
- otherConfig
- disallowUnplug
- Types.BadServerResponse
Types.XenAPIException
org.apache.xmlrpc.XmlRpcException
public Task dbForgetAsync(Connection c) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException
Types.BadServerResponse
Types.XenAPIException
org.apache.xmlrpc.XmlRpcException
public void dbForget(Connection c) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException
Types.BadServerResponse
Types.XenAPIException
org.apache.xmlrpc.XmlRpcException
public static Set<PIF> getAll(Connection c) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException
Types.BadServerResponse
Types.XenAPIException
org.apache.xmlrpc.XmlRpcException
public static Map<PIF,PIF.Record> getAllRecords(Connection c) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException
Types.BadServerResponse
Types.XenAPIException
org.apache.xmlrpc.XmlRpcException