*: support getting role in auth v3

This commit implements RoleGet() RPC of etcdserver and adds a new
subcommand "role get" to etcdctl v3. It will list up permissions that
are granted to a given role.

$ ETCDCTL_API=3 bin/etcdctl role get r1
Role r1
KV Read:
        b
        d
KV Write:
        a
        c
        d
This commit is contained in:
Hitoshi Mitake
2016-06-02 23:25:15 +09:00
committed by Hitoshi Mitake
parent 755567cb3d
commit 10ee69b44c
10 changed files with 452 additions and 206 deletions

View File

@ -603,6 +603,7 @@ message AuthRoleAddRequest {
}
message AuthRoleGetRequest {
string role = 1;
}
message AuthRoleDeleteRequest {
@ -664,6 +665,8 @@ message AuthRoleAddResponse {
message AuthRoleGetResponse {
ResponseHeader header = 1;
repeated authpb.Permission perm = 2;
}
message AuthRoleDeleteResponse {