1 2 3 Previous Next 44 Replies Latest reply on Dec 4, 2013 11:00 AM by Antonio Caputo
      • 1. blcli in 8.1 for for smart group in catalog
        Bill Robinson

        This should work.  you can get the typeId from https://communities.bmc.com/communities/docs/DOC-12303

         

        blcli_execute Group getGroupByQualifiedName <catalog>

        blcli_execute Utility storeTargetObject pgObj

        blcli_execute Condition createPropertyCondition <propClassName> <propName> <operator> <propValue>

        blcli_execute Utility storeTargetObject conditionObj

        blcli_execute SmartGroup createSmartGroupWithTypeId <typeId> <groupName> <desc> NAMED_OBJECT=pgObj NAMED_OBJECT=conditionObj

        blcli_execute Utility storeTargetObject groupObj

        blcli_execute SmartGroup save NAMED_OBJECT=groupObj

        blcli_execute Group getDBKey

        1 of 1 people found this helpful
        • 2. Re: blcli in 8.1 for for smart group in catalog
          Soundappan Shanmugam

          Bill the purpouse is not yet solved. I need to create a smartgroup on top of a patch catalog.. Please help me in getting that done

           

          ___

          Cheers…

          Soundappan Shanmugam

          Cross Functional Services - Service Automation | Bladelogic-Operations | mobile: +91 9711156098 | email: soundappans@hcl.com<mailto:soundappans@hcl.com> |

          • 3. Re: blcli in 8.1 for for smart group in catalog
            Bill Robinson

            did you try to run what i posted?  did it work? was there an error?

            • 4. blcli in 8.1 for for smart group in catalog

              Hi Bill,

               

              blcli -v defaultProfile -r BLAdmins Group getGroupByQualifiedName 5022 "/aa/
              aa12"
              executing above command where "aa" is depot folder and "aa12" is a windows patch catalog under the "aa" but getting below error:

              Unknown command : name space = 'Group', command = 'getGroupByQualifiedName'.com.
              bladelogic.om.infra.cli.factory.CommandNotFoundException: R: Cannot find command
              : Group, getGroupByQualifiedName
              10% blcli -v defaultProfile -r BLAdmins Group getGroupByQualifiedName 5022 "/Pat
              ch Catalog/Windows Patch Catalog/aa12"
              Unknown command : name space = 'Group', command = 'getGroupByQualifiedName'.com.
              bladelogic.om.infra.cli.factory.CommandNotFoundException: R: Cannot find command
              : Group, getGroupByQualifiedName

               

              Thanks,

               

              Sushil

              • 5. Re: blcli in 8.1 for for smart group in catalog
                Bill Robinson

                You need to use the ‘performance commands’ – eg blcli_execute, not the normal blcli.

                • 6. blcli in 8.1 for for smart group in catalog

                  Bill,

                  Now I am using peroformance command and upto line "

                  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

                   

                  it is working fine.

                  but on line  :

                   

                  blcli_execute SmartGroup createSmartGroupWithTypeId 5017 "Patch BlackList" "Patch BlackList"

                   

                  (in my case it is :blcli_execute SmartGroup createSmartGroupWithTypeId 5017 "/aa/aa12" "sushils

                  martgroup")

                  Command execution failed. com.bladelogic.om.infra.cli.factory.CommandNotFoundExc

                  eption: Found command 'SmartGroup.createSmartGroupWithTypeId' but with mismatchi

                  ng arguments. : java.lang.IllegalArgumentException: Wrong number of arguments pr

                  ovided to method : createSmartGroupWithTypeId expected : 5 received : 3

                   

                  Thanks,

                   

                  SUSHIL

                  • 7. blcli in 8.1 for for smart group in catalog

                    Can someone tell me the 5 arguments that is requred to supply to below blcli command :

                     

                    blcli_execute SmartGroup createSmartGroupWithTypeId

                     

                    It is urgent.

                     

                    Thanks in advance !!

                    Sushil

                    • 8. blcli in 8.1 for for smart group in catalog
                      Bill Robinson

                      You are not using the right commands.

                       

                      blcli_storeenv conditionObject is not the same as blcli_execute Utility storeTargetObject <obj>

                       

                      i just ran exactly this sequence of commands and created the smart patch group:

                       

                      blcli_execute Group getGroupByQualifiedName <catalog>

                      blcli_execute Utility storeTargetObject pgObj

                      blcli_execute Condition createPropertyCondition <propClassName> <propName> <operator> <propValue>

                      blcli_execute Utility storeTargetObject conditionObj

                      blcli_execute SmartGroup createSmartGroupWithTypeId <typeId> <groupName> <desc> NAMED_OBJECT=pgObj NAMED_OBJECT=conditionObj

                      blcli_execute Utility storeTargetObject groupObj

                      blcli_execute SmartGroup save NAMED_OBJECT=groupObj

                      blcli_execute Group getDBKey

                       

                      please make sure you are using the same sequence and exact commands.  anything here in < > is a placeholder for actual input.

                      • 9. Re: blcli in 8.1 for for smart group in catalog

                        I don’t see any <> in the given script..

                         

                        Please give me an example script and let me know the details asap as this is on high demand ..

                        • 10. Re: blcli in 8.1 for for smart group in catalog

                          And kindly let me know the aruuments for the below

                           

                          blcli_execute SmartGroup createSmartGroupWithTypeId

                          • 11. Re: blcli in 8.1 for for smart group in catalog
                            Soundappan Shanmugam

                            Bill even giving more details in this

                             

                             

                             

                            Used below command to create patch catalog smart group :

                             

                             

                            blcli -v defaultProfile -r BLAdmins SmartDepotGroup  createGroup /aa june_hotfixes "XYZ" "Class://SystemObject/Depot Object/Software/Win Depot Software/HotFix" NAME "contains" "111"

                             

                            above command creating “patch catalog smart group” with name “june_hotfixes” under depot folder /aa.

                             

                            Our requirement is to create this “patch catalog smart group” under some existing  “patch catalog”.

                             

                            We tried below blcli commands for this purpose :

                            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

                             

                            and upto line :

                            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

                             

                            it is working fine.

                             

                            but on line  :

                             

                            blcli_execute SmartGroup createSmartGroupWithTypeId 5017 "Patch BlackList" "Patch BlackList"

                             

                            getting below error:

                             

                                           Command execution failed. com.bladelogic.om.infra.cli.factory.CommandNotFoundExc

                            eption: Found command 'SmartGroup.createSmartGroupWithTypeId' but with mismatchi

                            ng arguments. : java.lang.IllegalArgumentException: Wrong number of arguments pr

                            ovided to method : createSmartGroupWithTypeId expected : 5 received : 3

                             

                             

                            5017 is typeid

                            Patch BlackList groupname

                            Patch BlackList is description

                             

                             

                            ___

                            Cheers…

                            Soundappan Shanmugam

                            1 of 1 people found this helpful
                            • 12. Re: blcli in 8.1 for for smart group in catalog
                              Bill Robinson

                              this is one line:

                               

                               

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

                               

                              you are passing <groupTypeId> <name of group> <group description> <parentgroup object> <condition object>

                              • 13. Re: blcli in 8.1 for for smart group in catalog

                                Thank you very much Bill for your prompt responses on this thread.It worked fine for me.

                                 

                                Now is it possible  to add more than one property condition with the patch catalog smart group that we are creating here??

                                 

                                Thanks sushil

                                • 14. Re: blcli in 8.1 for for smart group in catalog
                                  Bill Robinson

                                  blcli_execute Group getGroupByQualifiedName <smartGroup>

                                  blcli_execute Utility storeTargetObject groupObj

                                  blcli_execute Condition createPropertyCondition <propClassName> <propName> <operator> <propValue>

                                  blcli_execute Utility storeTargetObject conditionObj

                                  blcli_execute SmartGroup addCondition NAMED_OBJECT=groupObj NAMED_OBJECT=conditionObj

                                  blcli_execute SmartGroup save NAMED_OBJECT=groupObj

                                  blcli_execute Group getDBKey

                                   

                                  will do it i think.

                                  1 2 3 Previous Next