1 Reply Latest reply on Jul 14, 2010 10:56 AM by Bill Robinson

    Create Smart Groups under Patch Catalog via blcli

    Richard Mason

      We are trying to add a very large number of patch conditions to a number of patch catalog smart groups, using a script which invokes the blcli command
      The issue we have is that the blcli addCondition command is not recognising the smart group IF it resides under a patch catalogue

      Depot - Patch_Depots (folder) - Windows_2003_Catalogue (Windows patch catalog) - Windows 2003 Base Policy (patch catalog smart group)

      blcli command:-
      blcli  SmartDepotGroup  addCondition "/Patch_Depots/Windows_2003_Catalogue/Windows 2003 Base Policy"  "Class://SystemObject/Depot Object/Software/Windows Bulletin"  name  "equals"  "MS03-023"

      This produces the following error:-
      Command execution failed. Could not find group with name : /Patch_Depots/Windows_2003_Catalogue/Windows 2003 Base Policy  and type 5012

      However, if the patch catalog smart group "Windows 2003 Base Policy" is NOT under the Windows_2003_Catalogue object then the command works and we are able to add conditions using blcli


      We have tried with and without spaces etc.


      Any one done this previously/any suggestions as to how we can achieve this?


      Thanks in Advance

        • 1. Re: Create Smart Groups under Patch Catalog via blcli
          Bill Robinson

          I think you want to use the generic SmartGroup commands


          So Smart*Group addCondition runs these commands:






          So try running this (using unreleased commands here, so you need to use the 'performance commands'):


          blcli_execute Condition createPropertyCondition "Class://SystemObject/Depot Object/Software/Windows Bulletin"  name "equals" "MS03-023"

          blcli_execute Utility storeTargetObject conditionObject

          blcli_execute Group getGroupByQualifiedName 5017 "/Patch_Depots/Windows_2003_Catalogue/Windows 2003 Base Policy"

          blcli_execute Utility storeTargetObject gObject

          blcli_execute SmartGroup addCondition NAMED_OBJECT=gObject NAMED_OBJECT=conditionObject

          blcli_execute Group getDBKey


          if that works we can write a custom xml file for this and a rfe.  The id # for the group types are below (and on the wiki):





          1 of 1 people found this helpful