mirror of
https://github.com/OpenNebula/one.git
synced 2025-03-25 02:50:08 +03:00
Feature #687: Fix oneacl delete
This commit is contained in:
parent
1b656b3b29
commit
32a7699c5a
@ -49,7 +49,7 @@ class OneAclHelper < OpenNebulaHelper::OneHelper
|
||||
end
|
||||
end
|
||||
|
||||
def delete_rule(id)
|
||||
def delete_rule(options, id)
|
||||
acl = OpenNebula::AclPool.new( OpenNebula::Client.new() )
|
||||
|
||||
rc = acl.delrule( id )
|
||||
@ -151,7 +151,7 @@ class OneAclHelper < OpenNebulaHelper::OneHelper
|
||||
OneAclHelper::right_mask d['STRING'].split(" ")[2]
|
||||
end
|
||||
|
||||
default :ID, :USER, :RESOURCE_VHNIUTG, :RID, :OPERATION_CDUMIPpTW
|
||||
default :ID, :USER, :RES_VHNIUTG, :RID, :OPE_CDUMIPpTW
|
||||
end
|
||||
|
||||
table.show(pool, options)
|
||||
|
@ -63,7 +63,7 @@ cmd = CommandParser::CmdParser.new(ARGV) do
|
||||
EOT
|
||||
|
||||
command :delrule, delrule_desc, :id do
|
||||
helper.delete_rule( args[0] )
|
||||
helper.delete_rule( options, args[0] )
|
||||
end
|
||||
|
||||
list_desc = <<-EOT.unindent
|
||||
|
@ -86,14 +86,9 @@ module OpenNebula
|
||||
|
||||
# Deletes an existing ACL rule.
|
||||
#
|
||||
# +user+ A hex number, e.g. 0x100000001
|
||||
# +resource+ A hex number, e.g. 0x2100000001
|
||||
# +rights+ A hex number, e.g. 0x10
|
||||
def delrule(user, resource, rights)
|
||||
rc = @client.call( ACL_POOL_METHODS[:delrule],
|
||||
user,
|
||||
resource,
|
||||
rights )
|
||||
# +id+ An existing ACL rule ID
|
||||
def delrule(id)
|
||||
rc = @client.call( ACL_POOL_METHODS[:delrule], id.to_i )
|
||||
|
||||
rc = nil if !OpenNebula.is_error?(rc)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user