summaryrefslogtreecommitdiff
path: root/ironic_python_agent/cmd
diff options
context:
space:
mode:
authorJosh Gachnang <josh@pcsforeducation.com>2014-12-15 17:29:14 -0800
committerJosh Gachnang <josh@pcsforeducation.com>2014-12-16 17:59:29 -0800
commit417bf086a53da995fbf93cc2c04990f9c5f87c9f (patch)
treeeea61aed87cd0f021b05eeae526098abae9c0250 /ironic_python_agent/cmd
parent86d4b41709548cb304ab9cc0b627b39449eef121 (diff)
downloadironic-python-agent-417bf086a53da995fbf93cc2c04990f9c5f87c9f.tar.gz
Add standalone mode for IPA
This allows a developer to run IPA without an Ironic API. This can be useful for testing (especially functional testing) or testing integration of things like hardware managers. Change-Id: I2dc49fbe306430bf5b05a36fe56de5275fc128b2
Diffstat (limited to 'ironic_python_agent/cmd')
-rw-r--r--ironic_python_agent/cmd/agent.py14
1 files changed, 9 insertions, 5 deletions
diff --git a/ironic_python_agent/cmd/agent.py b/ironic_python_agent/cmd/agent.py
index 6b26ed37..e9f38105 100644
--- a/ironic_python_agent/cmd/agent.py
+++ b/ironic_python_agent/cmd/agent.py
@@ -128,8 +128,7 @@ APARAMS = _get_agent_params()
cli_opts = [
cfg.StrOpt('api_url',
- required=('ipa-api-url' not in APARAMS),
- default=APARAMS.get('ipa-api-url'),
+ default=APARAMS.get('ipa-api-url', 'http://127.0.0.1:6835'),
deprecated_name='api-url',
help='URL of the Ironic API'),
@@ -195,7 +194,12 @@ cli_opts = [
cfg.FloatOpt('lldp_timeout',
default=APARAMS.get('lldp-timeout', 30.0),
- help='The amount of seconds to wait for LLDP packets.')
+ help='The amount of seconds to wait for LLDP packets.'),
+
+ cfg.BoolOpt('standalone',
+ default=False,
+ help='Note: for debugging only. Start the Agent but suppress '
+ 'any calls to Ironic API.'),
]
CONF.register_cli_opts(cli_opts)
@@ -204,7 +208,6 @@ CONF.register_cli_opts(cli_opts)
def run():
CONF()
log.setup('ironic-python-agent')
-
agent.IronicPythonAgent(CONF.api_url,
(CONF.advertise_host, CONF.advertise_port),
(CONF.listen_host, CONF.listen_port),
@@ -213,4 +216,5 @@ def run():
CONF.network_interface,
CONF.lookup_timeout,
CONF.lookup_interval,
- CONF.driver_name).run()
+ CONF.driver_name,
+ CONF.standalone).run()