1
0
Fork 0
mirror of https://github.com/fog/fog.git synced 2022-11-09 13:51:43 -05:00

[xenserver] Updated models to have all attributes from version 6.2.0

This commit is contained in:
Paulo Henrique Lopes Ribeiro 2013-12-10 23:05:42 -02:00
parent 8085a59f86
commit 32cfb41008
16 changed files with 179 additions and 61 deletions

View file

@ -5,10 +5,12 @@ module Fog
class XenServer
class Console < Fog::Model
# API Reference here:
# http://docs.vmd.citrix.com/XenServer/6.0.0/1.0/en_gb/api/?c=console
# http://docs.vmd.citrix.com/XenServer/6.2.0/1.0/en_gb/api/?c=console
identity :reference
attribute :location
attribute :other_config
attribute :protocol
attribute :uuid
attribute :__vm, aliases: :VM

View file

@ -6,11 +6,12 @@ module Fog
class GuestMetrics < Fog::Model
# API Reference here:
# http://docs.vmd.citrix.com/XenServer/5.6.0/1.0/en_gb/api/?c=VM_guest_metrics
# http://docs.vmd.citrix.com/XenServer/6.2.0/1.0/en_gb/api/?c=VM_guest_metrics
identity :reference
attribute :uuid
attribute :disk
attribute :last_updated
attribute :live
attribute :memory

View file

@ -6,23 +6,56 @@ module Fog
class Host < Fog::Model
# API Reference here:
# http://docs.vmd.citrix.com/XenServer/5.6.0/1.0/en_gb/api/?c=host
# http://docs.vmd.citrix.com/XenServer/6.2.0/1.0/en_gb/api/?c=host
identity :reference
attribute :name, :aliases => :name_label
attribute :name, :aliases => :name_label
attribute :uuid
attribute :address
attribute :allowed_operations
attribute :api_version_major, :aliases => :API_version_major
attribute :api_version_minor, :aliases => :API_version_minor
attribute :api_version_vendor, :aliases => :API_version_vendor
attribute :api_version_vendor_implementation, :aliases => :API_version_vendor_implementation
attribute :bios_strings
attribute :blobs
attribute :capabilities
attribute :chipset_info
attribute :cpu_configuration
attribute :cpu_info
attribute :__crash_dump_sr, :aliases => :crash_dump_sr
attribute :__crashdumps, :aliases => :crashdumps
attribute :current_operations
attribute :enabled
attribute :external_auth_configuration
attribute :external_auth_service_name
attribute :external_auth_type
attribute :guest_vcpus_params, :aliases => :guest_VCPUs_params
attribute :ha_network_peers
attribute :ha_statefiles
attribute :hostname
attribute :__metrics, :aliases => :metrics
attribute :name_description
attribute :license_params
attribute :license_server
attribute :__local_cache_sr, :aliases => :local_cache_sr
attribute :logging
attribute :memory_overhead
attribute :__metrics, :aliases => :metrics
attribute :description, :aliases => :name_description
attribute :other_config
attribute :__pbds, :aliases => :PBDs
attribute :__pifs, :aliases => :PIFs
attribute :__resident_vms, :aliases => :resident_VMs
attribute :__host_cpus, :aliases => :host_CPUs
attribute :patches
attribute :__pbds, :aliases => :PBDs
attribute :__pcis, :aliases => :PCIs
attribute :__pgpus, :aliases => :PGPUs
attribute :__pifs, :aliases => :PIFs
attribute :power_on_config
attribute :power_on_mode
attribute :__resident_vms, :aliases => :resident_VMs
attribute :sched_policy
attribute :supported_bootloaders
attribute :suspend_image_sr
attribute :tags
attribute :__host_cpus, :aliases => :host_CPUs
attribute :edition
attribute :software_version

View file

@ -7,7 +7,7 @@ module Fog
#
# A physical CPU
#
# @see http://docs.vmd.citrix.com/XenServer/6.0.0/1.0/en_gb/api/?c=host_cpu
# @see http://docs.vmd.citrix.com/XenServer/6.2.0/1.0/en_gb/api/?c=host_cpu
#
class HostCpu < Fog::Model
@ -15,6 +15,7 @@ module Fog
attribute :uuid
attribute :family
attribute :features
attribute :flags
attribute :__host, :aliases => :host
attribute :model

View file

@ -6,7 +6,7 @@ module Fog
class HostMetrics < Fog::Model
# API Reference here:
# http://docs.vmd.citrix.com/XenServer/5.6.0/1.0/en_gb/api/?c=VM_host_metrics
# http://docs.vmd.citrix.com/XenServer/6.2.0/1.0/en_gb/api/?c=host_metrics
identity :reference

