alicia2
1 Copper

dmctl Type Codes

Some operations that can be invoked on classes using the dmctl have arguments of the type unknown, or -1. Are these operations only for internal Smarts use, or is there a special parameter or argument to use in these cases instead?

Tags (1)
0 Kudos
5 Replies
TCorcoran
2 Iron

Re: dmctl Type Codes

Can you provide an example?

0 Kudos
alicia2
1 Copper

Re: dmctl Type Codes

For example, I would like to use the functions in the handler classes, such as DomainConfigHandler.

Operations for class DomainConfigHandler:
    <object> clone <string>clone_name
    <boolean> importConfig <unknown>cfg <boolean>importDefault <boolean>force
    <boolean> importConfigList <unknown>cfgList <boolean>replaceAll <boolean>force
    <boolean> importDefaultConfigs <unknown>cfgList
    <boolean> exportConfigs <unknown>doc
    <boolean> exportFeatureConfig <unknown>doc <string>feature_instancename <string>config_subtype
    <boolean> deleteConfig <string>feature_instancename <string>config_subtype
    <boolean> enableConfig <string>feature_instancename <string>config_subtype
    <boolean> disableConfig <string>feature_instancename <string>config_subtype
    <boolean> isConfigEnabled <string>feature_instancename <string>config_subtype
    <string> reconfigure
    <void> setRunning <boolean>flag
    <void> setPending <boolean>flag

I am able to use enableConfig and disableConfig, but cannot get things such as importConfig to work. Ideally, I would like to configure things such as Domains and Escalation Policies through a Perl script using the API, rather than importing configurations from an XML file using sm_config. Any suggestions would be appreciated. 

Thanks,

Alicia

0 Kudos
TCorcoran
2 Iron

Re: dmctl Type Codes

Yeah, my guess is that those are defunct, deprecated, or otherwise unuseable operations. I believe the operations you are looking for are more applicable in the ICS_ConfigurationManager class.

In particular you can use the following operation to "import" dynamically created XML configurations from within a script.:

<boolean> importConfig <string>xmlConfig <boolean>replaceAll <boolean>force

You can look at the icoi-init.asl script installed in SAM for some very basic usage with the IMPORT_CONFIGURATION rule.

---

IMPORT_CONFIGURATION
{
    local importStatus;
    local result;

    do{
        configurationManager = object( "ICS_ConfigurationManager", "ICS-ConfigurationManager" );
        configurationManager->config = policy->config;
    }
    { {configurationManager->isNull() } { SHUTDOWN } }?
    do{
        importStatus = configurationManager->importDefaultConfigFromFile( default_conf_file ) ? LOG, FAIL;
        if (importStatus) {
            domainConfigHandler = object("DomainConfigHandler",
                                         "Domain-ConfigHandler");
            result = domainConfigHandler->reconfigure() ? LOG, FAIL;
            smsystem->logWarning("ICS_ERECONFIGURERESULT",
                                 aslName,
                                 result);
        }
    }
    { {importStatus == FALSE } { SHUTDOWN } }?
}

- TC

0 Kudos
Highlighted
alicia2
1 Copper

Re: dmctl Type Codes

Thanks, that looks helpful.

Also, do you know if there is a way to configure the broker, other than through brcontrol? I know services connect automatically to their default broker, but we also are trying to have a second broker for presentation, in which we maintain static entries.

0 Kudos
TCorcoran
2 Iron

Re: dmctl Type Codes

I have never seen this done in any class operation, nor any ASL script.

If you are using PERL I think I would just utilize back ticks or the system dunction to work with brcontrol.

- TC

0 Kudos