All Supported Smarts versions
You can manage the access ports so that the object will be explicitly managed and the Smarts IP post-processing code will not unmanage it again. This is achieved by putting the following code into your custom post processing file i.e custom-end-post.asl, calling the manage() function with overwrite parameter set to True:
START { ..eol } do { foreach PortName (getInstances("Port")) { PortObj = object(PortName); PortObj->manage(); print("Port state set to Manage ->".PortObj->ManagedState); } }
Similar logic can be used for any instance within Smarts.
Another Example to unmanage IP addresses that end in .254:
START {
.. eol
} do {
if (nodeObj->CreationClassName == "Router" ){
foreach IP (nodeObj->getIPs()) {
IPObj = object(IP);
if ( !IPObj->isNull() && glob("<1-255>.<0-255>.<0-255>.254", IPObj->Address) && IPObj->IsManaged ) {
IPObj->unmanage();
if ( DEBUG ) { print(me . " Support:". IPObj->Address . " is now unmanaged"); }
}
}
}
stop();
}This workaround would be classified as a customization, and hence please evaluate and test this on UAT/Test environment before introducing this on to the Production environment.