-
Notifications
You must be signed in to change notification settings - Fork 55
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add address/port config settings for crates using MQTT clients #1789
Conversation
Robot Results
Passed Tests
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good from a functional point of view. I was able to set the mqtt client host/port independently of other binding settings, and was able to use a hostname instead of an IP 🥇
I will let one of the other reviewers approve the code changes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approved.
crates/common/tedge_config/src/tedge_config_cli/config_setting.rs
Outdated
Show resolved
Hide resolved
crates/common/tedge_config/src/tedge_config_cli/tedge_config_dto.rs
Outdated
Show resolved
Hide resolved
crates/common/tedge_config/src/tedge_config_cli/tedge_config.rs
Outdated
Show resolved
Hide resolved
crates/common/tedge_config/src/tedge_config_cli/tedge_config_dto.rs
Outdated
Show resolved
Hide resolved
ea8c9ff
to
adfcc49
Compare
Signed-off-by: Marcel Guzik <marcel.guzik@inetum.com>
As described in thin-edge#1773, config settings for addresses and port numbers were made separate for MQTT clients and brokers, as often connect and bind addresses are different. This change will help in scenarios where the MQTT broker is located outside of the local network, e.g. when using containers or when using a hostname. Signed-off-by: Marcel Guzik <marcel.guzik@inetum.com>
c8y_configuration_plugin, c8y_firmware_plugin, and c8y_log_plugin didnt's use any MQTT address/host config settings, but were hardcoded to default to localhost. Now they use MqttClientAddressSetting and MqttClientPortSetting settings. Signed-off-by: Marcel Guzik <marcel.guzik@inetum.com>
adfcc49
to
8402b86
Compare
Applied suggestions and also changed |
…edge#1789) * Added impl TryFrom<&str> for IpAddress Signed-off-by: Marcel Guzik <marcel.guzik@inetum.com> * Add MQTT client address and port config options As described in thin-edge#1773, config settings for addresses and port numbers were made separate for MQTT clients and brokers, as often connect and bind addresses are different. This change will help in scenarios where the MQTT broker is located outside of the local network, e.g. when using containers or when using a hostname. Signed-off-by: Marcel Guzik <marcel.guzik@inetum.com> * Make c8y plugins use client address/port settings c8y_configuration_plugin, c8y_firmware_plugin, and c8y_log_plugin didnt's use any MQTT address/host config settings, but were hardcoded to default to localhost. Now they use MqttClientAddressSetting and MqttClientPortSetting settings. Signed-off-by: Marcel Guzik <marcel.guzik@inetum.com> --------- Signed-off-by: Marcel Guzik <marcel.guzik@inetum.com>
Proposed changes
As described in #1773, config settings for addresses and port numbers were made separate for MQTT clients and brokers, as often connect and bind addresses are different. This change will help in scenarios where the MQTT broker is located outside of the local network, e.g. when using containers or when using a hostname.
Additionally c8y_configuration_plugin, c8y_firmware_plugin, and c8y_log_plugin, which didnt's use any MQTT address/host config settings, and were hardcoded to default to localhost, now use MqttClientAddressSetting and MqttClientPortSetting settings.
Types of changes
Paste Link to the issue
Checklist
cargo fmt
as mentioned in CODING_GUIDELINEScargo clippy
as mentioned in CODING_GUIDELINESFurther comments