com.xensource.xenapi
Class PIF

java.lang.Object
  extended by com.xensource.xenapi.XenAPIObject
      extended by com.xensource.xenapi.PIF

public class PIF
extends XenAPIObject

A physical network interface (note separate VLANs are represented as several PIFs)


Nested Class Summary
static class PIF.Record
          Represents all the fields in a PIF
 
Field Summary
protected  String ref
          The XenAPI reference to this object.
 
Method Summary
 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
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ref

protected final String ref
The XenAPI reference to this object.

Method Detail

toWireString

public String toWireString()
Specified by:
toWireString in class XenAPIObject

equals

public boolean equals(Object obj)
If obj is a PIF, compares XenAPI references for equality.

Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

getRecord

public PIF.Record getRecord(Connection c)
                     throws Types.BadServerResponse,
                            Types.XenAPIException,
                            org.apache.xmlrpc.XmlRpcException
Get a record containing the current state of the given PIF.

Returns:
all fields from the object
Throws:
Types.BadServerResponse
Types.XenAPIException
org.apache.xmlrpc.XmlRpcException

getByUuid

public static PIF getByUuid(Connection c,
                            String uuid)
                     throws Types.BadServerResponse,
                            Types.XenAPIException,
                            org.apache.xmlrpc.XmlRpcException
Get a reference to the PIF instance with the specified UUID.

Parameters:
uuid - UUID of object to return
Returns:
reference to the object
Throws:
Types.BadServerResponse
Types.XenAPIException
org.apache.xmlrpc.XmlRpcException

getUuid

public String getUuid(Connection c)
               throws Types.BadServerResponse,
                      Types.XenAPIException,
                      org.apache.xmlrpc.XmlRpcException
Get the uuid field of the given PIF.

Returns:
value of the field
Throws:
Types.BadServerResponse
Types.XenAPIException
org.apache.xmlrpc.XmlRpcException

getDevice

public String getDevice(Connection c)
                 throws Types.BadServerResponse,
                        Types.XenAPIException,
                        org.apache.xmlrpc.XmlRpcException
Get the device field of the given PIF.

Returns:
value of the field
Throws:
Types.BadServerResponse
Types.XenAPIException
org.apache.xmlrpc.XmlRpcException

getNetwork

public Network getNetwork(Connection c)
                   throws Types.BadServerResponse,
                          Types.XenAPIException,
                          org.apache.xmlrpc.XmlRpcException
Get the network field of the given PIF.

Returns:
value of the field
Throws:
Types.BadServerResponse
Types.XenAPIException
org.apache.xmlrpc.XmlRpcException

getHost

public Host getHost(Connection c)
             throws Types.BadServerResponse,
                    Types.XenAPIException,
                    org.apache.xmlrpc.XmlRpcException
Get the host field of the given PIF.

Returns:
value of the field
Throws:
Types.BadServerResponse
Types.XenAPIException
org.apache.xmlrpc.XmlRpcException

getMAC

public String getMAC(Connection c)
              throws Types.BadServerResponse,
                     Types.XenAPIException,
                     org.apache.xmlrpc.XmlRpcException
Get the MAC field of the given PIF.

Returns:
value of the field
Throws:
Types.BadServerResponse
Types.XenAPIException
org.apache.xmlrpc.XmlRpcException

getMTU

public Long getMTU(Connection c)
            throws Types.BadServerResponse,
                   Types.XenAPIException,
                   org.apache.xmlrpc.XmlRpcException
Get the MTU field of the given PIF.

Returns:
value of the field
Throws:
Types.BadServerResponse
Types.XenAPIException
org.apache.xmlrpc.XmlRpcException

getVLAN

public Long getVLAN(Connection c)
             throws Types.BadServerResponse,
                    Types.XenAPIException,
                    org.apache.xmlrpc.XmlRpcException
Get the VLAN field of the given PIF.

Returns:
value of the field
Throws:
Types.BadServerResponse
Types.XenAPIException
org.apache.xmlrpc.XmlRpcException

getMetrics

public PIFMetrics getMetrics(Connection c)
                      throws Types.BadServerResponse,
                             Types.XenAPIException,
                             org.apache.xmlrpc.XmlRpcException
Get the metrics field of the given PIF.

Returns:
value of the field
Throws:
Types.BadServerResponse
Types.XenAPIException
org.apache.xmlrpc.XmlRpcException

getPhysical