View file

@ -6,21 +6,22 @@ module Fog
class Network < Fog::Model
# API Reference here:
# http://docs.vmd.citrix.com/XenServer/5.6.0/1.0/en_gb/api/?c=network
# http://docs.vmd.citrix.com/XenServer/6.2.0/1.0/en_gb/api/?c=network
identity :reference
attribute :uuid
attribute :__vifs, :aliases => :VIFs
attribute :__vifs, :aliases => :VIFs
attribute :tags
attribute :mtu, :aliases => :MTU
attribute :mtu, :aliases => :MTU
attribute :bridge
attribute :description, :aliases => :name_description
attribute :name, :aliases => :name_label
attribute :description, :aliases => :name_description
attribute :name, :aliases => :name_label
attribute :other_config
attribute :__pifs, :aliases => :PIFs
attribute :__pifs, :aliases => :PIFs
attribute :allowed_operations
attribute :current_operations
attribute :default_locking_mode
attribute :blobs
def refresh

View file

@ -6,7 +6,7 @@ module Fog
class PBD < Fog::Model
# API Reference here:
# http://docs.vmd.citrix.com/XenServer/5.6.0/1.0/en_gb/api/?c=PBD
# http://docs.vmd.citrix.com/XenServer/6.2.0/1.0/en_gb/api/?c=PBD
identity :reference
@ -14,6 +14,8 @@ module Fog
attribute :__host, :aliases => :host
attribute :__sr, :aliases => :SR
attribute :currently_attached
attribute :device_config
attribute :other_config
def sr
service.storage_repositories.get __sr

View file

@ -6,30 +6,41 @@ module Fog
class PIF < Fog::Model
# API Reference here:
# http://docs.vmd.citrix.com/XenServer/5.6.0/1.0/en_gb/api/?c=PIF
# http://docs.vmd.citrix.com/XenServer/6.2.0/1.0/en_gb/api/?c=PIF
identity :reference
attribute :uuid
attribute :__bond_master_of, :aliases => :bond_master_of
attribute :__bond_slave_of, :aliases => :bond_slave_of
attribute :disallow_unplug
attribute :physical
attribute :mac, :aliases => :MAC
attribute :mac, :aliases => :MAC
attribute :currently_attached
attribute :device
attribute :device_name
attribute :metrics
attribute :dns, :aliases => :DNS
attribute :dns, :aliases => :DNS
attribute :gateway
attribute :ip, :aliases => :IP
attribute :ip, :aliases => :IP
attribute :ip_configuration_mode
attribute :mtu, :aliases => :MTU
attribute :__network, :aliases => :network
attribute :ipv6, :aliases => :IPv6
attribute :ipv6_configuration_mode
attribute :ipv6_gateway
attribute :mtu, :aliases => :MTU
attribute :__network, :aliases => :network
attribute :netmask
attribute :status_code
attribute :status_detail
attribute :management
attribute :vlan, :aliases => :VLAN
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
attribute :other_config
attribute :__host, :aliases => :host
attribute :__host, :aliases => :host
def network
service.networks.get __network

View file

@ -6,20 +6,37 @@ module Fog
class Pool < Fog::Model
# API Reference here:
# http://docs.vmd.citrix.com/XenServer/5.6.0/1.0/en_gb/api/?c=pool
# http://docs.vmd.citrix.com/XenServer/6.2.0/1.0/en_gb/api/?c=pool
identity :reference
attribute :uuid
attribute :blobs
attribute :__crash_dump_sr, :aliases => :crash_dump_SR
attribute :name, :aliases => :name_label
attribute :description, :aliases => :name_description
attribute :__default_sr, :aliases => :default_SR
attribute :gui_config
attribute :ha_allow_overcommit
attribute :ha_configuration
attribute :__master, :aliases => :master
attribute :tags
attribute :restrictions
attribute :ha_enabled
attribute :ha_host_failures_to_tolerate
attribute :ha_overcommitted
attribute :ha_plan_exists_for
attribute :ha_statefiles
attribute :__metadata_vdis, :aliases => :metadata_VDIs
attribute :other_config
attribute :redo_log_enabled
attribute :redo_log_vdi
attribute :vswitch_controller
attribute :__suspend_image_sr, :aliases => :suspend_image_SR
attribute :wlb_enabled
attribute :wlb_url
attribute :wlb_username
attribute :wlb_verify_cert
def default_sr

