auth: Crypto: add 'string encode_base64()' function

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
common: Formatter: flush to bufferlist

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
auth: Crypto: add encode_formatted/plaintext() functions

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
mon: AuthMonitor: dump formatted and plaintext key on 'get-key'

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
auth: cephx: KeyServer: list secrets to formatter or plaintext

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
README: ceph-rest-api requires python-flask

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
mon: cephx: KeyServer: squash against previous

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
mon: Monitor: support multiple formatters on some status functions

Commands such as 'mon_status', 'quorum_status', 'sync_status' and
'sync_force' didn't support other formatter besides json.  Regardless of
'--format=foo' being specified, they would always output in json.

This commit changes that behavior, allowing a format to be passed.  These
functions do not output in plain-text however.  Plain-text will default
to 'json' -- the reason: the information they provide are better outputted
in a structured fashion, and I was too lazy to come up with a plain-text
version that could be at least as good.

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
stash rest-api stuff
foo
mon: AuthMonitor: formatted output to 'auth get-or-create[-key]'

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
mon: AuthMonitor: 'get-key' requires a valid (not-empty) entity name

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
qa: workunits: rest: test.sh: expect content-type to be plain

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
qa: workunits: rest: test.sh: non-suffixed end-points expect plain-text

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
qa: workunits: rest: test.sh: auth/add tests

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
mon: AuthMonitor: 'auth add' requires valid (non-empty) entity name

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
auth: KeyRing: encode_formatted() receives a label as first argument

Also, this allows us to standardize formatted output on the AuthMonitor,
so that all output starts with a section 'auth'.  Other subsystems using
the KeyRing class, can specify whatever section they prefer.

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
qa: workunits: rest: test.sh: fix bug (fixup against the plain-text one)
qa: workunits: rest: test.sh: '--no-exit-on-error'

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
mon: AuthMonitor: print-key (fixup)