-
Notifications
You must be signed in to change notification settings - Fork 0
Conversation
101e1ca
to
3455c8e
Compare
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.
My biggest criticism is that checking the types at runtime on each inventory. I think that will be more trouble than it's worth. It's OK for now, but when Joel lands that bmc-toolbox
PR, we should use that instead. Getting the slug
from the name
is just a matter of down-casing.
@@ -31,13 +29,27 @@ func NewFleetDBClient(cfg *app.Configuration) (Client, error) { | |||
client.SetToken(cfg.FleetDBToken) | |||
} | |||
|
|||
slugs := make(map[string]*fleetdb.ServerComponentType) | |||
serverComponentTypes, _, err := client.ListServerComponentTypes(ctx, nil) |
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.
We're looking for component type names here, right? If so, we should probably get them from bmc-toolbox/common
. Joel has a PR that should make this easier.
If you need the type-id I'd like to explore that a bit. I want to keep those sorts of details private to FleetDB.
} | ||
} | ||
} | ||
|
||
func TestFetchServerComponents(t *testing.T) { |
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 think going to a compile-time list instead of a runtime one will make this a lot simpler.
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.
Hi Vince,
Can you please help provide more details about it? I am not sure what I need to do here.
By the way, I have verified the latest version of this PR in sandbox(alloy
-> CIS
-> fleetdb
)
* add README * add a client API to fetch server components * add inventory api placeholder functions Add in API endpoints and the beginning of handler functions for converting incoming common.Device objects into FleetDB server records. * Initialize the client library (#6) * initialize the client library * refactor minor * internal fleetdb outline (#9) * Move types ownership to alloy (#11) * fix panic when there's no response (#12) * Convert Alloy Data to Rivets.Server (#16) * type converter * typo * Forward Inventory to FleetDB (#19) * forward inventory to fleetdb * cleanup code * rebase (#20) * use bmc-toolbox component types (#21) * update dependencies --------- Co-authored-by: Alva Zhang <[email protected]>
What does this PR do