8 Replies Latest reply on Dec 9, 2013 7:49 PM by Bill Robinson

    Automating Patch Catalog & Patch Catalog Smart Group Creation

    David Crim

      Is it possible to automate the creation of Red Hat and Windows patch catalogs and patch catalog smart groups using BLCLI?  There are sample patch catalog & patch catalog smart groups created when I execute the blcontent script to import the sample data, but I believe that it using Java.


      I thought I was on the right track with creating a patch catalog smart group when I found the invoked commands for SmartDepotGroup.createGroup.  I attempted the following, but keep encountering an error on NAMED_OBJECT input (I'm not exactly sure how to use it):


      blcli_execute Group getGroupByQualifiedName 5022 "/Patch Catalog/Windows Patch Catalog"

      blcli_storeenv pgObject

      blcli_execute Condition createPropertyCondition "Class://SystemObject/Depot Object/HotFix" NAME contains "MSRT"

      blcli_storeenv conditionObject

      blcli_execute SmartGroup createSmartGroupWithTypeId 5017 "Patch BlackList" "Patch BlackList" NAMED_OBJECT=pgObject NAMED_OBJECT=conditionObject

      blcli_storeenv groupObject

      blcli_execute SmartGroup save NAMED_OBJECT=groupObject

      blcli_execute Group getDBKey


      Command execution failed. com.bladelogic.om.infra.cli.factory.CommandNotFoundException: Found command 'SmartGroup.createSmartGroupWithTypeId' but with mismatching arguments. : java.lang.IllegalArgumentException: Input 'NAMED_OBJECT=pgObject' cannot be converted to expected type : interface com.bladelogic.om.infra.model.group.Group


      In case it makes a difference, I am using BladeLogic