Feature #3175: Add secgroup acl resource to CLI

This commit is contained in:
Carlos Martín committed 2014-09-08 12:01:37 +02:00
1 parent 6fbbef6b60
commit 73fb50184d
3 files changed
+12 -8

No files matched your search

+3 -3
View File
@@ -9,9 +9,9 @@
:size: 8
:right: true
:RES_VHNIUTGDCOZ:
:RES_VHNIUTGDCOZS:
:desc: Which resource the rule applies to
:size: 15
:size: 16
:RID:
:desc: Resource ID
@@ -31,7 +31,7 @@
:default:
- :ID
- :USER
- :RES_VHNIUTGDCOZ
- :RES_VHNIUTGDCOZS
- :RID
- :OPE_UMAC
- :ZONE
+6 -4
View File
@@ -44,7 +44,7 @@ private
def self.resource_mask(str)
resource_type=str.split("/")[0]
mask = "-----------"
mask = "------------"
resource_type.split("+").each{|type|
case type
@@ -70,6 +70,8 @@ private
mask[9] = "O"
when "ZONE"
mask[10] = "Z"
when "SECGROUP"
mask[11] = "S"
end
}
mask
@@ -109,8 +111,8 @@ private
d['STRING'].split(" ")[0]
end
column :RES_VHNIUTGDCOZ, "Resource to which the rule applies",
:size => 15 do |d|
column :RES_VHNIUTGDCOZS, "Resource to which the rule applies",
:size => 16 do |d|
OneAclHelper::resource_mask d['STRING'].split(" ")[1]
end
@@ -127,7 +129,7 @@ private
OneAclHelper::right_mask d['STRING'].split(" ")[2]
end
default :ID, :USER, :RES_VHNIUTGDCOZ, :RID, :OPE_UMAC, :ZONE
default :ID, :USER, :RES_VHNIUTGDCOZS, :RID, :OPE_UMAC, :ZONE
end
table
+3 -1
View File
@@ -31,6 +31,7 @@ module OpenNebula
# TEMPLATE
# GROUP
# ACL
# SECGROUP
# RIGHTS -> + separated list
# USE
# MANAGE
@@ -57,7 +58,8 @@ module OpenNebula
"DATASTORE" => 0x100000000000,
"CLUSTER" => 0x200000000000,
"DOCUMENT" => 0x400000000000,
"ZONE" => 0x800000000000
"ZONE" => 0x800000000000,
"SECGROUP" => 0x1000000000000
}
RIGHTS =