-
Notifications
You must be signed in to change notification settings - Fork 62
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
Subclass IsoDatastore and transfer from core #621
Conversation
ae01b01
to
4996703
Compare
Update: UI changes are complete |
f62f423
to
a76f371
Compare
app/models/manageiq/providers/ovirt/infra_manager/iso_datastore.rb
Outdated
Show resolved
Hide resolved
app/models/manageiq/providers/ovirt/infra_manager/iso_datastore.rb
Outdated
Show resolved
Hide resolved
c137088
to
670c425
Compare
670c425
to
0401dd8
Compare
From Pull Request: ManageIQ/manageiq-providers-ovirt#621
0401dd8
to
8fe7666
Compare
From Pull Request: ManageIQ/manageiq-providers-ovirt#621
|
||
def add_iso_images | ||
add_collection(infra, :iso_images) do |builder| | ||
builder.add_properties( | ||
:parent_inventory_collections => %i(storages), | ||
:manager_ref => %i[name], | ||
:model_class => IsoImage | ||
) | ||
end | ||
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.
This looks identical to https://github.com/ManageIQ/manageiq/pull/22239/files#diff-c07cbd5bcca8d8dfcae29bfd9c42c8933ea8f3f47844069b0e3f8d2374ed765dR299-R305 can we just add_collection(infra, :iso_images)
above with the rest of the normal collection (lines 3:23) instead of overriding this?
spec/factories/iso_datastore.rb
Outdated
@@ -0,0 +1,3 @@ | |||
FactoryBot.define do | |||
factory :iso_datastore, :class => 'ManageIQ::Providers::Ovirt::InfraManager::IsoDatastore' |
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.
Think we should have , :parent => :storage_redhat
@@ -150,6 +150,10 @@ def templates | |||
t | |||
end | |||
|
|||
def advertised_images | |||
[] |
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.
So we do handle targeted refresh of storage domains, but the manager.ovirt_services.advertised_images
call only works for all storagedomains.
A good follow-up would be to extract the advertised_images
method into the collector, then adding a targeted advertised_images that looks at references(:storagedomains)
8fe7666
to
fb76c53
Compare
Some comments on commits nasark/manageiq-providers-ovirt@f2f2d7a~...fb76c53 spec/models/manageiq/providers/ovirt/infra_manager/iso_datastore_spec.rb
|
Checked commits nasark/manageiq-providers-ovirt@f2f2d7a~...fb76c53 with ruby 2.6.10, rubocop 1.28.2, haml-lint 0.35.0, and yamllint app/models/manageiq/providers/ovirt/infra_manager/iso_datastore.rb
spec/models/manageiq/providers/ovirt/infra_manager/ovirt_services/v4_spec.rb
|
Cross-repo tests are green ( |
Storage
objects with STI:type => ManageIQ::Providers::Ovirt::InfraManager::IsoDatastore
synchronize_advertised_images
functionality is now in a refresh and the images will be persistedDepends on:
TODO:
IsoDatastore
references in UImanageiq-providers-red_hat_virtualization
Ref:
@miq-bot add_label enhancement
@miq-bot assign @agrare