6 Replies Latest reply on Aug 5, 2014 2:21 AM by Tomáš Pustka

    target.csv for ProvisionJob addPMDevices as variable?

      Hello, I´d like to use "target.csv" as variable in in BLCLI addPMDevices, but if I use different name then "target.csv" for examle "targets.csv" the job fails. Do  you have any idea, how to use dynamic file for this job, if there is only possibility to run only with one file, how the job can use more people in the same time ?

       

      #Add device to provision job

      echo "MAC_ADDRESS,COMPUTER_NAME,OM_SERVER_NAME,IP_ADDRESS,SUBNET_MASK,DEFAULT_GATEWAY,OS_LICENSE,NIM_CLIENT_NAME" > /temp/target.csv

      echo "${DEVICE_MAC},${NAME},${BSA_NAME},,,,," >> /temp/target.csv

      TARGET_FILE="file:///c:/temp/target.csv"

      # Add devices from the target file to the Provision Job

      blcli_execute ProvisionJob addPMDevices $PROVISION_JOB_DBKEY $TARGET_FILE

      blcli_storeenv NEW_PROVISION_JOB_DBKEY

      blcli Job execute $NEW_PROVISION_JOB_DBKEY

      rm /temp/target.csv

       

       

      If I use "targets.csv" or some variable "${DEVICE_MAC}" it fails:

       

      #Add device to provision job

      echo "MAC_ADDRESS,COMPUTER_NAME,OM_SERVER_NAME,IP_ADDRESS,SUBNET_MASK,DEFAULT_GATEWAY,OS_LICENSE,NIM_CLIENT_NAME" > /temp/target.csv

      echo "${DEVICE_MAC},${NAME},${BSA_NAME},,,,," >> /temp/targets.csv

      TARGET_FILE="file:///c:/temp/targets.csv"

      # Add devices from the target file to the Provision Job

      blcli_execute ProvisionJob addPMDevices $PROVISION_JOB_DBKEY $TARGET_FILE

      blcli_storeenv NEW_PROVISION_JOB_DBKEY

       

      blcli Job execute $NEW_PROVISION_JOB_DBKEY

       

      Message:

      Error30.7.2014 13:20:51Command execution failed. com.bladelogic.om.infra.mfw.util.BlException: com.bladelogic.om.infra.cli.factory.CommandLoadException: First column must be MAC_ADDRESS

       

      Thanks!

      Tomas