14 Replies Latest reply on Jul 20, 2012 8:04 AM by Bill Robinson

    Assign instance value to Property Class property

    Bruce Wauer

      I have a custom property class defined that has properties defined as type "Property class", where the specific property classes are various type of Static Group, Component Template, and various types of Job. How do I assign specific instance values to these properties in blcli? I have been searching for commands that return the full instance string. The "getAssociatedInstance" commands seem to only return a PSI, which the "PropertyInstance setOverriddenValue" command is rejecting with this error:

       

      Command execution failed. com.bladelogic.om.infra.model.typesystem.BlValueParseException: com.bladelogic.om.infra.mfw.util.BlException: Instance PSI : TEST_APP1 BLPackage : specified in incorrect syntax

       

      Here is the code that is throwing that error:

       

      TEMPLATE_OPTIONS="false false false true true false false false false false"

      blcli_execute Template createDirectoryTemplate "$BLPACKAGE_TEMPLATE_NAME" $BLPACKAGE_TEMPLATE_GROUP_ID true "??TARGET.DEPLOYPATH??" $TEMPLATE_OPTIONS

      blcli_storeenv BLPACKAGE_TEMPLATE_DBKEY

       

      # Store it in the application instance

      blcli_execute Template getAssociatedInstance

      blcli_storeenv INSTANCE

      blcli_execute PropertyInstance setOverriddenValue "${APP_PROPERTY_CLASS}/$APP" BLPACKAGE_TEMPLATE "$INSTANCE"