diff options
| author | Jay Faulkner <jay@jvf.cc> | 2015-09-03 16:15:54 -0700 |
|---|---|---|
| committer | Jay Faulkner <jay@jvf.cc> | 2015-09-03 16:15:54 -0700 |
| commit | ac040f5152efae491d6205ad62dc2b7d7b670ced (patch) | |
| tree | b2af7eb1d5858d7afb4039d25315c7fbddff22eb /ironic_python_agent | |
| parent | bc985934164d22a2ebf5fe6e5a361e9bba7f7d8b (diff) | |
| download | ironic-python-agent-ac040f5152efae491d6205ad62dc2b7d7b670ced.tar.gz | |
Add docstrings for cmd/agent and extensions/clean
Adding documentation for methods in these files that were missing
docstrings.
Change-Id: I2ad9f85605720ab2295dec3d0436ff0af07847c2
Partial-bug: 1367915
Diffstat (limited to 'ironic_python_agent')
| -rw-r--r-- | ironic_python_agent/cmd/agent.py | 1 | ||||
| -rw-r--r-- | ironic_python_agent/extensions/clean.py | 15 |
2 files changed, 15 insertions, 1 deletions
diff --git a/ironic_python_agent/cmd/agent.py b/ironic_python_agent/cmd/agent.py index cd082908..d56c94dc 100644 --- a/ironic_python_agent/cmd/agent.py +++ b/ironic_python_agent/cmd/agent.py @@ -105,6 +105,7 @@ CONF.register_cli_opts(cli_opts) def run(): + """Entrypoint for IronicPythonAgent.""" log.register_options(CONF) CONF(args=sys.argv[1:]) log.setup(CONF, 'ironic-python-agent') diff --git a/ironic_python_agent/extensions/clean.py b/ironic_python_agent/extensions/clean.py index dd77c031..4497301f 100644 --- a/ironic_python_agent/extensions/clean.py +++ b/ironic_python_agent/extensions/clean.py @@ -85,7 +85,15 @@ class CleanExtension(base.BaseAgentExtension): def _check_clean_version(clean_version=None): - """Ensure the clean version hasn't changed.""" + """Ensure the clean version hasn't changed. + + :param clean_version: Hardware manager versions used during this + cleaning cycle. + :raises: errors.CleanVersionMismatch if any hardware manager version on + the currently running agent doesn't match the one stored in + clean_version. + :returns: None + """ # If the version is None, assume this is the first run if clean_version is None: return @@ -99,6 +107,11 @@ def _check_clean_version(clean_version=None): def _get_current_clean_version(): + """Fetches versions from all hardware managers. + + :returns: Dict in the format {name: version} containing one entry for + every hardware manager. + """ return {version.get('name'): version.get('version') for version in hardware.dispatch_to_all_managers( 'get_version').values()} |
