Skip to content
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

Temporarily remove many-to-many from NetworkRouter #102

Merged
merged 1 commit into from
Jul 13, 2018

Conversation

miha-plesko
Copy link
Contributor

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.

@miha-plesko
Copy link
Contributor Author

@Ladas this should already be commented out as part of #97 but I didn't notice because Travis was green. Travis never performs router.floating_ips so it doesn't care but UI does...

@@ -1,3 +1,4 @@
class ManageIQ::Providers::Nuage::NetworkManager::NetworkRouter < ::NetworkRouter
has_many :floating_ips, :dependent => :destroy
# TODO(miha-plesko): uncomment when https://github.com/ManageIQ/manageiq-schema/pull/217 is merged
# has_many :floating_ips, :dependent => :destroy
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the best might be to define:

def floating_ips
  FloatingIp.none
end

so you can have it used in UI or other places, but it will just return blank result until properly implemented

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense, done.

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 <[email protected]>
@miha-plesko miha-plesko force-pushed the comment-out-router-key branch from 031e3dc to 4d2221a Compare July 13, 2018 09:19
Copy link
Contributor

@Ladas Ladas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 looks good as a temporary solution

@miq-bot
Copy link
Member

miq-bot commented Jul 13, 2018

Checked commit miha-plesko@4d2221a with ruby 2.3.3, rubocop 0.52.1, haml-lint 0.20.0, and yamllint 1.10.0
1 file checked, 0 offenses detected
Everything looks fine. 👍

@Ladas Ladas merged commit 2a92410 into ManageIQ:master Jul 13, 2018
@Ladas Ladas added this to the Sprint 90 Ending Jul 16, 2018 milestone Jul 13, 2018
@miha-plesko miha-plesko deleted the comment-out-router-key branch July 24, 2018 08:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants