1
0
Fork 0
mirror of https://github.com/fog/fog.git synced 2022-11-09 13:51:43 -05:00
fog--fog/lib/fog/xenserver/models/compute/vif.rb
Sergio Rubio 641ebd3fcd * Added VIF model and collection tests
* added network and server wrappers to VIF model
2012-04-02 13:35:49 +02:00

39 lines
964 B
Ruby

require 'fog/core/model'
module Fog
module Compute
class XenServer
class VIF < Fog::Model
# API Reference here:
# http://docs.vmd.citrix.com/XenServer/5.6.0/1.0/en_gb/api/?c=VIF
identity :reference
attribute :mac, :aliases => :MAC
attribute :uuid
attribute :allowed_operations
attribute :currently_attached
attribute :device
attribute :mac_autogenerated, :aliases => :MAC_autogenerated
attribute :metrics
attribute :mtu, :aliases => :MTU
attribute :__network, :aliases => :network
attribute :status_code
attribute :status_detail
attribute :__vm, :aliases => :VM
def network
connection.networks.get __network
end
def server
connection.servers.get __vm
end
end
end
end
end