-
Notifications
You must be signed in to change notification settings - Fork 358
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
Ofer/326040 list capabilities for physical storage #8604
Ofer/326040 list capabilities for physical storage #8604
Conversation
@Oferlis , could you please rebase with master (also squash 6 commits) branch to see if the the spec:javascript is still failing in GitHub actions |
64f5040
to
61c35b1
Compare
Hey, I have rebased the branch and fixed one of the failing specs, but the other keeps failing. |
Could you try running them locally to see if this is related to your changes? |
6574843
to
ddbe5bd
Compare
Changing this PR to WIP since we decided that capabilities will be shown from the physical storage, not from the storage family |
Manually adding WIP label (for the bot to add it automatically change the title to be [WIP] rather than WIP) |
if storage_family_id | ||
capabilities = PhysicalStorageFamily.find(storage_family_id)&.capabilities | ||
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.
Two things:
- Prefer setting the physical_storage capabilities to be equal to the physical_storage_family.capabilities in your refresh parser so we only have to hit one location here to show them. Consider someone using the API where this logic won't exist (and shouldn't have to exist)
- If you were going to reference the storage_family for some reason you should use the assoication rather than doing a manual query (e.g.
@record.physical_storage_family&.capabilities
don't actually do this here, but if you had to in the future use the assoc not a manual query)
it 'shows 9 fields' do | ||
expect(subject.items).to be_kind_of(Array) | ||
expect(subject.items.size).to eq(8) | ||
expect(subject.items.size).to eq(9) |
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.
Not a reflection on your changes at all, but this seems like a pointless test. Better to check the contents than a whole test checking the number of fields.
37d3b66
to
652794f
Compare
a088cce
to
18c7f12
Compare
Checked commit Autosde@18c7f12 with ruby 2.6.10, rubocop 1.28.2, haml-lint 0.35.0, and yamllint app/helpers/physical_storage_helper/textual_summary.rb
|
Hey @Oferlis , is this PR good to test/merge? |
Hey, any updates here? or shall we merge it? |
Hey, sorry for the late response. |
Added textual summary function to display capabilities of a physical storage.
related to PR in AutoSDE provider repo ManageIQ/manageiq-providers-autosde#198