diff options
author | liamfallon <liam.fallon@est.tech> | 2022-09-13 14:31:50 +0100 |
---|---|---|
committer | liamfallon <liam.fallon@est.tech> | 2022-09-13 16:15:35 +0100 |
commit | 2b49812712d2d87847f0f00d60397f2131f2bf5b (patch) | |
tree | b16072578b0372d07a72344dc3e158b81f4e2675 /csit | |
parent | c8a97bce56677612d63d63da3a814e4501a4a38a (diff) |
Convert CSIT tests to use HTTP rather than HTTPS
This commit converts the CSITs from HTTPS to HTTP. It also does some
refactoring and tidying up on the CSIT environment.
Issue-ID: POLICY-4338
Change-Id: I6f2a3ea672b757f27e47b09183fd4c3f33709135
Signed-off-by: liamfallon <liam.fallon@est.tech>
Diffstat (limited to 'csit')
37 files changed, 638 insertions, 252 deletions
diff --git a/csit/apex-pdp/tests/apex-pdp-test.robot b/csit/apex-pdp/tests/apex-pdp-test.robot index e538e6fa..e71406db 100644 --- a/csit/apex-pdp/tests/apex-pdp-test.robot +++ b/csit/apex-pdp/tests/apex-pdp-test.robot @@ -9,8 +9,8 @@ Library json Healthcheck [Documentation] Runs Apex PDP Health check ${auth}= Create List healthcheck zb!XztG34 - Log Creating session https://${APEX_IP}:6969 - ${session}= Create Session policy https://${APEX_IP}:6969 auth=${auth} + Log Creating session http://${APEX_IP}:6969 + ${session}= Create Session policy http://${APEX_IP}:6969 auth=${auth} ${headers}= Create Dictionary Accept=application/json Content-Type=application/json ${resp}= GET On Session policy /policy/apex-pdp/v1/healthcheck headers=${headers} Log Received response from policy ${resp.text} @@ -32,8 +32,8 @@ CreatePolicy [Documentation] Create a new Apex policy ${auth}= Create List healthcheck zb!XztG34 ${postjson}= Get file ${CURDIR}/data/onap.policies.native.Apex.tosca.json - Log Creating session https://${POLICY_API_IP}:6969 - ${session}= Create Session policy https://${POLICY_API_IP}:6969 auth=${auth} + Log Creating session http://${POLICY_API_IP}:6969 + ${session}= Create Session policy http://${POLICY_API_IP}:6969 auth=${auth} ${headers}= Create Dictionary Accept=application/json Content-Type=application/json ${resp}= POST On Session policy /policy/api/v1/policytypes/onap.policies.native.Apex/versions/1.0.0/policies data=${postjson} headers=${headers} Log Received response from policy ${resp.text} @@ -44,8 +44,8 @@ DeployPolicy [Documentation] Deploy the policy in apex-pdp engine ${auth}= Create List healthcheck zb!XztG34 ${postjson}= Get file ${CURDIR}/data/pdp_update.json - Log Creating session https://${POLICY_PAP_IP}:6969 - ${session}= Create Session policy https://${POLICY_PAP_IP}:6969 auth=${auth} + Log Creating session http://${POLICY_PAP_IP}:6969 + ${session}= Create Session policy http://${POLICY_PAP_IP}:6969 auth=${auth} ${headers}= Create Dictionary Accept=application/json Content-Type=application/json ${resp}= POST On Session policy /policy/pap/v1/pdps/deployments/batch data=${postjson} headers=${headers} Log Received response from policy ${resp.text} @@ -54,8 +54,8 @@ DeployPolicy VerifyPolicyStatus [Documentation] Verify policy deployment status ${auth}= Create List healthcheck zb!XztG34 - Log Creating session https://${POLICY_PAP_IP}:6969 - ${session}= Create Session policy https://${POLICY_PAP_IP}:6969 auth=${auth} + Log Creating session http://${POLICY_PAP_IP}:6969 + ${session}= Create Session policy http://${POLICY_PAP_IP}:6969 auth=${auth} ${headers}= Create Dictionary Accept=application/json Content-Type=application/json ${resp}= GET On Session policy /policy/pap/v1/policies/status headers=${headers} Log Received response from policy ${resp.text} @@ -82,8 +82,8 @@ VerifyPdpStatistics [Documentation] Verify pdp statistics after policy execution [Arguments] ${deployCount} ${deploySuccessCount} ${executedCount} ${executedSuccessCount} ${auth}= Create List healthcheck zb!XztG34 - Log Creating session https://${POLICY_PAP_IP}:6969 - ${session}= Create Session policy https://${POLICY_PAP_IP}:6969 auth=${auth} + Log Creating session http://${POLICY_PAP_IP}:6969 + ${session}= Create Session policy http://${POLICY_PAP_IP}:6969 auth=${auth} ${headers}= Create Dictionary Accept=application/json Content-Type=application/json ${resp}= GET On Session policy /policy/pap/v1/pdps/statistics/defaultGroup/apex/policy-apex-pdp params=recordCount=1 headers=${headers} Log Received response from policy ${resp.text} diff --git a/csit/api/tests/api-test.robot b/csit/api/tests/api-test.robot index 2123b1e5..1aa2095a 100644 --- a/csit/api/tests/api-test.robot +++ b/csit/api/tests/api-test.robot @@ -110,8 +110,8 @@ PerformCreateRequest [Arguments] ${url} ${expectedstatus} ${jsonfile} ${filepath} ${auth}= Create List healthcheck zb!XztG34 ${postjson}= Get file ${filepath}/${jsonfile} - Log Creating session https://${POLICY_API_IP}:6969 - ${session}= Create Session policy https://${POLICY_API_IP}:6969 auth=${auth} + Log Creating session http://${POLICY_API_IP}:6969 + ${session}= Create Session policy http://${POLICY_API_IP}:6969 auth=${auth} ${headers}= Create Dictionary Accept=application/json Content-Type=application/json ${resp}= POST On Session policy ${url} data=${postjson} headers=${headers} expected_status=${expectedstatus} Log Received response from policy ${resp.text} @@ -120,8 +120,8 @@ PerformCreateRequest PeformGetRequest [Arguments] ${url} ${expectedstatus} ${auth}= Create List healthcheck zb!XztG34 - Log Creating session https://${POLICY_API_IP}:6969 - ${session}= Create Session policy https://${POLICY_API_IP}:6969 auth=${auth} + Log Creating session http://${POLICY_API_IP}:6969 + ${session}= Create Session policy http://${POLICY_API_IP}:6969 auth=${auth} ${headers}= Create Dictionary Accept=application/json Content-Type=application/json ${resp}= GET On Session policy ${url} headers=${headers} expected_status=${expectedstatus} Log Received response from policy ${resp.text} @@ -130,8 +130,8 @@ PeformGetRequest PeformDeleteRequest [Arguments] ${url} ${auth}= Create List healthcheck zb!XztG34 - Log Creating session https://${POLICY_API_IP}:6969 - ${session}= Create Session policy https://${POLICY_API_IP}:6969 auth=${auth} + Log Creating session http://${POLICY_API_IP}:6969 + ${session}= Create Session policy http://${POLICY_API_IP}:6969 auth=${auth} ${headers}= Create Dictionary Accept=application/json Content-Type=application/json ${resp}= DELETE On Session policy ${url} headers=${headers} expected_status=200 Log Received response from policy ${resp.text} diff --git a/csit/config/apex-pdp/OnapPfConfig.json b/csit/config/apex-pdp/OnapPfConfig.json index d6deee32..d02de119 100644 --- a/csit/config/apex-pdp/OnapPfConfig.json +++ b/csit/config/apex-pdp/OnapPfConfig.json @@ -5,7 +5,7 @@ "port": 6969, "userName": "healthcheck", "password": "zb!XztG34", - "https": true + "https": false }, "pdpStatusParameters":{ "pdpGroup": "defaultGroup", @@ -28,14 +28,14 @@ "topic" : "POLICY-PDP-PAP", "servers" : [ "simulator" ], "topicCommInfrastructure" : "dmaap", - "useHttps" : true, + "useHttps" : false, "allowSelfSignedCerts" : true }], "topicSinks" : [{ "topic" : "POLICY-PDP-PAP", "servers" : [ "simulator" ], "topicCommInfrastructure" : "dmaap", - "useHttps" : true, + "useHttps" : false, "allowSelfSignedCerts" : true }] } diff --git a/csit/config/api/defaultConfig.json b/csit/config/api/defaultConfig.json new file mode 100644 index 00000000..b6270005 --- /dev/null +++ b/csit/config/api/defaultConfig.json @@ -0,0 +1,57 @@ +{ + "name": "ApiGroup", + "restServerParameters": { + "host": "0.0.0.0", + "port": 6969, + "userName": "healthcheck", + "password": "zb!XztG34", + "https": false, + "aaf": false, + "prometheus": true + }, + "databaseProviderParameters": { + "name": "PolicyProviderParameterGroup", + "implementation": "org.onap.policy.models.provider.impl.DatabasePolicyModelsProviderImpl", + "databaseDriver": "org.mariadb.jdbc.Driver", + "databaseUrl": "jdbc:mariadb://mariadb:3306/policyadmin", + "databaseUser": "policy_user", + "databasePassword": "policy_user", + "persistenceUnit": "PolicyMariaDb" + }, + "preloadPolicyTypes": [ + "policytypes/onap.policies.monitoring.tcagen2.yaml", + "policytypes/onap.policies.monitoring.dcaegen2.collectors.datafile.datafile-app-server.yaml", + "policytypes/onap.policies.monitoring.dcae-restconfcollector.yaml", + "policytypes/onap.policies.monitoring.dcae-pm-subscription-handler.yaml", + "policytypes/onap.policies.monitoring.dcae-pm-mapper.yaml", + "policytypes/onap.policies.Optimization.yaml", + "policytypes/onap.policies.optimization.Resource.yaml", + "policytypes/onap.policies.optimization.Service.yaml", + "policytypes/onap.policies.optimization.resource.AffinityPolicy.yaml", + "policytypes/onap.policies.optimization.resource.DistancePolicy.yaml", + "policytypes/onap.policies.optimization.resource.HpaPolicy.yaml", + "policytypes/onap.policies.optimization.resource.OptimizationPolicy.yaml", + "policytypes/onap.policies.optimization.resource.PciPolicy.yaml", + "policytypes/onap.policies.optimization.service.QueryPolicy.yaml", + "policytypes/onap.policies.optimization.service.SubscriberPolicy.yaml", + "policytypes/onap.policies.optimization.resource.Vim_fit.yaml", + "policytypes/onap.policies.optimization.resource.VnfPolicy.yaml", + "policytypes/onap.policies.controlloop.guard.Common.yaml", + "policytypes/onap.policies.controlloop.guard.common.Blacklist.yaml", + "policytypes/onap.policies.controlloop.guard.common.FrequencyLimiter.yaml", + "policytypes/onap.policies.controlloop.guard.common.MinMax.yaml", + "policytypes/onap.policies.controlloop.guard.common.Filter.yaml", + "policytypes/onap.policies.controlloop.guard.coordination.FirstBlocksSecond.yaml", + "policytypes/onap.policies.Naming.yaml", + "policytypes/onap.policies.Match.yaml", + "policytypes/onap.policies.native.Drools.yaml", + "policytypes/onap.policies.native.Xacml.yaml", + "policytypes/onap.policies.native.Apex.yaml", + "policytypes/onap.policies.controlloop.operational.Common.yaml", + "policytypes/onap.policies.controlloop.operational.common.Apex.yaml", + "policytypes/onap.policies.controlloop.operational.common.Drools.yaml" + ], + "preloadPolicies" : [ + "policies/sdnc.policy.naming.input.tosca.yaml" + ] +} diff --git a/csit/config/api/logback.xml b/csit/config/api/logback.xml new file mode 100644 index 00000000..83a70993 --- /dev/null +++ b/csit/config/api/logback.xml @@ -0,0 +1,207 @@ +<!-- + ============LICENSE_START======================================================= + policy-api + ================================================================================ + Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved. + ================================================================================ + 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========================================================= + --> + +<configuration scan="true" scanPeriod="30 seconds" debug="false"> + + <property name="logDir" value="${POLICY_LOGS}" /> + + <property name="errorLog" value="error" /> + <property name="debugLog" value="debug" /> + <property name="networkLog" value="network" /> + + <property name="metricLog" value="metric" /> + <property name="transactionLog" value="audit" /> + + <property name="debugPattern" + value="[%d{yyyy-MM-dd'T'HH:mm:ss.SSS+00:00, UTC}|%level|%logger{0}|%thread] %msg%n" /> + <property name="errorPattern" value="${debugPattern}" /> + <property name="networkPattern" + value="[%d{yyyy-MM-dd'T'HH:mm:ss.SSS+00:00, UTC}|%t]%m%n" /> + + <property + name="mpPreamble" + value="%X{RequestID}|%X{InvocationID}|%X{ServiceName}|%X{PartnerName}" /> + + <property + name="mpTime" + value="%X{BeginTimestamp}|%X{EndTimestamp}|%X{ElapsedTime}" /> + + <property + name="mpLine1" + value="%X{ServiceInstanceID}|%X{VirtualServerName}|%X{StatusCode}|%X{ResponseCode}|%X{ResponseDescription}" /> + + <property + name="mpLine2" + value="%X{InstanceUUID}|%X{Severity}|%X{TargetEntity}|%X{TargetServiceName}|%X{Server}|%X{ServerIPAddress}" /> + + <property + name="mpLine3" + value="%X{ServerFQDN}|%X{ClientIPAddress}|%X{ProcessKey}|%X{RemoteHost}|%X{AlertSeverity}" /> + + <property + name="mpLine4" + value="%X{TargetVirtualEntity}|%level|%thread| %msg%n" /> + + + <property name="metricPattern" + value="{$mpPreamble}|{$mpTime}|{$mpLine1}|{$mpLine2}|{$mpLine3}|$mpLine4" /> + + <property name="transactionPattern" value="${metricPattern}" /> + + <appender name="ErrorOut" + class="ch.qos.logback.core.rolling.RollingFileAppender"> + <file>${logDir}/${errorLog}.log</file> + <rollingPolicy + class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy"> + <fileNamePattern>${logDir}/${errorLog}.%d{yyyy-MM-dd}.%i.log.zip + </fileNamePattern> + <maxFileSize>50MB</maxFileSize> + <maxHistory>30</maxHistory> + <totalSizeCap>10GB</totalSizeCap> + </rollingPolicy> + <filter class="ch.qos.logback.classic.filter.ThresholdFilter"> + <level>WARN</level> + </filter> + <encoder> + <pattern>${errorPattern}</pattern> + </encoder> + </appender> + + <appender name="AsyncErrorOut" + class="ch.qos.logback.classic.AsyncAppender"> + <appender-ref ref="ErrorOut" /> + </appender> + + <appender name="DebugOut" + class="ch.qos.logback.core.rolling.RollingFileAppender"> + <file>${logDir}/${debugLog}.log</file> + <rollingPolicy + class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy"> + <fileNamePattern>${logDir}/${debugLog}.%d{yyyy-MM-dd}.%i.log.zip + </fileNamePattern> + <maxFileSize>50MB</maxFileSize> + <maxHistory>30</maxHistory> + <totalSizeCap>10GB</totalSizeCap> + </rollingPolicy> + <encoder> + <pattern>${debugPattern}</pattern> + </encoder> + </appender> + + <appender name="AsyncDebugOut" + class="ch.qos.logback.classic.AsyncAppender"> + <appender-ref ref="DebugOut" /> + </appender> + + <appender name="NetworkOut" + class="ch.qos.logback.core.rolling.RollingFileAppender"> + <file>${logDir}/${networkLog}.log</file> + <rollingPolicy + class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy"> + <fileNamePattern>${logDir}/${networkLog}.%d{yyyy-MM-dd}.%i.log.zip + </fileNamePattern> + <maxFileSize>50MB</maxFileSize> + <maxHistory>30</maxHistory> + <totalSizeCap>10GB</totalSizeCap> + </rollingPolicy> + <encoder> + <pattern>${networkPattern}</pattern> + </encoder> + </appender> + + <appender name="AsyncNetworkOut" + class="ch.qos.logback.classic.AsyncAppender"> + <appender-ref ref="NetworkOut" /> + </appender> + + <appender name="MetricOut" + class="ch.qos.logback.core.rolling.RollingFileAppender"> + <file>${logDir}/${metricLog}.log</file> + <rollingPolicy + class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy"> + <fileNamePattern>${logDir}/${metricLog}.%d{yyyy-MM-dd}.%i.log.zip + </fileNamePattern> + <maxFileSize>50MB</maxFileSize> + <maxHistory>30</maxHistory> + <totalSizeCap>10GB</totalSizeCap> + </rollingPolicy> + <encoder> + <pattern>${metricPattern}</pattern> + </encoder> + </appender> + + <appender name="AsyncMetricOut" + class="ch.qos.logback.classic.AsyncAppender"> + <appender-ref ref="MetricOut" /> + </appender> + + <appender name="TransactionOut" + class="ch.qos.logback.core.rolling.RollingFileAppender"> + <file>${logDir}/${transactionLog}.log</file> + <rollingPolicy + class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy"> + <fileNamePattern>${logDir}/${transactionLog}.%d{yyyy-MM-dd}.%i.log.zip + </fileNamePattern> + <maxFileSize>50MB</maxFileSize> + <maxHistory>30</maxHistory> + <totalSizeCap>10GB</totalSizeCap> + </rollingPolicy> + <encoder> + <pattern>${transactionPattern}</pattern> + </encoder> + </appender> + + <appender name="AsyncTransactionOut" + class="ch.qos.logback.classic.AsyncAppender"> + <appender-ref ref="TransactionOut" /> + </appender> + + <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender"> + <encoder> + <Pattern>[%d{yyyy-MM-dd'T'HH:mm:ss.SSS+00:00, UTC}|%level|%logger{0}|%thread] %msg%n</Pattern> + </encoder> + </appender> + + <appender name="AsyncStdOut" class="ch.qos.logback.classic.AsyncAppender"> + <appender-ref ref="STDOUT" /> + </appender> + + + <logger name="network" level="INFO" additivity="false"> + <appender-ref ref="AsyncNetworkOut" /> + </logger> + + <logger name="org.eclipse.jetty.server.RequestLog" level="info" + additivity="false"> + <appender-ref ref="AsyncNetworkOut" /> + <appender-ref ref="AsyncStdOut" /> + </logger> + + <logger name="org.eclipse.jetty" level="ERROR" /> + + <root level="INFO"> + <appender-ref ref="AsyncDebugOut" /> + <appender-ref ref="AsyncErrorOut" /> + <appender-ref ref="AsyncMetricOut" /> + <appender-ref ref="AsyncTransactionOut" /> + <appender-ref ref="AsyncStdOut" /> + </root> + +</configuration> diff --git a/csit/config/cakey.pem b/csit/config/cakey.pem deleted file mode 100644 index 7ab3ba69..00000000 --- a/csit/config/cakey.pem +++ /dev/null @@ -1,30 +0,0 @@ ------BEGIN ENCRYPTED PRIVATE KEY----- -MIIFHDBOBgkqhkiG9w0BBQ0wQTApBgkqhkiG9w0BBQwwHAQIn7IXl9tp53oCAggA -MAwGCCqGSIb3DQIJBQAwFAYIKoZIhvcNAwcECM9vPkP/Ay5JBIIEyIHDtrUSJOPo -OT/ZqNZ2hCxa7nwJUPAE09elPML75FGLXFuKmZXSEKMsC5peGvFVBE0B1mRUVWob -CJQ8SMiMRfs8esQ7lH/MMwtVB40gjsjHgxZTcBJlzSOm26aXzm+M8TFLLrXLiN4g -bgRtdv2xESuZvb8oxz4/jysuhdVKGcsyFiOPvmC+sEwH4Np9Wb1XlKrgwNa1KIXz -SkEeqD8R5JYsn5PaVgXkC8idMXGePFR22Zp30FjF1PbXD8Mj4E8+DOTbBd1t61je -MMGQBmrhCSW/MMRc4Ae+Dpgggv1YeqDROXrJtA0tVOXMZ/S2Dx+zbVTiEyTfoXIf -3wHaMiQdavG90OQiX2QfffA8FNRf5Mhy6gPa8DmCEgYM0xdunZBju294O4rnfmzp -EIyocxfC2naICvHxRYkCSOz1M8y8X4vOOnkYYMsoKovznkGRQUBmXDox5ker4x8F -KnZpyaNsK0x3YxG9sBtQwd2HqxRsiNVEuMhCmS2GU1DKwnjW/UyyHPA0k61Y2Mph -l7K4xTxiSzk5kBIBq6UOdP1dFyt5VO8n5/heIl1Dt9F+xJomiX7aQOimKpmNTBr4 -unzNo4EZ6Xx9oO93LuybzH3zAOGat5JZ6hALHqmZ4/11+LR1Kn+vsc+VLuLnf0dR -BiXBihgec7k1paItLZmo4AeRoWoxuGxeZkDQxr/m3xpySsVW1A0NtlyfLx2Wc2a5 -SLRNJ7fGRmrxPm+46iD+um41LR47tT5umYm2gdNyvt8vk0TjU87RMaP+OzqpA+kS -+B4ep0gIX+8n2+AutTtAjm5V4dhW2lxvmJzlFA6R9rjlXuG1VupyTK729E6zPCzP -BmkRxQnLl4+RWjA+z0ODIRmvar/LJwG2NTRvigB6F5vX0h5Xh6HmiqVD/JpuANxF -zlKXLa+pxNnCuMxa7dRbG0FLYE70NTL61nyK/d5nIcbDTz3zkLdNSTE2j85TaohG -4WJE6NWpyUGqPTArG7ebWj4CDXbL+vJJsFwbisCD4B3xYtLKgKwGnea6mWBLAuLH -myE6U8Ixr8ldl91kFKJoDHcfJKh2m31sXOY3PSpCxpr1MDBvPhpcuQRVe0ees1PX -WZaW6oacsLSpjzzNY44MYxXDP+ciTM2602VVCXtt6+74NC0bvAzSIeY5lmOqTlA1 -xWSDfbZ+T7NbFpdFcjuApiyzsL41rEEnaqgWcA2ldBisQNeQut7xHjcTeFzeNyTe -Zy3e76wOi0fT5MZbsQLDcIUCW3deYgoBdeivTpMvfHnJImsKhGnO9kQGLwgSqgN8 -MU3abOhobfVtLIilYfqlm46XKFcsudL7wKrEhzx8D9vBHmN40WKu4A7oQQgmg+8Y -YZfUHDKGViIaqcieR9+6C3VQhDKLK4OBfg2g5b9bOqe6Fo+nXZI5pf/jxfP8eHXc -7xCvHbOahOy+R5LubLLxAJtQaf4X63bCJDKutJa5iCGi87rAwxh7sm0B7mkC4XpD -ont+Ose4GeiytJqqe6LlDdIjD7wQOAoBhb4DqX50tNiGa5ymBJEQ5Lq456dLUtY+ -5r7ARnBifzrKPSXqE79GNUMceI7BQlot/72WQIuD6MwBTe6FCUoNM+zMF4zzi7Ph -9MX3EFimqcL8H4x3wD1g4w== ------END ENCRYPTED PRIVATE KEY----- diff --git a/csit/config/careq.pem b/csit/config/careq.pem deleted file mode 100644 index 57b414d8..00000000 --- a/csit/config/careq.pem +++ /dev/null @@ -1,16 +0,0 @@ ------BEGIN CERTIFICATE REQUEST----- -MIICjDCCAXQCAQAwRzELMAkGA1UEBhMCVVMxEzARBgNVBAgMCk5ldyBKZXJzZXkx -DTALBgNVBAsMBE9OQVAxFDASBgNVBAMMC3BvbGljeS5vbmFwMIIBIjANBgkqhkiG -9w0BAQEFAAOCAQ8AMIIBCgKCAQEAozkMogBnADQwOp36opXoqvPKwlduH6bXH40o -zVLiTKLnKIFJ2edR7npSNGLMTvnFfIKg+L/yq+mcS6tjubm07uXF/LYxf2ie2WNW -itk4GBtvqREqr6ayo+q9AJ8aq35uhHylVq8OXFYLLOAJ8hhZAcuoAy3zjVYpNzh7 -reCbIp5GtIJanR3mior5ZD2Yr/D88QoSPpdMl13ezWDxoC8EwtZp2uul6x63t8i+ -GXcy5OWOH8WMvRe6E5FJptWaMvSkDVzDZVZQnDQpmQg2Fu+N/LkV0m/dCjEB++vz -DYWpK/X1LWtX+X1ZP++Dgt+Uk9MuueN1sc+SkqcF4Wh0N6mY5wIDAQABoAAwDQYJ -KoZIhvcNAQELBQADggEBAET3HRrtAz/COoIemC8Oo6JJm2f9umM0QPq0bijUA81Z -SFvnzfNhMZnvHdsAEl/VsBlqCSA+JLrPoXYhFV9YOYMHakuMToa7okW3yPPWbZRh -grFMCfRAO1j0INHA4emLASRkbEOE+R1ngkdoFv/EX0ImcyfMo/N+ls52QIAKo5cV -/Y6P0uXPqr4yOAaDZAyTKveQGdu1++SkTpZBBNdmq352FyARpH1CTB28oTy5tpl/ -wETVCcMxi9MYET4MGQSxQga91xyntjczjWGqnMpkTe35DVl4qAdrtkZHcvgM4WQ5 -HTxc7sBCRzvEAdI7a+uG6Tb5pJ4hvwCtjuIZApzsZWU= ------END CERTIFICATE REQUEST----- diff --git a/csit/config/caroot.cer b/csit/config/caroot.cer deleted file mode 100644 index f09d7630..00000000 --- a/csit/config/caroot.cer +++ /dev/null @@ -1,19 +0,0 @@ ------BEGIN CERTIFICATE----- -MIIDFTCCAf0CFF9v497aX5+9X6xnUe8EUAITW8hpMA0GCSqGSIb3DQEBCwUAMEcx -CzAJBgNVBAYTAlVTMRMwEQYDVQQIDApOZXcgSmVyc2V5MQ0wCwYDVQQLDARPTkFQ -MRQwEgYDVQQDDAtwb2xpY3kub25hcDAeFw0yMjA5MDUxMzQzMDhaFw0zMjA5MDIx -MzQzMDhaMEcxCzAJBgNVBAYTAlVTMRMwEQYDVQQIDApOZXcgSmVyc2V5MQ0wCwYD -VQQLDARPTkFQMRQwEgYDVQQDDAtwb2xpY3kub25hcDCCASIwDQYJKoZIhvcNAQEB -BQADggEPADCCAQoCggEBAKM5DKIAZwA0MDqd+qKV6KrzysJXbh+m1x+NKM1S4kyi -5yiBSdnnUe56UjRizE75xXyCoPi/8qvpnEurY7m5tO7lxfy2MX9ontljVorZOBgb -b6kRKq+msqPqvQCfGqt+boR8pVavDlxWCyzgCfIYWQHLqAMt841WKTc4e63gmyKe -RrSCWp0d5oqK+WQ9mK/w/PEKEj6XTJdd3s1g8aAvBMLWadrrpeset7fIvhl3MuTl -jh/FjL0XuhORSabVmjL0pA1cw2VWUJw0KZkINhbvjfy5FdJv3QoxAfvr8w2FqSv1 -9S1rV/l9WT/vg4LflJPTLrnjdbHPkpKnBeFodDepmOcCAwEAATANBgkqhkiG9w0B -AQsFAAOCAQEAaWmjOUU0XyWpt27D8U2+2OIbWyeUz9L9HBppVzcadJo1CdNR2nvK -eESF12rg5uRy8E7gOKaYw1TZ7eLiTEAX2qkRaSknn72zQ6JcmRYKAOkA0qUhXKy9 -Jq+wo3M68mO7lam7BKqADPEq6a1t/QXWchA0mpQFbLM6w0l5V8k3cZqDRBiRgU1f -CNFEGY/YlT3r28jUbuYh1WerBPxw28TkFKaoxVvJ6FkAVqu0DYSexW+Y9ewRz4kK -9tXTIWYk87Q1F4gJc1f9rvgKMMcrWkIwb1AExkf35TBlKtVwCACqgNoMnszDMMf/ -/WCpM5vmC/6YoHpX5gD9GnoEk6MkYWbxKQ== ------END CERTIFICATE----- diff --git a/csit/config/distribution/defaultConfig.json b/csit/config/distribution/defaultConfig.json index facee9bc..de9f6adc 100644 --- a/csit/config/distribution/defaultConfig.json +++ b/csit/config/distribution/defaultConfig.json @@ -5,7 +5,7 @@ "port":6969, "userName":"healthcheck", "password":"zb!XztG34", - "https": true + "https": false }, "receptionHandlerParameters":{ "FileReceptionHandler":{ @@ -64,7 +64,7 @@ "userName": "healthcheck", "password": "zb!XztG34" }, - "isHttps": true, + "isHttps": false, "deployPolicies": true } } diff --git a/csit/config/drools-apps/custom/engine.properties b/csit/config/drools-apps/custom/engine.properties new file mode 100644 index 00000000..0686d875 --- /dev/null +++ b/csit/config/drools-apps/custom/engine.properties @@ -0,0 +1,50 @@ +### +# ============LICENSE_START======================================================= +# ONAP +# ================================================================================ +# Copyright (C) 2019, 2021 AT&T Intellectual Property. All rights reserved. +# Modifications Copyright (C) 2022 Nordix Foundation. +# ================================================================================ +# 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========================================================= +### + +# Policy Engine Configuration Channels + +dmaap.source.topics=PDPD-CONFIGURATION + +dmaap.source.topics.PDPD-CONFIGURATION.servers=${envd:DMAAP_SERVERS} +dmaap.source.topics.PDPD-CONFIGURATION.effectiveTopic=${envd:PDPD_CONFIGURATION_TOPIC} +dmaap.source.topics.PDPD-CONFIGURATION.apiKey=${envd:PDPD_CONFIGURATION_API_KEY} +dmaap.source.topics.PDPD-CONFIGURATION.apiSecret=${envd:PDPD_CONFIGURATION_API_SECRET} +dmaap.source.topics.PDPD-CONFIGURATION.consumerGroup=${envd:PDPD_CONFIGURATION_CONSUMER_GROUP} +dmaap.source.topics.PDPD-CONFIGURATION.consumerInstance=${envd:PDPD_CONFIGURATION_CONSUMER_INSTANCE} +dmaap.source.topics.PDPD-CONFIGURATION.managed=false +dmaap.source.topics.PDPD-CONFIGURATION.https=${envd:DMAAP_HTTPS:false} + +http.server.services=SECURED-CONFIG + +http.server.services.SECURED-CONFIG.host=${envd:TELEMETRY_HOST} +http.server.services.SECURED-CONFIG.port=9696 +http.server.services.SECURED-CONFIG.userName=${envd:TELEMETRY_USER} +http.server.services.SECURED-CONFIG.password=${envd:TELEMETRY_PASSWORD} +http.server.services.SECURED-CONFIG.restPackages=org.onap.policy.drools.server.restful +http.server.services.SECURED-CONFIG.managed=false +http.server.services.SECURED-CONFIG.swagger=true +http.server.services.SECURED-CONFIG.https=false +http.server.services.SECURED-CONFIG.aaf=${envd:AAF:false} +http.server.services.SECURED-CONFIG.serialization.provider=org.onap.policy.common.gson.JacksonHandler,org.onap.policy.common.endpoints.http.server.YamlJacksonHandler + +aaf.namespace=${envd:AAF_NAMESPACE:false} +aaf.root.permission=${envd:AAF_NAMESPACE:org.onap.policy}.pdpd + diff --git a/csit/config/drools-apps/custom/feature-healthcheck.properties b/csit/config/drools-apps/custom/feature-healthcheck.properties new file mode 100644 index 00000000..fd402eb7 --- /dev/null +++ b/csit/config/drools-apps/custom/feature-healthcheck.properties @@ -0,0 +1,32 @@ +### +# ============LICENSE_START======================================================= +# feature-healthcheck +# ================================================================================ +# Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved. +# Modifications Copyright (C) 2022 Nordix Foundation. +# ================================================================================ +# 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========================================================= +### + +http.server.services=HEALTHCHECK +http.server.services.HEALTHCHECK.host=0.0.0.0 +http.server.services.HEALTHCHECK.port=6969 +http.server.services.HEALTHCHECK.restClasses=org.onap.policy.drools.healthcheck.RestHealthCheck +http.server.services.HEALTHCHECK.managed=false +http.server.services.HEALTHCHECK.swagger=true +http.server.services.HEALTHCHECK.userName=${env:HEALTHCHECK_USER} +http.server.services.HEALTHCHECK.password=${env:HEALTHCHECK_PASSWORD} +http.server.services.HEALTHCHECK.https=false +http.server.services.HEALTHCHECK.aaf=${env:AAF} +http.server.services.HEALTHCHECK.serialization.provider=org.onap.policy.common.gson.JacksonHandler,org.onap.policy.common.endpoints.http.server.YamlJacksonHandler diff --git a/csit/config/drools-apps/custom/policy-keystore b/csit/config/drools-apps/custom/policy-keystore Binary files differdeleted file mode 100644 index b3603086..00000000 --- a/csit/config/drools-apps/custom/policy-keystore +++ /dev/null diff --git a/csit/config/drools-apps/custom/policy-truststore b/csit/config/drools-apps/custom/policy-truststore Binary files differdeleted file mode 100644 index 0b78cafb..00000000 --- a/csit/config/drools-apps/custom/policy-truststore +++ /dev/null diff --git a/csit/config/drools-apps/env/base.conf b/csit/config/drools-apps/env/base.conf index 5b08d343..7c2e132e 100644 --- a/csit/config/drools-apps/env/base.conf +++ b/csit/config/drools-apps/env/base.conf @@ -1,5 +1,6 @@ # ============LICENSE_START================================================== # Copyright (C) 2020 AT&T Intellectual Property. All rights reserved. +# Modifications Copyright (C) 2022 Nordix Foundation. # =========================================================================== # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -55,6 +56,10 @@ AAF=false AAF_NAMESPACE=org.onap.policy AAF_HOST=aaf.api.simpledemo.onap.org +# HTTP Servers + +HTTP_SERVER_HTTPS=false + # PDP-D DMaaP configuration channel PDPD_CONFIGURATION_TOPIC=PDPD-CONFIGURATION @@ -87,6 +92,7 @@ PDP_PASSWORD=zb!XztG34 PDP_CLIENT_USERNAME=python PDP_CLIENT_PASSWORD=test PDP_ENVIRONMENT=TEST +PDP_HTTPS=false # DCAE DMaaP @@ -97,6 +103,7 @@ DCAE_CONSUMER_GROUP=dcae.policy.shared # Open DMaaP DMAAP_SERVERS=simulator +DMAAP_HTTPS=false # AAI @@ -105,13 +112,14 @@ AAI_PORT=6666 AAI_CONTEXT_URI= AAI_USERNAME=policy@policy.onap.org AAI_PASSWORD=demo123456! +AAI_HTTPS=false # MSO SO_HOST=simulator SO_PORT=6669 SO_CONTEXT_URI= -SO_URL=https://simulator:6669/ +SO_URL=http://simulator:6669/ SO_USERNAME=InfraPortalClient SO_PASSWORD=password1$ diff --git a/csit/config/drools/custom/engine.properties b/csit/config/drools/custom/engine.properties new file mode 100644 index 00000000..0686d875 --- /dev/null +++ b/csit/config/drools/custom/engine.properties @@ -0,0 +1,50 @@ +### +# ============LICENSE_START======================================================= +# ONAP +# ================================================================================ +# Copyright (C) 2019, 2021 AT&T Intellectual Property. All rights reserved. +# Modifications Copyright (C) 2022 Nordix Foundation. +# ================================================================================ +# 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========================================================= +### + +# Policy Engine Configuration Channels + +dmaap.source.topics=PDPD-CONFIGURATION + +dmaap.source.topics.PDPD-CONFIGURATION.servers=${envd:DMAAP_SERVERS} +dmaap.source.topics.PDPD-CONFIGURATION.effectiveTopic=${envd:PDPD_CONFIGURATION_TOPIC} +dmaap.source.topics.PDPD-CONFIGURATION.apiKey=${envd:PDPD_CONFIGURATION_API_KEY} +dmaap.source.topics.PDPD-CONFIGURATION.apiSecret=${envd:PDPD_CONFIGURATION_API_SECRET} +dmaap.source.topics.PDPD-CONFIGURATION.consumerGroup=${envd:PDPD_CONFIGURATION_CONSUMER_GROUP} +dmaap.source.topics.PDPD-CONFIGURATION.consumerInstance=${envd:PDPD_CONFIGURATION_CONSUMER_INSTANCE} +dmaap.source.topics.PDPD-CONFIGURATION.managed=false +dmaap.source.topics.PDPD-CONFIGURATION.https=${envd:DMAAP_HTTPS:false} + +http.server.services=SECURED-CONFIG + +http.server.services.SECURED-CONFIG.host=${envd:TELEMETRY_HOST} +http.server.services.SECURED-CONFIG.port=9696 +http.server.services.SECURED-CONFIG.userName=${envd:TELEMETRY_USER} +http.server.services.SECURED-CONFIG.password=${envd:TELEMETRY_PASSWORD} +http.server.services.SECURED-CONFIG.restPackages=org.onap.policy.drools.server.restful +http.server.services.SECURED-CONFIG.managed=false +http.server.services.SECURED-CONFIG.swagger=true +http.server.services.SECURED-CONFIG.https=false +http.server.services.SECURED-CONFIG.aaf=${envd:AAF:false} +http.server.services.SECURED-CONFIG.serialization.provider=org.onap.policy.common.gson.JacksonHandler,org.onap.policy.common.endpoints.http.server.YamlJacksonHandler + +aaf.namespace=${envd:AAF_NAMESPACE:false} +aaf.root.permission=${envd:AAF_NAMESPACE:org.onap.policy}.pdpd + diff --git a/csit/config/drools/custom/feature-healthcheck.properties b/csit/config/drools/custom/feature-healthcheck.properties new file mode 100644 index 00000000..b3c819fc --- /dev/null +++ b/csit/config/drools/custom/feature-healthcheck.properties @@ -0,0 +1,31 @@ +### +# ============LICENSE_START======================================================= +# feature-healthcheck +# ================================================================================ +# Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved. +# ================================================================================ +# 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========================================================= +### + +http.server.services=HEALTHCHECK +http.server.services.HEALTHCHECK.host=0.0.0.0 +http.server.services.HEALTHCHECK.port=6969 +http.server.services.HEALTHCHECK.restClasses=org.onap.policy.drools.healthcheck.RestHealthCheck +http.server.services.HEALTHCHECK.managed=false +http.server.services.HEALTHCHECK.swagger=true +http.server.services.HEALTHCHECK.userName=${env:HEALTHCHECK_USER} +http.server.services.HEALTHCHECK.password=${env:HEALTHCHECK_PASSWORD} +http.server.services.HEALTHCHECK.https=false +http.server.services.HEALTHCHECK.aaf=${env:AAF} +http.server.services.HEALTHCHECK.serialization.provider=org.onap.policy.common.gson.JacksonHandler,org.onap.policy.common.endpoints.http.server.YamlJacksonHandler diff --git a/csit/config/drools/custom/policy-keystore b/csit/config/drools/custom/policy-keystore Binary files differdeleted file mode 100644 index b3603086..00000000 --- a/csit/config/drools/custom/policy-keystore +++ /dev/null diff --git a/csit/config/drools/custom/policy-truststore b/csit/config/drools/custom/policy-truststore Binary files differdeleted file mode 100644 index 0b78cafb..00000000 --- a/csit/config/drools/custom/policy-truststore +++ /dev/null diff --git a/csit/config/drools/env/base.conf b/csit/config/drools/env/base.conf index 891de49f..b1ad609e 100644 --- a/csit/config/drools/env/base.conf +++ b/csit/config/drools/env/base.conf @@ -1,5 +1,7 @@ # ============LICENSE_START======================================================= -# Copyright (C) 2020 AT&T Intellectual Property. All rights reserved. +# Copyright (C) 2020-2021 AT&T Intellectual Property. All rights reserved. +# Modifications Copyright (C) 2021 Bell Canada. All rights reserved. +# Modifications Copyright (C) 2022 Nordix Foundation. # ================================================================================ # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -48,6 +50,7 @@ REPOSITORY_OFFLINE=false SQL_HOST=mariadb SQL_USER=policy_user SQL_PASSWORD=policy_user +SQL_PORT=3306 # AAF @@ -55,6 +58,11 @@ AAF=false AAF_NAMESPACE=org.onap.policy AAF_HOST=aaf.api.simpledemo.onap.org +# HTTP Servers + +HTTP_SERVER_HTTPS=false +PROMETHEUS=true + # PDP-D DMaaP configuration channel PDPD_CONFIGURATION_TOPIC=PDPD-CONFIGURATION @@ -86,6 +94,7 @@ PDP_PASSWORD= PDP_CLIENT_USERNAME= PDP_CLIENT_PASSWORD= PDP_ENVIRONMENT= +PDP_HTTPS=false GUARD_DISABLED=false # DCAE DMaaP @@ -97,6 +106,7 @@ DCAE_CONSUMER_GROUP=dcae.policy.shared # Open DMaaP DMAAP_SERVERS=mr.api.simpledemo.onap.org +DMAAP_HTTPS=false # AAI @@ -105,6 +115,7 @@ AAI_PORT=8443 AAI_CONTEXT_URI= AAI_USERNAME=policy@policy.onap.org AAI_PASSWORD=demo123456! +AAI_HTTPS=false # MSO diff --git a/csit/config/ks.cer b/csit/config/ks.cer deleted file mode 100644 index 463098c7..00000000 --- a/csit/config/ks.cer +++ /dev/null @@ -1,29 +0,0 @@ ------BEGIN CERTIFICATE----- -MIIE+jCCA+KgAwIBAgIUNDLU1bXxnW46HpC3FmOFcJungPYwDQYJKoZIhvcNAQEL -BQAwRzELMAkGA1UEBhMCVVMxEzARBgNVBAgMCk5ldyBKZXJzZXkxDTALBgNVBAsM -BE9OQVAxFDASBgNVBAMMC3BvbGljeS5vbmFwMB4XDTIyMDkwNTEzNDMxMFoXDTIy -MTAwNTEzNDMxMFowYjEPMA0GA1UEAxMGcG9saWN5MSMwIQYDVQQLDBpwb2xpY3lA -cG9saWN5Lm9uYXAub3JnOkRFVjEOMAwGA1UECxMFT1NBQUYxDTALBgNVBAoTBE9O -QVAxCzAJBgNVBAYTAlVTMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA -jS6rhuIhW3O8I12CEwPqpvseVLrghXU5JnBiOhWUbVsMwbAhQvGbte5Z7k8kmPEd -c84xfpmFHl/4jP2ada/QbJIT5kIrqBcocivyXIbztnThsCWPbKFBduvvtRxTCN+X -0iSNux6vyHpfFB4PONzy/CdtRjgeO9Rbm4xYOgvvtLXGVuJ9oELMPNfVr5kFUUnv -L9F7alE0wEVC1uDnU9EmGZFnEkfLLkcTVYUtlI8xzXSf24KN6ZjGHK2m8454PuK0 -/H1a1F5M4IdseVQK/OrOPxwGVgVZAIL0NIaw0i27Lu0S4t6Wpf5MtnYZmNix/8Pp -qWeHaD5bUKVw93kigTw8PwIDAQABo4IBwTCCAb0wggEsBgNVHREEggEjMIIBH4IG -cG9saWN5ggZkcm9vbHOCC2Ryb29scy5vbmFwgg9wb2xpY3ktYXBleC1wZHCCFHBv -bGljeS1hcGV4LXBkcC5vbmFwggpwb2xpY3ktYXBpgg9wb2xpY3ktYXBpLm9uYXCC -E3BvbGljeS1kaXN0cmlidXRpb26CGHBvbGljeS1kaXN0cmlidXRpb24ub25hcIIK -cG9saWN5LXBhcIIPcG9saWN5LXBhcC5vbmFwghBwb2xpY3kteGFjbWwtcGRwghVw -b2xpY3kteGFjbWwtcGRwLm9uYXCCCXNpbXVsYXRvcoIHYWFpLXNpbYIIZ3JwYy1z -aW2CCHNkbmMtc2ltggZzby1zaW2CB3ZmYy1zaW2CDm1lc3NhZ2Utcm91dGVyMB0G -A1UdDgQWBBSznyg3j4ur3Wgde/s77TiApn3lGzBsBgNVHSMEZTBjoUukSTBHMQsw -CQYDVQQGEwJVUzETMBEGA1UECAwKTmV3IEplcnNleTENMAsGA1UECwwET05BUDEU -MBIGA1UEAwwLcG9saWN5Lm9uYXCCFF9v497aX5+9X6xnUe8EUAITW8hpMA0GCSqG -SIb3DQEBCwUAA4IBAQAOylfCbpJXxWdjUvdevkHvmSjBuX2IqrAohptTs/lutDFx -fm5l7ymTudg0CLPI+iYjG25ykf2ysUhxCk4VWjE6L2B4XGo6d4S1n5Gef0XDpWkA -zASUn1M22rkJWZsM55Kti6l57T++eiBzo6KjM3NzX4+a9P7ZzacrKMpNxBitq+IE -iJiY0INSlwO3kvUrqm7nWShgSQVksTzYVZHjZmVj9VaVo8Q49EIrHEpxAKgC/Y0M -dtZy6n2wvSurdcJtRMRZAows1pi3jFA/U82H3menh3dAhwr3hrRSfdjbzMg2HVeX -Z6vhpJ2xPa46US9j+sbL/6YriZOADkdcNe4C54qD ------END CERTIFICATE----- diff --git a/csit/config/ks.csr b/csit/config/ks.csr deleted file mode 100644 index 6c405de1..00000000 --- a/csit/config/ks.csr +++ /dev/null @@ -1,18 +0,0 @@ ------BEGIN NEW CERTIFICATE REQUEST----- -MIIC1zCCAb8CAQAwYjEPMA0GA1UEAxMGcG9saWN5MSMwIQYDVQQLDBpwb2xpY3lA
-cG9saWN5Lm9uYXAub3JnOkRFVjEOMAwGA1UECxMFT1NBQUYxDTALBgNVBAoTBE9O
-QVAxCzAJBgNVBAYTAlVTMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA
-jS6rhuIhW3O8I12CEwPqpvseVLrghXU5JnBiOhWUbVsMwbAhQvGbte5Z7k8kmPEd
-c84xfpmFHl/4jP2ada/QbJIT5kIrqBcocivyXIbztnThsCWPbKFBduvvtRxTCN+X
-0iSNux6vyHpfFB4PONzy/CdtRjgeO9Rbm4xYOgvvtLXGVuJ9oELMPNfVr5kFUUnv
-L9F7alE0wEVC1uDnU9EmGZFnEkfLLkcTVYUtlI8xzXSf24KN6ZjGHK2m8454PuK0
-/H1a1F5M4IdseVQK/OrOPxwGVgVZAIL0NIaw0i27Lu0S4t6Wpf5MtnYZmNix/8Pp
-qWeHaD5bUKVw93kigTw8PwIDAQABoDAwLgYJKoZIhvcNAQkOMSEwHzAdBgNVHQ4E
-FgQUs58oN4+Lq91oHXv7O+04gKZ95RswDQYJKoZIhvcNAQELBQADggEBAAwlPDBX
-urNeBAuIW8whtTPeuvDxlNYyotxvgJSD1wDmdYVFTd2lE0ibyCcc/6lKr9LYyjt9
-zpN+6CQOVk2rKTstbI0ZEmAbOA4p4dFOhPBmrOTdghc30NCNuoqnnUiOGsy4fkrh
-4uT46trLKhDdYlKEYWBeG3GfVyxhV1Zzf6ftf8Ab4TgFfacThpfe5cv9TLT9Nmpl
-cTcd2EwuRtkx9EpK/mqKqNTO0ZHB+aJ6YsrXxErNBd1zkeD0+mdU/CFgXJw1t2G7
-bARt8ybQ/caD9gjPL9sdrmV3dbG10d0saWcJc8KqzImURmnsu+Wdzf6kcSGwuHjU
-vgMUceeN155oQwg= ------END NEW CERTIFICATE REQUEST----- diff --git a/csit/config/ks.jks b/csit/config/ks.jks Binary files differdeleted file mode 100644 index b3603086..00000000 --- a/csit/config/ks.jks +++ /dev/null diff --git a/csit/config/pap/defaultConfig.json b/csit/config/pap/defaultConfig.json index 0d324df5..fd4b0459 100644 --- a/csit/config/pap/defaultConfig.json +++ b/csit/config/pap/defaultConfig.json @@ -5,7 +5,7 @@ "port": 6969, "userName": "healthcheck", "password": "zb!XztG34", - "https": true, + "https": false, "aaf": false }, "pdpParameters": { @@ -34,21 +34,21 @@ "topic" : "POLICY-PDP-PAP", "servers" : [ "simulator" ], "topicCommInfrastructure" : "dmaap", - "useHttps": true, + "useHttps": false, "allowSelfSignedCerts" : true }], "topicSinks" : [{ "topic" : "POLICY-PDP-PAP", "servers" : [ "simulator" ], "topicCommInfrastructure" : "dmaap", - "useHttps": true, + "useHttps": false, "allowSelfSignedCerts" : true }, { "topic" : "POLICY-NOTIFICATION", "servers" : [ "simulator" ], "topicCommInfrastructure" : "dmaap", - "useHttps": true, + "useHttps": false, "allowSelfSignedCerts" : true }] }, @@ -58,7 +58,7 @@ "port": 6969, "userName": "healthcheck", "password": "zb!XztG34", - "useHttps": true, + "useHttps": false, "allowSelfSignedCerts" : true, "basePath": "policy/api/v1/healthcheck" }] diff --git a/csit/config/policy-truststore b/csit/config/policy-truststore Binary files differdeleted file mode 100644 index 0b78cafb..00000000 --- a/csit/config/policy-truststore +++ /dev/null diff --git a/csit/config/sim-all/simParameters.json b/csit/config/sim-all/simParameters.json index 4b009b6f..b704e69f 100644 --- a/csit/config/sim-all/simParameters.json +++ b/csit/config/sim-all/simParameters.json @@ -8,15 +8,15 @@ "name": "DMaaP simulator", "providerClass": "org.onap.policy.models.sim.dmaap.rest.DmaapSimRestControllerV1", "host": "0.0.0.0", - "port": 3905, - "https": true + "port": 3904, + "https": false }, { "name": "A&AI simulator", "providerClass": "org.onap.policy.simulators.AaiSimulatorJaxRs", "host": "0.0.0.0", "port": 6666, - "https": true, + "https": false, "userName": "policy@policy.onap.org", "password": "demo123456!" }, @@ -25,7 +25,7 @@ "providerClass": "org.onap.policy.simulators.SdncSimulatorJaxRs", "host": "0.0.0.0", "port": 6668, - "https": true + "https": false }, { "name": "SO simulator", @@ -41,7 +41,7 @@ "providerClass": "org.onap.policy.simulators.VfcSimulatorJaxRs", "host": "0.0.0.0", "port": 6670, - "https": true + "https": false } ], "topicSinks": [ @@ -49,7 +49,7 @@ "topic": "APPC-CL", "servers": ["${HOST_NAME}"], "topicCommInfrastructure": "DMAAP", - "useHttps": true, + "useHttps": false, "apiKey": "some-key", "apiSecret": "some-secret" }, @@ -57,7 +57,7 @@ "topic": "APPC-LCM-WRITE", "servers": ["${HOST_NAME}"], "topicCommInfrastructure": "DMAAP", - "useHttps": true, + "useHttps": false, "apiKey": "some-key", "apiSecret": "some-secret" } @@ -67,7 +67,7 @@ "topic": "APPC-CL", "servers": ["${HOST_NAME}"], "topicCommInfrastructure": "DMAAP", - "useHttps": true, + "useHttps": false, "apiKey": "some-key", "apiSecret": "some-secret" }, @@ -75,7 +75,7 @@ "topic": "APPC-LCM-READ", "servers": ["${HOST_NAME}"], "topicCommInfrastructure": "DMAAP", - "useHttps": true, + "useHttps": false, "apiKey": "some-key", "apiSecret": "some-secret" } diff --git a/csit/config/xacml-pdp/defaultConfig.json b/csit/config/xacml-pdp/defaultConfig.json index 6ff07395..abf6854b 100644 --- a/csit/config/xacml-pdp/defaultConfig.json +++ b/csit/config/xacml-pdp/defaultConfig.json @@ -7,7 +7,7 @@ "port": 6969, "userName": "healthcheck", "password": "zb!XztG34", - "https": true, + "https": false, "aaf": false }, "policyApiParameters": { @@ -15,7 +15,7 @@ "port": 6969, "userName": "healthcheck", "password": "zb!XztG34", - "https": true, + "https": false, "aaf": false }, "applicationPath": "/opt/app/policy/pdpx/apps", @@ -24,14 +24,14 @@ "topic" : "POLICY-PDP-PAP", "servers" : [ "simulator" ], "topicCommInfrastructure" : "dmaap", - "useHttps" : true, + "useHttps" : false, "allowSelfSignedCerts" : true }], "topicSinks" : [{ "topic" : "POLICY-PDP-PAP", "servers" : [ "simulator" ], "topicCommInfrastructure" : "dmaap", - "useHttps" : true, + "useHttps" : false, "allowSelfSignedCerts" : true }] } diff --git a/csit/distribution/tests/distribution-test.robot b/csit/distribution/tests/distribution-test.robot index 64a77e06..13808287 100644 --- a/csit/distribution/tests/distribution-test.robot +++ b/csit/distribution/tests/distribution-test.robot @@ -34,8 +34,8 @@ InvokeDistributionUsingFile And RunEventOnApexEngine PeformGetRequest [Arguments] ${url} ${expectedstatus} ${auth}= Create List healthcheck zb!XztG34 - Log Creating session https://${POLICY_DISTRIBUTION_IP}:6969 - ${session}= Create Session policy https://${POLICY_DISTRIBUTION_IP}:6969 auth=${auth} + Log Creating session http://${POLICY_DISTRIBUTION_IP}:6969 + ${session}= Create Session policy http://${POLICY_DISTRIBUTION_IP}:6969 auth=${auth} ${headers}= Create Dictionary Accept=application/json Content-Type=application/json ${resp}= GET On Session policy ${url} headers=${headers} expected_status=${expectedstatus} Log Received response from policy ${resp.text} diff --git a/csit/docker-compose-all.yml b/csit/docker-compose-all.yml index afdc364b..0928f028 100644 --- a/csit/docker-compose-all.yml +++ b/csit/docker-compose-all.yml @@ -2,6 +2,7 @@ # ===========LICENSE_START==================================================== # Copyright (C) 2020-2021 AT&T Intellectual Property. All rights reserved. # Modifications Copyright (C) 2021 Bell Canada. All rights reserved. +# Modifications Copyright (C) 2022 Nordix Foundation. # ============================================================================ # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -19,7 +20,7 @@ version: '2' services: mariadb: - image: nexus3.onap.org:10001/mariadb:${POLICY_MARIADB_VER} + image: ${CONTAINER_LOCATION}mariadb:${POLICY_MARIADB_VER} container_name: mariadb hostname: mariadb command: ['--lower-case-table-names=1', '--wait_timeout=28800'] @@ -29,21 +30,19 @@ services: expose: - 3306 simulator: - image: nexus3.onap.org:10001/onap/policy-models-simulator:${POLICY_MODELS_VERSION} + image: ${CONTAINER_LOCATION}onap/policy-models-simulator:${POLICY_MODELS_VERSION} container_name: simulator hostname: simulator volumes: - ./config/sim-all:/opt/app/policy/simulators/etc/mounted:ro - - ./config/ks.jks:/opt/app/policy/simulators/etc/ssl/policy-keystore:ro - - ./config/policy-truststore:/opt/app/policy/simulators/etc/ssl/policy-truststore:ro expose: - 6666 - 6668 - 6669 - 6670 - - 3905 + - 3904 api: - image: nexus3.onap.org:10001/onap/policy-api:${POLICY_API_VERSION} + image: ${CONTAINER_LOCATION}onap/policy-api:${POLICY_API_VERSION} container_name: policy-api depends_on: - mariadb @@ -51,16 +50,16 @@ services: expose: - 6969 volumes: + - ./config/api/defaultConfig.json:/opt/app/policy/api/etc/defaultConfig.json:ro + - ./config/api/logback.xml:/opt/app/policy/api/etc/logback.xml:ro - ./wait_for_port.sh:/opt/app/policy/api/bin/wait_for_port.sh:ro - - ./config/ks.jks:/opt/app/policy/api/etc/ssl/policy-keystore:ro - - ./config/policy-truststore:/opt/app/policy/api/etc/ssl/policy-truststore:ro entrypoint: ./wait_for_port.sh command: [ '-c', './policy-api.sh', 'mariadb', '3306' ] pap: - image: nexus3.onap.org:10001/onap/policy-pap:${POLICY_PAP_VERSION} + image: ${CONTAINER_LOCATION}onap/policy-pap:${POLICY_PAP_VERSION} container_name: policy-pap depends_on: - mariadb @@ -72,17 +71,15 @@ services: volumes: - ./config/pap/defaultConfig.json:/opt/app/policy/pap/etc/defaultConfig.json:ro - ./wait_for_port.sh:/opt/app/policy/pap/bin/wait_for_port.sh:ro - - ./config/ks.jks:/opt/app/policy/pap/etc/ssl/policy-keystore:ro - - ./config/policy-truststore:/opt/app/policy/pap/etc/ssl/policy-truststore:ro entrypoint: ./wait_for_port.sh command: [ '-c', './policy-pap.sh', 'mariadb', '3306', - 'simulator', '3905', + 'simulator', '3904', 'api', '6969' ] xacml-pdp: - image: nexus3.onap.org:10001/onap/policy-xacml-pdp:${POLICY_XACML_PDP_VERSION} + image: ${CONTAINER_LOCATION}onap/policy-xacml-pdp:${POLICY_XACML_PDP_VERSION} container_name: policy-xacml-pdp depends_on: - mariadb @@ -94,17 +91,15 @@ services: volumes: - ./config/xacml-pdp/defaultConfig.json:/opt/app/policy/pdpx/etc/defaultConfig.json:ro - ./wait_for_port.sh:/opt/app/policy/pdpx/bin/wait_for_port.sh:ro - - ./config/ks.jks:/opt/app/policy/pdpx/etc/ssl/policy-keystore:ro - - ./config/policy-truststore:/opt/app/policy/pdpx/etc/ssl/policy-truststore:ro entrypoint: ./wait_for_port.sh command: [ '-c', './policy-pdpx.sh', 'mariadb', '3306', - 'simulator', '3905', + 'simulator', '3904', 'pap', '6969' ] drools: - image: nexus3.onap.org:10001/onap/policy-drools:${POLICY_DROOLS_PDP_VERSION} + image: ${CONTAINER_LOCATION}onap/policy-drools:${POLICY_DROOLS_PDP_VERSION} container_name: drools depends_on: - mariadb @@ -123,10 +118,10 @@ services: command: [ '-c', '/opt/app/policy/bin/pdpd-entrypoint.sh boot', 'mariadb', '3306', - 'simulator', '3905' + 'simulator', '3904' ] drools-apps: - image: nexus3.onap.org:10001/onap/policy-pdpd-cl:${POLICY_DROOLS_APPS_VERSION} + image: ${CONTAINER_LOCATION}onap/policy-pdpd-cl:${POLICY_DROOLS_APPS_VERSION} container_name: drools-apps depends_on: - mariadb @@ -148,7 +143,7 @@ services: command: [ '-c', '/opt/app/policy/bin/pdpd-cl-entrypoint.sh boot', 'mariadb', '3306', - 'simulator', '3905', + 'simulator', '3904', 'pap', '6969', 'simulator', '6666', 'simulator', '6668', @@ -156,7 +151,7 @@ services: 'simulator', '6670' ] apex-pdp: - image: nexus3.onap.org:10001/onap/policy-apex-pdp:${POLICY_APEX_PDP_VERSION} + image: ${CONTAINER_LOCATION}onap/policy-apex-pdp:${POLICY_APEX_PDP_VERSION} container_name: policy-apex-pdp depends_on: - mariadb @@ -168,18 +163,16 @@ services: - 23324 volumes: - ./config/apex-pdp/OnapPfConfig.json:/opt/app/policy/apex-pdp/etc/onappf/config/OnapPfConfig.json:ro - - ./config/ks.jks:/opt/app/policy/apex-pdp/etc/ssl/policy-keystore:ro - - ./config/policy-truststore:/opt/app/policy/apex-pdp/etc/ssl/policy-truststore:ro - ./wait_for_port.sh:/opt/app/policy/bin/wait_for_port.sh:ro entrypoint: /opt/app/policy/bin/wait_for_port.sh command: [ '-c', '/opt/app/policy/apex-pdp/bin/apexOnapPf.sh -c /opt/app/policy/apex-pdp/etc/onappf/config/OnapPfConfig.json', 'mariadb', '3306', - 'simulator', '3905', + 'simulator', '3904', 'pap', '6969' ] distribution: - image: nexus3.onap.org:10001/onap/policy-distribution:${POLICY_DISTRIBUTION_VERSION} + image: ${CONTAINER_LOCATION}onap/policy-distribution:${POLICY_DISTRIBUTION_VERSION} container_name: policy-distribution depends_on: - mariadb @@ -189,15 +182,13 @@ services: hostname: policy-distribution volumes: - ./config/distribution/defaultConfig.json:/opt/app/policy/distribution/etc/defaultConfig.json:ro - - ./config/ks.jks:/opt/app/policy/distribution/etc/ssl/policy-keystore:ro - - ./config/policy-truststore:/opt/app/policy/distribution/etc/ssl/policy-truststore:ro - ./distribution/config/temp/:/opt/app/policy/distribution/etc/temp/:ro - ./wait_for_port.sh:/opt/app/policy/bin/wait_for_port.sh:ro entrypoint: /opt/app/policy/bin/wait_for_port.sh command: [ '-c', './policy-dist.sh', 'mariadb', '3306', - 'simulator', '3905', + 'simulator', '3904', 'pap', '6969', 'apex-pdp', '6969' ] diff --git a/csit/drools-applications/tests/drools-applications-test.robot b/csit/drools-applications/tests/drools-applications-test.robot index cb04c23a..63b99b1b 100644 --- a/csit/drools-applications/tests/drools-applications-test.robot +++ b/csit/drools-applications/tests/drools-applications-test.robot @@ -208,8 +208,8 @@ VerifyController PeformGetRequest [Arguments] ${url} ${hostname} ${port} ${expectedstatus} ${auth}= Create List demo@people.osaaf.org demo123456! - Log Creating session https://${hostname}:${port} - ${session}= Create Session policy https://${hostname}:${port} auth=${auth} + Log Creating session http://${hostname}:${port} + ${session}= Create Session policy http://${hostname}:${port} auth=${auth} ${headers}= Create Dictionary Accept=application/json Content-Type=application/json ${resp}= GET On Session policy ${url} headers=${headers} expected_status=${expectedstatus} Log Received response from policy ${resp.text} @@ -219,8 +219,8 @@ PerformPostRequest [Arguments] ${url} ${params} ${hostname} ${port} ${jsonfile} ${filepath} ${contenttype} ${expectedstatus} ${auth}= Create List healthcheck zb!XztG34 ${postjson}= Get file ${filepath}/${jsonfile} - Log Creating session https://${hostname}:6969 - ${session}= Create Session policy https://${hostname}:6969 auth=${auth} + Log Creating session http://${hostname}:6969 + ${session}= Create Session policy http://${hostname}:6969 auth=${auth} ${headers}= Create Dictionary Accept=application/${contenttype} Content-Type=application/${contenttype} ${resp}= POST On Session policy ${url} params=${params} data=${postjson} headers=${headers} expected_status=${expectedstatus} Log Received response from policy ${resp.text} diff --git a/csit/drools-pdp/tests/drools-pdp-test.robot b/csit/drools-pdp/tests/drools-pdp-test.robot index d819a808..49d133a5 100644 --- a/csit/drools-pdp/tests/drools-pdp-test.robot +++ b/csit/drools-pdp/tests/drools-pdp-test.robot @@ -8,8 +8,8 @@ Library json Alive [Documentation] Runs Policy PDP Alive Check ${auth}= Create List demo@people.osaaf.org demo123456! - Log Creating session https://${POLICY_DROOLS_IP}:9696 - ${session}= Create Session policy https://${POLICY_DROOLS_IP}:9696 auth=${auth} + Log Creating session http://${POLICY_DROOLS_IP}:9696 + ${session}= Create Session policy http://${POLICY_DROOLS_IP}:9696 auth=${auth} ${headers}= Create Dictionary Accept=application/json Content-Type=application/json ${resp}= GET On Session policy /policy/pdp/engine headers=${headers} expected_status=200 Log Received response from policy ${resp.text} diff --git a/csit/make_topic.sh b/csit/make_topic.sh index 77e0a2dd..05d11f3c 100755 --- a/csit/make_topic.sh +++ b/csit/make_topic.sh @@ -2,6 +2,7 @@ # # ===========LICENSE_START==================================================== # Copyright (C) 2020-2021 AT&T Intellectual Property. All rights reserved. +# Modifications Copyright (C) 2022 Nordix Foundation. # ============================================================================ # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -29,5 +30,5 @@ fi topic="${1}" -curl -s -k "https://${SIM_IP}:3905/events/${topic}/script/1?limit=1&timeout=0" +curl -s -k "http://${SIM_IP}:3904/events/${topic}/script/1?limit=1&timeout=0" echo diff --git a/csit/onset.sh b/csit/onset.sh index 06b0c9fd..251b5b51 100755 --- a/csit/onset.sh +++ b/csit/onset.sh @@ -2,6 +2,7 @@ # # ===========LICENSE_START==================================================== # Copyright (C) 2020-2021 AT&T Intellectual Property. All rights reserved. +# Modifications Copyright (C) 2022 Nordix Foundation. # ============================================================================ # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -28,5 +29,5 @@ then fi curl -k -H "Content-type: application/json" --data-binary @$1 \ - https://${SIM_IP}:3905/events/unauthenticated.DCAE_CL_OUTPUT + http://${SIM_IP}:3904/events/unauthenticated.DCAE_CL_OUTPUT echo diff --git a/csit/pap/tests/pap-test.robot b/csit/pap/tests/pap-test.robot index 8d555617..976d7ead 100644 --- a/csit/pap/tests/pap-test.robot +++ b/csit/pap/tests/pap-test.robot @@ -8,8 +8,8 @@ Library json LoadPolicy [Documentation] Loads prerequisite Policy via API ${auth}= Create List healthcheck zb!XztG34 - Log Creating session https://${POLICY_API_IP}:6969 - ${session}= Create Session policy https://${POLICY_API_IP}:6969 auth=${auth} + Log Creating session http://${POLICY_API_IP}:6969 + ${session}= Create Session policy http://${POLICY_API_IP}:6969 auth=${auth} ${headers}= Create Dictionary Accept=application/json Content-Type=application/json ${postjson}= Get file ${DATA}/vCPE.policy.monitoring.input.tosca.json ${resp}= POST On Session policy /policy/api/v1/policytypes/onap.policies.monitoring.tcagen2/versions/1.0.0/policies data=${postjson} headers=${headers} @@ -19,8 +19,8 @@ LoadPolicy Healthcheck [Documentation] Runs Policy PAP Health check ${auth}= Create List healthcheck zb!XztG34 - Log Creating session https://${POLICY_PAP_IP}:6969 - ${session}= Create Session policy https://${POLICY_PAP_IP}:6969 auth=${auth} + Log Creating session http://${POLICY_PAP_IP}:6969 + ${session}= Create Session policy http://${POLICY_PAP_IP}:6969 auth=${auth} ${headers}= Create Dictionary Accept=application/json Content-Type=application/json ${resp}= GET On Session policy /policy/pap/v1/healthcheck headers=${headers} Log Received response from policy ${resp.text} @@ -30,8 +30,8 @@ Healthcheck Statistics [Documentation] Runs Policy PAP Statistics ${auth}= Create List healthcheck zb!XztG34 - Log Creating session https://${POLICY_PAP_IP}:6969 - ${session}= Create Session policy https://${POLICY_PAP_IP}:6969 auth=${auth} + Log Creating session http://${POLICY_PAP_IP}:6969 + ${session}= Create Session policy http://${POLICY_PAP_IP}:6969 auth=${auth} ${headers}= Create Dictionary Accept=application/json Content-Type=application/json ${resp}= GET On Session policy /policy/pap/v1/statistics headers=${headers} Log Received response from policy ${resp.text} @@ -41,9 +41,9 @@ Statistics CreatePdpGroups [Documentation] Runs Policy PAP Create PDP Groups ${auth}= Create List healthcheck zb!XztG34 - Log Creating session https://${POLICY_PAP_IP}:6969 + Log Creating session http://${POLICY_PAP_IP}:6969 ${postjson}= Get file ${CURDIR}/data/create.group.request.json - ${session}= Create Session policy https://${POLICY_PAP_IP}:6969 auth=${auth} + ${session}= Create Session policy http://${POLICY_PAP_IP}:6969 auth=${auth} ${headers}= Create Dictionary Accept=application/json Content-Type=application/json ${resp}= POST On Session policy /policy/pap/v1/pdps/groups/batch data=${postjson} headers=${headers} Log Received response from policy ${resp.text} @@ -52,8 +52,8 @@ CreatePdpGroups ActivatePdpGroup [Documentation] Runs Policy PAP Change PDP Group State to ACTIVE ${auth}= Create List healthcheck zb!XztG34 - Log Creating session https://${POLICY_PAP_IP}:6969 - ${session}= Create Session policy https://${POLICY_PAP_IP}:6969 auth=${auth} + Log Creating session http://${POLICY_PAP_IP}:6969 + ${session}= Create Session policy http://${POLICY_PAP_IP}:6969 auth=${auth} ${headers}= Create Dictionary Accept=application/json Content-Type=application/json ${resp}= PUT On Session policy /policy/pap/v1/pdps/groups/create.group.request params=state=ACTIVE headers=${headers} Log Received response from policy ${resp.text} @@ -62,8 +62,8 @@ ActivatePdpGroup QueryPdpGroups [Documentation] Runs Policy PAP Query PDP Groups ${auth}= Create List healthcheck zb!XztG34 - Log Creating session https://${POLICY_PAP_IP}:6969 - ${session}= Create Session policy https://${POLICY_PAP_IP}:6969 auth=${auth} + Log Creating session http://${POLICY_PAP_IP}:6969 + ${session}= Create Session policy http://${POLICY_PAP_IP}:6969 auth=${auth} ${headers}= Create Dictionary Accept=application/json Content-Type=application/json ${resp}= GET On Session policy /policy/pap/v1/pdps headers=${headers} Log Received response from policy ${resp.text} @@ -75,9 +75,9 @@ QueryPdpGroups DeployPdpGroups [Documentation] Runs Policy PAP Deploy Policies to PDP Groups ${auth}= Create List healthcheck zb!XztG34 - Log Creating session https://${POLICY_PAP_IP}:6969 + Log Creating session http://${POLICY_PAP_IP}:6969 ${postjson}= Get file ${CURDIR}/data/deploy.group.request.json - ${session}= Create Session policy https://${POLICY_PAP_IP}:6969 auth=${auth} + ${session}= Create Session policy http://${POLICY_PAP_IP}:6969 auth=${auth} ${headers}= Create Dictionary Accept=application/json Content-Type=application/json ${resp}= POST On Session policy /policy/pap/v1/pdps/deployments/batch data=${postjson} headers=${headers} Log Received response from policy ${resp.text} @@ -86,8 +86,8 @@ DeployPdpGroups UndeployPolicy [Documentation] Runs Policy PAP Undeploy a Policy from PDP Groups ${auth}= Create List healthcheck zb!XztG34 - Log Creating session https://${POLICY_PAP_IP}:6969 - ${session}= Create Session policy https://${POLICY_PAP_IP}:6969 auth=${auth} + Log Creating session http://${POLICY_PAP_IP}:6969 + ${session}= Create Session policy http://${POLICY_PAP_IP}:6969 auth=${auth} ${headers}= Create Dictionary Accept=application/json Content-Type=application/json ${resp}= DELETE On Session policy /policy/pap/v1/pdps/policies/onap.restart.tca headers=${headers} Log Received response from policy ${resp.text} @@ -96,8 +96,8 @@ UndeployPolicy QueryPdpGroupsAfterUndeploy [Documentation] Runs Policy PAP Query PDP Groups after Undeploy ${auth}= Create List healthcheck zb!XztG34 - Log Creating session https://${POLICY_PAP_IP}:6969 - ${session}= Create Session policy https://${POLICY_PAP_IP}:6969 auth=${auth} + Log Creating session http://${POLICY_PAP_IP}:6969 + ${session}= Create Session policy http://${POLICY_PAP_IP}:6969 auth=${auth} ${headers}= Create Dictionary Accept=application/json Content-Type=application/json ${resp}= GET On Session policy /policy/pap/v1/pdps headers=${headers} Log Received response from policy ${resp.text} @@ -108,8 +108,8 @@ QueryPdpGroupsAfterUndeploy DeactivatePdpGroup [Documentation] Runs Policy PAP Change PDP Group State to PASSIVE ${auth}= Create List healthcheck zb!XztG34 - Log Creating session https://${POLICY_PAP_IP}:6969 - ${session}= Create Session policy https://${POLICY_PAP_IP}:6969 auth=${auth} + Log Creating session http://${POLICY_PAP_IP}:6969 + ${session}= Create Session policy http://${POLICY_PAP_IP}:6969 auth=${auth} ${headers}= Create Dictionary Accept=application/json Content-Type=application/json ${resp}= PUT On Session policy /policy/pap/v1/pdps/groups/create.group.request params=state=PASSIVE headers=${headers} Log Received response from policy ${resp.text} @@ -118,8 +118,8 @@ DeactivatePdpGroup DeletePdpGroups [Documentation] Runs Policy PAP Delete PDP Groups ${auth}= Create List healthcheck zb!XztG34 - Log Creating session https://${POLICY_PAP_IP}:6969 - ${session}= Create Session policy https://${POLICY_PAP_IP}:6969 auth=${auth} + Log Creating session http://${POLICY_PAP_IP}:6969 + ${session}= Create Session policy http://${POLICY_PAP_IP}:6969 auth=${auth} ${headers}= Create Dictionary Accept=application/json Content-Type=application/json ${resp}= DELETE On Session policy /policy/pap/v1/pdps/groups/create.group.request headers=${headers} Log Received response from policy ${resp.text} @@ -128,8 +128,8 @@ DeletePdpGroups QueryPdpGroupsAfterDelete [Documentation] Runs Policy PAP Query PDP Groups after Delete ${auth}= Create List healthcheck zb!XztG34 - Log Creating session https://${POLICY_PAP_IP}:6969 - ${session}= Create Session policy https://${POLICY_PAP_IP}:6969 auth=${auth} + Log Creating session http://${POLICY_PAP_IP}:6969 + ${session}= Create Session policy http://${POLICY_PAP_IP}:6969 auth=${auth} ${headers}= Create Dictionary Accept=application/json Content-Type=application/json ${resp}= GET On Session policy /policy/pap/v1/pdps headers=${headers} Log Received response from policy ${resp.text} diff --git a/csit/run-project-csit.sh b/csit/run-project-csit.sh index 3b4d0764..e8f8569f 100755 --- a/csit/run-project-csit.sh +++ b/csit/run-project-csit.sh @@ -3,7 +3,7 @@ # Copyright 2016-2017 Huawei Technologies Co., Ltd. # Modification Copyright 2019 © Samsung Electronics Co., Ltd. # Modification Copyright 2021 © AT&T Intellectual Property. -# Modification Copyright 2021. Nordix Foundation. +# Modification Copyright 2021-2022 Nordix Foundation. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -31,10 +31,13 @@ function on_exit(){ rsync -av "${WORKDIR}/" "${WORKSPACE}/csit/archives/${PROJECT}" fi # Record list of active docker containers - docker ps --format "{{.Image}}" > "${WORKSPACE}/csit/archives/${PROJECT}/_docker-images.log" + docker ps + + # Show the logs from all containers + docker-compose -f "${WORKSPACE}/csit/docker-compose-all.yml" logs # show memory consumption after all docker instances initialized - docker_stats | tee "${WORKSPACE}/csit/archives/${PROJECT}/_sysinfo-2-after-robot.txt" + docker_stats fi # Run teardown script plan if it exists cd "${TESTPLANDIR}/plans/" @@ -51,16 +54,23 @@ function on_exit(){ trap on_exit EXIT function docker_stats(){ - #General memory details - echo "> top -bn1 | head -3" - top -bn1 | head -3 - echo - - echo "> free -h" - free -h - echo + # General memory details + if [ "$(uname -s)" == "Darwin" ] + then + echo "> top -l1 | head -10" + sh -c "top -l1 | head -10" + echo + else + echo "> top -bn1 | head -3" + sh -c "top -bn1 | head -3" + echo + + echo "> free -h" + sh -c "free -h" + echo + fi - #Memory details per Docker + # Memory details per Docker echo "> docker ps" docker ps echo @@ -120,6 +130,19 @@ function source_safely() { # main # +if $(docker images | grep -q "onap\/policy-api") +then + echo where + export CONTAINER_LOCATION=$( + docker images | + grep onap/policy-api | + head -1 | + sed 's/onap\/policy-api.*$//' + ) +else + export CONTAINER_LOCATION="nexus3.onap.org:10001/" +fi + # set and save options for quick failure harden_set && save_set @@ -161,7 +184,7 @@ source_safely "${SCRIPTS}/prepare-csit.sh" # Activate the virtualenv containing all the required libraries installed by prepare-csit.sh source_safely "${ROBOT_VENV}/bin/activate" -WORKDIR=$(mktemp -d --suffix=-robot-workdir) +WORKDIR=$(mktemp -d) cd "${WORKDIR}" # Sign in to nexus3 docker repo @@ -183,7 +206,7 @@ cd "${WORKDIR}" echo "Reading the testplan:" cat "${TESTPLANDIR}/plans/testplan.txt" | egrep -v '(^[[:space:]]*#|^[[:space:]]*$)' | sed "s|^|${TESTPLANDIR}/tests/|" > testplan.txt cat testplan.txt -SUITES=$( xargs -a testplan.txt ) +SUITES=$( xargs < testplan.txt ) echo ROBOT_VARIABLES="${ROBOT_VARIABLES}" echo "Starting Robot test suites ${SUITES} ..." diff --git a/csit/wait_for_port.sh b/csit/wait_for_port.sh index 0eeb1c9b..5a8be250 100755 --- a/csit/wait_for_port.sh +++ b/csit/wait_for_port.sh @@ -1,6 +1,7 @@ #!/bin/sh # ============LICENSE_START==================================================== # Copyright (C) 2021 AT&T Intellectual Property. All rights reserved. +# Modifications Copyright (C) 2022 Nordix Foundation. # ============================================================================= # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -17,35 +18,69 @@ # SPDX-License-Identifier: Apache-2.0 # ============LICENSE_END====================================================== +usage() { + echo args: [-t timeout] [-c command] hostname1 port1 hostname2 port2 ... >&2 + exit 1 +} + tmout=300 cmd= -while getopts c:t: opt; do +while getopts c:t: opt +do case "$opt" in - c) cmd="$OPTARG" ;; - t) tmout="$OPTARG" ;; + c) + cmd="$OPTARG" + ;; + + t) + tmout="$OPTARG" + ;; + + *) + usage + ;; esac done -nargs=$(expr $OPTIND - 1) -shift $nargs -even_args=$(expr $# % 2) -if [ $# -lt 2 -o $even_args -ne 0 ]; then - echo "args: [-t timeout] [-c command] hostname1 port1 hostname2 port2 ..." >&2 - exit 1 +nargs=$((OPTIND-1)) +shift "$nargs" + +even_args=$(($#%2)) +if [ $# -lt 2 ] || [ "$even_args" -ne 0 ] +then + usage fi -while [ $# -ge 2 ]; do - export host=$1 - export port=$2 +while [ $# -ge 2 ] +do + export host="$1" + export port="$2" shift shift echo "Waiting for $host port $port..." - timeout $tmout sh -c 'until nc -vz "$host" "$port"; do echo -n "."; - sleep 1; done' - rc=$? - if [ $rc != 0 ]; then + while [ "$tmout" -gt 0 ] + do + if command -v docker > /dev/null 2>&1 + then + docker ps + fi + + nc -vz "$host" "$port" + rc=$? + + if [ $rc -eq 0 ] + then + break + else + tmout=$((tmout-1)) + sleep 1 + fi + done + + if [ $rc -ne 0 ] + then echo "$host port $port cannot be reached" exit $rc fi diff --git a/csit/wait_topic.sh b/csit/wait_topic.sh index 64b6c9f3..a6d997d0 100755 --- a/csit/wait_topic.sh +++ b/csit/wait_topic.sh @@ -2,6 +2,7 @@ # # ===========LICENSE_START==================================================== # Copyright (C) 2020-2021 AT&T Intellectual Property. All rights reserved. +# Modifications Copyright (C) 2022 Nordix Foundation. # ============================================================================ # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -39,7 +40,7 @@ matched=no while [ ${matched} = "no" ] do - msg=`curl -s -k "https://${SIM_IP}:3905/events/${topic}/script/1?limit=1"` + msg=`curl -s -k "http://${SIM_IP}:3904/events/${topic}/script/1?limit=1"` if [ $? -ne 0 -o "${msg}" = "[]" ] then echo not found >&2 diff --git a/csit/xacml-pdp/tests/xacml-pdp-test.robot b/csit/xacml-pdp/tests/xacml-pdp-test.robot index e19e0042..9532e77b 100644 --- a/csit/xacml-pdp/tests/xacml-pdp-test.robot +++ b/csit/xacml-pdp/tests/xacml-pdp-test.robot @@ -132,8 +132,8 @@ PerformPostRequest [Arguments] ${url} ${params} ${hostname} ${expectedstatus} ${jsonfile} ${filepath} ${auth}= Create List healthcheck zb!XztG34 ${postjson}= Get file ${filepath}/${jsonfile} - Log Creating session https://${hostname}:6969 - ${session}= Create Session policy https://${hostname}:6969 auth=${auth} + Log Creating session http://${hostname}:6969 + ${session}= Create Session policy http://${hostname}:6969 auth=${auth} ${headers}= Create Dictionary Accept=application/json Content-Type=application/json ${resp}= POST On Session policy ${url} params=${params} data=${postjson} headers=${headers} expected_status=${expectedstatus} Log Received response from policy ${resp.text} @@ -142,8 +142,8 @@ PerformPostRequest PeformGetRequest [Arguments] ${url} ${expectedstatus} ${auth}= Create List healthcheck zb!XztG34 - Log Creating session https://${POLICY_PDPX_IP}:6969 - ${session}= Create Session policy https://${POLICY_PDPX_IP}:6969 auth=${auth} + Log Creating session http://${POLICY_PDPX_IP}:6969 + ${session}= Create Session policy http://${POLICY_PDPX_IP}:6969 auth=${auth} ${headers}= Create Dictionary Accept=application/json Content-Type=application/json ${resp}= GET On Session policy ${url} headers=${headers} expected_status=${expectedstatus} Log Received response from policy ${resp.text} @@ -152,8 +152,8 @@ PeformGetRequest PeformDeleteRequest [Arguments] ${url} ${expectedstatus} ${auth}= Create List healthcheck zb!XztG34 - Log Creating session https://${POLICY_PAP_IP}:6969 - ${session}= Create Session policy https://${POLICY_PAP_IP}:6969 auth=${auth} + Log Creating session http://${POLICY_PAP_IP}:6969 + ${session}= Create Session policy http://${POLICY_PAP_IP}:6969 auth=${auth} ${headers}= Create Dictionary Accept=application/json Content-Type=application/json ${resp}= DELETE On Session policy ${url} headers=${headers} expected_status=${expectedstatus} Log Received response from policy ${resp.text} |