diff options
83 files changed, 1609 insertions, 848 deletions
@@ -22,5 +22,6 @@ env.properties .DS_Store .idea *.iml +*.pyc /bin/ diff --git a/plans/dcaegen2-collectors-hv-ves/testsuites/collector/configuration/insecure.json b/plans/dcaegen2-collectors-hv-ves/testsuites/collector/configuration/insecure.json index 3df8e6e8..357824dd 100644 --- a/plans/dcaegen2-collectors-hv-ves/testsuites/collector/configuration/insecure.json +++ b/plans/dcaegen2-collectors-hv-ves/testsuites/collector/configuration/insecure.json @@ -1,15 +1,9 @@ { - "server": { - "listenPort": 6061, - "idleTimeoutSec": 60, - "maxPayloadSizeBytes": 1048576 - }, - "cbs": { - "firstRequestDelaySec": 5, - "requestIntervalSec": 10 - }, - "security": { - "sslDisable": true - }, - "logLevel": "DEBUG" + "logLevel": "DEBUG", + "server.listenPort": 6061, + "server.idleTimeoutSec": 60, + "server.maxPayloadSizeBytes": 1048576, + "cbs.firstRequestDelaySec": 3, + "cbs.requestIntervalSec": 5, + "security.sslDisable": true }
\ No newline at end of file diff --git a/plans/dcaegen2-collectors-hv-ves/testsuites/collector/configuration/secure.json b/plans/dcaegen2-collectors-hv-ves/testsuites/collector/configuration/secure.json index 60ac2366..018f590a 100644 --- a/plans/dcaegen2-collectors-hv-ves/testsuites/collector/configuration/secure.json +++ b/plans/dcaegen2-collectors-hv-ves/testsuites/collector/configuration/secure.json @@ -1,21 +1,12 @@ { - "server": { - "listenPort": 6061, - "idleTimeoutSec": 60, - "maxPayloadSizeBytes": 1048576 - }, - "cbs": { - "firstRequestDelaySec": 5, - "requestIntervalSec": 10 - }, - "security": { - "sslDisable": false, - "keys": { - "keyStoreFile": "/etc/hv-ves/ssl/server.p12", - "keyStorePassword": "onaponap", - "trustStoreFile": "/etc/hv-ves/ssl/trust.p12", - "trustStorePassword": "onaponap" - } - }, - "logLevel": "DEBUG" + "logLevel": "DEBUG", + "server.listenPort": 6061, + "server.idleTimeoutSec": 60, + "server.maxPayloadSizeBytes": 1048576, + "cbs.firstRequestDelaySec": 3, + "cbs.requestIntervalSec": 5, + "security.keys.keyStoreFile": "/etc/hv-ves/ssl/server.p12", + "security.keys.keyStorePasswordFile": "/etc/hv-ves/ssl/server.pass", + "security.keys.trustStoreFile": "/etc/hv-ves/ssl/trust.p12", + "security.keys.trustStorePasswordFile": "/etc/hv-ves/ssl/trust.pass" }
\ No newline at end of file diff --git a/plans/dcaegen2-collectors-hv-ves/testsuites/collector/ssl/.gitignore b/plans/dcaegen2-collectors-hv-ves/testsuites/collector/ssl/.gitignore index 0729569c..955c17d1 100644 --- a/plans/dcaegen2-collectors-hv-ves/testsuites/collector/ssl/.gitignore +++ b/plans/dcaegen2-collectors-hv-ves/testsuites/collector/ssl/.gitignore @@ -4,3 +4,4 @@ *.csr *.pkcs12 *.p12 +*.pass diff --git a/plans/dcaegen2-collectors-hv-ves/testsuites/collector/ssl/gen-certs.sh b/plans/dcaegen2-collectors-hv-ves/testsuites/collector/ssl/gen-certs.sh index 9f6bea20..33e3b32b 100755 --- a/plans/dcaegen2-collectors-hv-ves/testsuites/collector/ssl/gen-certs.sh +++ b/plans/dcaegen2-collectors-hv-ves/testsuites/collector/ssl/gen-certs.sh @@ -41,6 +41,8 @@ function gen_key() { keytool -certreq -alias ${key_name} -keyalg RSA ${keystore} | \ keytool -alias ${ca} -gencert -ext "san=dns:${CN_PREFIX}-${ca}" ${store_opts} -keystore ${ca}.p12 | \ keytool -alias ${key_name} -importcert ${keystore} + + printf ${STORE_PASS} > ${key_name}.pass } @@ -54,10 +56,11 @@ function gen_truststore() { local name="$1" local trusted_ca="$2" keytool -import -trustcacerts -alias ca -file ${trusted_ca}.crt ${store_opts} -keystore ${name}.p12 + printf ${STORE_PASS} > ${name}.pass } function clean() { - rm -f *.crt *.p12 + rm -f *.crt *.p12 *.pass } if [[ $# -eq 0 ]]; then @@ -74,4 +77,3 @@ else echo "usage: $0 [clean]" exit 1 fi - diff --git a/plans/dcaegen2-collectors-hv-ves/testsuites/env.sh b/plans/dcaegen2-collectors-hv-ves/testsuites/env.sh index a5a0a4f0..05314841 100755 --- a/plans/dcaegen2-collectors-hv-ves/testsuites/env.sh +++ b/plans/dcaegen2-collectors-hv-ves/testsuites/env.sh @@ -18,7 +18,7 @@ # ============LICENSE_END========================================================= # using WORKSPACE variable defined in run-csit.sh -export ROBOT_VARIABLES="--pythonpath ${WORKSPACE}/tests/dcaegen2-collectors-hv-ves/testcases/libraries" +export ROBOT_VARIABLES="--pythonpath ${WORKSPACE}/tests/dcaegen2-collectors-hv-ves/testcases/libraries --noncritical non-critical" export JAVA_OPTS="-Dio.netty.leakDetection.level=paranoid" export CONSUL_HOST="consul-server" diff --git a/plans/dcaegen2-collectors-hv-ves/testsuites/env_local.sh b/plans/dcaegen2-collectors-hv-ves/testsuites/env_local.sh index 280f0c47..20b538b5 100755 --- a/plans/dcaegen2-collectors-hv-ves/testsuites/env_local.sh +++ b/plans/dcaegen2-collectors-hv-ves/testsuites/env_local.sh @@ -18,7 +18,7 @@ # ============LICENSE_END========================================================= export WORKSPACE=$(git rev-parse --show-toplevel) -export ROBOT_VARIABLES="--pythonpath ${WORKSPACE}/tests/dcaegen2-collectors-hv-ves/testcases/libraries" +export ROBOT_VARIABLES="--pythonpath ${WORKSPACE}/tests/dcaegen2-collectors-hv-ves/testcases/libraries --noncritical non-critical" export JAVA_OPTS="-Dio.netty.leakDetection.level=paranoid" export CONSUL_HOST="consul-server" diff --git a/plans/dcaegen2-collectors-restconf/testsuites/setup.sh b/plans/dcaegen2-collectors-restconf/testsuites/setup.sh new file mode 100755 index 00000000..c1b4f342 --- /dev/null +++ b/plans/dcaegen2-collectors-restconf/testsuites/setup.sh @@ -0,0 +1,21 @@ +#!/bin/bash + +#get current host IP addres +HOST_IP=$(ip route get 8.8.8.8 | awk '/8.8.8.8/ {print $NF}') + +RCC_IMAGE=nexus3.onap.org:10001/onap/org.onap.dcaegen2.collectors.restconfcollector:latest +echo RCC_IMAGE=${RCC_IMAGE} + +# Start DCAE Restconf Collector +docker run -d -p 8080:8080/tcp -p 8443:8443/tcp -P --name rcc -e DMAAPHOST=${HOST_IP} ${RCC_IMAGE} + +RCC_IP=`get-instance-ip.sh rcc` +export RCC_IP=${RCC_IP} +export HOST_IP=${HOST_IP} + +export ROBOT_VARIABLES="--pythonpath ${WORKSPACE}/tests/dcaegen2-collectors-restconf/testcases/resources" + +pip install jsonschema uuid +# Wait container ready +sleep 5 + diff --git a/plans/dcaegen2-collectors-restconf/testsuites/teardown.sh b/plans/dcaegen2-collectors-restconf/testsuites/teardown.sh new file mode 100755 index 00000000..1816f16b --- /dev/null +++ b/plans/dcaegen2-collectors-restconf/testsuites/teardown.sh @@ -0,0 +1,3 @@ +#!/bin/bash + +kill-instance.sh rcc
\ No newline at end of file diff --git a/plans/dcaegen2-collectors-restconf/testsuites/testplan.txt b/plans/dcaegen2-collectors-restconf/testsuites/testplan.txt new file mode 100755 index 00000000..66a70718 --- /dev/null +++ b/plans/dcaegen2-collectors-restconf/testsuites/testplan.txt @@ -0,0 +1,3 @@ +# Test suites are relative paths under [integration/csit.git]/tests/. +# Place the suites in run order. +dcaegen2-collectors-restconf/testcases diff --git a/plans/dcaegen2-pmmapper/pmmapper/assets/addSubscriber.json b/plans/dcaegen2-pmmapper/pmmapper/assets/addSubscriber.json index 43a4a65c..0666a7d5 100644 --- a/plans/dcaegen2-pmmapper/pmmapper/assets/addSubscriber.json +++ b/plans/dcaegen2-pmmapper/pmmapper/assets/addSubscriber.json @@ -1,6 +1,6 @@ { "delivery":{ - "url":"http://dcae-pm-mapper.onap.svc.cluster.local:8081/delivery", + "url":"http://dcae-pm-mapper:8081/delivery", "user":"username", "password":"password", "use100":true diff --git a/plans/dcaegen2-pmmapper/pmmapper/assets/cert.jks.b64 b/plans/dcaegen2-pmmapper/pmmapper/assets/cert.jks.b64 new file mode 100644 index 00000000..66a81155 --- /dev/null +++ b/plans/dcaegen2-pmmapper/pmmapper/assets/cert.jks.b64 @@ -0,0 +1,82 @@ +/u3+7QAAAAIAAAABAAAAAQASZGNhZUBkY2FlLm9uYXAub3JnAAABaYCR6Y0AAAUCMIIE/jAOBgor +BgEEASoCEQEBBQAEggTqMMIAZ9fYH2ZvhbcY9q2XvR4OftQ8+YWRYRikzelzHB8UWsI8WKD8LF50 +MB8r+vF7/a5xsBnnJykD8Tel32JsiQFpAPpTwP/5RsDnC7S7w1WlHhn2YHJS/Rt0jm/Qn5L0tnzc +wkcdJbUjwhIZBZ7UCpCe4BFwbEFooSdTxQXZJCtF50tTYL+LvBRv/Bfxno88XqMFmNkaxnOHIrnN +2YYW0aLoeCw5TiEcuzY/pOhUprqLfEDK2xa/M20oyjvcnq/zU/W4U8f5fXYwVh3jfeu9aukSecP0 +ABr7tcdKE02i6UdpFEfYR39j8s8PtwLPIbnRWwvB89H587z90vYW+bs5A3kyhBpapBrbd0Iwo1Bj +6dQn+/RcFGdxM8yVHarfwAtq353Lgta/OedqsybCrkF8jKwMUfnCFSorILPg1moBggPOXs6qezqE +QNLhaqk4C33wN74Mu+0sNszlfmkMfo7uSXD2Ak0nmDfV+AHj5iepvnHMr1ziixOToLYliuSHpPr+ +SbzR3iyiqylgpG+Jx6/jEkcU6FKJRXciTHeHdBuSULNrgX1KKSFtMm/s1I446OcoJgyTwCx9RU5Y +Je2XdIXwBX2OdDE0jPjRySHZPrk4z2cACrJcKQ+10/bZu0fCUPPnkOW5XQbDEA6EwSsg23vqqQJw +yFhlUb1UsVRW3GIgnGtQRsk2+ajQ2Vj2mW+waUWSpzKdPtEGsAXMyrvu/xqB6hzPndaivyaXHU2J +qAAM3BFLygIDNKyCz7vAPCfx8qU+pWCWdtccPyu2+byJmZEAy4E1mGXSBmZ96LFuicPT1un/HXnL +a9fTrcsGgmXf2ipyXm6qJAzObxUjWE02VEph1jeOD2FaRvR+F0Fsxi0rL5yf/dkXSEEWnJnnpgrm +GCLfUvKKJgMLlB38KfQPgg003DHv9uRb5/f06jpBjSnItwS8aLPL3JrT6OU5zS7bXOkcKKg6yDYa +vTpQYvfaJXm+ZTUvdu+A3toSrkcNeNEcZV0dPUUCjIStOlb+lt6lV3GawTxilDTkczeFigCw5lYF +MgLEGgq56cXRaRD7GImuVRrsjZE/1k77fCjqYlZDq+6jPuSV9a9Rsy4CycdJj43UPceOlHQc2kKs +LWvAKFzn2JiakLoCXFnUT0nZ0O5ismC6FL+QHDZLFM+XCbFTOuDx5p2ze8PQIM9wXq7/ODTFW+WH +9v9ISkbDFhYF4evsc55s5PlSMyB3scB95j8yKeIIMPrMhae1YIGmRVRqmoWRCNLRHag28Ql9ubrq +mghZrQdhf6hLP8nvdCoktSBiimBz5aO6tes03eh/gZnhLC6QV827vzmiz+aIE3XBJ1Jbju2r8xVF +RPqz4J5TnufP9WOOjUSD4oDE0x0+ZelV9XH/Ijyp5a7P5t08H2HWyf6rOn30BHAluL3EcWy6ZyxS +H0rciEfpJd67Ta+FlfoYDLS2Sls/+9mW88Yte4sAfI7PKHz3p/ia2KmKmZxqdoeRFGaASpMQmmHM +OKZzZ4rYPV7E8+/RfngVA1EdGr1Xa4wddnYg4M3TacBenvBnQ22T3TQwX9rbuLE4/4MBPsCBgfXi +5fUFSCXH0jXthipn3rDp0XtnoBqPCY2mQl5jxVl6Ilw076ttaLxrKHfPpaZmRSIBgAJwGWNt3PsD +2dRGdFQEI9ZOSfesMmORh2uwcwAAAAIABVguNTA5AAAIVTCCCFEwggc5oAMCAQICCEqPeevfzuAj +MA0GCSqGSIb3DQEBCwUAMEcxCzAJBgNVBAYTAlVTMQ0wCwYDVQQKDARPTkFQMQ4wDAYDVQQLDAVP +U0FBRjEZMBcGA1UEAwwQaW50ZXJtZWRpYXRlQ0FfOTAeFw0xOTAzMTUwODU3MTlaFw0yMDAzMTUw +ODU3MTlaMGkxDTALBgNVBAMMBGRjYWUxDzANBgkqhkiG9w0BCQEWADEbMBkGA1UECwwSZGNhZUBk +Y2FlLm9uYXAub3JnMQ4wDAYDVQQLDAVPU0FBRjENMAsGA1UECgwET05BUDELMAkGA1UEBhMCVVMw +ggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCDOQyJWZx2RJbPTI+krOHi8CBstWYZZ79D +1Gz/sHcgqeKMH8cW0eeKGNGJ3lh98leLk7Kb/qkZ1Mvk34GkYGm7q3tsN/03yu4gzIRFQHU901e6 +wSwETpmnXloRUjV5hivuY60jCo3rvOsWZdKmLWuDxp8nks8CA3hMp12URny7W9rgJ2nIUIeD2cEo +j50s7AgzmxCgYC1TXuSN4I3OF9kvD3DXkIRGHRDnSXx5Whp73iwK6Svj5DrHf3Y170AY3JHGHXTn +3haW4qVTErmtg6QpLdOZttFLB/LQ4VgF/QulvYGHx2ZASSaxwXquH+vahEHGJOeeL60E0bTuMDsF +mkZRAgMBAAGjggUdMIIFGTAJBgNVHRMEAjAAMA4GA1UdDwEB/wQEAwIF4DAgBgNVHSUBAf8EFjAU +BggrBgEFBQcDAQYIKwYBBQUHAwIwVAYDVR0jBE0wS4AUgfeZWxC5yIze81Je6k5poEM+rN2hMKQu +MCwxDjAMBgNVBAsMBU9TQUFGMQ0wCwYDVQQKDARPTkFQMQswCQYDVQQGEwJVU4IBBzAdBgNVHQ4E +FgQUF60XVghHsdXv1Nqzuwh086jAtrEwggRjBgNVHREEggRaMIIEVoIEZGNhZYIWY29uZmlnLWJp +bmRpbmctc2VydmljZYIbY29uZmlnLWJpbmRpbmctc2VydmljZS5vbmFwgi1jb25maWctYmluZGlu +Zy1zZXJ2aWNlLm9uYXAuc3ZjLmNsdXN0ZXIubG9jYWyCFWRjYWUtY2xvdWRpZnktbWFuYWdlcoIa +ZGNhZS1jbG91ZGlmeS1tYW5hZ2VyLm9uYXCCLGRjYWUtY2xvdWRpZnktbWFuYWdlci5vbmFwLnN2 +Yy5jbHVzdGVyLmxvY2FsghdkY2FlLWRhdGFmaWxlLWNvbGxlY3RvcoIcZGNhZS1kYXRhZmlsZS1j +b2xsZWN0b3Iub25hcIIuZGNhZS1kYXRhZmlsZS1jb2xsZWN0b3Iub25hcC5zdmMuY2x1c3Rlci5s +b2NhbIIVZGNhZS1odi12ZXMtY29sbGVjdG9yghpkY2FlLWh2LXZlcy1jb2xsZWN0b3Iub25hcIIs +ZGNhZS1odi12ZXMtY29sbGVjdG9yLm9uYXAuc3ZjLmNsdXN0ZXIubG9jYWyCDmRjYWUtcG0tbWFw +cGVyghNkY2FlLXBtLW1hcHBlci5vbmFwgiVkY2FlLXBtLW1hcHBlci5vbmFwLnN2Yy5jbHVzdGVy +LmxvY2FsgghkY2FlLXByaIINZGNhZS1wcmgub25hcIIfZGNhZS1wcmgub25hcC5zdmMuY2x1c3Rl +ci5sb2NhbIISZGNhZS10Y2EtYW5hbHl0aWNzghdkY2FlLXRjYS1hbmFseXRpY3Mub25hcIIpZGNh +ZS10Y2EtYW5hbHl0aWNzLm9uYXAuc3ZjLmNsdXN0ZXIubG9jYWyCEmRjYWUtdmVzLWNvbGxlY3Rv +coIXZGNhZS12ZXMtY29sbGVjdG9yLm9uYXCCKWRjYWUtdmVzLWNvbGxlY3Rvci5vbmFwLnN2Yy5j +bHVzdGVyLmxvY2FsghJkZXBsb3ltZW50LWhhbmRsZXKCF2RlcGxveW1lbnQtaGFuZGxlci5vbmFw +gilkZXBsb3ltZW50LWhhbmRsZXIub25hcC5zdmMuY2x1c3Rlci5sb2NhbIISaG9sbWVzLWVuZ2lu +ZS1tZ210ghdob2xtZXMtZW5naW5lLW1nbXQub25hcIIpaG9sbWVzLWVuZ2luZS1tZ210Lm9uYXAu +c3ZjLmNsdXN0ZXIubG9jYWyCEGhvbG1lcy1ydWxlLW1nbXSCFmhvbG1lcy1ydWxlcy1tZ210Lm9u +YXCCKGhvbG1lcy1ydWxlcy1tZ210Lm9uYXAuc3ZjLmNsdXN0ZXIubG9jYWyCCWludmVudG9yeYIO +aW52ZW50b3J5Lm9uYXCCIGludmVudG9yeS5vbmFwLnN2Yy5jbHVzdGVyLmxvY2Fsgg5wb2xpY3kt +aGFuZGxlcoITcG9saWN5LWhhbmRsZXIub25hcIIlcG9saWN5LWhhbmRsZXIub25hcC5zdmMuY2x1 +c3Rlci5sb2NhbDANBgkqhkiG9w0BAQsFAAOCAQEAljxv74DI50X+LGglF6yGgnTiG6d6aTrbdFji ++HiV06jtSKXIf4enMGKJ2AUWXbnxw8105fTeS8tiTohaHCpNjNpliDCwia7p1xFJGuDamsvcy31S +Ihqunuy/UkImgRhq63xMUGivoSYy0rIzVGp3WMvdrKGYbeI8iHomAJGwHw3T3gUFvf+4Rivrb2MI +39eqao9vUDVtN8mOyEU7Kdd0nqob35Uc/jsE8KJmhI9sJC96SzwfmtfENfcWfpAv5Pq8fPCA4J5m +pDJ2XbRMIR5bTMXwKC9/85FKRVH4SJPey22Y7IwfRDLJYHGsSK73yrs7ZBzbBKFJOHvIPPQz19Hu +uwAFWC41MDkAAAR5MIIEdTCCAl2gAwIBAgIBBzANBgkqhkiG9w0BAQsFADAsMQ4wDAYDVQQLDAVP +U0FBRjENMAsGA1UECgwET05BUDELMAkGA1UEBhMCVVMwHhcNMTgwODE3MTg1MTM3WhcNMjMwODE3 +MTg1MTM3WjBHMQswCQYDVQQGEwJVUzENMAsGA1UECgwET05BUDEOMAwGA1UECwwFT1NBQUYxGTAX +BgNVBAMMEGludGVybWVkaWF0ZUNBXzkwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCv +0HHUkba3uNtNI3jPKimUcd6RNwmhSCJLneMWpnjqp5/A+HCKyNsEaT4y177hNLmCm/aMm1u2JIfi +kc+8wEqLCSBBPz+P0h+do+sZ7U+4oeQizdYYpEdzHJ2SieHHa8vtu80rU3nO2NEIkuYC20HcKSEt +l8fFKsk3nqlhY+tGfYJPTXcDOQAO40BTcgat3C3uIJHkWJJ4RivunE4LEuRv9QyKgAw7rkJVv+f7 +guqpZlXy6dzAkuU7XULWcgo55MkZlssoiErMvEZJad5aWKvRY3g7qUjaQ6wO15wOAUoRBW96eeZZ +bytgn8kybcBy++Ue49gPtgm1MF/KlAsp0MD5AgMBAAGjgYYwgYMwHQYDVR0OBBYEFIH3mVsQuciM +3vNSXupOaaBDPqzdMB8GA1UdIwQYMBaAFFNVM/JL69BRscF4msEoMXvv6u1JMBIGA1UdEwEB/wQI +MAYBAf8CAQEwDgYDVR0PAQH/BAQDAgGGMB0GA1UdJQQWMBQGCCsGAQUFBwMBBggrBgEFBQcDAjAN +BgkqhkiG9w0BAQsFAAOCAgEADxNymiCNr2e37iLReoaxKmZvwox0cTiNAaj7iafRzmwIoY3VXO8Q +ix5IYcp4FaQ7fV1jyp/AmaSnyHf6Osl0sx8PxsQkO7ALttxKUrjfbvNSVUA2C/vlu5m7UVJLIUtF +DZBWanzUSmkTsYLHpiANFQKd2c/cU1qXcyzgJVFEFVyyHNkF7Is++pjG9M1hwQHOoTnEuU013P7X +1mHek+RXEfhJWwe7UsZnBKZaZKbQZu7hEtqKWYp/QsHgnjoLYXsh0WD5rz/mBxdTdDLGpFqWDzDq +b8rsYnqBzoowvsasV8X8OSkov0Ht8Yka0ckFH9yf8j1Cwmbl6ttuonOhky3N/gwLEozuhy7TPcZG +VyzevF70kXy7g1CXkpFGJyEHXoprlNi8FR4I+NFzbDe6a2cFow1JN19AJ9Z5Rk5m7M0mQPaQ4Rci +kjB3aoLsASCJTm1OpOFHfxEKiBW4Lsp3Uc5/Rb9ZNbfLrwqWZRM7buW1e3ekLqntgbkyuKKISHqV +Juw/vXHl1jNibEo9+JuQ88VNuAcm7WpGUogeCa2iAlPTckPZei+MwZ8wtpvxTyYlZEC8DWzY1VC2 +9+W2N5cvh01e2E3Ql08W1zL63dqrgdEZ3VWjzooYi4epBmMXTvouW+Flyvcw/0oTcfN0biDIt0mC +kZ5CQVjfGL9DTOYteR5hw+nBBe/JRrAcRd4SbmfuQxonDjDymA== diff --git a/plans/dcaegen2-pmmapper/pmmapper/assets/config.json b/plans/dcaegen2-pmmapper/pmmapper/assets/config.json index 62e4f402..0b62454d 100644 --- a/plans/dcaegen2-pmmapper/pmmapper/assets/config.json +++ b/plans/dcaegen2-pmmapper/pmmapper/assets/config.json @@ -7,7 +7,7 @@ "aaf_password": null, "dmaap_info": { "location": "csit-pmmapper", - "delivery_url": "http://dcae-pm-mapper.onap.svc.cluster.local:8081/delivery", + "delivery_url": "http://dcae-pm-mapper:8081/delivery", "username": "username", "password": "password", "subscriber_id": "1" @@ -31,9 +31,9 @@ "dmaap_dr_delete_endpoint": "https://dmaap-dr-node:8443/delete", "services_calls": {}, "enable_http": true, - "key_store_path": "/opt/app/pm-mapper/etc/cert/cert.jks.b64", - "key_store_pass_path": "/opt/app/pm-mapper/etc/cert/jks.pass", - "trust_store_path": "/opt/app/pm-mapper/etc/cert/trust.jks.b64", - "trust_store_pass_path": "/opt/app/pm-mapper/etc/cert/trust.pass" + "key_store_path": "/opt/app/pm-mapper/etc/cert.jks.b64", + "key_store_pass_path": "/opt/app/pm-mapper/etc/jks.pass", + "trust_store_path": "/opt/app/pm-mapper/etc/trust.jks.b64", + "trust_store_pass_path": "/opt/app/pm-mapper/etc/trust.pass" }
\ No newline at end of file diff --git a/plans/dcaegen2-pmmapper/pmmapper/assets/createTopic.json b/plans/dcaegen2-pmmapper/pmmapper/assets/createTopic.json index c1a296dc..4d20974b 100644 --- a/plans/dcaegen2-pmmapper/pmmapper/assets/createTopic.json +++ b/plans/dcaegen2-pmmapper/pmmapper/assets/createTopic.json @@ -1,4 +1,4 @@ -{ +{ "topicName":"PM_MAPPER", "topicDescription":"PM Mapper VES Event", "owner":"pmmapper" diff --git a/plans/dcaegen2-pmmapper/pmmapper/assets/jks.pass b/plans/dcaegen2-pmmapper/pmmapper/assets/jks.pass new file mode 100644 index 00000000..ae8f7e72 --- /dev/null +++ b/plans/dcaegen2-pmmapper/pmmapper/assets/jks.pass @@ -0,0 +1 @@ +Er1tmip;T4w[%1}YE?x{fN9v
\ No newline at end of file diff --git a/plans/dcaegen2-pmmapper/pmmapper/assets/trust.jks.b64 b/plans/dcaegen2-pmmapper/pmmapper/assets/trust.jks.b64 new file mode 100644 index 00000000..14513277 --- /dev/null +++ b/plans/dcaegen2-pmmapper/pmmapper/assets/trust.jks.b64 @@ -0,0 +1,25 @@ +/u3+7QAAAAIAAAABAAAAAgAKY2FfbG9jYWxfMAAAAWmAkeoCAAVYLjUwOQAABUIwggU+MIIDJqAD +AgECAgkAnq7twKfOtZ0wDQYJKoZIhvcNAQELBQAwLDEOMAwGA1UECwwFT1NBQUYxDTALBgNVBAoM +BE9OQVAxCzAJBgNVBAYTAlVTMB4XDTE4MDQwNTE0MTUyOFoXDTM4MDMzMTE0MTUyOFowLDEOMAwG +A1UECwwFT1NBQUYxDTALBgNVBAoMBE9OQVAxCzAJBgNVBAYTAlVTMIICIjANBgkqhkiG9w0BAQEF +AAOCAg8AMIICCgKCAgEAwDmmSBGzs2EYbh7Dkmi6HJhqSBhTIVobXbX7+HyptJ23SFVC/nr4QDjV +irtcaJ7tFgNAr02YAUXeCu4T7pfvC8mIKGn4LJ3uwUydvrm5aHER3FZMzYEkWuB/NScfxkLGBoKj +dcfg/OUpHLYtBAkQkQLCX9FmZEJeKMy3l72Hxehlj98qQpxllSxY0IylOjbrrCO8D0xcuZ2BF5GP +T6+sKOs2rL6G3AkPO2iIdaJg+pPqjwS8ZyCM2qOVnHs1Q1/wx8sMHKooXr7BFse/UYqOff9WKN3j +kW/yuLJFhE6IVqe9tXqMh8GS/w9lteDZUNaxiyCnw0C8zEr6JXxw74KTeUEjYY49lsISqk9VNhst +TPqxzMCUJfBCg/MMhljBhrd5H+BgtjWA/aIRUc5FqDdss9qn1lfkTwNmTNM1OOi+8uTwpoKZ9xpQ +wmwG0N0ClxSK3PXRydHJlzWxfeATV/cOnNAzq30Lmw5XJGENxKsqqrBv2bRKzThcBL0Wyow/dRZh +DKoNdLGVQBhpfz3a7yZXWHGe3aCNvbZGWhcwzpOi8zexKslLTAf6XWfOd3poVd+1L8bhlUhVn8t9 +PWKzhK2jI9ZkLDDCXLXPyolD/OGKnk2BlPFDDiaLvDDfkNg90BA4KhqN9K8WOqyVD9w9GL8xEK7T +v2F5Vvl9CefNW2ekVBECAwEAAaNjMGEwHQYDVR0OBBYEFFNVM/JL69BRscF4msEoMXvv6u1JMB8G +A1UdIwQYMBaAFFNVM/JL69BRscF4msEoMXvv6u1JMA8GA1UdEwEB/wQFMAMBAf8wDgYDVR0PAQH/ +BAQDAgGGMA0GCSqGSIb3DQEBCwUAA4ICAQA/H8hor3ifTbA/GmdhPL4tUsjHB2r+RrA13ohuIzMv +zvOY0wOYdwZt+hEKPw6SG6CBf0vHX8KSGleKa5ixk4VCLluWv+76/iYhuyBuaL3uP5xQcM/TMvJy +9K/Eoe3LnUvCZpf1rjCQmXnMFTg7Wx38f21ZwSbAnf2W0qgEoHFz3hlzeIybnK1FYaP7SsrMsMBc +RamhnlsTk8slq4DpQMLEMt+zcXCFtLu4OCDFi9+PJIXkUI0RP3ign6byztV4e+hryI8Yq9esip13 +tcMeeokmVUqvub1LR8xvIQHxyLZG05cO33eJ9jW6GgS0TKSfh2oFKnx7O80yfChd1g8O9N324IAV +5YUtWt4EBbF3bmE+wFORkDmGlr+sD6Yq/oB/hUFWJivxzPh1kKwUKG6KhV5t72KCGt+MH/+op6kW +M8ULKPMo3W7Qkqb/bH85GrGRM40byne4PCgg7KKZRxO1My/jZt9gPzxEpqSpIVcT0b5nQuVooAGp ++Mrj2j+2wCn5zkug2ViWUqGd607dAB2tofB2YLfoGGiCHNHWOlfvnUBxmfZUfdDhcrKnTVwk0Iki +u5r4D5vHrOHdHJbrMgiRtEJsRP5QP7iavxYhxITea1FlWWeFQM7jP3/9YoxXPBL1GHz+S6zOsYUj +UpCjNcIcutx7dg/pFhl8553v0tdpHBd1hnsHnlbKPpawxer5hLDs2S++H7Xx diff --git a/plans/dcaegen2-pmmapper/pmmapper/assets/trust.pass b/plans/dcaegen2-pmmapper/pmmapper/assets/trust.pass new file mode 100644 index 00000000..d3d01b0a --- /dev/null +++ b/plans/dcaegen2-pmmapper/pmmapper/assets/trust.pass @@ -0,0 +1 @@ +583Ls;XF(qDQu3p!L22gyh1t
\ No newline at end of file diff --git a/plans/dcaegen2-pmmapper/pmmapper/composefile/docker-compose-e2e.yml b/plans/dcaegen2-pmmapper/pmmapper/composefile/docker-compose-e2e.yml index c972bd7a..a60b30b9 100644 --- a/plans/dcaegen2-pmmapper/pmmapper/composefile/docker-compose-e2e.yml +++ b/plans/dcaegen2-pmmapper/pmmapper/composefile/docker-compose-e2e.yml @@ -1,7 +1,7 @@ version: '2.1' services: datarouter-prov: - image: nexus3.onap.org:10001/onap/dmaap/datarouter-prov:2.0.2-SNAPSHOT-latest + image: nexus3.onap.org:10001/onap/dmaap/datarouter-prov:2.1.0-SNAPSHOT-latest container_name: datarouter-prov hostname: dmaap-dr-prov ports: @@ -22,10 +22,10 @@ services: retries: 5 extra_hosts: - "dmaap-dr-node:1.1.1.1" - - "dcae-pm-mapper.onap.svc.cluster.local:3.3.3.3" + - "dcae-pm-mapper:3.3.3.3" datarouter-node: - image: nexus3.onap.org:10001/onap/dmaap/datarouter-node:2.0.2-SNAPSHOT-latest + image: nexus3.onap.org:10001/onap/dmaap/datarouter-node:2.1.0-SNAPSHOT-latest container_name: datarouter-node hostname: dmaap-dr-node ports: @@ -38,7 +38,7 @@ services: condition: service_healthy extra_hosts: - "dmaap-dr-prov:2.2.2.2" - - "dcae-pm-mapper.onap.svc.cluster.local:3.3.3.3" + - "dcae-pm-mapper:3.3.3.3" mariadb_container: image: mariadb:10.2.14 diff --git a/plans/dcaegen2-pmmapper/pmmapper/composefile/docker-compose-pmmapper.yml b/plans/dcaegen2-pmmapper/pmmapper/composefile/docker-compose-pmmapper.yml index bf03d1f1..2e3919b6 100644 --- a/plans/dcaegen2-pmmapper/pmmapper/composefile/docker-compose-pmmapper.yml +++ b/plans/dcaegen2-pmmapper/pmmapper/composefile/docker-compose-pmmapper.yml @@ -2,7 +2,7 @@ version: '2.1' services: pmmapper: container_name: pmmapper - image: dfarrelly/onap:csit + image: nexus3.onap.org:10001/onap/org.onap.dcaegen2.services.pm-mapper:latest ports: - "8081:8081" environment: diff --git a/plans/dcaegen2-pmmapper/pmmapper/setup.sh b/plans/dcaegen2-pmmapper/pmmapper/setup.sh index 5a0339ea..e52195f5 100644 --- a/plans/dcaegen2-pmmapper/pmmapper/setup.sh +++ b/plans/dcaegen2-pmmapper/pmmapper/setup.sh @@ -83,6 +83,13 @@ sed -i 's/2.2.2.2/'$DR_PROV_IP'/g' docker-compose.yml sed -i 's/3.3.3.3/'$PMMAPPER_IP'/g' docker-compose.yml docker-compose up -d +# Setting up PM Mapper certs. +docker cp $WORKSPACE/plans/dcaegen2-pmmapper/pmmapper/assets/cert.jks.b64 pmmapper:opt/app/pm-mapper/etc/ +docker cp $WORKSPACE/plans/dcaegen2-pmmapper/pmmapper/assets/jks.pass pmmapper:opt/app/pm-mapper/etc/ +docker cp $WORKSPACE/plans/dcaegen2-pmmapper/pmmapper/assets/trust.jks.b64 pmmapper:opt/app/pm-mapper/etc/ +docker cp $WORKSPACE/plans/dcaegen2-pmmapper/pmmapper/assets/trust.pass pmmapper:opt/app/pm-mapper/etc/ +docker restart pmmapper + # Wait for initialization of Docker container for datarouter-node, datarouter-prov and mariadb, Consul, CBS for i in {1..5}; do if [ $(docker inspect --format '{{ .State.Running }}' datarouter-node) ] && \ @@ -123,5 +130,4 @@ curl -k https://$DR_PROV_IP:8443/internal/prov curl http://${DMAAP_MR_IP}:3904/events/PM_MAPPER/CG1/C1?timeout=1000 #Pass any variables required by Robot test suites in ROBOT_VARIABLES -ROBOT_VARIABLES="-v CONSUL_IP:${CONSUL_IP} -v DR_PROV_IP:${DR_PROV_IP} -v DMAAP_MR_IP:${DMAAP_MR_IP} -v CBS_IP:${CBS_IP} -v PMMAPPER_IP:${PMMAPPER_IP} -v DR_NODE_IP:${DR_NODE_IP}" -export ROBOT_VARIABLES
\ No newline at end of file +ROBOT_VARIABLES="-v CONSUL_IP:${CONSUL_IP} -v DR_PROV_IP:${DR_PROV_IP} -v DMAAP_MR_IP:${DMAAP_MR_IP} -v CBS_IP:${CBS_IP} -v PMMAPPER_IP:${PMMAPPER_IP} -v DR_NODE_IP:${DR_NODE_IP}"
\ No newline at end of file diff --git a/plans/dmaap-datarouter/dr-suite/docker-compose/node.properties b/plans/dmaap-datarouter/dr-suite/docker-compose/node.properties index 62b0f824..c692b906 100644 --- a/plans/dmaap-datarouter/dr-suite/docker-compose/node.properties +++ b/plans/dmaap-datarouter/dr-suite/docker-compose/node.properties @@ -63,10 +63,10 @@ KeyStoreType = jks KeyStoreFile = /opt/app/datartr/aaf_certs/org.onap.dmaap-dr.jks # # The password for the https keystore -KeyStorePassword=]3V)($O&.Mv]W{f8^]6SxGNL +KeyStorePassword=WGxd2P6MDo*Bi4+UdzWs{?$8 # # The password for the private key in the https keystore -KeyPassword=]3V)($O&.Mv]W{f8^]6SxGNL +KeyPassword=WGxd2P6MDo*Bi4+UdzWs{?$8 # # The type of truststore for https TrustStoreType = jks @@ -75,7 +75,7 @@ TrustStoreType = jks TrustStoreFile = /opt/app/datartr/aaf_certs/org.onap.dmaap-dr.trust.jks # # The password for the https truststore -TrustStorePassword=(Rd,&{]%ePdp}4JZjqoJ2G+g +TrustStorePassword=)OBvCd{e{aWq.^mJJdX:S:1& # # The path to the file used to trigger an orderly shutdown QuiesceFile = etc/SHUTDOWN diff --git a/plans/dmaap-datarouter/dr-suite/docker-compose/provserver.properties b/plans/dmaap-datarouter/dr-suite/docker-compose/provserver.properties index e5295530..f0edb713 100755 --- a/plans/dmaap-datarouter/dr-suite/docker-compose/provserver.properties +++ b/plans/dmaap-datarouter/dr-suite/docker-compose/provserver.properties @@ -28,11 +28,11 @@ org.onap.dmaap.datarouter.provserver.https.port = 8443 org.onap.dmaap.datarouter.provserver.https.relaxation = true org.onap.dmaap.datarouter.provserver.keystore.type = jks -org.onap.dmaap.datarouter.provserver.keymanager.password = AT{];bvaDiytVD&oWhMZj0N5 +org.onap.dmaap.datarouter.provserver.keymanager.password = FZNkU,B%NJzcT1v7;^v]M#ZX org.onap.dmaap.datarouter.provserver.keystore.path = /opt/app/datartr/aaf_certs/org.onap.dmaap-dr.jks -org.onap.dmaap.datarouter.provserver.keystore.password = AT{];bvaDiytVD&oWhMZj0N5 +org.onap.dmaap.datarouter.provserver.keystore.password = FZNkU,B%NJzcT1v7;^v]M#ZX org.onap.dmaap.datarouter.provserver.truststore.path = /opt/app/datartr/aaf_certs/org.onap.dmaap-dr.trust.jks -org.onap.dmaap.datarouter.provserver.truststore.password = ljlS@Y}0]{UO(TnwvEWkgJ%] +org.onap.dmaap.datarouter.provserver.truststore.password = +mzf@J.D^;3!![*Xr.z$c#?b org.onap.dmaap.datarouter.provserver.accesslog.dir = /opt/app/datartr/logs org.onap.dmaap.datarouter.provserver.spooldir = /opt/app/datartr/spool diff --git a/plans/dmaap/mrpubsub/setup.sh b/plans/dmaap/mrpubsub/setup.sh index 5a670d28..c2c9b133 100755 --- a/plans/dmaap/mrpubsub/setup.sh +++ b/plans/dmaap/mrpubsub/setup.sh @@ -21,57 +21,9 @@ # =================================================================== # ECOMP is a trademark and service mark of AT&T Intellectual Property. # -# Place the scripts in run order: -source ${SCRIPTS}/common_functions.sh - -# Clone DMaaP Message Router repo -mkdir -p $WORKSPACE/archives/dmaapmr -cd $WORKSPACE/archives/dmaapmr -#unset http_proxy https_proxy -git clone --depth 1 http://gerrit.onap.org/r/dmaap/messagerouter/messageservice -b master -git pull -cd $WORKSPACE/archives/dmaapmr/messageservice/src/main/resources/docker-compose -cp $WORKSPACE/archives/dmaapmr/messageservice/bundleconfig-local/etc/appprops/MsgRtrApi.properties /var/tmp/ - - - -# Update kafkfa and zookeeper properties in MsgRtrApi.propeties which will be copied to DMaaP Container -sed -i -e 's/<zookeeper_host>/zookeeper/' /var/tmp/MsgRtrApi.properties -sed -i -e 's/<kafka_host>:<kafka_port>/kafka:9092/' /var/tmp/MsgRtrApi.properties - -# start DMaaP MR containers with docker compose and configuration from docker-compose.yml -docker-compose build -docker login -u docker -p docker nexus3.onap.org:10001 -docker-compose up -d - -# Wait for initialization of Docker containers -for i in {1..50}; do - if [ $(docker inspect --format '{{ .State.Running }}' dockercompose_dmaap_1) ] && \ - [ $(docker inspect --format '{{ .State.Running }}' dockercompose_zookeeper_1) ] && \ - [ $(docker inspect --format '{{ .State.Running }}' dockercompose_dmaap_1) ] - then - echo "DMaaP Service Running" - break - else - echo sleep $i - sleep $i - fi -done - -DMAAP_MR_IP=$(docker inspect --format='{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' dockercompose_dmaap_1) -KAFKA_IP=$(docker inspect --format='{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' dockercompose_kafka_1) -ZOOKEEPER_IP=$(docker inspect --format='{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' dockercompose_zookeeper_1) - -echo DMAAP_MR_IP=${DMAAP_MR_IP} -echo KAFKA_IP=${KAFKA_IP} -echo ZOOKEEPER_IP=${ZOOKEEPER_IP} - -# Wait for initialization of docker services -for i in {1..50}; do - curl -sS -m 1 ${DMAAP_MR_IP}:3904/events/TestTopic && break - echo sleep $i - sleep $i -done +source ${WORKSPACE}/scripts/dmaap-message-router/dmaap-mr-launch.sh +dmaap_mr_launch +DMAAP_MR_IP=${IP} #Pass any variables required by Robot test suites in ROBOT_VARIABLES ROBOT_VARIABLES="-v DMAAP_MR_IP:${DMAAP_MR_IP}" diff --git a/plans/dmaap/mrpubsub/teardown.sh b/plans/dmaap/mrpubsub/teardown.sh index 1b430324..4758163d 100755 --- a/plans/dmaap/mrpubsub/teardown.sh +++ b/plans/dmaap/mrpubsub/teardown.sh @@ -17,6 +17,5 @@ # Modifications copyright (c) 2017 AT&T Intellectual Property # -kill-instance.sh dockercompose_dmaap_1 -kill-instance.sh dockercompose_kafka_1 -kill-instance.sh dockercompose_zookeeper_1 +source ${WORKSPACE}/scripts/dmaap-message-router/dmaap-mr-teardown.sh +dmaap_mr_teardown diff --git a/plans/optf-cmso/cmso/setup.sh b/plans/optf-cmso/cmso/setup.sh index c30d8302..c57af135 100644 --- a/plans/optf-cmso/cmso/setup.sh +++ b/plans/optf-cmso/cmso/setup.sh @@ -22,8 +22,3 @@ # Place the scripts in run order: source ${WORKSPACE}/scripts/optf-cmso/cmso/clone_cmso_and_change_dockercompose.sh - -source ${WORKSPACE}/scripts/optf-cmso/cmso/start_cmso_containers.sh - -# Pass any variables required by Robot test suites in ROBOT_VARIABLES -#ROBOT_VARIABLES="-v TEST:${TEST}" diff --git a/plans/usecases/5G-bulkpm/assets/datafile_endpoints.json b/plans/usecases/5G-bulkpm/assets/datafile_endpoints.json index 2e2b67a8..d07e3d82 100644 --- a/plans/usecases/5G-bulkpm/assets/datafile_endpoints.json +++ b/plans/usecases/5G-bulkpm/assets/datafile_endpoints.json @@ -26,10 +26,10 @@ }, "ftp": { "ftpesConfiguration": { - "keyCert": "/config/ftpKey.jks", + "keyCert": "/config/dfc.jks", "keyPassword": "secret", - "trustedCA": "/config/ftpKey.jks", - "trustedCAPassword": "secret" + "trustedCa": "/config/ftp.jks", + "trustedCaPassword": "secret" } }, "security": { diff --git a/plans/usecases/5G-bulkpm/composefile/docker-compose-e2e.yml b/plans/usecases/5G-bulkpm/composefile/docker-compose-e2e.yml index 4f6c4da6..7880656b 100644 --- a/plans/usecases/5G-bulkpm/composefile/docker-compose-e2e.yml +++ b/plans/usecases/5G-bulkpm/composefile/docker-compose-e2e.yml @@ -1,7 +1,7 @@ version: '2.1' services: datarouter-prov: - image: nexus3.onap.org:10001/onap/dmaap/datarouter-prov:2.0.2-SNAPSHOT-latest + image: nexus3.onap.org:10001/onap/dmaap/datarouter-prov:2.1.0-SNAPSHOT-latest container_name: datarouter-prov hostname: dmaap-dr-prov ports: @@ -22,9 +22,10 @@ services: retries: 5 extra_hosts: - "dmaap-dr-node:1.1.1.1" + - "dcae-pm-mapper:3.3.3.3" datarouter-node: - image: nexus3.onap.org:10001/onap/dmaap/datarouter-node:2.0.2-SNAPSHOT-latest + image: nexus3.onap.org:10001/onap/dmaap/datarouter-node:2.1.0-SNAPSHOT-latest container_name: datarouter-node hostname: dmaap-dr-node ports: @@ -37,9 +38,10 @@ services: condition: service_healthy extra_hosts: - "dmaap-dr-prov:2.2.2.2" + - "dcae-pm-mapper:3.3.3.3" datarouter-subscriber: - image: nexus3.onap.org:10001/onap/dmaap/datarouter-subscriber:2.0.2-SNAPSHOT-latest + image: nexus3.onap.org:10001/onap/dmaap/datarouter-subscriber:2.1.0-SNAPSHOT-latest container_name: fileconsumer-node hostname: subscriber.com ports: diff --git a/plans/usecases/5G-bulkpm/setup.sh b/plans/usecases/5G-bulkpm/setup.sh index 5d99b1c1..1bba4f30 100644 --- a/plans/usecases/5G-bulkpm/setup.sh +++ b/plans/usecases/5G-bulkpm/setup.sh @@ -70,8 +70,6 @@ cd $WORKSPACE/archives/dmaapdr/datarouter/datarouter-docker-compose/src/main/res mkdir docker-compose cd $WORKSPACE/archives/dmaapdr/datarouter/datarouter-docker-compose/src/main/resources/docker-compose cp $WORKSPACE/plans/usecases/5G-bulkpm/composefile/docker-compose-e2e.yml $WORKSPACE/archives/dmaapdr/datarouter/datarouter-docker-compose/src/main/resources/docker-compose/docker-compose.yml -cp $WORKSPACE/plans/dcaegen2-pmmapper/pmmapper/assets/docker-databus-controller.conf /tmp/ -sed -i 's/DMAAPMR/'$DMAAP_MR_IP'/g' /tmp/docker-databus-controller.conf docker login -u docker -p docker nexus3.onap.org:10001 docker-compose up -d @@ -170,9 +168,6 @@ for i in {1..10}; do done sleep 10 -#Pass any variables required by Robot test suites in ROBOT_VARIABLES -ROBOT_VARIABLES="-v DR_PROV_IP:${DR_PROV_IP} -v DR_NODE_IP:${DR_NODE_IP} -v DMAAP_MR_IP:${DMAAP_MR_IP} -v VESC_IP:${VESC_IP} -v VESC_PORT:${VESC_PORT} -v DR_SUBSCIBER_IP:${DR_SUBSCIBER_IP} -v SFTP_IP:${SFTP_IP}" - pip install jsonschema uuid simplejson # Wait container ready sleep 2 @@ -182,6 +177,7 @@ cp $WORKSPACE/tests/usecases/5G-bulkpm/assets/json_events/FileExistNotification. sed -i 's/sftpserver/'${SFTP_IP}'/g' $WORKSPACE/tests/usecases/5G-bulkpm/assets/json_events/FileExistNotificationUpdated.json sed -i 's/sftpport/'${SFTP_PORT}'/g' $WORKSPACE/tests/usecases/5G-bulkpm/assets/json_events/FileExistNotificationUpdated.json docker cp $WORKSPACE/plans/usecases/5G-bulkpm/assets/xNF.pm.xml.gz sftp:/home/admin/ +docker cp $WORKSPACE/tests/dcaegen2-pmmapper/pmmapper/assets/A20181002.0000-1000-0015-1000_5G.xml.gz sftp:/home/admin/ # Data Router Configuration: # Create default feed and create file consumer subscriber on data router @@ -192,6 +188,56 @@ curl -v -X POST -H "Content-Type:application/vnd.dmaap-dr.subscription" -H "X-DM sleep 10 curl -k https://$DR_PROV_IP:8443/internal/prov +# Consul Configuration for PM Mapper +cp $WORKSPACE/plans/dcaegen2-pmmapper/pmmapper/assets/cbs.json /tmp/cbs.json +sed -i 's/ipaddress/'${CBS_IP}'/g' /tmp/cbs.json +curl --request PUT --data @/tmp/cbs.json http://$CONSUL_IP:8500/v1/agent/service/register +curl 'http://'$CONSUL_IP':8500/v1/kv/pmmapper?dc=dc1' -X PUT -H 'Accept: application/json' -H 'Content-Type: application/json' -H 'X-Requested-With: XMLHttpRequest' --data @$WORKSPACE/plans/dcaegen2-pmmapper/pmmapper/assets/config.json + +# PM Mapper startup and configuration +mkdir /tmp/docker-compose +cd /tmp/docker-compose +cp $WORKSPACE/plans/dcaegen2-pmmapper/pmmapper/composefile/docker-compose-pmmapper.yml /tmp/docker-compose/docker-compose.yml +CBS_IP=$(docker inspect '--format={{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' cbs) +sed -i 's/CBSIP/'$CBS_IP'/g' docker-compose.yml +sed -i 's/1.1.1.1/'$DR_NODE_IP'/g' docker-compose.yml +sed -i 's/4.4.4.4/'$DMAAP_MR_IP'/g' docker-compose.yml +docker-compose up -d + +cd $WORKSPACE/archives/dmaapdr/datarouter/datarouter-docker-compose/src/main/resources/docker-compose +PMMAPPER_IP=$(docker inspect '--format={{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' pmmapper) +docker kill datarouter-node +docker kill datarouter-prov +sed -i 's/1.1.1.1/'$DR_NODE_IP'/g' docker-compose.yml +sed -i 's/2.2.2.2/'$DR_PROV_IP'/g' docker-compose.yml +sed -i 's/3.3.3.3/'$PMMAPPER_IP'/g' docker-compose.yml +docker-compose up -d + +# Setting up PM Mapper certs. +docker cp $WORKSPACE/plans/dcaegen2-pmmapper/pmmapper/assets/cert.jks.b64 pmmapper:opt/app/pm-mapper/etc/ +docker cp $WORKSPACE/plans/dcaegen2-pmmapper/pmmapper/assets/jks.pass pmmapper:opt/app/pm-mapper/etc/ +docker cp $WORKSPACE/plans/dcaegen2-pmmapper/pmmapper/assets/trust.jks.b64 pmmapper:opt/app/pm-mapper/etc/ +docker cp $WORKSPACE/plans/dcaegen2-pmmapper/pmmapper/assets/trust.pass pmmapper:opt/app/pm-mapper/etc/ +docker restart pmmapper +sleep 5 + +# Create PM Mapper feed and create PM Mapper subscriber on data router +#curl -v -X POST -H "Content-Type:application/vnd.dmaap-dr.feed" -H "X-DMAAP-DR-ON-BEHALF-OF:pmmapper" --data-ascii @$WORKSPACE/plans/dcaegen2-pmmapper/pmmapper/assets/createFeed.json --post301 --location-trusted -k https://${DR_PROV_IP}:8443 +curl -v -X POST -H "Content-Type:application/vnd.dmaap-dr.subscription" -H "X-DMAAP-DR-ON-BEHALF-OF:pmmapper" --data-ascii @$WORKSPACE/plans/dcaegen2-pmmapper/pmmapper/assets/addSubscriber.json --post301 --location-trusted -k https://${DR_PROV_IP}:8443/subscribe/1 + +# Create PM Mapper tocic in Message Router +curl -v -X POST http://${DMAAP_MR_IP}:3904/topics/create -d @$WORKSPACE/plans/dcaegen2-pmmapper/pmmapper/assets/createTopic.json -H "Content-Type: application/json" +PMMAPPER_IP=$(docker inspect '--format={{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' pmmapper) +docker exec pmmapper /bin/sh -c "cat /var/log/ONAP/dcaegen2/services/pm-mapper/pm-mapper_output.log" > /tmp/pmmapper.log +cat /tmp/pmmapper.log +docker exec -it datarouter-prov sh -c "curl http://dmaap-dr-node:8080/internal/fetchProv" +sleep 10 +curl -k https://$DR_PROV_IP:8443/internal/prov +curl http://${DMAAP_MR_IP}:3904/events/PM_MAPPER/CG1/C1?timeout=1000 + +#Pass any variables required by Robot test suites in ROBOT_VARIABLES +ROBOT_VARIABLES="-v DR_PROV_IP:${DR_PROV_IP} -v DR_NODE_IP:${DR_NODE_IP} -v DMAAP_MR_IP:${DMAAP_MR_IP} -v VESC_IP:${VESC_IP} -v VESC_PORT:${VESC_PORT} -v DR_SUBSCIBER_IP:${DR_SUBSCIBER_IP} -v SFTP_IP:${SFTP_IP}" + else ############################################################ ############################################################ diff --git a/plans/usecases/5G-bulkpm/teardown.sh b/plans/usecases/5G-bulkpm/teardown.sh index 78de7594..782a289c 100644 --- a/plans/usecases/5G-bulkpm/teardown.sh +++ b/plans/usecases/5G-bulkpm/teardown.sh @@ -1,9 +1,15 @@ #!/bin/bash echo "Starting teardown script" docker exec dfc /bin/sh -c "less /var/log/ONAP/application.log" > /tmp/dfc_docker.log +echo "===== DFC LOG ========" cat /tmp/dfc_docker.log sleep 3 -rm /tmp/dfc_docker.log.robot +echo "===== PM MAPPER LOG ========" +cat /tmp/pmmapper_docker.log.robot +sleep 2 +echo "===== MR LOG ========" +cat /tmp/mr.log +sleep 2 kill-instance.sh $DMAAP kill-instance.sh $KAFKA kill-instance.sh $ZOOKEEPER @@ -15,4 +21,5 @@ kill-instance.sh mariadb kill-instance.sh dfc kill-instance.sh sftp kill-instance.sh cbs -kill-instance.sh consul
\ No newline at end of file +kill-instance.sh consul +kill-instance.sh pmmapper
\ No newline at end of file diff --git a/scripts/clamp/clone_clamp_and_change_dockercompose.sh b/scripts/clamp/clone_clamp_and_change_dockercompose.sh index 4e3eb582..5970ab2f 100755 --- a/scripts/clamp/clone_clamp_and_change_dockercompose.sh +++ b/scripts/clamp/clone_clamp_and_change_dockercompose.sh @@ -35,11 +35,11 @@ git clone --depth 1 http://gerrit.onap.org/r/clamp -b $GERRIT_BRANCH cd clamp/extra/docker/clamp/ # Pull the Clamp docker image from nexus instead of local image by default in the docker-compose.yml -sed -i '/image: onap\/clamp/c\ image: nexus3.onap.org:10001\/onap\/clamp' docker-compose.yml +sed -i '/image: onap\/clamp/c\ image: nexus3.onap.org:10001\/onap\/clamp:4.0-STAGING-latest' docker-compose.yml # Change config to take third_party_proxy:8085 for SDC, Policy and DCAE simulator sed -i 's/}/,\"clamp.config.policy.pdpUrl1\":\"http:\/\/third_party_proxy:8085\/pdp\/ , testpdp, alpha123\",\"clamp.config.policy.pdpUrl2\":\"http:\/\/third_party_proxy:8085\/pdp\/ , testpdp, alpha123\",\"clamp.config.policy.papUrl\":\"http:\/\/third_party_proxy:8085\/pap\/ , testpap, alpha123\",\"clamp.config.policy.clientId\":\"python\",\"clamp.config.policy.clientKey\":\"dGVzdA==\",\"clamp.config.sdc.catalog.url\":\"http:\/\/third_party_proxy:8085\/sdc\/v1\/catalog\/\",\"clamp.config.sdc.hostUrl\":\"http:\/\/third_party_proxy:8085\",\"clamp.config.sdc.serviceUrl\":\"http:\/\/third_party_proxy:8085\/sdc\/v1\/catalog\/services\",\"clamp.config.dcae.inventory.url\":\"http:\/\/third_party_proxy:8085\",\"clamp.config.dcae.dispatcher.url\":\"http:\/\/third_party_proxy:8085\",\"spring.profiles.active\":\"clamp-default,clamp-default-user,clamp-sdc-controller\",\"server.ssl.client-auth\":\"want\"}/g' clamp.env # Add the sql to create template so it is played by docker-compose later -cp ../../../src/test/resources/sql/four_templates_only.sql ../../sql/bulkload/ -echo 'mysql -uroot -p$MYSQL_ROOT_PASSWORD -f < four_templates_only.sql' >> ../../sql/load-sql-files-tests-automation.sh +cp ../../../src/test/resources/sql/loop-examples.sql ../../sql/bulkload/ +echo 'mysql -uroot -p$MYSQL_ROOT_PASSWORD -f < loop-examples.sql' >> ../../sql/load-sql-files-tests-automation.sh diff --git a/scripts/clamp/start_clamp_containers.sh b/scripts/clamp/start_clamp_containers.sh index 8da83405..443c9fa0 100755 --- a/scripts/clamp/start_clamp_containers.sh +++ b/scripts/clamp/start_clamp_containers.sh @@ -49,5 +49,5 @@ if [ "$TIME" -ge "$TIME_OUT" ]; then exit 1; fi -sleep 30 +sleep 20 diff --git a/scripts/optf-cmso/cmso/clone_cmso_and_change_dockercompose.sh b/scripts/optf-cmso/cmso/clone_cmso_and_change_dockercompose.sh index 03fca804..3b2de744 100644 --- a/scripts/optf-cmso/cmso/clone_cmso_and_change_dockercompose.sh +++ b/scripts/optf-cmso/cmso/clone_cmso_and_change_dockercompose.sh @@ -25,14 +25,34 @@ echo "This is ${WORKSPACE}/scripts/cmso/clone_cmso_and_change_dockercompose.sh" # Clone cmso repo to get extra folder that has all needed to run docker with docker-compose to start DB and cmso-service and cmso-dbinit -mkdir -p $WORKSPACE/archives/cmso-clone -cd $WORKSPACE/archives/cmso-clone +mkdir -p /tmp/$WORKSPACE/archives/cmso-clone +cd /tmp/$WORKSPACE/archives/cmso-clone git clone --depth 1 https://gerrit.onap.org/r/optf/cmso -b master -cd cmso/cmso-service/extra/docker +cd cmso/cmso-robot/docker/cmso-service -# Pull the cmso docker image from nexus instead of local image by default in the docker-compose.yml -sed -i '/image: onap\/optf-cmso-service/c\ image: nexus3.onap.org:10001\/onap\/optf-cmso-service' docker-compose.yml +sed -i '/image: onap\/optf-cmso-service/c\ image: nexus3.onap.org:10001\/onap\/optf-cmso-service:latest' docker-compose.yml +sed -i '/image: onap\/optf-cmso-dbinit/c\ image: nexus3.onap.org:10001\/onap\/optf-cmso-dbinit:latest' docker-compose.yml +sed -i '/image: onap\/optf-cmso-topology/c\ image: nexus3.onap.org:10001\/onap\/optf-cmso-topology:latest' docker-compose.yml +sed -i '/image: onap\/optf-cmso-ticketmgt/c\ image: nexus3.onap.org:10001\/onap\/optf-cmso-ticketmgt:latest' docker-compose.yml +sed -i '/image: onap\/optf-cmso-optimizer/c\ image: nexus3.onap.org:10001\/onap\/optf-cmso-optimizer:latest' docker-compose.yml +sed -i '/image: onap\/optf-cmso-robot/c\ image: nexus3.onap.org:10001\/onap\/optf-cmso-robot:latest' docker-compose.yml -sed -i '/image: onap\/optf-cmso-dbinit/c\ image: nexus3.onap.org:10001\/onap\/optf-cmso-dbinit' docker-compose.yml +pip uninstall docker-py; pip uninstall docker; pip install docker +#!/bin/bash +docker-compose up >up.txt 2>&1 & + + +### Wait for docker compose to complete +sleep 300 +echo =======================up.txt +cat up.txt +echo ======================= + +### Wait for robot to finish +docker exec cmsoservice_cmso-robot_1 ls +while [ $? -ne 1 ]; do + sleep 120 + docker exec cmsoservice_cmso-robot_1 ls +done diff --git a/scripts/optf-cmso/cmso/kill_and_remove_cmso_containers.sh b/scripts/optf-cmso/cmso/kill_and_remove_cmso_containers.sh index 681099ca..5d8c0597 100644 --- a/scripts/optf-cmso/cmso/kill_and_remove_cmso_containers.sh +++ b/scripts/optf-cmso/cmso/kill_and_remove_cmso_containers.sh @@ -19,13 +19,14 @@ # echo "This is ${WORKSPACE}/scripts/optf-cmso/cmso/kill_and_remove_cmso_containers.sh" +cd /tmp/$WORKSPACE/archives/cmso-clone +cd cmso/cmso-robot/docker/cmso-service +docker-compose down -kill-instance.sh cmso-service -kill-instance.sh cmso-mariadb -kill-instance.sh cmso-db-init +cp -f ./cmso-robot/logs/output.xml $WORKSPACE/archives +cp -f ./cmso-robot/logs/log.html $WORKSPACE/archives +cp -f ./cmso-robot/logs/report.html $WORKSPACE/archives -#delete cmso-clone folder - -rm -rf ${WORKSPACE}archives/cmso-clone +##rm -rf ${WORKSPACE}/archives/cmso-clone diff --git a/scripts/vid/start_vid_containers.sh b/scripts/vid/start_vid_containers.sh index c8804349..c1c09bcd 100644 --- a/scripts/vid/start_vid_containers.sh +++ b/scripts/vid/start_vid_containers.sh @@ -32,7 +32,7 @@ docker-compose up -d --build # WAIT 5 minutes maximum and test every 5 seconds if VID up using HealthCheck API -TIME_OUT=1200 +TIME_OUT=300 INTERVAL=5 TIME=0 diff --git a/tests/clamp/APIs/01__Test_CL_APIs.robot b/tests/clamp/APIs/01__Test_CL_APIs.robot new file mode 100644 index 00000000..1a874323 --- /dev/null +++ b/tests/clamp/APIs/01__Test_CL_APIs.robot @@ -0,0 +1,69 @@ +*** Settings *** +Library Collections +Library RequestsLibrary +Library OperatingSystem +Library json + +*** Variables *** +${login} admin +${passw} password + +*** Keywords *** +Create the sessions + ${auth}= Create List ${login} ${passw} + Create Session clamp https://localhost:8443 auth=${auth} disable_warnings=1 + Set Global Variable ${clamp_session} clamp + +*** Test Cases *** +Get Requests health check ok + Create the sessions + ${resp}= Get Request ${clamp_session} /restservices/clds/v1/healthcheck + Should Be Equal As Strings ${resp.status_code} 200 + +List TCAs + ${resp}= Get Request ${clamp_session} /restservices/clds/v2/loop/getAllNames + Should Contain Match ${resp} *LOOP_iYTIP_v1_0_ResourceInstanceName1_tca* + Should Contain Match ${resp} *tca_2* + Should Contain Match ${resp} *LOOP_iYTIP_v1_0_ResourceInstanceName1_tca_3* + +Open TCA1 + ${resp}= Get Request ${clamp_session} /restservices/clds/v2/loop/LOOP_iYTIP_v1_0_ResourceInstanceName1_tca + Should Contain Match ${resp} *LOOP_iYTIP_v1_0_ResourceInstanceName1_tca* + Should Contain Match ${resp} *GENERATED_POLICY_ID_AT_SUBMIT* + Should Contain Match ${resp} *onap.policy.monitoring.cdap.tca.hi.lo.app* + Should Contain Match ${resp} *TCA Policy Scope* + +Open TCA2 + ${resp}= Get Request ${clamp_session} /restservices/clds/v2/loop/LOOP_iYTIP_v1_0_ResourceInstanceName2_tca_2 + Should Contain Match ${resp} *LOOP_iYTIP_v1_0_ResourceInstanceName2_tca_2* + Should Contain Match ${resp} *GENERATED_POLICY_ID_AT_SUBMIT* + Should Contain Match ${resp} *dmaap.onap-message-router* + Should Contain Match ${resp} *TCA Policy Scope* + +Open TCA3 + ${resp}= Get Request ${clamp_session} /restservices/clds/v2/loop/LOOP_iYTIP_v1_0_ResourceInstanceName1_tca_3 + Should Contain Match ${resp} *LOOP_iYTIP_v1_0_ResourceInstanceName1_tca* + Should Contain Match ${resp} *GENERATED_POLICY_ID_AT_SUBMIT* + Should Contain Match ${resp} *onap.policy.monitoring.cdap.tca.hi.lo.app* + Should Contain Match ${resp} *TCA Policy Scope Version* + +Modify MicroService Policy TCA1 + ${data}= Get Binary File ${CURDIR}${/}data${/}microservicePolicyTca1.json + &{headers}= Create Dictionary Content-Type=application/json + ${resp}= POST Request ${clamp_session} /restservices/clds/v2/loop/updateMicroservicePolicy/LOOP_iYTIP_v1_0_ResourceInstanceName1_tca data=${data} headers=${headers} + Should Be Equal As Strings ${resp.status_code} 200 + +Verify Modification MicroService TCA1 + ${resp}= Get Request ${clamp_session} /restservices/clds/v2/loop/LOOP_iYTIP_v1_0_ResourceInstanceName1_tca + Should Contain Match ${resp} *version1.11* + +Modify Operational Policy TCA1 + ${data}= Get Binary File ${CURDIR}${/}data${/}operationalPolicyTca1.json + &{headers}= Create Dictionary Content-Type=application/json + ${resp}= POST Request ${clamp_session} /restservices/clds/v2/loop/updateOperationalPolicies/LOOP_iYTIP_v1_0_ResourceInstanceName1_tca data=${data} headers=${headers} + Should Be Equal As Strings ${resp.status_code} 200 + +Verify Modification Operational TCA1 + ${resp}= Get Request ${clamp_session} /restservices/clds/v2/loop/LOOP_iYTIP_v1_0_ResourceInstanceName1_tca + Should Contain Match ${resp} *Test_Field* + diff --git a/tests/clamp/APIs/data/createClHolmes1.json b/tests/clamp/APIs/data/createClHolmes1.json deleted file mode 100644 index 696145b8..00000000 --- a/tests/clamp/APIs/data/createClHolmes1.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "name":"ClHolmes1", - "controlNamePrefix":"ClosedLoop-", - "bpmnText":"", - "propText":"{\"global\":[{\"name\":\"service\",\"value\":[\"4cc5b45a-1f63-4194-8100-cd8e14248c92\"]},{\"name\":\"vf\",\"value\":[\"07e266fc-49ab-4cd7-8378-ca4676f1b9ec\"]},{\"name\":\"actionSet\",\"value\":[\"vnfRecipe\"]},{\"name\":\"location\",\"value\":[\"DC1\",\"DC2\"]}],\"Holmes_1gxp0mm\":[{\"name\":\"correlationalLogic\",\"value\":\"correlational logic1\"},{\"name\":\"configPolicyName\",\"value\":\"Config Policy name1\"}],\"Policy_136qatf\":{\"Policy1\":[{\"name\":\"pname\",\"value\":\"Policy1\"},{\"name\":\"pid\",\"value\":\"0\"},{\"name\":\"timeout\",\"value\":\"345\"},{\"policyConfigurations\":[[{\"name\":\"recipe\",\"value\":[\"Restart\"]},{\"name\":\"maxRetries\",\"value\":[\"3\"]},{\"name\":\"retryTimeLimit\",\"value\":[\"180\"]},{\"name\":\"_id\",\"value\":[\"QxHBjiW\"]},{\"name\":\"parentPolicy\",\"value\":[\"\"]},{\"name\":\"targetResourceId\",\"value\":[\"\"]}]]}]}}", - "imageText":"<svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" version=\"1.1\" viewbox=\"\" width=\"100%\" height=\"100%\"><defs><marker viewBox=\"0 0 20 20\" markerWidth=\"10\" markerHeight=\"10\" orient=\"auto\" refX=\"11\" refY=\"10\" id=\"markerSjdype4kmx\"><path d=\"M 1 5 L 11 10 L 1 15 Z\" style=\"stroke-width: 1; stroke-linecap: round; stroke-dasharray: 10000, 1;\" fill=\"#000000\"></path></marker><marker viewBox=\"0 0 20 20\" markerWidth=\"20\" markerHeight=\"20\" orient=\"auto\" refX=\"6\" refY=\"6\" id=\"markerSjdype4kmz\"><circle cx=\"6\" cy=\"6\" r=\"3.5\" style=\"stroke-width: 1; stroke-linecap: round; stroke-dasharray: 10000, 1;\" fill=\"#ffffff\" stroke=\"#000000\"></circle></marker><marker viewBox=\"0 0 20 20\" markerWidth=\"20\" markerHeight=\"20\" orient=\"auto\" refX=\"8.5\" refY=\"5\" id=\"markerSjdype4km11\"><path d=\"m 1 5 l 0 -3 l 7 3 l -7 3 z\" style=\"stroke-width: 1; stroke-linecap: butt; stroke-dasharray: 10000, 1;\" fill=\"#ffffff\" stroke=\"#000000\"></path></marker><marker viewBox=\"0 0 20 20\" markerWidth=\"10\" markerHeight=\"10\" orient=\"auto\" refX=\"11\" refY=\"10\" id=\"markerSjdype4km13\"><path d=\"M 1 5 L 11 10 L 1 15\" style=\"stroke-width: 1; stroke-linecap: round; stroke-dasharray: 10000, 1;\" fill=\"#ffffff\" stroke=\"#000000\"></path></marker><marker viewBox=\"0 0 20 20\" markerWidth=\"10\" markerHeight=\"10\" orient=\"auto\" refX=\"-1\" refY=\"10\" id=\"markerSjdype4km15\"><path d=\"M 0 10 L 8 6 L 16 10 L 8 14 Z\" style=\"stroke-width: 1; stroke-linecap: round; stroke-dasharray: 10000, 1;\" fill=\"#ffffff\" stroke=\"#000000\"></path></marker><marker viewBox=\"0 0 20 20\" markerWidth=\"10\" markerHeight=\"10\" orient=\"auto\" refX=\"-5\" refY=\"10\" id=\"markerSjdype4km17\"><path d=\"M 1 4 L 5 16\" style=\"stroke-width: 1; stroke-linecap: round; stroke-dasharray: 10000, 1;\" fill=\"#000000\" stroke=\"#000000\"></path></marker></defs><g class=\"djs-group\" xmlns=\"http://www.w3.org/2000/svg\"><g class=\"djs-element djs-shape\" data-element-id=\"StartEvent_1\" transform=\"matrix(1,0,0,1,50,162)\" style=\"display: block;\"><rect fill=\"none\" class=\"djs-outline\" x=\"-6\" y=\"-6\" width=\"48\" height=\"48\"></rect><g class=\"djs-visual\"><circle cx=\"18\" cy=\"18\" r=\"18\" style=\"stroke-width: 2;\" stroke=\"#000000\" fill=\"#ffffff\"></circle></g><rect x=\"0\" y=\"0\" width=\"36\" height=\"36\" style=\"stroke-opacity: 0; stroke-width: 15;\" fill=\"none\" stroke=\"#ffffff\" class=\"djs-hit\"></rect></g></g><g class=\"djs-group\" xmlns=\"http://www.w3.org/2000/svg\"><g class=\"djs-element djs-shape\" data-element-id=\"StartEvent_1_label\" transform=\"matrix(1,0,0,1,23,198)\" style=\"display: none;\"><rect fill=\"none\" class=\"djs-outline\" x=\"-6\" y=\"-6\" width=\"102\" height=\"32\"></rect><g class=\"djs-visual\"><text style=\"font-family: Arial,sans-serif; font-size: 11px;\" class=\" djs-label\"><tspan x=\"45\" y=\"0\"></tspan></text></g><rect x=\"0\" y=\"0\" width=\"90\" height=\"20\" style=\"stroke-opacity: 0; stroke-width: 15;\" fill=\"none\" stroke=\"#ffffff\" class=\"djs-hit\"></rect></g></g><g class=\"djs-group\" xmlns=\"http://www.w3.org/2000/svg\"><g class=\"djs-element djs-shape\" data-element-id=\"VesCollector_1arss4p\" transform=\"matrix(1,0,0,1,217,140)\" style=\"display: block;\"><rect fill=\"none\" class=\"djs-outline\" x=\"-6\" y=\"-6\" width=\"132\" height=\"92\"></rect><g class=\"djs-visual\"><rect x=\"0\" y=\"0\" width=\"120\" height=\"80\" rx=\"0\" ry=\"0\" style=\"stroke-width: 2;\" stroke=\"#000000\" fill=\"#ffffff\"></rect><polyline points=\"120,80 120,20 \" style=\"stroke-width: 2;\" fill=\"none\" stroke=\"#000000\"></polyline><polyline points=\"20,0 20,80 \" style=\"stroke-width: 2;\" fill=\"none\" stroke=\"#000000\"></polyline><text style=\"font-family: Arial,sans-serif; font-size: 12px;\"><tspan x=\"5\" y=\"14\">V</tspan></text><text style=\"font-family: Arial,sans-serif; font-size: 12px;\"><tspan x=\"5\" y=\"26\">E</tspan></text><text style=\"font-family: Arial,sans-serif; font-size: 12px;\"><tspan x=\"5\" y=\"38\">S</tspan></text><text style=\"font-family: Arial,sans-serif; font-size: 12px;\" class=\" djs-label\"><tspan x=\"25.5\" y=\"43.5\">VesCollector</tspan></text></g><rect x=\"0\" y=\"0\" width=\"120\" height=\"80\" style=\"stroke-opacity: 0; stroke-width: 15;\" fill=\"none\" stroke=\"#ffffff\" class=\"djs-hit\"></rect></g></g><g class=\"djs-group\" xmlns=\"http://www.w3.org/2000/svg\"><g class=\"djs-element djs-shape\" data-element-id=\"Holmes_1gxp0mm\" transform=\"matrix(1,0,0,1,463,140)\" style=\"display: block;\"><rect fill=\"none\" class=\"djs-outline\" x=\"-6\" y=\"-6\" width=\"132\" height=\"92\"></rect><g class=\"djs-visual\"><rect x=\"0\" y=\"0\" width=\"120\" height=\"80\" rx=\"0\" ry=\"0\" style=\"stroke-width: 2;\" stroke=\"#000000\" fill=\"#ffffff\"></rect><circle cx=\"15\" cy=\"15\" r=\"10\" style=\"stroke-width: 1;\" stroke=\"#000000\" fill=\"#ffffff\"></circle><text style=\"font-family: Arial,sans-serif; font-size: 12px;\"><tspan x=\"11\" y=\"20\">H</tspan></text><text style=\"font-family: Arial,sans-serif; font-size: 12px;\" class=\" djs-label\"><tspan x=\"39\" y=\"43.5\">Holmes</tspan></text></g><rect x=\"0\" y=\"0\" width=\"120\" height=\"80\" style=\"stroke-opacity: 0; stroke-width: 15;\" fill=\"none\" stroke=\"#ffffff\" class=\"djs-hit\"></rect></g></g><g class=\"djs-group\" xmlns=\"http://www.w3.org/2000/svg\"><g class=\"djs-element djs-shape\" data-element-id=\"Policy_136qatf\" transform=\"matrix(1,0,0,1,713,140)\" style=\"display: block;\"><rect fill=\"none\" class=\"djs-outline\" x=\"-6\" y=\"-6\" width=\"132\" height=\"92\"></rect><g class=\"djs-visual\"><rect x=\"0\" y=\"0\" width=\"120\" height=\"80\" rx=\"0\" ry=\"0\" style=\"stroke-width: 2;\" stroke=\"#000000\" fill=\"#ffffff\"></rect><polyline points=\"0,40 60,0 \" style=\"stroke-width: 2;\" fill=\"none\" stroke=\"#000000\"></polyline><text style=\"font-family: Arial,sans-serif; font-size: 12px;\" class=\" djs-label\"><tspan x=\"43.5\" y=\"43.5\">Policy</tspan></text></g><rect x=\"0\" y=\"0\" width=\"120\" height=\"80\" style=\"stroke-opacity: 0; stroke-width: 15;\" fill=\"none\" stroke=\"#ffffff\" class=\"djs-hit\"></rect></g></g><g class=\"djs-group\" xmlns=\"http://www.w3.org/2000/svg\"><g class=\"djs-element djs-shape selected\" data-element-id=\"EndEvent_034z36u\" transform=\"matrix(1,0,0,1,937,162)\" style=\"display: block;\"><rect fill=\"none\" class=\"djs-outline\" x=\"-6\" y=\"-6\" width=\"48\" height=\"48\"></rect><g class=\"djs-visual\"><circle cx=\"18\" cy=\"18\" r=\"18\" style=\"stroke-width: 4;\" stroke=\"#000000\" fill=\"#ffffff\"></circle></g><rect x=\"0\" y=\"0\" width=\"36\" height=\"36\" style=\"stroke-opacity: 0; stroke-width: 15;\" fill=\"none\" stroke=\"#ffffff\" class=\"djs-hit\"></rect><g class=\" djs-resizer djs-resizer-nw\" transform=\"matrix(1,0,0,1,0,0)\"><rect x=\"-7\" y=\"-7\" width=\"5\" height=\"5\" class=\" djs-resizer-visual\"></rect><rect x=\"-7\" y=\"-7\" width=\"20\" height=\"20\" class=\" djs-resizer-hit\"></rect></g><g class=\" djs-resizer djs-resizer-ne\" transform=\"matrix(0,1,-1,0,36,0)\"><rect x=\"-7\" y=\"-7\" width=\"5\" height=\"5\" class=\" djs-resizer-visual\"></rect><rect x=\"-7\" y=\"-7\" width=\"20\" height=\"20\" class=\" djs-resizer-hit\"></rect></g><g class=\" djs-resizer djs-resizer-se\" transform=\"matrix(-1,0,0,-1,36,36)\"><rect x=\"-7\" y=\"-7\" width=\"5\" height=\"5\" class=\" djs-resizer-visual\"></rect><rect x=\"-7\" y=\"-7\" width=\"20\" height=\"20\" class=\" djs-resizer-hit\"></rect></g><g class=\" djs-resizer djs-resizer-sw\" transform=\"matrix(0,-1,1,0,0,36)\"><rect x=\"-7\" y=\"-7\" width=\"5\" height=\"5\" class=\" djs-resizer-visual\"></rect><rect x=\"-7\" y=\"-7\" width=\"20\" height=\"20\" class=\" djs-resizer-hit\"></rect></g></g></g><g class=\"djs-group\" xmlns=\"http://www.w3.org/2000/svg\"><g class=\"djs-element djs-shape\" data-element-id=\"EndEvent_034z36u_label\" transform=\"matrix(1,0,0,1,910,198)\" style=\"display: none;\"><rect fill=\"none\" class=\"djs-outline\" x=\"-6\" y=\"-6\" width=\"102\" height=\"32\"></rect><g class=\"djs-visual\"><text style=\"font-family: Arial,sans-serif; font-size: 11px;\" class=\" djs-label\"><tspan x=\"45\" y=\"0\"></tspan></text></g><rect x=\"0\" y=\"0\" width=\"90\" height=\"20\" style=\"stroke-opacity: 0; stroke-width: 15;\" fill=\"none\" stroke=\"#ffffff\" class=\"djs-hit\"></rect></g></g><g class=\"djs-group\" xmlns=\"http://www.w3.org/2000/svg\"><g class=\"djs-element djs-connection\" data-element-id=\"SequenceFlow_1d9v6ya\" style=\"display: block;\"><rect fill=\"none\" class=\"djs-outline\" x=\"80\" y=\"174\" width=\"143\" height=\"12\"></rect><g class=\"djs-visual\"><path d=\"m 86,180L217,180 \" style=\"stroke-width: 2; stroke-linejoin: round; marker-end: url("#markerSjdype4kmx");\" fill=\"none\" stroke=\"#000000\"></path></g><polyline points=\"86,180 217,180 \" style=\"stroke-opacity: 0; stroke-width: 15;\" fill=\"none\" stroke=\"#ffffff\" class=\"djs-hit\"></polyline></g></g><g class=\"djs-group\" xmlns=\"http://www.w3.org/2000/svg\"><g class=\"djs-element djs-shape\" data-element-id=\"SequenceFlow_1d9v6ya_label\" transform=\"matrix(1,0,0,1,106.5,170)\" style=\"display: none;\"><rect fill=\"none\" class=\"djs-outline\" x=\"-6\" y=\"-6\" width=\"102\" height=\"32\"></rect><g class=\"djs-visual\"><text style=\"font-family: Arial,sans-serif; font-size: 11px;\" class=\" djs-label\"><tspan x=\"45\" y=\"0\"></tspan></text></g><rect x=\"0\" y=\"0\" width=\"90\" height=\"20\" style=\"stroke-opacity: 0; stroke-width: 15;\" fill=\"none\" stroke=\"#ffffff\" class=\"djs-hit\"></rect></g></g><g class=\"djs-group\" xmlns=\"http://www.w3.org/2000/svg\"><g class=\"djs-element djs-connection\" data-element-id=\"SequenceFlow_01q83h9\" style=\"display: block;\"><rect fill=\"none\" class=\"djs-outline\" x=\"331\" y=\"174\" width=\"138\" height=\"12\"></rect><g class=\"djs-visual\"><path d=\"m 337,180L463,180 \" style=\"stroke-width: 2; stroke-linejoin: round; marker-end: url("#markerSjdype4kmx");\" fill=\"none\" stroke=\"#000000\"></path></g><polyline points=\"337,180 463,180 \" style=\"stroke-opacity: 0; stroke-width: 15;\" fill=\"none\" stroke=\"#ffffff\" class=\"djs-hit\"></polyline></g></g><g class=\"djs-group\" xmlns=\"http://www.w3.org/2000/svg\"><g class=\"djs-element djs-shape\" data-element-id=\"SequenceFlow_01q83h9_label\" transform=\"matrix(1,0,0,1,355,170)\" style=\"display: none;\"><rect fill=\"none\" class=\"djs-outline\" x=\"-6\" y=\"-6\" width=\"102\" height=\"32\"></rect><g class=\"djs-visual\"><text style=\"font-family: Arial,sans-serif; font-size: 11px;\" class=\" djs-label\"><tspan x=\"45\" y=\"0\"></tspan></text></g><rect x=\"0\" y=\"0\" width=\"90\" height=\"20\" style=\"stroke-opacity: 0; stroke-width: 15;\" fill=\"none\" stroke=\"#ffffff\" class=\"djs-hit\"></rect></g></g><g class=\"djs-group\" xmlns=\"http://www.w3.org/2000/svg\"><g class=\"djs-element djs-connection\" data-element-id=\"SequenceFlow_1gw4hg3\" style=\"display: block;\"><rect fill=\"none\" class=\"djs-outline\" x=\"577\" y=\"174\" width=\"142\" height=\"12\"></rect><g class=\"djs-visual\"><path d=\"m 583,180L713,180 \" style=\"stroke-width: 2; stroke-linejoin: round; marker-end: url("#markerSjdype4kmx");\" fill=\"none\" stroke=\"#000000\"></path></g><polyline points=\"583,180 713,180 \" style=\"stroke-opacity: 0; stroke-width: 15;\" fill=\"none\" stroke=\"#ffffff\" class=\"djs-hit\"></polyline></g></g><g class=\"djs-group\" xmlns=\"http://www.w3.org/2000/svg\"><g class=\"djs-element djs-shape\" data-element-id=\"SequenceFlow_1gw4hg3_label\" transform=\"matrix(1,0,0,1,603,170)\" style=\"display: none;\"><rect fill=\"none\" class=\"djs-outline\" x=\"-6\" y=\"-6\" width=\"102\" height=\"32\"></rect><g class=\"djs-visual\"><text style=\"font-family: Arial,sans-serif; font-size: 11px;\" class=\" djs-label\"><tspan x=\"45\" y=\"0\"></tspan></text></g><rect x=\"0\" y=\"0\" width=\"90\" height=\"20\" style=\"stroke-opacity: 0; stroke-width: 15;\" fill=\"none\" stroke=\"#ffffff\" class=\"djs-hit\"></rect></g></g><g class=\"djs-group\" xmlns=\"http://www.w3.org/2000/svg\"><g class=\"djs-element djs-connection\" data-element-id=\"SequenceFlow_07go3oi\" style=\"display: block;\"><rect fill=\"none\" class=\"djs-outline\" x=\"827\" y=\"174\" width=\"116\" height=\"12\"></rect><g class=\"djs-visual\"><path d=\"m 833,180L937,180 \" style=\"stroke-width: 2; stroke-linejoin: round; marker-end: url("#markerSjdype4kmx");\" fill=\"none\" stroke=\"#000000\"></path></g><polyline points=\"833,180 937,180 \" style=\"stroke-opacity: 0; stroke-width: 15;\" fill=\"none\" stroke=\"#ffffff\" class=\"djs-hit\"></polyline></g></g><g class=\"djs-group\" xmlns=\"http://www.w3.org/2000/svg\"><g class=\"djs-element djs-shape\" data-element-id=\"SequenceFlow_07go3oi_label\" transform=\"matrix(1,0,0,1,840,170)\" style=\"display: none;\"><rect fill=\"none\" class=\"djs-outline\" x=\"-6\" y=\"-6\" width=\"102\" height=\"32\"></rect><g class=\"djs-visual\"><text style=\"font-family: Arial,sans-serif; font-size: 11px;\" class=\" djs-label\"><tspan x=\"45\" y=\"0\"></tspan></text></g><rect x=\"0\" y=\"0\" width=\"90\" height=\"20\" style=\"stroke-opacity: 0; stroke-width: 15;\" fill=\"none\" stroke=\"#ffffff\" class=\"djs-hit\"></rect></g></g></svg>", - "templateName":"templateHolmes1", - "typeId":null, - "deploymentId":null -}
\ No newline at end of file diff --git a/tests/clamp/APIs/data/createClHolmes2.json b/tests/clamp/APIs/data/createClHolmes2.json deleted file mode 100644 index 69055895..00000000 --- a/tests/clamp/APIs/data/createClHolmes2.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "name":"ClHolmes2", - "controlNamePrefix":"ClosedLoop-", - "bpmnText":"", - "propText":"{\"Holmes_0bsv00m\":[{\"name\":\"correlationalLogic\",\"value\":\"correlation logic2\"},{\"name\":\"configPolicyName\",\"value\":\"Config Policy Name2\"}],\"global\":[{\"name\":\"service\",\"value\":[\"c95b0e7c-c1f0-4287-9928-7964c5377a46\"]},{\"name\":\"vf\",\"value\":[\"48504e0e-f3d3-411d-a52b-eda1b8fec073\"]},{\"name\":\"actionSet\",\"value\":[\"vnfRecipe\"]},{\"name\":\"location\",\"value\":[\"DC2\",\"DC3\"]}],\"Policy_114xo8j\":{\"Policy2\":[{\"name\":\"pname\",\"value\":\"Policy2\"},{\"name\":\"pid\",\"value\":\"0\"},{\"name\":\"timeout\",\"value\":\"345\"},{\"policyConfigurations\":[[{\"name\":\"recipe\",\"value\":[\"migrate\"]},{\"name\":\"maxRetries\",\"value\":[\"3\"]},{\"name\":\"retryTimeLimit\",\"value\":[\"360\"]},{\"name\":\"_id\",\"value\":[\"dHQXiOz\"]},{\"name\":\"parentPolicy\",\"value\":[\"\"]},{\"name\":\"targetResourceId\",\"value\":[\"\"]}]]}]}}", - "imageText":"<svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" version=\"1.1\" viewbox=\"\" width=\"100%\" height=\"100%\"><defs><marker viewBox=\"0 0 20 20\" markerWidth=\"10\" markerHeight=\"10\" orient=\"auto\" refX=\"11\" refY=\"10\" id=\"markerSjdype4kmbu\"><path d=\"M 1 5 L 11 10 L 1 15 Z\" style=\"stroke-width: 1; stroke-linecap: round; stroke-dasharray: 10000, 1;\" fill=\"#000000\"></path></marker><marker viewBox=\"0 0 20 20\" markerWidth=\"20\" markerHeight=\"20\" orient=\"auto\" refX=\"6\" refY=\"6\" id=\"markerSjdype4kmbw\"><circle cx=\"6\" cy=\"6\" r=\"3.5\" style=\"stroke-width: 1; stroke-linecap: round; stroke-dasharray: 10000, 1;\" fill=\"#ffffff\" stroke=\"#000000\"></circle></marker><marker viewBox=\"0 0 20 20\" markerWidth=\"20\" markerHeight=\"20\" orient=\"auto\" refX=\"8.5\" refY=\"5\" id=\"markerSjdype4kmby\"><path d=\"m 1 5 l 0 -3 l 7 3 l -7 3 z\" style=\"stroke-width: 1; stroke-linecap: butt; stroke-dasharray: 10000, 1;\" fill=\"#ffffff\" stroke=\"#000000\"></path></marker><marker viewBox=\"0 0 20 20\" markerWidth=\"10\" markerHeight=\"10\" orient=\"auto\" refX=\"11\" refY=\"10\" id=\"markerSjdype4kmc0\"><path d=\"M 1 5 L 11 10 L 1 15\" style=\"stroke-width: 1; stroke-linecap: round; stroke-dasharray: 10000, 1;\" fill=\"#ffffff\" stroke=\"#000000\"></path></marker><marker viewBox=\"0 0 20 20\" markerWidth=\"10\" markerHeight=\"10\" orient=\"auto\" refX=\"-1\" refY=\"10\" id=\"markerSjdype4kmc2\"><path d=\"M 0 10 L 8 6 L 16 10 L 8 14 Z\" style=\"stroke-width: 1; stroke-linecap: round; stroke-dasharray: 10000, 1;\" fill=\"#ffffff\" stroke=\"#000000\"></path></marker><marker viewBox=\"0 0 20 20\" markerWidth=\"10\" markerHeight=\"10\" orient=\"auto\" refX=\"-5\" refY=\"10\" id=\"markerSjdype4kmc4\"><path d=\"M 1 4 L 5 16\" style=\"stroke-width: 1; stroke-linecap: round; stroke-dasharray: 10000, 1;\" fill=\"#000000\" stroke=\"#000000\"></path></marker></defs><g class=\"djs-group\" xmlns=\"http://www.w3.org/2000/svg\"><g class=\"djs-element djs-shape\" data-element-id=\"StartEvent_1\" transform=\"matrix(1,0,0,1,50,162)\" style=\"display: block;\"><rect fill=\"none\" class=\"djs-outline\" x=\"-6\" y=\"-6\" width=\"48\" height=\"48\"></rect><g class=\"djs-visual\"><circle cx=\"18\" cy=\"18\" r=\"18\" style=\"stroke-width: 2;\" stroke=\"#000000\" fill=\"#ffffff\"></circle></g><rect x=\"0\" y=\"0\" width=\"36\" height=\"36\" style=\"stroke-opacity: 0; stroke-width: 15;\" fill=\"none\" stroke=\"#ffffff\" class=\"djs-hit\"></rect></g></g><g class=\"djs-group\" xmlns=\"http://www.w3.org/2000/svg\"><g class=\"djs-element djs-shape\" data-element-id=\"StartEvent_1_label\" transform=\"matrix(1,0,0,1,23,198)\" style=\"display: none;\"><rect fill=\"none\" class=\"djs-outline\" x=\"-6\" y=\"-6\" width=\"102\" height=\"32\"></rect><g class=\"djs-visual\"><text style=\"font-family: Arial,sans-serif; font-size: 11px;\" class=\" djs-label\"><tspan x=\"45\" y=\"0\"></tspan></text></g><rect x=\"0\" y=\"0\" width=\"90\" height=\"20\" style=\"stroke-opacity: 0; stroke-width: 15;\" fill=\"none\" stroke=\"#ffffff\" class=\"djs-hit\"></rect></g></g><g class=\"djs-group\" xmlns=\"http://www.w3.org/2000/svg\"><g class=\"djs-element djs-shape\" data-element-id=\"Holmes_0bsv00m\" transform=\"matrix(1,0,0,1,438,140)\" style=\"display: block;\"><rect fill=\"none\" class=\"djs-outline\" x=\"-6\" y=\"-6\" width=\"132\" height=\"92\"></rect><g class=\"djs-visual\"><rect x=\"0\" y=\"0\" width=\"120\" height=\"80\" rx=\"0\" ry=\"0\" style=\"stroke-width: 2;\" stroke=\"#000000\" fill=\"#ffffff\"></rect><circle cx=\"15\" cy=\"15\" r=\"10\" style=\"stroke-width: 1;\" stroke=\"#000000\" fill=\"#ffffff\"></circle><text style=\"font-family: Arial,sans-serif; font-size: 12px;\"><tspan x=\"11\" y=\"20\">H</tspan></text><text style=\"font-family: Arial,sans-serif; font-size: 12px;\" class=\" djs-label\"><tspan x=\"39\" y=\"43.5\">Holmes</tspan></text></g><rect x=\"0\" y=\"0\" width=\"120\" height=\"80\" style=\"stroke-opacity: 0; stroke-width: 15;\" fill=\"none\" stroke=\"#ffffff\" class=\"djs-hit\"></rect></g></g><g class=\"djs-group\" xmlns=\"http://www.w3.org/2000/svg\"><g class=\"djs-element djs-shape\" data-element-id=\"VesCollector_1ljyqg8\" transform=\"matrix(1,0,0,1,213,140)\" style=\"display: block;\"><rect fill=\"none\" class=\"djs-outline\" x=\"-6\" y=\"-6\" width=\"132\" height=\"92\"></rect><g class=\"djs-visual\"><rect x=\"0\" y=\"0\" width=\"120\" height=\"80\" rx=\"0\" ry=\"0\" style=\"stroke-width: 2;\" stroke=\"#000000\" fill=\"#ffffff\"></rect><polyline points=\"120,80 120,20 \" style=\"stroke-width: 2;\" fill=\"none\" stroke=\"#000000\"></polyline><polyline points=\"20,0 20,80 \" style=\"stroke-width: 2;\" fill=\"none\" stroke=\"#000000\"></polyline><text style=\"font-family: Arial,sans-serif; font-size: 12px;\"><tspan x=\"5\" y=\"14\">V</tspan></text><text style=\"font-family: Arial,sans-serif; font-size: 12px;\"><tspan x=\"5\" y=\"26\">E</tspan></text><text style=\"font-family: Arial,sans-serif; font-size: 12px;\"><tspan x=\"5\" y=\"38\">S</tspan></text><text style=\"font-family: Arial,sans-serif; font-size: 12px;\" class=\" djs-label\"><tspan x=\"25.5\" y=\"43.5\">VesCollector</tspan></text></g><rect x=\"0\" y=\"0\" width=\"120\" height=\"80\" style=\"stroke-opacity: 0; stroke-width: 15;\" fill=\"none\" stroke=\"#ffffff\" class=\"djs-hit\"></rect></g></g><g class=\"djs-group\" xmlns=\"http://www.w3.org/2000/svg\"><g class=\"djs-element djs-shape\" data-element-id=\"Policy_114xo8j\" transform=\"matrix(1,0,0,1,678,140)\" style=\"display: block;\"><rect fill=\"none\" class=\"djs-outline\" x=\"-6\" y=\"-6\" width=\"132\" height=\"92\"></rect><g class=\"djs-visual\"><rect x=\"0\" y=\"0\" width=\"120\" height=\"80\" rx=\"0\" ry=\"0\" style=\"stroke-width: 2;\" stroke=\"#000000\" fill=\"#ffffff\"></rect><polyline points=\"0,40 60,0 \" style=\"stroke-width: 2;\" fill=\"none\" stroke=\"#000000\"></polyline><text style=\"font-family: Arial,sans-serif; font-size: 12px;\" class=\" djs-label\"><tspan x=\"43.5\" y=\"43.5\">Policy</tspan></text></g><rect x=\"0\" y=\"0\" width=\"120\" height=\"80\" style=\"stroke-opacity: 0; stroke-width: 15;\" fill=\"none\" stroke=\"#ffffff\" class=\"djs-hit\"></rect></g></g><g class=\"djs-group\" xmlns=\"http://www.w3.org/2000/svg\"><g class=\"djs-element djs-shape selected\" data-element-id=\"EndEvent_0b4m6bk\" transform=\"matrix(1,0,0,1,901,162)\" style=\"display: block;\"><rect fill=\"none\" class=\"djs-outline\" x=\"-6\" y=\"-6\" width=\"48\" height=\"48\"></rect><g class=\"djs-visual\"><circle cx=\"18\" cy=\"18\" r=\"18\" style=\"stroke-width: 4;\" stroke=\"#000000\" fill=\"#ffffff\"></circle></g><rect x=\"0\" y=\"0\" width=\"36\" height=\"36\" style=\"stroke-opacity: 0; stroke-width: 15;\" fill=\"none\" stroke=\"#ffffff\" class=\"djs-hit\"></rect><g class=\" djs-resizer djs-resizer-nw\" transform=\"matrix(1,0,0,1,0,0)\"><rect x=\"-7\" y=\"-7\" width=\"5\" height=\"5\" class=\" djs-resizer-visual\"></rect><rect x=\"-7\" y=\"-7\" width=\"20\" height=\"20\" class=\" djs-resizer-hit\"></rect></g><g class=\" djs-resizer djs-resizer-ne\" transform=\"matrix(0,1,-1,0,36,0)\"><rect x=\"-7\" y=\"-7\" width=\"5\" height=\"5\" class=\" djs-resizer-visual\"></rect><rect x=\"-7\" y=\"-7\" width=\"20\" height=\"20\" class=\" djs-resizer-hit\"></rect></g><g class=\" djs-resizer djs-resizer-se\" transform=\"matrix(-1,0,0,-1,36,36)\"><rect x=\"-7\" y=\"-7\" width=\"5\" height=\"5\" class=\" djs-resizer-visual\"></rect><rect x=\"-7\" y=\"-7\" width=\"20\" height=\"20\" class=\" djs-resizer-hit\"></rect></g><g class=\" djs-resizer djs-resizer-sw\" transform=\"matrix(0,-1,1,0,0,36)\"><rect x=\"-7\" y=\"-7\" width=\"5\" height=\"5\" class=\" djs-resizer-visual\"></rect><rect x=\"-7\" y=\"-7\" width=\"20\" height=\"20\" class=\" djs-resizer-hit\"></rect></g></g></g><g class=\"djs-group\" xmlns=\"http://www.w3.org/2000/svg\"><g class=\"djs-element djs-shape\" data-element-id=\"EndEvent_0b4m6bk_label\" transform=\"matrix(1,0,0,1,874,198)\" style=\"display: none;\"><rect fill=\"none\" class=\"djs-outline\" x=\"-6\" y=\"-6\" width=\"102\" height=\"32\"></rect><g class=\"djs-visual\"><text style=\"font-family: Arial,sans-serif; font-size: 11px;\" class=\" djs-label\"><tspan x=\"45\" y=\"0\"></tspan></text></g><rect x=\"0\" y=\"0\" width=\"90\" height=\"20\" style=\"stroke-opacity: 0; stroke-width: 15;\" fill=\"none\" stroke=\"#ffffff\" class=\"djs-hit\"></rect></g></g><g class=\"djs-group\" xmlns=\"http://www.w3.org/2000/svg\"><g class=\"djs-element djs-connection\" data-element-id=\"SequenceFlow_1c9hzec\" style=\"display: block;\"><rect fill=\"none\" class=\"djs-outline\" x=\"80\" y=\"174\" width=\"139\" height=\"12\"></rect><g class=\"djs-visual\"><path d=\"m 86,180L213,180 \" style=\"stroke-width: 2; stroke-linejoin: round; marker-end: url("#markerSjdype4kmbu");\" fill=\"none\" stroke=\"#000000\"></path></g><polyline points=\"86,180 213,180 \" style=\"stroke-opacity: 0; stroke-width: 15;\" fill=\"none\" stroke=\"#ffffff\" class=\"djs-hit\"></polyline></g></g><g class=\"djs-group\" xmlns=\"http://www.w3.org/2000/svg\"><g class=\"djs-element djs-shape\" data-element-id=\"SequenceFlow_1c9hzec_label\" transform=\"matrix(1,0,0,1,104.5,170)\" style=\"display: none;\"><rect fill=\"none\" class=\"djs-outline\" x=\"-6\" y=\"-6\" width=\"102\" height=\"32\"></rect><g class=\"djs-visual\"><text style=\"font-family: Arial,sans-serif; font-size: 11px;\" class=\" djs-label\"><tspan x=\"45\" y=\"0\"></tspan></text></g><rect x=\"0\" y=\"0\" width=\"90\" height=\"20\" style=\"stroke-opacity: 0; stroke-width: 15;\" fill=\"none\" stroke=\"#ffffff\" class=\"djs-hit\"></rect></g></g><g class=\"djs-group\" xmlns=\"http://www.w3.org/2000/svg\"><g class=\"djs-element djs-connection\" data-element-id=\"SequenceFlow_1ig3gix\" style=\"display: block;\"><rect fill=\"none\" class=\"djs-outline\" x=\"327\" y=\"174\" width=\"117\" height=\"12\"></rect><g class=\"djs-visual\"><path d=\"m 333,180L438,180 \" style=\"stroke-width: 2; stroke-linejoin: round; marker-end: url("#markerSjdype4kmbu");\" fill=\"none\" stroke=\"#000000\"></path></g><polyline points=\"333,180 438,180 \" style=\"stroke-opacity: 0; stroke-width: 15;\" fill=\"none\" stroke=\"#ffffff\" class=\"djs-hit\"></polyline></g></g><g class=\"djs-group\" xmlns=\"http://www.w3.org/2000/svg\"><g class=\"djs-element djs-shape\" data-element-id=\"SequenceFlow_1ig3gix_label\" transform=\"matrix(1,0,0,1,340.5,170)\" style=\"display: none;\"><rect fill=\"none\" class=\"djs-outline\" x=\"-6\" y=\"-6\" width=\"102\" height=\"32\"></rect><g class=\"djs-visual\"><text style=\"font-family: Arial,sans-serif; font-size: 11px;\" class=\" djs-label\"><tspan x=\"45\" y=\"0\"></tspan></text></g><rect x=\"0\" y=\"0\" width=\"90\" height=\"20\" style=\"stroke-opacity: 0; stroke-width: 15;\" fill=\"none\" stroke=\"#ffffff\" class=\"djs-hit\"></rect></g></g><g class=\"djs-group\" xmlns=\"http://www.w3.org/2000/svg\"><g class=\"djs-element djs-connection\" data-element-id=\"SequenceFlow_0zwbn2r\" style=\"display: block;\"><rect fill=\"none\" class=\"djs-outline\" x=\"552\" y=\"174\" width=\"132\" height=\"12\"></rect><g class=\"djs-visual\"><path d=\"m 558,180L678,180 \" style=\"stroke-width: 2; stroke-linejoin: round; marker-end: url("#markerSjdype4kmbu");\" fill=\"none\" stroke=\"#000000\"></path></g><polyline points=\"558,180 678,180 \" style=\"stroke-opacity: 0; stroke-width: 15;\" fill=\"none\" stroke=\"#ffffff\" class=\"djs-hit\"></polyline></g></g><g class=\"djs-group\" xmlns=\"http://www.w3.org/2000/svg\"><g class=\"djs-element djs-shape\" data-element-id=\"SequenceFlow_0zwbn2r_label\" transform=\"matrix(1,0,0,1,573,170)\" style=\"display: none;\"><rect fill=\"none\" class=\"djs-outline\" x=\"-6\" y=\"-6\" width=\"102\" height=\"32\"></rect><g class=\"djs-visual\"><text style=\"font-family: Arial,sans-serif; font-size: 11px;\" class=\" djs-label\"><tspan x=\"45\" y=\"0\"></tspan></text></g><rect x=\"0\" y=\"0\" width=\"90\" height=\"20\" style=\"stroke-opacity: 0; stroke-width: 15;\" fill=\"none\" stroke=\"#ffffff\" class=\"djs-hit\"></rect></g></g><g class=\"djs-group\" xmlns=\"http://www.w3.org/2000/svg\"><g class=\"djs-element djs-connection\" data-element-id=\"SequenceFlow_0ox6r95\" style=\"display: block;\"><rect fill=\"none\" class=\"djs-outline\" x=\"792\" y=\"174\" width=\"115\" height=\"12\"></rect><g class=\"djs-visual\"><path d=\"m 798,180L901,180 \" style=\"stroke-width: 2; stroke-linejoin: round; marker-end: url("#markerSjdype4kmbu");\" fill=\"none\" stroke=\"#000000\"></path></g><polyline points=\"798,180 901,180 \" style=\"stroke-opacity: 0; stroke-width: 15;\" fill=\"none\" stroke=\"#ffffff\" class=\"djs-hit\"></polyline></g></g><g class=\"djs-group\" xmlns=\"http://www.w3.org/2000/svg\"><g class=\"djs-element djs-shape\" data-element-id=\"SequenceFlow_0ox6r95_label\" transform=\"matrix(1,0,0,1,804.5,170)\" style=\"display: none;\"><rect fill=\"none\" class=\"djs-outline\" x=\"-6\" y=\"-6\" width=\"102\" height=\"32\"></rect><g class=\"djs-visual\"><text style=\"font-family: Arial,sans-serif; font-size: 11px;\" class=\" djs-label\"><tspan x=\"45\" y=\"0\"></tspan></text></g><rect x=\"0\" y=\"0\" width=\"90\" height=\"20\" style=\"stroke-opacity: 0; stroke-width: 15;\" fill=\"none\" stroke=\"#ffffff\" class=\"djs-hit\"></rect></g></g></svg>", - "templateName":"templateHolmes2", - "typeId":null, - "deploymentId":null -}
\ No newline at end of file diff --git a/tests/clamp/APIs/data/createClTCA1.json b/tests/clamp/APIs/data/createClTCA1.json deleted file mode 100644 index 509288b5..00000000 --- a/tests/clamp/APIs/data/createClTCA1.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "name":"ClTCA1", - "controlNamePrefix":"ClosedLoop-", - "bpmnText":"", - "propText":"{\"global\":[{\"name\":\"service\",\"value\":[\"4cc5b45a-1f63-4194-8100-cd8e14248c92\"]},{\"name\":\"vf\",\"value\":[\"023a3f0d-1161-45ff-b4cf-8918a8ccf3ad\"]},{\"name\":\"actionSet\",\"value\":[\"enbRecipe\"]},{\"name\":\"location\",\"value\":[\"DC1\",\"DC2\"]}],\"TCA_1d13unw\":{\"TCA1\":[{\"name\":\"tname\",\"value\":\"TCA1\"},{\"name\":\"tuuid\",\"value\":\"ce57408b-93ba-td02-1622-165abd6c5ff5\"},{\"name\":\"tcaPol\",\"value\":\"Policy3\"},{\"name\":\"eventName\",\"value\":\"vLoadBalancer\"},{\"name\":\"controlLoopSchemaType\",\"value\":\"VNF\"},{\"name\":\"tcaPolId\",\"value\":\"0\"},{\"serviceConfigurations\":[[\"$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedDiscardedPacketsDelta\",\"GREATER\",\"5\",\"ONSET\"]]}]},\"Policy_12lup3h\":{\"Policy3\":[{\"name\":\"pname\",\"value\":\"Policy3\"},{\"name\":\"pid\",\"value\":\"0\"},{\"name\":\"timeout\",\"value\":\"345\"},{\"policyConfigurations\":[[{\"name\":\"recipe\",\"value\":[\"reset\"]},{\"name\":\"maxRetries\",\"value\":[\"3\"]},{\"name\":\"retryTimeLimit\",\"value\":[\"200\"]},{\"name\":\"_id\",\"value\":[\"lecrG3I\"]},{\"name\":\"parentPolicy\",\"value\":[\"\"]},{\"name\":\"targetResourceId\",\"value\":[\"\"]}]]}]}}", - "imageText":"<svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" version=\"1.1\" viewbox=\"\" width=\"100%\" height=\"100%\"><defs><marker viewBox=\"0 0 20 20\" markerWidth=\"10\" markerHeight=\"10\" orient=\"auto\" refX=\"11\" refY=\"10\" id=\"markerSjdype4kmnw\"><path d=\"M 1 5 L 11 10 L 1 15 Z\" style=\"stroke-width: 1; stroke-linecap: round; stroke-dasharray: 10000, 1;\" fill=\"#000000\"></path></marker><marker viewBox=\"0 0 20 20\" markerWidth=\"20\" markerHeight=\"20\" orient=\"auto\" refX=\"6\" refY=\"6\" id=\"markerSjdype4kmny\"><circle cx=\"6\" cy=\"6\" r=\"3.5\" style=\"stroke-width: 1; stroke-linecap: round; stroke-dasharray: 10000, 1;\" fill=\"#ffffff\" stroke=\"#000000\"></circle></marker><marker viewBox=\"0 0 20 20\" markerWidth=\"20\" markerHeight=\"20\" orient=\"auto\" refX=\"8.5\" refY=\"5\" id=\"markerSjdype4kmo0\"><path d=\"m 1 5 l 0 -3 l 7 3 l -7 3 z\" style=\"stroke-width: 1; stroke-linecap: butt; stroke-dasharray: 10000, 1;\" fill=\"#ffffff\" stroke=\"#000000\"></path></marker><marker viewBox=\"0 0 20 20\" markerWidth=\"10\" markerHeight=\"10\" orient=\"auto\" refX=\"11\" refY=\"10\" id=\"markerSjdype4kmo2\"><path d=\"M 1 5 L 11 10 L 1 15\" style=\"stroke-width: 1; stroke-linecap: round; stroke-dasharray: 10000, 1;\" fill=\"#ffffff\" stroke=\"#000000\"></path></marker><marker viewBox=\"0 0 20 20\" markerWidth=\"10\" markerHeight=\"10\" orient=\"auto\" refX=\"-1\" refY=\"10\" id=\"markerSjdype4kmo4\"><path d=\"M 0 10 L 8 6 L 16 10 L 8 14 Z\" style=\"stroke-width: 1; stroke-linecap: round; stroke-dasharray: 10000, 1;\" fill=\"#ffffff\" stroke=\"#000000\"></path></marker><marker viewBox=\"0 0 20 20\" markerWidth=\"10\" markerHeight=\"10\" orient=\"auto\" refX=\"-5\" refY=\"10\" id=\"markerSjdype4kmo6\"><path d=\"M 1 4 L 5 16\" style=\"stroke-width: 1; stroke-linecap: round; stroke-dasharray: 10000, 1;\" fill=\"#000000\" stroke=\"#000000\"></path></marker></defs><g class=\"djs-group\" xmlns=\"http://www.w3.org/2000/svg\"><g class=\"djs-element djs-shape\" data-element-id=\"StartEvent_1\" transform=\"matrix(1,0,0,1,50,162)\" style=\"display: block;\"><rect fill=\"none\" class=\"djs-outline\" x=\"-6\" y=\"-6\" width=\"48\" height=\"48\"></rect><g class=\"djs-visual\"><circle cx=\"18\" cy=\"18\" r=\"18\" style=\"stroke-width: 2;\" stroke=\"#000000\" fill=\"#ffffff\"></circle></g><rect x=\"0\" y=\"0\" width=\"36\" height=\"36\" style=\"stroke-opacity: 0; stroke-width: 15;\" fill=\"none\" stroke=\"#ffffff\" class=\"djs-hit\"></rect></g></g><g class=\"djs-group\" xmlns=\"http://www.w3.org/2000/svg\"><g class=\"djs-element djs-shape\" data-element-id=\"StartEvent_1_label\" transform=\"matrix(1,0,0,1,23,198)\" style=\"display: none;\"><rect fill=\"none\" class=\"djs-outline\" x=\"-6\" y=\"-6\" width=\"102\" height=\"32\"></rect><g class=\"djs-visual\"><text style=\"font-family: Arial,sans-serif; font-size: 11px;\" class=\" djs-label\"><tspan x=\"45\" y=\"0\"></tspan></text></g><rect x=\"0\" y=\"0\" width=\"90\" height=\"20\" style=\"stroke-opacity: 0; stroke-width: 15;\" fill=\"none\" stroke=\"#ffffff\" class=\"djs-hit\"></rect></g></g><g class=\"djs-group\" xmlns=\"http://www.w3.org/2000/svg\"><g class=\"djs-element djs-shape\" data-element-id=\"VesCollector_1g9cmz0\" transform=\"matrix(1,0,0,1,207,140)\" style=\"display: block;\"><rect fill=\"none\" class=\"djs-outline\" x=\"-6\" y=\"-6\" width=\"132\" height=\"92\"></rect><g class=\"djs-visual\"><rect x=\"0\" y=\"0\" width=\"120\" height=\"80\" rx=\"0\" ry=\"0\" style=\"stroke-width: 2;\" stroke=\"#000000\" fill=\"#ffffff\"></rect><polyline points=\"120,80 120,20 \" style=\"stroke-width: 2;\" fill=\"none\" stroke=\"#000000\"></polyline><polyline points=\"20,0 20,80 \" style=\"stroke-width: 2;\" fill=\"none\" stroke=\"#000000\"></polyline><text style=\"font-family: Arial,sans-serif; font-size: 12px;\"><tspan x=\"5\" y=\"14\">V</tspan></text><text style=\"font-family: Arial,sans-serif; font-size: 12px;\"><tspan x=\"5\" y=\"26\">E</tspan></text><text style=\"font-family: Arial,sans-serif; font-size: 12px;\"><tspan x=\"5\" y=\"38\">S</tspan></text><text style=\"font-family: Arial,sans-serif; font-size: 12px;\" class=\" djs-label\"><tspan x=\"25.5\" y=\"43.5\">VesCollector</tspan></text></g><rect x=\"0\" y=\"0\" width=\"120\" height=\"80\" style=\"stroke-opacity: 0; stroke-width: 15;\" fill=\"none\" stroke=\"#ffffff\" class=\"djs-hit\"></rect></g></g><g class=\"djs-group\" xmlns=\"http://www.w3.org/2000/svg\"><g class=\"djs-element djs-shape\" data-element-id=\"TCA_1d13unw\" transform=\"matrix(1,0,0,1,453,140)\" style=\"display: block;\"><rect fill=\"none\" class=\"djs-outline\" x=\"-6\" y=\"-6\" width=\"132\" height=\"92\"></rect><g class=\"djs-visual\"><rect x=\"0\" y=\"0\" width=\"120\" height=\"80\" rx=\"0\" ry=\"0\" style=\"stroke-width: 2;\" stroke=\"#000000\" fill=\"#ffffff\"></rect><polyline points=\"0,60 120,60 \" style=\"stroke-width: 2;\" fill=\"none\" stroke=\"#000000\"></polyline><text style=\"font-family: Arial,sans-serif; font-size: 12px;\" class=\" djs-label\"><tspan x=\"48\" y=\"43.5\">TCA</tspan></text></g><rect x=\"0\" y=\"0\" width=\"120\" height=\"80\" style=\"stroke-opacity: 0; stroke-width: 15;\" fill=\"none\" stroke=\"#ffffff\" class=\"djs-hit\"></rect></g></g><g class=\"djs-group\" xmlns=\"http://www.w3.org/2000/svg\"><g class=\"djs-element djs-shape\" data-element-id=\"Policy_12lup3h\" transform=\"matrix(1,0,0,1,687,140)\" style=\"display: block;\"><rect fill=\"none\" class=\"djs-outline\" x=\"-6\" y=\"-6\" width=\"132\" height=\"92\"></rect><g class=\"djs-visual\"><rect x=\"0\" y=\"0\" width=\"120\" height=\"80\" rx=\"0\" ry=\"0\" style=\"stroke-width: 2;\" stroke=\"#000000\" fill=\"#ffffff\"></rect><polyline points=\"0,40 60,0 \" style=\"stroke-width: 2;\" fill=\"none\" stroke=\"#000000\"></polyline><text style=\"font-family: Arial,sans-serif; font-size: 12px;\" class=\" djs-label\"><tspan x=\"43.5\" y=\"43.5\">Policy</tspan></text></g><rect x=\"0\" y=\"0\" width=\"120\" height=\"80\" style=\"stroke-opacity: 0; stroke-width: 15;\" fill=\"none\" stroke=\"#ffffff\" class=\"djs-hit\"></rect></g></g><g class=\"djs-group\" xmlns=\"http://www.w3.org/2000/svg\"><g class=\"djs-element djs-shape selected\" data-element-id=\"EndEvent_16kg9fx\" transform=\"matrix(1,0,0,1,925,162)\" style=\"display: block;\"><rect fill=\"none\" class=\"djs-outline\" x=\"-6\" y=\"-6\" width=\"48\" height=\"48\"></rect><g class=\"djs-visual\"><circle cx=\"18\" cy=\"18\" r=\"18\" style=\"stroke-width: 4;\" stroke=\"#000000\" fill=\"#ffffff\"></circle></g><rect x=\"0\" y=\"0\" width=\"36\" height=\"36\" style=\"stroke-opacity: 0; stroke-width: 15;\" fill=\"none\" stroke=\"#ffffff\" class=\"djs-hit\"></rect><g class=\" djs-resizer djs-resizer-nw\" transform=\"matrix(1,0,0,1,0,0)\"><rect x=\"-7\" y=\"-7\" width=\"5\" height=\"5\" class=\" djs-resizer-visual\"></rect><rect x=\"-7\" y=\"-7\" width=\"20\" height=\"20\" class=\" djs-resizer-hit\"></rect></g><g class=\" djs-resizer djs-resizer-ne\" transform=\"matrix(0,1,-1,0,36,0)\"><rect x=\"-7\" y=\"-7\" width=\"5\" height=\"5\" class=\" djs-resizer-visual\"></rect><rect x=\"-7\" y=\"-7\" width=\"20\" height=\"20\" class=\" djs-resizer-hit\"></rect></g><g class=\" djs-resizer djs-resizer-se\" transform=\"matrix(-1,0,0,-1,36,36)\"><rect x=\"-7\" y=\"-7\" width=\"5\" height=\"5\" class=\" djs-resizer-visual\"></rect><rect x=\"-7\" y=\"-7\" width=\"20\" height=\"20\" class=\" djs-resizer-hit\"></rect></g><g class=\" djs-resizer djs-resizer-sw\" transform=\"matrix(0,-1,1,0,0,36)\"><rect x=\"-7\" y=\"-7\" width=\"5\" height=\"5\" class=\" djs-resizer-visual\"></rect><rect x=\"-7\" y=\"-7\" width=\"20\" height=\"20\" class=\" djs-resizer-hit\"></rect></g></g></g><g class=\"djs-group\" xmlns=\"http://www.w3.org/2000/svg\"><g class=\"djs-element djs-shape\" data-element-id=\"EndEvent_16kg9fx_label\" transform=\"matrix(1,0,0,1,898,198)\" style=\"display: none;\"><rect fill=\"none\" class=\"djs-outline\" x=\"-6\" y=\"-6\" width=\"102\" height=\"32\"></rect><g class=\"djs-visual\"><text style=\"font-family: Arial,sans-serif; font-size: 11px;\" class=\" djs-label\"><tspan x=\"45\" y=\"0\"></tspan></text></g><rect x=\"0\" y=\"0\" width=\"90\" height=\"20\" style=\"stroke-opacity: 0; stroke-width: 15;\" fill=\"none\" stroke=\"#ffffff\" class=\"djs-hit\"></rect></g></g><g class=\"djs-group\" xmlns=\"http://www.w3.org/2000/svg\"><g class=\"djs-element djs-connection\" data-element-id=\"SequenceFlow_1ahk7jg\" style=\"display: block;\"><rect fill=\"none\" class=\"djs-outline\" x=\"80\" y=\"174\" width=\"133\" height=\"12\"></rect><g class=\"djs-visual\"><path d=\"m 86,180L207,180 \" style=\"stroke-width: 2; stroke-linejoin: round; marker-end: url("#markerSjdype4kmnw");\" fill=\"none\" stroke=\"#000000\"></path></g><polyline points=\"86,180 207,180 \" style=\"stroke-opacity: 0; stroke-width: 15;\" fill=\"none\" stroke=\"#ffffff\" class=\"djs-hit\"></polyline></g></g><g class=\"djs-group\" xmlns=\"http://www.w3.org/2000/svg\"><g class=\"djs-element djs-shape\" data-element-id=\"SequenceFlow_1ahk7jg_label\" transform=\"matrix(1,0,0,1,101.5,170)\" style=\"display: none;\"><rect fill=\"none\" class=\"djs-outline\" x=\"-6\" y=\"-6\" width=\"102\" height=\"32\"></rect><g class=\"djs-visual\"><text style=\"font-family: Arial,sans-serif; font-size: 11px;\" class=\" djs-label\"><tspan x=\"45\" y=\"0\"></tspan></text></g><rect x=\"0\" y=\"0\" width=\"90\" height=\"20\" style=\"stroke-opacity: 0; stroke-width: 15;\" fill=\"none\" stroke=\"#ffffff\" class=\"djs-hit\"></rect></g></g><g class=\"djs-group\" xmlns=\"http://www.w3.org/2000/svg\"><g class=\"djs-element djs-connection\" data-element-id=\"SequenceFlow_18ahat1\" style=\"display: block;\"><rect fill=\"none\" class=\"djs-outline\" x=\"321\" y=\"174\" width=\"138\" height=\"12\"></rect><g class=\"djs-visual\"><path d=\"m 327,180L453,180 \" style=\"stroke-width: 2; stroke-linejoin: round; marker-end: url("#markerSjdype4kmnw");\" fill=\"none\" stroke=\"#000000\"></path></g><polyline points=\"327,180 453,180 \" style=\"stroke-opacity: 0; stroke-width: 15;\" fill=\"none\" stroke=\"#ffffff\" class=\"djs-hit\"></polyline></g></g><g class=\"djs-group\" xmlns=\"http://www.w3.org/2000/svg\"><g class=\"djs-element djs-shape\" data-element-id=\"SequenceFlow_18ahat1_label\" transform=\"matrix(1,0,0,1,345,170)\" style=\"display: none;\"><rect fill=\"none\" class=\"djs-outline\" x=\"-6\" y=\"-6\" width=\"102\" height=\"32\"></rect><g class=\"djs-visual\"><text style=\"font-family: Arial,sans-serif; font-size: 11px;\" class=\" djs-label\"><tspan x=\"45\" y=\"0\"></tspan></text></g><rect x=\"0\" y=\"0\" width=\"90\" height=\"20\" style=\"stroke-opacity: 0; stroke-width: 15;\" fill=\"none\" stroke=\"#ffffff\" class=\"djs-hit\"></rect></g></g><g class=\"djs-group\" xmlns=\"http://www.w3.org/2000/svg\"><g class=\"djs-element djs-connection\" data-element-id=\"SequenceFlow_1mo9gxb\" style=\"display: block;\"><rect fill=\"none\" class=\"djs-outline\" x=\"567\" y=\"174\" width=\"126\" height=\"12\"></rect><g class=\"djs-visual\"><path d=\"m 573,180L687,180 \" style=\"stroke-width: 2; stroke-linejoin: round; marker-end: url("#markerSjdype4kmnw");\" fill=\"none\" stroke=\"#000000\"></path></g><polyline points=\"573,180 687,180 \" style=\"stroke-opacity: 0; stroke-width: 15;\" fill=\"none\" stroke=\"#ffffff\" class=\"djs-hit\"></polyline></g></g><g class=\"djs-group\" xmlns=\"http://www.w3.org/2000/svg\"><g class=\"djs-element djs-shape\" data-element-id=\"SequenceFlow_1mo9gxb_label\" transform=\"matrix(1,0,0,1,585,170)\" style=\"display: none;\"><rect fill=\"none\" class=\"djs-outline\" x=\"-6\" y=\"-6\" width=\"102\" height=\"32\"></rect><g class=\"djs-visual\"><text style=\"font-family: Arial,sans-serif; font-size: 11px;\" class=\" djs-label\"><tspan x=\"45\" y=\"0\"></tspan></text></g><rect x=\"0\" y=\"0\" width=\"90\" height=\"20\" style=\"stroke-opacity: 0; stroke-width: 15;\" fill=\"none\" stroke=\"#ffffff\" class=\"djs-hit\"></rect></g></g><g class=\"djs-group\" xmlns=\"http://www.w3.org/2000/svg\"><g class=\"djs-element djs-connection\" data-element-id=\"SequenceFlow_1dgtrrq\" style=\"display: block;\"><rect fill=\"none\" class=\"djs-outline\" x=\"801\" y=\"174\" width=\"130\" height=\"12\"></rect><g class=\"djs-visual\"><path d=\"m 807,180L925,180 \" style=\"stroke-width: 2; stroke-linejoin: round; marker-end: url("#markerSjdype4kmnw");\" fill=\"none\" stroke=\"#000000\"></path></g><polyline points=\"807,180 925,180 \" style=\"stroke-opacity: 0; stroke-width: 15;\" fill=\"none\" stroke=\"#ffffff\" class=\"djs-hit\"></polyline></g></g><g class=\"djs-group\" xmlns=\"http://www.w3.org/2000/svg\"><g class=\"djs-element djs-shape\" data-element-id=\"SequenceFlow_1dgtrrq_label\" transform=\"matrix(1,0,0,1,821,170)\" style=\"display: none;\"><rect fill=\"none\" class=\"djs-outline\" x=\"-6\" y=\"-6\" width=\"102\" height=\"32\"></rect><g class=\"djs-visual\"><text style=\"font-family: Arial,sans-serif; font-size: 11px;\" class=\" djs-label\"><tspan x=\"45\" y=\"0\"></tspan></text></g><rect x=\"0\" y=\"0\" width=\"90\" height=\"20\" style=\"stroke-opacity: 0; stroke-width: 15;\" fill=\"none\" stroke=\"#ffffff\" class=\"djs-hit\"></rect></g></g></svg>", - "templateName":"templateTCA1", - "typeId":null, - "deploymentId":null -}
\ No newline at end of file diff --git a/tests/clamp/APIs/data/createClTCA2.json b/tests/clamp/APIs/data/createClTCA2.json deleted file mode 100644 index 5754a8e2..00000000 --- a/tests/clamp/APIs/data/createClTCA2.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "name":"ClTCA2", - "controlNamePrefix":"ClosedLoop-", - "bpmnText":"", - "propText":"{\"Policy_1r0guma\":{\"Policy4\":[{\"name\":\"pname\",\"value\":\"Policy4\"},{\"name\":\"pid\",\"value\":\"0\"},{\"name\":\"timeout\",\"value\":\"345\"},{\"policyConfigurations\":[[{\"name\":\"recipe\",\"value\":[\"reset\"]},{\"name\":\"maxRetries\",\"value\":[\"3\"]},{\"name\":\"retryTimeLimit\",\"value\":[\"300\"]},{\"name\":\"_id\",\"value\":[\"JoL9ecT\"]},{\"name\":\"parentPolicy\",\"value\":[\"\"]},{\"name\":\"targetResourceId\",\"value\":[\"\"]}]]}]},\"global\":[{\"name\":\"service\",\"value\":[\"4cc5b45a-1f63-4194-8100-cd8e14248c92\"]},{\"name\":\"vf\",\"value\":[\"023a3f0d-1161-45ff-b4cf-8918a8ccf3ad\"]},{\"name\":\"actionSet\",\"value\":[\"enbRecipe\"]},{\"name\":\"location\",\"value\":[\"DC1\",\"DC2\",\"DC3\"]}],\"TCA_09syovq\":{\"TCA2\":[{\"name\":\"tname\",\"value\":\"TCA2\"},{\"name\":\"tuuid\",\"value\":\"3794f32d-8d95-tf61-444b-0b374cc173b2\"},{\"name\":\"tcaPol\",\"value\":\"Policy4\"},{\"name\":\"eventName\",\"value\":\"vLoadBalancer\"},{\"name\":\"controlLoopSchemaType\",\"value\":\"VM\"},{\"name\":\"tcaPolId\",\"value\":\"0\"},{\"serviceConfigurations\":[[\"$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedDiscardedPacketsDelta\",\"GREATER\",\"15\",\"ONSET\",\"undefined\"]]}]}}", - "imageText":"<svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" version=\"1.1\" viewbox=\"\" width=\"100%\" height=\"100%\"><defs><marker viewBox=\"0 0 20 20\" markerWidth=\"10\" markerHeight=\"10\" orient=\"auto\" refX=\"11\" refY=\"10\" id=\"markerSjdype4kmyk\"><path d=\"M 1 5 L 11 10 L 1 15 Z\" style=\"stroke-width: 1; stroke-linecap: round; stroke-dasharray: 10000, 1;\" fill=\"#000000\"></path></marker><marker viewBox=\"0 0 20 20\" markerWidth=\"20\" markerHeight=\"20\" orient=\"auto\" refX=\"6\" refY=\"6\" id=\"markerSjdype4kmym\"><circle cx=\"6\" cy=\"6\" r=\"3.5\" style=\"stroke-width: 1; stroke-linecap: round; stroke-dasharray: 10000, 1;\" fill=\"#ffffff\" stroke=\"#000000\"></circle></marker><marker viewBox=\"0 0 20 20\" markerWidth=\"20\" markerHeight=\"20\" orient=\"auto\" refX=\"8.5\" refY=\"5\" id=\"markerSjdype4kmyo\"><path d=\"m 1 5 l 0 -3 l 7 3 l -7 3 z\" style=\"stroke-width: 1; stroke-linecap: butt; stroke-dasharray: 10000, 1;\" fill=\"#ffffff\" stroke=\"#000000\"></path></marker><marker viewBox=\"0 0 20 20\" markerWidth=\"10\" markerHeight=\"10\" orient=\"auto\" refX=\"11\" refY=\"10\" id=\"markerSjdype4kmyq\"><path d=\"M 1 5 L 11 10 L 1 15\" style=\"stroke-width: 1; stroke-linecap: round; stroke-dasharray: 10000, 1;\" fill=\"#ffffff\" stroke=\"#000000\"></path></marker><marker viewBox=\"0 0 20 20\" markerWidth=\"10\" markerHeight=\"10\" orient=\"auto\" refX=\"-1\" refY=\"10\" id=\"markerSjdype4kmys\"><path d=\"M 0 10 L 8 6 L 16 10 L 8 14 Z\" style=\"stroke-width: 1; stroke-linecap: round; stroke-dasharray: 10000, 1;\" fill=\"#ffffff\" stroke=\"#000000\"></path></marker><marker viewBox=\"0 0 20 20\" markerWidth=\"10\" markerHeight=\"10\" orient=\"auto\" refX=\"-5\" refY=\"10\" id=\"markerSjdype4kmyu\"><path d=\"M 1 4 L 5 16\" style=\"stroke-width: 1; stroke-linecap: round; stroke-dasharray: 10000, 1;\" fill=\"#000000\" stroke=\"#000000\"></path></marker></defs><g class=\"djs-group\" xmlns=\"http://www.w3.org/2000/svg\"><g class=\"djs-element djs-shape\" data-element-id=\"StartEvent_1\" transform=\"matrix(1,0,0,1,50,162)\" style=\"display: block;\"><rect fill=\"none\" class=\"djs-outline\" x=\"-6\" y=\"-6\" width=\"48\" height=\"48\"></rect><g class=\"djs-visual\"><circle cx=\"18\" cy=\"18\" r=\"18\" style=\"stroke-width: 2;\" stroke=\"#000000\" fill=\"#ffffff\"></circle></g><rect x=\"0\" y=\"0\" width=\"36\" height=\"36\" style=\"stroke-opacity: 0; stroke-width: 15;\" fill=\"none\" stroke=\"#ffffff\" class=\"djs-hit\"></rect></g></g><g class=\"djs-group\" xmlns=\"http://www.w3.org/2000/svg\"><g class=\"djs-element djs-shape\" data-element-id=\"StartEvent_1_label\" transform=\"matrix(1,0,0,1,23,198)\" style=\"display: none;\"><rect fill=\"none\" class=\"djs-outline\" x=\"-6\" y=\"-6\" width=\"102\" height=\"32\"></rect><g class=\"djs-visual\"><text style=\"font-family: Arial,sans-serif; font-size: 11px;\" class=\" djs-label\"><tspan x=\"45\" y=\"0\"></tspan></text></g><rect x=\"0\" y=\"0\" width=\"90\" height=\"20\" style=\"stroke-opacity: 0; stroke-width: 15;\" fill=\"none\" stroke=\"#ffffff\" class=\"djs-hit\"></rect></g></g><g class=\"djs-group\" xmlns=\"http://www.w3.org/2000/svg\"><g class=\"djs-element djs-shape\" data-element-id=\"VesCollector_1u6hupb\" transform=\"matrix(1,0,0,1,231,140)\" style=\"display: block;\"><rect fill=\"none\" class=\"djs-outline\" x=\"-6\" y=\"-6\" width=\"132\" height=\"92\"></rect><g class=\"djs-visual\"><rect x=\"0\" y=\"0\" width=\"120\" height=\"80\" rx=\"0\" ry=\"0\" style=\"stroke-width: 2;\" stroke=\"#000000\" fill=\"#ffffff\"></rect><polyline points=\"120,80 120,20 \" style=\"stroke-width: 2;\" fill=\"none\" stroke=\"#000000\"></polyline><polyline points=\"20,0 20,80 \" style=\"stroke-width: 2;\" fill=\"none\" stroke=\"#000000\"></polyline><text style=\"font-family: Arial,sans-serif; font-size: 12px;\"><tspan x=\"5\" y=\"14\">V</tspan></text><text style=\"font-family: Arial,sans-serif; font-size: 12px;\"><tspan x=\"5\" y=\"26\">E</tspan></text><text style=\"font-family: Arial,sans-serif; font-size: 12px;\"><tspan x=\"5\" y=\"38\">S</tspan></text><text style=\"font-family: Arial,sans-serif; font-size: 12px;\" class=\" djs-label\"><tspan x=\"25.5\" y=\"43.5\">VesCollector</tspan></text></g><rect x=\"0\" y=\"0\" width=\"120\" height=\"80\" style=\"stroke-opacity: 0; stroke-width: 15;\" fill=\"none\" stroke=\"#ffffff\" class=\"djs-hit\"></rect></g></g><g class=\"djs-group\" xmlns=\"http://www.w3.org/2000/svg\"><g class=\"djs-element djs-shape\" data-element-id=\"TCA_09syovq\" transform=\"matrix(1,0,0,1,472,140)\" style=\"display: block;\"><rect fill=\"none\" class=\"djs-outline\" x=\"-6\" y=\"-6\" width=\"132\" height=\"92\"></rect><g class=\"djs-visual\"><rect x=\"0\" y=\"0\" width=\"120\" height=\"80\" rx=\"0\" ry=\"0\" style=\"stroke-width: 2;\" stroke=\"#000000\" fill=\"#ffffff\"></rect><polyline points=\"0,60 120,60 \" style=\"stroke-width: 2;\" fill=\"none\" stroke=\"#000000\"></polyline><text style=\"font-family: Arial,sans-serif; font-size: 12px;\" class=\" djs-label\"><tspan x=\"48\" y=\"43.5\">TCA</tspan></text></g><rect x=\"0\" y=\"0\" width=\"120\" height=\"80\" style=\"stroke-opacity: 0; stroke-width: 15;\" fill=\"none\" stroke=\"#ffffff\" class=\"djs-hit\"></rect></g></g><g class=\"djs-group\" xmlns=\"http://www.w3.org/2000/svg\"><g class=\"djs-element djs-shape\" data-element-id=\"Policy_1r0guma\" transform=\"matrix(1,0,0,1,721,140)\" style=\"display: block;\"><rect fill=\"none\" class=\"djs-outline\" x=\"-6\" y=\"-6\" width=\"132\" height=\"92\"></rect><g class=\"djs-visual\"><rect x=\"0\" y=\"0\" width=\"120\" height=\"80\" rx=\"0\" ry=\"0\" style=\"stroke-width: 2;\" stroke=\"#000000\" fill=\"#ffffff\"></rect><polyline points=\"0,40 60,0 \" style=\"stroke-width: 2;\" fill=\"none\" stroke=\"#000000\"></polyline><text style=\"font-family: Arial,sans-serif; font-size: 12px;\" class=\" djs-label\"><tspan x=\"43.5\" y=\"43.5\">Policy</tspan></text></g><rect x=\"0\" y=\"0\" width=\"120\" height=\"80\" style=\"stroke-opacity: 0; stroke-width: 15;\" fill=\"none\" stroke=\"#ffffff\" class=\"djs-hit\"></rect></g></g><g class=\"djs-group\" xmlns=\"http://www.w3.org/2000/svg\"><g class=\"djs-element djs-shape selected\" data-element-id=\"EndEvent_04x88vg\" transform=\"matrix(1,0,0,1,966,162)\" style=\"display: block;\"><rect fill=\"none\" class=\"djs-outline\" x=\"-6\" y=\"-6\" width=\"48\" height=\"48\"></rect><g class=\"djs-visual\"><circle cx=\"18\" cy=\"18\" r=\"18\" style=\"stroke-width: 4;\" stroke=\"#000000\" fill=\"#ffffff\"></circle></g><rect x=\"0\" y=\"0\" width=\"36\" height=\"36\" style=\"stroke-opacity: 0; stroke-width: 15;\" fill=\"none\" stroke=\"#ffffff\" class=\"djs-hit\"></rect><g class=\" djs-resizer djs-resizer-nw\" transform=\"matrix(1,0,0,1,0,0)\"><rect x=\"-7\" y=\"-7\" width=\"5\" height=\"5\" class=\" djs-resizer-visual\"></rect><rect x=\"-7\" y=\"-7\" width=\"20\" height=\"20\" class=\" djs-resizer-hit\"></rect></g><g class=\" djs-resizer djs-resizer-ne\" transform=\"matrix(0,1,-1,0,36,0)\"><rect x=\"-7\" y=\"-7\" width=\"5\" height=\"5\" class=\" djs-resizer-visual\"></rect><rect x=\"-7\" y=\"-7\" width=\"20\" height=\"20\" class=\" djs-resizer-hit\"></rect></g><g class=\" djs-resizer djs-resizer-se\" transform=\"matrix(-1,0,0,-1,36,36)\"><rect x=\"-7\" y=\"-7\" width=\"5\" height=\"5\" class=\" djs-resizer-visual\"></rect><rect x=\"-7\" y=\"-7\" width=\"20\" height=\"20\" class=\" djs-resizer-hit\"></rect></g><g class=\" djs-resizer djs-resizer-sw\" transform=\"matrix(0,-1,1,0,0,36)\"><rect x=\"-7\" y=\"-7\" width=\"5\" height=\"5\" class=\" djs-resizer-visual\"></rect><rect x=\"-7\" y=\"-7\" width=\"20\" height=\"20\" class=\" djs-resizer-hit\"></rect></g></g></g><g class=\"djs-group\" xmlns=\"http://www.w3.org/2000/svg\"><g class=\"djs-element djs-shape\" data-element-id=\"EndEvent_04x88vg_label\" transform=\"matrix(1,0,0,1,939,198)\" style=\"display: none;\"><rect fill=\"none\" class=\"djs-outline\" x=\"-6\" y=\"-6\" width=\"102\" height=\"32\"></rect><g class=\"djs-visual\"><text style=\"font-family: Arial,sans-serif; font-size: 11px;\" class=\" djs-label\"><tspan x=\"45\" y=\"0\"></tspan></text></g><rect x=\"0\" y=\"0\" width=\"90\" height=\"20\" style=\"stroke-opacity: 0; stroke-width: 15;\" fill=\"none\" stroke=\"#ffffff\" class=\"djs-hit\"></rect></g></g><g class=\"djs-group\" xmlns=\"http://www.w3.org/2000/svg\"><g class=\"djs-element djs-connection\" data-element-id=\"SequenceFlow_0y4m01s\" style=\"display: block;\"><rect fill=\"none\" class=\"djs-outline\" x=\"80\" y=\"174\" width=\"157\" height=\"12\"></rect><g class=\"djs-visual\"><path d=\"m 86,180L231,180 \" style=\"stroke-width: 2; stroke-linejoin: round; marker-end: url("#markerSjdype4kmyk");\" fill=\"none\" stroke=\"#000000\"></path></g><polyline points=\"86,180 231,180 \" style=\"stroke-opacity: 0; stroke-width: 15;\" fill=\"none\" stroke=\"#ffffff\" class=\"djs-hit\"></polyline></g></g><g class=\"djs-group\" xmlns=\"http://www.w3.org/2000/svg\"><g class=\"djs-element djs-shape\" data-element-id=\"SequenceFlow_0y4m01s_label\" transform=\"matrix(1,0,0,1,113.5,170)\" style=\"display: none;\"><rect fill=\"none\" class=\"djs-outline\" x=\"-6\" y=\"-6\" width=\"102\" height=\"32\"></rect><g class=\"djs-visual\"><text style=\"font-family: Arial,sans-serif; font-size: 11px;\" class=\" djs-label\"><tspan x=\"45\" y=\"0\"></tspan></text></g><rect x=\"0\" y=\"0\" width=\"90\" height=\"20\" style=\"stroke-opacity: 0; stroke-width: 15;\" fill=\"none\" stroke=\"#ffffff\" class=\"djs-hit\"></rect></g></g><g class=\"djs-group\" xmlns=\"http://www.w3.org/2000/svg\"><g class=\"djs-element djs-connection\" data-element-id=\"SequenceFlow_10vqotq\" style=\"display: block;\"><rect fill=\"none\" class=\"djs-outline\" x=\"345\" y=\"174\" width=\"133\" height=\"12\"></rect><g class=\"djs-visual\"><path d=\"m 351,180L472,180 \" style=\"stroke-width: 2; stroke-linejoin: round; marker-end: url("#markerSjdype4kmyk");\" fill=\"none\" stroke=\"#000000\"></path></g><polyline points=\"351,180 472,180 \" style=\"stroke-opacity: 0; stroke-width: 15;\" fill=\"none\" stroke=\"#ffffff\" class=\"djs-hit\"></polyline></g></g><g class=\"djs-group\" xmlns=\"http://www.w3.org/2000/svg\"><g class=\"djs-element djs-shape\" data-element-id=\"SequenceFlow_10vqotq_label\" transform=\"matrix(1,0,0,1,366.5,170)\" style=\"display: none;\"><rect fill=\"none\" class=\"djs-outline\" x=\"-6\" y=\"-6\" width=\"102\" height=\"32\"></rect><g class=\"djs-visual\"><text style=\"font-family: Arial,sans-serif; font-size: 11px;\" class=\" djs-label\"><tspan x=\"45\" y=\"0\"></tspan></text></g><rect x=\"0\" y=\"0\" width=\"90\" height=\"20\" style=\"stroke-opacity: 0; stroke-width: 15;\" fill=\"none\" stroke=\"#ffffff\" class=\"djs-hit\"></rect></g></g><g class=\"djs-group\" xmlns=\"http://www.w3.org/2000/svg\"><g class=\"djs-element djs-connection\" data-element-id=\"SequenceFlow_0fpkygk\" style=\"display: block;\"><rect fill=\"none\" class=\"djs-outline\" x=\"586\" y=\"174\" width=\"141\" height=\"12\"></rect><g class=\"djs-visual\"><path d=\"m 592,180L721,180 \" style=\"stroke-width: 2; stroke-linejoin: round; marker-end: url("#markerSjdype4kmyk");\" fill=\"none\" stroke=\"#000000\"></path></g><polyline points=\"592,180 721,180 \" style=\"stroke-opacity: 0; stroke-width: 15;\" fill=\"none\" stroke=\"#ffffff\" class=\"djs-hit\"></polyline></g></g><g class=\"djs-group\" xmlns=\"http://www.w3.org/2000/svg\"><g class=\"djs-element djs-shape\" data-element-id=\"SequenceFlow_0fpkygk_label\" transform=\"matrix(1,0,0,1,611.5,170)\" style=\"display: none;\"><rect fill=\"none\" class=\"djs-outline\" x=\"-6\" y=\"-6\" width=\"102\" height=\"32\"></rect><g class=\"djs-visual\"><text style=\"font-family: Arial,sans-serif; font-size: 11px;\" class=\" djs-label\"><tspan x=\"45\" y=\"0\"></tspan></text></g><rect x=\"0\" y=\"0\" width=\"90\" height=\"20\" style=\"stroke-opacity: 0; stroke-width: 15;\" fill=\"none\" stroke=\"#ffffff\" class=\"djs-hit\"></rect></g></g><g class=\"djs-group\" xmlns=\"http://www.w3.org/2000/svg\"><g class=\"djs-element djs-connection\" data-element-id=\"SequenceFlow_0jsvuvu\" style=\"display: block;\"><rect fill=\"none\" class=\"djs-outline\" x=\"835\" y=\"174\" width=\"137\" height=\"12\"></rect><g class=\"djs-visual\"><path d=\"m 841,180L966,180 \" style=\"stroke-width: 2; stroke-linejoin: round; marker-end: url("#markerSjdype4kmyk");\" fill=\"none\" stroke=\"#000000\"></path></g><polyline points=\"841,180 966,180 \" style=\"stroke-opacity: 0; stroke-width: 15;\" fill=\"none\" stroke=\"#ffffff\" class=\"djs-hit\"></polyline></g></g><g class=\"djs-group\" xmlns=\"http://www.w3.org/2000/svg\"><g class=\"djs-element djs-shape\" data-element-id=\"SequenceFlow_0jsvuvu_label\" transform=\"matrix(1,0,0,1,858.5,170)\" style=\"display: none;\"><rect fill=\"none\" class=\"djs-outline\" x=\"-6\" y=\"-6\" width=\"102\" height=\"32\"></rect><g class=\"djs-visual\"><text style=\"font-family: Arial,sans-serif; font-size: 11px;\" class=\" djs-label\"><tspan x=\"45\" y=\"0\"></tspan></text></g><rect x=\"0\" y=\"0\" width=\"90\" height=\"20\" style=\"stroke-opacity: 0; stroke-width: 15;\" fill=\"none\" stroke=\"#ffffff\" class=\"djs-hit\"></rect></g></g></svg>", - "templateName":"templateTCA2", - "typeId":null, - "deploymentId":null -}
\ No newline at end of file diff --git a/tests/clamp/APIs/data/microservicePolicyTca1.json b/tests/clamp/APIs/data/microservicePolicyTca1.json new file mode 100644 index 00000000..f4e373e4 --- /dev/null +++ b/tests/clamp/APIs/data/microservicePolicyTca1.json @@ -0,0 +1,208 @@ +{ + "name": "TCA_iYTIP_v1_0_ResourceInstanceName1_tca", + "modelType": "onap.policy.monitoring.cdap.tca.hi.lo.app", + "properties": { + "domain": "measurementsForVfScaling", + "metricsPerEventName": [{ + "policyVersion": "version1.11", + "thresholds": [], + "policyName": "Scope1", + "controlLoopSchemaType": "VNF", + "policyScope": "Policyscope1", + "eventName": "Event1" + }] + }, + "shared": false, + "jsonRepresentation": { + "schema": { + "uniqueItems": "true", + "format": "tabs-top", + "type": "array", + "title": "TCA Policy JSON", + "items": { + "type": "object", + "title": "TCA Policy JSON", + "required": [ + "domain", + "metricsPerEventName" + ], + "properties": { + "domain": { + "propertyOrder": 1001, + "default": "measurementsForVfScaling", + "title": "Domain name to which TCA needs to be applied", + "type": "string" + }, + "metricsPerEventName": { + "propertyOrder": 1002, + "uniqueItems": "true", + "format": "tabs-top", + "title": "Contains eventName and threshold details that need to be applied to given eventName", + "type": "array", + "items": { + "type": "object", + "required": [ + "controlLoopSchemaType", + "eventName", + "policyName", + "policyScope", + "policyVersion", + "thresholds" + ], + "properties": { + "policyVersion": { + "propertyOrder": 1007, + "title": "TCA Policy Scope Version", + "type": "string" + }, + "thresholds": { + "propertyOrder": 1008, + "uniqueItems": "true", + "format": "tabs-top", + "title": "Thresholds associated with eventName", + "type": "array", + "items": { + "type": "object", + "required": [ + "closedLoopControlName", + "closedLoopEventStatus", + "direction", + "fieldPath", + "severity", + "thresholdValue", + "version" + ], + "properties": { + "severity": { + "propertyOrder": 1013, + "title": "Threshold Event Severity", + "type": "string", + "enum": [ + "CRITICAL", + "MAJOR", + "MINOR", + "WARNING", + "NORMAL" + ] + }, + "fieldPath": { + "propertyOrder": 1012, + "title": "Json field Path as per CEF message which needs to be analyzed for TCA", + "type": "string", + "enum": [ + "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedTotalPacketsDelta", + "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedOctetsDelta", + "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedUnicastPacketsDelta", + "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedMulticastPacketsDelta", + "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedBroadcastPacketsDelta", + "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedDiscardedPacketsDelta", + "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedErrorPacketsDelta", + "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedTotalPacketsAccumulated", + "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedOctetsAccumulated", + "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedUnicastPacketsAccumulated", + "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedMulticastPacketsAccumulated", + "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedBroadcastPacketsAccumulated", + "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedDiscardedPacketsAccumulated", + "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedErrorPacketsAccumulated", + "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedTotalPacketsDelta", + "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedOctetsDelta", + "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedUnicastPacketsDelta", + "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedMulticastPacketsDelta", + "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedBroadcastPacketsDelta", + "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedDiscardedPacketsDelta", + "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedErrorPacketsDelta", + "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedTotalPacketsAccumulated", + "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedOctetsAccumulated", + "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedUnicastPacketsAccumulated", + "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedMulticastPacketsAccumulated", + "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedBroadcastPacketsAccumulated", + "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedDiscardedPacketsAccumulated", + "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedErrorPacketsAccumulated", + "$.event.measurementsForVfScalingFields.cpuUsageArray[*].cpuIdle", + "$.event.measurementsForVfScalingFields.cpuUsageArray[*].cpuUsageInterrupt", + "$.event.measurementsForVfScalingFields.cpuUsageArray[*].cpuUsageNice", + "$.event.measurementsForVfScalingFields.cpuUsageArray[*].cpuUsageSoftIrq", + "$.event.measurementsForVfScalingFields.cpuUsageArray[*].cpuUsageSteal", + "$.event.measurementsForVfScalingFields.cpuUsageArray[*].cpuUsageSystem", + "$.event.measurementsForVfScalingFields.cpuUsageArray[*].cpuWait", + "$.event.measurementsForVfScalingFields.cpuUsageArray[*].percentUsage", + "$.event.measurementsForVfScalingFields.meanRequestLatency", + "$.event.measurementsForVfScalingFields.memoryUsageArray[*].memoryBuffered", + "$.event.measurementsForVfScalingFields.memoryUsageArray[*].memoryCached", + "$.event.measurementsForVfScalingFields.memoryUsageArray[*].memoryConfigured", + "$.event.measurementsForVfScalingFields.memoryUsageArray[*].memoryFree", + "$.event.measurementsForVfScalingFields.memoryUsageArray[*].memoryUsed", + "$.event.measurementsForVfScalingFields.additionalMeasurements[*].arrayOfFields[0].value" + ] + }, + "thresholdValue": { + "propertyOrder": 1014, + "title": "Threshold value for the field Path inside CEF message", + "type": "integer" + }, + "closedLoopEventStatus": { + "propertyOrder": 1010, + "title": "Closed Loop Event Status of the threshold", + "type": "string", + "enum": [ + "ONSET", + "ABATED" + ] + }, + "closedLoopControlName": { + "propertyOrder": 1009, + "title": "Closed Loop Control Name associated with the threshold", + "type": "string" + }, + "version": { + "propertyOrder": 1015, + "title": "Version number associated with the threshold", + "type": "string" + }, + "direction": { + "propertyOrder": 1011, + "title": "Direction of the threshold", + "type": "string", + "enum": [ + "LESS", + "LESS_OR_EQUAL", + "GREATER", + "GREATER_OR_EQUAL", + "EQUAL" + ] + } + } + } + }, + "policyName": { + "propertyOrder": 1005, + "title": "TCA Policy Scope Name", + "type": "string" + }, + "controlLoopSchemaType": { + "propertyOrder": 1003, + "title": "Specifies Control Loop Schema Type for the event Name e.g. VNF, VM", + "type": "string", + "enum": [ + "VM", + "VNF" + ] + }, + "policyScope": { + "propertyOrder": 1006, + "title": "TCA Policy Scope", + "type": "string" + }, + "eventName": { + "propertyOrder": 1004, + "title": "Event name to which thresholds need to be applied", + "type": "string" + } + } + } + } + } + } + } + } +}
\ No newline at end of file diff --git a/tests/clamp/APIs/data/operationalPolicyTca1.json b/tests/clamp/APIs/data/operationalPolicyTca1.json new file mode 100644 index 00000000..71a14493 --- /dev/null +++ b/tests/clamp/APIs/data/operationalPolicyTca1.json @@ -0,0 +1,6 @@ +[{ + "name": "OPERATIONAL_iYTIP_v1_0_ResourceInstanceName1_tca", + "configurationsJson": { + "testField": "Test_Field" + } +}]
\ No newline at end of file diff --git a/tests/clamp/UIs/01__Open_And_Edit_TCA.robot b/tests/clamp/UIs/01__Open_And_Edit_TCA.robot new file mode 100644 index 00000000..c0070c77 --- /dev/null +++ b/tests/clamp/UIs/01__Open_And_Edit_TCA.robot @@ -0,0 +1,67 @@ +*** Settings *** +Library Collections +Library RequestsLibrary +Library OperatingSystem +Library json +Library ../../../scripts/clamp/python-lib/CustomSeleniumLibrary.py +Library XvfbRobot + +*** Variables *** +${login} admin +${passw} password +${SELENIUM_SPEED_FAST} .2 seconds +${SELENIUM_SPEED_SLOW} .5 seconds +${BASE_URL} https://localhost:8443 + +*** Keywords *** +Create the sessions + ${auth}= Create List ${login} ${passw} + Create Session clamp ${BASE_URL} auth=${auth} disable_warnings=1 + Set Global Variable ${clamp_session} clamp + +*** Test Cases *** +Get Requests health check ok + Create the sessions + ${resp}= Get Request ${clamp_session} /restservices/clds/v1/healthcheck + Should Be Equal As Strings ${resp.status_code} 200 + +Open Browser +# Next line is to be enabled for Headless tests only (jenkins?). To see the tests disable the line. + Start Virtual Display 1920 1080 + Set Selenium Speed ${SELENIUM_SPEED_SLOW} + Open Browser ${BASE_URL}/designer/index.html browser=firefox + +Reply to authentication popup + Run Keyword And Ignore Error Insert into prompt ${login} ${passw} + Confirm action + +Good Login to Clamp UI and Verify logged in + Set Window Size 1920 1080 + ${title}= Get Title + Should Be Equal CLDS ${title} + Wait Until Element Is Visible xpath=//*[@class="navbar-brand logo_name ng-binding"] timeout=60 + Element Text Should Be xpath=//*[@class="navbar-brand logo_name ng-binding"] expected=Hello:admin + +Open TCA1 from Menu + Wait Until Element Is Visible xpath=//*[@id="navbar"]/ul/li[1]/a timeout=60 + Click Element xpath=//*[@id="navbar"]/ul/li[1]/a + Wait Until Element Is Visible locator=Open CL timeout=60 + Click Element locator=Open CL + Select From List By Label id=modelName LOOP_iYTIP_v1_0_ResourceInstanceName1_tca + Click Button locator=OK + +Set Properties for HolmesModel1 + Wait Until Element Is Visible xpath=//*[@data-element-id="TCA_iYTIP_v1_0_ResourceInstanceName1_tca"] timeout=60 + Click Element xpath=//*[@data-element-id="TCA_iYTIP_v1_0_ResourceInstanceName1_tca"] + Wait Until Element Is Visible xpath=//*[@id="editor"]/div/h3/div[2]/button[1] timeout=60 + Click Element xpath=//*[@id="editor"]/div/h3/div[2]/button[1] + Wait Until Element Is Visible xpath=//*[@id="root.0"]/div[2]/div/div/div[2]/div/h3/div[2]/button[1]/span timeout=60 + Click Element xpath=//*[@id="root.0"]/div[2]/div/div/div[2]/div/h3/div[2]/button[1]/span + Input Text xpath=//*[@name="root[0][metricsPerEventName][0][eventName]"] text=Event1 + Input Text xpath=//*[@name="root[0][metricsPerEventName][0][policyName]"] text=PolicyScope1 + Input Text xpath=//*[@name="root[0][metricsPerEventName][0][policyScope]"] text=TCAPolicyScope1 + Input Text xpath=//*[@name="root[0][metricsPerEventName][0][policyVersion]"] text=1.2.3 + Click Button locator=Done + +Close Browser + Close Browser diff --git a/tests/clamp/APIs/01__Create_CL_Holmes.robot b/tests/clamp/UIs/02__Verify_Modification_In_UI.robot index be63f22f..979547c6 100644 --- a/tests/clamp/APIs/01__Create_CL_Holmes.robot +++ b/tests/clamp/UIs/02__Verify_Modification_In_UI.robot @@ -19,3 +19,10 @@ Get Requests health check ok Create the sessions ${resp}= Get Request ${clamp_session} /restservices/clds/v1/healthcheck Should Be Equal As Strings ${resp.status_code} 200 + +Open TCA1 + ${resp}= Get Request ${clamp_session} /restservices/clds/v2/loop/LOOP_iYTIP_v1_0_ResourceInstanceName1_tca + Should Contain Match ${resp} *LOOP_iYTIP_v1_0_ResourceInstanceName1_tca* + Should Contain Match ${resp} *Event1* + Should Contain Match ${resp} *1.2.3* + Should Contain Match ${resp} *PolicyScope1* diff --git a/tests/clamp/UIs/04__Submit_deploy_chain_Holmes.robot b/tests/clamp/UIs/04__Submit_deploy_chain_Holmes.robot deleted file mode 100644 index b582fad9..00000000 --- a/tests/clamp/UIs/04__Submit_deploy_chain_Holmes.robot +++ /dev/null @@ -1,138 +0,0 @@ -*** Settings *** -Library Collections -Library RequestsLibrary -Library OperatingSystem -Library json -Library ../../../scripts/clamp/python-lib/CustomSeleniumLibrary.py -Library XvfbRobot - -*** Variables *** -${login} admin -${passw} password -${SELENIUM_SPEED_FAST} .2 seconds -${SELENIUM_SPEED_SLOW} .5 seconds -${BASE_URL} https://localhost:8443 - -*** Keywords *** -Create the sessions - ${auth}= Create List ${login} ${passw} - Create Session clamp ${BASE_URL} auth=${auth} disable_warnings=1 - Set Global Variable ${clamp_session} clamp - -*** Test Cases *** -Get Requests health check ok - Create the sessions - ${resp}= Get Request ${clamp_session} /restservices/clds/v1/healthcheck - Should Be Equal As Strings ${resp.status_code} 200 - -Open Browser -# Next line is to be enabled for Headless tests only (jenkins?). To see the tests disable the line. - Start Virtual Display 1920 1080 - Set Selenium Speed ${SELENIUM_SPEED_SLOW} - Open Browser ${BASE_URL}/designer/index.html browser=firefox - -Reply to authentication popup - Run Keyword And Ignore Error Insert into prompt ${login} ${passw} - Confirm action - -Good Login to Clamp UI and Verify logged in - Set Window Size 1920 1080 - ${title}= Get Title - Should Be Equal CLDS ${title} - Wait Until Element Is Visible xpath=//*[@class="navbar-brand logo_name ng-binding"] timeout=60 - Element Text Should Be xpath=//*[@class="navbar-brand logo_name ng-binding"] expected=Hello:admin - -#Open Holmes CL -# Wait Until Element Is Visible xpath=//*[@id="navbar"]/ul/li[1]/a timeout=60 -# Click Element xpath=//*[@id="navbar"]/ul/li[1]/a -# Wait Until Element Is Visible locator=Open CL timeout=60 -# Click Element locator=Open CL -# Select From List By Label id=modelName HolmesModel1 -# Click Button locator=OK -# Element Should Contain xpath=//*[@id="modeler_name"] Closed Loop Modeler - HolmesModel1 -# Element Should Contain xpath=//*[@id="status_clds"] DESIGN -# -#Validate-Test Holmes CL -# Wait Until Element Is Visible xpath=//*[@id="navbar"]/ul/li[2]/a timeout=60 -# Click Element xpath=//*[@id="navbar"]/ul/li[2]/a -# Wait Until Element Is Visible locator=Validation Test timeout=60 -# Click Element locator=Validation Test -# Wait Until Element Is Visible xpath=//*[@id="alert_message_"] timeout=60 -# Element Text Should Be xpath=//*[@id="alert_message_"] expected=Action Successful: test -# Element Should Contain xpath=//*[@id="status_clds"] DESIGN -# -#Submit Holmes CL -# Wait Until Element Is Visible xpath=//*[@id="navbar"]/ul/li[2]/a timeout=60 -# Click Element xpath=//*[@id="navbar"]/ul/li[2]/a -# Wait Until Element Is Visible locator=Submit timeout=60 -# Click Element locator=Submit -# Click Button locator=Yes -# Wait Until Element Is Visible xpath=//*[@id="alert_message_"] timeout=60 -# Element Text Should Be xpath=//*[@id="alert_message_"] expected=Action Successful: submit -# Element Should Contain xpath=//*[@id="status_clds"] DISTRIBUTED -# -#Resubmit Holmes CL -# Wait Until Element Is Visible xpath=//*[@id="navbar"]/ul/li[2]/a timeout=60 -# Click Element xpath=//*[@id="navbar"]/ul/li[2]/a -# Wait Until Element Is Visible locator=Resubmit timeout=60 -# Click Element locator=Resubmit -# Click Button locator=Yes -# Wait Until Element Is Visible xpath=//*[@id="alert_message_"] timeout=60 -# Element Text Should Be xpath=//*[@id="alert_message_"] expected=Action Successful: resubmit -# Element Should Contain xpath=//*[@id="status_clds"] DISTRIBUTED -# -#Deploy Holmes CL -# Wait Until Element Is Visible xpath=//*[@id="navbar"]/ul/li[2]/a timeout=60 -# Click Element xpath=//*[@id="navbar"]/ul/li[2]/a -# Wait Until Element Is Visible locator=Deploy timeout=60 -# Click Element locator=Deploy -## Wait Until Element Is Visible xpath=//*[@id="deployProperties"] timeout=60 -## Input Text xpath=//*[@id="deployProperties"] text={} -# Click Button locator=Deploy -# Click Button locator=Yes -# Wait Until Element Is Visible xpath=//*[@id="alert_message_"] timeout=60 -# Element Text Should Be xpath=//*[@id="alert_message_"] expected=Action Successful: deploy -# Element Should Contain xpath=//*[@id="status_clds"] ACTIVE -# -#Update Holmes CL -# Wait Until Element Is Visible xpath=//*[@id="navbar"]/ul/li[2]/a timeout=60 -# Click Element xpath=//*[@id="navbar"]/ul/li[2]/a -# Wait Until Element Is Visible locator=Update timeout=60 -# Click Element locator=Update -# Click Button locator=Yes -# Wait Until Element Is Visible xpath=//*[@id="alert_message_"] timeout=60 -# Element Text Should Be xpath=//*[@id="alert_message_"] expected=Action Successful: update -# Element Should Contain xpath=//*[@id="status_clds"] ACTIVE -# -#Stop Holmes CL -# Wait Until Element Is Visible xpath=//*[@id="navbar"]/ul/li[2]/a timeout=60 -# Click Element xpath=//*[@id="navbar"]/ul/li[2]/a -# Wait Until Element Is Visible locator=Stop timeout=60 -# Click Element locator=Stop -# Click Button locator=Yes -# Wait Until Element Is Visible xpath=//*[@id="alert_message_"] timeout=60 -# Element Text Should Be xpath=//*[@id="alert_message_"] expected=Action Successful: stop -# Element Should Contain xpath=//*[@id="status_clds"] STOPPED -# -#Restart Holmes CL -# Wait Until Element Is Visible xpath=//*[@id="navbar"]/ul/li[2]/a timeout=60 -# Click Element xpath=//*[@id="navbar"]/ul/li[2]/a -# Wait Until Element Is Visible locator=Restart timeout=60 -# Click Element locator=Restart -# Click Button locator=Yes -# Wait Until Element Is Visible xpath=//*[@id="alert_message_"] timeout=60 -# Element Text Should Be xpath=//*[@id="alert_message_"] expected=Action Successful: restart -# Element Should Contain xpath=//*[@id="status_clds"] ACTIVE -# -#UnDeploy Holmes CL -# Wait Until Element Is Visible xpath=//*[@id="navbar"]/ul/li[2]/a timeout=60 -# Click Element xpath=//*[@id="navbar"]/ul/li[2]/a -# Wait Until Element Is Visible locator=UnDeploy timeout=60 -# Click Element locator=UnDeploy -# Click Button locator=Yes -# Wait Until Element Is Visible xpath=//*[@id="alert_message_"] timeout=60 -# Element Text Should Be xpath=//*[@id="alert_message_"] expected=Action Successful: undeploy -# Element Should Contain xpath=//*[@id="status_clds"] DISTRIBUTED - -Close Browser - Close Browser diff --git a/tests/clamp/UIs/05__Submit_deploy_chain_TCA.robot b/tests/clamp/UIs/05__Submit_deploy_chain_TCA.robot deleted file mode 100644 index 7bcada12..00000000 --- a/tests/clamp/UIs/05__Submit_deploy_chain_TCA.robot +++ /dev/null @@ -1,131 +0,0 @@ -*** Settings *** -Library Collections -Library RequestsLibrary -Library OperatingSystem -Library json -Library ../../../scripts/clamp/python-lib/CustomSeleniumLibrary.py -Library XvfbRobot - -*** Variables *** -${login} admin -${passw} password -${SELENIUM_SPEED_FAST} .2 seconds -${SELENIUM_SPEED_SLOW} .5 seconds -${BASE_URL} https://localhost:8443 - -*** Test Cases *** -Get Requests health check ok - ${resp}= Get Request ${clamp_session} /restservices/clds/v1/healthcheck - Should Be Equal As Strings ${resp.status_code} 200 - -Open Browser -# Next line is to be enabled for Headless tests only (jenkins?). To see the tests disable the line. - Start Virtual Display 1920 1080 - Set Selenium Speed ${SELENIUM_SPEED_SLOW} - Open Browser ${BASE_URL}/designer/index.html browser=firefox - -Reply to authentication popup - Run Keyword And Ignore Error Insert into prompt ${login} ${passw} - Confirm action - -Good Login to Clamp UI and Verify logged in - Set Window Size 1920 1080 - ${title}= Get Title - Should Be Equal CLDS ${title} - Wait Until Element Is Visible xpath=//*[@class="navbar-brand logo_name ng-binding"] timeout=60 - Element Text Should Be xpath=//*[@class="navbar-brand logo_name ng-binding"] expected=Hello:admin - -#Open TCA CL -# Wait Until Element Is Visible xpath=//*[@id="navbar"]/ul/li[1]/a timeout=60 -# Click Element xpath=//*[@id="navbar"]/ul/li[1]/a -# Wait Until Element Is Visible locator=Open CL timeout=60 -# Click Element locator=Open CL -# Select From List By Label id=modelName TCAModel1 -# Click Button locator=OK -# Element Should Contain xpath=//*[@id="modeler_name"] Closed Loop Modeler - TCAModel1 -# Element Should Contain xpath=//*[@id="status_clds"] DESIGN -# -#Validate-Test TCA CL -# Wait Until Element Is Visible xpath=//*[@id="navbar"]/ul/li[2]/a timeout=60 -# Click Element xpath=//*[@id="navbar"]/ul/li[2]/a -# Wait Until Element Is Visible locator=Validation Test timeout=60 -# Click Element locator=Validation Test -# Wait Until Element Is Visible xpath=//*[@id="alert_message_"] timeout=60 -# Element Text Should Be xpath=//*[@id="alert_message_"] expected=Action Successful: test -# Element Should Contain xpath=//*[@id="status_clds"] DESIGN -# -#Submit TCA CL -# Wait Until Element Is Visible xpath=//*[@id="navbar"]/ul/li[2]/a timeout=60 -# Click Element xpath=//*[@id="navbar"]/ul/li[2]/a -# Wait Until Element Is Visible locator=Submit timeout=60 -# Click Element locator=Submit -# Click Button locator=Yes -# Wait Until Element Is Visible xpath=//*[@id="alert_message_"] timeout=60 -# Element Text Should Be xpath=//*[@id="alert_message_"] expected=Action Successful: submit -# Element Should Contain xpath=//*[@id="status_clds"] DISTRIBUTED -# -#Resubmit TCA CL -# Wait Until Element Is Visible xpath=//*[@id="navbar"]/ul/li[2]/a timeout=60 -# Click Element xpath=//*[@id="navbar"]/ul/li[2]/a -# Wait Until Element Is Visible locator=Resubmit timeout=60 -# Click Element locator=Resubmit -# Click Button locator=Yes -# Wait Until Element Is Visible xpath=//*[@id="alert_message_"] timeout=60 -# Element Text Should Be xpath=//*[@id="alert_message_"] expected=Action Successful: resubmit -# Element Should Contain xpath=//*[@id="status_clds"] DISTRIBUTED -# -#Deploy TCA CL -# Wait Until Element Is Visible xpath=//*[@id="navbar"]/ul/li[2]/a timeout=60 -# Click Element xpath=//*[@id="navbar"]/ul/li[2]/a -# Wait Until Element Is Visible locator=Deploy timeout=60 -# Click Element locator=Deploy -## Wait Until Element Is Visible xpath=//*[@id="deployProperties"] timeout=60 -## Input Text xpath=//*[@id="deployProperties"] text={} -# Click Button locator=Deploy -# Click Button locator=Yes -# Wait Until Element Is Visible xpath=//*[@id="alert_message_"] timeout=60 -# Element Text Should Be xpath=//*[@id="alert_message_"] expected=Action Successful: deploy -# Element Should Contain xpath=//*[@id="status_clds"] ACTIVE -# -#Update TCA CL -# Wait Until Element Is Visible xpath=//*[@id="navbar"]/ul/li[2]/a timeout=60 -# Click Element xpath=//*[@id="navbar"]/ul/li[2]/a -# Wait Until Element Is Visible locator=Update timeout=60 -# Click Element locator=Update -# Click Button locator=Yes -# Wait Until Element Is Visible xpath=//*[@id="alert_message_"] timeout=60 -# Element Text Should Be xpath=//*[@id="alert_message_"] expected=Action Successful: update -# Element Should Contain xpath=//*[@id="status_clds"] ACTIVE -# -#Stop TCA CL -# Wait Until Element Is Visible xpath=//*[@id="navbar"]/ul/li[2]/a timeout=60 -# Click Element xpath=//*[@id="navbar"]/ul/li[2]/a -# Wait Until Element Is Visible locator=Stop timeout=60 -# Click Element locator=Stop -# Click Button locator=Yes -# Wait Until Element Is Visible xpath=//*[@id="alert_message_"] timeout=60 -# Element Text Should Be xpath=//*[@id="alert_message_"] expected=Action Successful: stop -# Element Should Contain xpath=//*[@id="status_clds"] STOPPED -# -#Restart TCA CL -# Wait Until Element Is Visible xpath=//*[@id="navbar"]/ul/li[2]/a timeout=60 -# Click Element xpath=//*[@id="navbar"]/ul/li[2]/a -# Wait Until Element Is Visible locator=Restart timeout=60 -# Click Element locator=Restart -# Click Button locator=Yes -# Wait Until Element Is Visible xpath=//*[@id="alert_message_"] timeout=60 -# Element Text Should Be xpath=//*[@id="alert_message_"] expected=Action Successful: restart -# Element Should Contain xpath=//*[@id="status_clds"] ACTIVE -# -#UnDeploy TCA CL -# Wait Until Element Is Visible xpath=//*[@id="navbar"]/ul/li[2]/a timeout=60 -# Click Element xpath=//*[@id="navbar"]/ul/li[2]/a -# Wait Until Element Is Visible locator=UnDeploy timeout=60 -# Click Element locator=UnDeploy -# Click Button locator=Yes -# Wait Until Element Is Visible xpath=//*[@id="alert_message_"] timeout=60 -# Element Text Should Be xpath=//*[@id="alert_message_"] expected=Action Successful: undeploy -# Element Should Contain xpath=//*[@id="status_clds"] DISTRIBUTED - -Close Browser - Close Browser diff --git a/tests/clamp/UIs/data/TCA_template_properties.yml b/tests/clamp/UIs/data/TCA_template_properties.yml deleted file mode 100644 index 101dc2c0..00000000 --- a/tests/clamp/UIs/data/TCA_template_properties.yml +++ /dev/null @@ -1,82 +0,0 @@ -tosca_definitions_version: cloudify_dsl_1_3 -imports: -- http://www.getcloudify.org/spec/cloudify/3.4/types.yaml -- https://onap.org:8443/repository/solutioning01-mte2-raw/type_files/docker/2.2.0/node-type.yaml -- https://onap.org:8443/repository/solutioning01-mte2-raw/type_files/relationship/1.0.0/node-type.yaml -- http://onap.org:8081/repository/solutioning01-mte2-raw/type_files/dmaap/dmaap_mr.yaml -inputs: - location_id: - type: string - service_id: - type: string -node_templates: - cdap_host_host: - type: dcae.nodes.StreamingAnalytics.SelectedCDAPInfrastructure - properties: - location_id: - get_input: location_id - scn_override: cdap_broker.solutioning-central.dcae.onap.org - interfaces: - cloudify.interfaces.lifecycle: { - } - tca_tca: - type: dcae.nodes.MicroService.cdap - properties: - app_config: - appDescription: DCAE Analytics Threshold Crossing Alert Application - appName: dcae-tca - tcaSubscriberOutputStreamName: TCASubscriberOutputStream - tcaVESAlertsTableName: TCAVESAlertsTable - tcaVESAlertsTableTTLSeconds: '1728000' - tcaVESMessageStatusTableName: TCAVESMessageStatusTable - tcaVESMessageStatusTableTTLSeconds: '86400' - thresholdCalculatorFlowletInstances: '2' - app_preferences: - publisherContentType: application/json - publisherHostName: mrlocal-mtnjftle01.onap.org - publisherHostPort: '3905' - publisherMaxBatchSize: '10' - publisherMaxRecoveryQueueSize: '100000' - publisherPollingInterval: '20000' - publisherProtocol: https - publisherTopicName: org.onap.dcae.dmaap.mtnje2.DcaeTestVESPub - publisherUserName: m00502@tca.af.dcae.onap.org - publisherUserPassword: Te5021abc - subscriberConsumerGroup: OpenDCAE-c12 - subscriberConsumerId: c12 - subscriberContentType: application/json - subscriberHostName: mrlocal-mtnjftle01.onap.org - subscriberHostPort: '3905' - subscriberMessageLimit: '-1' - subscriberPollingInterval: '20000' - subscriberProtocol: https - subscriberTimeoutMS: '-1' - subscriberTopicName: org.onap.dcae.dmaap.mtnje2.DcaeTestVESSub - subscriberUserName: m00502@tca.af.dcae.onap.org - subscriberUserPassword: Te5021abc - tca_policy: null - artifact_name: dcae-analytics-tca - artifact_version: 1.0.0 - connections: - streams_publishes: [ - ] - streams_subscribes: [ - ] - jar_url: http://somejar - location_id: - get_input: location_id - namespace: cdap_tca_hi_lo - programs: - - program_id: TCAVESCollectorFlow - program_type: flows - - program_id: TCADMaaPMRSubscriberWorker - program_type: workers - - program_id: TCADMaaPMRPublisherWorker - program_type: workers - service_component_type: cdap_app_tca - service_id: - get_input: service_id - streamname: TCASubscriberOutputStream - relationships: - - target: cdap_host_host - type: dcae.relationships.component_contained_in
\ No newline at end of file diff --git a/tests/dcaegen2-collectors-hv-ves/testcases/__init__.robot b/tests/dcaegen2-collectors-hv-ves/testcases/__init__.robot index 1e574b0e..92b65cd6 100644 --- a/tests/dcaegen2-collectors-hv-ves/testcases/__init__.robot +++ b/tests/dcaegen2-collectors-hv-ves/testcases/__init__.robot @@ -34,23 +34,14 @@ HV-VES Collector Suites Setup Configure collector ${CONSUL_API_ACCESS}= Get Consul Api Access Url ${HTTP_METHOD_URL} ${CONSUL_CONTAINER_HOST} ${CONSUL_CONTAINER_PORT} ${CONSUL_API_URL}= Catenate SEPARATOR= ${CONSUL_API_ACCESS} ${CONSUL_HV_VES_CONFIGURATION_KEY_PATH} + Set Suite Variable ${CONSUL_API_URL} children=True Publish HV VES Configuration In Consul ${CONSUL_API_URL} ${HV_VES_CONFIGURATION_JSON_FILEPATH} Configure Dcae App - ${DCAE_APP_API_ACCESS}= Get Dcae App Api Access Url ${HTTP_METHOD_URL} ${DCAE_APP_CONTAINER_HOST} ${DCAE_APP_CONTAINER_PORT} - - ${DCAE_APP_API_MESSAGE_RESET_URL}= Catenate SEPARATOR= ${DCAE_APP_API_ACCESS} ${DCAE_APP_API_MESSAGES_RESET_PATH} - Set Suite Variable ${DCAE_APP_API_MESSAGE_RESET_URL} children=True - - ${DCAE_APP_API_MESSAGES_COUNT_URL}= Catenate SEPARATOR= ${DCAE_APP_API_ACCESS} ${DCAE_APP_API_MESSAGES_COUNT_PATH} - Set Suite Variable ${DCAE_APP_API_MESSAGES_COUNT_URL} children=True - - ${DCAE_APP_API_MESSAGES_VALIDATION_URL}= Catenate SEPARATOR= ${DCAE_APP_API_ACCESS} ${DCAE_APP_API_MESSAGES_VALIDATION_PATH} - Set Suite Variable ${DCAE_APP_API_MESSAGES_VALIDATION_URL} children=True - - ${DCAE_APP_API_TOPIC_CONFIGURATION_URL}= Catenate SEPARATOR= ${DCAE_APP_API_ACCESS} ${DCAE_APP_API_TOPIC_CONFIGURATION_PATH} Wait until keyword succeeds 10 sec 5 sec - ... Configure Dcae App Simulator To Consume Messages From Topics ${DCAE_APP_API_TOPIC_CONFIGURATION_URL} ${ROUTED_MESSAGES_TOPIC} + ... Configure Dcae App Simulator To Consume Messages From Topics ${DEFAULT_PERF3GPP_TOPIC},${SECOND_PERF3GPP_TOPIC} + Set Suite Variable ${DEFAULT_PERF3GPP_TOPIC} children=True + Set Suite Variable ${SECOND_PERF3GPP_TOPIC} children=True *** Variables *** @@ -60,15 +51,8 @@ ${CONSUL_CONTAINER_HOST} consul-server ${CONSUL_CONTAINER_PORT} 8500 ${CONSUL_HV_VES_CONFIGURATION_KEY_PATH} /v1/kv/dcae-hv-ves-collector -${DCAE_APP_CONTAINER_HOST} dcae-app-simulator -${DCAE_APP_CONTAINER_PORT} 6063 -${DCAE_APP_API_TOPIC_CONFIGURATION_PATH} /configuration/topics -${DCAE_APP_API_MESSAGES_RESET_PATH} /messages -${DCAE_APP_API_MESSAGES_PATH} /messages/all -${DCAE_APP_API_MESSAGES_COUNT_PATH} ${DCAE_APP_API_MESSAGES_PATH}/count -${DCAE_APP_API_MESSAGES_VALIDATION_PATH} ${DCAE_APP_API_MESSAGES_PATH}/validate - -${ROUTED_MESSAGES_TOPIC} TEST_HV_VES_PERF3GPP +${DEFAULT_PERF3GPP_TOPIC} TEST_HV_VES_PERF3GPP +${SECOND_PERF3GPP_TOPIC} TEST_HV_VES_PERF3GPP_BUT_WITH_EXTRA_WORDS ${HV_VES_RESOURCES} %{WORKSPACE}/tests/dcaegen2-collectors-hv-ves/testcases/resources ${HV_VES_CONFIGURATION_JSON_FILEPATH} ${HV_VES_RESOURCES}/hv-ves-configuration.json diff --git a/tests/dcaegen2-collectors-hv-ves/testcases/authorization.robot b/tests/dcaegen2-collectors-hv-ves/testcases/authorization.robot index 4d13a6bf..537cb8c1 100644 --- a/tests/dcaegen2-collectors-hv-ves/testcases/authorization.robot +++ b/tests/dcaegen2-collectors-hv-ves/testcases/authorization.robot @@ -1,7 +1,7 @@ # ============LICENSE_START======================================================= # csit-dcaegen2-collectors-hv-ves # ================================================================================ -# Copyright (C) 2018 NOKIA +# Copyright (C) 2018-2019 NOKIA # ================================================================================ # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -51,7 +51,7 @@ Authorization Send Messages From xNF Simulators ${XNF_WITH_INVALID_CERTIFICATES} ${XNF_VALID_MESSAGES_REQUEST} Wait until keyword succeeds 60 sec 5 sec - ... Assert Dcae App Consumed ${DCAE_APP_API_MESSAGES_COUNT_URL} ${AMOUNT_0} + ... Assert Dcae App Consumed ${DEFAULT_PERF3GPP_TOPIC} ${AMOUNT_0} Unencrypted connection from client [Documentation] VES-HV Collector should not authorize XNF trying to connect through unencrypted connection @@ -59,7 +59,7 @@ Unencrypted connection from client Send Messages From xNF Simulators ${XNF_WITHOUT_SSL} ${XNF_VALID_MESSAGES_REQUEST} Wait until keyword succeeds 60 sec 5 sec - ... Assert Dcae App Consumed ${DCAE_APP_API_MESSAGES_COUNT_URL} ${AMOUNT_0} + ... Assert Dcae App Consumed ${DEFAULT_PERF3GPP_TOPIC} ${AMOUNT_0} Unencrypted connection on both ends [Documentation] When run without SSL turned on, VES-HV Collector should route all valid messages @@ -68,7 +68,7 @@ Unencrypted connection on both ends Send Messages From xNF Simulators ${XNF_WITHOUT_SSL_CONNECTING_TO_UNENCRYPTED_HV_VES} ${XNF_VALID_MESSAGES_REQUEST} Wait until keyword succeeds 60 sec 5 sec - ... Assert Dcae App Consumed ${DCAE_APP_API_MESSAGES_COUNT_URL} ${AMOUNT_5000} + ... Assert Dcae App Consumed ${DEFAULT_PERF3GPP_TOPIC} ${AMOUNT_5000} *** Variables *** diff --git a/tests/dcaegen2-collectors-hv-ves/testcases/configuration.robot b/tests/dcaegen2-collectors-hv-ves/testcases/configuration.robot new file mode 100644 index 00000000..945cb81e --- /dev/null +++ b/tests/dcaegen2-collectors-hv-ves/testcases/configuration.robot @@ -0,0 +1,83 @@ +# ============LICENSE_START======================================================= +# csit-dcaegen2-collectors-hv-ves +# ================================================================================ +# Copyright (C) 2019 NOKIA +# ================================================================================ +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# ============LICENSE_END========================================================= + +*** Settings *** +Library DcaeAppSimulatorLibrary +Library ConsulLibrary +Library BuiltIn + +Resource resources/common-keywords.robot + +Suite Setup Configuration Changes Suite Setup +Suite Teardown VES-HV Collector Suite Teardown +Test Teardown VES-HV Collector Test Shutdown + +*** Keywords *** +Configuration Changes Suite Setup + Log Started Suite: VES-HV Client Configuration Changes + Configure Single xNF Simulator + Log Suite setup finished + +Change Configuration + [Arguments] ${CONFIGURATION_JSON_FILEPATH} ${MESSAGES_TOPIC} + Publish HV VES Configuration In Consul ${CONSUL_API_URL} ${CONFIGURATION_JSON_FILEPATH} + # Assure configuration fetch in hv-ves + Sleep 10 + +*** Test Cases *** +Configuration change + [Tags] non-critical + [Documentation] VES-HV Collector should adapt to changing configuration + # Given + Change Configuration ${DIFFERENT_TOPIC_CONFIGURATION_JSON_FILEPATH} ${SECOND_PERF3GPP_TOPIC} + + # When + Send Messages From xNF Simulators ${XNF_SIMULATOR} ${XNF_VALID_MESSAGES_REQUEST} + + # Then they are published to this topic + Wait until keyword succeeds 30 sec 3 sec + ... Assert Dcae App Consumed ${SECOND_PERF3GPP_TOPIC} ${AMOUNT_1000} + Assert Dcae App Consumed ${DEFAULT_PERF3GPP_TOPIC} ${AMOUNT_0} + + Log First configuration change assertion passed + Reset DCAE App Simulator ${DEFAULT_PERF3GPP_TOPIC} + Reset DCAE App Simulator ${SECOND_PERF3GPP_TOPIC} + + # Given configuration change + Change Configuration ${HV_VES_CONFIGURATION_JSON_FILEPATH} ${DEFAULT_PERF3GPP_TOPIC} + + # When + Send Messages From xNF Simulators ${XNF_SIMULATOR} ${XNF_VALID_MESSAGES_REQUEST} + + # Then they are published to this topic + Wait until keyword succeeds 30 sec 3 sec + ... Assert Dcae App Consumed ${DEFAULT_PERF3GPP_TOPIC} ${AMOUNT_1000} + Assert Dcae App Consumed ${SECOND_PERF3GPP_TOPIC} ${AMOUNT_0} + + + +*** Variables *** +${AMOUNT_0} 0 +${AMOUNT_1000} 1000 + +${HV_VES_SCENARIOS} %{WORKSPACE}/tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios +${XNF_VALID_MESSAGES_REQUEST} ${HV_VES_SCENARIOS}/configuration-change/xnf-valid-messages-request.json + +${HV_VES_RESOURCES} %{WORKSPACE}/tests/dcaegen2-collectors-hv-ves/testcases/resources +${HV_VES_CONFIGURATION_JSON_FILEPATH} ${HV_VES_RESOURCES}/hv-ves-configuration.json +${DIFFERENT_TOPIC_CONFIGURATION_JSON_FILEPATH} ${HV_VES_RESOURCES}/hv-ves-configuration-with-different-topic.json diff --git a/tests/dcaegen2-collectors-hv-ves/testcases/libraries/DcaeAppSimulatorLibrary.py b/tests/dcaegen2-collectors-hv-ves/testcases/libraries/DcaeAppSimulatorLibrary.py index dd41c6a3..ccad4308 100644 --- a/tests/dcaegen2-collectors-hv-ves/testcases/libraries/DcaeAppSimulatorLibrary.py +++ b/tests/dcaegen2-collectors-hv-ves/testcases/libraries/DcaeAppSimulatorLibrary.py @@ -1,7 +1,7 @@ # ============LICENSE_START======================================================= # csit-dcaegen2-collectors-hv-ves # ================================================================================ -# Copyright (C) 2018 NOKIA +# Copyright (C) 2018-2019 NOKIA # ================================================================================ # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -16,48 +16,56 @@ # limitations under the License. # ============LICENSE_END========================================================= import HttpRequests +from VesHvContainersUtilsLibrary import VesHvContainersUtilsLibrary from robot.api import logger +import json -DCAE_APP_NAME = "DCAE App" +DCAE_APP_NAME = "DCAE App Simulator" + +DCAE_APP_HOST = "dcae-app-simulator" +DCAE_APP_PORT = "6063" +DCAE_APP_ADDRESS = VesHvContainersUtilsLibrary().get_dcae_app_api_access_url("http://", DCAE_APP_HOST, DCAE_APP_PORT) + +TOPIC_CONFIGURATION_PATH = DCAE_APP_ADDRESS + "/configuration/topics" + +MESSAGES_PATH = "/messages/%s" +MESSAGES_RESET_PATH = DCAE_APP_ADDRESS + MESSAGES_PATH +MESSAGES_COUNT_PATH = DCAE_APP_ADDRESS + MESSAGES_PATH + "/count" +MESSAGES_VALIDATION_PATH = DCAE_APP_ADDRESS + MESSAGES_PATH + "/validate" class DcaeAppSimulatorLibrary: - def configure_dcae_app_simulator_to_consume_messages_from_topics(self, app_url, topics): - logger.info("PUT at: " + app_url) - resp = HttpRequests.session_without_env().put(app_url, data={'topics': topics}, timeout=10) + def configure_dcae_app_simulator_to_consume_messages_from_topics(self, topics): + app_url = TOPIC_CONFIGURATION_PATH + logger.info("PUT " + str(topics) + " at: " + app_url) + resp = HttpRequests.session_without_env().put(app_url, data=self.not_escaped(topics), timeout=10) HttpRequests.checkStatusCode(resp.status_code, DCAE_APP_NAME) - def assert_DCAE_app_consumed(self, app_url, expected_messages_amount): - logger.info("GET at: " + app_url) + def not_escaped(self, data): + return json.dumps(data) + + def assert_DCAE_app_consumed(self, topic, expected_messages_amount): + app_url = MESSAGES_COUNT_PATH % topic + logger.info("GET at: " + str(app_url)) resp = HttpRequests.session_without_env().get(app_url, timeout=10) HttpRequests.checkStatusCode(resp.status_code, DCAE_APP_NAME) assert int(resp.content) == int(expected_messages_amount), \ "Messages consumed by simulator: " + str(resp.content) + " expecting: " + str(expected_messages_amount) - def assert_DCAE_app_consumed_less_equal_than(self, app_url, messages_threshold): - logger.info("GET at: " + app_url) - resp = HttpRequests.session_without_env().get(app_url, timeout=10) - HttpRequests.checkStatusCode(resp.status_code, DCAE_APP_NAME) - - logger.debug("Messages consumed by simulator: " + resp.content + - " expecting more than 0 and less/equal than " + messages_threshold) - - assert 0 < int(resp.content) <= int(messages_threshold), \ - "Messages consumed by simulator: " + str(resp.content) + \ - " expecting more than 0 and less/equal than " + str(messages_threshold) - - def reset_DCAE_app_simulator(self, app_url): + def reset_DCAE_app_simulator(self, topic): + app_url = MESSAGES_RESET_PATH % topic logger.info("DELETE at: " + app_url) resp = HttpRequests.session_without_env().delete(app_url, timeout=10) HttpRequests.checkStatusCode(resp.status_code, DCAE_APP_NAME) - def assert_DCAE_app_consumed_proper_messages(self, app_url, message_filepath): - logger.info("POST at: " + app_url) + def assert_DCAE_app_consumed_proper_messages(self, topic, message_filepath): + app_url = MESSAGES_VALIDATION_PATH % topic file = open(message_filepath, "rb") data = file.read() file.close() + logger.info("POST " + str(data) + "at: " + app_url) resp = HttpRequests.session_without_env().post(app_url, data=data, timeout=10) HttpRequests.checkStatusCode(resp.status_code, DCAE_APP_NAME) diff --git a/tests/dcaegen2-collectors-hv-ves/testcases/libraries/HttpRequests.py b/tests/dcaegen2-collectors-hv-ves/testcases/libraries/HttpRequests.py index 4aa55d6c..48205f2a 100644 --- a/tests/dcaegen2-collectors-hv-ves/testcases/libraries/HttpRequests.py +++ b/tests/dcaegen2-collectors-hv-ves/testcases/libraries/HttpRequests.py @@ -33,4 +33,4 @@ def session_without_env(): def checkStatusCode(status_code, server_name): if status_code not in valid_status_codes: logger.error("Response status code from " + server_name + ": " + str(status_code)) - raise (Exception(server_name + " returned status code " + status_code)) + raise (Exception(server_name + " returned status code " + str(status_code))) diff --git a/tests/dcaegen2-collectors-hv-ves/testcases/libraries/XnfSimulatorLibrary.py b/tests/dcaegen2-collectors-hv-ves/testcases/libraries/XnfSimulatorLibrary.py index 789c0b69..ea225c53 100644 --- a/tests/dcaegen2-collectors-hv-ves/testcases/libraries/XnfSimulatorLibrary.py +++ b/tests/dcaegen2-collectors-hv-ves/testcases/libraries/XnfSimulatorLibrary.py @@ -158,8 +158,9 @@ class XnfSimulator: cert_name_prefix = "" if should_use_valid_certs else "untrusted" certificates_path_with_file_prefix = COLLECTOR_CERTS_LOOKUP_DIR + cert_name_prefix self.key_store_path = certificates_path_with_file_prefix + "client.p12" + self.key_store_passwd_path = certificates_path_with_file_prefix + "client.pass" self.trust_store_path = certificates_path_with_file_prefix + "trust.p12" - self.sec_store_passwd = "onaponap" + self.trust_store_passwd_path = certificates_path_with_file_prefix + "trust.pass" self.disable_ssl = should_disable_ssl self.hv_collector_host = UNENCRYPTED_HV_VES_SERVICE_NAME \ if should_connect_to_unencrypted_hv_ves else HV_VES_SERVICE_NAME @@ -171,8 +172,8 @@ class XnfSimulator: "--ves-port", "6061", "--key-store", self.key_store_path, "--trust-store", self.trust_store_path, - "--key-store-password", self.sec_store_passwd, - "--trust-store-password", self.sec_store_passwd] + "--key-store-password-file", self.key_store_passwd_path, + "--trust-store-password-file", self.trust_store_passwd_path] if self.disable_ssl: startup_command.append("--ssl-disable") return startup_command diff --git a/tests/dcaegen2-collectors-hv-ves/testcases/message-routing.robot b/tests/dcaegen2-collectors-hv-ves/testcases/message-routing.robot index 985c3793..40923aab 100644 --- a/tests/dcaegen2-collectors-hv-ves/testcases/message-routing.robot +++ b/tests/dcaegen2-collectors-hv-ves/testcases/message-routing.robot @@ -42,8 +42,8 @@ Correct Messages Routing Send Messages From xNF Simulators ${XNF_SIMULATOR} ${XNF_FIXED_PAYLOAD_REQUEST} Wait until keyword succeeds 60 sec 5 sec - ... Assert Dcae App Consumed ${DCAE_APP_API_MESSAGES_COUNT_URL} ${AMOUNT_25000} - Assert Dcae App Consumed Proper Messages ${DCAE_APP_API_MESSAGES_VALIDATION_URL} ${DCAE_FIXED_PAYLOAD_REQUEST} + ... Assert Dcae App Consumed ${DEFAULT_PERF3GPP_TOPIC} ${AMOUNT_25000} + Assert Dcae App Consumed Proper Messages ${DEFAULT_PERF3GPP_TOPIC} ${DCAE_FIXED_PAYLOAD_REQUEST} Too big payload message handling @@ -52,8 +52,8 @@ Too big payload message handling Send Messages From xNF Simulators ${XNF_SIMULATOR} ${XNF_TOO_BIG_PAYLOAD_REQUEST} Wait until keyword succeeds 60 sec 5 sec - ... Assert Dcae App Consumed ${DCAE_APP_API_MESSAGES_COUNT_URL} ${AMOUNT_25000} - Assert Dcae App Consumed Proper Messages ${DCAE_APP_API_MESSAGES_VALIDATION_URL} ${DCAE_TOO_BIG_PAYLOAD_REQUEST} + ... Assert Dcae App Consumed ${DEFAULT_PERF3GPP_TOPIC} ${AMOUNT_25000} + Assert Dcae App Consumed Proper Messages ${DEFAULT_PERF3GPP_TOPIC} ${DCAE_TOO_BIG_PAYLOAD_REQUEST} Invalid wire frame message handling @@ -62,8 +62,8 @@ Invalid wire frame message handling Send Messages From xNF Simulators ${XNF_SIMULATOR} ${XNF_INVALID_WIRE_FRAME_REQUEST} Wait until keyword succeeds 60 sec 5 sec - ... Assert Dcae App Consumed ${DCAE_APP_API_MESSAGES_COUNT_URL} ${AMOUNT_50000} - Assert Dcae App Consumed Proper Messages ${DCAE_APP_API_MESSAGES_VALIDATION_URL} ${DCAE_INVALID_WIRE_FRAME_REQUEST} + ... Assert Dcae App Consumed ${DEFAULT_PERF3GPP_TOPIC} ${AMOUNT_50000} + Assert Dcae App Consumed Proper Messages ${DEFAULT_PERF3GPP_TOPIC} ${DCAE_INVALID_WIRE_FRAME_REQUEST} Invalid GPB data message handling @@ -72,8 +72,8 @@ Invalid GPB data message handling Send Messages From xNF Simulators ${XNF_SIMULATOR} ${XNF_INVALID_GPB_DATA_REQUEST} Wait until keyword succeeds 60 sec 5 sec - ... Assert Dcae App Consumed ${DCAE_APP_API_MESSAGES_COUNT_URL} ${AMOUNT_50000} - Assert Dcae App Consumed Proper Messages ${DCAE_APP_API_MESSAGES_VALIDATION_URL} ${DCAE_INVALID_GPB_DATA_REQUEST} + ... Assert Dcae App Consumed ${DEFAULT_PERF3GPP_TOPIC} ${AMOUNT_50000} + Assert Dcae App Consumed Proper Messages ${DEFAULT_PERF3GPP_TOPIC} ${DCAE_INVALID_GPB_DATA_REQUEST} Unsupported domain message handling @@ -82,8 +82,8 @@ Unsupported domain message handling Send Messages From xNF Simulators ${XNF_SIMULATOR} ${XNF_UNSUPPORTED_DOMAIN_REQUEST} Wait until keyword succeeds 60 sec 5 sec - ... Assert Dcae App Consumed ${DCAE_APP_API_MESSAGES_COUNT_URL} ${AMOUNT_50000} - Assert Dcae App Consumed Proper Messages ${DCAE_APP_API_MESSAGES_VALIDATION_URL} ${DCAE_UNSUPPORTED_DOMAIN_REQUEST} + ... Assert Dcae App Consumed ${DEFAULT_PERF3GPP_TOPIC} ${AMOUNT_50000} + Assert Dcae App Consumed Proper Messages ${DEFAULT_PERF3GPP_TOPIC} ${DCAE_UNSUPPORTED_DOMAIN_REQUEST} *** Variables *** ${HTTP_METHOD_URL} http:// diff --git a/tests/dcaegen2-collectors-hv-ves/testcases/multiple-clients.robot b/tests/dcaegen2-collectors-hv-ves/testcases/multiple-clients.robot index 735a2085..109ec469 100644 --- a/tests/dcaegen2-collectors-hv-ves/testcases/multiple-clients.robot +++ b/tests/dcaegen2-collectors-hv-ves/testcases/multiple-clients.robot @@ -1,7 +1,7 @@ # ============LICENSE_START======================================================= # csit-dcaegen2-collectors-hv-ves # ================================================================================ -# Copyright (C) 2018 NOKIA +# Copyright (C) 2018-2019 NOKIA # ================================================================================ # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -40,8 +40,8 @@ Handle Multiple Connections Send Messages From xNF Simulators ${SIMULATORS_LIST} ${XNF_SMALLER_PAYLOAD_REQUEST} Wait until keyword succeeds 60 sec 5 sec - ... Assert Dcae App Consumed ${DCAE_APP_API_MESSAGES_COUNT_URL} ${AMOUNT_15000} - Assert Dcae App Consumed Proper Messages ${DCAE_APP_API_MESSAGES_VALIDATION_URL} ${DCAE_SMALLER_PAYLOAD_REQUEST} + ... Assert Dcae App Consumed ${DEFAULT_PERF3GPP_TOPIC} ${AMOUNT_15000} + Assert Dcae App Consumed Proper Messages ${DEFAULT_PERF3GPP_TOPIC} ${DCAE_SMALLER_PAYLOAD_REQUEST} *** Variables *** diff --git a/tests/dcaegen2-collectors-hv-ves/testcases/resources/common-keywords.robot b/tests/dcaegen2-collectors-hv-ves/testcases/resources/common-keywords.robot index 07e886a0..fee8bfd8 100644 --- a/tests/dcaegen2-collectors-hv-ves/testcases/resources/common-keywords.robot +++ b/tests/dcaegen2-collectors-hv-ves/testcases/resources/common-keywords.robot @@ -60,7 +60,8 @@ Send Messages From xNF Simulators VES-HV Collector Test Shutdown - Reset DCAE App Simulator ${DCAE_APP_API_MESSAGE_RESET_URL} + Reset DCAE App Simulator ${DEFAULT_PERF3GPP_TOPIC} + Reset DCAE App Simulator ${SECOND_PERF3GPP_TOPIC} VES-HV Collector Suite Teardown diff --git a/tests/dcaegen2-collectors-hv-ves/testcases/resources/hv-ves-configuration-with-different-topic.json b/tests/dcaegen2-collectors-hv-ves/testcases/resources/hv-ves-configuration-with-different-topic.json new file mode 100644 index 00000000..d3d1f4c3 --- /dev/null +++ b/tests/dcaegen2-collectors-hv-ves/testcases/resources/hv-ves-configuration-with-different-topic.json @@ -0,0 +1,12 @@ +{ + "streams_publishes": { + "perf3gpp": { + "type": "kafka", + "kafka_info": { + "bootstrap_servers": "kafka:9092", + "topic_name": "TEST_HV_VES_PERF3GPP_BUT_WITH_EXTRA_WORDS" + } + } + } +} + diff --git a/tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/configuration-change/xnf-valid-messages-request.json b/tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/configuration-change/xnf-valid-messages-request.json new file mode 100644 index 00000000..adbcf2ab --- /dev/null +++ b/tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/configuration-change/xnf-valid-messages-request.json @@ -0,0 +1,24 @@ +[ + { + "commonEventHeader": { + "version": "sample-version", + "domain": "perf3gpp", + "sequence": 1, + "priority": 1, + "eventId": "sample-event-id", + "eventName": "sample-event-name", + "eventType": "sample-event-type", + "startEpochMicrosec": 120034455, + "lastEpochMicrosec": 120034455, + "nfNamingCode": "sample-nf-naming-code", + "nfcNamingCode": "sample-nfc-naming-code", + "reportingEntityId": "sample-reporting-entity-id", + "reportingEntityName": "sample-reporting-entity-name", + "sourceId": "sample-source-id", + "sourceName": "sample-source-name", + "vesEventListenerVersion": "7.2.0" + }, + "messageType": "VALID", + "messagesAmount": 1000 + } +]
\ No newline at end of file diff --git a/tests/dcaegen2-collectors-restconf/testcases/__init__.robot b/tests/dcaegen2-collectors-restconf/testcases/__init__.robot new file mode 100644 index 00000000..e69de29b --- /dev/null +++ b/tests/dcaegen2-collectors-restconf/testcases/__init__.robot diff --git a/tests/dcaegen2-collectors-restconf/testcases/dcae_rcc.robot b/tests/dcaegen2-collectors-restconf/testcases/dcae_rcc.robot new file mode 100644 index 00000000..74171472 --- /dev/null +++ b/tests/dcaegen2-collectors-restconf/testcases/dcae_rcc.robot @@ -0,0 +1,23 @@ +*** Settings *** +Documentation Testing DCAE Restconf Listener with various event feeds from VoLTE, vDNS, vFW and cCPE use scenarios +Library RequestsLibrary +Library OperatingSystem +Library Collections +Library DcaeLibrary +Resource ./resources/dcae_keywords.robot +Resource ../../common.robot +Test Setup Init RCC +Suite Setup Run keywords Create rcc sessions Create rcc header +Suite Teardown teardown rcc + +*** Variables *** +${RCC_URL_HTTPS} https://%{RCC_IP}:8443 +${RCC_URL} http://%{RCC_IP}:8080 + +*** Test Cases *** +Restconf Collector Health Check + [Tags] DCAE-RCC-R1 + [Documentation] Restconf Collector Health Check + ${headers}= Create Dictionary Accept=*/* + ${resp}= Get Request ${suite_dcae_rcc_url_session} /healthcheck headers=${headers} + Should Be Equal As Strings ${resp.status_code} 200 diff --git a/tests/dcaegen2-collectors-restconf/testcases/resources/DcaeLibrary.py b/tests/dcaegen2-collectors-restconf/testcases/resources/DcaeLibrary.py new file mode 100644 index 00000000..d4848746 --- /dev/null +++ b/tests/dcaegen2-collectors-restconf/testcases/resources/DcaeLibrary.py @@ -0,0 +1,20 @@ +from robot.api import logger +import time + +class DcaeLibrary(object): + + def __init__(self): + pass + + @staticmethod + def init_rcc(): + logger.console("RestConf collector init and cleanup are done") + return "true" + + @staticmethod + def teardown_rcc(): + logger.console("RestConf collector teardown done") + return "true" + +if __name__ == '__main__': + time.sleep(100000) diff --git a/tests/dcaegen2-collectors-restconf/testcases/resources/dcae_keywords.robot b/tests/dcaegen2-collectors-restconf/testcases/resources/dcae_keywords.robot new file mode 100644 index 00000000..172210f6 --- /dev/null +++ b/tests/dcaegen2-collectors-restconf/testcases/resources/dcae_keywords.robot @@ -0,0 +1,23 @@ +*** Settings *** +Documentation The main interface for interacting with DCAE. It handles low level stuff like managing the http request library and DCAE required fields +Library RequestsLibrary +Library DcaeLibrary +Library OperatingSystem +Library Collections +Resource ../resources/dcae_properties.robot + +*** Variables *** +${DCAE_HEALTH_CHECK_BODY} %{WORKSPACE}/tests/dcae/testcases/assets/json_events/dcae_healthcheck.json + +*** Keywords *** +Create rcc sessions + [Documentation] Create all required sessions + Create Session dcae_rcc_url ${RCC_URL} + Set Suite Variable ${suite_dcae_rcc_url_session} dcae_rcc_url + ${auth}= Create List ${RCC_HTTPS_USER} ${RCC_HTTPS_PD} + Create Session dcae_rcc_url_https ${RCC_URL_HTTPS} auth=${auth} disable_warnings=1 + Set Suite Variable ${suite_dcae_rcc_url_https_session} dcae_rcc_url_https + +Create rcc header + ${headers}= Create Dictionary Content-Type=application/json + Set Suite Variable ${suite_headers} ${headers} diff --git a/tests/dcaegen2-collectors-restconf/testcases/resources/dcae_properties.robot b/tests/dcaegen2-collectors-restconf/testcases/resources/dcae_properties.robot new file mode 100644 index 00000000..3ba7690c --- /dev/null +++ b/tests/dcaegen2-collectors-restconf/testcases/resources/dcae_properties.robot @@ -0,0 +1,14 @@ +*** Settings *** +Documentation store all properties that can change or are used in multiple places here +... format is all caps with underscores between words and prepended with GLOBAL +... make sure you prepend them with GLOBAL so that other files can easily see it is from this file. + +*** Variables *** +${GLOBAL_APPLICATION_ID} robot-dcaegen2 +${GLOBAL_DCAE_CONSUL_URL} http://135.205.228.129:8500 +${GLOBAL_DCAE_CONSUL_URL1} http://135.205.228.170:8500 +${GLOBAL_DCAE_VES_URL} http://localhost:8443/eventlistener/v5 +${GLOBAL_DCAE_USERNAME} console +${GLOBAL_DCAE_PASSWORD} ZjJkYjllMjljMTI2M2Iz +${RCC_HTTPS_USER} sample1 +${RCC_HTTPS_PD} sample1 diff --git a/tests/dcaegen2-collectors-restconf/testcases/resources/index.htm b/tests/dcaegen2-collectors-restconf/testcases/resources/index.htm new file mode 100644 index 00000000..5ab2f8a4 --- /dev/null +++ b/tests/dcaegen2-collectors-restconf/testcases/resources/index.htm @@ -0,0 +1 @@ +Hello
\ No newline at end of file diff --git a/tests/dcaegen2-pmmapper/pmmapper/assets/.gitattributes b/tests/dcaegen2-pmmapper/pmmapper/assets/.gitattributes new file mode 100644 index 00000000..57cdc503 --- /dev/null +++ b/tests/dcaegen2-pmmapper/pmmapper/assets/.gitattributes @@ -0,0 +1 @@ +*.gz binary diff --git a/tests/dcaegen2-pmmapper/pmmapper/assets/A20181002.0000-1000-0015-1000_5G.xml b/tests/dcaegen2-pmmapper/pmmapper/assets/A20181002.0000-1000-0015-1000_5G.xml index 4d20d4b4..fadc8a65 100644 --- a/tests/dcaegen2-pmmapper/pmmapper/assets/A20181002.0000-1000-0015-1000_5G.xml +++ b/tests/dcaegen2-pmmapper/pmmapper/assets/A20181002.0000-1000-0015-1000_5G.xml @@ -47,9 +47,9 @@ xsi:schemaLocation="http://www.3gpp.org/ftp/specs/archive/32_series/32.435#measC <measType p="4">succImmediateAssignProcs4</measType> <measValue measObjLdn="ManagedElement=RNC-Gbg-1,ENodeBFunction=1"> <r p="1">4</r> - <r p="12">86,87,2,6,77,96,75,33,24</r> - <r p="13">40</r> - <r p="14">90</r> + <r p="2">86,87,2,6,77,96,75,33,24</r> + <r p="3">40</r> + <r p="4">90</r> <suspect>false</suspect> </measValue> </measInfo> diff --git a/tests/dcaegen2-pmmapper/pmmapper/assets/A20181002.0000-1000-0015-1000_5G.xml.gz b/tests/dcaegen2-pmmapper/pmmapper/assets/A20181002.0000-1000-0015-1000_5G.xml.gz Binary files differnew file mode 100644 index 00000000..32865fc1 --- /dev/null +++ b/tests/dcaegen2-pmmapper/pmmapper/assets/A20181002.0000-1000-0015-1000_5G.xml.gz diff --git a/tests/dcaegen2-pmmapper/pmmapper/assets/pm_filter_config.json b/tests/dcaegen2-pmmapper/pmmapper/assets/pm_filter_config.json index 544b6980..1e3604f6 100644 --- a/tests/dcaegen2-pmmapper/pmmapper/assets/pm_filter_config.json +++ b/tests/dcaegen2-pmmapper/pmmapper/assets/pm_filter_config.json @@ -2,9 +2,9 @@ "pm-mapper-filter": { "filters":[{ "pmDefVsn": "1.0", - "nfType": "5G", + "nfType": "gnb", "vendor": "Ericsson", - "measTypes": ["attTCHSeizures","succImmediateAssignProcs"] + "measTypes": ["attTCHSeizures","succTCHSeizures2","succImmediateAssignProcs8"] }] }, "streams_subscribes": { @@ -14,7 +14,7 @@ "aaf_password": null, "dmaap_info": { "location": "csit-pmmapper", - "delivery_url": "http://dcae-pm-mapper.onap.svc.cluster.local:8081/delivery", + "delivery_url": "http://dcae-pm-mapper:8081/delivery", "username": "username", "password": "password", "subscriber_id": "1" @@ -38,8 +38,8 @@ "dmaap_dr_delete_endpoint": "https://dmaap-dr-node:8443/delete", "services_calls": {}, "enable_http": true, - "key_store_path": "/opt/app/pm-mapper/etc/cert/cert.jks.b64", - "key_store_pass_path": "/opt/app/pm-mapper/etc/cert/jks.pass", - "trust_store_path": "/opt/app/pm-mapper/etc/cert/trust.jks.b64", - "trust_store_pass_path": "/opt/app/pm-mapper/etc/cert/trust.pass" + "key_store_path": "/opt/app/pm-mapper/etc/cert.jks.b64", + "key_store_pass_path": "/opt/app/pm-mapper/etc/jks.pass", + "trust_store_path": "/opt/app/pm-mapper/etc/trust.jks.b64", + "trust_store_pass_path": "/opt/app/pm-mapper/etc/trust.pass" }
\ No newline at end of file diff --git a/tests/dcaegen2-pmmapper/pmmapper/assets/vendor_filter_config.json b/tests/dcaegen2-pmmapper/pmmapper/assets/vendor_filter_config.json index 64fefa48..cbb313d0 100644 --- a/tests/dcaegen2-pmmapper/pmmapper/assets/vendor_filter_config.json +++ b/tests/dcaegen2-pmmapper/pmmapper/assets/vendor_filter_config.json @@ -1,5 +1,5 @@ { - "pm-mapper-filter": { + "pm-mapper-filter": { "filters":[{ "pmDefVsn": "1.0", "nfType": "gnb", @@ -14,7 +14,7 @@ "aaf_password": null, "dmaap_info": { "location": "csit-pmmapper", - "delivery_url": "http://dcae-pm-mapper.onap.svc.cluster.local:8081/delivery", + "delivery_url": "http://dcae-pm-mapper:8081/delivery", "username": "username", "password": "password", "subscriber_id": "1" @@ -38,8 +38,8 @@ "dmaap_dr_delete_endpoint": "https://dmaap-dr-node:8443/delete", "services_calls": {}, "enable_http": true, - "key_store_path": "/opt/app/pm-mapper/etc/cert/cert.jks.b64", - "key_store_pass_path": "/opt/app/pm-mapper/etc/cert/jks.pass", - "trust_store_path": "/opt/app/pm-mapper/etc/cert/trust.jks.b64", - "trust_store_pass_path": "/opt/app/pm-mapper/etc/cert/trust.pass" + "key_store_path": "/opt/app/pm-mapper/etc/cert.jks.b64", + "key_store_pass_path": "/opt/app/pm-mapper/etc/jks.pass", + "trust_store_path": "/opt/app/pm-mapper/etc/trust.jks.b64", + "trust_store_pass_path": "/opt/app/pm-mapper/etc/trust.pass" }
\ No newline at end of file diff --git a/tests/dcaegen2-pmmapper/pmmapper/pmmapper.robot b/tests/dcaegen2-pmmapper/pmmapper/pmmapper.robot index 5d217513..a103c5cc 100644 --- a/tests/dcaegen2-pmmapper/pmmapper/pmmapper.robot +++ b/tests/dcaegen2-pmmapper/pmmapper/pmmapper.robot @@ -21,20 +21,17 @@ ${NO_MANAGED_ELEMENT_PATH} %{WORKSPACE}/tests/dcaegen2-pmmapper/pm ${NO_MEASDATA_PATH} %{WORKSPACE}/tests/dcaegen2-pmmapper/pmmapper/assets/A_no_measdata.xml ${VALID_METADATA_PATH} %{WORKSPACE}/tests/dcaegen2-pmmapper/pmmapper/assets/valid_metadata.json ${DIFF_VENDOR_METADATA} %{WORKSPACE}/tests/dcaegen2-pmmapper/pmmapper/assets/diff_vendor_metadata.json -${CLI_EXEC_CLI_PM_LOG} docker exec pmmapper /bin/sh -c "tail -10 /var/log/ONAP/dcaegen2/services/pm-mapper/pm-mapper_output.log" +${NON_XML_FILE} %{WORKSPACE}/tests/dcaegen2-pmmapper/pmmapper/assets/diff_vendor_metadata.json +${CLI_EXEC_CLI_PM_LOG} docker exec pmmapper /bin/sh -c "tail -15 /var/log/ONAP/dcaegen2/services/pm-mapper/pm-mapper_output.log" ${PUBLISH_NODE_URL} https://${DR_NODE_IP}:8443/publish/1 ${TYPE-A_PM_DATA_FILE_PATH} %{WORKSPACE}/tests/dcaegen2-pmmapper/pmmapper/assets/A20181002.0000-1000-0015-1000_5G.xml ${TYPE-C_PM_DATA_FILE_PATH} %{WORKSPACE}/tests/dcaegen2-pmmapper/pmmapper/assets/C20190328.0000-0015.xml -${PUBLISH_CONTENT_TYPE} application/octet-stream ${CLI_EXEC_VENDOR_FILTER} curl 'http://${CONSUL_IP}:8500/v1/kv/pmmapper?dc=dc1' -X PUT -H 'Accept: application/^Con' -H 'Content-Type: application/json' -H 'X-Requested-With: XMLHttpRequest' --data @$WORKSPACE/tests/dcaegen2-pmmapper/pmmapper/assets/vendor_filter_config.json ${CLI_EXEC_PM_FILTER} curl 'http://${CONSUL_IP}:8500/v1/kv/pmmapper?dc=dc1' -X PUT -H 'Accept: application/^Con' -H 'Content-Type: application/json' -H 'X-Requested-With: XMLHttpRequest' --data @$WORKSPACE/tests/dcaegen2-pmmapper/pmmapper/assets/pm_filter_config.json -${CLI_RESTART_PMMAPPER} docker restart pmmapper -${CLI_DELETE_SUB1} curl -i -X DELETE -H "Content-Type:application/vnd.dmaap-dr.subscription" -H "X-DMAAP-DR-ON-BEHALF-OF:DGL" -k https://localhost:8443/subs/1 -${CLI_DELETE_SUB2} curl -i -X DELETE -H "Content-Type:application/vnd.dmaap-dr.subscription" -H "X-DMAAP-DR-ON-BEHALF-OF:DGL" -k https://localhost:8443/subs/2 -${CLI_MESSAGE_ROUTER_TOPIC} curl http://${DMAAP_MR_IP}:3904/events/PM_MAPPER/CG1/C1?timeout=1000 -${CLI_MR_EVENT_COUNT} curl http://${DMAAP_MR_IP}:3904/events/PM_MAPPER/CG1/C1?timeout=1000 | egrep -o 'measInfoId1|measInfoId2|measInfoId3' > /tmp/mr.log +${CLI_MESSAGE_ROUTER_TOPIC} curl http://${DMAAP_MR_IP}:3904/events/PM_MAPPER/CG1/C1?timeout=1000 > /tmp/mr.log ${CLI_MR_LOG} cat /tmp/mr.log + *** Test Cases *** Verify PM Mapper Receive Configuraton From Config Binding Service [Tags] PM_MAPPER_01 @@ -68,43 +65,55 @@ Verify 3GPP PM Mapper responds appropriately when invalid metadata is provided VerifyResponse ${resp.content} Malformed Metadata. CheckLog ${CLI_EXEC_CLI_PM_LOG} RequestID=2 -Verify 3GPP PM Mapper maps Type-A file and publish 3gpp perf VES evnets to message router +Verify that PM Mapper logs successful when a file that contains no measdata is provided [Tags] PM_MAPPER_05 - [Documentation] Verify 3GPP PM Mapper maps Type-A file and publish 3gpp perf VES evnets to message router. + [Documentation] Verify that PM Mapper logs successful when a file that contains no measdata is provided [Timeout] 1 minute - SendToDatarouter ${TYPE-A_PM_DATA_FILE_PATH} ${VALID_METADATA_PATH} X-ONAP-RequestID=3 - CheckLog ${CLI_EXEC_CLI_PM_LOG} Successfully published VES events to messagerouter + SendToDatarouter ${NO_MEASDATA_PATH} ${VALID_METADATA_PATH} X-ONAP-RequestID=3 + CheckLog ${CLI_EXEC_CLI_PM_LOG} MeasData is empty CheckLog ${CLI_EXEC_CLI_PM_LOG} RequestID=3 - Sleep 10s - CheckLog ${CLI_MESSAGE_ROUTER_TOPIC} perf3gpp_gnb-Ericsson_pmMeasResult -Verify that PM Mapper maps Type-C xml file and publish 3gpp perf VES evnets to message router. +Verify that PM Mapper throws Event failed validation against schema error when no managed element content is provided [Tags] PM_MAPPER_06 - [Documentation] Verify that PM Mapper maps Type-C xml file and publish 3gpp perf VES evnets to message router. + [Documentation] Verify 3gpp pm mapper responds with an error when no managed element content is provided [Timeout] 1 minute - SendToDatarouter ${TYPE-C_PM_DATA_FILE_PATH} ${VALID_METADATA_PATH} X-ONAP-RequestID=4 - CheckLog ${CLI_EXEC_CLI_PM_LOG} Successfully published VES events to messagerouter + SendToDatarouter ${NO_MANAGED_ELEMENT_PATH} ${VALID_METADATA_PATH} X-ONAP-RequestID=4 + CheckLog ${CLI_EXEC_CLI_PM_LOG} XML validation failed CheckLog ${CLI_EXEC_CLI_PM_LOG} RequestID=4 - Run Process ${CLI_MR_EVENT_COUNT} shell=yes - CheckLog ${CLI_MR_LOG} measInfoId1 - CheckLog ${CLI_MR_LOG} measInfoId2 - CheckLog ${CLI_MR_LOG} measInfoId3 -Verify that PM Mapper logs successful when a file that contains no measdata is provided +Verify that PM Mapper maps Type-C xml file and publish 3gpp perf VES evnets to message router [Tags] PM_MAPPER_07 - [Documentation] Verify that PM Mapper logs successful when a file that contains no measdata is provided + [Documentation] Verify that PM Mapper maps Type-C xml file and publish 3gpp perf VES evnets to message router. [Timeout] 1 minute - SendToDatarouter ${NO_MEASDATA_PATH} ${VALID_METADATA_PATH} X-ONAP-RequestID=5 - CheckLog ${CLI_EXEC_CLI_PM_LOG} MeasData is empty + SendToDatarouter ${TYPE-C_PM_DATA_FILE_PATH} ${VALID_METADATA_PATH} X-ONAP-RequestID=5 + CheckLog ${CLI_EXEC_CLI_PM_LOG} Successfully published VES events to messagerouter CheckLog ${CLI_EXEC_CLI_PM_LOG} RequestID=5 + Run Process ${CLI_MESSAGE_ROUTER_TOPIC} shell=yes + CheckLog ${CLI_MR_LOG} measInfoId1 + CheckLog ${CLI_MR_LOG} measInfoId2 + CheckLog ${CLI_MR_LOG} measInfoId3 -Verify that PM Mapper throws Event failed validation against schema error when no managed element content is provided +Verify 3GPP PM Mapper maps Type-A file based on counter filtering and publish 3gpp perf VES evnets to message router [Tags] PM_MAPPER_08 - [Documentation] Verify 3gpp pm mapper responds with an error when no managed element content is provided + [Documentation] Verify 3GPP PM Mapper maps Type-A file and publish 3gpp perf VES evnets to message router. [Timeout] 1 minute - SendToDatarouter ${NO_MANAGED_ELEMENT_PATH} ${VALID_METADATA_PATH} X-ONAP-RequestID=6 - CheckLog ${CLI_EXEC_CLI_PM_LOG} XML validation failed + ${cli_cmd_output}= Run Process ${CLI_EXEC_PM_FILTER} shell=yes + ${resp}= Get Request mapper_session ${RECONFIGURE_ENDPOINT} + Sleep 5s + SendToDatarouter ${TYPE-A_PM_DATA_FILE_PATH} ${VALID_METADATA_PATH} X-ONAP-RequestID=6 + CheckLog ${CLI_EXEC_CLI_PM_LOG} Successfully published VES events to messagerouter CheckLog ${CLI_EXEC_CLI_PM_LOG} RequestID=6 + Run Process ${CLI_MESSAGE_ROUTER_TOPIC} shell=yes + CheckLog ${CLI_MR_LOG} attTCHSeizures + CheckLog ${CLI_MR_LOG} 234 + CheckLog ${CLI_MR_LOG} 890 + CheckLog ${CLI_MR_LOG} 456 + CheckLog ${CLI_MR_LOG} succTCHSeizures2 + CheckLog ${CLI_MR_LOG} 86,87,2,6,77,96,75,33,24 + CheckLog ${CLI_MR_LOG} succImmediateAssignProcs8 + CheckLog ${CLI_MR_LOG} 787 + CheckLog ${CLI_MR_LOG} 238 + CheckLog ${CLI_MR_LOG} 785 Verify that PM Mapper correctly identifies a file that should not be mapped based on metadata filtering. [Tags] PM_MAPPER_09 @@ -118,6 +127,15 @@ Verify that PM Mapper correctly identifies a file that should not be mapped base CheckLog ${CLI_EXEC_CLI_PM_LOG} Metadata does not match any filters CheckLog ${CLI_EXEC_CLI_PM_LOG} RequestID=7 +Verify that PM Mapper correctly identifies a non-xml file. + [Tags] PM_MAPPER_10 + [Documentation] Verify that PM Mapper correctly identifies a non-xml file. + [Timeout] 1 minute + SendToDatarouter ${NON_XML_FILE} ${VALID_METADATA_PATH} X-ONAP-RequestID=8 + CheckLog ${CLI_EXEC_CLI_PM_LOG} PM measurement file type not supported + CheckLog ${CLI_EXEC_CLI_PM_LOG} RequestID=8 + + *** Keywords *** SendToDatarouter diff --git a/tests/dcaegen2/prh-testcases/resources/PrhLibrary.py b/tests/dcaegen2/prh-testcases/resources/PrhLibrary.py index 0dd01dcb..597f8647 100644 --- a/tests/dcaegen2/prh-testcases/resources/PrhLibrary.py +++ b/tests/dcaegen2/prh-testcases/resources/PrhLibrary.py @@ -41,16 +41,10 @@ class PrhLibrary(object): def create_pnf_ready_notification_as_pnf_ready(json_file): json_to_python = json.loads(json_file) correlation_id = PrhLibrary.extract_correlation_id_value(json_to_python, "correlationId") - serial_number = PrhLibrary.extract_value_from_pnfRegistrationFields(json_to_python, "serial-number", "serialNumber") - vendor_name = PrhLibrary.extract_value_from_pnfRegistrationFields(json_to_python, "equip-vendor", "vendorName") - model_number = PrhLibrary.extract_value_from_pnfRegistrationFields(json_to_python, "equip-model", "modelNumber") - unit_type = PrhLibrary.extract_value_from_pnfRegistrationFields(json_to_python, "equip-type", "unitType") additional_fields = PrhLibrary.extract_additional_fields_value(json_to_python) - nf_role = json_to_python.get("event").get("commonEventHeader").get("nfNamingCode") if "nfNamingCode" in json_to_python["event"]["commonEventHeader"] else "" - - str_json = '{' + correlation_id + serial_number + vendor_name + model_number + unit_type + '"nf-role":"' + nf_role + '","sw-version":"",' + additional_fields + str_json = '{' + correlation_id + additional_fields return json.dumps(str_json.rstrip(',') + '}').replace("\\", "")[1:-1] diff --git a/tests/dcaegen2/prh-testcases/resources/docker-compose.yml b/tests/dcaegen2/prh-testcases/resources/docker-compose.yml index 8b6ea128..45c71dc8 100644 --- a/tests/dcaegen2/prh-testcases/resources/docker-compose.yml +++ b/tests/dcaegen2/prh-testcases/resources/docker-compose.yml @@ -2,14 +2,6 @@ version: "3" services: prh: image: nexus3.onap.org:10001/onap/org.onap.dcaegen2.services.prh.prh-app-server:latest - command: > - --dmaap.dmaapConsumerConfiguration.dmaapHostName=dmaap-bc - --dmaap.dmaapConsumerConfiguration.dmaapPortNumber=2222 - --dmaap.dmaapProducerConfiguration.dmaapHostName=dmaap-bc - --dmaap.dmaapProducerConfiguration.dmaapPortNumber=2222 - --aai.aaiClientConfiguration.aaiHostPortNumber=3333 - --aai.aaiClientConfiguration.aaiHost=aai - --aai.aaiClientConfiguration.aaiProtocol=http ports: - "8100:8100" - "8433:8433" @@ -19,27 +11,11 @@ services: container_name: prh depends_on: - cbs - - dmaap-bc + - dmaap-mr - aai ssl_prh: image: nexus3.onap.org:10001/onap/org.onap.dcaegen2.services.prh.prh-app-server:latest - command: > - --dmaap.dmaapConsumerConfiguration.dmaapHostName=dmaap-bc - --dmaap.dmaapConsumerConfiguration.dmaapPortNumber=2223 - --dmaap.dmaapConsumerConfiguration.dmaapProtocol=https - --dmaap.dmaapProducerConfiguration.dmaapHostName=dmaap-bc - --dmaap.dmaapProducerConfiguration.dmaapPortNumber=2223 - --dmaap.dmaapProducerConfiguration.dmaapProtocol=https - --aai.aaiClientConfiguration.aaiHostPortNumber=3334 - --aai.aaiClientConfiguration.aaiHost=aai - --aai.aaiClientConfiguration.aaiProtocol=https - --security.enableAaiCertAuth=true - --security.enableDmaapCertAuth=true - --security.keyStorePath=/tmp/certs/org.onap.dcae.jks - --security.keyStorePasswordPath=/tmp/certs/keystore.password - --security.trustStorePath=/tmp/certs/org.onap.dcae.trust.jks - --security.trustStorePasswordPath=/tmp/certs/truststore.password ports: - "8200:8100" - "8533:8433" @@ -54,10 +30,10 @@ services: container_name: ssl_prh depends_on: - cbs - - dmaap-bc + - dmaap-mr - aai - dmaap-bc: + dmaap-mr: build: context: simulator dockerfile: DMaaP_simulator @@ -78,32 +54,95 @@ services: container_name: aai_simulator consul: - image: docker.io/consul:1.0.6 + image: consul:1.0.6 ports: - "8500:8500" - command: ["agent", "-bootstrap", "-client=0.0.0.0", "-server", "-config-dir=/consul/consul.d"] + command: ["agent", "-bootstrap", "-client=0.0.0.0", "-server", "-ui", "-config-dir=/consul/consul.d"] volumes: - ./consul.d/:/consul/consul.d consul-cfg: - image: docker.io/consul:1.0.6 + image: consul:1.0.6 restart: on-failure - command: ["kv", "put", "-http-addr=http://consul-server:8500", "dcae-prh", '{ - "dmaap.dmaapConsumerConfiguration.dmaapHostName":"dmaap-bc", + command: ["kv", "put", "-http-addr=http://consul:8500", "dcae-prh", '{ + "dmaap.dmaapConsumerConfiguration.dmaapUrl":"http://dmaap-mr:2222/events/unauthenticated.VES_PNFREG_OUTPUT", + "dmaap.dmaapConsumerConfiguration.dmaapHostName":"dmaap-mr", "dmaap.dmaapConsumerConfiguration.dmaapPortNumber":2223, - "dmaap.dmaapConsumerConfiguration.dmaapProtocol":"https", - "dmaap.dmaapProducerConfiguration.dmaapHostName":"dmaap-bc", + "dmaap.dmaapConsumerConfiguration.dmaapTopicName": "events/unauthenticated.VES_PNFREG_OUTPUT", + "dmaap.dmaapConsumerConfiguration.dmaapProtocol":"http", + "dmaap.dmaapConsumerConfiguration.dmaapUserName":"admin", + "dmaap.dmaapConsumerConfiguration.dmaapUserPassword":"admin", + "dmaap.dmaapConsumerConfiguration.dmaapContentType": "application/json", + "dmaap.dmaapConsumerConfiguration.consumerId": "c12", + "dmaap.dmaapConsumerConfiguration.consumerGroup": "OpenDCAE-c12", + "dmaap.dmaapConsumerConfiguration.timeoutMs": -1, + "dmaap.dmaapConsumerConfiguration.messageLimit": -1, + + "dmaap.dmaapProducerConfiguration.dmaapUrl":"http://dmaap-mr:2222/events/unauthenticated.PNF_READY", + "dmaap.dmaapProducerConfiguration.dmaapHostName":"dmaap-mr", "dmaap.dmaapProducerConfiguration.dmaapPortNumber":2223, - "dmaap.dmaapProducerConfiguration.dmaapProtocol":"https", - "aai.aaiClientConfiguration.aaiHostPortNumber":3334, + "dmaap.dmaapProducerConfiguration.dmaapTopicName": "events/unauthenticated.PNF_READY", + "dmaap.dmaapProducerConfiguration.dmaapProtocol":"http", + "dmaap.dmaapProducerConfiguration.dmaapUserName":"admin", + "dmaap.dmaapProducerConfiguration.dmaapUserPassword":"admin", + "dmaap.dmaapProducerConfiguration.dmaapContentType": "application/json", + + "dmaap.dmaapUpdateProducerConfiguration.dmaapUrl":"http://dmaap-mr:2222/events/unauthenticated.PNF_UPDATE", + "dmaap.dmaapUpdateProducerConfiguration.dmaapHostName": "dmaap-mr", + "dmaap.dmaapUpdateProducerConfiguration.dmaapPortNumber": 2223, + "dmaap.dmaapUpdateProducerConfiguration.dmaapTopicName": "events/unauthenticated.PNF_UPDATE", + "dmaap.dmaapUpdateProducerConfiguration.dmaapProtocol": "http", + "dmaap.dmaapUpdateProducerConfiguration.dmaapUserName": "admin", + "dmaap.dmaapUpdateProducerConfiguration.dmaapUserPassword": "admin", + "dmaap.dmaapUpdateProducerConfiguration.dmaapContentType": "application/json", + + "aai.aaiClientConfiguration.pnfUrl":"https://aai:3333/aai/v12/network/pnfs/pnf", "aai.aaiClientConfiguration.aaiHost":"aai", + "aai.aaiClientConfiguration.aaiHostPortNumber":3334, "aai.aaiClientConfiguration.aaiProtocol":"https", - "security.enableAaiCertAuth":"true", - "security.enableDmaapCertAuth":"true", - "security.keyStorePath":"/tmp/certs/org.onap.dcae.jks", - "security.keyStorePasswordPath":"/tmp/certs/keystore.password", - "security.trustStorePath":"/tmp/certs/org.onap.dcae.trust.jks", - "security.trustStorePasswordPath":"/tmp/certs/truststore.password" + "aai.aaiClientConfiguration.aaiUserName": "DCAE", + "aai.aaiClientConfiguration.aaiUserPassword": "DCAE", + "aai.aaiClientConfiguration.aaiIgnoreSslCertificateErrors": true, + "aai.aaiClientConfiguration.aaiBasePath": "/aai/v12", + "aai.aaiClientConfiguration.aaiPnfPath": "/network/pnfs/pnf", + "aai.aaiClientConfiguration.aaiServiceInstancePath":"/business/customers/customer/${customer}/service-subscriptions/service-subscription/${serviceType}/service-instances/service-instance/${serviceInstanceId}", + "aai.aaiClientConfiguration.aaiHeaders":{ + "X-FromAppId": "prh", + "X-TransactionId": "9999", + "Accept": "application/json", + "Real-Time": "true", + "Authorization": "Basic QUFJOkFBSQ==" + }, + + "security.trustStorePath":"change it", + "security.trustStorePasswordPath":"change it", + "security.keyStorePath":"change it", + "security.keyStorePasswordPath":"change it", + "security.enableAaiCertAuth":false, + "security.enableDmaapCertAuth":false, + + "streams_publishes":{ + "pnf-update":{ + "type": "message_router", + "dmaap_info":{ + "topic_url":"http://dmaap-mr:2222/events/unauthenticated.PNF_UPDATE" + } + }, + "pnf-ready":{ + "type": "message_router", + "dmaap_info":{ + "topic_url":"http://dmaap-mr:2222/events/unauthenticated.PNF_READY" + } + } + }, + "streams_subscribes":{ + "ves-reg-output":{ + "type": "message_router", + "dmaap_info":{ + "topic_url":"http://dmaap-mr:2222/events/unauthenticated.VES_PNFREG_OUTPUT" + } + } + } }' ] depends_on: diff --git a/tests/dcaegen2/prh-testcases/resources/prh_library.robot b/tests/dcaegen2/prh-testcases/resources/prh_library.robot index a6a01eb9..c2311852 100644 --- a/tests/dcaegen2/prh-testcases/resources/prh_library.robot +++ b/tests/dcaegen2/prh-testcases/resources/prh_library.robot @@ -33,9 +33,9 @@ Valid event processing [Arguments] ${input_valid__ves_event_in_dmaap} [Timeout] 30s ${data}= Get Data From File ${input_valid__ves_event_in_dmaap} + Set event in DMaaP ${data} ${pnf_name}= Create PNF name ${data} Set PNF name in AAI ${pnf_name} - Set event in DMaaP ${data} ${expected_event_pnf_ready_in_dpaap}= create pnf ready_notification as pnf ready ${data} #TODO to fix after CBS merge #Wait Until Keyword Succeeds 100x 300ms Check PNF_READY notification ${expected_event_pnf_ready_in_dpaap} diff --git a/tests/dcaegen2/prh-testcases/resources/simulator/AAI.py b/tests/dcaegen2/prh-testcases/resources/simulator/AAI.py index 27883655..010c5231 100644 --- a/tests/dcaegen2/prh-testcases/resources/simulator/AAI.py +++ b/tests/dcaegen2/prh-testcases/resources/simulator/AAI.py @@ -4,6 +4,7 @@ import sys import re import time from http.server import BaseHTTPRequestHandler +from os.path import basename import httpServerLib ch = logging.StreamHandler(sys.stdout) @@ -16,72 +17,125 @@ logging.basicConfig( logger = logging.getLogger('AAI-simulator-logger') -pnf_name = 'Empty' -pnf_entry = {} - - -def _mark_response_as_http_ok(http_endpoint): - logger.info('Execution status 200') - httpServerLib.header_200_and_json(http_endpoint) +AAI_RESOURCE_NOT_FOUND = b'{}' +pnf_entries = {} +patched_pnf = AAI_RESOURCE_NOT_FOUND +created_logical_link = AAI_RESOURCE_NOT_FOUND class AAISetup(BaseHTTPRequestHandler): - def do_PUT(self): - logger.info('AAI SIM Setup Put execution') - if re.search('/set_pnf', self.path): - global pnf_name - content_length = self._get_content_length() - pnf_name = self.rfile.read(content_length) - _mark_response_as_http_ok(self) - - if re.search('/set_pnf_entry',self.path): - global pnf_entry - content_length = self._get_content_length() - pnf_entry = json.loads(self.rfile.read(content_length)) - _mark_response_as_http_ok(self) + def do_GET(self): + try: + if re.search('/setup/patched_pnf', self.path): + httpServerLib.set_response_200_ok(self, payload = patched_pnf) + logger.debug('AAISetup GET /setup/patched_pnf -> 200 OK') + elif re.search('/setup/created_logical_link', self.path): + httpServerLib.set_response_200_ok(self, payload = created_logical_link) + logger.debug('AAISetup GET /setup/created_logical_link -> 200 OK') + else: + httpServerLib.set_response_404_not_found(self) + logger.info('AAISetup GET ' + self.path + ' -> 404 Not found') + except Exception as e: + logger.error(e) + httpServerLib.set_response_500_server_error(self) - return + def do_PUT(self): + try: + if re.search('/setup/add_pnf_entry', self.path): + pnf_entry = httpServerLib.get_payload(self) + pnf_name = json.loads(pnf_entry).get("pnf-name") + if pnf_name == None: + raise Exception("Invalid PNF entry, could not extract `pnf-name`") + + global pnf_entries + pnf_entries[pnf_name] = pnf_entry + + httpServerLib.set_response_200_ok(self) + logger.debug('AAISetup PUT /setup/add_pnf_entry [' + pnf_name + '] -> 200 OK') + elif re.search('/set_pnf', self.path): + pnf_name = httpServerLib.get_payload(self).decode() + pnf_entries[pnf_name] = AAI_RESOURCE_NOT_FOUND + httpServerLib.set_response_200_ok(self) + else: + httpServerLib.set_response_404_not_found(self) + logger.info('AAISetup PUT ' + self.path + ' -> 404 Not found') + except Exception as e: + logger.error(e) + httpServerLib.set_response_500_server_error(self) def do_POST(self): - logger.info('AAI SIM Setup Post execution') - if re.search('/reset', self.path): - global pnf_name - pnf_name = 'Empty' - _mark_response_as_http_ok(self) - - return - - def _get_content_length(self): - return int(self.headers['Content-Length']) - + try: + if re.search('/reset', self.path): + global pnf_entries + global patched_pnf + global created_logical_link + pnf_entries = {} + patched_pnf = AAI_RESOURCE_NOT_FOUND + created_logical_link = AAI_RESOURCE_NOT_FOUND + + httpServerLib.set_response_200_ok(self) + logger.debug('AAISetup POST /reset -> 200 OK') + else: + httpServerLib.set_response_404_not_found(self) + logger.info('AAISetup POST ' + self.path + ' -> 404 Not found') + except Exception as e: + logger.error(e) + httpServerLib.set_response_500_server_error(self) class AAIHandler(BaseHTTPRequestHandler): def do_GET(self): - logger.info('AAI SIM Get execution') - full_request_path = '/aai/v12/network/pnfs/pnf/' + pnf_name - if re.search(full_request_path, self.path): - _mark_response_as_http_ok(self) - body = json.dumps(pnf_entry) - logger.info('AAI SIM Get json prepared') - self.wfile.write(body.encode()) - return - + try: + if re.search('/aai/v12/network/pnfs/pnf/[^/]*$', self.path): + pnf_name = basename(self.path) + if pnf_name in pnf_entries: + httpServerLib.set_response_200_ok(self, payload = pnf_entries[pnf_name]) + logger.debug('AAIHandler GET /aai/v12/network/pnfs/pnf/' + pnf_name + ' -> 200 OK') + else: + httpServerLib.set_response_404_not_found(self) + logger.info('AAIHandler GET /aai/v12/network/pnfs/pnf/' + pnf_name + ' -> 404 Not found, actual entries: ' + str(pnf_entries.keys())) + else: + httpServerLib.set_response_404_not_found(self) + logger.info('AAIHandler GET ' + self.path + ' -> 404 Not found') + except Exception as e: + logger.error(e) + httpServerLib.set_response_500_server_error(self) def do_PATCH(self): - logger.info('AAI SIM Patch execution') - pnfs_name = '/aai/v12/network/pnfs/pnf/' + pnf_name - if re.search('wrong_aai_record', self.path): - self.send_response(400) - logger.info('Execution status 400') - self.end_headers() - elif re.search(pnfs_name, self.path): - self.send_response(200) - logger.info('Execution status 200') - self.end_headers() - - return + try: + if re.search('/aai/v12/network/pnfs/pnf/[^/]*$', self.path): + pnf_name = basename(self.path) + if pnf_name in pnf_entries: + global patched_pnf + patched_pnf = httpServerLib.get_payload(self) + + httpServerLib.set_response_200_ok(self) + logger.debug('AAIHandler PATCH /aai/v12/network/pnfs/pnf/' + pnf_name + ' -> 200 OK') + else: + httpServerLib.set_response_404_not_found(self) + logger.info('AAIHandler PATCH /aai/v12/network/pnfs/pnf/' + pnf_name + ' -> 404 Not found, actual entries: ' + str(pnf_entries.keys())) + else: + httpServerLib.set_response_404_not_found(self) + logger.info('AAIHandler PATCH ' + self.path + ' -> 404 Not found') + except Exception as e: + logger.error(e) + httpServerLib.set_response_500_server_error(self) + + def do_PUT(self): + try: + if re.search('/aai/v12/network/logical-links/logical-link/[^/]*$', self.path): + global created_logical_link + created_logical_link = httpServerLib.get_payload(self) + + httpServerLib.set_response_200_ok(self) + logger.debug('AAIHandler PUT /aai/v12/network/logical-links/logical-link/' + created_logical_link + ' -> 200 OK') + else: + httpServerLib.set_response_404_not_found(self) + logger.info('AAIHandler PUT ' + self.path + ' -> 404 Not found') + except Exception as e: + logger.error(e) + httpServerLib.set_response_500_server_error(self) def _main_(handler_class=AAIHandler, protocol="HTTP/1.0"): @@ -94,4 +148,4 @@ def _main_(handler_class=AAIHandler, protocol="HTTP/1.0"): if __name__ == '__main__': - _main_() + _main_()
\ No newline at end of file diff --git a/tests/dcaegen2/prh-testcases/resources/simulator/DMaaP.py b/tests/dcaegen2/prh-testcases/resources/simulator/DMaaP.py index da113e68..7f590a5b 100644 --- a/tests/dcaegen2/prh-testcases/resources/simulator/DMaaP.py +++ b/tests/dcaegen2/prh-testcases/resources/simulator/DMaaP.py @@ -15,62 +15,85 @@ logging.basicConfig( logger = logging.getLogger('DMaaP-simulator-logger') -posted_event_from_prh = b'Empty' -received_event_to_get_method = b'Empty' +DMAAP_EMPTY = b'[]' +ves_event = DMAAP_EMPTY +captured_prh_event = DMAAP_EMPTY class DmaapSetup(BaseHTTPRequestHandler): - def do_PUT(self): - logger.info('DMaaP SIM Setup Put execution') - if re.search('/set_get_event', self.path): - global received_event_to_get_method - content_length = int(self.headers['Content-Length']) - received_event_to_get_method = self.rfile.read(content_length) - httpServerLib.header_200_and_json(self) - - return - def do_GET(self): - logger.info('DMaaP SIM Setup Get execution') - if re.search('/events/pnfReady', self.path): - httpServerLib.header_200_and_json(self) - self.wfile.write(posted_event_from_prh) + try: + if re.search('/setup/pnf_ready', self.path) or re.search('events/pnfReady', self.path): + global captured_prh_event + httpServerLib.set_response_200_ok(self, payload = captured_prh_event) + logger.debug('DmaapSetup GET /setup/pnf_ready -> 200 OK') + else: + httpServerLib.set_response_404_not_found(self) + logger.info('DmaapSetup GET ' + self.path + ' -> 404 Not found') + except Exception as e: + logger.error(e) + httpServerLib.set_response_500_server_error(self) - return + def do_PUT(self): + try: + if re.search('/setup/ves_event', self.path) or re.search('/set_get_event', self.path): + global ves_event + ves_event = httpServerLib.get_payload(self) + httpServerLib.set_response_200_ok(self) + logger.debug('DmaapSetup PUT /setup/ves_event -> 200 OK') + else: + httpServerLib.set_response_404_not_found(self) + logger.info('DmaapSetup PUT ' + self.path + ' -> 404 Not found') + except Exception as e: + logger.error(e) + httpServerLib.set_response_500_server_error(self) def do_POST(self): - logger.info('DMaaP SIM Setup Post execution') - if re.search('/reset', self.path): - global posted_event_from_prh - global received_event_to_get_method - posted_event_from_prh = b'Empty' - received_event_to_get_method = b'Empty' - httpServerLib.header_200_and_json(self) - - return - + try: + if re.search('/reset', self.path): + global ves_event + global captured_prh_event + ves_event = DMAAP_EMPTY + captured_prh_event = DMAAP_EMPTY + httpServerLib.set_response_200_ok(self) + logger.debug('DmaapSetup POST /reset -> 200 OK') + else: + httpServerLib.set_response_404_not_found(self) + logger.info('DmaapSetup POST ' + self.path + ' -> 404 Not found') + except Exception as e: + logger.error(e) + httpServerLib.set_response_500_server_error(self) class DMaaPHandler(BaseHTTPRequestHandler): def do_POST(self): - logger.info('DMaaP SIM Post execution') - if re.search('/events/unauthenticated.PNF_READY', self.path): - global posted_event_from_prh - content_length = int(self.headers['Content-Length']) - posted_event_from_prh = self.rfile.read(content_length) - httpServerLib.header_200_and_json(self) - - return + try: + if re.search('/events/unauthenticated.PNF_READY', self.path): + global captured_prh_event + captured_prh_event = httpServerLib.get_payload(self) + httpServerLib.set_response_200_ok(self) + logger.debug('DMaaPHandler POST /events/unauthenticated.PNF_READY -> 200') + else: + httpServerLib.set_response_404_not_found(self) + logger.info('DMaaPHandler POST ' + self.path + ' -> 404 Not found') + except Exception as e: + logger.error(e) + httpServerLib.set_response_500_server_error(self) def do_GET(self): - logger.info('DMaaP SIM Get execution') - if re.search('/events/unauthenticated.VES_PNFREG_OUTPUT/OpenDcae-c12/c12', self.path): - httpServerLib.header_200_and_json(self) - self.wfile.write(received_event_to_get_method) - - return - + try: + if re.search('/events/unauthenticated.VES_PNFREG_OUTPUT/OpenDcae-c12/c12', self.path): + global ves_event + httpServerLib.set_response_200_ok(self, payload = ves_event) + ves_event = DMAAP_EMPTY + logger.debug('DMaaPHandler GET /events/unauthenticated.VES_PNFREG_OUTPUT/OpenDcae-c12/c12 -> 200') + else: + httpServerLib.set_response_404_not_found(self) + logger.info('DMaaPHandler GET ' + self.path + ' -> 404 Not found') + except Exception as e: + logger.error(e) + httpServerLib.set_response_500_server_error(self) def _main_(handler_class=DMaaPHandler, protocol="HTTP/1.0"): handler_class.protocol_version = protocol @@ -80,6 +103,5 @@ def _main_(handler_class=DMaaPHandler, protocol="HTTP/1.0"): while 1: time.sleep(10) - if __name__ == '__main__': - _main_() + _main_()
\ No newline at end of file diff --git a/tests/dcaegen2/prh-testcases/resources/simulator/httpServerLib.py b/tests/dcaegen2/prh-testcases/resources/simulator/httpServerLib.py index 7b54539a..e91927e3 100644 --- a/tests/dcaegen2/prh-testcases/resources/simulator/httpServerLib.py +++ b/tests/dcaegen2/prh-testcases/resources/simulator/httpServerLib.py @@ -2,32 +2,44 @@ import _thread import ssl from http.server import HTTPServer - -def header_200_and_json(self): +def set_response_200_ok(self, payload = None): self.send_response(200) self.send_header('Content-Type', 'application/json') self.end_headers() + if payload != None: + self.wfile.write(payload) + +def set_response_404_not_found(self): + self.send_response(404) + self.end_headers() + +def set_response_500_server_error(self): + self.send_response(500) + self.end_headers() +def get_payload(self): + if self.headers['Content-Length'] == None: + raise Exception('Invalid payload, Content-Length not defined') + + content_length = int(self.headers['Content-Length']) + return self.rfile.read(content_length) def start_http_endpoint(port, handler_class): _thread.start_new_thread(init_http_endpoints, (port, handler_class)) - def start_https_endpoint(port, handler_class, keyfile, certfile, ca_certs): _thread.start_new_thread(init_https_endpoints, (port, handler_class, keyfile, certfile, ca_certs)) - def init_http_endpoints(port, handler_class, server_class=HTTPServer): server = server_class(('', port), handler_class) sa = server.socket.getsockname() print("Serving HTTP on", sa[0], "port", sa[1], "for", handler_class, "...") server.serve_forever() - def init_https_endpoints(port, handler_class, keyfile, certfile, ca_certs, server_class=HTTPServer): server = server_class(('', port), handler_class) server.socket = ssl.wrap_socket(server.socket, keyfile=keyfile, certfile=certfile, ca_certs=ca_certs, server_side=True) sa = server.socket.getsockname() print("Serving HTTPS on", sa[0], "port", sa[1], "for", handler_class, "...") - server.serve_forever() + server.serve_forever()
\ No newline at end of file diff --git a/tests/optf-cmso/cmso/testsuites/ChangeManagementImmediate.robot b/tests/optf-cmso/cmso/testsuites/ChangeManagementImmediate.robot index ee6f8b10..6990cf46 100644 --- a/tests/optf-cmso/cmso/testsuites/ChangeManagementImmediate.robot +++ b/tests/optf-cmso/cmso/testsuites/ChangeManagementImmediate.robot @@ -1,28 +1,6 @@ *** Settings *** -Documentation Creates VID VNF Instance - -#Library StringTemplater -#Library UUID -Library ../attlibs/UID.py -Library ../attlibs/StringTemplater.py -Resource ../resources/change_management_ete.robot - -# Test Setup -Test Template Change Management Immediate Template -# Test Teardown +Documentation Placeholder for running CMSO IT *** Test Cases *** -One Vnf Immediate Replace OneVnfImmediate.json.template Replace - [Tags] ete immediate - -One Vnf Immediate Update Config OneVnfImmediate.json.template VNF Config Update - [Tags] ete immediate - -One Vnf Immediate Update In Place OneVnfImmediate.json.template VNF Update Software In Place - [Tags] ete immediate - -One Vnf Immediate Update OneVnfImmediate.json.template Update - [Tags] ete immediate - -Multiple Vnf Immediate MultipleVnfImmediate.json.template Replace - [Tags] ete immediate +CMSO Robot Test + Log CMSO IT tests run via cmso-robot docker container.
\ No newline at end of file diff --git a/tests/usecases/5G-bulkpm/BulkpmE2E.robot b/tests/usecases/5G-bulkpm/BulkpmE2E.robot index dcf97210..84243cba 100644 --- a/tests/usecases/5G-bulkpm/BulkpmE2E.robot +++ b/tests/usecases/5G-bulkpm/BulkpmE2E.robot @@ -20,8 +20,12 @@ ${CLI_EXEC_CLI} curl -k https://${DR_PROV_IP}:8443/inte ${CLI_EXEC_CLI_FILECONSUMER} docker exec fileconsumer-node /bin/sh -c "ls /opt/app/subscriber/delivery | grep .xml" ${CLI_EXEC_CLI_DFC_LOG} docker exec dfc /bin/sh -c "cat /var/log/ONAP/application.log" > /tmp/dfc_docker.log.robot ${CLI_EXEC_CLI_DFC_LOG_GREP} grep "Publish to DR successful!" /tmp/dfc_docker.log.robot -${CLI_EXEC_CLI_FILECONSUMER_CP} docker cp fileconsumer-node:/opt/app/subscriber/delivery/xNF.pm.xml.M %{WORKSPACE} -${CLI_EXEC_RENAME_METADATA} mv %{WORKSPACE}/xNF.pm.xml.M %{WORKSPACE}/metadata.json +${CLI_EXEC_CLI_FILECONSUMER_CP} docker cp fileconsumer-node:/opt/app/subscriber/delivery/A20181002.0000-1000-0015-1000_5G.xml.M %{WORKSPACE} +${CLI_EXEC_RENAME_METADATA} mv %{WORKSPACE}/A20181002.0000-1000-0015-1000_5G.xml.M %{WORKSPACE}/metadata.json +${CLI_EXEC_CLI_PMMAPPER_LOG} docker exec pmmapper /bin/sh -c "cat /var/log/ONAP/dcaegen2/services/pm-mapper/pm-mapper_output.log" > /tmp/pmmapper_docker.log.robot +${CLI_EXEC_CLI_PMMAPPER_LOG_GREP} grep "XML validation successful Event" /tmp/pmmapper_docker.log.robot +${CLI_EXEC_MR_PMMAPPER_TOPIC} curl http://${DMAAP_MR_IP}:3904/events/PM_MAPPER/CG1/C1?timeout=1000 > /tmp/mr.log +${CLI_EXEC_CLI_PMMAPPER_TOPIC_LOG_GREP} grep "perf3gpp_RnNode-Ericsson_pmMeasResult" /tmp/mr.log ${metadataSchemaPath} %{WORKSPACE}/tests/usecases/5G-bulkpm/assets/metadata.schema.json ${metadataJsonPath} %{WORKSPACE}/metadata.json @@ -86,7 +90,7 @@ Verify Fileconsumer Receive PM file from Data Router ${cli_cmd_output}= Run Process ${CLI_EXEC_CLI_FILECONSUMER} shell=yes Log ${cli_cmd_output.stdout} Should Be Equal As Strings ${cli_cmd_output.rc} 0 - Should Contain ${cli_cmd_output.stdout} xNF.pm.xml + Should Contain ${cli_cmd_output.stdout} A20181002.0000-1000-0015-1000_5G.xml Verify File Consumer Receive valid metadata from Data Router [Tags] Bulk_PM_E2E_06 @@ -94,8 +98,30 @@ Verify File Consumer Receive valid metadata from Data Router ${cli_cmd_output}= Run Process ${CLI_EXEC_CLI_FILECONSUMER} shell=yes Log ${cli_cmd_output.stdout} Should Be Equal As Strings ${cli_cmd_output.rc} 0 - Should Contain ${cli_cmd_output.stdout} xNF.pm.xml.M + Should Contain ${cli_cmd_output.stdout} A20181002.0000-1000-0015-1000_5G.xml.M ${cli_cmd_output}= Run Process ${CLI_EXEC_CLI_FILECONSUMER_CP} shell=yes ${cli_cmd_output}= Run Process ${CLI_EXEC_RENAME_METADATA} shell=yes ${validation_result}= Validate ${metadataSchemaPath} ${metadataJsonPath} - Should Be Equal As Strings ${validation_result} 0
\ No newline at end of file + Should Be Equal As Strings ${validation_result} 0 + +Verify PM-Mapper successfully receives uncompressed the PM XML file + [Tags] Bulk_PM_E2E_07 + [Documentation] Check that PM-Mapper receives the uncompressed PM XML file + ${cli_cmd_output}= Run Process ${CLI_EXEC_CLI_PMMAPPER_LOG} shell=yes + Log ${cli_cmd_output.stdout} + Should Be Equal As Strings ${cli_cmd_output.rc} 0 + ${cli_cmd_output}= Run Process ${CLI_EXEC_CLI_PMMAPPER_LOG_GREP} shell=yes + Log ${cli_cmd_output.stdout} + Should Be Equal As Strings ${cli_cmd_output.rc} 0 + Should Contain ${cli_cmd_output.stdout} XML validation successful Event + +Verify PM-Mapper successfully publishes PMMeasResult VES onto the Message Router Topic PM_MAPPER + [Tags] Bulk_PM_E2E_08 + [Documentation] Check that PM-Mapper publishes VES onto the Message Router + ${cli_cmd_output}= Run Process ${CLI_EXEC_MR_PMMAPPER_TOPIC} shell=yes + Log ${cli_cmd_output.stdout} + Should Be Equal As Strings ${cli_cmd_output.rc} 0 + ${cli_cmd_output}= Run Process ${CLI_EXEC_CLI_PMMAPPER_TOPIC_LOG_GREP} shell=yes + Log ${cli_cmd_output.stdout} + Should Be Equal As Strings ${cli_cmd_output.rc} 0 + Should Contain ${cli_cmd_output.stdout} perf3gpp_RnNode-Ericsson_pmMeasResult
\ No newline at end of file diff --git a/tests/usecases/5G-bulkpm/assets/json_events/FileExistNotification.json b/tests/usecases/5G-bulkpm/assets/json_events/FileExistNotification.json index d5d8fd05..375dbd80 100644 --- a/tests/usecases/5G-bulkpm/assets/json_events/FileExistNotification.json +++ b/tests/usecases/5G-bulkpm/assets/json_events/FileExistNotification.json @@ -19,9 +19,9 @@ "changeType": "FileReady", "notificationFieldsVersion": "2.0", "arrayOfNamedHashMap": [ - { "name": "xNF.pm.xml.gz", + { "name": "A20181002.0000-1000-0015-1000_5G.xml.gz", "hashMap":{ - "location": "sftp://admin:admin@sftpserver:sftpport/xNF.pm.xml.gz", + "location": "sftp://admin:admin@sftpserver:sftpport/A20181002.0000-1000-0015-1000_5G.xml.gz", "compression": "gzip", "fileFormatType": "org.3GPP.32.435#measCollec", "fileFormatVersion": "V10" diff --git a/tests/vid/resources/simulators/Dockerfile b/tests/vid/resources/simulators/Dockerfile index e6586b1e..de5b5fe8 100644 --- a/tests/vid/resources/simulators/Dockerfile +++ b/tests/vid/resources/simulators/Dockerfile @@ -5,8 +5,9 @@ ARG component ENV component=$component COPY SO.py / -ADD ./test_data_assets/ / +RUN mkdir test_data_assets +ADD ./test_data_assets/ /test_data_assets EXPOSE 8443 -CMD python ./SO.py expected_${component}_requests.json expected_${component}_responses.json +CMD python ./SO.py /test_data_assets/expected_${component}_requests.json /test_data_assets/expected_${component}_responses.json diff --git a/tests/vid/resources/simulators/SO.py b/tests/vid/resources/simulators/SO.py index fa481b38..12fd7763 100644 --- a/tests/vid/resources/simulators/SO.py +++ b/tests/vid/resources/simulators/SO.py @@ -26,10 +26,13 @@ DEFAULT_PORT = 8443 class SOHandler(BaseHTTPRequestHandler): - def __init__(self, expected_requests, expected_responses, *args, **kwargs): + def __init__(self, expected_requests, expected_responses, requests, responses, *args, **kwargs): self._expected_requests = expected_requests self._expected_responses = expected_responses + self._requests = requests["requests"] + self._responses = responses["responses"] + self._known_endpoints = self._get_known_endpoints() super().__init__(*args, **kwargs) def do_POST(self): @@ -44,15 +47,26 @@ class SOHandler(BaseHTTPRequestHandler): return def do_GET(self): - logging.info( - 'GET called. Expected GET REQUEST: ' + json.dumps( - self._expected_requests["get"]) + '\nExpected GET response: ' + - json.dumps(self._expected_responses["get"])) - self.send_response(200) - self._set_headers() - - self.wfile.write(json.dumps(self._expected_responses["get"]).encode("utf-8")) - return self._expected_responses["get"] + print(self._known_endpoints) + if self._does_path_exist_as_endpoint(): + expected_response = self._get_response_by_path() + if expected_response: + self.send_response(expected_response["responseCode"]) + self._set_headers() + self.wfile.write(json.dumps(expected_response["body"]).encode("utf-8")) + else: + response_body = "{\"message:\" \"no response for endpoint\"}" + self.send_response(400) + self._set_headers() + self.wfile.write(json.dumps(response_body).encode("utf-8")) + else: + logging.info('GET called. Expected GET REQUEST: ' + + json.dumps(self._expected_requests["get"]) + + '\nExpected GET response: ' + + json.dumps(self._expected_responses["get"])) + self.send_response(200) + self._set_headers() + self.wfile.write(json.dumps(self._expected_responses["get"]).encode("utf-8")) def do_PUT(self): request_body_json = self._get_request_body() @@ -80,9 +94,7 @@ class SOHandler(BaseHTTPRequestHandler): def _apply_expected_data(self, request_body_json): if self.path == '/setResponse': logging.info("IN PUT /setResponse: " + str(request_body_json)) - print("TYPE: %s and text: %s", type(request_body_json), str(request_body_json)) self._expected_responses.update(request_body_json) - print("TYPE: %s", type(request_body_json)) elif self.path == '/setRequest': logging.info("IN PUT /setRequest: " + str(request_body_json)) self._expected_requests.update(request_body_json) @@ -91,6 +103,37 @@ class SOHandler(BaseHTTPRequestHandler): self.send_header('Content-Type', 'application/json') self.end_headers() + def _get_response_by_path(self): + for response in self._responses: + if response["path"] == self.path: + return response + + def _does_path_exist_as_endpoint(self): + does_exist = False + for ep in self._known_endpoints: + if ep == self.path: + does_exist = True + break + return does_exist + + def _create_path_from_request(self, request): + base_uri = request["path"] + query_params = request["queryParams"] + return base_uri + self._get_params_uri(query_params) + + def _get_known_endpoints(self): + endpoints = [] + for request in self._requests: + endpoints.append(self._create_path_from_request(request)) + return endpoints + + @staticmethod + def _get_params_uri(query_params): + params_uri = "?" + for parameter in query_params: + params_uri += parameter + '=' + query_params.get(parameter, '') + '&' + return params_uri[:-1] + class JsonFileToDictReader(object): @@ -101,10 +144,13 @@ class JsonFileToDictReader(object): def init_so_simulator(): + requests = JsonFileToDictReader.read_expected_test_data("test_data_assets/requests.json") + responses = JsonFileToDictReader.read_expected_test_data("test_data_assets/responses.json") + expected_so_requests = JsonFileToDictReader.read_expected_test_data(argv[1]) expected_so_responses = JsonFileToDictReader.read_expected_test_data(argv[2]) logging.basicConfig(level=logging.INFO) - handler = partial(SOHandler, expected_so_requests, expected_so_responses) + handler = partial(SOHandler, expected_so_requests, expected_so_responses, requests, responses) handler.protocol_version = "HTTP/1.0" httpd = HTTPServer(('', DEFAULT_PORT), handler) logging.info("serving on: " + str(httpd.socket.getsockname())) diff --git a/tests/vid/resources/simulators/test_data_assets/endpoint_not_found.json b/tests/vid/resources/simulators/test_data_assets/endpoint_not_found.json new file mode 100644 index 00000000..3419e15c --- /dev/null +++ b/tests/vid/resources/simulators/test_data_assets/endpoint_not_found.json @@ -0,0 +1,4 @@ +{ + "responseCode": 404, + "message": "invalid endpoint" +}
\ No newline at end of file diff --git a/tests/vid/resources/simulators/test_data_assets/requests.json b/tests/vid/resources/simulators/test_data_assets/requests.json new file mode 100644 index 00000000..e94d26a6 --- /dev/null +++ b/tests/vid/resources/simulators/test_data_assets/requests.json @@ -0,0 +1,33 @@ +{ + "requests": [ + { + "method": "GET", + "path": "/aai/v13/service-design-and-creation/models", + "queryParams": { + "depth": "2", + "model-invariant-id": "88a71d72-ec80-4357-808e-f288823cb353" + } + }, + { + "method": "GET", + "path": "/aai/v../business/customers/customer/MSO_1610_ST", + "queryParams": { + "depth": "2" + } + }, + { + "method": "GET", + "path": "/aai/v13/query", + "queryParams": { + "format": "simple" + } + }, + { + "method": "GET", + "path": "/workflowSpecifications/v1/workflows", + "queryParams": { + "vnfModelVersionId": "103b4a1b-4a15-4559-a019-1ff132180c7c" + } + } + ] +}
\ No newline at end of file diff --git a/tests/vid/resources/simulators/test_data_assets/responses.json b/tests/vid/resources/simulators/test_data_assets/responses.json new file mode 100644 index 00000000..fb862e15 --- /dev/null +++ b/tests/vid/resources/simulators/test_data_assets/responses.json @@ -0,0 +1,220 @@ +{ + "responses": [ + { + "responseCode": 200, + "path": "/aai/v13/service-design-and-creation/models?depth=2&model-invariant-id=88a71d72-ec80-4357-808e-f288823cb353", + "body": { + "model": [ + { + "model-invariant-id": "88a71d72-ec80-4357-808e-f288823cb353", + "model-type": "resource", + "resource-version": "1549550682576", + "model-vers": { + "model-ver": [ + { + "model-version-id": "d2dcf256-2687-4631-9e36-1b7fc352b7bf", + "model-name": "HealthVF", + "model-version": "1.0", + "model-description": "HealthVSP", + "resource-version": "1549550682585", + "model-elements": { + "model-element": [ + { + "model-element-uuid": "ad8c74b6-d2ff-48a7-8fcb-4cf653efc1f9", + "new-data-del-flag": "T", + "cardinality": "unbounded", + "resource-version": "1549550682592", + "relationship-list": { + "relationship": [ + { + "related-to": "model-ver", + "relationship-label": "org.onap.relationships.inventory.IsA", + "related-link": "/aai/v13/service-design-and-creation/models/model/acc6edd8-a8d4-4b93-afaa-0994068be14c/model-vers/model-ver/93a6166f-b3d5-4f06-b4ba-aed48d009ad9", + "relationship-data": [ + { + "relationship-key": "model.model-invariant-id", + "relationship-value": "acc6edd8-a8d4-4b93-afaa-0994068be14c" + } + ], + "related-to-property": [ + { + "property-key": "model-ver.model-name", + "property-value": "generic-vnf" + } + ] + } + ] + } + } + ] + }, + "relationship-list": { + "relationship": [ + { + "related-to": "model-element", + "relationship-label": "org.onap.relationships.inventory.IsA", + "related-link": "/aai/v13/service-design-and-creation/models/model/4b5158b9-a0d5-4aeb-90a8-474bc2ccd8af/model-vers/model-ver/ba463093-6f2c-4d22-aa8d-fb4615660db2/model-elements/model-element/57d23b71-d5a0-484d-ac7c-1b94e9a1563e/model-elements/model-element/5d290a6a-3b35-46bb-a2d7-1b9c9f520c39", + "relationship-data": [ + { + "relationship-key": "model.model-invariant-id", + "relationship-value": "4b5158b9-a0d5-4aeb-90a8-474bc2ccd8af" + } + ] + } + ] + } + } + ] + } + } + ] + } + }, + { + "responseCode": 200, + "path": "/aai/v../business/customers/customer/MSO_1610_ST?depth=2", + "body": { + "global-customer-id": "MSO_1610_ST", + "subscriber-name": "MSO_1610_ST", + "subscriber-type": "INFRA", + "resource-version": "1549008901724", + "service-subscriptions": { + "service-subscription": [ + { + "service-type": "gNB", + "resource-version": "1549008901954", + "service-instances": { + "service-instance": [ + { + "service-instance-id": "40003c27-2876-4f3a-8a23-ef1ad7ef665a", + "service-instance-name": "AwServicePreload3", + "service-type": "vAwServiceType", + "environment-context": "General_Revenue-Bearing", + "workload-context": "Production", + "model-invariant-id": "33ebe1a9-1df3-4c35-b8a0-cd0504159511", + "model-version-id": "41658d87-b37c-4237-9a56-d27d1e430da6", + "resource-version": "1550761112266", + "orchestration-status": "Active", + "relationship-list": { + "relationship": [ + { + "related-to": "project", + "relationship-label": "org.onap.relationships.inventory.Uses", + "related-link": "/aai/v13/business/projects/project/AwTestProject", + "relationship-data": [ + { + "relationship-key": "project.project-name", + "relationship-value": "AwTestProject" + } + ] + } + ] + } + } + ] + }, + "relationship-list": { + "relationship": [ + { + "related-to": "tenant", + "relationship-label": "org.onap.relationships.inventory.Uses", + "related-link": "/aai/v13/cloud-infrastructure/cloud-regions/cloud-region/CloudOwner/RegionOne/tenants/tenant/982c540f6e69488eb6be5664255e00c0", + "relationship-data": [ + { + "relationship-key": "cloud-region.cloud-owner", + "relationship-value": "CloudOwner" + } + ], + "related-to-property": [ + { + "property-key": "tenant.tenant-name", + "property-value": "onap-wro" + } + ] + } + ] + } + } + ] + } + } + }, + { + "responseCode": 200, + "path": "/aai/v13/query?format=simple", + "body": { + "results": [ + { + "id": "385160", + "node-type": "service-instance", + "url": "/aai/v13/business/customers/customer/Demonstration/service-subscriptions/service-subscription/vLB/service-instances/service-instance/12965035-a690-400c-bf18-211a5b4710c8", + "properties": { + "service-instance-id": "12965035-a690-400c-bf18-211a5b4710c8", + "service-instance-name": "ws-service-02", + "service-type": "vAwServiceType", + "environment-context": "General_Revenue-Bearing", + "workload-context": "Production", + "model-invariant-id": "33ebe1a9-1df3-4c35-b8a0-cd0504159511", + "model-version-id": "cb8501da-6e03-40e0-900c-ef0df30d1183", + "resource-version": "1551434658559", + "selflink": "restconf/config/GENERIC-RESOURCE-API:services/service/12965035-a690-400c-bf18-211a5b4710c8/service-data/service-topology/", + "orchestration-status": "Active" + }, + "related-to": [ + { + "id": "200768", + "relationship-label": "org.onap.relationships.inventory.Uses", + "node-type": "project", + "url": "/aai/v13/business/projects/project/Project-Demonstration" + } + ] + } + ] + } + }, + { + "responseCode": 200, + "path": "/workflowSpecifications/v1/workflows?vnfModelVersionId=103b4a1b-4a15-4559-a019-1ff132180c7c", + "body": { + "workflowSpecificationList": [ + { + "workflowSpecification": { + "artifactInfo": { + "artifactType": "workflow", + "artifactUuid": "ab6478e4-ea33-3346-ac12-ab121484a333", + "artifactName": "inPlaceSoftwareUpdate-1_0.bpmn", + "artifactVersion": "1.0", + "artifactDescription": "xyz xyz", + "workflowName": "inPlaceSoftwareUpdate", + "operationName": "inPlaceSoftwareUpdate", + "workflowSource": "sdc", + "workflowResourceTarget": "vnf" + }, + "activitySequence": [ + { + "name": "VNFQuiesceTrafficActivity", + "description": "Activity to QuiesceTraffic on VNF" + } + ], + "workflowInputParameters": [ + { + "label": "Cloud Owner", + "inputType": "text", + "required": true, + "validation": [ + { + "maxLength": "7", + "allowableChars": "[a-zA-Z0-9]*" + } + ], + "soFieldName": "cloudOwner", + "soPayloadLocation": "cloudConfiguration" + } + ] + } + } + ] + } + } + ] +}
\ No newline at end of file |