-
Notifications
You must be signed in to change notification settings - Fork 125
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 FloatingIp to relate directly to NetworkRouter #217
Allow FloatingIp to relate directly to NetworkRouter #217
Conversation
0c64b95
to
2ab2ae8
Compare
PR that needs this new field: ManageIQ/manageiq-providers-nuage#97 |
@agrare I see you're usually pinged for first review on schema change PRs. So here it is, the ping, if you please. |
@@ -0,0 +1,5 @@ | |||
class AddNetworkRouterIdToFloatingIp < ActiveRecord::Migration[5.0] | |||
def change | |||
add_reference :floating_ips, :network_router, :type => :bigint, index: true, foreign_key: true |
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 don't use any foreign key constraints so can you remove that? Otherwise looks good to me.
With this commit we add foreign key `network_router_id` on FloatingIp model in order to be able to connect FloatingIp with NetworkRouter. Currently such connection is only possible through CloudNetworks which does not fit well in Nuage inventoring. RFE BZ: https://bugzilla.redhat.com/show_bug.cgi?id=1574922 Signed-off-by: Miha Pleško <miha.plesko@xlab.si>
2ab2ae8
to
8b156fa
Compare
Thanks @agrare , I've removed the foreign key constraint. @Ladas on gitter you suggested that we connect FloatingIp to NetworkRouter via NetworkPort which would work in case when FloatingIp is assigned to a NetworkPort. However, this is not always the case: FloatingIp can be in "unassigned" state meaning it's not related to any NetworkPort yet. With this commit we'd like to make sure that relation between NetworkRouter and FloatingIp exists even in such case. |
@miha-plesko do you have a drawing somewhere of what the router connections are? The current schema comes mainly from OpenStack, where you route CloudSubnets to CloudNetwork (as gateway), then I think the floating_ips is a list of available floating ips you can assign to VMs connected to the CloudSubnets |
@Ladas so our current inventoring plan is as follows: On Nuage GUI it looks like this (example of L3 network): From left to right:
And example of L2 network: This time, left-most element is L2 Subnet:
My thinking is that we should probably inventory "Zone" as Looking forward to your comment! |
@Ladas looking forward to your opinion ^ |
@miha-plesko sorry, I've been traveling on Friday ok, so for OpenStack having So the question is, how is this modeled in Nuage. It looks like the |
Closing after discussion with @Ladas. We'll rather inventory also CloudNetworks and connect FloatingIps to them, then things will appear as they should. |
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.
ok, looks like we need this, so lets reopen
Checked commit miha-plesko@8b156fa with ruby 2.3.3, rubocop 0.52.1, haml-lint 0.20.0, and yamllint 1.10.0 |
@Fryguy can we merge 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.
👍 looks good
@gtanzillo @agrare so this is the tiny schema PR that we were talking about in Berlin 1/2 |
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.
This seems fine to me. @Fryguy you ok with merging?
With this commit we remove relation which allows NetworkRouter to relate to multiple FloatingIps directly (instead via CloudNetwork). Until ManageIQ/manageiq-schema#217 is merged we are not able to use such direct relation or else UI crashes. Signed-off-by: Miha Pleško <miha.plesko@xlab.si>
With this commit we remove relation which allows NetworkRouter to relate to multiple FloatingIps directly (instead via CloudNetwork). Until ManageIQ/manageiq-schema#217 is merged we are not able to use such direct relation or else UI crashes. Signed-off-by: Miha Pleško <miha.plesko@xlab.si>
@Fryguy HELP please |
With this commit we add foreign key
network_router_id
on FloatingIp model in order to be able to connect FloatingIp with NetworkRouter. Currently such connection is only possible through CloudNetworks which does not fit well in Nuage inventoring.RFE BZ: https://bugzilla.redhat.com/show_bug.cgi?id=1574922
@miq-bot assign @Fryguy
@miq-bot add_label schema
/cc @Ladas