-
Notifications
You must be signed in to change notification settings - Fork 63
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
Save persistent volume claim to project relation #108
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -189,6 +189,7 @@ def get_persistent_volume_claims(inventory) | |
process_collection(inventory["persistent_volume_claim"], key) { |n| parse_persistent_volume_claim(n) } | ||
@data[key].each do |pvc| | ||
@data_index.store_path(key, :by_namespace_and_name, pvc[:namespace], pvc[:name], pvc) | ||
pvc[:project] = @data_index.fetch_path(path_for_entity("namespace"), :by_name, pvc[:namespace]) | ||
end | ||
end | ||
|
||
|
@@ -371,6 +372,7 @@ def get_persistent_volume_claims_graph(inv) | |
|
||
inv["persistent_volume_claim"].each do |pvc| | ||
h = parse_persistent_volume_claim(pvc) | ||
h[:container_project] = lazy_find_project(:name => h[:namespace]) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @cben so this has to be done in both refreshes since it involves data_index right? in cases where we change parsing (e.g add another textual field to an entity) we will have to update only the parse method? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah. A column on same table can be set once in Links to other tables are done differently in 2 refreshes.
|
||
|
||
collection.build(h) | ||
end | ||
|
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.
Much of the parser sets
:project
instead of:container_project
for some reason. I want to fix it one day.Is it easy to do
:container_project
here? Or do you think it's better to keep the pattern?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.
it's been bugging me too :) never got around to fixing it.
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.
keep the pattern. change it in the next refactor.