search for: vm_resource_pool

Displaying 20 results from an estimated 21 matches for "vm_resource_pool".

2009 May 15
1
[PATCH server] provide default uuid and mac if not provided for create.
...++++++--------- 1 files changed, 16 insertions(+), 9 deletions(-) diff --git a/src/app/services/vm_service.rb b/src/app/services/vm_service.rb index 4c29bcf..47ac5f5 100644 --- a/src/app/services/vm_service.rb +++ b/src/app/services/vm_service.rb @@ -52,15 +52,9 @@ module VmService def svc_new(vm_resource_pool_id) raise ActionError.new("VM Resource Pool is required.") unless vm_resource_pool_id - # random MAC - mac = [ 0x00, 0x16, 0x3e, rand(0x7f), rand(0xff), rand(0xff) ] - # random uuid - uuid = ["%02x"*4, "%02x"*2, "%02x"*2, "%02x"*2...
2010 Sep 01
1
[PATCH 1/3] Adding the VM Pool migration for vms
...troller.rb +++ b/src/app/controllers/vm_controller.rb @@ -146,6 +146,22 @@ class VmController < ApplicationController render :layout => false end + def edit_vmpool + svc_modify(params[:id]) + @vm = Vm.find(params[:id]) + @vm_pools = VmResourcePool.find_all_by_parent_id(@vm.vm_resource_pool.parent.id) + render :layout => 'popup' + end + + def update_vmpool + svc_modify(params[:id]) + @vm = Vm.find(params[:id]) + @vm_pool = VmResourcePool.find(params[:vm][:vm_resource_pool_id]) + @vm.update_attribute(:vm_resource_pool, @vm_pool) + render :json => { :ob...
2009 May 15
0
[PATCH server] final cleanup for service layer refactoring.
...olume_controller.rb | 8 --- src/app/controllers/vm_controller.rb | 13 +---- src/app/services/hardware_pool_service.rb | 1 - src/app/services/pool_service.rb | 1 - src/app/services/smart_pool_service.rb | 3 +- src/app/services/vm_resource_pool_service.rb | 1 - src/app/services/vm_service.rb | 24 +++++--- .../addhost.html.erb => hardware/addhost.rhtml} | 8 ++-- src/app/views/hardware/show_hosts.rhtml | 4 +- 19 files changed, 35 insertions(+), 218 deletions(-) rename src/app/views/...
2010 Sep 01
1
[PATCH 2/2] Adding the ability to select a Host to start a VM [2/2]
...ic/taskomatic.rb b/src/task-omatic/taskomatic.rb index 471ec88..1dfd74f 100755 --- a/src/task-omatic/taskomatic.rb +++ b/src/task-omatic/taskomatic.rb @@ -355,11 +355,10 @@ class TaskOmatic end end - if task.args + if task.args && !task.args.blank? db_host = db_vm.vm_resource_pool.get_hardware_pool.hosts.find(task.args) - else - db_host = find_capable_host(db_vm) end + db_host ||= find_capable_host(db_vm) node = @qmfc.object(:class => "node", 'hostname' => db_host.hostname) -- 1.7.2.2
2010 Aug 25
0
[PATCH] Adding the VM Pool migration for vms
...troller.rb +++ b/src/app/controllers/vm_controller.rb @@ -146,6 +146,22 @@ class VmController < ApplicationController render :layout => false end + def edit_vmpool + svc_modify(params[:id]) + @vm = Vm.find(params[:id]) + @vm_pools = VmResourcePool.find_all_by_parent_id(@vm.vm_resource_pool.parent.id) + render :layout => 'popup' + end + + def update_vmpool + svc_modify(params[:id]) + @vm = Vm.find(params[:id]) + @vm_pool = VmResourcePool.find(params[:vm][:vm_resource_pool_id]) + @vm.update_attribute(:vm_resource_pool, @vm_pool) + render :json => { :ob...
2009 Jul 24
1
permit many-to-many vms / networks relationship redux
redux patchset permitting a vm to be associated with multiple networks and vice-versa. updated patchset so as to be applicable against current oVirt server HEAD these patches may be applied in any order, they all need to be pushed together
2009 Jul 09
2
permit many-to-many vms / networks relationship
This patchset contains changes to the ovirt server frontend, backend, and tests components, permitting vms to be associated with multiple networks and vice versa. Also included are two patches which are required for the frontend bits; a patch adding collapsable sections to the vm form, which in itself depends on the second patch that provides default values for the cpu and memory vm table fields
2009 Jul 06
0
[PATCH server] UI for accumulated uptime for VMs. (revised2)
...otal_uptime || ' sec' as interval) + end as calc_uptime" + end + # Make method for calling paginated vms easier for clients. # TODO: Might want to have an optional param for per_page var def self.paged_with_perms(user, priv, page, order) - Vm.paginate(:include => [{:vm_resource_pool => + Vm.paginate(:joins => [{:vm_resource_pool => {:permissions => {:role => :privileges}}}], :conditions => ["privileges.name=:priv and permissions.uid=:user", { :us...
2010 Aug 26
1
[PATCH] Adding the ability to select a Host to start a VM
...src/task-omatic/taskomatic.rb +++ b/src/task-omatic/taskomatic.rb @@ -354,7 +354,12 @@ class TaskOmatic raise "Virtual machine is currently paused, cannot start, must resume." end end - db_host = find_capable_host(db_vm) + + if task.args + db_host = db_vm.vm_resource_pool.get_hardware_pool.hosts.find(task.args) + else + db_host = find_capable_host(db_vm) + end node = @qmfc.object(:class => "node", 'hostname' => db_host.hostname) -- 1.7.2.1
2009 Jul 02
1
[PATCH server] UI for accumulated uptime for VMs. (revised)
...otal_uptime || ' sec' as interval) + end as calc_uptime" + end + # Make method for calling paginated vms easier for clients. # TODO: Might want to have an optional param for per_page var def self.paged_with_perms(user, priv, page, order) - Vm.paginate(:include => [{:vm_resource_pool => + Vm.paginate(:joins => [{:vm_resource_pool => {:permissions => {:role => :privileges}}}], :conditions => ["privileges.name=:priv and permissions.uid=:user", { :us...
2009 Jul 06
2
[PATCH server] UI for accumulated uptime for VMs. (revised3)
...otal_uptime || ' sec' as interval) + end as calc_uptime" + end + # Make method for calling paginated vms easier for clients. # TODO: Might want to have an optional param for per_page var def self.paged_with_perms(user, priv, page, order) - Vm.paginate(:include => [{:vm_resource_pool => + Vm.paginate(:joins => [{:vm_resource_pool => {:permissions => {:role => :privileges}}}], :conditions => ["privileges.name=:priv and permissions.uid=:user", { :us...
2009 Jun 29
3
[PATCH server] UI for accumulated uptime for VMs.
There's still a problem with this working on the cloud side, but that can be resolved in a subsequent commit. --- src/app/controllers/pool_controller.rb | 2 +- src/app/controllers/resources_controller.rb | 7 ++++++- src/app/controllers/smart_pools_controller.rb | 5 ++--- src/app/helpers/application_helper.rb | 14 ++++++++++++++ src/app/models/vm.rb
2009 Jun 30
0
[PATCH server] permit many-to-many vms / networks relationship
...a/src/app/controllers/vm_controller.rb b/src/app/controllers/vm_controller.rb index 197241d..2c0079c 100644 --- a/src/app/controllers/vm_controller.rb +++ b/src/app/controllers/vm_controller.rb @@ -55,29 +55,31 @@ class VmController < ApplicationController def new alert = svc_new(params[:vm_resource_pool_id]) _setup_provisioning_options + _setup_network_options @storage_tree = VmResourcePool.find(params[:vm_resource_pool_id]).get_hardware_pool.storage_tree.to_json - @networks = Network.find(:all).collect{ |net| [net.name, net.id] } render :layout => 'popup' end...
2009 Jun 29
0
[PATCH server] Add svc_vm_actions method to VmService.
...uid: testuser + pool: corp_qa_vmpool diff --git a/src/test/fixtures/vms.yml b/src/test/fixtures/vms.yml index 69b1c2b..b2711b2 100644 --- a/src/test/fixtures/vms.yml +++ b/src/test/fixtures/vms.yml @@ -65,6 +65,19 @@ foobar_prod1_vm: boot_device: cdrom host: fedoraworkstation_foobar_com vm_resource_pool: corp_com_production_vmpool +corp_com_qa_postgres_vm: + uuid: f6059569-a81f-4728-bb61-6f16b1c594e7 + description: corp.com qa postgres vm + num_vcpus_allocated: 2 + num_vcpus_used: 2 + memory_allocated: 262144 + memory_used: 131072 + vnic_mac_addr: 00:16:3e:04:de:c8 + state: running + need...
2009 Jun 29
0
[PATCH server] REVISED Vm state change auditing/accounting
...sion_of :state, :in => EFFECTIVE_STATE.keys + def get_calculated_uptime + if VmObserver::AUDIT_RUNNING_STATES.include?(state) + total_uptime_timestamp ? total_uptime + (Time.now - total_uptime_timestamp) : 0 + else + total_uptime + end + end def get_vm_pool vm_resource_pool diff --git a/src/app/models/vm_observer.rb b/src/app/models/vm_observer.rb new file mode 100644 index 0000000..914fd35 --- /dev/null +++ b/src/app/models/vm_observer.rb @@ -0,0 +1,96 @@ +# +# Copyright (C) 2008 Red Hat, Inc. +# Written by Steve Linabery <slinabery at redhat.com> +# +# This pr...
2009 Jun 24
1
[PATCH server] Vm state change auditing/accounting
...sion_of :state, :in => EFFECTIVE_STATE.keys + def get_calculated_uptime + if VmObserver::AUDIT_RUNNING_STATES.include?(state) + total_uptime_timestamp ? total_uptime + (Time.now - total_uptime_timestamp) : 0 + else + total_uptime + end + end def get_vm_pool vm_resource_pool diff --git a/src/app/models/vm_observer.rb b/src/app/models/vm_observer.rb new file mode 100644 index 0000000..914fd35 --- /dev/null +++ b/src/app/models/vm_observer.rb @@ -0,0 +1,96 @@ +# +# Copyright (C) 2008 Red Hat, Inc. +# Written by Steve Linabery <slinabery at redhat.com> +# +# This pr...
2009 Jun 29
2
One more fix
This resend includes the rebase, but fixes a problem I just noticed with nil/empty checks.
2009 Jun 29
2
Resend of Cloud UI/service patches
This is a resend of the 2-patch series from a week or so ago, needed to be rebased due to some commits on next
2009 Jun 22
2
Patch series for Cloud Vm Actions
The following two patches should be applied in the order: * [PATCH server] Add svc_vm_actions method to VmService. * [PATCH server] Cloud UI layer to initiate actions on vms. The service layer patch should work fine on its own (and not break anything), but cloud patch relies on service being there.
2009 Jul 13
0
[PATCH server] remove vm forward vnc and vm host history
...ferences + hosts(id)" + + end +end + diff --git a/src/test/fixtures/vms.yml b/src/test/fixtures/vms.yml index b2711b2..0d2caa3 100644 --- a/src/test/fixtures/vms.yml +++ b/src/test/fixtures/vms.yml @@ -11,8 +11,6 @@ production_httpd_vm: boot_device: hd host: prod_corp_com vm_resource_pool: corp_com_production_vmpool - forward_vnc: true - forward_vnc_port: 5901 production_mysqld_vm: uuid: 89e62d32-04d9-4351-b573-b1a253397296 description: production mysqld appliance diff --git a/src/test/unit/vm_test.rb b/src/test/unit/vm_test.rb index a28f183..d7b9d40 100644 --- a/src/test/u...