-
Notifications
You must be signed in to change notification settings - Fork 1
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
Vc/incoming device api #38
Conversation
Currently alloy creates the server component types on startup if they haven't been populated previously. This change imports bmc-toolbox's component slugs and uses them to populate the server_component_types table using an upsert. This should be able to capture changes to known component types on an upgrade too.
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.
I would prefer we move away from versioned attributes for Firmware, Status, Vendor attribute like we discussed and prefer if this is more of an interim solution.
*/ | ||
|
||
var ( | ||
// historically these values were determined/set by alloy, even though they are |
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.
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.
Good point. Depending on the direction I take with versioned_attribute namespaces I can make that change or keep things in-repo and private to FleetDB. That "keeping database internal things private" has been a major motivating factor for me.
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.
In the end, I decided to keep this internal to FleetDB.
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.
If its still going to be the same namespace then lets use the consts, that way its easier to find and replace these.
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.
I tried to do this and found another way where FleetDB is more fragile than expected. https://equinixjira.atlassian.net/browse/FS-1393
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.
left a few more suggestions, otherwise looks good to me.
|
||
vendorAttrRecord := &models.Attribute{ | ||
ServerID: null.StringFrom(FixtureInventoryServer.ID), | ||
Namespace: "sh.hollow.alloy.server_vendor_attributes", // alloyVendorNamespace |
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.
can we use the rivets constants here https://github.com/metal-toolbox/rivets/blob/main/fleetdb/consts.go
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.
See my comment above, but right now this is way more work than just a string substitution: https://equinixjira.atlassian.net/browse/FS-1393
*/ | ||
|
||
var ( | ||
// historically these values were determined/set by alloy, even though they are |
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.
If its still going to be the same namespace then lets use the consts, that way its easier to find and replace these.
No description provided.