3 Replies Latest reply on Dec 17, 2014 3:29 PM by Cristiano Oliveira

    Manipulate BlPackageItem using Command Line

      Hi guys!


      I am trying to automate the creation of our BlPackages in BladeLogic 8.5 using Command Line.


      Currently, our Deployment Team manually:


      1) clones an existing BlPackage with some External CMD and Add DIR items;

      2) delete the existing Add DIR item;

      3) use Import New Assets to create a new Add DIR item;

      4) move new Add DIR item to right position (ItemID).


      Undocumented BlPackageItem.replacePackageItemFileContent seems to do the trick, but I did not understand how I can get the com.bladelogic.om.infra.model.depot.blpackage.BlPackageItem instance and pass as a parameter to it. Should I use JLI or something like that?

      Do you guys think there is another better way to achieve that? It seems that creating a BlPackage from Component Template is the regular approach, but I would have to create the External CMD items again, right?

      Thank you very much,