aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--robot/assets/asdc/blueprints/k8s-tca-clamp-policy-05082019.yaml175
-rw-r--r--robot/assets/templates/policy/closedloop_configpolicy.template2
-rw-r--r--robot/assets/templates/policy/vFirewall_policy_monitoring_input_tosca.template4
-rw-r--r--robot/resources/policy_interface.robot131
-rw-r--r--robot/resources/so/direct_instantiate.robot17
-rw-r--r--robot/resources/stack_validation/validate_common.robot4
-rw-r--r--robot/resources/test_templates/pnf_registration_without_SO_template.robot19
-rw-r--r--robot/testsuites/health-check.robot10
-rwxr-xr-xsetup.sh4
9 files changed, 323 insertions, 43 deletions
diff --git a/robot/assets/asdc/blueprints/k8s-tca-clamp-policy-05082019.yaml b/robot/assets/asdc/blueprints/k8s-tca-clamp-policy-05082019.yaml
new file mode 100644
index 00000000..9d9fb5e8
--- /dev/null
+++ b/robot/assets/asdc/blueprints/k8s-tca-clamp-policy-05082019.yaml
@@ -0,0 +1,175 @@
+#
+# ============LICENSE_START====================================================
+# =============================================================================
+# Copyright (c) 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======================================================
+
+tosca_definitions_version: cloudify_dsl_1_3
+
+description: >
+ This blueprint deploys/manages the TCA module as a Docker container
+
+imports:
+ - http://www.getcloudify.org/spec/cloudify/3.4/types.yaml
+ - https://nexus.onap.org/service/local/repositories/raw/content/org.onap.dcaegen2.platform.plugins/R4/k8splugin/1.4.12/k8splugin_types.yaml
+# - https://nexus.onap.org/service/local/repositories/raw/content/org.onap.dcaegen2.platform.plugins/R4/dcaepolicyplugin/2.3.0/dcaepolicyplugin_types.yaml
+ - https://nexus.onap.org/service/local/repositories/raw/content/org.onap.dcaegen2.platform.plugins/R4/clamppolicyplugin/1.0.0/clamppolicyplugin_types.yaml
+inputs:
+ aaiEnrichmentHost:
+ type: string
+ default: "aai.onap.svc.cluster.local"
+ aaiEnrichmentPort:
+ type: string
+ default: "8443"
+ enableAAIEnrichment:
+ type: string
+ default: true
+ dmaap_host:
+ type: string
+ default: message-router.onap
+ dmaap_port:
+ type: string
+ default: "3904"
+ enableRedisCaching:
+ type: string
+ default: false
+ redisHosts:
+ type: string
+ default: dcae-redis.onap.svc.cluster.local:6379
+ tag_version:
+ type: string
+ default: "nexus3.onap.org:10001/onap/org.onap.dcaegen2.deployments.tca-cdap-container:1.1.1"
+ consul_host:
+ type: string
+ default: consul-server.onap
+ consul_port:
+ type: string
+ default: "8500"
+ cbs_host:
+ type: string
+ default: "config-binding-servicel"
+ cbs_port:
+ type: string
+ default: "10000"
+ policy_id:
+ type: string
+ default: "onap.restart.tca"
+ external_port:
+ type: string
+ description: Kubernetes node port on which CDAPgui is exposed
+ default: "32012"
+ policy_model_id:
+ type: string
+ default: "onap.policies.monitoring.cdap.tca.hi.lo.app"
+node_templates:
+ tca_k8s:
+ type: dcae.nodes.ContainerizedServiceComponent
+ relationships:
+ - target: tca_policy
+ type: cloudify.relationships.depends_on
+ properties:
+ service_component_type: 'dcaegen2-analytics-tca'
+ application_config: {}
+ docker_config: {}
+ image:
+ get_input: tag_version
+ log_info:
+ log_directory: "/opt/app/TCAnalytics/logs"
+ application_config:
+ app_config:
+ appDescription: DCAE Analytics Threshold Crossing Alert Application
+ appName: dcae-tca
+ tcaAlertsAbatementTableName: TCAAlertsAbatementTable
+ tcaAlertsAbatementTableTTLSeconds: '1728000'
+ tcaSubscriberOutputStreamName: TCASubscriberOutputStream
+ tcaVESAlertsTableName: TCAVESAlertsTable
+ tcaVESAlertsTableTTLSeconds: '1728000'
+ tcaVESMessageStatusTableName: TCAVESMessageStatusTable
+ tcaVESMessageStatusTableTTLSeconds: '86400'
+ thresholdCalculatorFlowletInstances: '2'
+ app_preferences:
+ aaiEnrichmentHost:
+ get_input: aaiEnrichmentHost
+ aaiEnrichmentIgnoreSSLCertificateErrors: 'true'
+ aaiEnrichmentPortNumber: '8443'
+ aaiEnrichmentProtocol: https
+ aaiEnrichmentUserName: dcae@dcae.onap.org
+ aaiEnrichmentUserPassword: demo123456!
+ aaiVMEnrichmentAPIPath: /aai/v11/search/nodes-query
+ aaiVNFEnrichmentAPIPath: /aai/v11/network/generic-vnfs/generic-vnf
+ enableAAIEnrichment:
+ get_input: enableAAIEnrichment
+ enableRedisCaching:
+ get_input: enableRedisCaching
+ redisHosts:
+ get_input: redisHosts
+ enableAlertCEFFormat: 'false'
+ publisherContentType: application/json
+ publisherHostName:
+ get_input: dmaap_host
+ publisherHostPort:
+ get_input: dmaap_port
+ publisherMaxBatchSize: '1'
+ publisherMaxRecoveryQueueSize: '100000'
+ publisherPollingInterval: '20000'
+ publisherProtocol: http
+ publisherTopicName: unauthenticated.DCAE_CL_OUTPUT
+ subscriberConsumerGroup: OpenDCAE-clamp
+ subscriberConsumerId: c12
+ subscriberContentType: application/json
+ subscriberHostName:
+ get_input: dmaap_host
+ subscriberHostPort:
+ get_input: dmaap_port
+ subscriberMessageLimit: '-1'
+ subscriberPollingInterval: '30000'
+ subscriberProtocol: http
+ subscriberTimeoutMS: '-1'
+ subscriberTopicName: unauthenticated.VES_MEASUREMENT_OUTPUT
+ tca_policy: ''
+ service_component_type: dcaegen2-analytics_tca
+ interfaces:
+ cloudify.interfaces.lifecycle:
+ start:
+ inputs:
+ envs:
+ DMAAPHOST:
+ { get_input: dmaap_host }
+ DMAAPPORT:
+ { get_input: dmaap_port }
+ DMAAPPUBTOPIC: "unauthenticated.DCAE_CL_OUTPUT"
+ DMAAPSUBTOPIC: "unauthenticated.VES_MEASUREMENT_OUTPUT"
+ AAIHOST:
+ { get_input: aaiEnrichmentHost }
+ AAIPORT:
+ { get_input: aaiEnrichmentPort }
+ CONSUL_HOST:
+ { get_input: consul_host }
+ CONSUL_PORT:
+ { get_input: consul_port }
+ CBS_HOST:
+ { get_input: cbs_host }
+ CBS_PORT:
+ { get_input: cbs_port }
+ CONFIG_BINDING_SERVICE: "config_binding_service"
+ ports:
+ - concat: ["11011:", { get_input: external_port }]
+ tca_policy:
+ type: clamp.nodes.policy
+ properties:
+ policy_id:
+ get_input: policy_id
+ policy_model_id:
+ get_input: policy_model_id \ No newline at end of file
diff --git a/robot/assets/templates/policy/closedloop_configpolicy.template b/robot/assets/templates/policy/closedloop_configpolicy.template
index a77a0caa..3f3575b4 100644
--- a/robot/assets/templates/policy/closedloop_configpolicy.template
+++ b/robot/assets/templates/policy/closedloop_configpolicy.template
@@ -24,7 +24,7 @@
"thresholds": [{
"closedLoopControlName": "ControlLoop-vDNS-6f37f56d-a87d-4b85-b6a9-cc953cf779b3",
"version": "1.0.2",
- "fieldPath": "$.event.measurementsForVfScalingFields.vNicUsageArray[*].receivedTotalPacketsDelta",
+ "fieldPath": "$$.event.measurementsForVfScalingFields.vNicUsageArray[*].receivedTotalPacketsDelta",
"thresholdValue": 300,
"direction": "GREATER_OR_EQUAL",
"severity": "CRITICAL",
diff --git a/robot/assets/templates/policy/vFirewall_policy_monitoring_input_tosca.template b/robot/assets/templates/policy/vFirewall_policy_monitoring_input_tosca.template
index d1e65222..8ac5a9ed 100644
--- a/robot/assets/templates/policy/vFirewall_policy_monitoring_input_tosca.template
+++ b/robot/assets/templates/policy/vFirewall_policy_monitoring_input_tosca.template
@@ -24,7 +24,7 @@
"closedLoopControlName": "ControlLoop-vFirewall-d0a1dfc6-94f5-4fd4-a5b5-4630b438850a",
"closedLoopEventStatus": "ONSET",
"version": "1.0.2",
- "fieldPath": "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedTotalPacketsDelta",
+ "fieldPath": "$$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedTotalPacketsDelta",
"thresholdValue": 300,
"direction": "LESS_OR_EQUAL",
"severity": "MAJOR"
@@ -33,7 +33,7 @@
"closedLoopControlName": "ControlLoop-vFirewall-d0a1dfc6-94f5-4fd4-a5b5-4630b438850a",
"closedLoopEventStatus": "ONSET",
"version": "1.0.2",
- "fieldPath": "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedTotalPacketsDelta",
+ "fieldPath": "$$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedTotalPacketsDelta",
"thresholdValue": 700,
"direction": "GREATER_OR_EQUAL",
"severity": "CRITICAL"
diff --git a/robot/resources/policy_interface.robot b/robot/resources/policy_interface.robot
index 91d0d98b..88f2b6f8 100644
--- a/robot/resources/policy_interface.robot
+++ b/robot/resources/policy_interface.robot
@@ -4,7 +4,7 @@ Library RequestsClientCert
Library RequestsLibrary
Library String
Library JSONUtils
-Library Collections
+Library Collections
Resource global_properties.robot
*** Variables ***
@@ -13,12 +13,19 @@ ${POLICY_ENDPOINT} ${GLOBAL_POLICY_SERVER_PROTOCOL}://${GLOBAL_INJECTED_POLI
${POLICY_HEALTHCHECK_ENDPOINT} ${GLOBAL_POLICY_SERVER_PROTOCOL}://${GLOBAL_INJECTED_POLICY_HEALTHCHECK_IP_ADDR}:${GLOBAL_POLICY_HEALTHCHECK_PORT}
${POLICY_TEMPLATES} robot/assets/templates/policy
${DROOLS_ENDPOINT} ${GLOBAL_POLICY_SERVER_PROTOCOL}://${GLOBAL_INJECTED_POLICY_IP_ADDR}:${GLOBAL_DROOLS_SERVER_PORT}
+${POLICY_API_IP} ${GLOBAL_INJECTED_POLICY_API_IP_ADDR}
+${POLICY_PAP_IP} ${GLOBAL_INJECTED_POLICY_PAP_IP_ADDR}
+${POLICY_DISTRIBUTION_IP} ${GLOBAL_INJECTED_POLICY_DISTRIBUTION_IP_ADDR}
+${POLICY_PDPX_IP} ${GLOBAL_INJECTED_POLICY_PDPX_IP_ADDR}
+${POLICY_APEX_PDP_IP} ${GLOBAL_INJECTED_POLICY_APEX_PDP_IP_ADDR}
+${POLICY_HEALTHCHECK_USERNAME} ${GLOBAL_POLICY_HEALTHCHECK_USERNAME}
+${POLICY_HEALTHCHECK_PASSWORD} ${GLOBAL_POLICY_HEALTHCHECK_PASSWORD}
*** Keywords ***
Run Policy Health Check
[Documentation] Runs Policy Health check
- ${auth}= Create List ${GLOBAL_POLICY_USERNAME} ${GLOBAL_POLICY_PASSWORD}
+ ${auth}= Create List ${GLOBAL_POLICY_USERNAME} ${GLOBAL_POLICY_PASSWORD}
Log Creating session ${POLICY_ENDPOINT}
${session}= Create Session policy ${POLICY_HEALTHCHECK_ENDPOINT} auth=${auth}
${headers}= Create Dictionary Accept=application/json Content-Type=application/json
@@ -30,7 +37,7 @@ Run Policy Health Check
:FOR ${ELEMENT} IN @{ITEMS}
\ Should Be Equal As Strings ${ELEMENT['code']} 200
\ Should Be True ${ELEMENT['healthy']}
-
+
Run Drools Get Request
[Documentation] Runs Drools Get Request
[Arguments] ${data_path}
@@ -62,6 +69,18 @@ Run Policy Get Request
${resp}= Get Request policy ${data_path} headers=${headers}
Log Received response from policy ${resp.text}
+Run Policy Pap Get Request
+ [Documentation] Runs Policy Pap Get request
+ [Arguments] ${data_path}
+ ${auth}= Create List ${POLICY_HEALTHCHECK_USERNAME} ${POLICY_HEALTHCHECK_PASSWORD}
+ Log Creating session ${GLOBAL_POLICY_SERVER_PROTOCOL}://${POLICY_PAP_IP}:${GLOBAL_POLICY_HEALTHCHECK_PORT}
+ ${session}= Create Session policy ${GLOBAL_POLICY_SERVER_PROTOCOL}://${POLICY_PAP_IP}:${GLOBAL_POLICY_HEALTHCHECK_PORT} auth=${auth} disable_warnings=1
+ ${headers}= Create Dictionary Accept=application/json Content-Type=application/json
+ ${resp}= Get Request policy ${data_path} headers=${headers}
+ Log Received response from Policy Pap ${resp.text}
+ [Return] ${resp}
+
+
Run Policy Post Request
[Documentation] Runs Policy Post request
[Arguments] ${data_path} ${data}
@@ -72,6 +91,30 @@ Run Policy Post Request
Log Received response from policy ${resp.text}
[Return] ${resp}
+Run Policy Api Post Request
+ [Documentation] Runs Policy Api Post request
+ [Arguments] ${data_path} ${data}
+ ${auth}= Create List ${POLICY_HEALTHCHECK_USERNAME} ${POLICY_HEALTHCHECK_PASSWORD}
+ ${session}= Create Session policy ${GLOBAL_POLICY_SERVER_PROTOCOL}://${POLICY_API_IP}:${GLOBAL_POLICY_HEALTHCHECK_PORT} auth=${auth} disable_warnings=1
+ Log Creating session ${GLOBAL_POLICY_SERVER_PROTOCOL}://${POLICY_API_IP}:${GLOBAL_POLICY_HEALTHCHECK_PORT}
+ ${headers}= Create Dictionary Accept=application/json Content-Type=application/json
+ ${resp}= Post Request policy ${data_path} data=${data} headers=${headers}
+ Log Received response from policy ${resp.text}
+ [Return] ${resp}
+
+
+Run Policy Pap Post Request
+ [Documentation] Runs Policy Pap Post request
+ [Arguments] ${data_path} ${data}
+ ${auth}= Create List ${POLICY_HEALTHCHECK_USERNAME} ${POLICY_HEALTHCHECK_PASSWORD}
+ ${session}= Create Session policy ${GLOBAL_POLICY_SERVER_PROTOCOL}://${POLICY_PAP_IP}:${GLOBAL_POLICY_HEALTHCHECK_PORT} auth=${auth} disable_warnings=1
+ Log Creating session ${GLOBAL_POLICY_SERVER_PROTOCOL}://${POLICY_PAP_IP}:${GLOBAL_POLICY_HEALTHCHECK_PORT}
+ ${headers}= Create Dictionary Accept=application/json Content-Type=application/json
+ ${resp}= Post Request policy ${data_path} data=${data} headers=${headers}
+ Log Received response from policy ${resp.text}
+ [Return] ${resp}
+
+
Run Policy Delete Request
[Documentation] Runs Policy Delete request
[Arguments] ${data_path} ${data}
@@ -81,13 +124,13 @@ Run Policy Delete Request
${resp}= Delete Request policy ${data_path} data=${data} headers=${headers}
Log Received response from policy ${resp.text}
[Return] ${resp}
-
+
Run Policy Get Configs Request
[Documentation] Runs Policy Get Configs request
[Arguments] ${data_path} ${data}
Log Creating session ${POLICY_ENDPOINT}
${session}= Create Session policy ${POLICY_ENDPOINT}
- ${headers}= Create Dictionary Accept=application/json Content-Type=application/json Authorization=Basic ${GLOBAL_POLICY_AUTH} ClientAuth=${GLOBAL_POLICY_CLIENTAUTH}
+ ${headers}= Create Dictionary Accept=application/json Content-Type=application/json Authorization=Basic ${GLOBAL_POLICY_AUTH} ClientAuth=${GLOBAL_POLICY_CLIENTAUTH}
${resp}= Post Request policy ${data_path} data=${data} headers=${headers}
Log Received response from policy ${resp.text}
[Return] ${resp}
@@ -111,14 +154,14 @@ Update vVFWCL Policy Old
Validate the vFWCL Policy Old
Update vVFWCL Policy
- [Arguments] ${resource_id}
- Log To Console Create vFWCL Monitoring Policy
+ [Arguments] ${resource_id}
+ Log To Console Create vFWCL Monitoring Policy
Create vFirewall Monitoring Policy
Sleep 5s
- Log To Console Create vFWCL Operational Policy
- Create vFirewall Operational Policy ${resource_id}
+ Log To Console Create vFWCL Operational Policy
+ Create vFirewall Operational Policy ${resource_id}
Sleep 5s
- Log To Console Push vFWCL To PDP Group
+ Log To Console Push vFWCL To PDP Group
Push vFirewall Policies To PDP Group
Sleep 20s
Log To Console Validate vFWCL Policy
@@ -164,15 +207,15 @@ Validate the vFWCL Policy Old
${resp}= Run Drools Get Request /policy/pdp/engine/controllers/amsterdam/drools/facts/closedloop-amsterdam/org.onap.policy.controlloop.Params
Should Be Equal As Strings ${resp.status_code} 200
-Validate the vFWCL Policy
- ${resp}= Run Policy Get Request /policy/pap/v1/pdps
+Validate the vFWCL Policy
+ ${resp}= Run Policy Pap Get Request /policy/pap/v1/pdps
Log Received response from policy ${resp.text}
Should Be Equal As Strings ${resp.status_code} 200
Create vFirewall Monitoring Policy
${dict}= Create Dictionary
${data}= Fill JSON Template File ${POLICY_TEMPLATES}/vFirewall_policy_monitoring_input_tosca.template ${dict}
- ${resp}= Run Policy Post Request /policy/api/v1/policytypes/onap.policies.monitoring.cdap.tca.hi.lo.app/versions/1.0.0/policies ${data}
+ ${resp}= Run Policy Api Post Request /policy/api/v1/policytypes/onap.policies.monitoring.cdap.tca.hi.lo.app/versions/1.0.0/policies ${data}
Should Be Equal As Strings ${resp.status_code} 200
@@ -180,13 +223,69 @@ Create vFirewall Operational Policy
[Arguments] ${resource_id}
${dict}= Create Dictionary RESOURCE_ID=${resource_id}
${data}= Fill JSON Template File ${POLICY_TEMPLATES}/vFirewall_policy_operational_input.template ${dict}
- ${resp}= Run Policy Post Request /policy/api/v1/policytypes/onap.policies.controlloop.Operational/versions/1.0.0/policies ${data}
+ ${resp}= Run Policy Api Post Request /policy/api/v1/policytypes/onap.policies.controlloop.Operational/versions/1.0.0/policies ${data}
Should Be Equal As Strings ${resp.status_code} 200
Push vFirewall Policies To PDP Group
${dict}= Create Dictionary
${data}= Fill JSON Template File ${POLICY_TEMPLATES}/vFirewall_push.template ${dict}
- ${resp}= Run Policy Post Request /policy/pap/v1/pdps/policies ${data}
- Should Be Equal As Strings ${resp.status_code} 200
+ #${resp}= Run Policy Post Request /policy/pap/v1/pdps/policies ${data}
+ ${resp}= Run Policy Pap Post Request /policy/pap/v1/pdps/policies ${data}
+ #Should Be Equal As Strings ${resp.status_code} 200
+
+Run Policy API Healthcheck
+ [Documentation] Runs Policy Api Health check
+ ${auth}= Create List ${POLICY_HEALTHCHECK_USERNAME} ${POLICY_HEALTHCHECK_PASSWORD}
+ Log Creating session ${GLOBAL_POLICY_SERVER_PROTOCOL}://${POLICY_API_IP}:${GLOBAL_POLICY_HEALTHCHECK_PORT}
+ ${session}= Create Session policy ${GLOBAL_POLICY_SERVER_PROTOCOL}://${POLICY_API_IP}:${GLOBAL_POLICY_HEALTHCHECK_PORT} auth=${auth} disable_warnings=1
+ ${headers}= Create Dictionary Accept=application/json Content-Type=application/json
+ ${resp}= Get Request policy /policy/api/v1/healthcheck headers=${headers}
+ Log Received response from policy ${resp.text}
+ Should Be Equal As Strings ${resp.status_code} 200
+ Should Be Equal As Strings ${resp.json()['code']} 200
+
+Run Policy PAP Healthcheck
+ [Documentation] Runs Policy PAP Health check
+ ${auth}= Create List ${POLICY_HEALTHCHECK_USERNAME} ${POLICY_HEALTHCHECK_PASSWORD}
+ Log Creating session ${GLOBAL_POLICY_SERVER_PROTOCOL}://${POLICY_PAP_IP}:${GLOBAL_POLICY_HEALTHCHECK_PORT}
+ ${session}= Create Session policy ${GLOBAL_POLICY_SERVER_PROTOCOL}://${POLICY_PAP_IP}:${GLOBAL_POLICY_HEALTHCHECK_PORT} auth=${auth} disable_warnings=1
+ ${headers}= Create Dictionary Accept=application/json Content-Type=application/json
+ ${resp}= Get Request policy /policy/pap/v1/healthcheck headers=${headers}
+ Log Received response from policy ${resp.text}
+ Should Be Equal As Strings ${resp.status_code} 200
+ Should Be Equal As Strings ${resp.json()['code']} 200
+
+Run Policy Distribution Healthcheck
+ [Documentation] Runs Policy Distribution Health check
+ ${auth}= Create List ${POLICY_HEALTHCHECK_USERNAME} ${POLICY_HEALTHCHECK_PASSWORD}
+ Log Creating session ${GLOBAL_POLICY_SERVER_PROTOCOL}://${POLICY_DISTRIBUTION_IP}:${GLOBAL_POLICY_HEALTHCHECK_PORT}
+ ${session}= Create Session policy ${GLOBAL_POLICY_SERVER_PROTOCOL}://${POLICY_DISTRIBUTION_IP}:${GLOBAL_POLICY_HEALTHCHECK_PORT} auth=${auth} disable_warnings=1
+ ${headers}= Create Dictionary Accept=application/json Content-Type=application/json
+ ${resp}= Get Request policy /healthcheck headers=${headers}
+ Log Received response from policy ${resp.text}
+ Should Be Equal As Strings ${resp.status_code} 200
+ Should Be Equal As Strings ${resp.json()['code']} 200
+
+Run Policy XACML PDP Healthcheck
+ [Documentation] Runs Policy Xacml PDP Health check
+ ${auth}= Create List ${POLICY_HEALTHCHECK_USERNAME} ${POLICY_HEALTHCHECK_PASSWORD}
+ Log Creating session ${GLOBAL_POLICY_SERVER_PROTOCOL}://${POLICY_PDPX_IP}:${GLOBAL_POLICY_HEALTHCHECK_PORT}
+ ${session}= Create Session policy ${GLOBAL_POLICY_SERVER_PROTOCOL}://${POLICY_PDPX_IP}:${GLOBAL_POLICY_HEALTHCHECK_PORT} auth=${auth}
+ ${headers}= Create Dictionary Accept=application/json Content-Type=application/json
+ ${resp}= Get Request policy /policy/pdpx/v1/healthcheck headers=${headers}
+ Log Received response from policy ${resp.text}
+ Should Be Equal As Strings ${resp.status_code} 200
+ Should Be Equal As Strings ${resp.json()['code']} 200
+
+Run Policy APEX PDP Healthcheck
+ [Documentation] Runs Policy Apex PDP Health check
+ ${auth}= Create List ${POLICY_HEALTHCHECK_USERNAME} ${POLICY_HEALTHCHECK_PASSWORD}
+ Log Creating session ${GLOBAL_POLICY_SERVER_PROTOCOL}://${POLICY_APEX_PDP_IP}:${GLOBAL_POLICY_HEALTHCHECK_PORT}
+ ${session}= Create Session policy ${GLOBAL_POLICY_SERVER_PROTOCOL}://${POLICY_APEX_PDP_IP}:${GLOBAL_POLICY_HEALTHCHECK_PORT} auth=${auth} disable_warnings=1
+ ${headers}= Create Dictionary Accept=application/json Content-Type=application/json
+ ${resp}= Get Request policy /policy/apex-pdp/v1/healthcheck headers=${headers}
+ Log Received response from policy ${resp.text}
+ Should Be Equal As Strings ${resp.status_code} 200
+ Should Be Equal As Strings ${resp.json()['code']} 200
diff --git a/robot/resources/so/direct_instantiate.robot b/robot/resources/so/direct_instantiate.robot
index 6e8ba136..1be89874 100644
--- a/robot/resources/so/direct_instantiate.robot
+++ b/robot/resources/so/direct_instantiate.robot
@@ -1,32 +1,31 @@
*** Settings ***
-Documentation Instantiate VNF
+Documentation Instantiate VNF
Library OperatingSystem
Library Collections
Library String
Library DateTime
-Library SoUtils
+Library SoUtils
*** Variables ***
*** Keywords ***
-Instantiate Service Direct To SO
+Instantiate Service Direct To SO
[Documentation] Creates an entire service from a CSAR
- [Arguments] ${service} ${csar_file} ${vnf_template_file}
+ [Arguments] ${service} ${csar_file} ${vnf_template_file}
# Example: ${csar_file}= Set Variable /tmp/csar/service-Vfw20190413133734-csar.csar
# Example: ${vnf_template_file}= Set Variable /var/opt/ONAP/testsuite/eteutils/vcpeutils/preload_templates/template.vfw_vfmodule.json
${name_suffix}= Get Current Date exclude_millis=True
${name_suffix}= Evaluate '${name_suffix}'.replace(' ','')
${name_suffix}= Evaluate '${name_suffix}'.replace(':','')
- ${heatbridge}= Set Variable false
${preload_dict}= Copy Dictionary ${GLOBAL_PRELOAD_PARAMETERS['defaults']}
${template}= Create Dictionary
@{keys}= Get Dictionary Keys ${preload_dict}
:for ${key} in @{keys}
\ ${value}= Get From Dictionary ${preload_dict} ${key}
- \ ${tmp_value}= Set Variable If 'GLOBAL_' in $value ${value}
+ \ ${tmp_value}= Set Variable If 'GLOBAL_' in $value ${value}
\ ${tmp_value}= Run Keyword If 'GLOBAL_' in $value Replace String ${tmp_value} \$ ${EMPTY}
\ ${tmp_value}= Run Keyword If 'GLOBAL_' in $value Replace String ${tmp_value} { ${EMPTY}
\ ${tmp_value}= Run Keyword If 'GLOBAL_' in $value Replace String ${tmp_value} } ${EMPTY}
@@ -45,9 +44,9 @@ Instantiate Service Direct To SO
Set To Dictionary ${template} ${tmp_key1} ${ecompnet} ${tmp_key2} ${GLOBAL_INJECTED_UBUNTU_1404_IMAGE}
- Log ${preload_dict}
- Log ${template}
- ${service_instance_id}= Create Entire Service ${csar_file} ${vnf_template_file} ${template} ${name_suffix} ${GLOBAL_INJECTED_REGION} ${GLOBAL_INJECTED_OPENSTACK_TENANT_ID} ${heatbridge}
+ Log ${preload_dict}
+ Log ${template}
+ ${service_instance_id}= Create Entire Service ${csar_file} ${vnf_template_file} ${template} ${name_suffix} ${GLOBAL_INJECTED_REGION} ${GLOBAL_INJECTED_OPENSTACK_TENANT_ID}
Log To Console ServiceInstanceId:${service_instance_id}
Should Not Be Equal As Strings ${service_instance_id} None
diff --git a/robot/resources/stack_validation/validate_common.robot b/robot/resources/stack_validation/validate_common.robot
index 6c97fac1..8b292131 100644
--- a/robot/resources/stack_validation/validate_common.robot
+++ b/robot/resources/stack_validation/validate_common.robot
@@ -21,7 +21,9 @@ Resource packet_generator_interface.robot
Wait For Server
[Documentation] Attempts to login to the passed server info and verify (??). Uses server info to get public ip and locate corresponding provate key file
[Arguments] ${server_ip} ${timeout}=300s
- ${file}= Catenate ${GLOBAL_VM_PRIVATE_KEY}
+ #${file}= Catenate ${GLOBAL_VM_PRIVATE_KEY}
+ # Preload is using onap public key
+ ${file}= Catenate ${GLOBAL_ONAP_PRIVATE_KEY}
Wait Until Keyword Succeeds ${timeout} 5 sec Open Connection And Log In ${server_ip} root ${file}
${lines}= Grep Local File "Accepted publickey" /var/log/auth.log
Log ${lines}
diff --git a/robot/resources/test_templates/pnf_registration_without_SO_template.robot b/robot/resources/test_templates/pnf_registration_without_SO_template.robot
index 82b95369..8cca0f83 100644
--- a/robot/resources/test_templates/pnf_registration_without_SO_template.robot
+++ b/robot/resources/test_templates/pnf_registration_without_SO_template.robot
@@ -14,7 +14,7 @@ Library HTTPUtils
*** Variables ***
${aai_so_registration_entry_template}= robot/assets/templates/aai/add_pnf_registration_info.template
${pnf_ves_integration_request}= robot/assets/templates/ves/pnf_registration_request.template
-${DMAAP_MESSAGE_ROUTER_UNAUTHENTICATED_PNF_PATH} /events/unauthenticated.PNF_READY/2/1
+${DMAAP_MESSAGE_ROUTER_UNAUTHENTICATED_VES_PNFREG_OUTPUT_PATH} /events/unauthenticated.VES_PNFREG_OUTPUT/2/1
${VES_ENDPOINT} http://${GLOBAL_DNS_VES_NAME}:${GLOBAL_VES_SERVER_PORT}
${VES_data_path} /eventListener/v7
@@ -24,6 +24,7 @@ Create A&AI antry without SO and succesfully registrate PNF
[Documentation] Test case template for create A&AI antry without SO and succesfully registrate PNF
[Arguments] ${PNF_entry_dict}
Send VES integration request ${PNF_entry_dict}
+ Wait Until Keyword Succeeds 10x 5s Check VES_PNFREG_OUTPUT topic presence in MR
Create PNF initial entry in A&AI ${PNF_entry_dict}
Send VES integration request ${PNF_entry_dict}
Verify PNF Integration Request in A&AI ${PNF_entry_dict}
@@ -71,18 +72,12 @@ Query PNF A&AI updated entry
Should Be Equal As Strings ${json_resp["pnf-name"]} ${PNF_entry_dict.correlation_id}
Log PNF integration request in A&AI has been verified and contains all necessary entries
-Query PNF MR entry
- [Documentation] Query PNF MR updated entry
- [Arguments] ${PNF_entry_dict}
- ${get_resp}= Run MR Get Request ${DMAAP_MESSAGE_ROUTER_UNAUTHENTICATED_PNF_PATH}
+Check VES_PNFREG_OUTPUT topic presence in MR
+ [Documentation] Verify if unauthenticated.VES_PNFREG_OUTPUT topic is present in MR
+ [Arguments]
+ ${get_resp}= Run MR Get Request ${DMAAP_MESSAGE_ROUTER_UNAUTHENTICATED_VES_PNFREG_OUTPUT_PATH}
Should Be Equal As Strings ${get_resp.status_code} 200
- ${json_resp_item}= Get From List ${get_resp.json()} 0
- ${json}= evaluate json.loads('${json_resp_item}') json
- Log JSON recieved from MR ${DMAAP_MESSAGE_ROUTER_UNAUTHENTICATED_PNF_PATH} endpoint ${json}
- Should Be Equal As Strings ${json["ipaddress-v4-oam"]} ${PNF_entry_dict.PNF_IPv4_address}
- Should Be Equal As Strings ${json["ipaddress-v6-oam"]} ${PNF_entry_dict.PNF_IPv6_address}
- Should Be Equal As Strings ${json["correlationId"]} ${PNF_entry_dict.correlation_id}
- Log PNF integration request in MR has been verified and contains all necessary entries
+ Log unauthenticated.VES_PNFREG_OUTPUT topic is present in MR
Run VES HTTP Post Request
[Documentation] Runs a VES Post request
diff --git a/robot/testsuites/health-check.robot b/robot/testsuites/health-check.robot
index d0b395a9..8e4fc18e 100644
--- a/robot/testsuites/health-check.robot
+++ b/robot/testsuites/health-check.robot
@@ -140,6 +140,12 @@ Basic OOF-CMSO Health Check
Basic Policy Health Check
[Tags] health medium health-policy
Run Policy Health Check
+ Run Policy API Healthcheck
+ Run Policy PAP Healthcheck
+ Run Policy Distribution Healthcheck
+ Run Policy XACML PDP Healthcheck
+ Run Policy APEX PDP Healthcheck
+
Basic Pomba AAI-context-builder Health Check
[Tags] health oom health-pomba
@@ -290,3 +296,7 @@ Basic Holmes Engine Management API Health Check
Basic Multicloud-fcaps API Health Check
[Tags] health multicloud health-multicloud
Run MSB Get Request /api/multicloud-fcaps/healthcheck
+
+Basic Modeling genericparser API Health Check
+ [Tags] health api health-modeling
+ Run MSB Get Request /api/parser/v1/health_check
diff --git a/setup.sh b/setup.sh
index 55a422e2..96da0bde 100755
--- a/setup.sh
+++ b/setup.sh
@@ -47,9 +47,9 @@ else
if [ -d ~/python-testing-utils ]
then
cd python-testing-utils
- git pull origin master
+ git pull origin dublin
else
- git clone https://gerrit.onap.org/r/testsuite/python-testing-utils.git
+ git clone -b dublin https://gerrit.onap.org/r/testsuite/python-testing-utils.git
cd python-testing-utils
fi
fi