Service Virtualization

  • 1.  Un-deploy virtual services in a group using Jenkins

    Posted Dec 19, 2018 12:31 PM

    The process to deploy the virtual services is shown below and need to provide the name of the virtual service separated by commas for un-deployment.

    node {

        stage('CA Service Virtualization Undeploy VS') {

            svUndeployVirtualService vseName: 'VSE', vsNames: '''WebServicesModel\nwebservices-vs'''

        }

    }

     

    Is there any way to use regex expression to un-deploy all the virtual services?

     

    Expecting something similar like we use in Mar files deployment.

    • **/*.mar
      Wildcard format to match all MAR files within the recursive directory structure.

     

    Thanks,

    Satish



  • 2.  Re: Un-deploy virtual services in a group using Jenkins

    Posted Feb 15, 2019 04:37 AM

    Please someone can help me on the above question?



  • 3.  Re: Un-deploy virtual services in a group using Jenkins
    Best Answer

    Posted Feb 15, 2019 08:08 AM

    I do not believe a wildcard is accepted as input.

    Would it be possible to create a pre-step that builds the list of services for the undeploy? Then, substitute the list in vsNames.

     

    The rest API can return a list of services running in the VSE (<dt_server>:1505/api/Dcm/VSEs/VSE).  Iterating over the XML yields the list of services running. I suppose you could apply your own regex to the service name to determine if the service needs to be undeployed.

     

    REST Invoke API - DevTest Solutions - 10.4 - CA Technologies Documentation  

    https://support.ca.com/cadocs/0/CA%20DevTest%20Solutions%208%200-ENU/Bookshelf_Files/Invoke/index.html#-1036894486 

     

    Virtual Service Invoke API - DevTest Solutions - 10.4 - CA Technologies Documentation  



  • 4.  Re: Un-deploy virtual services in a group using Jenkins

    Posted Feb 18, 2019 03:48 AM

    Thank you, Joel.