Service Virtualization

how can I execute deploymar via curl

  • 1.  how can I execute deploymar via curl

    Posted 01-22-2015 06:05 PM

    continuing on with my deploy to cloud, I need to write a script to deploy and activate a service on the VSE I just created.

     

    I am attempting to use the deployMar api request, but something is missing

     

    Anyhow, am getting 415 unsupported media type, for both file data –data “@/filepath/name” or –data "file:///path/filename"

     

    curl –s –v –X POST –data-binary “@/home/sam/samsimage.mar” http://172.17.0.103:1505/api/Dcm/VSEs/VSE/actions/deployMar

     

    mar is a binary file

    if --data is used, only 2080 of the 5454 bytes are transfered..


    I also don't get the json output documented.

     

    doing the deploy of this same file thru the UI works.

    the VSEManager --deploy command works as well, but I would have to deploy a Lisa instance to use that command.


    if I curl to the registry address, vs the registry web server I get a 200 return code, but noting happens

    curl –s –v –X POST –data-binary “@/home/sam/samsimage.mar” http://172.17.0.103:2010/api/Dcm/VSEs/VSE/actions/deployMar


    also, the swagger api info


    http:/registry_server:1505/api/swagger

    shows up and is navigable.. but none of the apis work (no response).


    I can still deploy via the console.


    Looking at the registry console I see an error


    Cookie provided by RPC request doesn't match request cookie, aborting action....


    I didn't see any requirement in the doc to get and use a cookie on get/put requests.