mirror of
https://github.com/ceph/ceph
synced 2024-12-30 15:33:31 +00:00
rgw: fix regionmap json decoding
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
This commit is contained in:
parent
af00f73348
commit
8f1da8f3d4
@ -642,16 +642,9 @@ void RGWRegionMap::dump(Formatter *f) const
|
||||
encode_json("master_region", master_region, f);
|
||||
}
|
||||
|
||||
static void decode_regions(map<string, RGWRegion>& regions, JSONObj *o)
|
||||
{
|
||||
RGWRegion r;
|
||||
r.decode_json(o);
|
||||
regions[r.name] = r;
|
||||
}
|
||||
|
||||
|
||||
void RGWRegionMap::decode_json(JSONObj *obj)
|
||||
{
|
||||
JSONDecoder::decode_json("regions", regions, decode_regions, obj);
|
||||
JSONDecoder::decode_json("regions", regions, obj);
|
||||
JSONDecoder::decode_json("master_region", master_region, obj);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user