Bug 962472 - RHEVM-CLI: "list permits" format better error when not enough parameters
RHEVM-CLI: "list permits" format better error when not enough parameters
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-engine-cli (Show other bugs)
Unspecified Unspecified
unspecified Severity low
: ---
: 3.3.0
Assigned To: Ravi Nori
Barak Dagan
: Triaged
Depends On:
  Show dependency treegraph
Reported: 2013-05-13 10:55 EDT by Barak Dagan
Modified: 2016-02-10 14:24 EST (History)
8 users (show)

See Also:
Fixed In Version: is3
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2013-07-18 09:02:12 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: Infra
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

External Trackers
Tracker ID Priority Status Summary Last Updated
oVirt gerrit 15530 None None None Never

  None (edit)
Description Barak Dagan 2013-05-13 10:55:55 EDT
Description of problem:
- list permits
unknown error: not enough arguments for format string

list permits <TAB>
group     role      show-all  user  

*** doesn't work ***
[RHEVM shell (connected)]# list permits --group-identifier eee00000-0000-0000-0000-123456789eee

unknown error: not enough arguments for format string

*** doesn't work ***
[RHEVM shell (connected)]# list permits --user-identifier fdfc627c-d875-11e0-90f0-83df133b58cc

unknown error: not enough arguments for format string

*** the one that works ***
[RHEVM shell (connected)]# list permits --role-identifier 054e5076-e696-4be6-af46-47c4d25dfa70

id         : 303
name       : vm_pool_basic_operations

id         : 3
name       : edit_vm_properties

id         : 4
name       : vm_basic_operations

id         : 7
name       : connect_to_vm

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. list permits with user / group identifiers
Actual results:

Expected results:

Additional info:
similar message for list permissions with no options
Comment 1 Michael Pasternak 2013-05-14 02:12:25 EDT
permits are exist only for the given role or user/group under specific role,
you could see this by running help for list:

[RHEVM shell (connected)]# help list

  list <type> [parent identifiers] [command options]
  List or search for objects of a certain type. There are two forms. If
  only <type> is provided, all objects of the specified type are
  returned. If a search query is given, it must be a valid oVirt search
  query. In that case objects matching the query are returned.

  The <type> parameter must be one of the following.
    * bricks (contexts: [['cluster', 'glustervolume']])
    * permits (contexts: [['group', 'role'], ['role'], ['user', 'role']])


[RHEVM shell (connected)]# list users 

id         : fdfc627c-d875-11e0-90f0-83df133b58cc
name       : admin

[RHEVM shell (connected)]# list roles --user-identifier admin

id         : 00000000-0000-0000-0000-000000000001
name       : SuperUser

id         : 00000000-0000-0000-0001-000000000002
name       : PowerUserRole

[RHEVM shell (connected)]# list permits --user-identifier admin --role-identifier SuperUser

id         : 1
name       : create_vm


moving it to text for better error.

Note You need to log in before you can comment on or make changes to this bug.