Smarts IP: Can I update or change the community string list using the dmctl tool or an ASL script?
search cancel

Smarts IP: Can I update or change the community string list using the dmctl tool or an ASL script?

book

Article ID: 304343

calendar_today

Updated On:

Products

VMware

Issue/Introduction

Symptoms:


Can I update or change the community string list in Smarts IP using the Smarts dmctl tool?
Can I update or change the community string list in Smarts IP using a Smarts ASL script?



Environment

VMware Smart Assurance - SMARTS

Resolution

You can update or change the community string list in Smarts IP using a Smarts Adapter Script Language (ASL) script, but you cannot do so using the Smarts dmctl tool. The following sections of this Fix statement explain the capabilities and limitations to update or change the community string list in Smarts IP using the Smarts dmctl tool and an ASL script.

Using Smarts dmctl
You cannot create and pass a list object through the command line using the Smarts dmctl command tool. To see why, run getCommunities as follows: 

dmctl -s <AM_DOMAIN> invoke ICF_TopologyManager::ICF-TopologyManager getCommunities
{ "public" }

The above result indicates that the community strings are stored in a list ({} means "public" is a list).  Therefore, you cannot create and pass a list object through the command line using the Smarts dmctl command tool. However, you can use an ASL script as described in the following section.

Using Smarts ASL script setCommunities
You can use setCommunities through an ASL script as in the following example (see Note statement):

  1. updateCommunities.asl
    START {
            .. eol
    }do {
            communityList = list();
            communityList[0]="public";
            communityList[1]="private";
            topoMgr = object("ICF_TopologyManager","ICF-TopologyManager");
            topoMgr->setCommunities(communityList);
    }
     
  2. sm_adapter -s <AM_DOMAIN> ~/scripts/ASL/updateCommunities.asl
     
  3. dmctl -s <AM_DOMAIN> invoke ICF_TopologyManager::ICF-TopologyManager getCommunities
    { "public" "private" }


List objects can also be initialized on create as in the following example:

Instead of using:

    communityList = list();
    communityList[0]="public";
    communityList[1]="private";

You can use the following:

    communityList = list("public", "private");


Additional Information

If you have trouble getting the above ASL examples to work in your environment, contact EMC Support for Smarts and this quote solution ID in your Service Request.