-
Notifications
You must be signed in to change notification settings - Fork 34
Port: add propagationUplinkStatus field #641
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
base: main
Are you sure you want to change the base?
Changes from all commits
6901189
4d21547
f4abfe6
7112a07
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -86,3 +86,4 @@ spec: | |
| projectRef: port-create-full | ||
| macAddress: fa:16:3e:23:fd:d7 | ||
| hostID: devstack | ||
| propagateUplinkStatus: false | ||
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -52,10 +52,19 @@ type NetworkExt struct { | |||||
| provider.NetworkProviderExt | ||||||
| } | ||||||
|
|
||||||
| // NOTE(winiciusallan): This is a temporary extension struct to | ||||||
| // workaround a missing pointer on Gophercloud and must be | ||||||
| // removed in future releases. | ||||||
| // See https://github.com/gophercloud/gophercloud/issues/3605 | ||||||
| type PortTmpExt struct { | ||||||
| PropagateUplinkStatusPtr *bool `json:"propagate_uplink_status,omitempty"` | ||||||
| } | ||||||
|
|
||||||
| type PortExt struct { | ||||||
| ports.Port | ||||||
| portsecurity.PortSecurityExt | ||||||
| portsbinding.PortsBindingExt | ||||||
| PortTmpExt //nolint:govet | ||||||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The I suggest removing the workaround since we don't allow mutability now.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We need the workaround to be able to not return the field if the extension is not enabled. edit: I didn't find any way to suppress vet warning. Do you have any suggestion?
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think it should work if you add the field at the top level instead of embedding:
Suggested change
See this small test. |
||||||
| } | ||||||
|
|
||||||
| type NetworkClient interface { | ||||||
|
|
||||||
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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.
We've discussed this privately already, after you brought the issue to my attention: gophercloud implements the
PropagateUplinkStatusin the responsePortstructure as aboolwhile it should really be a*boolwithomitempty, and because of this we can't reliably know the status forPropagateUplinkStatus. I suggest that until the issue if fixed in gophercloud, we make that field immutable.