-
Notifications
You must be signed in to change notification settings - Fork 929
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
OVN external addresses on lxc network list-allocations
#14210
Conversation
Heads up @mionaalex - the "Documentation" label was applied to this issue. |
there's a spelling error (either needs quoting or specified as OVN) |
@tomponline Sorry, could you please point out where the spelling error is? |
96a7b1e
to
ebd8e3a
Compare
@tomponline All green here, ready for a review! Edit: Tests went back to failing :( |
fd0798c
to
3d5c988
Compare
please can you rebase |
41082b4
to
4e4612e
Compare
@tomponline Now rebased and all green, ready for a review when you have the time |
doc/api-extensions.md
Outdated
@@ -2501,3 +2501,9 @@ Expands APIs under `/1.0/auth` to include: | |||
The caller must provide a base64 encoded x509 certificate in the `certificate` field of the request body. | |||
Fine-grained TLS identities may update their own certificate. | |||
To update the certificate of another identity, the caller must have `can_edit` on the identity. | |||
|
|||
## `list_ovn_uplink_allocations` |
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.
Should be called something like network_allocations_ovn_uplink
so it aligns with "thing_feature" style and with the earlier "network_allocations" extension.
lxd/network/driver_bridge.go
Outdated
@@ -3483,7 +3483,7 @@ func (n *bridge) Leases(projectName string, clientType request.ClientType) ([]ap | |||
v := network.Config[k] | |||
if v != "" { | |||
leases = append(leases, api.NetworkLease{ | |||
Hostname: fmt.Sprintf("%s-%s.uplink", projectName, network.Name), | |||
Hostname: fmt.Sprintf("%s/%s.uplink", projectName, network.Name), |
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.
/
is not valid character to include in hostname values.
Also its an API break.
doc/rest-api.yaml
Outdated
@@ -3127,24 +3127,28 @@ definitions: | |||
e.g, instance, network forward, load-balancer, network... | |||
properties: | |||
addresses: | |||
description: The network address of the allocation (in CIDR format) | |||
description: The network address of the allocation (in CIDR format). |
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.
Looking at the existing rest-api.yaml the vast majority of description entries do not end with fullstop.
I tend to check what is the most consistent existing format before changing something like this.
It looks like we should be removing all full stops from end of these descriptions rather than adding them.
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.
Sorry about that, I just followed the first other example I found instead of looking at many instances
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.
some changes to be made, and i think we should discuss the project issue together.
Please can you flag any API breaks in the future just in case I dont notice them. thanks!
79bafa2
to
5545914
Compare
213603a
to
1fdf2d6
Compare
How are you doing with this @hamistao ? |
1fdf2d6
to
7aa4291
Compare
@tomponline Tests passing and ready for a review, sorry for the delay |
Signed-off-by: hamistao <[email protected]>
Signed-off-by: hamistao <[email protected]>
This populates the new `HostProject` field accordingly and also supports calling `Leases` with an empty project name, which returns leases from all projects. Signed-off-by: hamistao <[email protected]>
This populates the new `HostProject` field accordingly and also supports calling `Leases` with an empty project name, which returns leases from all projects. Signed-off-by: hamistao <[email protected]>
This is needed to also show leases for instances that are in project other than the network's project. Signed-off-by: hamistao <[email protected]>
This also uses the correct project for instance leases, instead of assuming the instance is always on the same project as the network. Signed-off-by: hamistao <[email protected]>
Also puts a full stop in comments Signed-off-by: hamistao <[email protected]>
Signed-off-by: hamistao <[email protected]>
Signed-off-by: hamistao <[email protected]>
Signed-off-by: hamistao <[email protected]>
Signed-off-by: hamistao <[email protected]>
Signed-off-by: hamistao <[email protected]>
Signed-off-by: hamistao <[email protected]>
7aa4291
to
7dd9908
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.
Ta!
This also adds a network field to each network allocation, indicating to which network each allocated address belongs.
Closes #13412
Example: