Skip to content

Format device model and keep updated in store #191

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

Merged
merged 2 commits into from
Mar 19, 2024
Merged

Conversation

joelrebel
Copy link
Member

What does this PR do

Ensures the server vendor, model, serial attributes are always formatted and updated as expected in the store.

This ensures the server vendor, model, serial attributes are kept
updated based on various cases as covered in the added tests
@joelrebel joelrebel changed the title Format device model Format device model and keep updated in store Mar 19, 2024
newModelDefined := newModelNumber != unknown && newModelNumber != ""
currentModelUndefined := currentModelNumber == unknown || currentModelNumber == ""

// model number to be updated
Copy link
Contributor

Choose a reason for hiding this comment

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

Why are we even querying things that will never change?

Copy link
Member Author

Choose a reason for hiding this comment

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

for the record, the reasons were discussed in another channel, to summarise,
theres a few exceptional cases like - when bmc-toolbox/common does not yet format the model number the model attribute in the store needs to be updated.

@joelrebel joelrebel merged commit 24b6089 into main Mar 19, 2024
@joelrebel joelrebel deleted the format-device-model branch March 19, 2024 15:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants