Import Inventory Data From An External Provider
A common starting point when working with inventory data is to import it into cani
, manipulating it, and pushing the updated data back.
Import From A Provider
In this example, a session is started with the CSM provider, and data is imported from SLS.
Note: This example uses -k (insecure), which is not recommended, but is available for this alpha release
# example: starting a session and importing the data
cani alpha session init csm \
--csm-keycloak-username username \
--csm-keycloak-password password \
--csm-api-host api-gw-service-nmn.local
Injected Metadata
For the CSM provider, cani
metadata is injected when the session is stopped.
"ExtraProperties": {
"@cani.id": "ebb15e9a-f418-408c-8315-601483f3b279",
"@cani.lastModified": "2023-07-03 18:24:29.12421 +0000 UTC",
"@cani.slsSchemaVersion": "v1alpha1",
}
Since SLS can accept any arbitrary data, this allows cani
to check if the data is compliant with a specific version of the schema.