Smarts sm_config using ASL

I have sometimes worked on distributed EMC Smarts (aka IONIX) deployments where the sm_config command is used to configure the SAM or OI domains, but where the files that they need to load are located or generated on different physical platforms to the one hosting the target domain.

This scenario poses a problem because of the way sm_config's "import" command works. It instructs the SAM (or OI) to read the named configuration file from the domain's own file system, not the file system of the platform invoking the sm_config command. This in turn means that you need to copy the file over before invoking the command.

Well - actually: no you don't. ASL comes to our aid.

This very small ASL script will get round that issue nicely. It reads the configuration file from the file system it is invoked on and passes the file's contents (not it's name) over to SAM as an argument to the "importConfig" API call.This works whether or not SAM is running on the same platform as where the script is executed from.

START { xml: rep( .. eol) } do {
manager = object("ICS-ConfigurationManager");
replace = FALSE;
force = FALSE;
manager->importConfig(xml, replace, force);
}

This script is invoked using the sm_adapter command, like this..

sm_adapter -s SAM_DOMAIN_NAME -f CONFIG_FILE_PATH.xml SCRIPT_NAME.asl

 

Scroll to Top