public Boolean getPhysical(Connection c)
                    throws Types.BadServerResponse,
                           Types.XenAPIException,
                           org.apache.xmlrpc.XmlRpcException
Get the physical field of the given PIF.

Returns:
value of the field
Throws:
Types.BadServerResponse
Types.XenAPIException
org.apache.xmlrpc.XmlRpcException

getCurrentlyAttached

public Boolean getCurrentlyAttached(Connection c)
                             throws Types.BadServerResponse,
                                    Types.XenAPIException,
                                    org.apache.xmlrpc.XmlRpcException
Get the currently_attached field of the given PIF.

Returns:
value of the field
Throws:
Types.BadServerResponse
Types.XenAPIException
org.apache.xmlrpc.XmlRpcException

getIpConfigurationMode

public Types.IpConfigurationMode getIpConfigurationMode(Connection c)
                                                 throws Types.BadServerResponse,
                                                        Types.XenAPIException,
                                                        org.apache.xmlrpc.XmlRpcException
Get the ip_configuration_mode field of the given PIF.

Returns:
value of the field
Throws:
Types.BadServerResponse
Types.XenAPIException
org.apache.xmlrpc.XmlRpcException

getIP

public String getIP(Connection c)
             throws Types.BadServerResponse,
                    Types.XenAPIException,
                    org.apache.xmlrpc.XmlRpcException
Get the IP field of the given PIF.

Returns:
value of the field
Throws:
Types.BadServerResponse
Types.XenAPIException
org.apache.xmlrpc.XmlRpcException

getNetmask

public String getNetmask(Connection c)
                  throws Types.BadServerResponse,
                         Types.XenAPIException,
                         org.apache.xmlrpc.XmlRpcException
Get the netmask field of the given PIF.

Returns:
value of the field
Throws:
Types.BadServerResponse
Types.XenAPIException
org.apache.xmlrpc.XmlRpcException

getGateway

public String getGateway(Connection c)
                  throws Types.BadServerResponse,
                         Types.XenAPIException,
                         org.apache.xmlrpc.XmlRpcException
Get the gateway field of the given PIF.

Returns:
value of the field
Throws:
Types.BadServerResponse
Types.XenAPIException
org.apache.xmlrpc.XmlRpcException

getDNS

public String getDNS(Connection c)
              throws Types.BadServerResponse,
                     Types.XenAPIException,
                     org.apache.xmlrpc.XmlRpcException
Get the DNS field of the given PIF.

Returns:
value of the field
Throws:
Types.BadServerResponse
Types.XenAPIException
org.apache.xmlrpc.XmlRpcException

getBondSlaveOf

public Bond getBondSlaveOf(Connection c)
                    throws Types.BadServerResponse,
                           Types.XenAPIException,
                           org.apache.xmlrpc.XmlRpcException
Get the bond_slave_of field of the given PIF.

Returns:
value of the field
Throws:
Types.BadServerResponse
Types.XenAPIException
org.apache.xmlrpc.XmlRpcException

getBondMasterOf

public Set<Bond> getBondMasterOf(Connection c)
                          throws Types.BadServerResponse,
                                 Types.XenAPIException,
                                 org.apache.xmlrpc.XmlRpcException
Get the bond_master_of field of the given PIF.

Returns:
value of the field
Throws:
Types.BadServerResponse
Types.XenAPIException
org.apache.xmlrpc.XmlRpcException

getVLANMasterOf

public VLAN getVLANMasterOf(Connection c)
                     throws Types.BadServerResponse,
                            Types.XenAPIException,
                            org.apache.xmlrpc.XmlRpcException
Get the VLAN_master_of field of the given PIF.

Returns:
value of the field
Throws:
Types.BadServerResponse
Types.XenAPIException
org.apache.xmlrpc.XmlRpcException

getVLANSlaveOf

public Set<VLAN> getVLANSlaveOf(Connection c)
                         throws Types.BadServerResponse,
                                Types.XenAPIException,
                                org.apache.xmlrpc.XmlRpcException
Get the VLAN_slave_of field of the given PIF.

Returns:
value of the field
Throws:
Types.BadServerResponse
Types.XenAPIException
org.apache.xmlrpc.XmlRpcException

getManagement

public Boolean getManagement(Connection c)
                      throws Types.BadServerResponse,
                             Types.XenAPIException,
                             org.apache.xmlrpc.XmlRpcException
