Skip to content

Commit

Permalink
Merge 74b8f50 into 9fa9822
Browse files Browse the repository at this point in the history
  • Loading branch information
plribeiro3000 committed Jul 4, 2014
2 parents 9fa9822 + 74b8f50 commit 1429a4d
Show file tree
Hide file tree
Showing 55 changed files with 1,425 additions and 132 deletions.
2 changes: 1 addition & 1 deletion lib/fog/compute/xen_server/models/blob.rb
Expand Up @@ -10,9 +10,9 @@ class Blob < Fog::Model

identity :reference

attribute :description, :aliases => :name_description
attribute :last_updated
attribute :mime_type
attribute :description, :aliases => :name_description
attribute :name, :aliases => :name_label
attribute :public
attribute :size
Expand Down
2 changes: 1 addition & 1 deletion lib/fog/compute/xen_server/models/crash_dump.rb
Expand Up @@ -11,9 +11,9 @@ class CrashDump < Fog::Model
identity :reference

attribute :other_config
attribute :uuid
attribute :__vdi, :aliases => :VDI
attribute :__vm, :aliases => :VM
attribute :uuid
end
end
end
Expand Down
4 changes: 2 additions & 2 deletions lib/fog/compute/xen_server/models/gpu_group.rb
Expand Up @@ -10,13 +10,13 @@ class GpuGroup < Fog::Model

identity :reference

attribute :gpu_types, :aliases => :GPU_types
attribute :description, :aliases => :name_description
attribute :gpu_types, :aliases => :GPU_types
attribute :name, :aliases => :name_label
attribute :other_config
attribute :__pgpus, :aliases => :PGPUs
attribute :__vgpus, :aliases => :VGPUs
attribute :uuid
attribute :__vgpus, :aliases => :VGPUs
end
end
end
Expand Down
2 changes: 1 addition & 1 deletion lib/fog/compute/xen_server/models/guest_metrics.rb
Expand Up @@ -10,7 +10,6 @@ class GuestMetrics < Fog::Model

identity :reference

attribute :uuid
attribute :disk
attribute :last_updated
attribute :live
Expand All @@ -21,6 +20,7 @@ class GuestMetrics < Fog::Model
attribute :other_config
attribute :pv_drivers_up_to_date, :aliases => :PV_drivers_up_to_date
attribute :pv_drivers_version, :aliases => :PV_drivers_version
attribute :uuid
end
end
end
Expand Down
14 changes: 7 additions & 7 deletions lib/fog/compute/xen_server/models/host.rb
Expand Up @@ -10,8 +10,6 @@ class Host < Fog::Model

identity :reference

attribute :name, :aliases => :name_label
attribute :uuid
attribute :address
attribute :allowed_operations
attribute :api_version_major, :aliases => :API_version_major
Expand All @@ -24,9 +22,11 @@ class Host < Fog::Model
attribute :chipset_info
attribute :cpu_configuration
attribute :cpu_info
attribute :__crash_dump_sr, :aliases => :crash_dump_sr
attribute :__crashdumps, :aliases => :crashdumps
attribute :__crash_dump_sr, :aliases => :crash_dump_sr
attribute :current_operations
attribute :description, :aliases => :name_description
attribute :edition
attribute :enabled
attribute :external_auth_configuration
attribute :external_auth_service_name
Expand All @@ -35,13 +35,14 @@ class Host < Fog::Model
attribute :ha_network_peers
attribute :ha_statefiles
attribute :hostname
attribute :__host_cpus, :aliases => :host_CPUs
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 :name, :aliases => :name_label
attribute :other_config
attribute :patches
attribute :__pbds, :aliases => :PBDs
Expand All @@ -52,12 +53,11 @@ class Host < Fog::Model
attribute :power_on_mode
attribute :__resident_vms, :aliases => :resident_VMs
attribute :sched_policy
attribute :software_version
attribute :supported_bootloaders
attribute :suspend_image_sr
attribute :tags
attribute :__host_cpus, :aliases => :host_CPUs
attribute :edition
attribute :software_version
attribute :uuid

