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
Allow settings tags for lb_listener_v2 #1438
Allow settings tags for lb_listener_v2 #1438
Conversation
@@ -218,6 +221,85 @@ func testAccCheckLBV2ListenerExists(n string, listener *listeners.Listener) reso | |||
} | |||
} | |||
|
|||
/** | |||
* gophercloud doesn't return the tags in the structure. Need to fix tghis first. |
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.
Hello,
From what i can see gophercloud supports tags in the return struct, this was added: gophercloud/gophercloud#2214
And we are using a version that includes this
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.
You are right, it should be there. But somehow it's failing and I don't know what's wrong.
Error: found.Tags undefined (type *"github.com/gophercloud/gophercloud/openstack/networking/v2/extensions/lbaas_v2/listeners".Listener has no field or method Tags) (typecheck)
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.
@stinnux check my comment below
return fmt.Errorf("Error creating OpenStack load balancing client: %s", err) | ||
} | ||
|
||
found, err := listeners.Get(lbClient, rs.Primary.ID).Extract() |
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.
0e15366
to
3302594
Compare
@stinnux I rebased your branch to re-run tests. |
2fca8a0
to
6669659
Compare
6669659
to
fc75eb4
Compare
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.
LGTM
This allows setting tags for listener when using octavia.
The change is heavily "inspired" by the tag feature used in the loadbalancer resource and therefore uses the same approach.