Get the management field of the given PIF.

Returns:
value of the field
Throws:
Types.BadServerResponse
Types.XenAPIException
org.apache.xmlrpc.XmlRpcException

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 PIF.

Returns:
value of the field
Throws:
Types.BadServerResponse
Types.XenAPIException
org.apache.xmlrpc.XmlRpcException

getDisallowUnplug

public Boolean getDisallowUnplug(Connection c)
                          throws Types.BadServerResponse,
                                 Types.XenAPIException,
                                 org.apache.xmlrpc.XmlRpcException
Get the disallow_unplug field of the given PIF.

Returns:
value of the field
Throws:
Types.BadServerResponse
Types.XenAPIException
org.apache.xmlrpc.XmlRpcException

getTunnelAccessPIFOf

public Set<Tunnel> getTunnelAccessPIFOf(Connection c)
                                 throws Types.BadServerResponse,
                                        Types.XenAPIException,
                                        org.apache.xmlrpc.XmlRpcException
Get the tunnel_access_PIF_of field of the given PIF.

Returns:
value of the field
Throws:
Types.BadServerResponse
Types.XenAPIException
org.apache.xmlrpc.XmlRpcException

getTunnelTransportPIFOf

public Set<Tunnel> getTunnelTransportPIFOf(Connection c)
                                    throws Types.BadServerResponse,
                                           Types.XenAPIException,
                                           org.apache.xmlrpc.XmlRpcException
Get the tunnel_transport_PIF_of field of the given PIF.

Returns:
value of the field
Throws:
Types.BadServerResponse
Types.XenAPIException
org.apache.xmlrpc.XmlRpcException

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 PIF.

Parameters:
otherConfig - New value to set
Throws:
Types.BadServerResponse
Types.XenAPIException
org.apache.xmlrpc.XmlRpcException

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 PIF.

Parameters:
key - Key to add
value - Value to add
Throws:
Types.BadServerResponse
Types.XenAPIException
org.apache.xmlrpc.XmlRpcException

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 PIF. If the key is not in that Map, then do nothing.

Parameters:
key - Key to remove
Throws:
Types.BadServerResponse
Types.XenAPIException
org.apache.xmlrpc.XmlRpcException

setDisallowUnplug

public void setDisallowUnplug(Connection c,
                              Boolean disallowUnplug)
                       throws Types.BadServerResponse,
                              Types.XenAPIException,
                              org.apache.xmlrpc.XmlRpcException
Set the disallow_unplug field of the given PIF.

Parameters:
disallowUnplug - New value to set
Throws:
Types.BadServerResponse
Types.XenAPIException
org.apache.xmlrpc.XmlRpcException

createVLANAsync

@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
Deprecated. 

Create a VLAN interface from an existing physical interface. This call is deprecated: use VLAN.create instead

Parameters:
device - physical interface on which to create the VLAN interface
network - network to which this interface should be connected
host - physical machine to which this PIF is connected
VLAN - VLAN tag for the new interface
Returns:
Task
Throws:
Types.BadServerResponse
Types.XenAPIException
org.apache.xmlrpc.XmlRpcException
Types.VlanTagInvalid

createVLAN

@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
Deprecated. 

Create a VLAN interface from an existing physical interface. This call is deprecated: use VLAN.create instead

Parameters:
device - physical interface on which to create the VLAN interface
network - network to which this interface should be connected
host - physical machine to which this PIF is connected
VLAN - VLAN tag for the new interface
Returns:
The reference of the created PIF object
Throws:
Types.BadServerResponse
Types.XenAPIException
org.apache.xmlrpc.XmlRpcException
Types.VlanTagInvalid

destroyAsync

@Deprecated
public Task destroyAsync(Connection c)
                  throws Types.BadServerResponse,
                         Types.XenAPIException,
                         org.apache.xmlrpc.XmlRpcException,
                         Types.PifIsPhysical
Deprecated. 

Destroy the PIF object (provided it is a VLAN interface). This call is deprecated: use VLAN.destroy or Bond.destroy instead

Returns:
Task
Throws:
Types.BadServerResponse
Types.XenAPIException
org.apache.xmlrpc.XmlRpcException
Types.PifIsPhysical

destroy

@Deprecated
public void destroy(Connection c)
             throws Types.BadServerResponse,
                    Types.XenAPIException,
                    org.apache.xmlrpc.XmlRpcException,
                    Types.PifIsPhysical
