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

Merged
merged 6 commits into from Apr 13, 2017

Conversation

Projects
None yet
4 participants
Contributor

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

overlord/ifacestate: automatically rename connections on core snap
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

Contributor

zyga commented Apr 10, 2017

This branch depends on #3154

overlord/ifacestate/helpers.go
+ oldPlugRef := interfaces.PlugRef{Snap: "core", Name: plugName}
+ oldConnRef := interfaces.ConnRef{PlugRef: oldPlugRef, SlotRef: slotRef}
+ oldID := oldConnRef.ID()
+ // new connection
@chipaca

chipaca Apr 10, 2017

Member

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

@chipaca

chipaca Apr 10, 2017

Member

(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)

@zyga

zyga Apr 10, 2017

Contributor

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

mvo5 approved these changes Apr 10, 2017

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

zyga added some commits Apr 10, 2017

overlord/ifacestate: move new vars to where they are used
Signed-off-by: Zygmunt Krynicki <zygmunt.krynicki@canonical.com>

@mvo5 mvo5 modified the milestones: 2.25, 2.24 Apr 11, 2017

zyga added some commits Apr 11, 2017

overlord/ifacestate: rename just the core-support conn
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 snapcore:master Apr 13, 2017

6 checks passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
xenial-amd64 autopkgtest finished (success)
Details
xenial-i386 autopkgtest finished (success)
Details
xenial-ppc64el autopkgtest finished (success)
Details
yakkety-amd64 autopkgtest finished (success)
Details
zesty-amd64 autopkgtest finished (success)
Details

@zyga zyga deleted the zyga:rename-core-conns branch Apr 13, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment