lib/conjur/command/resources.rb in conjur-cli-5.5.0 vs lib/conjur/command/resources.rb in conjur-cli-5.6.3
- old
+ new
@@ -135,14 +135,19 @@
end
resource.desc "List roles with a specified permission on the resource"
resource.arg_name "RESOURCE PERMISSION"
resource.command :permitted_roles do |c|
+ command_option_kind c
+ command_options_for_search c
+
c.action do |global_options,options,args|
id = full_resource_id( require_arg(args, "RESOURCE") )
permission = require_arg(args, "PERMISSION")
- display api.resource(id).permitted_roles(permission)
+
+ opts = process_command_options_for_search(options)
+ display api.resource(id).permitted_roles(permission, opts)
end
end
resource.desc "Set an annotation on a resource [DEPRECATED]"
resource.arg_name "RESOURCE ANNOTATION value"
@@ -189,12 +194,10 @@
end
end
resource.desc "List all resources"
resource.command :list do |c|
- c.desc "Filter by kind"
- c.flag [:k, :kind]
-
+ command_option_kind c
command_options_for_list c
c.action do |global_options, options, args|
command_impl_for_list global_options, options, args
end