Skip API related work if no api url configured

Currently, if IPA is booted without an ironic api url, it will default
to localhost and fail to connect. Instead, we now explicitly fail and
print a log message if no api callback url is provided.

Change-Id: I0271be94ba7febc6abd5bf3343f6fa179bc1a6a4
Closes-Bug: #1643966
This commit is contained in:
Yufei
2016-11-19 20:30:35 +08:00
parent ab41106cf6
commit dd9253f1b6
4 changed files with 138 additions and 26 deletions

@ -23,7 +23,7 @@ APARAMS = utils.get_agent_params()
cli_opts = [
cfg.StrOpt('api_url',
default=APARAMS.get('ipa-api-url', 'http://127.0.0.1:6385'),
default=APARAMS.get('ipa-api-url'),
deprecated_name='api-url',
help='URL of the Ironic API'),