Skip to content
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

overlord/ifacestate: automatically rename connections on core snap #3160

Merged
merged 6 commits into from
Apr 13, 2017

Conversation

zyga
Copy link
Contributor

@zyga zyga commented Apr 10, 2017

This patch completes the rename cycle by renaming stored connections
to and from the core snap with clashing plug and slot name.

Signed-off-by: Zygmunt Krynicki zygmunt.krynicki@canonical.com

This patch completes the rename cycle by renaming stored connections
to and from the core snap with clashing plug and slot name.

Signed-off-by: Zygmunt Krynicki <zygmunt.krynicki@canonical.com>
@zyga zyga added this to the 2.24 milestone Apr 10, 2017
@zyga
Copy link
Contributor Author

zyga commented Apr 10, 2017

This branch depends on #3154

oldPlugRef := interfaces.PlugRef{Snap: "core", Name: plugName}
oldConnRef := interfaces.ConnRef{PlugRef: oldPlugRef, SlotRef: slotRef}
oldID := oldConnRef.ID()
// new connection
Copy link
Contributor

Choose a reason for hiding this comment

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

any reason not to have everything from here down inside the if?

Copy link
Contributor

Choose a reason for hiding this comment

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

(FTR I think it's alright, if a little surprising, to have it this way instead of inside the if; don't change it if you'd only start the tests over for this change)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Aha, good point. I'll make that happen.

Copy link
Contributor

@mvo5 mvo5 left a comment

Choose a reason for hiding this comment

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

Looks good, but I think we want @chipaca suggestion in.

@mvo5 mvo5 modified the milestones: 2.25, 2.24 Apr 11, 2017
The network-bind plug is no longer present on the core snap so we don't
need to rename it anymore.

Signed-off-by: Zygmunt Krynicki <zygmunt.krynicki@canonical.com>
@zyga zyga merged commit b3e03b5 into canonical:master Apr 13, 2017
@zyga zyga deleted the rename-core-conns branch April 13, 2017 09:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants