2 Replies Latest reply on Oct 22, 2013 3:23 PM by richard mcleod

    How do I interpret this output? BLCLI

    richard mcleod

      I am using the following command

       

      blcli_execute Component findAllByComponentGroup "2000443" true

       

      it outputs this:

      com.bladelogic.om.infra.model.component.ComponentImpl@51bec8f1, com.bladelogic.om.infra.model.component.ComponentImpl@321f389e, com.bladelogic.om.infra.model.component.ComponentImpl@cf96b611, com.bladelogic.om.infra.model.component.ComponentImpl@7d6412c3, com.bladelogic.om.infra.model.component.ComponentImpl@59e5363d, com.bladelogic.om.infra.model.component.ComponentImpl@2f929846, com.bladelogic.om.infra.model.component.ComponentIm

      pl@a1477ad6, com.bladelogic.om.infra.model.component.ComponentImpl@86cfa30b, com.bladelogic.om.infra.model.component.ComponentImpl@158e0a8a, com.bladelogic.om.infra.model.component.ComponentImpl@f6631ab0, com.bladelogic.om.infra.model.component.ComponentImpl@23fa4b65, com.bladelogic.om.infra.model.component.ComponentImpl@487132d0, com.bladelogic.om.infra.model.component.ComponentImpl@e61553fa, com.bladelogic.om.infra.model.component.ComponentImpl@6a54fdd8, com.bladelogic.om.infra.model.component

      .ComponentImpl@66d28e5, com.bladelogic.om.infra.model.component.ComponentImpl@a737d425, com.bladelogic.om.infra.model.component.ComponentImpl@6395733b, com.bladelogic.om.infra.model.component.ComponentImpl@3e7948e8, com.bladelogic.om.infra.model.component.ComponentImpl@3917666d, com.bladelogic.om.infra.model.component.ComponentImpl@d371aa30, com.bladelogic.om.infra.model.component.ComponentImpl@20e06915, com.bladelogic.om.infra.model.component.ComponentImpl@d216cd2b, com.bladelogic.om.infra.mode

      l.component.ComponentImpl@b2b1eefc, com.bladelogic.om.infra.model.component.ComponentImpl@183b0b85, com.bladelogic.om.infra.model.component.ComponentImpl@a5c89b15, com.bladelogic.om.infra.model.component.ComponentImpl@fae05260, com.bladelogic.om.infra.model.component.ComponentImpl@a1819010, com.bladelogic.om.infra.model.component.ComponentImpl@b8e0f014, com.bladelogic.om.infra.model.component.ComponentImpl@a03fed6d, com.bladelogic.om.infra.model.component.ComponentImpl@82584d48, com.bladelogic.o

      m.infra.model.component.ComponentImpl@c969b0ac, com.bladelogic.om.infra.model.component.ComponentImp

       

      The return type in the documentation is java.util.list, so thats working but what data type is this? What am I actually getting back? Encoded Component IDs? Encoded DBKeys for the component?

       

      If you want to try this in your environment (if you have component groups setup) run:

      blcli_execute ComponentGroup groupNameToId "/Workspace/Some GroupName"

      blcli_storeenv groupID

      blcli_execute Component findAllByComponentGroup "$groupID" true

        • 1. Re: How do I interpret this output? BLCLI
          Bill Robinson

          those are the objects themselves, you need to run a command like 'Component getDBKey' to create a string you can operate on, or you can iterate through the list of objects like the below and act on each one.  the example is for depot objects because i had that handy - same idea for the other object types.

           

          blcli_execute SmartDepotGroup groupNameToId "${depotGroup}"

          blcli_storeenv depotGroupId

          blcli_execute DepotObject findAllHeadersByGroup ${depotGroupId}

          blcli_execute Utility storeTargetObject depotObjectHeaders

          blcli_execute Utility listLength

          blcli_storeenv listLength

           

          echo ${listLength}

          for item in {0..$((${listLength}-1))}

                  do

                  blcli_execute Utility setTargetObject depotObjectHeaders

                  blcli_execute Utility listItemSelect ${item}

                  blcli_execute Utility setTargetObject

                  blcli_execute SDepotObjectHeader getDBKey

                  blcli_storeenv depotObjectKey

                  blcli_execute SDepotObjectHeader getObjectTypeId

                  blcli_storeenv depotObjectTypeId

                  blcli_execute SDepotObjectHeader getName

                  blcli_storeenv depotObjectName

                  blcli_execute SDepotObjectHeader getGroupId

                  blcli_storeenv groupId

                  blcli_execute Group findById ${groupId}

                  blcli_execute Group getType

                  blcli_storeenv groupTypeId

                  blcli_execute Group getQualifiedGroupName ${groupTypeId} ${groupId}

                  blcli_storeenv groupPath

                  echo "${groupPath}/${depotObjectName}..." >> $$.out

          #       blcli_execute Delete deleteModelObjectAndDependentObjects ${depotObjectTypeId} ${depotObjectKey}

          done

          1 of 1 people found this helpful
          • 2. Re: How do I interpret this output? BLCLI
            richard mcleod

            Ah ok, thanks for the explanation. Was just curious what the return was.