2012-04-02 07:25:03 -04:00
|
|
|
require 'fog/core/model'
|
|
|
|
|
|
|
|
module Fog
|
|
|
|
module Compute
|
|
|
|
class XenServer
|
|
|
|
class PIF < Fog::Model
|
|
|
|
# API Reference here:
|
2013-12-10 20:05:42 -05:00
|
|
|
# http://docs.vmd.citrix.com/XenServer/6.2.0/1.0/en_gb/api/?c=PIF
|
2012-12-22 18:21:33 -05:00
|
|
|
|
2012-04-02 07:25:03 -04:00
|
|
|
identity :reference
|
2012-12-22 18:21:33 -05:00
|
|
|
|
2012-04-02 07:25:03 -04:00
|
|
|
attribute :uuid
|
2013-12-10 20:05:42 -05:00
|
|
|
attribute :__bond_master_of, :aliases => :bond_master_of
|
|
|
|
attribute :__bond_slave_of, :aliases => :bond_slave_of
|
|
|
|
attribute :disallow_unplug
|
2012-04-02 07:25:03 -04:00
|
|
|
attribute :physical
|
2013-12-10 20:05:42 -05:00
|
|
|
attribute :mac, :aliases => :MAC
|
2012-04-02 07:25:03 -04:00
|
|
|
attribute :currently_attached
|
|
|
|
attribute :device
|
|
|
|
attribute :device_name
|
|
|
|
attribute :metrics
|
2013-12-10 20:05:42 -05:00
|
|
|
attribute :dns, :aliases => :DNS
|
2012-04-02 07:25:03 -04:00
|
|
|
attribute :gateway
|
2013-12-10 20:05:42 -05:00
|
|
|
attribute :ip, :aliases => :IP
|
2012-12-22 18:21:33 -05:00
|
|
|
attribute :ip_configuration_mode
|
2013-12-10 20:05:42 -05:00
|
|
|
attribute :ipv6, :aliases => :IPv6
|
|
|
|
attribute :ipv6_configuration_mode
|
|
|
|
attribute :ipv6_gateway
|
|
|
|
attribute :mtu, :aliases => :MTU
|
|
|
|
attribute :__network, :aliases => :network
|
2012-04-02 07:25:03 -04:00
|
|
|
attribute :netmask
|
|
|
|
attribute :status_code
|
|
|
|
attribute :status_detail
|
|
|
|
attribute :management
|
2013-12-10 20:05:42 -05:00
|
|
|
attribute :primary_address_type
|
|
|
|
attribute :__tunnel_access_pif_of, :aliases => :tunnel_access_PIF_of
|
|
|
|
attribute :__tunnel_transport_pif_of, :aliases => :tunnel_transport_PIF_of
|
|
|
|
attribute :vlan, :aliases => :VLAN
|
|
|
|
attribute :vlan_master_of, :aliases => :VLAN_master_of
|
|
|
|
attribute :vlan_slave_of, :aliases => :VLAN_slave_of
|
2012-04-02 07:25:03 -04:00
|
|
|
attribute :other_config
|
2013-12-10 20:05:42 -05:00
|
|
|
attribute :__host, :aliases => :host
|
2012-12-22 18:21:33 -05:00
|
|
|
|
2012-04-02 07:25:03 -04:00
|
|
|
def network
|
2012-12-22 18:21:33 -05:00
|
|
|
service.networks.get __network
|
2012-04-02 07:25:03 -04:00
|
|
|
end
|
|
|
|
|
|
|
|
def host
|
2012-12-22 18:21:33 -05:00
|
|
|
service.hosts.get __host
|
2012-04-02 07:25:03 -04:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|