rbd: add --show-cookie/--cookie option for map/attach commands
Example:
$ rbd device map rbd-pool/image --show-cookie --try-netlink --device-type nbd
$ rbd device attach rbd-pool/image --device /dev/nbd0 \
--cookie
6f85d970-10b2-456b-8baf-
676aa4d782e4 --device-type nbd
older Kernel versions can use --force to skip the cookie validation
Signed-off-by: Prasanna Kumar Kalever <prasanna.kalever@redhat.com>
(cherry picked from commit
6df06c7a62bdd6e9ce61b26c738dcd1509e68273)
Conflicts:
src/tools/rbd/action/Device.cc [ commit
e1b4811bc324 ("rbd: add
missing switch arguments for recognition by get_command_spec()")
already in pacific -- re-add show-cookie ]