From 713c56b8d0f64fe411a6833240c10c44c8c33eb7 Mon Sep 17 00:00:00 2001 From: wr148d Date: Fri, 29 Apr 2022 10:38:04 -0400 Subject: [AAI] Add the aai performance test script files Issue-ID: AAI-3480 Change-Id: I63c2584c3f0d78c5cb9cf3f91f1aa13898aabdde Signed-off-by: wr148d --- gatling/Gatling_conf_file | 141 +++ gatling/ONAP Baseline 2022.scala | 1315 ++++++++++++++++++++ gatling/ONAP Baseline.sh | 1 + gatling/ONAP Single API.sh | 1 + gatling/ONAP Stress 2022.scala | 1318 +++++++++++++++++++++ gatling/ONAP Stress.sh | 1 + gatling/ONAP single API 2022.scala | 754 ++++++++++++ gatling/newtenant_valid.json | 4 + gatling/newvf-module_valid.json | 3 + gatling/onap-CQ-genericVnfs-fromPserver.json | 2 + gatling/onap-CQ-getClfiRoadmTailSummary.json | 3 + gatling/onap-CQ-pserver-zdevice.json | 2 + gatling/onap-CQ-vlanrange-fromVlantag.json | 3 + gatling/onap-CQ-vrfs-fromVlantag.json | 3 + gatling/onap-CQ-zPnfs-fromPnf.json | 2 + gatling/onap-DSL1.json | 1 + gatling/onap-DSL10.json | 1 + gatling/onap-DSL2.json | 1 + gatling/onap-DSL3.json | 1 + gatling/onap-DSL4.json | 1 + gatling/onap-DSL5.json | 1 + gatling/onap-DSL6.json | 1 + gatling/onap-DSL7.json | 1 + gatling/onap-DSL8.json | 1 + gatling/onap-DSL9.json | 1 + gatling/onap-patch-bulk-single-tx.json | 52 + gatling/onapLOB.csv | 2 + gatling/onapbulk-single-tx_putPServerVServer.json | 144 +++ gatling/onapcloudregions.csv | 3 + gatling/onapcomplexes.csv | 2 + gatling/onapconfigurations.csv | 2 + gatling/onapcustomers.csv | 2 + gatling/onaploglinks.csv | 2 + gatling/onapowning_entity.csv | 2 + gatling/onapplatform.csv | 2 + gatling/onappnfs.csv | 2 + gatling/onapproject.csv | 2 + gatling/onappservers.csv | 4 + gatling/onapserviceinstance.csv | 2 + gatling/onaptenants.csv | 3 + gatling/onapvf-modules.csv | 2 + gatling/onapvnfcs.csv | 2 + gatling/onapvnfs.csv | 2 + gatling/patch-tenant.json | 3 + gatling/patch-vf-module.json | 3 + 45 files changed, 3801 insertions(+) create mode 100644 gatling/Gatling_conf_file create mode 100644 gatling/ONAP Baseline 2022.scala create mode 100644 gatling/ONAP Baseline.sh create mode 100644 gatling/ONAP Single API.sh create mode 100644 gatling/ONAP Stress 2022.scala create mode 100644 gatling/ONAP Stress.sh create mode 100644 gatling/ONAP single API 2022.scala create mode 100644 gatling/newtenant_valid.json create mode 100644 gatling/newvf-module_valid.json create mode 100644 gatling/onap-CQ-genericVnfs-fromPserver.json create mode 100644 gatling/onap-CQ-getClfiRoadmTailSummary.json create mode 100644 gatling/onap-CQ-pserver-zdevice.json create mode 100644 gatling/onap-CQ-vlanrange-fromVlantag.json create mode 100644 gatling/onap-CQ-vrfs-fromVlantag.json create mode 100644 gatling/onap-CQ-zPnfs-fromPnf.json create mode 100644 gatling/onap-DSL1.json create mode 100644 gatling/onap-DSL10.json create mode 100644 gatling/onap-DSL2.json create mode 100644 gatling/onap-DSL3.json create mode 100644 gatling/onap-DSL4.json create mode 100644 gatling/onap-DSL5.json create mode 100644 gatling/onap-DSL6.json create mode 100644 gatling/onap-DSL7.json create mode 100644 gatling/onap-DSL8.json create mode 100644 gatling/onap-DSL9.json create mode 100644 gatling/onap-patch-bulk-single-tx.json create mode 100644 gatling/onapLOB.csv create mode 100644 gatling/onapbulk-single-tx_putPServerVServer.json create mode 100644 gatling/onapcloudregions.csv create mode 100644 gatling/onapcomplexes.csv create mode 100644 gatling/onapconfigurations.csv create mode 100644 gatling/onapcustomers.csv create mode 100644 gatling/onaploglinks.csv create mode 100644 gatling/onapowning_entity.csv create mode 100644 gatling/onapplatform.csv create mode 100644 gatling/onappnfs.csv create mode 100644 gatling/onapproject.csv create mode 100644 gatling/onappservers.csv create mode 100644 gatling/onapserviceinstance.csv create mode 100644 gatling/onaptenants.csv create mode 100644 gatling/onapvf-modules.csv create mode 100644 gatling/onapvnfcs.csv create mode 100644 gatling/onapvnfs.csv create mode 100644 gatling/patch-tenant.json create mode 100644 gatling/patch-vf-module.json diff --git a/gatling/Gatling_conf_file b/gatling/Gatling_conf_file new file mode 100644 index 0000000..bd32c32 --- /dev/null +++ b/gatling/Gatling_conf_file @@ -0,0 +1,141 @@ +######################### +# Gatling Configuration # +######################### + +# This file contains all the settings configurable for Gatling with their default values + +gatling { + core { + #outputDirectoryBaseName = "" # The prefix for each simulation result folder (then suffixed by the report generation timestamp) + #runDescription = "" # The description for this simulation run, displayed in each report + #encoding = "utf-8" # Encoding to use throughout Gatling for file and string manipulation + #simulationClass = "" # The FQCN of the simulation to run (when used in conjunction with noReports, the simulation for which assertions will be validated) + #mute = false # When set to true, don't ask for simulation name nor run description (currently only used by Gatling SBT plugin) + #elFileBodiesCacheMaxCapacity = 200 # Cache size for request body EL templates, set to 0 to disable + #rawFileBodiesCacheMaxCapacity = 200 # Cache size for request body Raw templates, set to 0 to disable + #rawFileBodiesInMemoryMaxSize = 1000 # Below this limit, raw file bodies will be cached in memory + + extract { + regex { + #cacheMaxCapacity = 200 # Cache size for the compiled regexes, set to 0 to disable caching + } + xpath { + #cacheMaxCapacity = 200 # Cache size for the compiled XPath queries, set to 0 to disable caching + } + jsonPath { + #cacheMaxCapacity = 200 # Cache size for the compiled jsonPath queries, set to 0 to disable caching + #preferJackson = false # When set to true, prefer Jackson over Boon for JSON-related operations + } + css { + #cacheMaxCapacity = 200 # Cache size for the compiled CSS selectors queries, set to 0 to disable caching + } + } + directory { + data = src/test/gatling/data # Folder where user's data (e.g. files used by Feeders) is located + bodies = src/test/gatling/bodies # Folder where request bodies are located + #simulations = user-files/simulations # Folder where the bundle's simulations are located + #reportsOnly = "" # If set, name of report folder to look for in order to generate its report + #binaries = "" # If set, name of the folder where compiles classes are located: Defaults to GATLING_HOME/target. + #results = results # Name of the folder where all reports folder are located + } + } + charting { + #noReports = false # When set to true, don't generate HTML reports + #maxPlotPerSeries = 1000 # Number of points per graph in Gatling reports + #useGroupDurationMetric = false # Switch group timings from cumulated response time to group duration. + indicators { + #lowerBound = 800 # Lower bound for the requests' response time to track in the reports and the console summary + #higherBound = 1200 # Higher bound for the requests' response time to track in the reports and the console summary + percentile1 = 50 # Value for the 1st percentile to track in the reports, the console summary and Graphite + percentile2 = 75 # Value for the 2nd percentile to track in the reports, the console summary and Graphite + percentile3 = 90 # Value for the 3rd percentile to track in the reports, the console summary and Graphite + percentile4 = 95 # Value for the 3rd percentile to track in the reports, the console summary and Graphite + percentile5 = 99 # Value for the 4th percentile to track in the reports, the console summary and Graphite + } + } + http { + #fetchedCssCacheMaxCapacity = 200 # Cache size for CSS parsed content, set to 0 to disable + #fetchedHtmlCacheMaxCapacity = 200 # Cache size for HTML parsed content, set to 0 to disable + #perUserCacheMaxCapacity = 200 # Per virtual user cache size, set to 0 to disable + warmUpUrl = "http://gatling.io" # The URL to use to warm-up the HTTP stack (blank means disabled) + #enableGA = true # Very light Google Analytics, please support + + ssl { + keyStore { + file = src/test/gatling/conf/Enter P12 file Here #Location of SSLContext's KeyManagers store + password = "Enter Keystore Password" #Password for SSLContext's KeyManagers store + } + trustStore { + #type = "JKS" # Type of SSLContext's TrustManagers store + file = src/test/gatling/conf/truststore2020m.jks # Location of SSLContext's TrustManagers store + password = Enter password here # Password for SSLContext's TrustManagers store + #algorithm = "" # Algorithm used by SSLContext's TrustManagers store + } + } + ahc { + #keepAlive = true # Allow pooling HTTP connections (keep-alive header automatically added) + #connectTimeout = 10000 # Timeout when establishing a connection + #handshakeTimeout = 10000 # Timeout when performing TLS hashshake + #pooledConnectionIdleTimeout = 60000 # Timeout when a connection stays unused in the pool + pooledConnectionIdleTimeout = 80000 # Timeout when a connection stays unused in the pool + readTimeout = 800000 # Timeout when a used connection stays idle + #maxRetry = 2 # Number of times that a request should be tried again + requestTimeout = 800000 # Timeout of the requests + acceptAnyCertificate = true # When set to true, doesn't validate SSL certificates + #httpClientCodecMaxInitialLineLength = 4096 # Maximum length of the initial line of the response (e.g. "HTTP/1.0 200 OK") + #httpClientCodecMaxHeaderSize = 8192 # Maximum size, in bytes, of each request's headers + #httpClientCodecMaxChunkSize = 8192 # Maximum length of the content or each chunk + #webSocketMaxFrameSize = 10240000 # Maximum frame payload size + sslEnabledProtocols = [TLSv1.2, TLSv1.1, TLSv1] # Array of enabled protocols for HTTPS, if empty use the JDK defaults + #sslEnabledCipherSuites = [] # Array of enabled cipher suites for HTTPS, if empty use the AHC defaults + #sslSessionCacheSize = 0 # SSLSession cache size, set to 0 to use JDK's default + #sslSessionTimeout = 0 # SSLSession timeout in seconds, set to 0 to use JDK's default (24h) + #useOpenSsl = true # if OpenSSL should be used instead of JSSE (requires tcnative jar) + #useNativeTransport = false # if native transport should be used instead of Java NIO (requires netty-transport-native-epoll, currently Linux only) + #tcpNoDelay = true + #soReuseAddress = false + #soLinger = -1 + #soSndBuf = -1 + #soRcvBuf = -1 + #allocator = "pooled" # switch to unpooled for unpooled ByteBufAllocator + #maxThreadLocalCharBufferSize = 200000 # Netty's default is 16k + } + dns { + #queryTimeout = 5000 # Timeout of each DNS query in millis + #maxQueriesPerResolve = 6 # Maximum allowed number of DNS queries for a given name resolution + } + + #proxy { + #host = "http://sub.proxy.att.com" # proxy host (blank means no proxy) + #port = 8080 # HTTP port + #securedPort = -1 # HTTPS port (-1 means no HTTPS proxy) + #username = "" # proxy username (blank means no credentials) + #password = "" # proxy password + #} + + } + jms { + #acknowledgedMessagesBufferSize = 5000 # size of the buffer used to tracked acknowledged messages and protect against duplicate receives + } + data { + #writers = [console, file] # The list of DataWriters to which Gatling write simulation data (currently supported : console, file, graphite, jdbc) + console { + #light = false # When set to true, displays a light version without detailed request stats + } + file { + #bufferSize = 8192 # FileDataWriter's internal data buffer size, in bytes + } + leak { + #noActivityTimeout = 30 # Period, in seconds, for which Gatling may have no activity before considering a leak may be happening + } + graphite { + #light = false # only send the all* stats + #host = "localhost" # The host where the Carbon server is located + #port = 2003 # The port to which the Carbon server listens to (2003 is default for plaintext, 2004 is default for pickle) + #protocol = "tcp" # The protocol used to send data to Carbon (currently supported : "tcp", "udp") + #rootPathPrefix = "gatling" # The common prefix of all metrics sent to Graphite + #bufferSize = 8192 # GraphiteDataWriter's internal data buffer size, in bytes + #writeInterval = 1 # GraphiteDataWriter's write interval, in seconds + } + } +} diff --git a/gatling/ONAP Baseline 2022.scala b/gatling/ONAP Baseline 2022.scala new file mode 100644 index 0000000..16024a7 --- /dev/null +++ b/gatling/ONAP Baseline 2022.scala @@ -0,0 +1,1315 @@ +import io.gatling.core.Predef.{exec, _} +import io.gatling.http.Predef._ +import _root_.io.gatling.core.scenario.Simulation +import java.util.UUID +import scala.concurrent.duration._ + +import scala.util.Random + +class ONAP_2204_Baseline extends Simulation { + val httpHeaders = Map( + "Accept" -> """application/json""", + "Content-Type"-> """application/json""", + "X-FromAppId"-> """ONAP-fromappId""", + "X-TransactionId"-> """ONAP-transId""", + "Connection"-> """Keep-Alive""" + ) + + def idGenerator() = "random-" + UUID.randomUUID().toString; + val r = scala.util.Random + val feeder = Iterator.continually(Map("randVal" -> (Random.alphanumeric.take(20).mkString))) + + val PServerFeeder = csv("./src/test/gatling/bodies/onappservers.csv").random + val serviceInstanceFeeder = csv("./src/test/gatling/bodies/onapserviceinstance.csv").random + val genericvnfFeeder = csv("./src/test/gatling/bodies/onapvnfs.csv").random + val customerFeeder = csv("./src/test/gatling/bodies/onapcustomers.csv").random + val vnfcFeeder = csv("./src/test/gatling/bodies/onapvnfcs.csv").random + val platformFeeder = csv("./src/test/gatling/bodies/onapplatform.csv").random + val pnfFeeder = csv("./src/test/gatling/bodies/onappnfs.csv").random + val configurationFeeder = csv("./src/test/gatling/bodies/onapconfigurations.csv").random + val owningentityFeeder = csv("./src/test/gatling/bodies/onapowning_entity.csv").random + val projectFeeder = csv("./src/test/gatling/bodies/onapproject.csv").random + val lobFeeder = csv("./src/test/gatling/bodies/onapLOB.csv").random + + val host = System.getProperty("TARGET_HOST", "Enter Host with Port"); + val url = "Enter host without port" + + val httpBuilder = http.baseURL(host); + + + /*** + * + * @param env + * Sends a PUT tenant request + */ + def PutTenant(env: String) = scenario("Put Tenant " + env) + .forever(){ + exec(session => { + session.set("stenant", idGenerator()) + }) + .exec( + http("PutTenant " + env) + .put("/aai/v23/cloud-infrastructure/cloud-regions/cloud-region/onap-CROwner4/onap-CRId4/tenants/tenant/${stenant}") + .body(ElFileBody("newtenant_valid.json")) + .headers(httpHeaders) + .check( + status.find.in(201) + ) + ) + .pause(2,13) + .exec( + http("GetTenant " + env) + .get("/aai/v23/cloud-infrastructure/cloud-regions/cloud-region/onap-CROwner4/onap-CRId4/tenants/tenant/${stenant}") + .headers(httpHeaders) + .check( + status.find.in(200) + ) + .check(jsonPath("$.resource-version").saveAs("resourcever")) + ) + .exec( + http("DelTenant " + env) + .delete("/aai/v23/cloud-infrastructure/cloud-regions/cloud-region/onap-CROwner4/onap-CRId4/tenants/tenant/${stenant}?resource-version=${resourcever}") + .headers(httpHeaders) + .check(status.find.in(204)) + ) + .pause(1,1) + } + + /*** + * + * @param env + * Sends a PATCH tenant request + */ + def PatchTenant(env: String) = scenario("Patch Tenant " + env) + .forever(){ +// Get the resource version before doing the PATCH + exec( + http("Get Tenant " + env) + .get("/aai/v23/cloud-infrastructure/cloud-regions/cloud-region/onap-CROwner/onap-CRId/tenants/tenant/onap-tenant-patch") + .headers(httpHeaders) + .check( + status.find.in(200) + ) + .check( + jsonPath("$.resource-version").saveAs("rsrcver") + ) + ) + .pause(1,1) + + .exec( + http("Patch Tenant " + env) + .patch("/aai/v23/cloud-infrastructure/cloud-regions/cloud-region/onap-CROwner/onap-CRId/tenants/tenant/onap-tenant-patch?resource-version=${rsrcver}") + .headers(httpHeaders) + .headers(Map( + "Content-Type"-> """application/merge-patch+json""" + )) + .body(ElFileBody("patch-tenant.json")) + .check( + status.find.in(200) + ) + ) + .pause(2,5) + } + + /*** + * + * @param env + * @return Tenant Get depth0 + */ + def GetTenant(env: String) = scenario("Get Tenantdepth0 " + env) + .forever(){ + exec( + http("Get Tenantdepth0 " + env) + .get("/aai/v23/cloud-infrastructure/cloud-regions/cloud-region/onap-CROwner3/onap-CRId3/tenants/tenant/onap-tenantId3?depth=0") + .headers(httpHeaders) + .check( + status.find.in(200) + ) + ) + .pause(2,6) +} + + /*** + * + * @param env + * Sends a DELETE tenant request + */ + def DeleteTenant(env: String) = scenario("Delete Tenant " + env) + .forever(){ + exec(session => { + session.set("stenant", idGenerator()) + }) + .exec( + http("PutTenant " + env) + .put("/aai/v23/cloud-infrastructure/cloud-regions/cloud-region/onap-CROwner5/onap-CRId5/tenants/tenant/${stenant}") + .body(ElFileBody("newtenant_valid.json")) + .headers(httpHeaders) + .check( + status.find.in(201) + ) + ) + .pause(1,1) + .exec( + http("GetTenant " + env) + .get("/aai/v23/cloud-infrastructure/cloud-regions/cloud-region/onap-CROwner5/onap-CRId5/tenants/tenant/${stenant}") + .headers(httpHeaders) + .check( + status.find.in(200) + ) + .check(jsonPath("$.resource-version").saveAs("resourcever")) + ) + .exec( + http("DeleteTenant " + env) + .delete("/aai/v23/cloud-infrastructure/cloud-regions/cloud-region/onap-CROwner5/onap-CRId5/tenants/tenant/${stenant}?resource-version=${resourcever}") + .headers(httpHeaders) + .check(status.find.in(204)) + ) + .pause(1,1) + } + + /** + * + * @param env + * @Send a GET Vserver depth=all request + */ + def Getvserver1(env: String) = scenario("Get Vserverdepthall " + env) + .forever(){ + exec( + http("Get Vserverdepthall " + env) + .get("/aai/v23/cloud-infrastructure/cloud-regions/cloud-region/onap-CROwner2/onap-CRId2/tenants/tenant/onap-tenantId2/vservers/vserver/onap-vserverId2?depth=all") + .headers(httpHeaders) + .check( + status.find.in(200) + ) + ) + .pause(2,5) + } + + /** + * + * @param env + * @Send a GET VF-Module depth=1request + */ + def GetVFModule1(env: String) = scenario("Get VF-Moduledepth1 " + env) + .forever(){ + exec( + http("Get VF-Moduledepthl " + env) + .get("/aai/v23/network/generic-vnfs/generic-vnf/onap-genericvnfId/vf-modules/vf-module/onap-vnfmoduleId?depth=1") + .headers(httpHeaders) + .check( + status.find.in(200) + ) + ) + .pause(2,5) + } + + /** + * + * @param env + * @Send a GET Vserver request + */ + def Getvserver2(env: String) = scenario("Get Vserver " + env) + .forever(){ + exec( + http("Get Vserver " + env) + .get("/aai/v23/cloud-infrastructure/cloud-regions/cloud-region/onap-CROwner2/onap-CRId2/tenants/tenant/onap-tenantId2/vservers/vserver/onap-vserverId2") + .headers(httpHeaders) + .check( + status.find.in(200) + ) + ) + .pause(2,6) + } + + /** + * + * @param env + * @Send a GET SI format=pathed request + */ + def GetSI1(env: String) = scenario("Get SIpathed " + env) + .forever(){ + feed(serviceInstanceFeeder) + .exec( + http("Get SIpathed " + env) + .get("/aai/v23/nodes/service-instances/service-instance/${service-instance-id}?format=pathed") + .headers(httpHeaders) + .check( + status.find.in(200) + ) + ) + .pause(2,3) + } + + /** + * + * @param env + * @Send a V23 GET vnf request + */ + def GetVNF1(env: String) = scenario("Get VNF " + env) + .forever(){ + feed(genericvnfFeeder) + .exec( + http("Get VNF " + env) + .get("/aai/v23/network/generic-vnfs/generic-vnf/${vnf-id}") + .headers(httpHeaders) + .check( + status.find.in(200) + ) + ) + .pause(2,5) + } + + /** + * + * @param env + * @Send a GET vnf depth=1 request + */ + def GetVNF2(env: String) = scenario("Get VNFdepth1 " + env) + .forever(){ + feed(genericvnfFeeder) + .exec( + http("Get VNFdepth1 " + env) + .get("/aai/v23/network/generic-vnfs/generic-vnf/${vnf-id}?depth=1") + .headers(httpHeaders) + .check( + status.find.in(200) + ) + ) + .pause(2,5) + } + + + /** + * + * @param env + * @Send a GET pservers depth=all request + */ + def GetPserver1(env: String) = scenario("Get Pserverdepthall " + env) + .forever(){ + feed(PServerFeeder) + .exec( + http("Get Pserverdepthall " + env) + .get("/aai/v22/cloud-infrastructure/pservers/pserver/${hostname}?depth=all") + .headers(httpHeaders) + .check( + status.find.in(200) + ) + ) + .pause(2,5) + } + + /** + * + * @param env + * @Send a GET volume-group request + */ + def Getvolumegroup(env: String) = scenario("Get volume-group " + env) + .forever(){ + exec( + http("Get volume-group " + env) + .get("/aai/v23/cloud-infrastructure/cloud-regions/cloud-region/onap-CROwner/onap-CRId/volume-groups/volume-group/onap-volumegpId") + .headers(httpHeaders) + .check( + status.find.in(200) + ) + ) + .pause(2,6) + } + + /** + * + * @param env + * @Send a GET platform request + */ + def Getplatform(env: String) = scenario("Get platformnodes-only " + env) + .forever(){ + feed(platformFeeder) + .exec( + http("Get platformnodes-only " + env) + .get("/aai/v22/business/platforms/platform/${platform-name}?nodes-only=") + .headers(httpHeaders) + .check( + status.find.in(200) + ) + ) + .pause(2,6) + } + + /** + * + * @param env + * @Send a GET sriov-vf depth=all request + */ + def Getsriovvf1(env: String) = scenario("Get sriov-vfdepthall " + env) + .forever(){ + exec( + http("Get sriov-vfdepthall " + env) + .get("/aai/v23/cloud-infrastructure/cloud-regions/cloud-region/onap-CROwner/onap-CRId/tenants/tenant/onap-tenantId/vservers/vserver/onap-vserverId/l-interfaces/l-interface/onap-linterfaceName/sriov-vfs/sriov-vf/onap-PciId?depth=all") + .headers(httpHeaders) + .check( + status.find.in(200) + ) + ) + .pause(2,6) + } + + /** + * + * @param env + * @Send a GET pnf request + */ + def Getpnf1(env: String) = scenario("Get pnf " + env) + .forever(){ + feed(pnfFeeder) + .exec( + http("Get pnf " + env) + .get("/aai/v22/network/pnfs/pnf/${pnf-name}") + .headers(httpHeaders) + .check( + status.find.in(200) + ) + ) + .pause(2,6) + } + + /** + * + * @param env + * @Send a vnfc depth=1 request + */ + def Getvnfc1(env: String) = scenario("Get vnfcdepth1 " + env) + .forever(){ + feed(vnfcFeeder) + .exec( + http("Get vnfcdepth1 " + env) + .get("/aai/v22/network/vnfcs/vnfc/${vnfc-name}?depth=1") + .headers(httpHeaders) + .check( + status.find.in(200) + ) + ) + .pause(2,5) + } + + /** + * + * @param env + * @Send a GET vlan depth=1 request + */ + def Getvlan(env: String) = scenario("Get vlandepth1 " + env) + .forever(){ + exec( + http("Get vlandepth1 " + env) + .get("/aai/v22/network/generic-vnfs/generic-vnf/onap-genericvnfId/l-interfaces/l-interface/onap-linterfaceId/vlans/vlan/onap-vlanInterface?depth=1") + .headers(httpHeaders) + .check( + status.find.in(200) + ) + ) + .pause(2,5) + } + + /** + * + * @param env + * @Send a GET SI depth=2 request + */ + def GetSI2(env: String) = scenario("Get SIdepth2 " + env) + .forever(){ + exec( + http("Get SIdepth2 " + env) + .get("/aai/v22/business/customers/customer/onap-customerId/service-subscriptions/service-subscription/onap-subscription-ServiceType/service-instances/service-instance/onap-serviceinstanceId?depth=2") + .headers(httpHeaders) + .check( + status.find.in(200) + ) + ) + .pause(2,4) + } + + /** + * + * @param env + * @Send a GET pserver request + */ + def GetPserver2(env: String) = scenario("Get Pserver " + env) + .forever(){ + feed(PServerFeeder) + .exec( + http("Get Pserver " + env) + .get("/aai/v22/cloud-infrastructure/pservers/pserver/${hostname}") + .headers(httpHeaders) + .check( + status.find.in(200) + ) + ) + .pause(2,5) + } + + /** + * + * @param env + * @Send a GET configuration depth=1 request + */ + def Getconfiguration(env: String) = scenario("Get configurationdepth1 " + env) + .forever(){ + feed(configurationFeeder) + .exec( + http("Get configurationdepth1 " + env) + .get("/aai/v22/network/configurations/configuration/${configuration-id}?depth=1") + .headers(httpHeaders) + .check( + status.find.in(200) + ) + ) + .pause(2,5) + } + + /** + * + * @param env + * @Send a GET service-subscription request + */ + def Getservicesubscription(env: String) = scenario("Get service-subscription " + env) + .forever(){ + exec( + http("Getservice-subscription " + env) + .get("/aai/v22/business/customers/customer/onap-customerId/service-subscriptions/service-subscription/onap-subscription-ServiceType") + .headers(httpHeaders) + .check( + status.find.in(200) + ) + ) + .pause(2,5) + } + + /** + * + * @param env + * @Send a GET pnf depth=all request + */ + def Getpnf2(env: String) = scenario("Get pnfdepthall " + env) + .forever(){ + feed(pnfFeeder) + .exec( + http("Get pnfdepthall " + env) + .get("/aai/v22/network/pnfs/pnf/${pnf-name}?depth=all") + .headers(httpHeaders) + .check( + status.find.in(200) + ) + ) + .pause(2,3) + } + + /** + * + * @param env + * @Send a GET customer request + */ + def Getcustomer(env: String) = scenario("Get customer " + env) + .forever(){ + feed(customerFeeder) + .exec( + http("Get customer " + env) + .get("/aai/v21/business/customers/customer/${global-customer-id}") + .headers(httpHeaders) + .check( + status.find.in(200) + ) + ) + .pause(2,6) + } + + /** + * + * @param env + * @Send a GET owningentity node-only request + */ + def Getowningentity(env: String) = scenario("Get owningentitynodesonly " + env) + .forever(){ + feed(owningentityFeeder) + .exec( + http("Get owningentitynodesonly " + env) + .get("/aai/v21/business/owning-entities/owning-entity/${owning-entity-id}?nodes-only=") + .headers(httpHeaders) + .check( + status.find.in(200) + ) + ) + .pause(2,6) + } + + /** + * + * @param env + * @Send a GET vnfc request + */ + def Getvnfc2(env: String) = scenario("Get vnfc " + env) + .forever(){ + feed(vnfcFeeder) + .exec( + http("Get vnfc " + env) + .get("/aai/v22/network/vnfcs/vnfc/${vnfc-name}") + .headers(httpHeaders) + .check( + status.find.in(200) + ) + ) + .pause(2,6) + } + + /** + * + * @param env + * @Send a GET vlan-tag depth=1 request + */ + def Getvlantag(env: String) = scenario("Get vlantagdepth1 " + env) + .forever(){ + exec( + http("Get vlantagdepth1 " + env) + .get("/aai/v23/cloud-infrastructure/cloud-regions/cloud-region/onap-CROwner/onap-CRId/vlan-ranges/vlan-range/onap-vlanrangeId/vlan-tags?vlan-id-outer=168&depth=1") + .headers(httpHeaders) + .check( + status.find.in(200) + ) + ) + .pause(2,5) + } + + /** + * + * @param env + * @Send a GET project nodes-only request + */ + def Getproject(env: String) = scenario("Get projectnodes-only " + env) + .forever(){ + feed(projectFeeder) + .exec( + http("Get projectnodes-only " + env) + .get("/aai/v21/business/projects/project/${project-name}?nodes-only=") + .headers(httpHeaders) + .check( + status.find.in(200) + ) + ) + .pause(2,6) + } + + /** + * + * @param env + * @Send a GET LOB request + */ + def Getlob(env: String) = scenario("Get LOB " + env) + .forever(){ + feed(lobFeeder) + .exec( + http("Get LOB " + env) + .get("/aai/v21/business/lines-of-business/line-of-business/${line-of-business-name}") + .headers(httpHeaders) + .check( + status.find.in(200) + ) + ) + .pause(1,3) + } + + /** + * + * @param env + * @Send a GET sriov-vf request + */ + def Getsriovvf2(env: String) = scenario("Get sriov-vfcountIndexSize " + env) + .forever(){ + exec( + http("Get sriov-vfcountIndexSize " + env) + .get("/aai/v23/cloud-infrastructure/cloud-regions/cloud-region/onap-CROwner/onap-CRId/tenants/tenant/onap-tenantId/vservers/vserver/onap-vserverId/l-interfaces/l-interface/onap-linterfaceName/sriov-vfs/sriov-vf/onap-PciId?format=count&resultIndex=0&resultSize=1") + .headers(httpHeaders) + .check( + status.find.in(200) + ) + ) + .pause(2,6) + } + + /** + * + * @param env + * @Send a GET snapshot depth=all request + */ + def Getsnapshot(env: String) = scenario("Get snapshotdepthall " + env) + .forever(){ + exec( + http("Get snapshotdepthall " + env) + .get("/aai/v23/cloud-infrastructure/cloud-regions/cloud-region/onap-CROwner/onap-CRId/snapshots/snapshot/onapsnapshotId?depth=all") + .headers(httpHeaders) + .check( + status.find.in(200) + ) + ) + .pause(2,6) + } + + /** + * + * @param env + * @Send a GET volume depth=all request + */ + def Getvolume(env: String) = scenario("Get volumedepthall " + env) + .forever(){ + exec( + http("Get volumedepthall " + env) + .get("/aai/v23/cloud-infrastructure/cloud-regions/cloud-region/onap-CROwner/onap-CRId/tenants/tenant/onap-tenantId/vservers/vserver/onap-vserverId/volumes/volume/onap-volumeid?depth=all") + .headers(httpHeaders) + .check( + status.find.in(200) + ) + ) + .pause(2,6) + } + + /** + * + * @param env + * @Send a GET CR with CRid request + */ + def GetCR(env: String) = scenario("Get CRwithregionid " + env) + .forever(){ + exec( + http("Get CRwithregionid " + env) + .get("/aai/v22/cloud-infrastructure/cloud-regions/?cloud-region-id=onap-CRId") + .headers(httpHeaders) + .check( + status.find.in(200) + ) + ) + .pause(1,2) + } + + /*** + * + * @param env + * Sends a PUT then del vf-module request + */ + def PUTvfmodule(env: String) = scenario("PUT vf-module " + env) + .forever(){ + feed(genericvnfFeeder) + exec(session => { + session.set("svfmodule", idGenerator()) + }) + .exec( + http("PUT vf-module " + env) + .put("/aai/v23/network/generic-vnfs/generic-vnf/onap-genericvnfId/vf-modules/vf-module/${svfmodule}") + .body(ElFileBody("newvf-module_valid.json")) + .headers(httpHeaders) + .check( + status.find.in(201) + ) + ) + .pause(2,14) + .exec( + http("Getvfmodule " + env) + .get("/aai/v23/network/generic-vnfs/generic-vnf/onap-genericvnfId/vf-modules/vf-module/${svfmodule}") + .headers(httpHeaders) + .check( + status.find.in(200) + ) + .check(jsonPath("$.resource-version").saveAs("resourcever")) + ) + .exec( + http("Deletevfmodule " + env) + .delete("/aai/v23/network/generic-vnfs/generic-vnf/onap-genericvnfId/vf-modules/vf-module/${svfmodule}?resource-version=${resourcever}") + .headers(httpHeaders) + .check(status.find.in(204)) + ) + .pause(1,1) + } + + /** + * + * @param env + * @Send a GET all services request + */ + def Getallservices(env: String) = scenario("Get all services " + env) + .forever(){ + exec( + http("Get all services " + env) + .get("/aai/v22/service-design-and-creation/services") + .headers(httpHeaders) +.headers(Map( + "X-FromAppId"-> """ONAP-fromappId""" + )) + .check( + status.find.in(200) + ) + ) + .pause(2,20) + } + + /*** + * + * @param env + * Sends a PUT pservervserver request + */ + def PostBulkSingleTx1(env: String) = scenario("BulkSingleTx1" + env) + //.feed(tenantFeeder) + .forever(){ + exec(session => { + session.set("sPServer", idGenerator()) + }) + .exec(session => { + session.set("sVServer", idGenerator()) + }) + .exec( + http("BulkSingleTx1 " + env) + .post("/aai/v22/bulk/single-transaction") + .body(ElFileBody("onapbulk-single-tx_putPServerVServer.json")) + .headers(httpHeaders) + .check( + status.find.in(201) + ) + ) + .pause(2,5) + .exec( + http("Vserver " + env) + .get("/aai/v22/cloud-infrastructure/cloud-regions/cloud-region/onap-CROwner/onap-CRId/tenants/tenant/onap-tenantId1/vservers/vserver/${sVServer}?depth=0&nodes-only=true") + .headers(httpHeaders) + .check( + status.find.in(200) + ) + .check(jsonPath("$.resource-version").saveAs("rsrcver")) + ) + .exec( + http("Vserver " + env) + .delete("/aai/v22/cloud-infrastructure/cloud-regions/cloud-region/onap-CROwner/onap-CRId/tenants/tenant/onap-tenantId1/vservers/vserver/${sVServer}?resource-version=${rsrcver}") + .headers(httpHeaders) + + .check(status.find.in(204)) + ) + .exec( + http("Pserver " + env) + .get("/aai/v22/cloud-infrastructure/pservers/pserver/${sPServer}?depth=0&nodes-only=true") + .headers(httpHeaders) + .check( + status.find.in(200) + ) + .check(jsonPath("$.resource-version").saveAs("rsrcver")) + ) + .exec( + http("Pserver " + env) + .delete("/aai/v22/cloud-infrastructure/pservers/pserver/${sPServer}?resource-version=${rsrcver}") + .headers(httpHeaders) + .check(status.find.in(204)) + ) + .pause(1,9) + } + + /*** + * + * @param env + * Sends a PUT pservervserver2 request + */ + def PostBulkSingleTx2(env: String) = scenario("BulkSingleTx2 " + env) + .forever(){ + exec(session => { + session.set("sPServer", idGenerator()) + }) + .exec(session => { + session.set("sVServer", idGenerator()) + }) + .exec( + http("BulkSingleTx2" + env) + .post("/aai/v22/bulk/single-transaction") + .body(ElFileBody("onapbulk-single-tx_putPServerVServer.json")) + .headers(httpHeaders) + .check( + status.find.in(201) + ) + ) + .pause(2,33) + .exec( + http("Vserver " + env) + .get("/aai/v22/cloud-infrastructure/cloud-regions/cloud-region/onap-CROwner/onap-CRId/tenants/tenant/onap-tenantId1/vservers/vserver/${sVServer}?depth=0&nodes-only=true") + .headers(httpHeaders) + .check( + status.find.in(200) + ) + .check(jsonPath("$.resource-version").saveAs("rsrcver")) + ) + .exec( + http("Vserver " + env) + .delete("/aai/v22/cloud-infrastructure/cloud-regions/cloud-region/onap-CROwner/onap-CRId/tenants/tenant/onap-tenantId1/vservers/vserver/${sVServer}?resource-version=${rsrcver}") + .headers(httpHeaders) + + .check(status.find.in(204)) + ) + .exec( + http("Pserver " + env) + .get("/aai/v22/cloud-infrastructure/pservers/pserver/${sPServer}?depth=0&nodes-only=true") + .headers(httpHeaders) + .check( + status.find.in(200) + ) + .check(jsonPath("$.resource-version").saveAs("rsrcver")) + ) + .exec( + http("Pserver " + env) + .delete("/aai/v22/cloud-infrastructure/pservers/pserver/${sPServer}?resource-version=${rsrcver}") + .headers(httpHeaders) + .check(status.find.in(204)) + ) + .pause(1,9) + } + + /*** + * + * @param env + * Sends a patch request + */ + def PostBulkSingleTx3(env: String) = scenario("BulkSingleTx3 " + env) + .forever(){ + exec(session => { + session.set("CR1", idGenerator()) + }) + .exec(session => { + session.set("AZ1", idGenerator()) + }) + .exec(session => { + session.set("flavor1", idGenerator()) + }) + .exec(session => { + session.set("image1", idGenerator()) + }) + .exec(session => { + session.set("complex1", idGenerator()) + }) + .exec(session => { + session.set("pserver1", idGenerator()) + }) + .exec(session => { + session.set("pserver2", idGenerator()) + }) + .exec(session => { + session.set("pserver3", idGenerator()) + }) + .exec( + http("BulkSingleTx3 " + env) + .post("/aai/v21/bulk/single-transaction") + .body(ElFileBody("onap-patch-bulk-single-tx.json")) + .headers(httpHeaders) + .check( + status.find.in(201) + ) + ) + .pause(2,5) + } + + /*** + * + * @param env + * @CQ-pserver-zdevice1 + */ + def CQpserverzdevice1(env: String) = scenario("CQ pserverzdeviceresurldepth1 " + env) + .forever(){ + exec( + http("CQ pserverzdeviceresurldepth1 " + env) + .put("/aai/v22/query?format=resource_and_url&depth=1") + .headers(httpHeaders) + .body(ElFileBody("onap-CQ-pserver-zdevice.json")) + .check( + status.find.in(200) + ) + ) + .pause(2,4) + } + + /*** + * + * @param env + * @CQ-pserver-zdevice2 + */ + def CQpserverzdevice2(env: String) = scenario("CQ pserverzdeviceres " + env) + .forever(){ + exec( + http("CQ pserverzdeviceres " + env) + .put("/aai/v22/query?format=resource") + .headers(httpHeaders) + .body(ElFileBody("onap-CQ-pserver-zdevice.json")) + .check( + status.find.in(200) + ) + ) + .pause(2,4) + } + + /*** + * + * @param env + * @CQ-vlanrange-fromVlantag + */ + def CQvlanrangefromVlantag(env: String) = scenario("CQ vlanrangefromVlantag " + env) + .forever(){ + exec( + http("CQ vlanrangefromVlantag " + env) + .put("/aai/v22/query?format=resource") + .headers(httpHeaders) + .body(ElFileBody("onap-CQ-vlanrange-fromVlantag.json")) + .check( + status.find.in(200) + ) + ) + .pause(1,1) + } + + /*** + * + * @param env + * @CQ-getClfiRoadmTailSummary + */ + def CQgetClfiRoadmTailSummary(env: String) = scenario("CQ getClfiRoadmTailSummary " + env) + .forever(){ + exec( + http("CQ getClfiRoadmTailSummary " + env) + .put("/aai/v22/query?format=simple&nodesOnly=true") + .headers(httpHeaders) + .body(ElFileBody("onap-CQ-getClfiRoadmTailSummary.json")) + .check( + status.find.in(200) + ) + ) + .pause(1,1) + } + + /*** + * + * @param env + * @CQ-vrfs-fromVlantag + */ + def CQvrfsfromVlantag(env: String) = scenario("CQ vrfsfromVlantag " + env) + .forever(){ + exec( + http("CQ vrfsfromVlantag " + env) + .put("/aai/v22/query?format=resource") + .headers(httpHeaders) + .body(ElFileBody("onap-CQ-vrfs-fromVlantag.json")) + .check( + status.find.in(200) + ) + ) + .pause(1,1) + } + + /*** + * + * @param env + * @CQ-genericVnfs-fromPserver + */ + def CQgenericVnfsfromPserver(env: String) = scenario("CQ genericVnfsfromPserver " + env) + .forever(){ + exec( + http("CQ genericVnfsfromPserver " + env) + .put("/aai/v22/query?format=resource&depth=0") + .headers(httpHeaders) + .body(ElFileBody("onap-CQ-genericVnfs-fromPserver.json")) + .check( + status.find.in(200) + ) + ) + .pause(2,11) + } + + /*** + * + * @param env + * @CQ-zPnfs-fromPnf + */ + def CQzPnfsfromPnf(env: String) = scenario("CQ zPnfsfromPnf " + env) + .forever(){ + exec( + http("CQ zPnfsfromPnf " + env) + .put("/aai/v22/query?format=resource_and_url&depth=1") + .headers(httpHeaders) + .body(ElFileBody("onap-CQ-zPnfs-fromPnf.json")) + .check( + status.find.in(200) + ) + ) + .pause(2,11) + } + + /*** + * + * @param env + * @DSL1 + */ + def DslQuery1(env: String) = scenario("DSL Query1 " + env) + .forever(){ + exec( + http("DSL Query1 PUT") + .put("/aai/v21/dsl?format=resource") + .headers(httpHeaders) + .body(ElFileBody("onap-DSL1.json")) + .check( + status.find.in(200) + ) + ) + .pause(2,3) + } + + /*** + * + * @param env + * @DSL2 + */ + def DslQuery2(env: String) = scenario("DSL Query2 " + env) + .forever(){ + exec( + http("DSL Query2 PUT") + .put("/aai/v21/dsl?format=resource") + .headers(httpHeaders) + .body(ElFileBody("onap-DSL2.json")) + .check( + status.find.in(200) + ) + ) + .pause(1,1) + } + + /*** + * + * @param env + * @DSL3 + */ + def DslQuery3(env: String) = scenario("DSL Query3 " + env) + .forever(){ + exec( + http("DSL Query3 PUT") + .put("/aai/v21/dsl?format=resource") + .headers(httpHeaders) + .body(ElFileBody("onap-DSL3.json")) + .check( + status.find.in(200) + ) + ) + .pause(2,4) + } + + /*** + * + * @param env + * @DSL4 + */ + def DslQuery4(env: String) = scenario("DSL Query4 " + env) + .forever(){ + exec( + http("DSL Query4 PUT") + .put("/aai/v21/dsl?format=resource") + .headers(httpHeaders) + .body(ElFileBody("onap-DSL4.json")) + .check( + status.find.in(200) + ) + ) + .pause(2,12) + } + + /*** + * + * @param env + * @DSL5 + */ + def DslQuery5(env: String) = scenario("DSL Query5 " + env) + .forever(){ + exec( + http("DSL Query5 PUT") + .put("/aai/v21/dsl?format=resource") + .headers(httpHeaders) + .body(ElFileBody("onap-DSL5.json")) + .check( + status.find.in(200) + ) + ) + .pause(2,13) + } + + /*** + * + * @param env + * @DSL6 + */ + def DslQuery6(env: String) = scenario("DSL Query6 " + env) + .forever(){ + exec( + http("DSL Query6 PUT") + .put("/aai/v21/dsl?format=resource") + .headers(httpHeaders) + .body(ElFileBody("onap-DSL6.json")) + .check( + status.find.in(200) + ) + ) + .pause(2,14) + } + + /*** + * + * @param env + * @DSL7 + */ + def DslQuery7(env: String) = scenario("DSL Query7 " + env) + .forever(){ + exec( + http("DSL Query7 PUT") + .put("/aai/v21/dsl?format=resource") + .headers(httpHeaders) + .body(ElFileBody("onap-DSL7.json")) + .check( + status.find.in(200) + ) + ) + .pause(2,19) + } + + /*** + * + * @param env + * @DSL8 + */ + def DslQuery8(env: String) = scenario("DSL Query8 " + env) + .forever(){ + exec( + http("DSL Query8 PUT") + .put("/aai/v21/dsl?format=resource") + .headers(httpHeaders) + .body(ElFileBody("onap-DSL8.json")) + .check( + status.find.in(200) + ) + ) + .pause(2,9) + } + + /*** + * + * @param env + * @DSL9 + */ + def DslQuery9(env: String) = scenario("DSL Query9 " + env) + .forever(){ + exec( + http("DSL Query9 PUT") + .put("/aai/v21/dsl?format=resource") + .headers(httpHeaders) + .body(ElFileBody("onap-DSL9.json")) + .check( + status.find.in(200) + ) + ) + .pause(2,7) + } + + /*** + * + * @param env + * @DSL10 + */ + def DslQuery10(env: String) = scenario("DSL Query10 " + env) + .forever(){ + exec( + http("DSL Query10 PUT") + .put("/aai/v21/dsl?format=resource") + .headers(httpHeaders) + .headers(Map( + "X-DslApiVersion"-> """V2""" + )) + .body(ElFileBody("onap-DSL10.json")) + .check( + status.find.in(200) + ) + ) + .pause(2,32) + } + + + /*** + * + * @param env + * @Does a Search NodesQuery request + */ + def SearchNodesQuery(env: String) = scenario("GET VNF Search Nodes Query " + env) + .forever(){ + exec( + http("GET VNF Search Nodes Query " + env) + .get("/aai/v23/search/nodes-query?search-node-type=generic-vnf&filter=vnf-name:EQUALS:onap-genericvnfname") + .headers(httpHeaders) + .headers(Map( + "X-FromAppId"-> """ONAP-fromappId""" + )) + .check( + status.find.in(200) + ) + ) + .pause(2,36) + } + + + setUp( + PutTenant("ePerf02").inject(atOnceUsers(1)).protocols(http.baseURL("Enter Host with Port")), +PatchTenant("ePerf02").inject(atOnceUsers(23)).protocols(http.baseURL("Enter Host with Port")), +GetTenant("ePerf02").inject(atOnceUsers(7)).protocols(http.baseURL("Enter Host with Port")), +DeleteTenant("ePerf02").inject(atOnceUsers(1)).protocols(http.baseURL("Enter Host with Port")), +Getvserver1("ePerf02").inject(atOnceUsers(4)).protocols(http.baseURL("Enter Host with Port")), +GetVFModule1("ePerf02").inject(atOnceUsers(2)).protocols(http.baseURL("Enter Host with Port")), +Getvserver2("ePerf02").inject(atOnceUsers(2)).protocols(http.baseURL("Enter Host with Port")), +GetSI1("ePerf02").inject(atOnceUsers(2)).protocols(http.baseURL("Enter Host with Port")), +GetVNF1("ePerf02").inject(atOnceUsers(2)).protocols(http.baseURL("Enter Host with Port")), +GetVNF2("ePerf02").inject(atOnceUsers(2)).protocols(http.baseURL("Enter Host with Port")), +GetPserver1("ePerf02").inject(atOnceUsers(2)).protocols(http.baseURL("Enter Host with Port")), +Getvolumegroup("ePerf02").inject(atOnceUsers(1)).protocols(http.baseURL("Enter Host with Port")), +Getplatform("ePerf02").inject(atOnceUsers(1)).protocols(http.baseURL("Enter Host with Port")), +Getsriovvf1("ePerf02").inject(atOnceUsers(1)).protocols(http.baseURL("Enter Host with Port")), +Getpnf1("ePerf02").inject(atOnceUsers(1)).protocols(http.baseURL("Enter Host with Port")), +Getvnfc1("ePerf02").inject(atOnceUsers(1)).protocols(http.baseURL("Enter Host with Port")), +Getvlan("ePerf02").inject(atOnceUsers(1)).protocols(http.baseURL("Enter Host with Port")), +GetSI2("ePerf02").inject(atOnceUsers(1)).protocols(http.baseURL("Enter Host with Port")), +GetPserver2("ePerf02").inject(atOnceUsers(1)).protocols(http.baseURL("Enter Host with Port")), +Getconfiguration("ePerf02").inject(atOnceUsers(1)).protocols(http.baseURL("Enter Host with Port")), +Getservicesubscription("ePerf02").inject(atOnceUsers(1)).protocols(http.baseURL("Enter Host with Port")), +Getpnf2("ePerf02").inject(atOnceUsers(1)).protocols(http.baseURL("Enter Host with Port")), +Getcustomer("ePerf02").inject(atOnceUsers(1)).protocols(http.baseURL("Enter Host with Port")), +Getowningentity("ePerf02").inject(atOnceUsers(1)).protocols(http.baseURL("Enter Host with Port")), +Getvnfc2("ePerf02").inject(atOnceUsers(1)).protocols(http.baseURL("Enter Host with Port")), +Getvlantag("ePerf02").inject(atOnceUsers(1)).protocols(http.baseURL("Enter Host with Port")), +Getproject("ePerf02").inject(atOnceUsers(1)).protocols(http.baseURL("Enter Host with Port")), +Getlob("ePerf02").inject(atOnceUsers(1)).protocols(http.baseURL("Enter Host with Port")), +Getsriovvf2("ePerf02").inject(atOnceUsers(1)).protocols(http.baseURL("Enter Host with Port")), +Getsnapshot("ePerf02").inject(atOnceUsers(1)).protocols(http.baseURL("Enter Host with Port")), +Getvolume("ePerf02").inject(atOnceUsers(1)).protocols(http.baseURL("Enter Host with Port")), +GetCR("ePerf02").inject(atOnceUsers(1)).protocols(http.baseURL("Enter Host with Port")), +PUTvfmodule("ePerf02").inject(atOnceUsers(1)).protocols(http.baseURL("Enter Host with Port")), +Getallservices("ePerf02").inject(atOnceUsers(1)).protocols(http.baseURL("Enter Host with Port")), +PostBulkSingleTx1("ePerf02").inject(atOnceUsers(1)).protocols(http.baseURL("Enter Host with Port")), +PostBulkSingleTx2("ePerf02").inject(atOnceUsers(1)).protocols(http.baseURL("Enter Host with Port")), +PostBulkSingleTx3("ePerf02").inject(atOnceUsers(1)).protocols(http.baseURL("Enter Host with Port")), +CQpserverzdevice1("ePerf02").inject(atOnceUsers(4)).protocols(http.baseURL("Enter Host with Port")), +CQpserverzdevice2("ePerf02").inject(atOnceUsers(2)).protocols(http.baseURL("Enter Host with Port")), +CQvlanrangefromVlantag("ePerf02").inject(atOnceUsers(2)).protocols(http.baseURL("Enter Host with Port")), +CQgetClfiRoadmTailSummary("ePerf02").inject(atOnceUsers(2)).protocols(http.baseURL("Enter Host with Port")), +CQvrfsfromVlantag("ePerf02").inject(atOnceUsers(1)).protocols(http.baseURL("Enter Host with Port")), +CQgenericVnfsfromPserver("ePerf02").inject(atOnceUsers(1)).protocols(http.baseURL("Enter Host with Port")), +CQzPnfsfromPnf("ePerf02").inject(atOnceUsers(1)).protocols(http.baseURL("Enter Host with Port")), +DslQuery1("ePerf02").inject(atOnceUsers(2)).protocols(http.baseURL("Enter Host with Port")), +DslQuery2("ePerf02").inject(atOnceUsers(1)).protocols(http.baseURL("Enter Host with Port")), +DslQuery3("ePerf02").inject(atOnceUsers(1)).protocols(http.baseURL("Enter Host with Port")), +DslQuery4("ePerf02").inject(atOnceUsers(1)).protocols(http.baseURL("Enter Host with Port")), +DslQuery5("ePerf02").inject(atOnceUsers(1)).protocols(http.baseURL("Enter Host with Port")), +DslQuery6("ePerf02").inject(atOnceUsers(1)).protocols(http.baseURL("Enter Host with Port")), +DslQuery7("ePerf02").inject(atOnceUsers(1)).protocols(http.baseURL("Enter Host with Port")), +DslQuery8("ePerf02").inject(atOnceUsers(1)).protocols(http.baseURL("Enter Host with Port")), +DslQuery9("ePerf02").inject(atOnceUsers(1)).protocols(http.baseURL("Enter Host with Port")), +DslQuery10("ePerf02").inject(atOnceUsers(1)).protocols(http.baseURL("Enter Host with Port")), +SearchNodesQuery("ePerf02").inject(atOnceUsers(1)).protocols(http.baseURL("Enter Host with Port")) + + ).maxDuration(10 minutes) +} diff --git a/gatling/ONAP Baseline.sh b/gatling/ONAP Baseline.sh new file mode 100644 index 0000000..c4109f2 --- /dev/null +++ b/gatling/ONAP Baseline.sh @@ -0,0 +1 @@ +mvn gatling:execute -Dgatling.simulationClass=ONAP_2204_Baseline \ No newline at end of file diff --git a/gatling/ONAP Single API.sh b/gatling/ONAP Single API.sh new file mode 100644 index 0000000..20d18c3 --- /dev/null +++ b/gatling/ONAP Single API.sh @@ -0,0 +1 @@ +mvn -o gatling:execute -Dgatling.simulationClass=ONAP_2204_SingleAPI \ No newline at end of file diff --git a/gatling/ONAP Stress 2022.scala b/gatling/ONAP Stress 2022.scala new file mode 100644 index 0000000..15e83db --- /dev/null +++ b/gatling/ONAP Stress 2022.scala @@ -0,0 +1,1318 @@ +import io.gatling.core.Predef.{exec, _} +import io.gatling.http.Predef._ +import _root_.io.gatling.core.scenario.Simulation +import java.util.UUID +import scala.concurrent.duration._ + +import scala.util.Random + +class ONAP_2204_Stress extends Simulation { + val httpHeaders = Map( + "Accept" -> """application/json""", + "Content-Type"-> """application/json""", + "X-FromAppId"-> """ONAP-fromappId""", + "X-TransactionId"-> """ONAP-transId""", + "Connection"-> """Keep-Alive""" + ) + + def idGenerator() = "random-" + UUID.randomUUID().toString; + val r = scala.util.Random + val feeder = Iterator.continually(Map("randVal" -> (Random.alphanumeric.take(20).mkString))) + + + + val PServerFeeder = csv("./src/test/gatling/bodies/onappservers.csv").random + val serviceInstanceFeeder = csv("./src/test/gatling/bodies/onapserviceinstance.csv").random + val genericvnfFeeder = csv("./src/test/gatling/bodies/onapvnfs.csv").random + val customerFeeder = csv("./src/test/gatling/bodies/onapcustomers.csv").random + val vnfcFeeder = csv("./src/test/gatling/bodies/onapvnfcs.csv").random + val platformFeeder = csv("./src/test/gatling/bodies/onapplatform.csv").random + val pnfFeeder = csv("./src/test/gatling/bodies/onappnfs.csv").random + val configurationFeeder = csv("./src/test/gatling/bodies/onapconfigurations.csv").random + val owningentityFeeder = csv("./src/test/gatling/bodies/onapowning_entity.csv").random + val projectFeeder = csv("./src/test/gatling/bodies/onapproject.csv").random + val lobFeeder = csv("./src/test/gatling/bodies/onapLOB.csv").random + + val host = System.getProperty("TARGET_HOST", "Enter Host with Port"); + val url = "Enter Host without Port" + + val httpBuilder = http.baseURL(host); + + + /*** + * + * @param env + * Sends a PUT tenant request + */ + def PutTenant(env: String) = scenario("Put Tenant " + env) + .forever(){ + exec(session => { + session.set("stenant", idGenerator()) + }) + .exec( + http("PutTenant " + env) + .put("/aai/v23/cloud-infrastructure/cloud-regions/cloud-region/onap-CROwner4/onap-CRId4/tenants/tenant/${stenant}") + .body(ElFileBody("newtenant_valid.json")) + .headers(httpHeaders) + .check( + status.find.in(201) + ) + ) + .pause(2,13) + .exec( + http("GetTenant " + env) + .get("/aai/v23/cloud-infrastructure/cloud-regions/cloud-region/onap-CROwner4/onap-CRId4/tenants/tenant/${stenant}") + .headers(httpHeaders) + .check( + status.find.in(200) + ) + .check(jsonPath("$.resource-version").saveAs("resourcever")) + ) + .exec( + http("DelTenant " + env) + .delete("/aai/v23/cloud-infrastructure/cloud-regions/cloud-region/onap-CROwner4/onap-CRId4/tenants/tenant/${stenant}?resource-version=${resourcever}") + .headers(httpHeaders) + .check(status.find.in(204)) + ) + .pause(1,1) + } + + /*** + * + * @param env + * Sends a PATCH tenant request + */ + def PatchTenant(env: String) = scenario("Patch Tenant " + env) + .forever(){ +// Get the resource version before doing the PATCH + exec( + http("Get Tenant " + env) + .get("/aai/v23/cloud-infrastructure/cloud-regions/cloud-region/onap-CROwner/onap-CRId/tenants/tenant/onap-tenant-patch") + .headers(httpHeaders) + .check( + status.find.in(200) + ) + .check( + jsonPath("$.resource-version").saveAs("rsrcver") + ) + ) + .pause(1,1) + + .exec( + http("Patch Tenant " + env) + .patch("/aai/v23/cloud-infrastructure/cloud-regions/cloud-region/onap-CROwner/onap-CRId/tenants/tenant/onap-tenant-patch?resource-version=${rsrcver}") + .headers(httpHeaders) + .headers(Map( + "Content-Type"-> """application/merge-patch+json""" + )) + .body(ElFileBody("patch-tenant.json")) + .check( + status.find.in(200) + ) + ) + .pause(2,5) + } + + /*** + * + * @param env + * @return Tenant Get depth0 + */ + def GetTenant(env: String) = scenario("Get Tenantdepth0 " + env) + .forever(){ + exec( + http("Get Tenantdepth0 " + env) + .get("/aai/v23/cloud-infrastructure/cloud-regions/cloud-region/onap-CROwner3/onap-CRId3/tenants/tenant/onap-tenantId3?depth=0") + .headers(httpHeaders) + .check( + status.find.in(200) + ) + ) + .pause(2,6) +} + + /*** + * + * @param env + * Sends a DELETE tenant request + */ + def DeleteTenant(env: String) = scenario("Delete Tenant " + env) + .forever(){ + exec(session => { + session.set("stenant", idGenerator()) + }) + .exec( + http("PutTenant " + env) + .put("/aai/v23/cloud-infrastructure/cloud-regions/cloud-region/onap-CROwner5/onap-CRId5/tenants/tenant/${stenant}") + .body(ElFileBody("newtenant_valid.json")) + .headers(httpHeaders) + .check( + status.find.in(201) + ) + ) + .pause(1,1) + .exec( + http("GetTenant " + env) + .get("/aai/v23/cloud-infrastructure/cloud-regions/cloud-region/onap-CROwner5/onap-CRId5/tenants/tenant/${stenant}") + .headers(httpHeaders) + .check( + status.find.in(200) + ) + .check(jsonPath("$.resource-version").saveAs("resourcever")) + ) + .exec( + http("DeleteTenant " + env) + .delete("/aai/v23/cloud-infrastructure/cloud-regions/cloud-region/onap-CROwner5/onap-CRId5/tenants/tenant/${stenant}?resource-version=${resourcever}") + .headers(httpHeaders) + .check(status.find.in(204)) + ) + .pause(1,1) + } + + /** + * + * @param env + * @Send a GET Vserver depth=all request + */ + def Getvserver1(env: String) = scenario("Get Vserverdepthall " + env) + .forever(){ + exec( + http("Get Vserverdepthall " + env) + .get("/aai/v23/cloud-infrastructure/cloud-regions/cloud-region/onap-CROwner2/onap-CRId2/tenants/tenant/onap-tenantId2/vservers/vserver/onap-vserverId2?depth=all") + .headers(httpHeaders) + .check( + status.find.in(200) + ) + ) + .pause(2,5) + } + + /** + * + * @param env + * @Send a GET VF-Module depth=1request + */ + def GetVFModule1(env: String) = scenario("Get VF-Moduledepth1 " + env) + .forever(){ + exec( + http("Get VF-Moduledepthl " + env) + .get("/aai/v23/network/generic-vnfs/generic-vnf/onap-genericvnfId/vf-modules/vf-module/onap-vnfmoduleId?depth=1") + .headers(httpHeaders) + .check( + status.find.in(200) + ) + ) + .pause(2,5) + } + + /** + * + * @param env + * @Send a GET Vserver request + */ + def Getvserver2(env: String) = scenario("Get Vserver " + env) + .forever(){ + exec( + http("Get Vserver " + env) + .get("/aai/v23/cloud-infrastructure/cloud-regions/cloud-region/onap-CROwner2/onap-CRId2/tenants/tenant/onap-tenantId2/vservers/vserver/onap-vserverId2") + .headers(httpHeaders) + .check( + status.find.in(200) + ) + ) + .pause(2,6) + } + + /** + * + * @param env + * @Send a GET SI format=pathed request + */ + def GetSI1(env: String) = scenario("Get SIpathed " + env) + .forever(){ + feed(serviceInstanceFeeder) + .exec( + http("Get SIpathed " + env) + .get("/aai/v23/nodes/service-instances/service-instance/${service-instance-id}?format=pathed") + .headers(httpHeaders) + .check( + status.find.in(200) + ) + ) + .pause(2,3) + } + + /** + * + * @param env + * @Send a V23 GET vnf request + */ + def GetVNF1(env: String) = scenario("Get VNF " + env) + .forever(){ + feed(genericvnfFeeder) + .exec( + http("Get VNF " + env) + .get("/aai/v23/network/generic-vnfs/generic-vnf/${vnf-id}") + .headers(httpHeaders) + .check( + status.find.in(200) + ) + ) + .pause(2,5) + } + + /** + * + * @param env + * @Send a GET vnf depth=1 request + */ + def GetVNF2(env: String) = scenario("Get VNFdepth1 " + env) + .forever(){ + feed(genericvnfFeeder) + .exec( + http("Get VNFdepth1 " + env) + .get("/aai/v23/network/generic-vnfs/generic-vnf/${vnf-id}?depth=1") + .headers(httpHeaders) + .check( + status.find.in(200) + ) + ) + .pause(2,5) + } + + + /** + * + * @param env + * @Send a GET pservers depth=all request + */ + def GetPserver1(env: String) = scenario("Get Pserverdepthall " + env) + .forever(){ + feed(PServerFeeder) + .exec( + http("Get Pserverdepthall " + env) + .get("/aai/v22/cloud-infrastructure/pservers/pserver/${hostname}?depth=all") + .headers(httpHeaders) + .check( + status.find.in(200) + ) + ) + .pause(2,5) + } + + /** + * + * @param env + * @Send a GET volume-group request + */ + def Getvolumegroup(env: String) = scenario("Get volume-group " + env) + .forever(){ + exec( + http("Get volume-group " + env) + .get("/aai/v23/cloud-infrastructure/cloud-regions/cloud-region/onap-CROwner/onap-CRId/volume-groups/volume-group/onap-volumegpId") + .headers(httpHeaders) + .check( + status.find.in(200) + ) + ) + .pause(2,6) + } + + /** + * + * @param env + * @Send a GET platform request + */ + def Getplatform(env: String) = scenario("Get platformnodes-only " + env) + .forever(){ + feed(platformFeeder) + .exec( + http("Get platformnodes-only " + env) + .get("/aai/v22/business/platforms/platform/${platform-name}?nodes-only=") + .headers(httpHeaders) + .check( + status.find.in(200) + ) + ) + .pause(2,6) + } + + /** + * + * @param env + * @Send a GET sriov-vf depth=all request + */ + def Getsriovvf1(env: String) = scenario("Get sriov-vfdepthall " + env) + .forever(){ + exec( + http("Get sriov-vfdepthall " + env) + .get("/aai/v23/cloud-infrastructure/cloud-regions/cloud-region/onap-CROwner/onap-CRId/tenants/tenant/onap-tenantId/vservers/vserver/onap-vserverId/l-interfaces/l-interface/onap-linterfaceName/sriov-vfs/sriov-vf/onap-PciId?depth=all") + .headers(httpHeaders) + .check( + status.find.in(200) + ) + ) + .pause(2,6) + } + + /** + * + * @param env + * @Send a GET pnf request + */ + def Getpnf1(env: String) = scenario("Get pnf " + env) + .forever(){ + feed(pnfFeeder) + .exec( + http("Get pnf " + env) + .get("/aai/v22/network/pnfs/pnf/${pnf-name}") + .headers(httpHeaders) + .check( + status.find.in(200) + ) + ) + .pause(2,6) + } + + /** + * + * @param env + * @Send a vnfc depth=1 request + */ + def Getvnfc1(env: String) = scenario("Get vnfcdepth1 " + env) + .forever(){ + feed(vnfcFeeder) + .exec( + http("Get vnfcdepth1 " + env) + .get("/aai/v22/network/vnfcs/vnfc/${vnfc-name}?depth=1") + .headers(httpHeaders) + .check( + status.find.in(200) + ) + ) + .pause(2,5) + } + + /** + * + * @param env + * @Send a GET vlan depth=1 request + */ + def Getvlan(env: String) = scenario("Get vlandepth1 " + env) + .forever(){ + exec( + http("Get vlandepth1 " + env) + .get("/aai/v22/network/generic-vnfs/generic-vnf/onap-genericvnfId/l-interfaces/l-interface/onap-linterfaceId/vlans/vlan/onap-vlanInterface?depth=1") + .headers(httpHeaders) + .check( + status.find.in(200) + ) + ) + .pause(2,5) + } + + /** + * + * @param env + * @Send a GET SI depth=2 request + */ + def GetSI2(env: String) = scenario("Get SIdepth2 " + env) + .forever(){ + exec( + http("Get SIdepth2 " + env) + .get("/aai/v22/business/customers/customer/onap-customerId/service-subscriptions/service-subscription/onap-subscription-ServiceType/service-instances/service-instance/onap-serviceinstanceId?depth=2") + .headers(httpHeaders) + .check( + status.find.in(200) + ) + ) + .pause(2,4) + } + + /** + * + * @param env + * @Send a GET pserver request + */ + def GetPserver2(env: String) = scenario("Get Pserver " + env) + .forever(){ + feed(PServerFeeder) + .exec( + http("Get Pserver " + env) + .get("/aai/v22/cloud-infrastructure/pservers/pserver/${hostname}") + .headers(httpHeaders) + .check( + status.find.in(200) + ) + ) + .pause(2,5) + } + + /** + * + * @param env + * @Send a GET configuration depth=1 request + */ + def Getconfiguration(env: String) = scenario("Get configurationdepth1 " + env) + .forever(){ + feed(configurationFeeder) + .exec( + http("Get configurationdepth1 " + env) + .get("/aai/v22/network/configurations/configuration/${configuration-id}?depth=1") + .headers(httpHeaders) + .check( + status.find.in(200) + ) + ) + .pause(2,5) + } + + /** + * + * @param env + * @Send a GET service-subscription request + */ + def Getservicesubscription(env: String) = scenario("Get service-subscription " + env) + .forever(){ + exec( + http("Getservice-subscription " + env) + .get("/aai/v22/business/customers/customer/onap-customerId/service-subscriptions/service-subscription/onap-subscription-ServiceType") + .headers(httpHeaders) + .check( + status.find.in(200) + ) + ) + .pause(2,5) + } + + /** + * + * @param env + * @Send a GET pnf depth=all request + */ + def Getpnf2(env: String) = scenario("Get pnfdepthall " + env) + .forever(){ + feed(pnfFeeder) + .exec( + http("Get pnfdepthall " + env) + .get("/aai/v22/network/pnfs/pnf/${pnf-name}?depth=all") + .headers(httpHeaders) + .check( + status.find.in(200) + ) + ) + .pause(2,3) + } + + /** + * + * @param env + * @Send a GET customer request + */ + def Getcustomer(env: String) = scenario("Get customer " + env) + .forever(){ + feed(customerFeeder) + .exec( + http("Get customer " + env) + .get("/aai/v21/business/customers/customer/${global-customer-id}") + .headers(httpHeaders) + .check( + status.find.in(200) + ) + ) + .pause(2,6) + } + + /** + * + * @param env + * @Send a GET owningentity node-only request + */ + def Getowningentity(env: String) = scenario("Get owningentitynodesonly " + env) + .forever(){ + feed(owningentityFeeder) + .exec( + http("Get owningentitynodesonly " + env) + .get("/aai/v21/business/owning-entities/owning-entity/${owning-entity-id}?nodes-only=") + .headers(httpHeaders) + .check( + status.find.in(200) + ) + ) + .pause(2,6) + } + + /** + * + * @param env + * @Send a GET vnfc request + */ + def Getvnfc2(env: String) = scenario("Get vnfc " + env) + .forever(){ + feed(vnfcFeeder) + .exec( + http("Get vnfc " + env) + .get("/aai/v22/network/vnfcs/vnfc/${vnfc-name}") + .headers(httpHeaders) + .check( + status.find.in(200) + ) + ) + .pause(2,6) + } + + /** + * + * @param env + * @Send a GET vlan-tag depth=1 request + */ + def Getvlantag(env: String) = scenario("Get vlantagdepth1 " + env) + .forever(){ + exec( + http("Get vlantagdepth1 " + env) + .get("/aai/v23/cloud-infrastructure/cloud-regions/cloud-region/onap-CROwner/onap-CRId/vlan-ranges/vlan-range/onap-vlanrangeId/vlan-tags?vlan-id-outer=168&depth=1") + .headers(httpHeaders) + .check( + status.find.in(200) + ) + ) + .pause(2,5) + } + + /** + * + * @param env + * @Send a GET project nodes-only request + */ + def Getproject(env: String) = scenario("Get projectnodes-only " + env) + .forever(){ + feed(projectFeeder) + .exec( + http("Get projectnodes-only " + env) + .get("/aai/v21/business/projects/project/${project-name}?nodes-only=") + .headers(httpHeaders) + .check( + status.find.in(200) + ) + ) + .pause(2,6) + } + + /** + * + * @param env + * @Send a GET LOB request + */ + def Getlob(env: String) = scenario("Get LOB " + env) + .forever(){ + feed(lobFeeder) + .exec( + http("Get LOB " + env) + .get("/aai/v21/business/lines-of-business/line-of-business/${line-of-business-name}") + .headers(httpHeaders) + .check( + status.find.in(200) + ) + ) + .pause(1,3) + } + + /** + * + * @param env + * @Send a GET sriov-vf request + */ + def Getsriovvf2(env: String) = scenario("Get sriov-vfcountIndexSize " + env) + .forever(){ + exec( + http("Get sriov-vfcountIndexSize " + env) + .get("/aai/v23/cloud-infrastructure/cloud-regions/cloud-region/onap-CROwner/onap-CRId/tenants/tenant/onap-tenantId/vservers/vserver/onap-vserverId/l-interfaces/l-interface/onap-linterfaceName/sriov-vfs/sriov-vf/onap-PciId?format=count&resultIndex=0&resultSize=1") + .headers(httpHeaders) + .check( + status.find.in(200) + ) + ) + .pause(2,6) + } + + /** + * + * @param env + * @Send a GET snapshot depth=all request + */ + def Getsnapshot(env: String) = scenario("Get snapshotdepthall " + env) + .forever(){ + exec( + http("Get snapshotdepthall " + env) + .get("/aai/v23/cloud-infrastructure/cloud-regions/cloud-region/onap-CROwner/onap-CRId/snapshots/snapshot/onapsnapshotId?depth=all") + .headers(httpHeaders) + .check( + status.find.in(200) + ) + ) + .pause(2,6) + } + + /** + * + * @param env + * @Send a GET volume depth=all request + */ + def Getvolume(env: String) = scenario("Get volumedepthall " + env) + .forever(){ + exec( + http("Get volumedepthall " + env) + .get("/aai/v23/cloud-infrastructure/cloud-regions/cloud-region/onap-CROwner/onap-CRId/tenants/tenant/onap-tenantId/vservers/vserver/onap-vserverId/volumes/volume/onap-volumeid?depth=all") + .headers(httpHeaders) + .check( + status.find.in(200) + ) + ) + .pause(2,6) + } + + /** + * + * @param env + * @Send a GET CR with CRid request + */ + def GetCR(env: String) = scenario("Get CRwithregionid " + env) + .forever(){ + exec( + http("Get CRwithregionid " + env) + .get("/aai/v22/cloud-infrastructure/cloud-regions/?cloud-region-id=onap-CRId") + .headers(httpHeaders) + .check( + status.find.in(200) + ) + ) + .pause(1,2) + } + + /*** + * + * @param env + * Sends a PUT then del vf-module request + */ + def PUTvfmodule(env: String) = scenario("PUT vf-module " + env) + .forever(){ + feed(genericvnfFeeder) + exec(session => { + session.set("svfmodule", idGenerator()) + }) + .exec( + http("PUT vf-module " + env) + .put("/aai/v23/network/generic-vnfs/generic-vnf/onap-genericvnfId/vf-modules/vf-module/${svfmodule}") + .body(ElFileBody("newvf-module_valid.json")) + .headers(httpHeaders) + .check( + status.find.in(201) + ) + ) + .pause(2,14) + .exec( + http("Getvfmodule " + env) + .get("/aai/v23/network/generic-vnfs/generic-vnf/onap-genericvnfId/vf-modules/vf-module/${svfmodule}") + .headers(httpHeaders) + .check( + status.find.in(200) + ) + .check(jsonPath("$.resource-version").saveAs("resourcever")) + ) + .exec( + http("Deletevfmodule " + env) + .delete("/aai/v23/network/generic-vnfs/generic-vnf/onap-genericvnfId/vf-modules/vf-module/${svfmodule}?resource-version=${resourcever}") + .headers(httpHeaders) + .check(status.find.in(204)) + ) + .pause(1,1) + } + + /** + * + * @param env + * @Send a GET all services request + */ + def Getallservices(env: String) = scenario("Get all services " + env) + .forever(){ + exec( + http("Get all services " + env) + .get("/aai/v22/service-design-and-creation/services") + .headers(httpHeaders) +.headers(Map( + "X-FromAppId"-> """ONAP-fromappId""" + )) + .check( + status.find.in(200) + ) + ) + .pause(2,20) + } + + /*** + * + * @param env + * Sends a PUT pservervserver request + */ + def PostBulkSingleTx1(env: String) = scenario("BulkSingleTx1" + env) + //.feed(tenantFeeder) + .forever(){ + exec(session => { + session.set("sPServer", idGenerator()) + }) + .exec(session => { + session.set("sVServer", idGenerator()) + }) + .exec( + http("BulkSingleTx1 " + env) + .post("/aai/v22/bulk/single-transaction") + .body(ElFileBody("onapbulk-single-tx_putPServerVServer.json")) + .headers(httpHeaders) + .check( + status.find.in(201) + ) + ) + .pause(2,5) + .exec( + http("Vserver " + env) + .get("/aai/v22/cloud-infrastructure/cloud-regions/cloud-region/onap-CROwner/onap-CRId/tenants/tenant/onap-tenantId1/vservers/vserver/${sVServer}?depth=0&nodes-only=true") + .headers(httpHeaders) + .check( + status.find.in(200) + ) + .check(jsonPath("$.resource-version").saveAs("rsrcver")) + ) + .exec( + http("Vserver " + env) + .delete("/aai/v22/cloud-infrastructure/cloud-regions/cloud-region/onap-CROwner/onap-CRId/tenants/tenant/onap-tenantId1/vservers/vserver/${sVServer}?resource-version=${rsrcver}") + .headers(httpHeaders) + + .check(status.find.in(204)) + ) + .exec( + http("Pserver " + env) + .get("/aai/v22/cloud-infrastructure/pservers/pserver/${sPServer}?depth=0&nodes-only=true") + .headers(httpHeaders) + .check( + status.find.in(200) + ) + .check(jsonPath("$.resource-version").saveAs("rsrcver")) + ) + .exec( + http("Pserver " + env) + .delete("/aai/v22/cloud-infrastructure/pservers/pserver/${sPServer}?resource-version=${rsrcver}") + .headers(httpHeaders) + .check(status.find.in(204)) + ) + .pause(1,9) + } + + /*** + * + * @param env + * Sends a PUT pservervserver2 request + */ + def PostBulkSingleTx2(env: String) = scenario("BulkSingleTx2 " + env) + .forever(){ + exec(session => { + session.set("sPServer", idGenerator()) + }) + .exec(session => { + session.set("sVServer", idGenerator()) + }) + .exec( + http("BulkSingleTx2" + env) + .post("/aai/v22/bulk/single-transaction") + .body(ElFileBody("onapbulk-single-tx_putPServerVServer.json")) + .headers(httpHeaders) + .check( + status.find.in(201) + ) + ) + .pause(2,33) + .exec( + http("Vserver " + env) + .get("/aai/v22/cloud-infrastructure/cloud-regions/cloud-region/onap-CROwner/onap-CRId/tenants/tenant/onap-tenantId1/vservers/vserver/${sVServer}?depth=0&nodes-only=true") + .headers(httpHeaders) + .check( + status.find.in(200) + ) + .check(jsonPath("$.resource-version").saveAs("rsrcver")) + ) + .exec( + http("Vserver " + env) + .delete("/aai/v22/cloud-infrastructure/cloud-regions/cloud-region/onap-CROwner/onap-CRId/tenants/tenant/onap-tenantId1/vservers/vserver/${sVServer}?resource-version=${rsrcver}") + .headers(httpHeaders) + + .check(status.find.in(204)) + ) + .exec( + http("Pserver " + env) + .get("/aai/v22/cloud-infrastructure/pservers/pserver/${sPServer}?depth=0&nodes-only=true") + .headers(httpHeaders) + .check( + status.find.in(200) + ) + .check(jsonPath("$.resource-version").saveAs("rsrcver")) + ) + .exec( + http("Pserver " + env) + .delete("/aai/v22/cloud-infrastructure/pservers/pserver/${sPServer}?resource-version=${rsrcver}") + .headers(httpHeaders) + .check(status.find.in(204)) + ) + .pause(1,9) + } + + /*** + * + * @param env + * Sends a patch request + */ + def PostBulkSingleTx3(env: String) = scenario("BulkSingleTx3 " + env) + .forever(){ + exec(session => { + session.set("CR1", idGenerator()) + }) + .exec(session => { + session.set("AZ1", idGenerator()) + }) + .exec(session => { + session.set("flavor1", idGenerator()) + }) + .exec(session => { + session.set("image1", idGenerator()) + }) + .exec(session => { + session.set("complex1", idGenerator()) + }) + .exec(session => { + session.set("pserver1", idGenerator()) + }) + .exec(session => { + session.set("pserver2", idGenerator()) + }) + .exec(session => { + session.set("pserver3", idGenerator()) + }) + .exec( + http("BulkSingleTx3 " + env) + .post("/aai/v21/bulk/single-transaction") + .body(ElFileBody("onap-patch-bulk-single-tx.json")) + .headers(httpHeaders) + .check( + status.find.in(201) + ) + ) + .pause(2,5) + } + + /*** + * + * @param env + * @CQ-pserver-zdevice1 + */ + def CQpserverzdevice1(env: String) = scenario("CQ pserverzdeviceresurldepth1 " + env) + .forever(){ + exec( + http("CQ pserverzdeviceresurldepth1 " + env) + .put("/aai/v22/query?format=resource_and_url&depth=1") + .headers(httpHeaders) + .body(ElFileBody("onap-CQ-pserver-zdevice.json")) + .check( + status.find.in(200) + ) + ) + .pause(2,4) + } + + /*** + * + * @param env + * @CQ-pserver-zdevice2 + */ + def CQpserverzdevice2(env: String) = scenario("CQ pserverzdeviceres " + env) + .forever(){ + exec( + http("CQ pserverzdeviceres " + env) + .put("/aai/v22/query?format=resource") + .headers(httpHeaders) + .body(ElFileBody("onap-CQ-pserver-zdevice.json")) + .check( + status.find.in(200) + ) + ) + .pause(2,4) + } + + /*** + * + * @param env + * @CQ-vlanrange-fromVlantag + */ + def CQvlanrangefromVlantag(env: String) = scenario("CQ vlanrangefromVlantag " + env) + .forever(){ + exec( + http("CQ vlanrangefromVlantag " + env) + .put("/aai/v22/query?format=resource") + .headers(httpHeaders) + .body(ElFileBody("onap-CQ-vlanrange-fromVlantag.json")) + .check( + status.find.in(200) + ) + ) + .pause(1,1) + } + + /*** + * + * @param env + * @CQ-getClfiRoadmTailSummary + */ + def CQgetClfiRoadmTailSummary(env: String) = scenario("CQ getClfiRoadmTailSummary " + env) + .forever(){ + exec( + http("CQ getClfiRoadmTailSummary " + env) + .put("/aai/v22/query?format=simple&nodesOnly=true") + .headers(httpHeaders) + .body(ElFileBody("onap-CQ-getClfiRoadmTailSummary.json")) + .check( + status.find.in(200) + ) + ) + .pause(1,1) + } + + /*** + * + * @param env + * @CQ-vrfs-fromVlantag + */ + def CQvrfsfromVlantag(env: String) = scenario("CQ vrfsfromVlantag " + env) + .forever(){ + exec( + http("CQ vrfsfromVlantag " + env) + .put("/aai/v22/query?format=resource") + .headers(httpHeaders) + .body(ElFileBody("onap-CQ-vrfs-fromVlantag.json")) + .check( + status.find.in(200) + ) + ) + .pause(1,1) + } + + /*** + * + * @param env + * @CQ-genericVnfs-fromPserver + */ + def CQgenericVnfsfromPserver(env: String) = scenario("CQ genericVnfsfromPserver " + env) + .forever(){ + exec( + http("CQ genericVnfsfromPserver " + env) + .put("/aai/v22/query?format=resource&depth=0") + .headers(httpHeaders) + .body(ElFileBody("onap-CQ-genericVnfs-fromPserver.json")) + .check( + status.find.in(200) + ) + ) + .pause(2,11) + } + + /*** + * + * @param env + * @CQ-zPnfs-fromPnf + */ + def CQzPnfsfromPnf(env: String) = scenario("CQ zPnfsfromPnf " + env) + .forever(){ + exec( + http("CQ zPnfsfromPnf " + env) + .put("/aai/v22/query?format=resource_and_url&depth=1") + .headers(httpHeaders) + .body(ElFileBody("onap-CQ-zPnfs-fromPnf.json")) + .check( + status.find.in(200) + ) + ) + .pause(2,11) + } + + /*** + * + * @param env + * @DSL1 + */ + def DslQuery1(env: String) = scenario("DSL Query1 " + env) + .forever(){ + exec( + http("DSL Query1 PUT") + .put("/aai/v21/dsl?format=resource") + .headers(httpHeaders) + .body(ElFileBody("onap-DSL1.json")) + .check( + status.find.in(200) + ) + ) + .pause(2,3) + } + + /*** + * + * @param env + * @DSL2 + */ + def DslQuery2(env: String) = scenario("DSL Query2 " + env) + .forever(){ + exec( + http("DSL Query2 PUT") + .put("/aai/v21/dsl?format=resource") + .headers(httpHeaders) + .body(ElFileBody("onap-DSL2.json")) + .check( + status.find.in(200) + ) + ) + .pause(1,1) + } + + /*** + * + * @param env + * @DSL3 + */ + def DslQuery3(env: String) = scenario("DSL Query3 " + env) + .forever(){ + exec( + http("DSL Query3 PUT") + .put("/aai/v21/dsl?format=resource") + .headers(httpHeaders) + .body(ElFileBody("onap-DSL3.json")) + .check( + status.find.in(200) + ) + ) + .pause(2,4) + } + + /*** + * + * @param env + * @DSL4 + */ + def DslQuery4(env: String) = scenario("DSL Query4 " + env) + .forever(){ + exec( + http("DSL Query4 PUT") + .put("/aai/v21/dsl?format=resource") + .headers(httpHeaders) + .body(ElFileBody("onap-DSL4.json")) + .check( + status.find.in(200) + ) + ) + .pause(2,12) + } + + /*** + * + * @param env + * @DSL5 + */ + def DslQuery5(env: String) = scenario("DSL Query5 " + env) + .forever(){ + exec( + http("DSL Query5 PUT") + .put("/aai/v21/dsl?format=resource") + .headers(httpHeaders) + .body(ElFileBody("onap-DSL5.json")) + .check( + status.find.in(200) + ) + ) + .pause(2,13) + } + + /*** + * + * @param env + * @DSL6 + */ + def DslQuery6(env: String) = scenario("DSL Query6 " + env) + .forever(){ + exec( + http("DSL Query6 PUT") + .put("/aai/v21/dsl?format=resource") + .headers(httpHeaders) + .body(ElFileBody("onap-DSL6.json")) + .check( + status.find.in(200) + ) + ) + .pause(2,14) + } + + /*** + * + * @param env + * @DSL7 + */ + def DslQuery7(env: String) = scenario("DSL Query7 " + env) + .forever(){ + exec( + http("DSL Query7 PUT") + .put("/aai/v21/dsl?format=resource") + .headers(httpHeaders) + .body(ElFileBody("onap-DSL7.json")) + .check( + status.find.in(200) + ) + ) + .pause(2,19) + } + + /*** + * + * @param env + * @DSL8 + */ + def DslQuery8(env: String) = scenario("DSL Query8 " + env) + .forever(){ + exec( + http("DSL Query8 PUT") + .put("/aai/v21/dsl?format=resource") + .headers(httpHeaders) + .body(ElFileBody("onap-DSL8.json")) + .check( + status.find.in(200) + ) + ) + .pause(2,9) + } + + /*** + * + * @param env + * @DSL9 + */ + def DslQuery9(env: String) = scenario("DSL Query9 " + env) + .forever(){ + exec( + http("DSL Query9 PUT") + .put("/aai/v21/dsl?format=resource") + .headers(httpHeaders) + .body(ElFileBody("onap-DSL9.json")) + .check( + status.find.in(200) + ) + ) + .pause(2,7) + } + + /*** + * + * @param env + * @DSL10 + */ + def DslQuery10(env: String) = scenario("DSL Query10 " + env) + .forever(){ + exec( + http("DSL Query10 PUT") + .put("/aai/v21/dsl?format=resource") + .headers(httpHeaders) + .headers(Map( + "X-DslApiVersion"-> """V2""" + )) + .body(ElFileBody("onap-DSL10.json")) + .check( + status.find.in(200) + ) + ) + .pause(2,32) + } + + + /*** + * + * @param env + * @Does a Search NodesQuery request + */ + def SearchNodesQuery(env: String) = scenario("GET VNF Search Nodes Query " + env) + .forever(){ + exec( + http("GET VNF Search Nodes Query " + env) + .get("/aai/v23/search/nodes-query?search-node-type=generic-vnf&filter=vnf-name:EQUALS:onap-genericvnfname") + .headers(httpHeaders) + .headers(Map( + "X-FromAppId"-> """ONAP-fromappId""" + )) + .check( + status.find.in(200) + ) + ) + .pause(2,36) + } + + + setUp( + PutTenant("ePerf02").inject(atOnceUsers(5)).protocols(http.baseURL("Enter Host with Port")), +PatchTenant("ePerf02").inject(atOnceUsers(115)).protocols(http.baseURL("Enter Host with Port")), +GetTenant("ePerf02").inject(atOnceUsers(35)).protocols(http.baseURL("Enter Host with Port")), +DeleteTenant("ePerf02").inject(atOnceUsers(5)).protocols(http.baseURL("Enter Host with Port")), +Getvserver1("ePerf02").inject(atOnceUsers(20)).protocols(http.baseURL("Enter Host with Port")), +GetVFModule1("ePerf02").inject(atOnceUsers(10)).protocols(http.baseURL("Enter Host with Port")), +Getvserver2("ePerf02").inject(atOnceUsers(10)).protocols(http.baseURL("Enter Host with Port")), +GetSI1("ePerf02").inject(atOnceUsers(10)).protocols(http.baseURL("Enter Host with Port")), +GetVNF1("ePerf02").inject(atOnceUsers(10)).protocols(http.baseURL("Enter Host with Port")), +GetVNF2("ePerf02").inject(atOnceUsers(10)).protocols(http.baseURL("Enter Host with Port")), +GetPserver1("ePerf02").inject(atOnceUsers(10)).protocols(http.baseURL("Enter Host with Port")), +Getvolumegroup("ePerf02").inject(atOnceUsers(5)).protocols(http.baseURL("Enter Host with Port")), +Getplatform("ePerf02").inject(atOnceUsers(5)).protocols(http.baseURL("Enter Host with Port")), +Getsriovvf1("ePerf02").inject(atOnceUsers(5)).protocols(http.baseURL("Enter Host with Port")), +Getpnf1("ePerf02").inject(atOnceUsers(5)).protocols(http.baseURL("Enter Host with Port")), +Getvnfc1("ePerf02").inject(atOnceUsers(5)).protocols(http.baseURL("Enter Host with Port")), +Getvlan("ePerf02").inject(atOnceUsers(5)).protocols(http.baseURL("Enter Host with Port")), +GetSI2("ePerf02").inject(atOnceUsers(5)).protocols(http.baseURL("Enter Host with Port")), +GetPserver2("ePerf02").inject(atOnceUsers(5)).protocols(http.baseURL("Enter Host with Port")), +Getconfiguration("ePerf02").inject(atOnceUsers(5)).protocols(http.baseURL("Enter Host with Port")), +Getservicesubscription("ePerf02").inject(atOnceUsers(5)).protocols(http.baseURL("Enter Host with Port")), +Getpnf2("ePerf02").inject(atOnceUsers(5)).protocols(http.baseURL("Enter Host with Port")), +Getcustomer("ePerf02").inject(atOnceUsers(5)).protocols(http.baseURL("Enter Host with Port")), +Getowningentity("ePerf02").inject(atOnceUsers(5)).protocols(http.baseURL("Enter Host with Port")), +Getvnfc2("ePerf02").inject(atOnceUsers(5)).protocols(http.baseURL("Enter Host with Port")), +Getvlantag("ePerf02").inject(atOnceUsers(5)).protocols(http.baseURL("Enter Host with Port")), +Getproject("ePerf02").inject(atOnceUsers(5)).protocols(http.baseURL("Enter Host with Port")), +Getlob("ePerf02").inject(atOnceUsers(5)).protocols(http.baseURL("Enter Host with Port")), +Getsriovvf2("ePerf02").inject(atOnceUsers(5)).protocols(http.baseURL("Enter Host with Port")), +Getsnapshot("ePerf02").inject(atOnceUsers(5)).protocols(http.baseURL("Enter Host with Port")), +Getvolume("ePerf02").inject(atOnceUsers(5)).protocols(http.baseURL("Enter Host with Port")), +GetCR("ePerf02").inject(atOnceUsers(5)).protocols(http.baseURL("Enter Host with Port")), +PUTvfmodule("ePerf02").inject(atOnceUsers(5)).protocols(http.baseURL("Enter Host with Port")), +Getallservices("ePerf02").inject(atOnceUsers(5)).protocols(http.baseURL("Enter Host with Port")), +PostBulkSingleTx1("ePerf02").inject(atOnceUsers(5)).protocols(http.baseURL("Enter Host with Port")), +PostBulkSingleTx2("ePerf02").inject(atOnceUsers(5)).protocols(http.baseURL("Enter Host with Port")), +PostBulkSingleTx3("ePerf02").inject(atOnceUsers(5)).protocols(http.baseURL("Enter Host with Port")), +CQpserverzdevice1("ePerf02").inject(atOnceUsers(20)).protocols(http.baseURL("Enter Host with Port")), +CQpserverzdevice2("ePerf02").inject(atOnceUsers(10)).protocols(http.baseURL("Enter Host with Port")), +CQvlanrangefromVlantag("ePerf02").inject(atOnceUsers(10)).protocols(http.baseURL("Enter Host with Port")), +CQgetClfiRoadmTailSummary("ePerf02").inject(atOnceUsers(10)).protocols(http.baseURL("Enter Host with Port")), +CQvrfsfromVlantag("ePerf02").inject(atOnceUsers(5)).protocols(http.baseURL("Enter Host with Port")), +CQgenericVnfsfromPserver("ePerf02").inject(atOnceUsers(5)).protocols(http.baseURL("Enter Host with Port")), +CQzPnfsfromPnf("ePerf02").inject(atOnceUsers(5)).protocols(http.baseURL("Enter Host with Port")), +DslQuery1("ePerf02").inject(atOnceUsers(10)).protocols(http.baseURL("Enter Host with Port")), +DslQuery2("ePerf02").inject(atOnceUsers(5)).protocols(http.baseURL("Enter Host with Port")), +DslQuery3("ePerf02").inject(atOnceUsers(5)).protocols(http.baseURL("Enter Host with Port")), +DslQuery4("ePerf02").inject(atOnceUsers(5)).protocols(http.baseURL("Enter Host with Port")), +DslQuery5("ePerf02").inject(atOnceUsers(5)).protocols(http.baseURL("Enter Host with Port")), +DslQuery6("ePerf02").inject(atOnceUsers(5)).protocols(http.baseURL("Enter Host with Port")), +DslQuery7("ePerf02").inject(atOnceUsers(5)).protocols(http.baseURL("Enter Host with Port")), +DslQuery8("ePerf02").inject(atOnceUsers(5)).protocols(http.baseURL("Enter Host with Port")), +DslQuery9("ePerf02").inject(atOnceUsers(5)).protocols(http.baseURL("Enter Host with Port")), +DslQuery10("ePerf02").inject(atOnceUsers(5)).protocols(http.baseURL("Enter Host with Port")), +SearchNodesQuery("ePerf02").inject(atOnceUsers(5)).protocols(http.baseURL("Enter Host with Port")) + + ).maxDuration(10 minutes) +} + diff --git a/gatling/ONAP Stress.sh b/gatling/ONAP Stress.sh new file mode 100644 index 0000000..0252539 --- /dev/null +++ b/gatling/ONAP Stress.sh @@ -0,0 +1 @@ +mvn gatling:execute -Dgatling.simulationClass=ONAP_2204_Stress \ No newline at end of file diff --git a/gatling/ONAP single API 2022.scala b/gatling/ONAP single API 2022.scala new file mode 100644 index 0000000..c0ab5c7 --- /dev/null +++ b/gatling/ONAP single API 2022.scala @@ -0,0 +1,754 @@ +import io.gatling.core.Predef.{exec, _} +import io.gatling.http.Predef._ +import _root_.io.gatling.core.scenario.Simulation +import java.util.UUID +import scala.concurrent.duration._ + +import scala.util.Random + +class ONAP_2204_SingleAPI extends Simulation { + + val httpHeaders = Map( + "Accept" -> """application/json""", + "Content-Type"-> """application/json""", + "X-FromAppId"-> """ONAP-fromappId""", + "X-TransactionId"-> """ONAP-transId""", + "Connection"-> """Keep-Alive""" + ) + + def idGenerator() = "random-" + UUID.randomUUID().toString; + val feeder = Iterator.continually(Map("randVal" -> (Random.alphanumeric.take(20).mkString))) + + val tenantFeeder = csv("./src/test/gatling/bodies/onaptenants.csv").random + val LogLinkFeeder = csv("./src/test/gatling/bodies/onaploglinks.csv").random + val PServerFeeder = csv("./src/test/gatling/bodies/onappservers.csv").random + val serviceInstanceFeeder = csv("./src/test/gatling/bodies/onapserviceinstance.csv").random + val genericvnfFeeder = csv("./src/test/gatling/bodies/onapvnfs.csv").random + val CloudRegionFeeder = csv("./src/test/gatling/bodies/onapcloudregions.csv").random + val ComplexFeeder = csv("./src/test/gatling/bodies/onapcomplexes.csv").random + val customerFeeder = csv("./src/test/gatling/bodies/onapcustomers.csv").random + val vfmoduleFeeder = csv("./src/test/gatling/bodies/onapvf-modules.csv").random + val pnfFeeder = csv("./src/test/gatling/bodies/onappnfs.csv").random + + + + + + val host = System.getProperty("TARGET_HOST", "Enter Host with Port"); + + val httpBuilder = http.baseURL(host); + + def SingleAPITest(env: String) = scenario("Run each API single-user " + env) + + /*** + * + * @param env + * @PUT tenant + */ +.repeat(3){ + exec(session => { + session.set("stenant", idGenerator()) + }) + .exec( + http("PutTenant " + env) + .put("/aai/v23/cloud-infrastructure/cloud-regions/cloud-region/onap-CROwner4/onap-CRId4/tenants/tenant/${stenant}") + .body(ElFileBody("newtenant_valid.json")) + .headers(httpHeaders) + .check( + status.find.in(201) + ) + ) + .pause(1,1) + .exec( + http("GetTenant " + env) + .get("/aai/v23/cloud-infrastructure/cloud-regions/cloud-region/onap-CROwner4/onap-CRId4/tenants/tenant/${stenant}") + .headers(httpHeaders) + .check( + status.find.in(200) + ) + .check(jsonPath("$.resource-version").saveAs("resourcever")) + ) + .exec( + http("DeleteTenant " + env) + .delete("/aai/v23/cloud-infrastructure/cloud-regions/cloud-region/onap-CROwner4/onap-CRId4/tenants/tenant/${stenant}?resource-version=${resourcever}") + .headers(httpHeaders) + .check(status.find.in(204)) + ) + + } + + /*** + * + * @param env + * @patch tenant + */ +.repeat(3){ + // Get the resource version before doing the PATCH + feed(tenantFeeder) + .exec( + http("GetTenant " + env) + .get("/aai/v23/cloud-infrastructure/cloud-regions/cloud-region/onap-CROwner/onap-CRId/tenants/tenant/onap-tenant-patch") + .headers(httpHeaders) + .check( + status.find.in(200) + ) + .check( + jsonPath("$.resource-version").saveAs("rsrcver") + ) + ) + + .exec( + http("PatchTenant " + env) + .patch("/aai/v23/cloud-infrastructure/cloud-regions/cloud-region/onap-CROwner/onap-CRId/tenants/tenant/onap-tenant-patch?resource-version=${rsrcver}") + .headers(httpHeaders) + .headers(Map( + "Content-Type"-> """application/merge-patch+json""" + )) + .body(ElFileBody("patch-tenant.json")) + .check( + status.find.in(200) + ) + ) + .pause(1,1) + } + + /*** + * + * @param env + * @get tenant depth=0 + */ +.repeat(3){ + feed(tenantFeeder) + .exec( + http("GetTenantdepth0 " + env) + .get("/aai/v23/cloud-infrastructure/cloud-regions/cloud-region/onap-CROwner3/onap-CRId3/tenants/tenant/onap-tenantId3?depth=0") + .headers(httpHeaders) + .check( + status.find.in(200) + ) + ) + .pause(1,1) + } + + /*** + * + * @param env + * @get vserver-depth=all + */ + .repeat(3){ + exec( + http("GetVserverdepthall " + env) + .get("/aai/v23/cloud-infrastructure/cloud-regions/cloud-region/onap-CROwner2/onap-CRId2/tenants/tenant/onap-tenantId2/vservers/vserver/onap-vserverId2?depth=all") + .headers(httpHeaders) + .check( + status.find.in(200) + ) + ) + .pause(1,1) + } + + /*** + * + * @param env + * @get vserver + */ + .repeat(3){ + exec( + http("GetVserver " + env) + .get("/aai/v23/cloud-infrastructure/cloud-regions/cloud-region/onap-CROwner2/onap-CRId2/tenants/tenant/onap-tenantId2/vservers/vserver/onap-vserverId2") + .headers(httpHeaders) + .check( + status.find.in(200) + ) + ) + .pause(1,1) + } + + /*** + * + * @param env + * @get gen-vnf + */ + .repeat(3){ + feed(genericvnfFeeder) + .exec( + http("GetVnf " + env) + .get("/aai/v23/network/generic-vnfs/generic-vnf/${vnf-id}") + .headers(httpHeaders) + .check( + status.find.in(200) + ) + ) + .pause(1,1) + } + + /*** + * + * @param env + * @get gen-vnf depth=1 + */ + .repeat(3){ + feed(genericvnfFeeder) + .exec( + http("GetVnfdepth1 " + env) + .get("/aai/v23/network/generic-vnfs/generic-vnf/${vnf-id}?depth=1") + .headers(httpHeaders) + .check( + status.find.in(200) + ) + ) + .pause(1,1) + } + + /*** + * + * @param env + * @get vf-module depth=1 + */ + .repeat(3){ + feed(vfmoduleFeeder) + .exec( + http("GetVfmoduledepthl " + env) + .get("/aai/v23/network/generic-vnfs/generic-vnf/onap-genericvnfId/vf-modules/vf-module/onap-vnfmoduleId?depth=1") + .headers(httpHeaders) + .check( + status.find.in(200) + ) + ) + .pause(1,1) + } + + /*** + * + * @param env + * @put vf-module + */ + .repeat(3){ + feed(genericvnfFeeder) + exec(session => { + session.set("svfmodule", idGenerator()) + }) + .exec( + http("PutVfmodule " + env) + .put("/aai/v23/network/generic-vnfs/generic-vnf/onap-genericvnfId/vf-modules/vf-module/${svfmodule}") + .body(ElFileBody("newvf-module_valid.json")) + .headers(httpHeaders) + .check( + status.find.in(201) + ) + ) + .pause(1,1) + .exec( + http("GetVfmodule " + env) + .get("/aai/v23/network/generic-vnfs/generic-vnf/onap-genericvnfId/vf-modules/vf-module/${svfmodule}") + .headers(httpHeaders) + .check( + status.find.in(200) + ) + .check(jsonPath("$.resource-version").saveAs("resourcever")) + ) +.pause(1,1) + .exec( + http("DeleteVfmodule " + env) + .delete("/aai/v23/network/generic-vnfs/generic-vnf/onap-genericvnfId/vf-modules/vf-module/${svfmodule}?resource-version=${resourcever}") + .headers(httpHeaders) + .check(status.find.in(204)) + ) +.pause(1,1) + + } + + /*** + * + * @param env + * @patch/post vf-module + */ + .repeat(3){ + // Get the resource version before doing the PATCH + feed(vfmoduleFeeder) + .exec( + http("GetVfmodule " + env) + .get("/aai/v23/network/generic-vnfs/generic-vnf/onap-genericvnfId/vf-modules/vf-module/onap-vnfmoduleId") + .headers(httpHeaders) + .check( + status.find.in(200) + ) + .check( + jsonPath("$.resource-version").saveAs("rsrcver") + ) + ) + + .exec( + http("PatchVfmodule " + env) + .patch("/aai/v23/network/generic-vnfs/generic-vnf/onap-genericvnfId/vf-modules/vf-module/onap-vnfmoduleId?resource-version=${rsrcver}") + .headers(httpHeaders) + .headers(Map( + "Content-Type"-> """application/merge-patch+json""" + )) + .body(ElFileBody("patch-vf-module.json")) + .check( + status.find.in(200) + ) + ) + + } + + /*** + * + * @param env + * @get recents api vlan + */ + .repeat(3){ + exec( + http("GetRecentsAPI Vlan " + env) + .get("/aai/recents/v23/vlan?hours=192") + .headers(httpHeaders) + .check( + status.find.in(200) + ) + ) + .pause(1,1) + } + + /*** + * + * @param env + * @get recents api l-interface + */ + .repeat(3){ + exec( + http("GetRecentsAPI l-interface " + env) + .get("/aai/recents/v23/l-interface?hours=192") + .headers(httpHeaders) + .check( + status.find.in(200) + ) + ) + .pause(1,1) + } + + /*** + * + * @param env + * @get recents api vserver + */ + .repeat(3){ + exec( + http("GetRecentsAPI vserver " + env) + .get("/aai/recents/v23/vserver?hours=192") + .headers(httpHeaders) + .check( + status.find.in(200) + ) + ) + .pause(1,1) + } + + /*** + * + * @param env + * @get all CRs1 + */ + .repeat(3){ + exec( + http("GetallCR onap-CRId " + env) + .get("/aai/v23/cloud-infrastructure/cloud-regions/?cloud-region-id=onap-CRId") + .headers(httpHeaders) + .check( + status.find.in(200) + ) + ) + .pause(1,1) + } + + /*** + * + * @param env + * @get all CRs2 + */ + .repeat(3){ + exec( + http("GetallCR onap-CRId " + env) + .get("/aai/v23/cloud-infrastructure/cloud-regions/?cloud-region-id=onap-CRId") + .headers(httpHeaders) + .check( + status.find.in(200) + ) + ) + .pause(1,1) + } + + /*** + * + * @param env + * @get all services + */ + .repeat(3){ + exec( + http("GetallServices " + env) + .get("/aai/v23/service-design-and-creation/services") + .headers(httpHeaders) + .check( + status.find.in(200) + ) + ) + .pause(1,1) + } + + /*** + * + * @param env + * @get all CRs + */ + .repeat(3){ + exec( + http("GetallCRs " + env) + .get("/aai/v23/cloud-infrastructure/cloud-regions/?cloud-region-id=onap-CRId") + .headers(httpHeaders) + .check( + status.find.in(200) + ) + ) + .pause(1,1) + } + + /*** + * + * @param env + * @get nodes-query + */ + .repeat(3){ + exec( + http("Getnodes-query VNF " + env) + .get("/aai/v23/search/nodes-query?search-node-type=generic-vnf&filter=vnf-name:EQUALS:onap-genericvnfname") + .headers(httpHeaders) + .check( + status.find.in(200) + ) + ) + .pause(1,1) + } + + /*** + * + * @param env + * @PUT singletx1 + */ + .feed(tenantFeeder) + .repeat(3){ + exec(session => { + session.set("sPServer", idGenerator()) + }) + .exec(session => { + session.set("sVServer", idGenerator()) + }) + .exec( + http("BulkSingleTx1 " + env) + .post("/aai/v22/bulk/single-transaction") + .body(ElFileBody("onapbulk-single-tx_putPServerVServer.json")) + .headers(httpHeaders) + .check( + status.find.in(201) + ) + ) + .pause(2,33) + .exec( + http("GetVserver " + env) + .get("/aai/v22/cloud-infrastructure/cloud-regions/cloud-region/onap-CROwner/onap-CRId/tenants/tenant/onap-tenantId1/vservers/vserver/${sVServer}?depth=0&nodes-only=true") + .headers(httpHeaders) + .check( + status.find.in(200) + ) + .check(jsonPath("$.resource-version").saveAs("rsrcver")) + ) + .exec( + http("DeleteVserver " + env) + .delete("/aai/v22/cloud-infrastructure/cloud-regions/cloud-region/onap-CROwner/onap-CRId/tenants/tenant/onap-tenantId1/vservers/vserver/${sVServer}?resource-version=${rsrcver}") + .headers(httpHeaders) + + .check(status.find.in(204)) + ) + .exec( + http("GetPserver " + env) + .get("/aai/v22/cloud-infrastructure/pservers/pserver/${sPServer}?depth=0&nodes-only=true") + .headers(httpHeaders) + .check( + status.find.in(200) + ) + .check(jsonPath("$.resource-version").saveAs("rsrcver")) + ) + .exec( + http("DeletePserver " + env) + .delete("/aai/v22/cloud-infrastructure/pservers/pserver/${sPServer}?resource-version=${rsrcver}") + .headers(httpHeaders) + .check(status.find.in(204)) + ) + .pause(1,1) + } + + + /*** + * + * @param env + * @PUT bulksingletx2 + */ + .repeat(3){ + exec(session => { + session.set("CR1", idGenerator()) + }) + .exec(session => { + session.set("AZ1", idGenerator()) + }) + .exec(session => { + session.set("flavor1", idGenerator()) + }) + .exec(session => { + session.set("image1", idGenerator()) + }) + .exec(session => { + session.set("complex1", idGenerator()) + }) + .exec(session => { + session.set("pserver1", idGenerator()) + }) + .exec(session => { + session.set("pserver2", idGenerator()) + }) + .exec(session => { + session.set("pserver3", idGenerator()) + }) + .exec( + http("BulkSingleTx2 " + env) + .post("/aai/v21/bulk/single-transaction") + .body(ElFileBody("onap-patch-bulk-single-tx.json")) + .headers(httpHeaders) + .check( + status.find.in(201) + ) + ) + .pause(1,1) + } + + /*** + * + * @param env + * @PUT bulksingletx3 + */ + .feed(tenantFeeder) + .repeat(3){ + exec(session => { + session.set("sPServer", idGenerator()) + }) + .exec(session => { + session.set("sVServer", idGenerator()) + }) + .exec( + http("BulkSingleTx3 " + env) + .post("/aai/v22/bulk/single-transaction") + .body(ElFileBody("onapbulk-single-tx_putPServerVServer.json")) + .headers(httpHeaders) + .check( + status.find.in(201) + ) + ) + .pause(2,5) + .exec( + http("GetVserver " + env) + .get("/aai/v22/cloud-infrastructure/cloud-regions/cloud-region/onap-CROwner/onap-CRId/tenants/tenant/onap-tenantId1/vservers/vserver/${sVServer}?depth=0&nodes-only=true") + .headers(httpHeaders) + .check( + status.find.in(200) + ) + .check(jsonPath("$.resource-version").saveAs("rsrcver")) + ) + .exec( + http("DeleteVserver " + env) + .delete("/aai/v22/cloud-infrastructure/cloud-regions/cloud-region/onap-CROwner/onap-CRId/tenants/tenant/onap-tenantId1/vservers/vserver/${sVServer}?resource-version=${rsrcver}") + .headers(httpHeaders) + + .check(status.find.in(204)) + ) + .exec( + http("GetPserver " + env) + .get("/aai/v22/cloud-infrastructure/pservers/pserver/${sPServer}?depth=0&nodes-only=true") + .headers(httpHeaders) + .check( + status.find.in(200) + ) + .check(jsonPath("$.resource-version").saveAs("rsrcver")) + ) + .exec( + http("DeletePserver " + env) + .delete("/aai/v22/cloud-infrastructure/pservers/pserver/${sPServer}?resource-version=${rsrcver}") + .headers(httpHeaders) + .check(status.find.in(204)) + ) + .pause(1,1) + } + + /*** + * + * @param env + * @CQ pserverzdeviceresurldepth1 + */ + .repeat(3){ + exec( + http("CQ pserverzdeviceresurldepth1 " + env) + .put("/aai/v22/query?format=resource_and_url&depth=1") + .headers(httpHeaders) + .body(ElFileBody("onap-CQ-pserver-zdevice.json")) + .check( + status.find.in(200) + ) + ) + .pause(1,1) + } + + /*** + * + * @param env + * @CQ pserverzdeviceres + */ + .repeat(3){ + exec( + http("CQ pserverzdeviceres " + env) + .put("/aai/v22/query?format=resource") + .headers(httpHeaders) + .body(ElFileBody("onap-CQ-pserver-zdevice.json")) + .check( + status.find.in(200) + ) + ) + .pause(1,1) + } + + /*** + * + * @param env + * @CQ vlanrangefromVlantag + */ + .repeat(3){ + exec( + http("CQ vlanrangefromVlantag " + env) + .put("/aai/v22/query?format=resource") + .headers(httpHeaders) + .body(ElFileBody("onap-CQ-vlanrange-fromVlantag.json")) + .check( + status.find.in(200) + ) + ) + .pause(1,1) + } + + /*** + * + * @param env + * @CQ pserverzdeviceres + */ + .repeat(3){ + exec( + http("CQ getClfiRoadmTailSummary " + env) + .put("/aai/v22/query?format=simple&nodesOnly=true") + .headers(httpHeaders) + .body(ElFileBody("onap-CQ-getClfiRoadmTailSummary.json")) + .check( + status.find.in(200) + ) + ) + .pause(1,1) + } + + /*** + * + * @param env + * @DSL Query1 + */ + .repeat(3){ + exec( + http("DSL Query1 PUT") + .put("/aai/v21/dsl?format=resource") + .headers(httpHeaders) + .body(ElFileBody("onap-DSL1.json")) + .check( + status.find.in(200) + ) + ) + .pause(1,1) + } + + /*** + * + * @param env + * @DSL Query2 + */ + .repeat(3){ + exec( + http("DSL Query2 PUT") + .put("/aai/v21/dsl?format=resource") + .headers(httpHeaders) + .body(ElFileBody("onap-DSL2.json")) + .check( + status.find.in(200) + ) + ) + .pause(1,1) + } + + /*** + * + * @param env + * @DSL Query3 + */ + .repeat(3){ + exec( + http("DSL Query3 PUT") + .put("/aai/v21/dsl?format=resource") + .headers(httpHeaders) + .body(ElFileBody("onap-DSL3.json")) + .check( + status.find.in(200) + ) + ) + .pause(1,1) + } + + /*** + * + * @param env + * @DSL Query4 + */ + .repeat(3){ + exec( + http("DSL Query4 PUT") + .put("/aai/v21/dsl?format=resource") + .headers(httpHeaders) + .body(ElFileBody("onap-DSL4.json")) + .check( + status.find.in(200) + ) + ) + .pause(1,1) + } + + /*** + * + * @param env + * @2min timeout + */ + .repeat(3){ + exec( + http("GetallCust " + env) + .get("/aai/v23/business/customers") + .headers(httpHeaders) + .check( + status.find.in(200) + ) + ) + .pause(1,1) + } + + setUp( + SingleAPITest("ePerf02").inject(atOnceUsers(1)).protocols(http.baseURL("Enter Host with Port")) + ) + .maxDuration(10 minutes) +} \ No newline at end of file diff --git a/gatling/newtenant_valid.json b/gatling/newtenant_valid.json new file mode 100644 index 0000000..40a8c1b --- /dev/null +++ b/gatling/newtenant_valid.json @@ -0,0 +1,4 @@ +{ + "tenant-id": "${stenant}", + "tenant-name": "tenant-name" +} diff --git a/gatling/newvf-module_valid.json b/gatling/newvf-module_valid.json new file mode 100644 index 0000000..cb44da9 --- /dev/null +++ b/gatling/newvf-module_valid.json @@ -0,0 +1,3 @@ +{ + "vf-module-id": "${svfmodule}" +} diff --git a/gatling/onap-CQ-genericVnfs-fromPserver.json b/gatling/onap-CQ-genericVnfs-fromPserver.json new file mode 100644 index 0000000..250aeb7 --- /dev/null +++ b/gatling/onap-CQ-genericVnfs-fromPserver.json @@ -0,0 +1,2 @@ +{"start":"cloud-infrastructure/pservers?hostname=onap-hostname1", + "query":"query/genericVnfs-fromPserver"} diff --git a/gatling/onap-CQ-getClfiRoadmTailSummary.json b/gatling/onap-CQ-getClfiRoadmTailSummary.json new file mode 100644 index 0000000..fc35e30 --- /dev/null +++ b/gatling/onap-CQ-getClfiRoadmTailSummary.json @@ -0,0 +1,3 @@ +{"start":"/network/logical-links?link-type=onap-linktype&operational-status=onap-operational-status", + "query":"query/getClfiRoadmTailSummary" +} diff --git a/gatling/onap-CQ-pserver-zdevice.json b/gatling/onap-CQ-pserver-zdevice.json new file mode 100644 index 0000000..0c5a7a9 --- /dev/null +++ b/gatling/onap-CQ-pserver-zdevice.json @@ -0,0 +1,2 @@ +{"start":"/cloud-infrastructure/pservers/pserver/onap-hostname1", + "query":"query/pserver-zdevice"} diff --git a/gatling/onap-CQ-vlanrange-fromVlantag.json b/gatling/onap-CQ-vlanrange-fromVlantag.json new file mode 100644 index 0000000..1d98741 --- /dev/null +++ b/gatling/onap-CQ-vlanrange-fromVlantag.json @@ -0,0 +1,3 @@ +{"start":"/cloud-infrastructure/cloud-regions/cloud-region/onap-CROwner/onap-CRId", + "query":"query/vlanrange-fromVlantag" +} diff --git a/gatling/onap-CQ-vrfs-fromVlantag.json b/gatling/onap-CQ-vrfs-fromVlantag.json new file mode 100644 index 0000000..45fdd0e --- /dev/null +++ b/gatling/onap-CQ-vrfs-fromVlantag.json @@ -0,0 +1,3 @@ +{"start":"/nodes/vlan-tags?vlan-id-outer=188", + "query":"query/vrfs-fromVlantag?pnfName=onap-pnf-name" +} diff --git a/gatling/onap-CQ-zPnfs-fromPnf.json b/gatling/onap-CQ-zPnfs-fromPnf.json new file mode 100644 index 0000000..a7f2bd4 --- /dev/null +++ b/gatling/onap-CQ-zPnfs-fromPnf.json @@ -0,0 +1,2 @@ + {"start":"/network/pnfs/pnf/onap-pnf-name", + "query":"query/zPnfs-fromPnf?nfRole=onap-pnf-nfrole"} diff --git a/gatling/onap-DSL1.json b/gatling/onap-DSL1.json new file mode 100644 index 0000000..bfa424b --- /dev/null +++ b/gatling/onap-DSL1.json @@ -0,0 +1 @@ +{"dsl" : "generic-vnf('vnf-id','onap-genericvnfId')>l3-network*('network-id','onap-l3-networkid')"} diff --git a/gatling/onap-DSL10.json b/gatling/onap-DSL10.json new file mode 100644 index 0000000..d753ee6 --- /dev/null +++ b/gatling/onap-DSL10.json @@ -0,0 +1 @@ +{"dsl":"generic-vnf('vnf-id','onap-genericvnfId')>service-instance>owning-entity{'owning-entity-name'}"} diff --git a/gatling/onap-DSL2.json b/gatling/onap-DSL2.json new file mode 100644 index 0000000..8ffac8e --- /dev/null +++ b/gatling/onap-DSL2.json @@ -0,0 +1 @@ +{"dsl" : "l-interface('interface-id','onap-linterfaceId') > sriov-vf > sriov-pf*"} diff --git a/gatling/onap-DSL3.json b/gatling/onap-DSL3.json new file mode 100644 index 0000000..47361ea --- /dev/null +++ b/gatling/onap-DSL3.json @@ -0,0 +1 @@ +{"dsl" : "pnf('pnf-name','onap-pnf-name')>chassis*>[rack*,rack-unit*]"} diff --git a/gatling/onap-DSL4.json b/gatling/onap-DSL4.json new file mode 100644 index 0000000..4bfb036 --- /dev/null +++ b/gatling/onap-DSL4.json @@ -0,0 +1 @@ +{"dsl" : "complex*('physical-location-id','onap-complex-id')>pnf*('nf-function','onap-nf-function')>[l-interface*('interface-name','onap-linterfaceName')>[l3-interface-ipv4-address-list*>[subnet*],l3-interface-ipv6-address-list*>[subnet*]]]"} diff --git a/gatling/onap-DSL5.json b/gatling/onap-DSL5.json new file mode 100644 index 0000000..b128597 --- /dev/null +++ b/gatling/onap-DSL5.json @@ -0,0 +1 @@ +{"dsl" : "cloud-region('cloud-region-id','onap-CRId')('cloud-owner','onap-CROwner')>l3-network*('network-name','onap-l3network-name')"} diff --git a/gatling/onap-DSL6.json b/gatling/onap-DSL6.json new file mode 100644 index 0000000..e2ee19b --- /dev/null +++ b/gatling/onap-DSL6.json @@ -0,0 +1 @@ +{"dsl" : "pnf('pnf-name','onap-pnf-name') > lag-interface*('interface-name','onap-laginterface-name') LIMIT 11"} diff --git a/gatling/onap-DSL7.json b/gatling/onap-DSL7.json new file mode 100644 index 0000000..edc8fa6 --- /dev/null +++ b/gatling/onap-DSL7.json @@ -0,0 +1 @@ +{"dsl" : "pserver('hostname','onap-hostname1') > p-interface > sriov-pf*('pf-pci-id','onap-sriovpf-PciId')"} diff --git a/gatling/onap-DSL8.json b/gatling/onap-DSL8.json new file mode 100644 index 0000000..1d33716 --- /dev/null +++ b/gatling/onap-DSL8.json @@ -0,0 +1 @@ +{"dsl":"zone*('zone-id','onap-zoneid')>cloud-region*('cloud-region-id','onap-CRId')>pnf*('nf-role','onap-pnf-nfrole')>[l-interface*>[l3-interface-ipv4-address-list*>[subnet*],l3-interface-ipv6-address-list*>[subnet*]]]"} diff --git a/gatling/onap-DSL9.json b/gatling/onap-DSL9.json new file mode 100644 index 0000000..3700eeb --- /dev/null +++ b/gatling/onap-DSL9.json @@ -0,0 +1 @@ +{"dsl" : "pnf('pnf-name','onap-pnf-name')>[complex*>zone*,cloud-region*]"} diff --git a/gatling/onap-patch-bulk-single-tx.json b/gatling/onap-patch-bulk-single-tx.json new file mode 100644 index 0000000..4cba375 --- /dev/null +++ b/gatling/onap-patch-bulk-single-tx.json @@ -0,0 +1,52 @@ +{ + "operations": [{ + "action": "patch", + "uri": "/cloud-infrastructure/cloud-regions/cloud-region/onap-CROwner/onap-CRId", + "body": { + "data-owner": "{{$CR1}}" + } + }, { + "action": "patch", + "uri": "/cloud-infrastructure/cloud-regions/cloud-region/onap-CROwner/onap-CRId/availability-zones/availability-zone/onap-availability-zone-name", + "body": { + "data-owner": "{{$AZ1}}" + } + }, { + "action": "patch", + "uri": "/cloud-infrastructure/cloud-regions/cloud-region/onap-CROwner/onap-CRId/flavors/flavor/onap-flavor-id", + "body": { + "data-owner": "{{$flavor1}}" + } + }, { + "action": "patch", + "uri": "/cloud-infrastructure/cloud-regions/cloud-region/onap-CROwner/onap-CRId/images/image/onap-image-id", + "body": { + "data-owner": "{{$image1}}" + } + }, { + "action": "patch", + "uri": "/cloud-infrastructure/complexes/complex/onap-complex-id", + "body": { + "data-owner": "{{$complex1}}" + } + }, { + "action": "patch", + "uri": "/cloud-infrastructure/pservers/pserver/onap-hostname1", + "body": { + "data-owner": "{{$pserver1}}" + } + }, { + "action": "patch", + "uri": "/cloud-infrastructure/pservers/pserver/onap-hostname2", + "body": { + "data-owner": "{{$pserver2}}" + } + }, { + "action": "patch", + "uri": "/cloud-infrastructure/pservers/pserver/onap-hostname3", + "body": { + "data-owner": "{{$pserver3}}" + } + } + ] +} diff --git a/gatling/onapLOB.csv b/gatling/onapLOB.csv new file mode 100644 index 0000000..4fb0cef --- /dev/null +++ b/gatling/onapLOB.csv @@ -0,0 +1,2 @@ +line-of-business-name +onap-lineofbusinessName diff --git a/gatling/onapbulk-single-tx_putPServerVServer.json b/gatling/onapbulk-single-tx_putPServerVServer.json new file mode 100644 index 0000000..8d012de --- /dev/null +++ b/gatling/onapbulk-single-tx_putPServerVServer.json @@ -0,0 +1,144 @@ +{ + "operations":[ + { + "action":"put", + "uri":"/cloud-infrastructure/pservers/pserver/${sPServer}", + "body":{ + "hostname":"${sPServer}", + "fqdn":"onapfqdn", + "pserver-id":"auto-generated-skeleton", + "in-maint":false, + "relationship-list":{ + "relationship":[ + { + "related-to":"availability-zone", + "related-link":"/aai/v24/cloud-infrastructure/cloud-regions/cloud-region/onap-CROwner/onap-CRId/availability-zones/availability-zone/onap-availability-zone-name", + "relationship-data":[ + { + "relationship-key":"cloud-region.cloud-owner", + "relationship-value":"onap-CROwner" + }, + { + "relationship-key":"cloud-region.cloud-region-id", + "relationship-value":"onap-CRId" + }, + { + "relationship-key":"availability-zone.availability-zone-name", + "relationship-value":"onap-availability-zone-name" + } + ] + }, + { + "related-to":"cloud-region", + "related-link":"/aai/v24/cloud-infrastructure/cloud-regions/cloud-region/onap-CROwner/onap-CRId", + "relationship-data":[ + { + "relationship-key":"cloud-region.cloud-owner", + "relationship-value":"onap-CROwner" + }, + { + "relationship-key":"cloud-region.cloud-region-id", + "relationship-value":"onap-CRId" + } + ], + "related-to-property":[ + { + "property-key":"cloud-region.owner-defined-type", + "property-value":"onap-owner-defined-type" + } + ] + }, + { + "related-to":"complex", + "related-link":"/aai/v24/cloud-infrastructure/complexes/complex/onap-complex-id", + "relationship-data":[ + { + "relationship-key":"complex.physical-location-id", + "relationship-value":"onap-complex-id" + } + ] + } + ] + } + } + }, + { + "action":"put", + "uri":"/cloud-infrastructure/cloud-regions/cloud-region/onap-CROwner/onap-CRId/tenants/tenant/onap-tenantId1/vservers/vserver/${sVServer}", + "body":{ + "vserver-id":"${sVServer}", + "vserver-name":"servicecheck-vm", + "vserver-name2":"servicecheck_vm", + "vserver-selflink":"onap-vserverselflink", + "relationship-list":{ + "relationship":[ + { + "related-to":"pserver", + "relationship-data":[ + { + "relationship-key":"pserver.hostname", + "relationship-value":"${sPServer}" + } + ] + }, + { + "related-to":"flavor", + "relationship-data":[ + { + "relationship-key":"flavor.flavor-id", + "relationship-value":"onap-flavor-id" + }, + { + "relationship-key":"cloud-region.cloud-owner", + "relationship-value":"onap-CROwner" + }, + { + "relationship-key":"cloud-region.cloud-region-id", + "relationship-value":"onap-CRId" + } + ] + }, + { + "related-to":"image", + "relationship-data":[ + { + "relationship-key":"image.image-id", + "relationship-value":"onap-image-id" + }, + { + "relationship-key":"cloud-region.cloud-owner", + "relationship-value":"onap-CROwner" + }, + { + "relationship-key":"cloud-region.cloud-region-id", + "relationship-value":"onap-CRId" + } + ] + } + ] + }, + "l-interfaces":{ + "l-interface":[ + { + "interface-name":"onap-linterfaceName", + "selflink":"onap-selflink", + "interface-id":"onap-interface-id", + "macaddr":"onap-macaddr", + "network-name":"onap-network-name", + "l3-interface-ipv4-address-list":[ + { + "l3-interface-ipv4-address":"1.1.1.1", + "l3-interface-ipv4-prefix-length":24, + "is-floating":false, + "neutron-network-id":"onap-neutron-network-id", + "neutron-subnet-id":"onap-neutron-subnet-id" + } + ] + } + ] + } + } + } + ] +} + diff --git a/gatling/onapcloudregions.csv b/gatling/onapcloudregions.csv new file mode 100644 index 0000000..8868b9e --- /dev/null +++ b/gatling/onapcloudregions.csv @@ -0,0 +1,3 @@ +cloud-region-id +onap-CRId +onap-CRId2 diff --git a/gatling/onapcomplexes.csv b/gatling/onapcomplexes.csv new file mode 100644 index 0000000..0ead889 --- /dev/null +++ b/gatling/onapcomplexes.csv @@ -0,0 +1,2 @@ +physical-location-id +onap-complex-id diff --git a/gatling/onapconfigurations.csv b/gatling/onapconfigurations.csv new file mode 100644 index 0000000..1d5eebb --- /dev/null +++ b/gatling/onapconfigurations.csv @@ -0,0 +1,2 @@ +configuration-id +onap-configurationId diff --git a/gatling/onapcustomers.csv b/gatling/onapcustomers.csv new file mode 100644 index 0000000..ee4ef3d --- /dev/null +++ b/gatling/onapcustomers.csv @@ -0,0 +1,2 @@ +global-customer-id +onap-customerId diff --git a/gatling/onaploglinks.csv b/gatling/onaploglinks.csv new file mode 100644 index 0000000..df517b5 --- /dev/null +++ b/gatling/onaploglinks.csv @@ -0,0 +1,2 @@ +LogicalLinkName +onap-linkname diff --git a/gatling/onapowning_entity.csv b/gatling/onapowning_entity.csv new file mode 100644 index 0000000..eedf6e2 --- /dev/null +++ b/gatling/onapowning_entity.csv @@ -0,0 +1,2 @@ +owning-entity-id +onapowningentityId diff --git a/gatling/onapplatform.csv b/gatling/onapplatform.csv new file mode 100644 index 0000000..043c412 --- /dev/null +++ b/gatling/onapplatform.csv @@ -0,0 +1,2 @@ +platform-name +onap-platformName diff --git a/gatling/onappnfs.csv b/gatling/onappnfs.csv new file mode 100644 index 0000000..67e15ad --- /dev/null +++ b/gatling/onappnfs.csv @@ -0,0 +1,2 @@ +pnf-name +onap-pnf-name diff --git a/gatling/onapproject.csv b/gatling/onapproject.csv new file mode 100644 index 0000000..4a412ce --- /dev/null +++ b/gatling/onapproject.csv @@ -0,0 +1,2 @@ +project-name +onap-projectName diff --git a/gatling/onappservers.csv b/gatling/onappservers.csv new file mode 100644 index 0000000..b136839 --- /dev/null +++ b/gatling/onappservers.csv @@ -0,0 +1,4 @@ +hostname +onap-hostname1 +onap-hostname2 +onap-hostname3 diff --git a/gatling/onapserviceinstance.csv b/gatling/onapserviceinstance.csv new file mode 100644 index 0000000..a45531c --- /dev/null +++ b/gatling/onapserviceinstance.csv @@ -0,0 +1,2 @@ +service-instance-id +onap-serviceinstanceId diff --git a/gatling/onaptenants.csv b/gatling/onaptenants.csv new file mode 100644 index 0000000..26518bd --- /dev/null +++ b/gatling/onaptenants.csv @@ -0,0 +1,3 @@ +tenant-id +onap-tenantId +onap-tenantId2 diff --git a/gatling/onapvf-modules.csv b/gatling/onapvf-modules.csv new file mode 100644 index 0000000..d03a0b8 --- /dev/null +++ b/gatling/onapvf-modules.csv @@ -0,0 +1,2 @@ +generic-vnf-id,vf-module-id +onap-genericvnfId,onap-vnfmoduleId diff --git a/gatling/onapvnfcs.csv b/gatling/onapvnfcs.csv new file mode 100644 index 0000000..f071a99 --- /dev/null +++ b/gatling/onapvnfcs.csv @@ -0,0 +1,2 @@ +vnfc-name +onap-vnfcName diff --git a/gatling/onapvnfs.csv b/gatling/onapvnfs.csv new file mode 100644 index 0000000..b0054fe --- /dev/null +++ b/gatling/onapvnfs.csv @@ -0,0 +1,2 @@ +vnf-id +onap-genericvnfId diff --git a/gatling/patch-tenant.json b/gatling/patch-tenant.json new file mode 100644 index 0000000..4d72cb9 --- /dev/null +++ b/gatling/patch-tenant.json @@ -0,0 +1,3 @@ +{ + "tenant-name":"tenant-name-patch" +} diff --git a/gatling/patch-vf-module.json b/gatling/patch-vf-module.json new file mode 100644 index 0000000..bb3dfa1 --- /dev/null +++ b/gatling/patch-vf-module.json @@ -0,0 +1,3 @@ +{ +"automated-assignment": true +} -- cgit 1.2.3-korg