1 Reply Latest reply on May 21, 2012 2:13 PM by Bill Robinson

    How to get fully qualified property instance name from a DB Key

      Hi All,

       

      I'm using Blade Logic 8.1.02.233

       

      I'm trying the print a CSV file with properties of servers.

      I can get to the properties using "Server->printPropertyValue" command, but references to classes show as DB Keys.

       

      The file looks like this

       

      NAME          , DESCRIPTION          ,IIS_WWWROOT_FOLDER     , CUSTOM_PROPERTY_ENVIRONMENT
      "10.20.30.40" , "Primary Server"     , "/C/inetpub/wwwroot"  , "DBKey:SPropertyInstanceModelKeyImpl:2002996-2002996"
      "10.20.30.50" , "Secondery Server"   , "/C/inetpub/wwwroot"  , "DBKey:SPropertyInstanceModelKeyImpl:2002996-2002996"       
      

       

      The NSH script I'm using is:

       

       

      SERVER_PROPERTY_VALUES=""
      for SERVER_PROPERTY in "${INPUT_PROPERTIES[@]}"
      do
         
       blcli_execute Server printPropertyValue $SERVER_PROPERTY > NUL
       blcli_storeenv SERVER_PROPERTY_VALUE > NUL
       
       # Add comma between each value
       $SERVER_PROPERTY_VALUES="${SERVER_PROPERTY_VALUES}, \"${SERVER_PROPERTY_VALUE}\""
      done
      echo $SERVER_PROPERTY_VALUES > /C/exported_servers.csv
      
      

       

      I want to later import the servers listed in this file from right click menu on Servers -> Import Servers

       

       

      The reference to the class are shown as a DB Key, while I need it to be a fully qualified name.

       

      Instead of: "DBKey:SPropertyInstanceModelKeyImpl:2002996-2002996"

      I need:       "Class://SystemObject/CUSTOM_PROPERTY_ENVIRONMENT/QA_ENVIRONMENT"

       

      I couldn't find a BLCLI command to get from the DB key of a class instance to a fully qualified instance name.

       

      so, I'm in a pickle... any help will be appriciated!

       

      Thanks,

      Eyal

       

      B.T.W. did I overlook a really obvious way to export server properties? this will save me plenty of work.