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

Add supports storage smartstate_analysis #887

Merged

Conversation

nasark
Copy link
Member

@nasark nasark commented Oct 11, 2023

Core has been changed to use supports_not and since vmware is the only provider that supports storage scans this is needed here

@miq-bot add_label bug
@miq-bot assign @agrare

@@ -1,3 +1,5 @@
class ManageIQ::Providers::Vmware::InfraManager::Storage < ManageIQ::Providers::InfraManager::Storage
include ManageIQ::Providers::Vmware::InfraManager::EmsRefObjMixin

supports :smartstate_analysis
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@agrare
Copy link
Member

agrare commented Oct 24, 2023

@nasark We're dropping the supports :smartstate_analysis from ::Storage base class (nice) but I think we need to add it here to the Vmware::InfraManager::Storage

@nasark nasark force-pushed the add_supports_storage_smartstate_analysis branch 2 times, most recently from 9d80a56 to 970b225 Compare December 19, 2023 20:44
@nasark
Copy link
Member Author

nasark commented Dec 19, 2023

@miq-bot add_label quinteros/yes?

Comment on lines 3 to 10

supports :smartstate_analysis do
if nil?
unsupported_reason_add(:smartstate_analysis, "Storage not found")
end
unless storage_type_supported_for_ssa?
unsupported_reason_add(:smartstate_analysis, "Smartstate Analysis unsupported for storage type %{store_type}" % {:store_type => store_type})
end
end
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this needs to live in app/models/manageiq/providers/vmware/infra_manager/vm_or_template_shared/scanning.rb (where storage.nil? would make sense, just nil? here doesn't do anything since the current object can't be nil here)

@nasark nasark force-pushed the add_supports_storage_smartstate_analysis branch from 970b225 to 7bc493b Compare December 20, 2023 19:37
Comment on lines 3 to 10

supports :smartstate_analysis do
if nil?
unsupported_reason_add(:smartstate_analysis, "Storage not found")
elsif !storage_type_supported_for_ssa?
unsupported_reason_add(:smartstate_analysis, "Smartstate Analysis unsupported for storage type %{store_type}" % {:store_type => store_type})
end
end
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we need this, storage smartstate is different and the store_type shouldn't matter (plus if nil? doesn't make sense)

@nasark nasark force-pushed the add_supports_storage_smartstate_analysis branch from 7bc493b to 573100d Compare December 21, 2023 22:46
@miq-bot
Copy link
Member

miq-bot commented Dec 21, 2023

Checked commit nasark@573100d with ruby 2.7.8, rubocop 1.56.3, haml-lint 0.51.0, and yamllint
1 file checked, 0 offenses detected
Everything looks fine. 🏆

@agrare agrare merged commit 1c73716 into ManageIQ:master Jan 2, 2024
3 checks passed
@Fryguy
Copy link
Member

Fryguy commented Jan 5, 2024

Backported to quinteros in commit 624712b.

commit 624712bb3ee83faaba4ef0d23cc0d10aa2fe8320
Author: Adam Grare <[email protected]>
Date:   Tue Jan 2 11:48:10 2024 -0500

    Merge pull request #887 from nasark/add_supports_storage_smartstate_analysis
    
    Add supports storage smartstate_analysis
    
    (cherry picked from commit 1c737166c05a0b56f653218a3c1431214b12888e)

Fryguy pushed a commit that referenced this pull request Jan 5, 2024
…nalysis

Add supports storage smartstate_analysis

(cherry picked from commit 1c73716)
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