def pifs
__pifs.collect { |pif| service.pifs.get pif }
Expand Down
2 changes: 1 addition & 1 deletion lib/fog/compute/xen_server/models/host_cpu.rb
Expand Up @@ -10,7 +10,6 @@ class HostCpu < Fog::Model

identity :reference

attribute :uuid
attribute :family
attribute :features
attribute :flags
Expand All @@ -22,6 +21,7 @@ class HostCpu < Fog::Model
attribute :speed
attribute :stepping
attribute :utilisation
attribute :uuid
attribute :vendor

def host
Expand Down
4 changes: 2 additions & 2 deletions lib/fog/compute/xen_server/models/host_metrics.rb
Expand Up @@ -10,12 +10,12 @@ class HostMetrics < Fog::Model

identity :reference

attribute :uuid
attribute :last_updated
attribute :live
attribute :memory_free
attribute :memory_total
attribute :other_config
attribute :last_updated
attribute :uuid

def initialize(attributes = {})
super
Expand Down
2 changes: 1 addition & 1 deletion lib/fog/compute/xen_server/models/host_patch.rb
Expand Up @@ -11,8 +11,8 @@ class HostPatch < Fog::Model
identity :reference

attribute :applied
attribute :__host, :aliases => :host
attribute :description, :aliases => :name_description
attribute :__host, :aliases => :host
attribute :name, :aliases => :name_label
attribute :other_config
attribute :__pool_patch, :aliases => :pool_patch
Expand Down
16 changes: 8 additions & 8 deletions lib/fog/compute/xen_server/models/network.rb
Expand Up @@ -10,19 +10,19 @@ class Network < Fog::Model

identity :reference

attribute :uuid
attribute :__vifs, :aliases => :VIFs
attribute :tags
attribute :mtu, :aliases => :MTU
attribute :allowed_operations
attribute :blobs
attribute :bridge
attribute :current_operations
attribute :default_locking_mode
attribute :description, :aliases => :name_description
attribute :mtu, :aliases => :MTU
attribute :name, :aliases => :name_label
attribute :other_config
attribute :__pifs, :aliases => :PIFs
attribute :allowed_operations
attribute :current_operations
attribute :default_locking_mode
attribute :blobs
attribute :tags
attribute :uuid
attribute :__vifs, :aliases => :VIFs

def refresh
data = service.get_record( reference, 'network' )
Expand Down
6 changes: 3 additions & 3 deletions lib/fog/compute/xen_server/models/pbd.rb
Expand Up @@ -10,12 +10,12 @@ class Pbd < Fog::Model

identity :reference

attribute :uuid
attribute :__host, :aliases => :host
attribute :__sr, :aliases => :SR
attribute :currently_attached
attribute :device_config
attribute :__host, :aliases => :host
attribute :other_config
attribute :__sr, :aliases => :SR
attribute :uuid

def sr
service.storage_repositories.get __sr
Expand Down
18 changes: 9 additions & 9 deletions lib/fog/compute/xen_server/models/pif.rb
Expand Up @@ -10,37 +10,37 @@ class Pif < Fog::Model

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 :currently_attached
attribute :device
attribute :device_name
attribute :metrics
attribute :dns, :aliases => :DNS
attribute :gateway
attribute :__host, :aliases => :host
attribute :ip, :aliases => :IP
attribute :ip_configuration_mode
attribute :ipv6, :aliases => :IPv6
attribute :ipv6_configuration_mode
attribute :ipv6_gateway
attribute :mac, :aliases => :MAC
attribute :management
attribute :metrics
attribute :mtu, :aliases => :MTU
attribute :__network, :aliases => :network
attribute :netmask
attribute :__network, :aliases => :network
attribute :other_config
attribute :physical
attribute :primary_address_type
attribute :status_code
attribute :status_detail
attribute :management
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 :uuid

