rgw: introduce decode_json to easily decode json structures

Introducing a new way to define the json structure of an
object, similar to what we do with bufferlist encode/decode.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
rgw: decode RGWUserInfo using decode_json

RGWUserInfo can be decoded using json_decode, and fix
the ->dump() method to match that decoding.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
rgw: rgw_jsonparser changes

Now testing json_decode functionality.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
moved rgw/rgw_json.* common/ceph_json.*

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
rgw: add encode_json

dump() just dumps the internal content of an object, encode_json()
create the object inside its own section. Note that there are cases
where we don't want an object to be surrounded by a section, e.g.,
when an object represents an array. In such a case we'd need to
override the encode_json() for this object type.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
rgw: generic decode_json for containers

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
rgw: s/cluster/zone

Old cluster definition is what we'd call zone from now on.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
rgw: zone info is configurable

Also rename RadosParams to ZoneParams

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
MDSMap:: constify a bunch of methods

Signed-off-by: Sage Weil <sage@inktank.com>
MDSMap: improve health check

Note if the cluster is degraded.  If so, indicate specifically which MDSs
are degraded and what state they are in.

Signed-off-by: Sage Weil <sage@inktank.com>
PendingReleaseNotes: mention renamin of cluster to zone

radosgw-admin now uses the term 'zone'

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
java: support ceph_get_file_extent_osds

Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
java: support ceph_get_osd_crush_location

Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
java: support ceph_get_osd_addr

Adds a few JNI utilities from the Android project (license: Apache) to
help with IP address conversions. These functions are also updated to
work in our environment (use Ceph exception utilities, edit header
paths).

Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
java: pretty print Ceph extent

Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
ceph-disk: fix indention

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
ceph-disk: print subprocess.CalledProcessError on error

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
ceph-disk: add some more docstrings

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
ceph-disk: rename some constants to upper case variable names

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
ceph-disk: fix naming of a local variable in find_cluster_by_uuid

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>