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?
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 dmctlYou 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 setCommunitiesYou can use setCommunities through an ASL script as in the following example (see Note statement):updateCommunities.aslSTART { .. eol}do { communityList = list(); communityList[0]="public"; communityList[1]="private"; topoMgr = object("ICF_TopologyManager","ICF-TopologyManager"); topoMgr->setCommunities(communityList);} sm_adapter -s <AM_DOMAIN> ~/scripts/ASL/updateCommunities.asl 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");
Related 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.