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

Inform Rails that SecurityGroup now belongs to Router/Subnet #17900

Merged

Conversation

miha-plesko
Copy link
Contributor

With this commit we inform Rails about the two new foreign keys on :security_groups table:

security_group.cloud_subnet
security_group.network_router

cloud_subnet.security_groups
network_router.security_groups

Related schema PR: ManageIQ/manageiq-schema#258 (already merged)

@miq-bot add_label enhancement
@miq-bot assign @agrare

@miha-plesko
Copy link
Contributor Author

@agrare please let me know if I should put :dependent: => :nullify, but following other :has_manys I think not.

@miha-plesko
Copy link
Contributor Author

@Ladas we don't usually provide rspecs for such foreign keys, right?

@Ladas
Copy link
Contributor

Ladas commented Aug 27, 2018

@miha-plesko we should have the dependent nullify (it looks like it is missing in few places)

We don't do specs for this, we should have specs in the refresh, for this relations.

With this commit we inform Rails about two new foreign keys
on :security_groups table:

```ruby
security_group.cloud_subnet
security_group.network_router

cloud_subnet.security_groups
network_router.security_groups
```

Signed-off-by: Miha Pleško <miha.plesko@xlab.si>
@miha-plesko miha-plesko force-pushed the sec-group-belongs-to-subnet-and-router branch from 3ee0e5b to fd18082 Compare August 27, 2018 12:54
@miha-plesko
Copy link
Contributor Author

Thanks

@miq-bot
Copy link
Member

miq-bot commented Aug 27, 2018

Checked commit miha-plesko@fd18082 with ruby 2.3.3, rubocop 0.52.1, haml-lint 0.20.0, and yamllint 1.10.0
3 files checked, 0 offenses detected
Everything looks fine. 🍪

@agrare agrare merged commit 6b17ea7 into ManageIQ:master Aug 27, 2018
@agrare agrare added this to the Sprint 93 Ending Aug 27, 2018 milestone Aug 27, 2018
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.

4 participants