Smarts: Is there a way to call the "findInstances" method from an ASL script?
search cancel

Smarts: Is there a way to call the "findInstances" method from an ASL script?

book

Article ID: 327647

calendar_today

Updated On:

Products

VMware

Issue/Introduction

Symptoms:


Is there a way to call the findInstances method from a Smarts ASL script?


Environment

VMware Smart Assurance - SMARTS

Resolution

No. The findInstances method cannot be called directly from within an ASL script. Other mechanisms such as APIs and Smarts dmctl directly implement the remote API and expose it as-is, but ASL does not function in the same way. In the future, Smarts may add functionality like this as model operations which could be called from ASL. In the mean time, you can use something like the following to get this information:

default objClass = "ICIM_ManagedElement";
default classPattern = "ICS_Notification";
default instancePattern = "*KeepAlive";

START {
   ..eol
} do {
   foreach instanceName (getInstances(objClass)) {
      obj = object(instanceName);
      className = obj->CreationClassName;
      if (glob(classPattern, className) && glob(instancePattern, instanceName)) {
         print(className."::".instanceName);
      }
   }
}

If you desire this functionality, you can submit an enchancement request on Powerlink at the following location:

Home > Support > Request Support > Request a Product Enhancement