Deprecated. 

Destroy the PIF object (provided it is a VLAN interface). This call is deprecated: use VLAN.destroy or Bond.destroy instead

Throws:
Types.BadServerResponse
Types.XenAPIException
org.apache.xmlrpc.XmlRpcException
Types.PifIsPhysical

reconfigureIpAsync

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
Reconfigure the IP address settings for this interface

Parameters:
mode - whether to use dynamic/static/no-assignment
IP - the new IP address
netmask - the new netmask
gateway - the new gateway
DNS - the new DNS settings
Returns:
Task
Throws:
Types.BadServerResponse
Types.XenAPIException
org.apache.xmlrpc.XmlRpcException

reconfigureIp

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
Reconfigure the IP address settings for this interface

Parameters:
mode - whether to use dynamic/static/no-assignment
IP - the new IP address
netmask - the new netmask
gateway - the new gateway
DNS - the new DNS settings
Throws:
Types.BadServerResponse
Types.XenAPIException
org.apache.xmlrpc.XmlRpcException

scanAsync

public static Task scanAsync(Connection c,
                             Host host)
                      throws Types.BadServerResponse,
                             Types.XenAPIException,
                             org.apache.xmlrpc.XmlRpcException
Scan for physical interfaces on a host and create PIF objects to represent them

Parameters:
host - The host on which to scan
Returns:
Task
Throws:
Types.BadServerResponse
Types.XenAPIException
org.apache.xmlrpc.XmlRpcException

scan

public static void scan(Connection c,
                        Host host)
                 throws Types.BadServerResponse,
                        Types.XenAPIException,
                        org.apache.xmlrpc.XmlRpcException
Scan for physical interfaces on a host and create PIF objects to represent them

Parameters:
host - The host on which to scan
Throws:
Types.BadServerResponse
Types.XenAPIException
org.apache.xmlrpc.XmlRpcException

scanBiosAsync

public static Task scanBiosAsync(Connection c,
                                 Host host)
                          throws Types.BadServerResponse,
                                 Types.XenAPIException,
                                 org.apache.xmlrpc.XmlRpcException
Scan for physical interfaces on a host and create PIF objects to represent them. Use BIOS-based device names.

Parameters:
host - The host on which to scan
Returns:
Task
Throws:
Types.BadServerResponse
Types.XenAPIException
org.apache.xmlrpc.XmlRpcException

scanBios

public static Set<PIF> scanBios(Connection c,
                                Host host)
                         throws Types.BadServerResponse,
                                Types.XenAPIException,
                                org.apache.xmlrpc.XmlRpcException
Scan for physical interfaces on a host and create PIF objects to represent them. Use BIOS-based device names.

Parameters:
host - The host on which to scan
Returns:
List of newly created PIFs
Throws:
Types.BadServerResponse
Types.XenAPIException
org.apache.xmlrpc.XmlRpcException

introduceAsync

public static Task introduceAsync(Connection c,
                                  Host host,
                                  String MAC,
                                  String device)
                           throws Types.BadServerResponse,
                                  Types.XenAPIException,
                                  org.apache.xmlrpc.XmlRpcException
Create a PIF object matching a particular network interface

Parameters:
host - The host on which the interface exists
MAC - The MAC address of the interface
device - The device name to use for the interface
Returns:
Task
Throws:
Types.BadServerResponse
Types.XenAPIException
org.apache.xmlrpc.XmlRpcException

introduce

public static PIF introduce(Connection c,
                            Host host,
                            String MAC,
                            String device)
                     throws Types.BadServerResponse,
                            Types.XenAPIException,
                            org.apache.xmlrpc.XmlRpcException
Create a PIF object matching a particular network interface

Parameters:
host - The host on which the interface exists
MAC - The MAC address of the interface
device - The device name to use for the interface
Returns:
The reference of the created PIF object
Throws:
Types.BadServerResponse
Types.XenAPIException
org.apache.xmlrpc.XmlRpcException

forgetAsync

public Task forgetAsync(Connection c)
                 throws Types.BadServerResponse,
                        Types.XenAPIException,
                        org.apache.xmlrpc.XmlRpcException,
                        Types.PifTunnelStillExists
Destroy the PIF object matching a particular network interface

Returns:
Task
Throws:
Types.BadServerResponse
Types.XenAPIException
org.apache.xmlrpc.XmlRpcException
Types.PifTunnelStillExists