def network
service.networks.get __network
Expand Down
15 changes: 7 additions & 8 deletions lib/fog/compute/xen_server/models/pool.rb
Expand Up @@ -10,35 +10,34 @@ class Pool < Fog::Model

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 :description, :aliases => :name_description
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 :__master, :aliases => :master
attribute :__metadata_vdis, :aliases => :metadata_VDIs
attribute :name, :aliases => :name_label
attribute :other_config
attribute :redo_log_enabled
attribute :redo_log_vdi
attribute :vswitch_controller
attribute :restrictions
attribute :__suspend_image_sr, :aliases => :suspend_image_SR
attribute :tags
attribute :uuid
attribute :vswitch_controller
attribute :wlb_enabled
attribute :wlb_url
attribute :wlb_username
attribute :wlb_verify_cert


def default_sr
service.storage_repositories.get __default_sr
end
Expand Down
2 changes: 1 addition & 1 deletion lib/fog/compute/xen_server/models/pool_patch.rb
Expand Up @@ -11,8 +11,8 @@ class PoolPatch < Fog::Model
identity :reference

attribute :after_apply_guidance
attribute :__host_patches, :aliases => :host_patches
attribute :description, :aliases => :name_description
attribute :__host_patches, :aliases => :host_patches
attribute :name, :aliases => :name_label
attribute :other_config
attribute :pool_applied
Expand Down
43 changes: 20 additions & 23 deletions lib/fog/compute/xen_server/models/server.rb
Expand Up @@ -10,84 +10,81 @@ class Server < Fog::Compute::Server

identity :reference

attribute :uuid
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 :__consoles, :aliases => :consoles
attribute :__attached_pcis, :aliases => :attached_PCIs
attribute :bios_strings
attribute :__affinity, :aliases => :affinity
attribute :allowed_operations
attribute :blobs
attribute :blocked_operations
attribute :bios_strings
attribute :__children, :aliases => :children
attribute :__consoles, :aliases => :consoles
attribute :__crash_dumps, :aliases => :crash_dumps
attribute :current_operations
attribute :domarch
attribute :domid
attribute :description, :aliases => :name_description
attribute :generation_id
attribute :tags
attribute :__guest_metrics, :aliases => :guest_metrics
attribute :ha_always_run
attribute :ha_restart_priority
attribute :hvm_boot_params, :aliases => :HVM_boot_params
attribute :hvm_boot_policy, :aliases => :HVM_boot_policy
attribute :hvm_shadow_multiplier, :aliases => :HVM_shadow_multiplier
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 :last_boot_cpu_flags, :aliases => :last_boot_CPU_flags
attribute :memory_dynamic_max
attribute :memory_dynamic_min
attribute :memory_overhead
attribute :memory_static_max
attribute :memory_static_min
attribute :memory_target
attribute :__metrics, :aliases => :metrics
attribute :name, :aliases => :name_label
attribute :order
attribute :other_config
attribute :__parent, :aliases => :parent
attribute :pci_bus, :aliases => :PCI_bus
attribute :platform
attribute :power_state
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 :pv_ramdisk, :aliases => :PV_ramdisk
attribute :recommendations
attribute :__resident_on, :aliases => :resident_on
attribute :shutdown_delay
attribute :snapshots
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 :tags
attribute :template_name
attribute :transportable_snapshot_id
attribute :user_version
attribute :version
attribute :__vgpus, :aliases => :VGPUs
attribute :__vtpms, :aliases => :VTPMs
attribute :xenstore_data
# Virtual Block Devices
attribute :uuid
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
# Virtual Interfaces (NIC)
attribute :version
attribute :__vifs, :aliases => :VIFs
attribute :template_name
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
attribute :__vgpus, :aliases => :VGPUs
attribute :__vtpms, :aliases => :VTPMs
attribute :xenstore_data

def vbds
__vbds.collect {|vbd| service.vbds.get vbd }
Expand Down

0 comments on commit 1429a4d

Please sign in to comment.