Open abellotti opened 6 years ago
Adding support for subcollections and related subresources
supports queries and actions
Queries: miq.vms.find(166).tags.collect(&:name) miq.vms.find(166).tags.select(:categorization).collect(&:categorization)
Subcollection Actions: miq.vms.find(166).tags.assign(:name => "/managed/location/ny") miq.vms.find(166).tags.assign([{:name => "/managed/location/chicago"}, {:name => "/managed/cc/001"}])
Subcollection resource actions: miq.vms.find(166).tags.find(32).unassign miq.vms.find(166).tags.where(:name => "/managed/location/*").collect(&:unassign)
Nested searches with sub resource actions: miq.providers.find_by(:name => "test-vc").vms.where(:name => "testvm-*").last.tags.where(:name => "environment/testing").unassign
Fixes: #31 Fixes: #32
@abellotti if this is still a viable PR, then please rebase.
Yes, these are still viable PRs.
Adding support for subcollections and related subresources
supports queries and actions
Queries: miq.vms.find(166).tags.collect(&:name) miq.vms.find(166).tags.select(:categorization).collect(&:categorization)
Subcollection Actions: miq.vms.find(166).tags.assign(:name => "/managed/location/ny") miq.vms.find(166).tags.assign([{:name => "/managed/location/chicago"}, {:name => "/managed/cc/001"}])
Subcollection resource actions: miq.vms.find(166).tags.find(32).unassign miq.vms.find(166).tags.where(:name => "/managed/location/*").collect(&:unassign)
Nested searches with sub resource actions: miq.providers.find_by(:name => "test-vc").vms.where(:name => "testvm-*").last.tags.where(:name => "environment/testing").unassign
Fixes: #31 Fixes: #32