- OCI = NetApp OnCommand Insight
- CI = NetApp Cloud Insights
I've been looking for a relatively quick and painless way to migrate annotations and applications from OCI to CI. I had limited success with a provided migration tool. Tried the Python and REST API route, and it was too much effort (especially for what is essentially a one off, not to be repeated again event ... and I really need to develop my Python skills more.) And I tried with the OCI-DWH, but the problem there is that the data is not the latest and greatest, and if the ETL fails you're stuck, and it is sometimes subtly transformed. So...
The Easy Way to Migrate Storage Annotations from OCI to CI
Is to connect to the MySQL interface on the operational OCI Server (not the DWH) and query data there, to create an output that you can apply in CI's Annotation Import Utility.
What Object Types are in inventory.object_to_annotation?
SELECT DISTINCT objectType FROM inventory.object_to_annotation;
- Host
- HV_VirtualMachine
- InternalVolume
- Qtree
- Storage
- StorageNode
- StoragePool
- Switch
- Volume
What Annotation Types (Annotation Names) Do We Have On Our Storage?
This is going to be dependent on customer, but to get the list run:
SELECT DISTINCT annotationType FROM inventory.object_to_annotation WHERE objectType = 'Storage';
Getting Storage Tier Annotation from OCI to CI
Say we want to get our Tier annotation for our storages, then we would simply collect the output of:
SELECT
'Storage' AS 'ObjectType',
s.name AS 'Storage',
a.valueIdentifier AS 'Tier'
FROM inventory.object_to_annotation AS o
JOIN inventory.annotation_value AS a ON a.id = o.annotationValueId
JOIN inventory.storage AS s ON s.id = o.objectId
WHERE o.objectType = 'Storage'
AND o.annotationType = 'Tier'
Edit with a text editor the top line to:
,,Tier
And then simply upload to CI via the Swagger UI and API:
/assets/import
Say we want to get our Country annotation for our switches, then we would simply collect the CSV output (using something like MySQL Workbench) of:
SELECT
'Switch' AS 'ObjectType',
s.name AS 'Switch',
a.valueIdentifier AS 'Country'
FROM inventory.object_to_annotation AS o
JOIN inventory.annotation_value AS a ON a.id = o.annotationValueId
JOIN inventory.storage AS s ON s.id = o.objectId
WHERE o.objectType = 'Switch'
AND o.annotationType = Country'
Edit with a text editor the top line to:
,,Country
And then simply upload to CI via the Swagger UI and API:
/assets/import
And if you wanted to know what annotations are available for switch then it is simply:
SELECT DISTINCT annotationType FROM inventory.object_to_annotation WHERE objectType = 'Switch';
Comments
Post a Comment