search for: get_default_pool

Displaying 4 results from an estimated 4 matches for "get_default_pool".

2010 Sep 03
1
[PATCH] Adding some control over usages in the network creation/edition form
.../app/services/usage_service.rb b/src/app/services/usage_service.rb new file mode 100644 index 0000000..d044631 --- /dev/null +++ b/src/app/services/usage_service.rb @@ -0,0 +1,23 @@ +module UsageService + include ApplicationService + + def authorize + authorized!(Privilege::MODIFY,HardwarePool.get_default_pool) + end + + def svc_create(usage_hash) + authorize + usage_hash[:id] = Usage.maximum(:id) + 1 + @usage = Usage.new(usage_hash) + @usage.save! + return @usage + end + + def svc_destroy_all(ids) + authorize + # prevent destruction of original usages (1, 2 and 3) + ids -= [&...
2009 May 15
0
[PATCH server] use service layer for Network controller.
...orks related actions - before_filter :pre_list, :only => [:list] - - def authorize_admin - # TODO more robust permission system - # either by subclassing network from pool - # or by extending permission model to accomodate - # any object - @default_pool = HardwarePool.get_default_pool - set_perms(@default_pool) - super('You do not have permission to access networks') - end - - def pre_list - @networks = Network.find(:all) - authorize_admin - end - - def list - respond_to do |format| - format.html { - render :layout => 'tab...
2009 Jul 10
2
[PATCH: server 0/3] Add host-register.rb (replaces host-browser.rb in part)
Removes node identification functionality from host-browser.rb and adds a new script, host-register.rb, that takes over that functionality. The chief difference is that host-browser used a simple TCP server setup to get data from the node, while host-register uses the qpid bus to do so. Specifically, it communicates with the matahari qmf agent added to the node in two related patchsets to node
2009 Nov 04
4
[PATCH server] Update daemons to use new QMF.
..., obj.hostname]) @@ -318,7 +265,7 @@ class HostRegister < Qpid::Qmf::Console 'memory' => obj.memory, 'is_disabled' => 0, 'hardware_pool' => HardwarePool.get_default_pool, - # Let host-status mark it available when it + # Let db-omatic mark it available when it # successfully connects to it via libvirt. 'state' => Host::STATE_...