search for: vm_state_change_events

Displaying 3 results from an estimated 3 matches for "vm_state_change_events".

Did you mean: vm_state_change_event
2009 Jun 29
0
[PATCH server] REVISED Vm state change auditing/accounting
...ff --git a/src/app/models/vm.rb b/src/app/models/vm.rb index f445219..1a57a14 100644 --- a/src/app/models/vm.rb +++ b/src/app/models/vm.rb @@ -41,6 +41,14 @@ class Vm < ActiveRecord::Base :order => 'time_started DESC', :dependent => :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, :descrip...
2009 Jun 24
1
[PATCH server] Vm state change auditing/accounting
...ff --git a/src/app/models/vm.rb b/src/app/models/vm.rb index c1be4a6..a45342e 100644 --- a/src/app/models/vm.rb +++ b/src/app/models/vm.rb @@ -41,6 +41,14 @@ class Vm < ActiveRecord::Base :order => 'time_started DESC', :dependent => :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, :descrip...
2009 Jul 13
0
[PATCH server] remove vm forward vnc and vm host history
...reverse cronological collection of vm history - # each collection item contains host vm was running on, - # time started, and time ended (see VmHostHistory) - has_many :vm_host_histories, - :order => 'time_started DESC', - :dependent => :destroy - - has_many :vm_state_change_events, :order => 'created_at' do def previous_state_with_type(state_type) @@ -59,22 +51,6 @@ class Vm < ActiveRecord::Base validates_format_of :uuid, :with => %r([a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}) - FORWARD_VNC_PORT_START = 5901 - -...