The RHEV 3.1 Command Line Shell Guide provides the following example for adding a permission with rhevm-shell:
[RHEVM shell (connected)]# add permission --vm-identifier MyVM1 --role-id MyRole --user-id jsmith
When I run that command, the response is the following:
error: status: 400 reason: Bad Request detail: Invalid UUID string: jsmith
It seems that a UUID for the role and a UUID for the user is required to add a permission.
I can query the UUID for the role with the following command:
show role MyRole
It took me more than one command to get the UUID from a users name with rhevm-shell. First, I queried users by first name with the following command:
list users --name Jane
This will provide a list of UUIDs with that first name. Then, I can query the last_name and the user_name for each user with the following command:
show user UUID
With the UUID for the role and the UUID for the user, I was able to add the permission to the VM.