View file

@ -6,56 +6,89 @@ module Fog
class Server < Fog::Compute::Server
# API Reference here:
# http://docs.vmd.citrix.com/XenServer/5.6.0/1.0/en_gb/api/?c=VM
# http://docs.vmd.citrix.com/XenServer/6.2.0/1.0/en_gb/api/?c=VM
identity :reference
attribute :uuid
attribute :name, :aliases => :name_label
attribute :__affinity, :aliases => :affinity
attribute :name, :aliases => :name_label
attribute :description, :aliases => :name_description
attribute :__affinity, :aliases => :affinity
attribute :actions_after_crash
attribute :actions_after_reboot
attribute :actions_after_shutdown
attribute :allowed_operations
attribute :__attached_pcis, :aliases => :attached_PCIs
attribute :bios_strings
attribute :blobs
attribute :blocked_operations
attribute :__children, :aliases => :children
attribute :__consoles
attribute :__crash_dumps, :aliases => :crash_dumps
attribute :current_operations
attribute :domarch
attribute :domid
attribute :generation_id
attribute :tags
attribute :__guest_metrics, :aliases => :guest_metrics
attribute :__guest_metrics, :aliases => :guest_metrics
attribute :ha_always_run
attribute :ha_restart_priority
attribute :is_a_snapshot
attribute :is_a_template
attribute :is_control_domain
attribute :is_snapshot_from_vmpp
attribute :last_boot_cpu_flags, :aliases => :last_boot_CPU_flags
attribute :last_booted_record
attribute :memory_dynamic_max
attribute :memory_dynamic_min
attribute :memory_overhead
attribute :memory_static_max
attribute :memory_static_min
attribute :memory_target
attribute :metrics
attribute :name_description
attribute :__metrics, :aliases => :metrics
attribute :order
attribute :other_config
attribute :__parent, :aliases => :parent
attribute :platform
attribute :power_state
attribute :pv_args, :aliases => :PV_args
attribute :pv_bootloader, :aliases => :PV_bootloader
attribute :pv_bootloader_args, :aliases => :PV_bootloader_args
attribute :pv_kernel, :aliases => :PV_kernel
attribute :pv_ramdisk, :aliases => :PV_ramdisk
attribute :pv_legacy_args, :aliases => :PV_legacy_args
attribute :__resident_on, :aliases => :resident_on
attribute :protection_policy
attribute :pv_args, :aliases => :PV_args
attribute :pv_bootloader, :aliases => :PV_bootloader
attribute :pv_bootloader_args, :aliases => :PV_bootloader_args
attribute :pv_kernel, :aliases => :PV_kernel
attribute :pv_ramdisk, :aliases => :PV_ramdisk
attribute :pv_legacy_args, :aliases => :PV_legacy_args
attribute :recommendations
attribute :__resident_on, :aliases => :resident_on
attribute :shutdown_delay
attribute :snapshot_info
attribute :snapshot_metadata
attribute :__snapshot_of, :aliases => :snapshot_of
attribute :snapshot_time
attribute :start_delay
attribute :__suspend_sr, :aliases => :suspend_sr
attribute :__suspend_vdi, :aliases => :suspend_VDI
attribute :transportable_snapshot_id
attribute :user_version
attribute :version
attribute :__vgpus, :aliases => :VGPUs
attribute :__vtpms, :aliases => :VTPMs
attribute :xenstore_data
# Virtual Block Devices
attribute :__vbds, :aliases => :VBDs
attribute :__vbds, :aliases => :VBDs
# Virtual CPUs
attribute :vcpus_at_startup, :aliases => :VCPUs_at_startup
attribute :vcpus_max, :aliases => :VCPUs_max
attribute :vcpus_params, :aliases => :VCPUs_params
attribute :vcpus_at_startup, :aliases => :VCPUs_at_startup
attribute :vcpus_max, :aliases => :VCPUs_max
attribute :vcpus_params, :aliases => :VCPUs_params
# Virtual Interfaces (NIC)
attribute :__vifs, :aliases => :VIFs
attribute :__vifs, :aliases => :VIFs
attribute :template_name
attribute :hvm_boot_policy, :aliases => :HVM_boot_policy
attribute :hvm_boot_params, :aliases => :HVM_boot_params
attribute :pci_bus, :aliases => :PCI_bus
attribute :hvm_boot_policy, :aliases => :HVM_boot_policy
attribute :hvm_boot_params, :aliases => :HVM_boot_params
attribute :hvm_shadow_multiplier, :aliases => :HVM_shadow_multiplier
attribute :pci_bus, :aliases => :PCI_bus
attribute :snapshots
def initialize(attributes={})
super
end
def vbds
__vbds.collect {|vbd| service.vbds.get vbd }
end

