From 8263637ec9d7d5928c56f76817f91940d460a7da Mon Sep 17 00:00:00 2001 From: wr148d Date: Mon, 27 Jun 2022 09:32:27 -0400 Subject: [AAI] Update the gatling scripts to have proper structure, pom, and readme Issue-ID: AAI-3505 Signed-off-by: wr148d Change-Id: I031dd436c1fc10d92640937c4a777e653e961926 --- 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/README.md | 114 ++ 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 - gatling/pom.xml | 60 + .../src/test/gatling/bodies/newtenant_valid.json | 4 + .../test/gatling/bodies/newvf-module_valid.json | 3 + .../bodies/onap-CQ-genericVnfs-fromPserver.json | 2 + .../bodies/onap-CQ-getClfiRoadmTailSummary.json | 3 + .../gatling/bodies/onap-CQ-pserver-zdevice.json | 2 + .../bodies/onap-CQ-vlanrange-fromVlantag.json | 3 + .../gatling/bodies/onap-CQ-vrfs-fromVlantag.json | 3 + .../test/gatling/bodies/onap-CQ-zPnfs-fromPnf.json | 2 + gatling/src/test/gatling/bodies/onap-DSL1.json | 1 + gatling/src/test/gatling/bodies/onap-DSL10.json | 1 + gatling/src/test/gatling/bodies/onap-DSL2.json | 1 + gatling/src/test/gatling/bodies/onap-DSL3.json | 1 + gatling/src/test/gatling/bodies/onap-DSL4.json | 1 + gatling/src/test/gatling/bodies/onap-DSL5.json | 1 + gatling/src/test/gatling/bodies/onap-DSL6.json | 1 + gatling/src/test/gatling/bodies/onap-DSL7.json | 1 + gatling/src/test/gatling/bodies/onap-DSL8.json | 1 + gatling/src/test/gatling/bodies/onap-DSL9.json | 1 + .../gatling/bodies/onap-patch-bulk-single-tx.json | 52 + gatling/src/test/gatling/bodies/onapLOB.csv | 2 + .../onapbulk-single-tx_putPServerVServer.json | 144 +++ .../src/test/gatling/bodies/onapcloudregions.csv | 3 + gatling/src/test/gatling/bodies/onapcomplexes.csv | 2 + .../src/test/gatling/bodies/onapconfigurations.csv | 2 + gatling/src/test/gatling/bodies/onapcustomers.csv | 2 + gatling/src/test/gatling/bodies/onaploglinks.csv | 2 + .../src/test/gatling/bodies/onapowning_entity.csv | 2 + gatling/src/test/gatling/bodies/onapplatform.csv | 2 + gatling/src/test/gatling/bodies/onappnfs.csv | 2 + gatling/src/test/gatling/bodies/onapproject.csv | 2 + gatling/src/test/gatling/bodies/onappservers.csv | 4 + .../test/gatling/bodies/onapserviceinstance.csv | 2 + gatling/src/test/gatling/bodies/onaptenants.csv | 3 + gatling/src/test/gatling/bodies/onapvf-modules.csv | 2 + gatling/src/test/gatling/bodies/onapvnfcs.csv | 2 + gatling/src/test/gatling/bodies/onapvnfs.csv | 2 + gatling/src/test/gatling/bodies/patch-tenant.json | 3 + .../src/test/gatling/bodies/patch-vf-module.json | 3 + gatling/src/test/gatling/conf/Gatling_conf_file | 141 +++ gatling/src/test/gatling/scripts/ONAP Baseline.sh | 1 + .../src/test/gatling/scripts/ONAP Single API.sh | 1 + gatling/src/test/gatling/scripts/ONAP Stress.sh | 1 + .../gatling/simulations/ONAP Baseline 2022.scala | 1315 +++++++++++++++++++ .../gatling/simulations/ONAP Stress 2022.scala | 1318 ++++++++++++++++++++ .../gatling/simulations/ONAP single API 2022.scala | 754 +++++++++++ 92 files changed, 3975 insertions(+), 3801 deletions(-) delete mode 100644 gatling/Gatling_conf_file delete mode 100644 gatling/ONAP Baseline 2022.scala delete mode 100644 gatling/ONAP Baseline.sh delete mode 100644 gatling/ONAP Single API.sh delete mode 100644 gatling/ONAP Stress 2022.scala delete mode 100644 gatling/ONAP Stress.sh delete mode 100644 gatling/ONAP single API 2022.scala create mode 100644 gatling/README.md delete mode 100644 gatling/newtenant_valid.json delete mode 100644 gatling/newvf-module_valid.json delete mode 100644 gatling/onap-CQ-genericVnfs-fromPserver.json delete mode 100644 gatling/onap-CQ-getClfiRoadmTailSummary.json delete mode 100644 gatling/onap-CQ-pserver-zdevice.json delete mode 100644 gatling/onap-CQ-vlanrange-fromVlantag.json delete mode 100644 gatling/onap-CQ-vrfs-fromVlantag.json delete mode 100644 gatling/onap-CQ-zPnfs-fromPnf.json delete mode 100644 gatling/onap-DSL1.json delete mode 100644 gatling/onap-DSL10.json delete mode 100644 gatling/onap-DSL2.json delete mode 100644 gatling/onap-DSL3.json delete mode 100644 gatling/onap-DSL4.json delete mode 100644 gatling/onap-DSL5.json delete mode 100644 gatling/onap-DSL6.json delete mode 100644 gatling/onap-DSL7.json delete mode 100644 gatling/onap-DSL8.json delete mode 100644 gatling/onap-DSL9.json delete mode 100644 gatling/onap-patch-bulk-single-tx.json delete mode 100644 gatling/onapLOB.csv delete mode 100644 gatling/onapbulk-single-tx_putPServerVServer.json delete mode 100644 gatling/onapcloudregions.csv delete mode 100644 gatling/onapcomplexes.csv delete mode 100644 gatling/onapconfigurations.csv delete mode 100644 gatling/onapcustomers.csv delete mode 100644 gatling/onaploglinks.csv delete mode 100644 gatling/onapowning_entity.csv delete mode 100644 gatling/onapplatform.csv delete mode 100644 gatling/onappnfs.csv delete mode 100644 gatling/onapproject.csv delete mode 100644 gatling/onappservers.csv delete mode 100644 gatling/onapserviceinstance.csv delete mode 100644 gatling/onaptenants.csv delete mode 100644 gatling/onapvf-modules.csv delete mode 100644 gatling/onapvnfcs.csv delete mode 100644 gatling/onapvnfs.csv delete mode 100644 gatling/patch-tenant.json delete mode 100644 gatling/patch-vf-module.json create mode 100644 gatling/pom.xml create mode 100644 gatling/src/test/gatling/bodies/newtenant_valid.json create mode 100644 gatling/src/test/gatling/bodies/newvf-module_valid.json create mode 100644 gatling/src/test/gatling/bodies/onap-CQ-genericVnfs-fromPserver.json create mode 100644 gatling/src/test/gatling/bodies/onap-CQ-getClfiRoadmTailSummary.json create mode 100644 gatling/src/test/gatling/bodies/onap-CQ-pserver-zdevice.json create mode 100644 gatling/src/test/gatling/bodies/onap-CQ-vlanrange-fromVlantag.json create mode 100644 gatling/src/test/gatling/bodies/onap-CQ-vrfs-fromVlantag.json create mode 100644 gatling/src/test/gatling/bodies/onap-CQ-zPnfs-fromPnf.json create mode 100644 gatling/src/test/gatling/bodies/onap-DSL1.json create mode 100644 gatling/src/test/gatling/bodies/onap-DSL10.json create mode 100644 gatling/src/test/gatling/bodies/onap-DSL2.json create mode 100644 gatling/src/test/gatling/bodies/onap-DSL3.json create mode 100644 gatling/src/test/gatling/bodies/onap-DSL4.json create mode 100644 gatling/src/test/gatling/bodies/onap-DSL5.json create mode 100644 gatling/src/test/gatling/bodies/onap-DSL6.json create mode 100644 gatling/src/test/gatling/bodies/onap-DSL7.json create mode 100644 gatling/src/test/gatling/bodies/onap-DSL8.json create mode 100644 gatling/src/test/gatling/bodies/onap-DSL9.json create mode 100644 gatling/src/test/gatling/bodies/onap-patch-bulk-single-tx.json create mode 100644 gatling/src/test/gatling/bodies/onapLOB.csv create mode 100644 gatling/src/test/gatling/bodies/onapbulk-single-tx_putPServerVServer.json create mode 100644 gatling/src/test/gatling/bodies/onapcloudregions.csv create mode 100644 gatling/src/test/gatling/bodies/onapcomplexes.csv create mode 100644 gatling/src/test/gatling/bodies/onapconfigurations.csv create mode 100644 gatling/src/test/gatling/bodies/onapcustomers.csv create mode 100644 gatling/src/test/gatling/bodies/onaploglinks.csv create mode 100644 gatling/src/test/gatling/bodies/onapowning_entity.csv create mode 100644 gatling/src/test/gatling/bodies/onapplatform.csv create mode 100644 gatling/src/test/gatling/bodies/onappnfs.csv create mode 100644 gatling/src/test/gatling/bodies/onapproject.csv create mode 100644 gatling/src/test/gatling/bodies/onappservers.csv create mode 100644 gatling/src/test/gatling/bodies/onapserviceinstance.csv create mode 100644 gatling/src/test/gatling/bodies/onaptenants.csv create mode 100644 gatling/src/test/gatling/bodies/onapvf-modules.csv create mode 100644 gatling/src/test/gatling/bodies/onapvnfcs.csv create mode 100644 gatling/src/test/gatling/bodies/onapvnfs.csv create mode 100644 gatling/src/test/gatling/bodies/patch-tenant.json create mode 100644 gatling/src/test/gatling/bodies/patch-vf-module.json create mode 100644 gatling/src/test/gatling/conf/Gatling_conf_file create mode 100644 gatling/src/test/gatling/scripts/ONAP Baseline.sh create mode 100644 gatling/src/test/gatling/scripts/ONAP Single API.sh create mode 100644 gatling/src/test/gatling/scripts/ONAP Stress.sh create mode 100644 gatling/src/test/gatling/simulations/ONAP Baseline 2022.scala create mode 100644 gatling/src/test/gatling/simulations/ONAP Stress 2022.scala create mode 100644 gatling/src/test/gatling/simulations/ONAP single API 2022.scala diff --git a/gatling/Gatling_conf_file b/gatling/Gatling_conf_file deleted file mode 100644 index bd32c32..0000000 --- a/gatling/Gatling_conf_file +++ /dev/null @@ -1,141 +0,0 @@ -######################### -# 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 deleted file mode 100644 index 16024a7..0000000 --- a/gatling/ONAP Baseline 2022.scala +++ /dev/null @@ -1,1315 +0,0 @@ -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 deleted file mode 100644 index c4109f2..0000000 --- a/gatling/ONAP Baseline.sh +++ /dev/null @@ -1 +0,0 @@ -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 deleted file mode 100644 index 20d18c3..0000000 --- a/gatling/ONAP Single API.sh +++ /dev/null @@ -1 +0,0 @@ -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 deleted file mode 100644 index 15e83db..0000000 --- a/gatling/ONAP Stress 2022.scala +++ /dev/null @@ -1,1318 +0,0 @@ -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 deleted file mode 100644 index 0252539..0000000 --- a/gatling/ONAP Stress.sh +++ /dev/null @@ -1 +0,0 @@ -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 deleted file mode 100644 index c0ab5c7..0000000 --- a/gatling/ONAP single API 2022.scala +++ /dev/null @@ -1,754 +0,0 @@ -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/README.md b/gatling/README.md new file mode 100644 index 0000000..1328131 --- /dev/null +++ b/gatling/README.md @@ -0,0 +1,114 @@ +# myapp +This application was generated using JHipster 4.4.1, you can find documentation and help at [https://jhipster.github.io/documentation-archive/v4.4.1](https://jhipster.github.io/documentation-archive/v4.4.1). + +## Development + +Before you can build this project, you must install and configure the following dependencies on your machine: + +1. [Node.js][]: We use Node to run a development web server and build the project. + Depending on your system, you can install Node either from source or as a pre-packaged bundle. + +After installing Node, you should be able to run the following command to install development tools. +You will only need to run this command when dependencies change in [package.json](package.json). + + npm install + +We use [Gulp][] as our build system. Install the Gulp command-line tool globally with: + + npm install -g gulp-cli + +Run the following commands in two separate terminals to create a blissful development experience where your browser +auto-refreshes when files change on your hard drive. + + ./mvnw + gulp + +[Bower][] is used to manage CSS and JavaScript dependencies used in this application. You can upgrade dependencies by +specifying a newer version in [bower.json](bower.json). You can also run `bower update` and `bower install` to manage dependencies. +Add the `-h` flag on any command to see how you can use it. For example, `bower update -h`. + +For further instructions on how to develop with JHipster, have a look at [Using JHipster in development][]. + + +## Building for production + +To optimize the myapp application for production, run: + + ./mvnw -Pprod clean package + +This will concatenate and minify the client CSS and JavaScript files. It will also modify `index.html` so it references these new files. +To ensure everything worked, run: + + java -jar target/*.war + +Then navigate to [http://localhost:8080](http://localhost:8080) in your browser. + +Refer to [Using JHipster in production][] for more details. + +## Testing + +To launch your application's tests, run: + + ./mvnw clean test + +### Client tests + +Unit tests are run by [Karma][] and written with [Jasmine][]. They're located in [src/test/javascript/](src/test/javascript/) and can be run with: + + gulp test + + +### Other tests + +Performance tests are run by [Gatling][] and written in Scala. They're located in [src/test/gatling](src/test/gatling) and can be run with: + + ./mvnw gatling:execute + +For more information, refer to the [Running tests page][]. + +## Using Docker to simplify development (optional) + +You can use Docker to improve your JHipster development experience. A number of docker-compose configuration are available in the [src/main/docker](src/main/docker) folder to launch required third party services. +For example, to start a mysql database in a docker container, run: + + docker-compose -f src/main/docker/mysql.yml up -d + +To stop it and remove the container, run: + + docker-compose -f src/main/docker/mysql.yml down + +You can also fully dockerize your application and all the services that it depends on. +To achieve this, first build a docker image of your app by running: + + ./mvnw package -Pprod docker:build + +Then run: + + docker-compose -f src/main/docker/app.yml up -d + +For more information refer to [Using Docker and Docker-Compose][], this page also contains information on the docker-compose sub-generator (`yo jhipster:docker-compose`), which is able to generate docker configurations for one or several JHipster applications. + +## Continuous Integration (optional) + +To configure CI for your project, run the ci-cd sub-generator (`yo jhipster:ci-cd`), this will let you generate configuration files for a number of Continuous Integration systems. Consult the [Setting up Continuous Integration][] page for more information. + +[JHipster Homepage and latest documentation]: https://jhipster.github.io +[JHipster 4.4.1 archive]: https://jhipster.github.io/documentation-archive/v4.4.1 + +[Using JHipster in development]: https://jhipster.github.io/documentation-archive/v4.4.1/development/ +[Using Docker and Docker-Compose]: https://jhipster.github.io/documentation-archive/v4.4.1/docker-compose +[Using JHipster in production]: https://jhipster.github.io/documentation-archive/v4.4.1/production/ +[Running tests page]: https://jhipster.github.io/documentation-archive/v4.4.1/running-tests/ +[Setting up Continuous Integration]: https://jhipster.github.io/documentation-archive/v4.4.1/setting-up-ci/ + +[Gatling]: http://gatling.io/ +[Node.js]: https://nodejs.org/ +[Yarn]: https://yarnpkg.org/ +[Bower]: http://bower.io/ +[Gulp]: http://gulpjs.com/ +[BrowserSync]: http://www.browsersync.io/ +[Karma]: http://karma-runner.github.io/ +[Jasmine]: http://jasmine.github.io/2.0/introduction.html +[Protractor]: https://angular.github.io/protractor/ +[Leaflet]: http://leafletjs.com/ +[DefinitelyTyped]: http://definitelytyped.org/ \ No newline at end of file diff --git a/gatling/newtenant_valid.json b/gatling/newtenant_valid.json deleted file mode 100644 index 40a8c1b..0000000 --- a/gatling/newtenant_valid.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "tenant-id": "${stenant}", - "tenant-name": "tenant-name" -} diff --git a/gatling/newvf-module_valid.json b/gatling/newvf-module_valid.json deleted file mode 100644 index cb44da9..0000000 --- a/gatling/newvf-module_valid.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "vf-module-id": "${svfmodule}" -} diff --git a/gatling/onap-CQ-genericVnfs-fromPserver.json b/gatling/onap-CQ-genericVnfs-fromPserver.json deleted file mode 100644 index 250aeb7..0000000 --- a/gatling/onap-CQ-genericVnfs-fromPserver.json +++ /dev/null @@ -1,2 +0,0 @@ -{"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 deleted file mode 100644 index fc35e30..0000000 --- a/gatling/onap-CQ-getClfiRoadmTailSummary.json +++ /dev/null @@ -1,3 +0,0 @@ -{"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 deleted file mode 100644 index 0c5a7a9..0000000 --- a/gatling/onap-CQ-pserver-zdevice.json +++ /dev/null @@ -1,2 +0,0 @@ -{"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 deleted file mode 100644 index 1d98741..0000000 --- a/gatling/onap-CQ-vlanrange-fromVlantag.json +++ /dev/null @@ -1,3 +0,0 @@ -{"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 deleted file mode 100644 index 45fdd0e..0000000 --- a/gatling/onap-CQ-vrfs-fromVlantag.json +++ /dev/null @@ -1,3 +0,0 @@ -{"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 deleted file mode 100644 index a7f2bd4..0000000 --- a/gatling/onap-CQ-zPnfs-fromPnf.json +++ /dev/null @@ -1,2 +0,0 @@ - {"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 deleted file mode 100644 index bfa424b..0000000 --- a/gatling/onap-DSL1.json +++ /dev/null @@ -1 +0,0 @@ -{"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 deleted file mode 100644 index d753ee6..0000000 --- a/gatling/onap-DSL10.json +++ /dev/null @@ -1 +0,0 @@ -{"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 deleted file mode 100644 index 8ffac8e..0000000 --- a/gatling/onap-DSL2.json +++ /dev/null @@ -1 +0,0 @@ -{"dsl" : "l-interface('interface-id','onap-linterfaceId') > sriov-vf > sriov-pf*"} diff --git a/gatling/onap-DSL3.json b/gatling/onap-DSL3.json deleted file mode 100644 index 47361ea..0000000 --- a/gatling/onap-DSL3.json +++ /dev/null @@ -1 +0,0 @@ -{"dsl" : "pnf('pnf-name','onap-pnf-name')>chassis*>[rack*,rack-unit*]"} diff --git a/gatling/onap-DSL4.json b/gatling/onap-DSL4.json deleted file mode 100644 index 4bfb036..0000000 --- a/gatling/onap-DSL4.json +++ /dev/null @@ -1 +0,0 @@ -{"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 deleted file mode 100644 index b128597..0000000 --- a/gatling/onap-DSL5.json +++ /dev/null @@ -1 +0,0 @@ -{"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 deleted file mode 100644 index e2ee19b..0000000 --- a/gatling/onap-DSL6.json +++ /dev/null @@ -1 +0,0 @@ -{"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 deleted file mode 100644 index edc8fa6..0000000 --- a/gatling/onap-DSL7.json +++ /dev/null @@ -1 +0,0 @@ -{"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 deleted file mode 100644 index 1d33716..0000000 --- a/gatling/onap-DSL8.json +++ /dev/null @@ -1 +0,0 @@ -{"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 deleted file mode 100644 index 3700eeb..0000000 --- a/gatling/onap-DSL9.json +++ /dev/null @@ -1 +0,0 @@ -{"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 deleted file mode 100644 index 4cba375..0000000 --- a/gatling/onap-patch-bulk-single-tx.json +++ /dev/null @@ -1,52 +0,0 @@ -{ - "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 deleted file mode 100644 index 4fb0cef..0000000 --- a/gatling/onapLOB.csv +++ /dev/null @@ -1,2 +0,0 @@ -line-of-business-name -onap-lineofbusinessName diff --git a/gatling/onapbulk-single-tx_putPServerVServer.json b/gatling/onapbulk-single-tx_putPServerVServer.json deleted file mode 100644 index 8d012de..0000000 --- a/gatling/onapbulk-single-tx_putPServerVServer.json +++ /dev/null @@ -1,144 +0,0 @@ -{ - "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 deleted file mode 100644 index 8868b9e..0000000 --- a/gatling/onapcloudregions.csv +++ /dev/null @@ -1,3 +0,0 @@ -cloud-region-id -onap-CRId -onap-CRId2 diff --git a/gatling/onapcomplexes.csv b/gatling/onapcomplexes.csv deleted file mode 100644 index 0ead889..0000000 --- a/gatling/onapcomplexes.csv +++ /dev/null @@ -1,2 +0,0 @@ -physical-location-id -onap-complex-id diff --git a/gatling/onapconfigurations.csv b/gatling/onapconfigurations.csv deleted file mode 100644 index 1d5eebb..0000000 --- a/gatling/onapconfigurations.csv +++ /dev/null @@ -1,2 +0,0 @@ -configuration-id -onap-configurationId diff --git a/gatling/onapcustomers.csv b/gatling/onapcustomers.csv deleted file mode 100644 index ee4ef3d..0000000 --- a/gatling/onapcustomers.csv +++ /dev/null @@ -1,2 +0,0 @@ -global-customer-id -onap-customerId diff --git a/gatling/onaploglinks.csv b/gatling/onaploglinks.csv deleted file mode 100644 index df517b5..0000000 --- a/gatling/onaploglinks.csv +++ /dev/null @@ -1,2 +0,0 @@ -LogicalLinkName -onap-linkname diff --git a/gatling/onapowning_entity.csv b/gatling/onapowning_entity.csv deleted file mode 100644 index eedf6e2..0000000 --- a/gatling/onapowning_entity.csv +++ /dev/null @@ -1,2 +0,0 @@ -owning-entity-id -onapowningentityId diff --git a/gatling/onapplatform.csv b/gatling/onapplatform.csv deleted file mode 100644 index 043c412..0000000 --- a/gatling/onapplatform.csv +++ /dev/null @@ -1,2 +0,0 @@ -platform-name -onap-platformName diff --git a/gatling/onappnfs.csv b/gatling/onappnfs.csv deleted file mode 100644 index 67e15ad..0000000 --- a/gatling/onappnfs.csv +++ /dev/null @@ -1,2 +0,0 @@ -pnf-name -onap-pnf-name diff --git a/gatling/onapproject.csv b/gatling/onapproject.csv deleted file mode 100644 index 4a412ce..0000000 --- a/gatling/onapproject.csv +++ /dev/null @@ -1,2 +0,0 @@ -project-name -onap-projectName diff --git a/gatling/onappservers.csv b/gatling/onappservers.csv deleted file mode 100644 index b136839..0000000 --- a/gatling/onappservers.csv +++ /dev/null @@ -1,4 +0,0 @@ -hostname -onap-hostname1 -onap-hostname2 -onap-hostname3 diff --git a/gatling/onapserviceinstance.csv b/gatling/onapserviceinstance.csv deleted file mode 100644 index a45531c..0000000 --- a/gatling/onapserviceinstance.csv +++ /dev/null @@ -1,2 +0,0 @@ -service-instance-id -onap-serviceinstanceId diff --git a/gatling/onaptenants.csv b/gatling/onaptenants.csv deleted file mode 100644 index 26518bd..0000000 --- a/gatling/onaptenants.csv +++ /dev/null @@ -1,3 +0,0 @@ -tenant-id -onap-tenantId -onap-tenantId2 diff --git a/gatling/onapvf-modules.csv b/gatling/onapvf-modules.csv deleted file mode 100644 index d03a0b8..0000000 --- a/gatling/onapvf-modules.csv +++ /dev/null @@ -1,2 +0,0 @@ -generic-vnf-id,vf-module-id -onap-genericvnfId,onap-vnfmoduleId diff --git a/gatling/onapvnfcs.csv b/gatling/onapvnfcs.csv deleted file mode 100644 index f071a99..0000000 --- a/gatling/onapvnfcs.csv +++ /dev/null @@ -1,2 +0,0 @@ -vnfc-name -onap-vnfcName diff --git a/gatling/onapvnfs.csv b/gatling/onapvnfs.csv deleted file mode 100644 index b0054fe..0000000 --- a/gatling/onapvnfs.csv +++ /dev/null @@ -1,2 +0,0 @@ -vnf-id -onap-genericvnfId diff --git a/gatling/patch-tenant.json b/gatling/patch-tenant.json deleted file mode 100644 index 4d72cb9..0000000 --- a/gatling/patch-tenant.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "tenant-name":"tenant-name-patch" -} diff --git a/gatling/patch-vf-module.json b/gatling/patch-vf-module.json deleted file mode 100644 index bb3dfa1..0000000 --- a/gatling/patch-vf-module.json +++ /dev/null @@ -1,3 +0,0 @@ -{ -"automated-assignment": true -} diff --git a/gatling/pom.xml b/gatling/pom.xml new file mode 100644 index 0000000..1877262 --- /dev/null +++ b/gatling/pom.xml @@ -0,0 +1,60 @@ + + + 4.0.0 + + + spring-boot-starter-parent + org.springframework.boot + 1.5.3.RELEASE + + + + com.mycompany.myapp + gatling + 1.0.0-SNAPSHOT + war + Myapp + + + -Djava.security.egd=file:/dev/./urandom -Xmx256m + 2.3.0 + 2.2.4 + + + + + + io.gatling.highcharts + gatling-charts-highcharts + ${gatling.version} + test + + + + gatling:execute + + + io.gatling + gatling-maven-plugin + ${gatling-maven-plugin.version} + + src/test/gatling/conf + src/test/gatling/data + target/gatling/results + src/test/gatling/bodies + src/test/gatling/simulations + + true + + + + + + + diff --git a/gatling/src/test/gatling/bodies/newtenant_valid.json b/gatling/src/test/gatling/bodies/newtenant_valid.json new file mode 100644 index 0000000..40a8c1b --- /dev/null +++ b/gatling/src/test/gatling/bodies/newtenant_valid.json @@ -0,0 +1,4 @@ +{ + "tenant-id": "${stenant}", + "tenant-name": "tenant-name" +} diff --git a/gatling/src/test/gatling/bodies/newvf-module_valid.json b/gatling/src/test/gatling/bodies/newvf-module_valid.json new file mode 100644 index 0000000..cb44da9 --- /dev/null +++ b/gatling/src/test/gatling/bodies/newvf-module_valid.json @@ -0,0 +1,3 @@ +{ + "vf-module-id": "${svfmodule}" +} diff --git a/gatling/src/test/gatling/bodies/onap-CQ-genericVnfs-fromPserver.json b/gatling/src/test/gatling/bodies/onap-CQ-genericVnfs-fromPserver.json new file mode 100644 index 0000000..250aeb7 --- /dev/null +++ b/gatling/src/test/gatling/bodies/onap-CQ-genericVnfs-fromPserver.json @@ -0,0 +1,2 @@ +{"start":"cloud-infrastructure/pservers?hostname=onap-hostname1", + "query":"query/genericVnfs-fromPserver"} diff --git a/gatling/src/test/gatling/bodies/onap-CQ-getClfiRoadmTailSummary.json b/gatling/src/test/gatling/bodies/onap-CQ-getClfiRoadmTailSummary.json new file mode 100644 index 0000000..fc35e30 --- /dev/null +++ b/gatling/src/test/gatling/bodies/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/src/test/gatling/bodies/onap-CQ-pserver-zdevice.json b/gatling/src/test/gatling/bodies/onap-CQ-pserver-zdevice.json new file mode 100644 index 0000000..0c5a7a9 --- /dev/null +++ b/gatling/src/test/gatling/bodies/onap-CQ-pserver-zdevice.json @@ -0,0 +1,2 @@ +{"start":"/cloud-infrastructure/pservers/pserver/onap-hostname1", + "query":"query/pserver-zdevice"} diff --git a/gatling/src/test/gatling/bodies/onap-CQ-vlanrange-fromVlantag.json b/gatling/src/test/gatling/bodies/onap-CQ-vlanrange-fromVlantag.json new file mode 100644 index 0000000..1d98741 --- /dev/null +++ b/gatling/src/test/gatling/bodies/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/src/test/gatling/bodies/onap-CQ-vrfs-fromVlantag.json b/gatling/src/test/gatling/bodies/onap-CQ-vrfs-fromVlantag.json new file mode 100644 index 0000000..45fdd0e --- /dev/null +++ b/gatling/src/test/gatling/bodies/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/src/test/gatling/bodies/onap-CQ-zPnfs-fromPnf.json b/gatling/src/test/gatling/bodies/onap-CQ-zPnfs-fromPnf.json new file mode 100644 index 0000000..a7f2bd4 --- /dev/null +++ b/gatling/src/test/gatling/bodies/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/src/test/gatling/bodies/onap-DSL1.json b/gatling/src/test/gatling/bodies/onap-DSL1.json new file mode 100644 index 0000000..bfa424b --- /dev/null +++ b/gatling/src/test/gatling/bodies/onap-DSL1.json @@ -0,0 +1 @@ +{"dsl" : "generic-vnf('vnf-id','onap-genericvnfId')>l3-network*('network-id','onap-l3-networkid')"} diff --git a/gatling/src/test/gatling/bodies/onap-DSL10.json b/gatling/src/test/gatling/bodies/onap-DSL10.json new file mode 100644 index 0000000..d753ee6 --- /dev/null +++ b/gatling/src/test/gatling/bodies/onap-DSL10.json @@ -0,0 +1 @@ +{"dsl":"generic-vnf('vnf-id','onap-genericvnfId')>service-instance>owning-entity{'owning-entity-name'}"} diff --git a/gatling/src/test/gatling/bodies/onap-DSL2.json b/gatling/src/test/gatling/bodies/onap-DSL2.json new file mode 100644 index 0000000..8ffac8e --- /dev/null +++ b/gatling/src/test/gatling/bodies/onap-DSL2.json @@ -0,0 +1 @@ +{"dsl" : "l-interface('interface-id','onap-linterfaceId') > sriov-vf > sriov-pf*"} diff --git a/gatling/src/test/gatling/bodies/onap-DSL3.json b/gatling/src/test/gatling/bodies/onap-DSL3.json new file mode 100644 index 0000000..47361ea --- /dev/null +++ b/gatling/src/test/gatling/bodies/onap-DSL3.json @@ -0,0 +1 @@ +{"dsl" : "pnf('pnf-name','onap-pnf-name')>chassis*>[rack*,rack-unit*]"} diff --git a/gatling/src/test/gatling/bodies/onap-DSL4.json b/gatling/src/test/gatling/bodies/onap-DSL4.json new file mode 100644 index 0000000..4bfb036 --- /dev/null +++ b/gatling/src/test/gatling/bodies/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/src/test/gatling/bodies/onap-DSL5.json b/gatling/src/test/gatling/bodies/onap-DSL5.json new file mode 100644 index 0000000..b128597 --- /dev/null +++ b/gatling/src/test/gatling/bodies/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/src/test/gatling/bodies/onap-DSL6.json b/gatling/src/test/gatling/bodies/onap-DSL6.json new file mode 100644 index 0000000..e2ee19b --- /dev/null +++ b/gatling/src/test/gatling/bodies/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/src/test/gatling/bodies/onap-DSL7.json b/gatling/src/test/gatling/bodies/onap-DSL7.json new file mode 100644 index 0000000..edc8fa6 --- /dev/null +++ b/gatling/src/test/gatling/bodies/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/src/test/gatling/bodies/onap-DSL8.json b/gatling/src/test/gatling/bodies/onap-DSL8.json new file mode 100644 index 0000000..1d33716 --- /dev/null +++ b/gatling/src/test/gatling/bodies/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/src/test/gatling/bodies/onap-DSL9.json b/gatling/src/test/gatling/bodies/onap-DSL9.json new file mode 100644 index 0000000..3700eeb --- /dev/null +++ b/gatling/src/test/gatling/bodies/onap-DSL9.json @@ -0,0 +1 @@ +{"dsl" : "pnf('pnf-name','onap-pnf-name')>[complex*>zone*,cloud-region*]"} diff --git a/gatling/src/test/gatling/bodies/onap-patch-bulk-single-tx.json b/gatling/src/test/gatling/bodies/onap-patch-bulk-single-tx.json new file mode 100644 index 0000000..4cba375 --- /dev/null +++ b/gatling/src/test/gatling/bodies/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/src/test/gatling/bodies/onapLOB.csv b/gatling/src/test/gatling/bodies/onapLOB.csv new file mode 100644 index 0000000..4fb0cef --- /dev/null +++ b/gatling/src/test/gatling/bodies/onapLOB.csv @@ -0,0 +1,2 @@ +line-of-business-name +onap-lineofbusinessName diff --git a/gatling/src/test/gatling/bodies/onapbulk-single-tx_putPServerVServer.json b/gatling/src/test/gatling/bodies/onapbulk-single-tx_putPServerVServer.json new file mode 100644 index 0000000..8d012de --- /dev/null +++ b/gatling/src/test/gatling/bodies/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/src/test/gatling/bodies/onapcloudregions.csv b/gatling/src/test/gatling/bodies/onapcloudregions.csv new file mode 100644 index 0000000..8868b9e --- /dev/null +++ b/gatling/src/test/gatling/bodies/onapcloudregions.csv @@ -0,0 +1,3 @@ +cloud-region-id +onap-CRId +onap-CRId2 diff --git a/gatling/src/test/gatling/bodies/onapcomplexes.csv b/gatling/src/test/gatling/bodies/onapcomplexes.csv new file mode 100644 index 0000000..0ead889 --- /dev/null +++ b/gatling/src/test/gatling/bodies/onapcomplexes.csv @@ -0,0 +1,2 @@ +physical-location-id +onap-complex-id diff --git a/gatling/src/test/gatling/bodies/onapconfigurations.csv b/gatling/src/test/gatling/bodies/onapconfigurations.csv new file mode 100644 index 0000000..1d5eebb --- /dev/null +++ b/gatling/src/test/gatling/bodies/onapconfigurations.csv @@ -0,0 +1,2 @@ +configuration-id +onap-configurationId diff --git a/gatling/src/test/gatling/bodies/onapcustomers.csv b/gatling/src/test/gatling/bodies/onapcustomers.csv new file mode 100644 index 0000000..ee4ef3d --- /dev/null +++ b/gatling/src/test/gatling/bodies/onapcustomers.csv @@ -0,0 +1,2 @@ +global-customer-id +onap-customerId diff --git a/gatling/src/test/gatling/bodies/onaploglinks.csv b/gatling/src/test/gatling/bodies/onaploglinks.csv new file mode 100644 index 0000000..df517b5 --- /dev/null +++ b/gatling/src/test/gatling/bodies/onaploglinks.csv @@ -0,0 +1,2 @@ +LogicalLinkName +onap-linkname diff --git a/gatling/src/test/gatling/bodies/onapowning_entity.csv b/gatling/src/test/gatling/bodies/onapowning_entity.csv new file mode 100644 index 0000000..eedf6e2 --- /dev/null +++ b/gatling/src/test/gatling/bodies/onapowning_entity.csv @@ -0,0 +1,2 @@ +owning-entity-id +onapowningentityId diff --git a/gatling/src/test/gatling/bodies/onapplatform.csv b/gatling/src/test/gatling/bodies/onapplatform.csv new file mode 100644 index 0000000..043c412 --- /dev/null +++ b/gatling/src/test/gatling/bodies/onapplatform.csv @@ -0,0 +1,2 @@ +platform-name +onap-platformName diff --git a/gatling/src/test/gatling/bodies/onappnfs.csv b/gatling/src/test/gatling/bodies/onappnfs.csv new file mode 100644 index 0000000..67e15ad --- /dev/null +++ b/gatling/src/test/gatling/bodies/onappnfs.csv @@ -0,0 +1,2 @@ +pnf-name +onap-pnf-name diff --git a/gatling/src/test/gatling/bodies/onapproject.csv b/gatling/src/test/gatling/bodies/onapproject.csv new file mode 100644 index 0000000..4a412ce --- /dev/null +++ b/gatling/src/test/gatling/bodies/onapproject.csv @@ -0,0 +1,2 @@ +project-name +onap-projectName diff --git a/gatling/src/test/gatling/bodies/onappservers.csv b/gatling/src/test/gatling/bodies/onappservers.csv new file mode 100644 index 0000000..b136839 --- /dev/null +++ b/gatling/src/test/gatling/bodies/onappservers.csv @@ -0,0 +1,4 @@ +hostname +onap-hostname1 +onap-hostname2 +onap-hostname3 diff --git a/gatling/src/test/gatling/bodies/onapserviceinstance.csv b/gatling/src/test/gatling/bodies/onapserviceinstance.csv new file mode 100644 index 0000000..a45531c --- /dev/null +++ b/gatling/src/test/gatling/bodies/onapserviceinstance.csv @@ -0,0 +1,2 @@ +service-instance-id +onap-serviceinstanceId diff --git a/gatling/src/test/gatling/bodies/onaptenants.csv b/gatling/src/test/gatling/bodies/onaptenants.csv new file mode 100644 index 0000000..26518bd --- /dev/null +++ b/gatling/src/test/gatling/bodies/onaptenants.csv @@ -0,0 +1,3 @@ +tenant-id +onap-tenantId +onap-tenantId2 diff --git a/gatling/src/test/gatling/bodies/onapvf-modules.csv b/gatling/src/test/gatling/bodies/onapvf-modules.csv new file mode 100644 index 0000000..d03a0b8 --- /dev/null +++ b/gatling/src/test/gatling/bodies/onapvf-modules.csv @@ -0,0 +1,2 @@ +generic-vnf-id,vf-module-id +onap-genericvnfId,onap-vnfmoduleId diff --git a/gatling/src/test/gatling/bodies/onapvnfcs.csv b/gatling/src/test/gatling/bodies/onapvnfcs.csv new file mode 100644 index 0000000..f071a99 --- /dev/null +++ b/gatling/src/test/gatling/bodies/onapvnfcs.csv @@ -0,0 +1,2 @@ +vnfc-name +onap-vnfcName diff --git a/gatling/src/test/gatling/bodies/onapvnfs.csv b/gatling/src/test/gatling/bodies/onapvnfs.csv new file mode 100644 index 0000000..b0054fe --- /dev/null +++ b/gatling/src/test/gatling/bodies/onapvnfs.csv @@ -0,0 +1,2 @@ +vnf-id +onap-genericvnfId diff --git a/gatling/src/test/gatling/bodies/patch-tenant.json b/gatling/src/test/gatling/bodies/patch-tenant.json new file mode 100644 index 0000000..4d72cb9 --- /dev/null +++ b/gatling/src/test/gatling/bodies/patch-tenant.json @@ -0,0 +1,3 @@ +{ + "tenant-name":"tenant-name-patch" +} diff --git a/gatling/src/test/gatling/bodies/patch-vf-module.json b/gatling/src/test/gatling/bodies/patch-vf-module.json new file mode 100644 index 0000000..bb3dfa1 --- /dev/null +++ b/gatling/src/test/gatling/bodies/patch-vf-module.json @@ -0,0 +1,3 @@ +{ +"automated-assignment": true +} diff --git a/gatling/src/test/gatling/conf/Gatling_conf_file b/gatling/src/test/gatling/conf/Gatling_conf_file new file mode 100644 index 0000000..a5c1533 --- /dev/null +++ b/gatling/src/test/gatling/conf/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 = "" # 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/src/test/gatling/scripts/ONAP Baseline.sh b/gatling/src/test/gatling/scripts/ONAP Baseline.sh new file mode 100644 index 0000000..c4109f2 --- /dev/null +++ b/gatling/src/test/gatling/scripts/ONAP Baseline.sh @@ -0,0 +1 @@ +mvn gatling:execute -Dgatling.simulationClass=ONAP_2204_Baseline \ No newline at end of file diff --git a/gatling/src/test/gatling/scripts/ONAP Single API.sh b/gatling/src/test/gatling/scripts/ONAP Single API.sh new file mode 100644 index 0000000..20d18c3 --- /dev/null +++ b/gatling/src/test/gatling/scripts/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/src/test/gatling/scripts/ONAP Stress.sh b/gatling/src/test/gatling/scripts/ONAP Stress.sh new file mode 100644 index 0000000..0252539 --- /dev/null +++ b/gatling/src/test/gatling/scripts/ONAP Stress.sh @@ -0,0 +1 @@ +mvn gatling:execute -Dgatling.simulationClass=ONAP_2204_Stress \ No newline at end of file diff --git a/gatling/src/test/gatling/simulations/ONAP Baseline 2022.scala b/gatling/src/test/gatling/simulations/ONAP Baseline 2022.scala new file mode 100644 index 0000000..16024a7 --- /dev/null +++ b/gatling/src/test/gatling/simulations/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/src/test/gatling/simulations/ONAP Stress 2022.scala b/gatling/src/test/gatling/simulations/ONAP Stress 2022.scala new file mode 100644 index 0000000..15e83db --- /dev/null +++ b/gatling/src/test/gatling/simulations/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/src/test/gatling/simulations/ONAP single API 2022.scala b/gatling/src/test/gatling/simulations/ONAP single API 2022.scala new file mode 100644 index 0000000..c0ab5c7 --- /dev/null +++ b/gatling/src/test/gatling/simulations/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 -- cgit 1.2.3-korg