Previous Topic: removeGroupFromSWG—Remove Group from Software GroupNext Topic: Catalog Group Management


removeItemFromSWG—Remove Item from Software Group

This action removes products from a software group.

This action has the following format:

swLibrary action=removeItemFromSWG
name=software_group_name
{item=item_name 
version=item_version |
{itemList=(item_name/item_version)}}
item

Specifies the name of the item to be removed.

itemList

Specifies an item, identified by the pair (itemname itemversion), to be removed from the software group.

This parameter could be coded more than once to create a list of items to be removed.

Because the slash ("/") is used as a delimiter, the item name or item version containing slashes should be enclosed in quotes (").

name

Specifies the name of a software group from which the item will be removed.

version

Specifies the version of the item to be removed.

Notes: There are two possibilities to code an item to be removed. The first is by using the parameters item and version, the other by using the parameter itemList. Both formats should not be mixed in the command, but at least one of them should be used.

Removing an item from a software group does not mean that the item is deleted from the software library. Other assignments to other software groups remain unchanged. Using the itemList parameter at the batch or at the command-line interface and if an item name or an item version contains any slashes you have to duplicate the slashes in the item name or version.

If the itemList parameter contains any blanks enclose it in quotes ("). (This holds for command line or batch usage).

Examples

cadsmcmd swlibrary action=listSWG name=swg_1
CA IT Client Manager r12
ITCM Command Line Version 12.8.0.xxxx
Copyright (c) 2014 CA. All rights reserved.
Trace mode: FILE
Trace file name: C:\ProgramFiles\CA\DSM\SD\..\logs\cadsmcmd.log
Connecting to manager "<default manager>" as user "<default user>" ...OK.
Manager:mymanager
Domain:mydomain
Domain type:Domain
Supporting: CO CCNF USD OSIM AM
-------------------------------------------------------------------------------
List members of software group "swg_1" 
-------------------------------------------------------------------------------
tstbase 1.0 <Generic>, <Regular>, 22622(0), CA, http://supportconnect.ca.com/
tstkpk01 1.0 <Generic>, <Regular>, 22752(0), CA, http://supportconnect.ca.com/
tstkpk02 1.0 <Generic>, <Regular>, 22832(0), CA, http://supportconnect.ca.com/
tstkpk03 1.0 <Generic>, <Regular>, 22962(0), CA, http://supportconnect.ca.com/
pg_1 <Procedure group>
SDCMD<A000000>: OK

cadsmcmd swlibrary action=listPG name=pg_1
CA IT Client Manager r12
ITCM Command Line Version 12.8.0.xxxx
Copyright (c) 2014 CA. All rights reserved.

Connecting to manager "kkkkk01b" as user "<default user>" ...OK.

-------------------------------------------------------------------------------
List members of procedure group "pg_1" 
-------------------------------------------------------------------------------
inst (tstbase 1.0 <1>)
inst (tstkpk03 1.0 <2>)
SDCMD<A000000>: OK

The entry of tstkpk03 is obsolete and should be removed. To perform this action, use the following command:

cadsmcmd swlibrary action=removeItemFromSWG name=swg_1 item=tstkpk03 version=1.0

The removal does not mean that the item tstkpk03 is deleted from the software library. It is still available at "All Software" and at all other groups where it has been assigned. It is just removed from the group swg_1.

If, besides tstkpk03, the entry tstbase should also be removed, then the following command lets you remove both entries by one call:

cadsmcmd swlibrary action=removeItemFromSWG name=swg_1 itemList=(tstbase/1.0) itemList=("tstkpk03" /"1.0")

Now consider a product named "DMS Editor" of Version 6.01.0000 that should be added to the group. The following command performs the assignment:

cadsmcmd swlibrary action=addItemToSWG name=swg_1 item="DMS Editor" version=6.01.0000

If another product should be added (for example, "DMS Interpreter" of Version 6.01.0000), this action can be done by the following command in one call:

cadsmcmd swlibrary action=addItemToSWG name=swg_1 itemList=("DMS Editor" /6.01.0000) itemList=("DMS Interpreter" /6.01.0000) 

The group now has the following contents:

cadsmcmd swlibrary action=listSWG name=swg_1
CA IT Client Manager r12
ITCM Command Line Version 12.8.0.xxxx
Copyright (c) 2014 CA. All rights reserved.
Connecting to manager "kkkkk01b" as user "<default user>" ...OK.
-------------------------------------------------------------------------------
List members of software group "swg_1" 
-------------------------------------------------------------------------------
tstbase 1.0 <Generic>, <Regular>, 22622(0), CA, http://supportconnect.ca.com/
tstkpk01 1.0 <Generic>, <Regular>, 22752(0), CA, http://supportconnect.ca.com/
tstkpk02 1.0 <Generic>, <Regular>, 22832(0), CA, http://supportconnect.ca.com/
DMS Editor 6.01.0000 <MSI>, <Regular>, 22972(0), CA http://supportconnect.ca.com/
pg_1 <Procedure group>
SDCMD<A000000>: OK
cadsmcmd swlibrary action=listPG name=pg_1
CA IT Client Manager r12
ITCM Command Line Version 12.8.0.xxxx
Copyright (c) 2014 CA. All rights reserved.
Connecting to manager "kkkkk01b" as user "<default user>" ...OK.
-------------------------------------------------------------------------------
List members of procedure group "pg_1" 
-------------------------------------------------------------------------------
inst (tstbase 1.0 <1>)
inst (tstkpk03 1.0 <2>)
SDCMD<A000000>: OK