forget

public void forget(Connection c)
            throws Types.BadServerResponse,
                   Types.XenAPIException,
                   org.apache.xmlrpc.XmlRpcException,
                   Types.PifTunnelStillExists
Destroy the PIF object matching a particular network interface

Throws:
Types.BadServerResponse
Types.XenAPIException
org.apache.xmlrpc.XmlRpcException
Types.PifTunnelStillExists

unplugAsync

public Task unplugAsync(Connection c)
                 throws Types.BadServerResponse,
                        Types.XenAPIException,
                        org.apache.xmlrpc.XmlRpcException
Attempt to bring down a physical interface

Returns:
Task
Throws:
Types.BadServerResponse
Types.XenAPIException
org.apache.xmlrpc.XmlRpcException

unplug

public void unplug(Connection c)
            throws Types.BadServerResponse,
                   Types.XenAPIException,
                   org.apache.xmlrpc.XmlRpcException
Attempt to bring down a physical interface

Throws:
Types.BadServerResponse
Types.XenAPIException
org.apache.xmlrpc.XmlRpcException

plugAsync

public Task plugAsync(Connection c)
               throws Types.BadServerResponse,
                      Types.XenAPIException,
                      org.apache.xmlrpc.XmlRpcException,
                      Types.TransportPifNotConfigured
Attempt to bring up a physical interface

Returns:
Task
Throws:
Types.BadServerResponse
Types.XenAPIException
org.apache.xmlrpc.XmlRpcException
Types.TransportPifNotConfigured

plug

public void plug(Connection c)
          throws Types.BadServerResponse,
                 Types.XenAPIException,
                 org.apache.xmlrpc.XmlRpcException,
                 Types.TransportPifNotConfigured
Attempt to bring up a physical interface

Throws:
Types.BadServerResponse
Types.XenAPIException
org.apache.xmlrpc.XmlRpcException
Types.TransportPifNotConfigured

dbIntroduceAsync

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
Create a new PIF record in the database only

Parameters:
device -
network -
host -
MAC -
MTU -
VLAN -
physical -
ipConfigurationMode -
IP -
netmask -
gateway -
DNS -
bondSlaveOf -
VLANMasterOf -
management -
otherConfig -
disallowUnplug -
Returns:
Task
Throws:
Types.BadServerResponse
Types.XenAPIException
org.apache.xmlrpc.XmlRpcException

dbIntroduce

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
Create a new PIF record in the database only

Parameters:
device -
network -
host -
MAC -
MTU -
VLAN -
physical -
ipConfigurationMode -
IP -
netmask -
gateway -
DNS -
bondSlaveOf -
VLANMasterOf -
management -
otherConfig -
disallowUnplug -
Returns:
The ref of the newly created PIF record.
Throws:
Types.BadServerResponse
Types.XenAPIException
org.apache.xmlrpc.XmlRpcException

dbForgetAsync

public Task dbForgetAsync(Connection c)
                   throws Types.BadServerResponse,
                          Types.XenAPIException,
                          org.apache.xmlrpc.XmlRpcException
Destroy a PIF database record.

Returns:
Task
Throws:
Types.BadServerResponse
Types.XenAPIException
org.apache.xmlrpc.XmlRpcException

dbForget

public void dbForget(Connection c)
              throws Types.BadServerResponse,
                     Types.XenAPIException,
                     org.apache.xmlrpc.XmlRpcException
Destroy a PIF database record.

Throws:
Types.BadServerResponse
Types.XenAPIException
org.apache.xmlrpc.XmlRpcException

getAll

public static Set<PIF> getAll(Connection c)
                       throws Types.BadServerResponse,
                              Types.XenAPIException,
                              org.apache.xmlrpc.XmlRpcException
Return a list of all the PIFs known to the system.

Returns:
references to all objects
Throws:
Types.BadServerResponse
Types.XenAPIException
org.apache.xmlrpc.XmlRpcException

getAllRecords

public static Map<PIF,PIF.Record> getAllRecords(Connection c)
                                         throws Types.BadServerResponse,
                                                Types.XenAPIException,
                                                org.apache.xmlrpc.XmlRpcException
Return a map of PIF references to PIF records for all PIFs known to the system.

Returns:
records of all objects
Throws:
Types.BadServerResponse
Types.XenAPIException
org.apache.xmlrpc.XmlRpcException