mirror of
https://github.com/OpenNebula/one.git
synced 2025-03-21 14:50:08 +03:00
Feature #718: Add new DEPLOY operation in Ruby OCA and CLI
This commit is contained in:
parent
8706613748
commit
ff9f67b2a3
@ -18,9 +18,9 @@
|
||||
:size: 5
|
||||
:right: true
|
||||
|
||||
:OPE_CDUMIPpTW:
|
||||
:OPE_CDUMIPpTWd:
|
||||
:desc: Operation to which the rule applies
|
||||
:size: 13
|
||||
:size: 14
|
||||
:right: true
|
||||
|
||||
:default:
|
||||
@ -28,4 +28,4 @@
|
||||
- :USER
|
||||
- :RES_VHNIUTG
|
||||
- :RID
|
||||
- :OPE_CDUMIPpTW
|
||||
- :OPE_CDUMIPpTWd
|
||||
|
@ -69,7 +69,7 @@ private
|
||||
|
||||
# TODO check that @content[:resources_str] is valid
|
||||
def self.right_mask(str)
|
||||
mask = "---------"
|
||||
mask = "----------"
|
||||
|
||||
str.split("+").each{|type|
|
||||
case type
|
||||
@ -91,6 +91,8 @@ private
|
||||
mask[7] = "T"
|
||||
when "CHOWN"
|
||||
mask[8] = "W"
|
||||
when "DEPLOY"
|
||||
mask[9] = "d"
|
||||
end
|
||||
}
|
||||
|
||||
@ -111,20 +113,21 @@ private
|
||||
d['STRING'].split(" ")[0]
|
||||
end
|
||||
|
||||
column :RES_VHNIUTG, "Resource to which the rule applies" do |d|
|
||||
column :RES_VHNIUTG, "Resource to which the rule applies",
|
||||
:size => 11 do |d|
|
||||
OneAclHelper::resource_mask d['STRING'].split(" ")[1]
|
||||
end
|
||||
|
||||
column :RID, "Resource ID", :right, :size=>8 do |d|
|
||||
column :RID, "Resource ID", :right, :size=>5 do |d|
|
||||
d['STRING'].split(" ")[1].split("/")[1]
|
||||
end
|
||||
|
||||
column :OPE_CDUMIPpTW,
|
||||
"Operation to which the rule applies" do |d|
|
||||
column :OPE_CDUMIPpTWd,
|
||||
"Operation to which the rule applies", :size =>14 do |d|
|
||||
OneAclHelper::right_mask d['STRING'].split(" ")[2]
|
||||
end
|
||||
|
||||
default :ID, :USER, :RES_VHNIUTG, :RID, :OPE_CDUMIPpTW
|
||||
default :ID, :USER, :RES_VHNIUTG, :RID, :OPE_CDUMIPpTWd
|
||||
end
|
||||
|
||||
table
|
||||
|
@ -39,6 +39,7 @@ module OpenNebula
|
||||
# INFO_POOL_MINE
|
||||
# INSTANTIATE
|
||||
# CHOWN
|
||||
# DEPLOY
|
||||
class Acl < PoolElement
|
||||
|
||||
USERS = {
|
||||
@ -68,7 +69,8 @@ module OpenNebula
|
||||
"INFO_POOL" => 0x20, # Auth. to view any object in the pool
|
||||
"INFO_POOL_MINE"=> 0x40, # Auth. to view user and/or group objects
|
||||
"INSTANTIATE" => 0x80, # Auth. to instantiate a VM from a TEMPLATE
|
||||
"CHOWN" => 0x100 # Auth. to change ownership of an object
|
||||
"CHOWN" => 0x100,# Auth. to change ownership of an object
|
||||
"DEPLOY" => 0x200 # Auth. to deploy a VM in a Host
|
||||
}
|
||||
|
||||
# Constructor
|
||||
|
Loading…
x
Reference in New Issue
Block a user