diff options
| author | Dmitry Tantsur <dtantsur@protonmail.com> | 2020-08-06 15:14:31 +0200 |
|---|---|---|
| committer | Dmitry Tantsur <dtantsur@protonmail.com> | 2020-08-06 15:14:31 +0200 |
| commit | 353d09c3b01ddca76335f9797bce4c6ba5900c2f (patch) | |
| tree | 8a24f001a1be59c8f33f453314eafc4d493e53ec /ironic_python_agent/agent.py | |
| parent | 622ca733e2641b9c59e213a26749e9e76d3ea43d (diff) | |
| download | ironic-python-agent-353d09c3b01ddca76335f9797bce4c6ba5900c2f.tar.gz | |
Support changing the protocol part of callback_url to https
Adds a new kernel parameter for manual configuration and also creates
foundation for automatic TLS support later.
Change-Id: If341c3a8a268fc8cab6bd6be04b12ca32b31c8d8
Story: #2007214
Task: #40619
Diffstat (limited to 'ironic_python_agent/agent.py')
| -rw-r--r-- | ironic_python_agent/agent.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/ironic_python_agent/agent.py b/ironic_python_agent/agent.py index 6dd62c5d..ec520cd6 100644 --- a/ironic_python_agent/agent.py +++ b/ironic_python_agent/agent.py @@ -133,7 +133,8 @@ class IronicPythonAgentHeartbeater(threading.Thread): try: self.api.heartbeat( uuid=self.agent.get_node_uuid(), - advertise_address=self.agent.advertise_address + advertise_address=self.agent.advertise_address, + advertise_protocol=self.agent.advertise_protocol, ) self.error_delay = self.initial_delay LOG.info('heartbeat successful') @@ -165,7 +166,7 @@ class IronicPythonAgent(base.ExecuteCommandMixin): def __init__(self, api_url, advertise_address, listen_address, ip_lookup_attempts, ip_lookup_sleep, network_interface, lookup_timeout, lookup_interval, standalone, agent_token, - hardware_initialization_delay=0): + hardware_initialization_delay=0, advertise_protocol='http'): super(IronicPythonAgent, self).__init__() if bool(cfg.CONF.keyfile) != bool(cfg.CONF.certfile): LOG.warning("Only one of 'keyfile' and 'certfile' options is " @@ -192,6 +193,7 @@ class IronicPythonAgent(base.ExecuteCommandMixin): self.heartbeater = IronicPythonAgentHeartbeater(self) self.listen_address = listen_address self.advertise_address = advertise_address + self.advertise_protocol = advertise_protocol self.version = pkg_resources.get_distribution('ironic-python-agent')\ .version self.api = app.Application(self, cfg.CONF) |
