Skip to content

Instantly share code, notes, and snippets.

@cholcombe973
Last active June 1, 2016 22:05
Show Gist options
  • Save cholcombe973/efec350ee80edd77534e43304aa56780 to your computer and use it in GitHub Desktop.
Save cholcombe973/efec350ee80edd77534e43304aa56780 to your computer and use it in GitHub Desktop.
def pg_dump(self, dumpcontents=None):
"""
show human-readable versions of pg map (only 'all' valid
with plain)
:param dumpcontents: list valid_range=["all","summary","sum","delta","pools","osds","pgs","pgs_brief"] allowed repeats=many
:return: (string outbuf, string outs)
:raise CephError: Raises CephError on command execution errors
:raise rados.Error: Raises on rados errors
"""
cmd = {'prefix': 'pg dump'}
if dumpcontents is not None:
validator(value=dumpcontents,
valid_type=list,
valid_range=["all", "summary", "sum", "delta", "pools",
"osds", "pgs", "pgs_brief"]), str(
dumpcontents) + " is not a list"
cmd['dumpcontents'] = dumpcontents
return run_ceph_command(self.rados_config_file, cmd, inbuf='')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment