Highlighted
Respected Contributor.
Respected Contributor.
267 views

Can I export only the populated part of the class model?

Is there a way to get the class model like [1] but only for the populated part, namely only types and relations which do exists in the uCMDB?

[1]: https://docs.microfocus.com/UCMDB/11.0/cp-docs/docs/eng/class_model/html/index.html

0 Likes
9 Replies
Highlighted
Micro Focus Expert
Micro Focus Expert

Re: Can I export only the populated part of the class model?

Try to run the JMX method runSupportHandlersForAllCategories and you will get after several minutes (depending on the system load) you will get a file like support_1_2019.05.16-16.30.39.zip

In this file, you will find the file Basic Model Update.properties which will look like:

model.numOfCIsConnectedToNode=271
model.numberOfCIs.ModelNotificationDefinitionImpl=1
model.numberOfCIs.adapter_config=1
model.numberOfCIs.aggregation=11
model.numberOfCIs.application_system=5
model.numberOfCIs.applicationresource=44
model.numberOfCIs.cluster=3
model.numberOfCIs.composition=277
model.numberOfCIs.configuration=12
model.numberOfCIs.configuration_item=747
model.numberOfCIs.configuration_links=2
model.numberOfCIs.containment=134
model.numberOfCIs.cpu=12
model.numberOfCIs.data=1472
model.numberOfCIs.dependency=284

Here you will have a head count for each CIT. You can somehow process this list to parse it for the populated CITs and figure out an RestAPI approach to get those CI and their related CIs.

 

Kind regards,

Bogdan

Kind regards,
Bogdan Mureșan
EMEA CMS Technical Success
0 Likes
Highlighted
Respected Contributor.
Respected Contributor.

Re: Can I export only the populated part of the class model?

So I would need to:

1. extract that file

2. run a query for each type which appear on that file, getting all cis

3. Accumulate all properties and all relations from those cis

Not only sounds that like a lot of work for something which seems to be already (almost) there. It would also lack completly all information about hierarchy of types. Like i get it right now from the class model export.

Thank you for this hint, I'll dig around in that data a bit. But currently this does not look like the right direction for what I need.

0 Likes
Highlighted
Micro Focus Expert
Micro Focus Expert

Re: Can I export only the populated part of the class model?

Yes, it is a lot of work.

Another option would be to use from JMX the method FetchAllDataFromAnotherCmdb but this will bypass recon and you would need to call it for each populated CIT.

Kind regards,
Bogdan Mureșan
EMEA CMS Technical Success
0 Likes
Highlighted
Respected Contributor.
Respected Contributor.

Re: Can I export only the populated part of the class model?

I don't understand how "FetchAllDataFromAnotherCmdb" can help me.

Again I would like to build documentation only for the part of the uCMDB which das contain data.

This means:

* only include CIT for which I have CIs

* only include CIT attributes for which at lest one CI has a non NULL value

* only include relations which do exist

 

I am currently evaluating a way how to do this using the REST API, but I can't see how I can get structural information from the APi.

0 Likes
Highlighted
Micro Focus Expert
Micro Focus Expert

Re: Can I export only the populated part of the class model?

I think you can achieve this via Rest API but I don't have experience on that part of the product.

Kind regards,
Bogdan Mureșan
EMEA CMS Technical Success
0 Likes
Highlighted
Respected Contributor.
Respected Contributor.

Re: Can I export only the populated part of the class model?

as far as I can see, I cant get any information with respect to the class model from the rest api.  At least there is no endpoint in the 2019.2 documentation.

0 Likes
Highlighted
Micro Focus Expert
Micro Focus Expert

Re: Can I export only the populated part of the class model?

What do you mean by endpoint? The CIT IpServiceEndpoint?

Kind regards,
Bogdan Mureșan
EMEA CMS Technical Success
0 Likes
Highlighted
Respected Contributor.
Respected Contributor.

Re: Can I export only the populated part of the class model?

By endpoints I mean the REST endpoints (like get /dataModel/ci/{id})  as documented here [1]. And as far as I can see there are not endpoints related to any class model actions.

[1]: https://docs.microfocus.com/UCMDB/2019.02/ucmdb-docs/docs/eng/APIs/UCMDB_RestAPI/index.html

Highlighted
Micro Focus Expert
Micro Focus Expert

Re: Can I export only the populated part of the class model?

Understood.

That means you need RnD direct help on this one.

Because I'm not an API expert, I would try to approach this via discovery or somehow exporting the data from UCMDB in a format that can be consumed externally.

Kind regards,
Bogdan Mureșan
EMEA CMS Technical Success
0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.