Service Virtualization

  • 1.  Performing VSE actions based on group service belong to

    Posted Mar 05, 2018 04:08 PM

    Is it possible to perform actions like clearing counts, increase capacity to services, start and stop services based on the group of services where they belong to singe group tag using VSEManager commands.



  • 2.  Re: Performing VSE actions based on group service belong to
    Best Answer

    Posted Mar 06, 2018 11:29 AM

    Thinking out loud here... But, 

    1) Could you use the LISA invoke API (http://localhost:1505/api/Dcm/VSEs/VSE) to gain access to the list of services running in the VSE. For each service in this this list the Group Tag is identified.

    <VirtualService name="someService" href="http://localhost:1505/api/Dcm/VSEs/VSE/someService" 
    type="application/vnd.ca.lisaInvoke.virtualService+xml">

    <ModelName>someService</ModelName> <EndTime>1969-12-31 18:00:00</EndTime>
    <Capacity>1</Capacity> <UpTime>0:08:57</UpTime>
    <TransactionsPerSecond>0</TransactionsPerSecond>
    <TransactionCount>0</TransactionCount>
    <PeakTransactionsPerSecond>0</PeakTransactionsPerSecond>
    <ThinkScale>100</ThinkScale> <ErrorCount>0</ErrorCount>
    <AutoRestartEnabled>true</AutoRestartEnabled>
    <Status>2</Status>

    <StartTime>2018-03-06 09:43:42</StartTime> <ExecutionMode>Most Efficient</ExecutionMode>
    <ConfigurationName>C:\DT\lisatmp_10.2.4\lads\<guid>\PCAP_Builder\Configs\project.config</ConfigurationName>
    <GroupTag/>
    <ResourceName>8020 : http : : /basePath</ResourceName>
    <Link href="http://localhost:1505/api/Dcm/VSEs/VSE/someService/actions" rel="down"/>
    <Link href="http://localhost:1505/api/Dcm/VSEs/VSE/someService/actions/start" rel="start"/>
    <Link href="http://localhost:1505/api/Dcm/VSEs/VSE/someService/actions/stop" rel="stop"/>
    <Link href="http://localhost:1505/api/Dcm/VSEs/VSE/someService/actions/resetCounts" rel="resetCounts"/>
    2) XPath the XMl to establish a count of the number of services.
    3) Set up a counting dataset that loops from 1 by 1
    4) Iterate each service and based on Group Tag determine if action is required
    5) XPath the Status to determine if the service is running or stopped
    6) Use the <Link> reference to start, stop, reset counts