search for: vmservice

Displaying 13 results from an estimated 13 matches for "vmservice".

Did you mean: cmservice
2009 May 15
1
[PATCH server] provide default uuid and mac if not provided for create.
...vice.rb | 25 ++++++++++++++++--------- 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, "...
2009 Jun 29
0
[PATCH server] Add svc_vm_actions method to VmService.
...+ def set_login_user(user=nil) + @user = user + end +end \ No newline at end of file diff --git a/src/app/services/vm_service.rb b/src/app/services/vm_service.rb index 3d9777c..a78e17d 100644 --- a/src/app/services/vm_service.rb +++ b/src/app/services/vm_service.rb @@ -211,13 +211,42 @@ module VmService # <tt>VmTask.action_privilege(@action)</tt> def svc_vm_action(id, vm_action, action_args) @vm = Vm.find(id) + unless @vm.valid_action?(vm_action) + raise ActionError.new("#{vm_action} is an invalid action.") + end authorized!(VmTask.action_privileg...
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 May 19
1
re-sending outstanding controller refactoring patches after rebase
I've rebased the patch series to the current next branch and am sending them again.
2009 May 15
0
[PATCH server] final cleanup for service layer refactoring.
...@pool = VmResourcePool.find(pool_id) @parent = @pool.parent @action = vm_action diff --git a/src/app/services/vm_service.rb b/src/app/services/vm_service.rb index fb58b51..4c29bcf 100644 --- a/src/app/services/vm_service.rb +++ b/src/app/services/vm_service.rb @@ -71,7 +71,6 @@ module VmService # === Required permissions # [<tt>Privilege::MODIFY</tt>] for the vm's VmResourcePool def svc_create(vm_hash, start_now) - # from before_filter vm_hash[:state] = Vm::STATE_PENDING @vm = Vm.new(vm_hash) authorized!(Privilege::MODIFY, at vm.vm_resource_pool)...
2009 Jun 30
0
[PATCH server] permit many-to-many vms / networks relationship
...nic.parent.class == Host ? @nic.host.hardware_pool : @nic.vm.vm_resource_pool)) end end diff --git a/src/app/services/vm_service.rb b/src/app/services/vm_service.rb index 3d9777c..24c7908 100644 --- a/src/app/services/vm_service.rb +++ b/src/app/services/vm_service.rb @@ -82,8 +82,8 @@ module VmService def svc_new(vm_resource_pool_id) raise ActionError.new("VM Resource Pool is required.") unless vm_resource_pool_id - new_vm_hash = {:vm_resource_pool_id => vm_resource_pool_id} - default_mac_and_uuid(new_vm_hash) + new_vm_hash = {:vm_resource_pool_id => vm_resourc...
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 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 Jul 23
0
[PATCH server] Add network QMF apis.
...virt/controllers/vmdef_controller.rb b/src/ovirt-agent/lib/ovirt/controllers/vmdef_controller.rb index 1ee69a4..38e3694 100644 --- a/src/ovirt-agent/lib/ovirt/controllers/vmdef_controller.rb +++ b/src/ovirt-agent/lib/ovirt/controllers/vmdef_controller.rb @@ -3,6 +3,11 @@ module Ovirt include VmService + def description(desc) + puts "description property set for vmdef." + svc_update(id, { :description => desc }, false, false) + end + def find(id) svc_show(id) render(@vm) diff --git a/src/ovirt-agent/ovirt-agent.rb b/src/ovirt-agent/ovirt-agent.rb...
2009 May 15
0
[PATCH server] Starting of new ovirt QMF API.
...e.join(File.dirname(__FILE__), "../dutils") + +require "rubygems" +require 'monitor' +require 'dutils' +require 'daemons' +require 'logger' + +require 'qmf' +require 'socket' + +include Daemonize + +class VmQmfController + include VmService + + attr_accessor :vm + + def get_login_user + return "ovirtadmin" + end +end + + +class Ovirt + + TABLE_ID = 1 + + def initialize(agent, logger) + + @agent = agent + @logger = logger + + @ovirt_class = Qmf::SchemaObjectClass.new("org.ovirt.ovirt", "Ovirt&q...
2009 May 13
1
[PATCH server] Cloud UI V1 (readonly).
...ram; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, +# MA 02110-1301, USA. A copy of the GNU General Public License is +# also available at http://www.gnu.org/copyleft/gpl.html. + +class Cloud::CloudController < ApplicationController + include VmService + + layout 'cloud/cloud' + + before_filter :set_vars + + protected + + + # NOTE: This probably will/should be moved to use set_perms in + # ApplicationService once that is ready to go. + def set_vars + @user = get_login_user + end +end diff --git a/src/app/controllers/cloud/dashbo...