-
Notifications
You must be signed in to change notification settings - Fork 898
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
add relation between container projects and persistent volume claims #15932
add relation between container projects and persistent volume claims #15932
Conversation
@zakiva Please review @miq-bot add_label providers/containers |
|
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. nit comment
@@ -42,9 +42,12 @@ def save_persistent_volume_claims_inventory(ems, hashes) | |||
return if hashes.nil? | |||
|
|||
ems.persistent_volume_claims.reset | |||
hashes.each do |h| | |||
h[:container_project_id] = h.fetch_path(:project, :id) |
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.
How about:
h[:container_project_id] = h.delete_path(:project)[:id]
and remove the ignored key from line 50. Not a big deal, to me it makes the parsing more self contained in terms of the hashes we output) I think we use both strategies now.
a87e611
to
d66e647
Compare
@moolitayer Fixed |
Checked commit zeari@d66e647 with ruby 2.2.6, rubocop 0.47.1, and haml-lint 0.20.0 |
@@ -42,6 +42,9 @@ def save_persistent_volume_claims_inventory(ems, hashes) | |||
return if hashes.nil? | |||
|
|||
ems.persistent_volume_claims.reset | |||
hashes.each do |h| | |||
h[:container_project_id] = h.delete_path(:project)[:id] |
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.
can use just delete
here. doesn't matter.
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.
LGTM 👍
@Fryguy @blomquisg ManageIQ/manageiq-schema#60 was merged. Can we merge this one too? |
persistent_volume_claims are under a namespace\project. This PR adds the relation.
depends on
ManageIQ/manageiq-schema#60(merged)