diff options
| author | Clif Houck <me@clifhouck.com> | 2014-12-04 23:38:06 +0000 |
|---|---|---|
| committer | Clif Houck <me@clifhouck.com> | 2014-12-05 00:34:39 +0000 |
| commit | 7341511b98924ef62769e841bd558698af0efe64 (patch) | |
| tree | ec4196be2e2cf8519ea391dcb1b45614636b4efe /ironic_python_agent/cmd/agent.py | |
| parent | 00812813a0ef873579ae796790a48dcd8a3f2203 (diff) | |
| download | ironic-python-agent-7341511b98924ef62769e841bd558698af0efe64.tar.gz | |
Fix badly named function _get_kernel_params()
Renamed _get_kernel_params() to _get_agent_params() and
appropriate module-level attribute KPARAMS to APARAMS.
Updated agent tests to match new function name.
Change-Id: I4cdf1defee7487785967a092c81c906d40bf3214
Closes-Bug: #1367917
Diffstat (limited to 'ironic_python_agent/cmd/agent.py')
| -rw-r--r-- | ironic_python_agent/cmd/agent.py | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/ironic_python_agent/cmd/agent.py b/ironic_python_agent/cmd/agent.py index 589f93b4..73e227ae 100644 --- a/ironic_python_agent/cmd/agent.py +++ b/ironic_python_agent/cmd/agent.py @@ -47,7 +47,7 @@ def _read_params_from_file(filepath): return params -def _get_kernel_params(): +def _get_agent_params(): """Gets parameters passed to the agent via kernel cmdline or vmedia. Parameters can be passed using either the kernel commandline or through @@ -124,64 +124,64 @@ def _get_vmedia_params(): return params -KPARAMS = _get_kernel_params() +APARAMS = _get_agent_params() cli_opts = [ cfg.StrOpt('api_url', - required=('ipa-api-url' not in KPARAMS), - default=KPARAMS.get('ipa-api-url'), + required=('ipa-api-url' not in APARAMS), + default=APARAMS.get('ipa-api-url'), deprecated_name='api-url', help='URL of the Ironic API'), cfg.StrOpt('listen_host', - default=KPARAMS.get('ipa-listen-host', '0.0.0.0'), + default=APARAMS.get('ipa-listen-host', '0.0.0.0'), deprecated_name='listen-host', help='The IP address to listen on.'), cfg.IntOpt('listen_port', - default=int(KPARAMS.get('ipa-listen-port', 9999)), + default=int(APARAMS.get('ipa-listen-port', 9999)), deprecated_name='listen-port', help='The port to listen on'), cfg.StrOpt('advertise_host', - default=KPARAMS.get('ipa-advertise-host', None), + default=APARAMS.get('ipa-advertise-host', None), deprecated_name='advertise_host', help='The host to tell Ironic to reply and send ' 'commands to.'), cfg.IntOpt('advertise_port', - default=int(KPARAMS.get('ipa-advertise-port', 9999)), + default=int(APARAMS.get('ipa-advertise-port', 9999)), deprecated_name='advertise-port', help='The port to tell Ironic to reply and send ' 'commands to.'), cfg.IntOpt('ip_lookup_attempts', - default=int(KPARAMS.get('ipa-ip-lookup-attempts', 3)), + default=int(APARAMS.get('ipa-ip-lookup-attempts', 3)), deprecated_name='ip-lookup-attempts', help='The number of times to try and automatically' 'determine the agent IPv4 address.'), cfg.IntOpt('ip_lookup_sleep', - default=int(KPARAMS.get('ipa-ip-lookup-timeout', 10)), + default=int(APARAMS.get('ipa-ip-lookup-timeout', 10)), deprecated_name='ip-lookup-sleep', help='The amaount of time to sleep between attempts' 'to determine IP address.'), cfg.StrOpt('network_interface', - default=KPARAMS.get('ipa-network-interface', None), + default=APARAMS.get('ipa-network-interface', None), deprecated_name='network-interface', help='The interface to use when looking for an IP' 'address.'), cfg.IntOpt('lookup_timeout', - default=int(KPARAMS.get('ipa-lookup-timeout', 300)), + default=int(APARAMS.get('ipa-lookup-timeout', 300)), deprecated_name='lookup-timeout', help='The amount of time to retry the initial lookup ' 'call to Ironic. After the timeout, the agent ' 'will exit with a non-zero exit code.'), cfg.IntOpt('lookup_interval', - default=int(KPARAMS.get('ipa-lookup-timeout', 1)), + default=int(APARAMS.get('ipa-lookup-timeout', 1)), deprecated_name='lookup-interval', help='The initial interval for retries on the initial ' 'lookup call to Ironic. The interval will be ' @@ -189,7 +189,7 @@ cli_opts = [ 'exceeded.'), cfg.StrOpt('driver_name', - default=KPARAMS.get('ipa-driver-name', 'agent_ipmitool'), + default=APARAMS.get('ipa-driver-name', 'agent_ipmitool'), deprecated_name='driver-name', help='The Ironic driver in use for this node') ] |
