Displaying 3 results from an estimated 3 matches for "vm_host_histori".
Did you mean:
vm_host_history
2009 Jul 13
0
[PATCH server] remove vm forward vnc and vm host history
...rt_pool_tags, :as => :tagged, :dependent => :destroy
has_many :smart_pools, :through => :smart_pool_tags
- # reverse cronological collection of vm history
- # each collection item contains vm that was running on host
- # time started, and time ended (see VmHostHistory)
- has_many :vm_host_histories,
- :order => 'time_started DESC',
- :dependent => :destroy
-
- alias history vm_host_histories
-
acts_as_xapian :texts => [ :hostname, :uuid, :hypervisor_type, :arch ],
:values => [ [ :created_at, 0, "created_at", :date ],...
2009 Jun 29
0
[PATCH server] REVISED Vm state change auditing/accounting
...ndent => :destroy
+
+ has_many :vm_state_change_events,
+ :order => 'created_at' do
+ def previous_state_with_type(state_type)
+ find(:first, :conditions=> { :to_state => state_type }, :order=> 'created_at DESC')
+ end
+ end
+
alias history vm_host_histories
validates_presence_of :uuid, :description, :num_vcpus_allocated,
@@ -138,6 +146,25 @@ class Vm < ActiveRecord::Base
STATE_CREATE_FAILED = "create_failed"
STATE_INVALID = "invalid"
+ ALL_STATES = [STATE_PENDING,
+ STATE_CREATING,
+...
2009 Jun 24
1
[PATCH server] Vm state change auditing/accounting
...ndent => :destroy
+
+ has_many :vm_state_change_events,
+ :order => 'created_at' do
+ def previous_state_with_type(state_type)
+ find(:first, :conditions=> { :to_state => state_type }, :order=> 'created_at DESC')
+ end
+ end
+
alias history vm_host_histories
validates_presence_of :uuid, :description, :num_vcpus_allocated,
@@ -138,6 +146,25 @@ class Vm < ActiveRecord::Base
STATE_CREATE_FAILED = "create_failed"
STATE_INVALID = "invalid"
+ ALL_STATES = [STATE_PENDING,
+ STATE_CREATING,
+...