6 Replies Latest reply on Apr 30, 2014 6:18 PM by Bill Robinson

    Defined groupStringType values

    Javier del Valle Fernandez

      Hello,

       

      I'm trying to use the Bladelogic BSA function 'Group.createGroupWithParentName' which has the following arguments acording to the documentation:

      Variable NameVariable TypeDescription
      groupStringTypeStringNo description available
      parentGroupTypeIntegerNo description available
      groupNameStringNo description available
      parentGroupNameStringNo description available

       

      I have been able to obtain the definirions for 'parentGroupType', but I'm unable to find the definitions for the 'groupStringType' that matches each of the parentGroupType. I'm specially interested on Component, Groups, Component Templates Folders, Depot Folders and Job Folders.

       

      For reference, here is the complete list of groupType i have found in the documentation (8.2). I must also say that not all of them are correct, at least whenever I use the 5009 (COMPONENT_TEMPLATE_GROUP) Bladelogic returns:

      # blcli_execute Group groupExistsByTypeAndName 5009 /prueba

      Command execution failed. com.bladelogic.om.infra.mfw.util.BlException: Unexpected exception while handling request.com.bladelogic.om.infra.app.api.GroupService_groupExistsByTypeAndName(int, java.lang.String): java.lang.RuntimeException: this should not happen : we don't have a db type for group type 5009

       

      The complete list extracted from the blcli help Group.html page. In bold the ones I need now:

      • DEPOT_GROUP = 5001
      • STATIC_SERVER_GROUP = 5003
      • SERVER = 5004
      • JOB_GROUP = 5005
      • SMART_JOB_GROUP = 5006
      • SMART_SERVER_GROUP = 5007
      • TEMPLATE_GROUP = 5008
      • COMPONENT_TEMPLATE_GROUP = 5009
      • MSPATCH_MODEL_GROUP = 5010
      • SMART_DEPOT_GROUP = 5012
      • STATIC_COMPONENT_GROUP = 5014
      • SMART_COMPONENT_GROUP = 5015
      • SMART_TEMPLATE_GROUP = 5016
      • SMART_WINDOWS_PATCH_CATALOG_GROUP = 5017
      • SMART_REDHAT_PATCH_CATALOG_GROUP = 5018
      • SMART_SOLARIS_PATCH_CATALOG_GROUP = 5019
      • RED_HAT_CATALOG_GROUP = 5020
      • SOLARIS_CATALOG_GROUP = 5021
      • WINDOWS_CATALOG_GROUP = 5022
      • SMART_AIX_PATCH_CATALOG_GROUP = 5046
      • SMART_OTHER_LINUX_PATCH_CATALOG_GROUP = 5024
      • SYSTEM_PACKAGE_GROUP = 5025
      • OS_COMPONENT_GROUP = 5027
      • SMART_PM_DEVICE_GROUP = 5044
      • COMPLIANCE_RULE_GROUP = 5205
      • SMART_PM_DEVICE_GROUP = 5044
      • OTHER_LINUX_CATALOG_GROUP = 7035
      • AIX_CATALOG_GROUP = 7037
        • 1. Re: Defined groupStringType values
          Ashitosh Wagh

          Hi f.valle.fernadez,

           

          You can use following blcli

           

          Template group create :

           

          # blcli_execute TemplateGroup createGroupWithParentName Template_Parent_Group /

           

          Job group create :

          # blcli_execute JobGroup createGroupWithParentName JOB_GROUPNAME /

           

          Depot Group create:

          # blcli_execute DepotGroup createGroupWithParentName groupName /

           

          Thanks

          Ashitosh

          1 of 1 people found this helpful
          • 2. Re: Defined groupStringType values
            Javier del Valle Fernandez

            Hi

             

            Thanks for your answer Ashitosh, altough you can do as you say, I was looking for the groupStringType values needed for the Group.createGroupWithParentName function, which I have finally found:

            DEPOT_GROUP_STRING_TYPE = DepotGroup

            JOB_GROUP_STRING_TYPE = JobGroup

            TEMPLATE_GROUP_STRING_TYPE = TemplateGroup

            STATIC_COMPONENT_GROUP_STRING_TYPE = StaticComponentGroup

             

            My main issue here is that I was looking for a function like 'ComponentGroup.createGroupWithParentName' and didn't found it, that's why I went to Group.createGroupWithParentName and looked for its arguments.

             

            The real problem here is with the documentation and the names bladelogic uses. Depending on whether you are at server, depot, component, etc. The same action/object has diferent names, it could be a folder, a group or a static group and it's quit econfusing. And also that the stringTypes required for the Group.createGroupWithParentName are not documented.

            • 3. Re: Defined groupStringType values
              Ashitosh Wagh

              Hi,

               

              For Component Smart group--> SmartComponentGroup there is BLCLI createGroup is available

              which accepts following parameters :

               

              "parentGroupName" desc="Fully qualified path to the parent group."

              "groupName" desc="Name of the smart group you want to create."

              "groupDescription" desc="Description of the smart group you want to create."

              "propName" desc="Property name to be used in the smart group condition."

              "operator" desc="Operator string to be used in the smart group condition."

              "propValue" desc="Property value to be used in the smart group condition."

               

              Thanks

              Ashitosh

              1 of 1 people found this helpful
              • 4. Re: Defined groupStringType values
                Javier del Valle Fernandez

                Hi,

                 

                That function is for 'smart groups', we wanted to create an static one. Now I know I could have used StaticComponentGroup.createGroupWithParentName, but I didn't knew that function when I oppened the thread, because I was looking to one called just 'ComponentGroup.Create...' and that one does not exists.

                 

                Thanks for your help!

                • 5. Re: Defined groupStringType values

                  Hi,

                   

                  I stumbled on the same problem and I am quite thankful for your research which allows me to go forward with my application.

                   

                  If I want to generalize, the group string type is actually the name of the BLCLI namespace for the type of group, isn't it ?

                   

                  Best regards

                  Stéphane

                  • 6. Re: Defined groupStringType values
                    Bill Robinson

                    Not really.  the object type string to id mappings are listed here:

                    https://docs.bmc.com/docs/display/public/bsa85/Object+type+IDs

                     

                    you can use the Utility convertModelType w/ the string name of the object to get the object type id.

                     

                    there is not a direct correlation between the literal string name in the object type reference and the corresponding namespace that would act on those strings, though it's close.

                     

                    all the DepotGroup,JobGroup, etc namespaces are basically children of Group or SmartGroup.