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

add cani schema check during import and warn of mismatches #87

Merged
merged 3 commits into from
Jul 10, 2023

Conversation

jacobsalmela
Copy link
Collaborator

@jacobsalmela jacobsalmela commented Jul 5, 2023

Summary and Scope

  • warns of schema mistmatch when importing during a session

Risks and Mitigations

Shows a warning when the schema version defined in the cani datastore does not match that of a piece of hardware being imported (I arbitrarily changed the cani schema version for this test)

go run main.go alpha session import                                                                                                                                                                                                                                                               11:24
11:24AM INF Session is STOPPED
11:24AM INF Committing changes to session
2023/07/05 11:24:57 [DEBUG] GET https://localhost:8443/apis/sls/v1/dumpstate
2023/07/05 11:24:57 [DEBUG] GET https://localhost:8443/apis/smd/hsm/v2/State/Components
2023/07/05 11:24:57 [DEBUG] GET https://localhost:8443/apis/smd/hsm/v2/Inventory/Hardware
11:24AM INF Cabinet x1000 (System:0->Cabinet:1000) exists in datastore with ID (fa7be1c0-7bbc-4578-9d1b-41ad7d5e2f0b)
11:24AM WRN Schema mismatch: expected v1beta1 but found v1alpha1 for SLS Cabinet x1000 (fa7be1c0-7bbc-4578-9d1b-41ad7d5e2f0b)
11:24AM WRN Schema mismatch: expected v1beta1 but found v1alpha1 for SLS Chassis x1000c4 (ef3c9029-d1e5-4c61-bffa-e4fceb828d39)
11:24AM WRN Schema mismatch: expected v1beta1 but found v1alpha1 for SLS Chassis x1000c7 (f46129d1-9183-471f-83fe-0c83de2f5d52)
11:24AM WRN Schema mismatch: expected v1beta1 but found v1alpha1 for SLS Chassis x1000c0 (a05b25dc-a009-40b3-a4f8-6bf3cd10c791)
11:24AM WRN Schema mismatch: expected v1beta1 but found v1alpha1 for SLS Chassis x1000c3 (8a924ebf-c80d-496f-9e8e-9c78a9dd511c)
11:24AM WRN Schema mismatch: expected v1beta1 but found v1alpha1 for SLS Chassis x1000c1 (6a8df08a-dd7e-469b-aa17-565832eb6df5)
11:24AM WRN Schema mismatch: expected v1beta1 but found v1alpha1 for SLS Chassis x1000c5 (4d649928-ed87-4e71-b3f2-2b4ddb9c9925)
11:24AM WRN Schema mismatch: expected v1beta1 but found v1alpha1 for SLS Chassis x1000c6 (b0fd9f78-b230-4ea5-ba3a-0b4931dd2c5d)
11:24AM WRN Schema mismatch: expected v1beta1 but found v1alpha1 for SLS Chassis x1000c2 (78de259d-4568-4cc3-b7cb-b213230e7bcd)
11:24AM WRN Schema mismatch: expected v1beta1 but found v1alpha1 for SLS ChassisManagementModule x1000c5b0 (ae579a09-54f9-4ab6-8ede-27eec5bc1e22)
11:24AM WRN Schema mismatch: expected v1beta1 but found v1alpha1 for SLS ChassisManagementModule x1000c0b0 (3d046e65-e52d-4f55-9d1c-3e2989832642)
11:24AM WRN Schema mismatch: expected v1beta1 but found v1alpha1 for SLS ChassisManagementModule x1000c3b0 (aa66b115-79bd-4e3a-a23e-594cd26a3e9b)
11:24AM WRN Schema mismatch: expected v1beta1 but found v1alpha1 for SLS ChassisManagementModule x1000c4b0 (000a7859-1b47-4e84-baf9-e8356080a624)
11:24AM WRN Schema mismatch: expected v1beta1 but found v1alpha1 for SLS ChassisManagementModule x1000c1b0 (d4fd028a-726c-4a7e-8461-e32c5c4a2bfd)
11:24AM WRN Schema mismatch: expected v1beta1 but found v1alpha1 for SLS ChassisManagementModule x1000c2b0 (ca585c0e-071a-4e1a-9f88-ca2160110ccc)
11:24AM WRN Schema mismatch: expected v1beta1 but found v1alpha1 for SLS ChassisManagementModule x1000c7b0 (5daa66ac-c30a-4210-ac37-782185267ac8)
11:24AM WRN Schema mismatch: expected v1beta1 but found v1alpha1 for SLS ChassisManagementModule x1000c6b0 (5264812d-b06e-46e7-afff-1f290945ceee)

@jacobsalmela jacobsalmela self-assigned this Jul 5, 2023
@jacobsalmela jacobsalmela force-pushed the fond-darwin branch 2 times, most recently from dbb4711 to 61664a4 Compare July 5, 2023 16:29
Signed-off-by: Jacob Salmela <jacob.salmela@hpe.com>
Signed-off-by: Jacob Salmela <jacob.salmela@hpe.com>
Signed-off-by: Jacob Salmela <jacob.salmela@hpe.com>
@jacobsalmela jacobsalmela marked this pull request as ready for review July 5, 2023 18:22
@jacobsalmela jacobsalmela merged commit b937d5c into main Jul 10, 2023
5 checks passed
@jacobsalmela jacobsalmela deleted the fond-darwin branch July 10, 2023 17:23
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