Service Virtualization

  • 1.  Port automatically assigned by the VSE ?

    Posted Nov 09, 2018 11:04 AM

    Hello,

     

    Using DevTest 10.1 and API, is there a way to deploy a VS without port ? The port would be automatically assigned by the VSE, and it would be send back to the user in order to be used in tests.

     

    Best regards,

     

    Benoit



  • 2.  Re: Port automatically assigned by the VSE ?
    Best Answer

    Broadcom Employee
    Posted Nov 09, 2018 11:13 AM

    As far as I know,  I don't think that is possible. 



  • 3.  Re: Port automatically assigned by the VSE ?

    Broadcom Employee
    Posted Nov 09, 2018 11:48 AM

    Not out of the box.  The Listen step needs a port assigned at the time of deployment.

     

    I haven't actually done this, but off the top of my head you might try something like this:

     

    1) Make the listen port a LISA property

     

    2) Write a test case that performs the following steps.

     

    a) Generate a port number (perhaps pull it from a database)

     

    b) Append the new port value to a config file where it's assigned to the listen port property

     

    c) Deploy the virtual service with the new config file using the Swagger API.

     

    it's a bit clunky, but it ought to work.

     

    --Mike