Skip to content
This repository has been archived by the owner on May 21, 2024. It is now read-only.

Refact/ota 2487/ipsecondaries initialization #1198

Merged
merged 2 commits into from
May 6, 2019

Conversation

mike-sul
Copy link
Collaborator

@mike-sul mike-sul commented May 1, 2019

  1. Add ability to specify params that are common across secondaries of the same type (connection wait timeout);
  2. Primary waits for a connection from Secondary if it fails to connect to it. Secondary tries to connect to Primary at a startup time.

@mike-sul mike-sul force-pushed the refact/OTA-2487/ipsecondaries-initialization branch 6 times, most recently from e8e7bf2 to 874391a Compare May 1, 2019 15:09
Copy link
Collaborator

@pattivacek pattivacek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks pretty good, I think. I don't think I have any significant comments to make.

@@ -7,6 +7,7 @@

namespace Primary {

const char* const IPSecondariesConfig::Type = "IP";
const char* const IPSecondaryConfig::Type = "ip";
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems slightly odd to have two constants that are seemingly the same except for subtle differences in count and capitalization. Are these both really necessary?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no, they aren't, I've removed IPSecondaryConfig::Type

@@ -10,20 +10,30 @@

namespace Uptane {

std::shared_ptr<Uptane::SecondaryInterface> IpUptaneSecondary::create(const std::string& address, unsigned short port) {
std::pair<bool, std::shared_ptr<Uptane::SecondaryInterface>> IpUptaneSecondary::connectAndcreate(
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pretty insignificant, but we generally like camelCase, so this should be "connectAndCreate".

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

agree

@mike-sul mike-sul force-pushed the refact/OTA-2487/ipsecondaries-initialization branch from 874391a to 3aa0366 Compare May 3, 2019 07:36
@mike-sul mike-sul force-pushed the refact/OTA-2487/ipsecondaries-initialization branch from 3aa0366 to a7b825d Compare May 3, 2019 08:22
Copy link
Collaborator

@pattivacek pattivacek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks ready to go to me! Travis failure is just in the CI upload; tests passed. That's getting annoying but won't stop me merging this now.

@pattivacek pattivacek merged commit cf9c980 into master May 6, 2019
@pattivacek pattivacek deleted the refact/OTA-2487/ipsecondaries-initialization branch May 6, 2019 12:07
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants