VMware Cloud Community
FarasDewal
Contributor
Contributor

Removing/ Hiding resource instance

Hi,

I am developing an embedded adapter using the vC-Ops Adapter API (version 5.7.1).

While developing the adapter, I am looking for a way to remove or hide a resource instance from my custom relationship widget.

The removal logic depends on a metric value calculated for the resource.

What could be the best way to remove a resource using the adapter API.

Any help is highly appreciated.

Thanks & Regards,

Faras Mohan Dewal

Reply
0 Kudos
4 Replies
mark_j
Virtuoso
Virtuoso

You could retrieve the metric data for the resource with the http post adapter, which would then evaluate that metric against a specific hard threshold/value and possibly delete the resource OR assign/unassign to a tag for use in filtering widgets. For instances where you cannot filter a widget by tag, you have less choice in how you handle it and may choose to either view it or deleted the resource. Depending on the resource and the metrics you're viewing with the custom relationship widget, you may be able to accomplish those by using HT/KPIs and filtering the custom rel widget by health/badge color (elim 'red' colored resources).

So, couple different ways to look at this situation depending what you want to accomplish.

If you find this or any other answer useful please mark the answer as correct or helpful.
Reply
0 Kudos
FarasDewal
Contributor
Contributor

Hi Mark,

Thanks for the prompt reply.

Allow me to quickly elaborate on my situation please. I am using a back-end functionality to provide resources and metric data to my embedded adapter.

The back-end functionality filters my resources based on the resource data and does not provide resource instances which do not full-fill certain criteria.

As of now, I have the requirement to delete any such resource instances which at an earlier point in time were being provided to the adapter but now no longer fit the criteria.

Your suggestions are welcome.

Thanks & Regards,

Faras

Reply
0 Kudos
mark_j
Virtuoso
Virtuoso

That scenario would depend on if the API you're using allows you delete resources from the vC Ops inventory.

If you find this or any other answer useful please mark the answer as correct or helpful.
Reply
0 Kudos
FarasDewal
Contributor
Contributor

Hi Mark,

Thanks for the reply.

I am currently using the API version 5.7.1.

Please let me know if it is possible to delete resources from the vC Ops inventory for the said version.

Thanks & Regards,

Faras Mohan Dewal

Reply
0 Kudos