Suppose a software group named "swg_1" should be created and after this, a procedure group named "pg_1," which is a subgroup of the already existing software group "swg_1". The following commands create these groups.
cadsmcmd swlibrary action=createGroup name=swg_1
cadsmcmd swlibrary action=createGroup name=pg_1 groupType=PG superGroup=swg_1
To check the creation the following command will list all the software and procedure groups available:
cadsmcmd swlibrary action=listGroups recursive
CA IT Client Manager r12 ITCM Command Line Version 12.8.0.xxxx Copyright (c) 2014 CA. All rights reserved. Trace mode: Off Connecting to manager "<default manager>" as user "<default user>" ... ok. Manager: mymanager Domain: mydomain Domain type: Domain Supporting: CO CCNF USD OSIM ------------------------------------------------------------------------------- List of groups in the software library ------------------------------------------------------------------------------- Software Groups ..Group name...........................: Catalog ....Comment............................: CA-Software Delivery Reserved Group ....Creation date......................: 2005-04-09 11:26 ....Change date........................: 2005-04-09 11:26 ..Group name...........................: Software Delivery ....Comment............................: CA-Software Delivery Reserved Group ....Creation date......................: 2005-04-09 11:26 ....Change date........................: 2005-04-09 11:27 ..Group name...........................: swg_1 ....Comment............................: ....Creation date......................: 2005-04-10 08:51 ....Change date........................: 2003-04-10 09:11 ....Procedure Groups ......Group name.......................: pg_1 ........Comment........................: ........Creation date..................: 2005-04-10 09:11 ........Change date....................: 2005-04-10 09:11 SDCMD<A000000>: OK
Adding the argument "recursive" is important, otherwise the procedure group "pg_1" as a subgroup will not be listed, but only the top level groups.
cadsmcmd swlibrary action=listGroups
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 of groups in the software library ------------------------------------------------------------------------------- Software Groups ..Group name...........................: Catalog ....Comment............................: CA-Software Delivery Reserved Group ....Creation date......................: 2005-04-09 11:26 ....Change date........................: 2005-04-09 11:26 ..Group name...........................: Software Delivery ....Comment............................: CA-Software Delivery Reserved Group ....Creation date......................: 2005-4-09 11:26 ....Change date........................: 200504-09 11:27 ..Group name...........................: swg_1 ....Comment............................: ....Creation date......................: 2005-04-10 08:51 ....Change date........................: 2005-04-10 09:11 SDCMD<A000000>: OK
Now assume that a software group "swg_2" should also be created and a software group "swg_2_1" that is a subgroup of swg_2. Furthermore, another procedure group named pg_2 is needed. The following commands will generate these groups and the intended hierarchy:
cadsmcmd swlibrary action=createGroup name=swg_2 groupType=SWG
cadsmcmd swlibrary action=createGroup name=swg_2_1 superGroup=swg_2
cadsmcmd swlibrary action=createGroup name=pg_2 groupType=PG
Now the recursive list of groups shows the following:
cadsmcmd swlibrary action=listGroups recursive
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 of groups in the software library ------------------------------------------------------------------------------- Software Groups ..Group name...........................: Catalog ....Comment............................: CA-Software Delivery Reserved Group ....Creation date......................: 2005-04-09 11:26 ....Change date........................: 2005-04-09 11:26 ..Group name...........................: Software Delivery ....Comment............................: CA-Software Delivery Reserved Group ....Creation date......................: 2005-04-09 11:26 ....Change date........................: 2005-04-09 11:27 ..Group name...........................: swg_1 ....Comment............................: ....Creation date......................: 2005-04-10 08:51 ....Change date........................: 2005-04-10 09:11 ....Procedure Groups ......Group name.......................: pg_1 ........Comment........................: ........Creation date..................: 2005-04-10 09:11 ........Change date....................: 2005-04-10 09:11 ..Group name...........................: swg_2 ....Comment............................: ....Creation date......................: 2005-04-10 09:28 ....Change date........................: 200504-10 09:28 ....Software Groups ......Group name.......................: swg_2_1 ........Comment........................: ........Creation date..................: 2005-04-10 09:28 ........Change date....................: 2005-04-10 09:28 Procedure Groups ..Group name...........................: pg_2 ....Comment............................: ....Creation date......................: 2005-04-10 09:29 ....Change date........................: 2005-04-10 09:29 SDCMD<A000000>: OK
Copyright © 2014 CA Technologies.
All rights reserved.
|
|