8 Replies Latest reply on Feb 17, 2013 1:28 PM by Lazar NameToUpdate

    Get local property from a Deploy job

    Bruce Wauer

      I have a local property defined in a BLPackage as a String enumeration with 3 possible values defined. I have a deploy job that is pointing to this BLPackage. I am trying to get the value of that property, but can't get it to work. Here is what I have tried:

       

      GROUP_NAME="/App Deploy"

      JOB_NAME="Manual test"

      # Get deploy job APP_PATH local property (from BLPackage)

      echo "DEBUG: List local properties from deploy job \"$JOB_NAME\"."

      blcli_execute DeployJob getLocalPropertyNames "$GROUP_NAME" "$JOB_NAME"

      echo "\nDEBUG: Get APP_PATH from deploy job $JOB_NAME."

      blcli_execute DeployJob findByGroupAndName "$GROUP_NAME" "$JOB_NAME"

      echo "\nDEBUG: Get associated instance."

      blcli_execute DeployJob getAssociatedInstance

      echo "\nDEBUG: Get ValueByPropertyString."

      blcli_execute PropertySetInstance getValueByPropertyString APP_PATH

       

      echo "\nDEBUG: Get BLPackage."

      blcli_execute DeployJob getBlPackage

      echo "\nDEBUG: Set target object."

      blcli_execute Utility setTargetObject

      echo "\nDEBUG: Get property value."

      blcli_execute BlPackage getPropertyValueAsString APP_PATH

       

      The above code generates this output:

       

      DEBUG: List local properties from deploy job "Manual test".

      [APP_PATH]

      DEBUG: Get APP_PATH from deploy job Manual test.

      com.bladelogic.om.infra.model.job.deploy.DeployJobImpl@d9a00977

      DEBUG: Get associated instance.

      PSI : Manual test :

       

      DEBUG: Get ValueByPropertyString.

      Command execution failed. java.lang.IllegalArgumentException: classField not available

       

      DEBUG: Get BLPackage.

      com.bladelogic.om.infra.model.depot.blpackage.BlPackageImpl@c2aebc2

      DEBUG: Set target object.

      com.bladelogic.om.infra.model.depot.blpackage.BlPackageImpl@c2aebc2

      DEBUG: Get property value.

      Command execution failed. java.lang.IllegalArgumentException: classField not available

       

      (Emphasis added) Everything that I try seems to generate this same "classField not available" error. I can open the deploy job and display this APP_PATH property in the SA Console with no issues. I get the same error regardless of which deploy job or BLPackage I use (all of my packages use this APP_PATH property). Nothing is being printed in the console.log.

       

      Am I doing this correctly? Is there another method that I can try?

       

      We recently upgraded to 8.2.02.321, and I "think" this was working before we upgraded.