Start a Conversation

Unsolved

This post is more than 5 years old

4410

February 18th, 2009 12:00

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?

53 Posts

February 26th, 2009 15:00

Can you provide an example?

7 Posts

February 26th, 2009 16:00

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

Operations for class DomainConfigHandler:
    clone clone_name
    importConfig cfg importDefault force
    importConfigList cfgList replaceAll force
    importDefaultConfigs cfgList
    exportConfigs doc
    exportFeatureConfig doc feature_instancename config_subtype
    deleteConfig feature_instancename config_subtype
    enableConfig feature_instancename config_subtype
    disableConfig feature_instancename config_subtype
    isConfigEnabled feature_instancename config_subtype
    reconfigure
    setRunning flag
    setPending 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

53 Posts

February 26th, 2009 18:00

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.:

importConfig xmlConfig replaceAll 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

7 Posts

February 27th, 2009 08:00

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.

53 Posts

February 27th, 2009 12:00

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

No Events found!

Top