--- /dev/null
+# object_format.py provides types and functions for working with
+# requested output formats such as JSON, YAML, etc.
+
+import enum
+
+class Format(enum.Enum):
+ plain = 'plain'
+ json = 'json'
+ json_pretty = 'json-pretty'
+ yaml = 'yaml'
+ xml_pretty = 'xml-pretty'
+ xml = 'xml'
+
from mgr_util import to_pretty_timedelta, format_dimless, format_bytes
from mgr_module import MgrModule, HandleCommandResult, Option
+from object_format import Format
from ._interface import OrchestratorClientMixin, DeviceLightLoc, _cli_read_command, \
raise_if_exception, _cli_write_command, OrchestratorError, \
return format_bytes(v, 5)
-class Format(enum.Enum):
- plain = 'plain'
- json = 'json'
- json_pretty = 'json-pretty'
- yaml = 'yaml'
- xml_pretty = 'xml-pretty'
- xml = 'xml'
-
-
class ServiceType(enum.Enum):
mon = 'mon'
mgr = 'mgr'