Last active
June 1, 2016 22:05
-
-
Save cholcombe973/efec350ee80edd77534e43304aa56780 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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