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

InventoryCollection definitions for Lenovo #18063

Merged
merged 1 commit into from
Oct 17, 2018

Conversation

slemrmartin
Copy link
Contributor

Definitions of inventory collections for graph refresh.

dependent: ManageIQ/manageiq-providers-lenovo#236

@miq-bot miq-bot added the wip label Oct 5, 2018
@slemrmartin slemrmartin force-pushed the lenovo-graph-refresh branch from a7f1495 to 123c4c3 Compare October 8, 2018 14:29
@slemrmartin slemrmartin changed the title [WIP] InventoryCollection definitions for Lenovo InventoryCollection definitions for Lenovo Oct 8, 2018
@slemrmartin
Copy link
Contributor Author

cc @agrare @Ladas

# # Tmp solution with serial_number works for specs
def canisters
add_properties(:manager_ref => %i(physical_storage serial_number))
add_properties(:manager_ref_allowed_nil => %i(serial_number))
Copy link
Member

Choose a reason for hiding this comment

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

I'm concerned about the serial_number being able to be nil, there is an ems_ref column on canisters can we use physical_storage + ems_ref as the manager_ref and it is up to the lenovo parser to make sure it is present? I don't want to be solving any of the lenovo specific problems in the generic physical infra inventory collections.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

there is no ems_ref (UUID) for canisters in this Lenovo API request. It's the same problem like in old refresh. There should be called /canisters separatedly. But this PR should be as similar as possible as old refresh and another usage of API should be implemented in another PR (..and I have only VCR cassettes where this request isn't available)

# Tmp solution with serial_number works for specs
def physical_disks
add_properties(:manager_ref => %i(physical_storage serial_number))
add_properties(:manager_ref_allowed_nil => %i(serial_number))
Copy link
Member

Choose a reason for hiding this comment

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

Same comment as above

Copy link
Contributor Author

Choose a reason for hiding this comment

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

unfortunatelly this is not the same. Physical disks doesn't have unique identifier, I'll look what they used in recent PR, but I think they used the same column

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@agrare discussion was there: ManageIQ/manageiq-schema#285 (same as for canisters)

@miq-bot
Copy link
Member

miq-bot commented Oct 16, 2018

Checked commit slemrmartin@aaeb608 with ruby 2.3.3, rubocop 0.52.1, haml-lint 0.20.0, and yamllint 1.10.0
1 file checked, 0 offenses detected
Everything looks fine. 🏆

@@ -48,9 +48,15 @@ def physical_storages
add_common_default_values
end

def canisters
def physical_switches
add_properties(:manager_ref => %i(uid_ems))
add_common_default_values
Copy link
Contributor Author

Choose a reason for hiding this comment

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

canisters doesn't have ems_id

@agrare agrare merged commit f29db30 into ManageIQ:master Oct 17, 2018
@agrare agrare added this to the Sprint 97 Ending Oct 22, 2018 milestone Oct 17, 2018
@slemrmartin slemrmartin deleted the lenovo-graph-refresh branch October 17, 2018 13:57
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.

3 participants