View file

@ -6,15 +6,18 @@ module Fog
class StorageRepository < Fog::Model
# API Reference here:
# http://docs.vmd.citrix.com/XenServer/5.6.0/1.0/en_gb/api/?c=SR
# http://docs.vmd.citrix.com/XenServer/6.2.0/1.0/en_gb/api/?c=SR
identity :reference
attribute :name, :aliases => :name_label
attribute :description, :aliases => :name_description
attribute :uuid
attribute :blobs
attribute :allowed_operations
attribute :current_operations
attribute :introduced_by
attribute :local_cache_enabled
attribute :content_type
attribute :other_config
attribute :__pbds, :aliases => :PBDs

View file

@ -6,7 +6,7 @@ module Fog
class VBD < Fog::Model
# API Reference here:
# http://docs.vmd.citrix.com/XenServer/5.6.0/1.0/en_gb/api/?c=VBD
# http://docs.vmd.citrix.com/XenServer/6.2.0/1.0/en_gb/api/?c=VBD
identity :reference
@ -22,8 +22,8 @@ module Fog
attribute :type
attribute :userdevice
attribute :empty
attribute :type
attribute :mode
attribute :other_config
attribute :storage_lock
attribute :runtime_properties
attribute :unpluggable
@ -31,6 +31,7 @@ module Fog
attribute :qos_supported_algorithms
attribute :qos_algorithm_params
attribute :qos_algorithm_type
attribute :qos_supported_algorithms
attribute :empty
attribute :__metrics, :aliases => :metrics

View file

@ -6,7 +6,7 @@ module Fog
class VbdMetrics < Fog::Model
# API Reference here:
# http://docs.vmd.citrix.com/XenServer/5.6.0/1.0/en_gb/api/?c=VBD_metrics
# http://docs.vmd.citrix.com/XenServer/6.2.0/1.0/en_gb/api/?c=VBD_metrics
identity :reference

View file

@ -6,7 +6,7 @@ module Fog
class VDI < Fog::Model
# API Reference here:
# http://docs.vmd.citrix.com/XenServer/5.6.0/1.0/en_gb/api/?c=VDI
# http://docs.vmd.citrix.com/XenServer/6.2.0/1.0/en_gb/api/?c=VDI
identity :reference
@ -22,6 +22,7 @@ module Fog
attribute :read_only
attribute :current_operations
attribute :allowed_operations
attribute :__crash_dumps, :aliases => :crash_dumps
attribute :type
attribute :other_config
attribute :tags
@ -30,6 +31,8 @@ module Fog
attribute :missing
attribute :location
attribute :managed
attribute :metadata_latest
attribute :metadata_of_pool
attribute :allow_caching
attribute :on_boot
attribute :sm_config

View file

@ -6,17 +6,26 @@ module Fog
class VIF < Fog::Model
# API Reference here:
# http://docs.vmd.citrix.com/XenServer/5.6.0/1.0/en_gb/api/?c=VIF
# http://docs.vmd.citrix.com/XenServer/6.2.0/1.0/en_gb/api/?c=VIF
identity :reference
attribute :mac, :aliases => :MAC
attribute :uuid
attribute :allowed_operations
attribute :current_operations
attribute :currently_attached
attribute :device
attribute :ipv4_allowed
attribute :ipv6_allowed
attribute :locking_mode
attribute :mac_autogenerated, :aliases => :MAC_autogenerated
attribute :metrics
attribute :__metrics, :aliases => :metrics
attribute :other_config
attribute :qos_algorithm_params
attribute :qos_algorithm_type
attribute :qos_supported_algorithms
attribute :runtime_properties
attribute :mtu, :aliases => :MTU
attribute :__network, :aliases => :network
attribute :status_code

View file

@ -6,12 +6,13 @@ module Fog
class VLAN < Fog::Model
# API Reference here:
# @see http://docs.vmd.citrix.com/XenServer/5.6.0/1.0/en_gb/api/?c=VLAN
# @see http://docs.vmd.citrix.com/XenServer/6.2.0/1.0/en_gb/api/?c=VLAN
identity :reference
attribute :uuid
attribute :tag, :type => :integer
attribute :other_config
attribute :__untagged_pif, :aliases => :untagged_PIF
attribute :__tagged_pif, :aliases => :tagged_PIF