To remove Consul/CBS dependency in DCAE DFC was updated
to use file based configuration
CSIT updates:
- file based config use in DFC
- removal of Consul/CBS from DFC tests
Issue-ID: DCAEGEN2-2692
Signed-off-by: Piotr Marcinkiewicz <piotr.marcinkiewicz@nokia.com>
Change-Id: I9d84559f3650fc8554c317ae8eab09c76662de09
echo "Using SIM_ROOT from environmental variable: " $SIM_ROOT
fi
echo "Using SIM_ROOT from environmental variable: " $SIM_ROOT
fi
+#Prepare DFC config volume
+mkdir $SIM_ROOT/simulator-group/dfc_config_volume || true
+
#Location of the above simulators when run as a group. For start+config and stop.
SIMGROUP_ROOT=$SIM_ROOT/simulator-group
#Location of the above simulators when run as a group. For start+config and stop.
SIMGROUP_ROOT=$SIM_ROOT/simulator-group
docker exec dfc_app0 cat /var/log/ONAP/application.log >> $WORKSPACE/archives/dfc_app0_application.log
docker logs dfc_mr-sim >> $WORKSPACE/archives/dfc_mr-sim.log
docker exec dfc_app0 cat /var/log/ONAP/application.log >> $WORKSPACE/archives/dfc_app0_application.log
docker logs dfc_mr-sim >> $WORKSPACE/archives/dfc_mr-sim.log
+rm -rf $SIM_ROOT/simulator-group/dfc_config_volume || true
+
if [ -z "$running_containers" ]
then
echo "No container requires termination"
if [ -z "$running_containers" ]
then
echo "No container requires termination"
dfcnet: null
volumes:
- $SIMGROUP_ROOT/tls/:/opt/app/datafile/etc/cert/
dfcnet: null
volumes:
- $SIMGROUP_ROOT/tls/:/opt/app/datafile/etc/cert/
+ - $SIMGROUP_ROOT/dfc_config_volume:/app-config
environment:
CONSUL_HOST: "consul-server"
CONSUL_PORT: 8500
environment:
CONSUL_HOST: "consul-server"
CONSUL_PORT: 8500
${CLI_DRSIM_CTR_PUBLISHED_FILES} curl --connect-timeout 10 -X GET http://${SIM_IP}:3906/ctr_published_files
${CLI_DR_REDIR_SIM_DOWNLOADED_VOLUME} curl --connect-timeout 10 -X GET http://${SIM_IP}:3908/dwl_volume
${CLI_DRSIM_CTR_PUBLISHED_FILES} curl --connect-timeout 10 -X GET http://${SIM_IP}:3906/ctr_published_files
${CLI_DR_REDIR_SIM_DOWNLOADED_VOLUME} curl --connect-timeout 10 -X GET http://${SIM_IP}:3908/dwl_volume
+${DFC_CONFIG_VOLUME_FILE} ${SIMGROUP_ROOT}/dfc_config_volume/application_config.yaml
*** Keywords ***
MR Sim Emitted Files Equal
*** Keywords ***
MR Sim Emitted Files Equal
Log To Console Dfc-start:
Log To Console ${cli_cmd_output.stdout} ${cli_cmd_output.stderr}
Log To Console Dfc-start:
Log To Console ${cli_cmd_output.stdout} ${cli_cmd_output.stderr}
+Set DFC config
+ [Documentation] Set DFC configuration
+ [Arguments] ${dfc_config_file}
+ Copy File ${dfc_config_file} ${DFC_CONFIG_VOLUME_FILE}
+ ${dfc_config_file_content}= Get File ${DFC_CONFIG_VOLUME_FILE}
+ Log To Console APP configuration:
+ Log To Console ${dfc_config_file_content}
Test Teardown
[Documentation] Cleanup containers
Test Teardown
[Documentation] Cleanup containers
Resource ../../resources/common-keywords.robot
*** Variables ***
Resource ../../resources/common-keywords.robot
*** Variables ***
-${CONSUL_UPL_APP} /usr/bin/curl -v http://127.0.0.1:8500/v1/kv/dfc_app0?dc=dc1 -X PUT -H 'Accept: application/json' -H 'Content-Type: application/json' -H 'X-Requested-With: XMLHttpRequest' --data-binary @${SIMGROUP_ROOT}/consul/c12_feed2_PM_MEAS.json
-${CONSUL_GET_APP} /usr/bin/curl -v http://127.0.0.1:8500/v1/kv/dfc_app0?raw
-${CBS_GET_MERGED_CONFIG} /usr/bin/curl -v http://127.0.0.1:10000/service_component_all/dfc_app0
+${DFC_CONFIG_FILE} ${SIMGROUP_ROOT}/dfc_configs/c12_feed2_PM_MEAS.yaml
MR Sim Emitted Files Equal 0 #Verify 0 file emitted from MR sim
DR Sim Published Files Equal 0 #Verify 0 file published to DR sim
MR Sim Emitted Files Equal 0 #Verify 0 file emitted from MR sim
DR Sim Published Files Equal 0 #Verify 0 file published to DR sim
- ${cli_cmd_output}= Run Process ${CONSUL_UPL_APP} shell=yes
- Log To Console Consul APP write:
- Log To Console ${cli_cmd_output.stdout} ${cli_cmd_output.stderr}
-
- ${cli_cmd_output}= Run Process ${CONSUL_GET_APP} shell=yes
- Log To Console Consul APP read:
- Log To Console ${cli_cmd_output.stdout} ${cli_cmd_output.stderr}
-
- ${cli_cmd_output}= Run Process ${CBS_GET_MERGED_CONFIG} shell=yes
- Log To Console CBS merged configuration:
- Log To Console ${cli_cmd_output.stdout} ${cli_cmd_output.stderr}
-
- Sleep 10
+ Set DFC config ${DFC_CONFIG_FILE}
Resource ../../resources/common-keywords.robot
*** Variables ***
Resource ../../resources/common-keywords.robot
*** Variables ***
-${CONSUL_UPL_APP} /usr/bin/curl -v http://127.0.0.1:8500/v1/kv/dfc_app0?dc=dc1 -X PUT -H 'Accept: application/json' -H 'Content-Type: application/json' -H 'X-Requested-With: XMLHttpRequest' --data-binary @${SIMGROUP_ROOT}/consul/c12_feed2_PM_HTTPS.json
-${CONSUL_GET_APP} /usr/bin/curl -v http://127.0.0.1:8500/v1/kv/dfc_app0?raw
-${CBS_GET_MERGED_CONFIG} /usr/bin/curl -v http://127.0.0.1:10000/service_component_all/dfc_app0
+${DFC_CONFIG_FILE} ${SIMGROUP_ROOT}/dfc_configs/c12_feed2_PM_HTTPS.yaml
MR Sim Emitted Files Equal 0 #Verify 0 file emitted from MR sim
DR Sim Published Files Equal 0 #Verify 0 file published to DR sim
MR Sim Emitted Files Equal 0 #Verify 0 file emitted from MR sim
DR Sim Published Files Equal 0 #Verify 0 file published to DR sim
- ${cli_cmd_output}= Run Process ${CONSUL_UPL_APP} shell=yes
- Log To Console Consul APP write:
- Log To Console ${cli_cmd_output.stdout} ${cli_cmd_output.stderr}
-
- ${cli_cmd_output}= Run Process ${CONSUL_GET_APP} shell=yes
- Log To Console Consul APP read:
- Log To Console ${cli_cmd_output.stdout} ${cli_cmd_output.stderr}
-
- ${cli_cmd_output}= Run Process ${CBS_GET_MERGED_CONFIG} shell=yes
- Log To Console CBS merged configuration:
- Log To Console ${cli_cmd_output.stdout} ${cli_cmd_output.stderr}
-
- Sleep 10
+ Set DFC config ${DFC_CONFIG_FILE}
Resource ../../resources/common-keywords.robot
*** Variables ***
Resource ../../resources/common-keywords.robot
*** Variables ***
-${CONSUL_UPL_APP} /usr/bin/curl -v http://127.0.0.1:8500/v1/kv/dfc_app0?dc=dc1 -X PUT -H 'Accept: application/json' -H 'Content-Type: application/json' -H 'X-Requested-With: XMLHttpRequest' --data-binary @${SIMGROUP_ROOT}/consul/c12_feed2_PM_HTTPS.json
-${CONSUL_GET_APP} /usr/bin/curl -v http://127.0.0.1:8500/v1/kv/dfc_app0?raw
-${CBS_GET_MERGED_CONFIG} /usr/bin/curl -v http://127.0.0.1:10000/service_component_all/dfc_app0
+${DFC_CONFIG_FILE} ${SIMGROUP_ROOT}/dfc_configs/c12_feed2_PM_HTTPS.yaml
MR Sim Emitted Files Equal 0 #Verify 0 file emitted from MR sim
DR Sim Published Files Equal 0 #Verify 0 file published to DR sim
MR Sim Emitted Files Equal 0 #Verify 0 file emitted from MR sim
DR Sim Published Files Equal 0 #Verify 0 file published to DR sim
- ${cli_cmd_output}= Run Process ${CONSUL_UPL_APP} shell=yes
- Log To Console Consul APP write:
- Log To Console ${cli_cmd_output.stdout} ${cli_cmd_output.stderr}
-
- ${cli_cmd_output}= Run Process ${CONSUL_GET_APP} shell=yes
- Log To Console Consul APP read:
- Log To Console ${cli_cmd_output.stdout} ${cli_cmd_output.stderr}
-
- ${cli_cmd_output}= Run Process ${CBS_GET_MERGED_CONFIG} shell=yes
- Log To Console CBS merged configuration:
- Log To Console ${cli_cmd_output.stdout} ${cli_cmd_output.stderr}
-
- Sleep 10
+ Set DFC config ${DFC_CONFIG_FILE}
Test Teardown
*** Variables ***
Test Teardown
*** Variables ***
-${CONSUL_UPL_APP} /usr/bin/curl -v http://127.0.0.1:8500/v1/kv/dfc_app0?dc=dc1 -X PUT -H 'Accept: application/json' -H 'Content-Type: application/json' -H 'X-Requested-With: XMLHttpRequest' --data-binary @${SIMGROUP_ROOT}/consul/c12_feed2_PM_MEAS.json
-${CONSUL_UPL_APP_INSECURE_SFTP} /usr/bin/curl -v http://127.0.0.1:8500/v1/kv/dfc_app0?dc=dc1 -X PUT -H 'Accept: application/json' -H 'Content-Type: application/json' -H 'X-Requested-With: XMLHttpRequest' --data-binary @${SIMGROUP_ROOT}/consul/c12_feed2_PM_MEAS_no_strict_host_key_checking.json
-${CONSUL_GET_APP} /usr/bin/curl -v http://127.0.0.1:8500/v1/kv/dfc_app0?raw
-${CBS_GET_MERGED_CONFIG} /usr/bin/curl -v http://127.0.0.1:10000/service_component_all/dfc_app0
+${DFC_CONFIG_FILE} ${SIMGROUP_ROOT}/dfc_configs/c12_feed2_PM_MEAS.yaml
+${DFC_CONFIG_FILE_INSECURE_SFTP} ${SIMGROUP_ROOT}/dfc_configs/c12_feed2_PM_MEAS_no_strict_host_key_checking.yaml
Verify single event with SFTP file, when host known and strict host key checking enabled. From event poll to published file
[TAGS] DFC_STRICT_HOST_KEY_CHECKING_1
[Documentation] Verify single event with SFTP file, when host known and strict host key checking enabled. From event poll to published file.
Verify single event with SFTP file, when host known and strict host key checking enabled. From event poll to published file
[TAGS] DFC_STRICT_HOST_KEY_CHECKING_1
[Documentation] Verify single event with SFTP file, when host known and strict host key checking enabled. From event poll to published file.
- [Setup] Setup Strict Host Key Checking Test ${CONSUL_UPL_APP} all_hosts_keys
+ [Setup] Setup Strict Host Key Checking Test ${DFC_CONFIG_FILE} all_hosts_keys
Wait Until Keyword Succeeds 1 minute 10 sec MR Sim Emitted Files Equal 1 #Verify 1 file emitted from MR sim
Wait Until Keyword Succeeds 1 minute 10 sec DR Sim Query Not Published Equal 1 #Verify 1 query response for not published files
Wait Until Keyword Succeeds 1 minute 10 sec MR Sim Emitted Files Equal 1 #Verify 1 file emitted from MR sim
Wait Until Keyword Succeeds 1 minute 10 sec DR Sim Query Not Published Equal 1 #Verify 1 query response for not published files
Verify single event with SFTP file, when host unknown and strict host key checking disabled. From event poll to published file
[TAGS] DFC_STRICT_HOST_KEY_CHECKING_2
[Documentation] Verify single event with SFTP file, when host unknown and strict host key checking disabled. From event poll to published file.
Verify single event with SFTP file, when host unknown and strict host key checking disabled. From event poll to published file
[TAGS] DFC_STRICT_HOST_KEY_CHECKING_2
[Documentation] Verify single event with SFTP file, when host unknown and strict host key checking disabled. From event poll to published file.
- [Setup] Setup Strict Host Key Checking Test ${CONSUL_UPL_APP_INSECURE_SFTP} known_hosts_empty
+ [Setup] Setup Strict Host Key Checking Test ${DFC_CONFIG_FILE_INSECURE_SFTP} known_hosts_empty
Wait Until Keyword Succeeds 1 minute 10 sec MR Sim Emitted Files Equal 1 #Verify 1 file emitted from MR sim
Wait Until Keyword Succeeds 1 minute 10 sec DR Sim Query Not Published Equal 1 #Verify 1 query response for not published files
Wait Until Keyword Succeeds 1 minute 10 sec MR Sim Emitted Files Equal 1 #Verify 1 file emitted from MR sim
Wait Until Keyword Succeeds 1 minute 10 sec DR Sim Query Not Published Equal 1 #Verify 1 query response for not published files
Verify single event with SFTP file, when no known hosts file and strict host key checking enabled. From event poll to published file
[TAGS] DFC_STRICT_HOST_KEY_CHECKING_3
[Documentation] Verify single event with SFTP file, when host unknown and strict host key checking enabled. File not published.
Verify single event with SFTP file, when no known hosts file and strict host key checking enabled. From event poll to published file
[TAGS] DFC_STRICT_HOST_KEY_CHECKING_3
[Documentation] Verify single event with SFTP file, when host unknown and strict host key checking enabled. File not published.
- [Setup] Setup Strict Host Key Checking Test ${CONSUL_UPL_APP} no_known_hosts_file
+ [Setup] Setup Strict Host Key Checking Test ${DFC_CONFIG_FILE} no_known_hosts_file
Wait Until Keyword Succeeds 1 minute 10 sec MR Sim Emitted Files Equal 1 #Verify 1 file emitted from MR sim
Wait Until Keyword Succeeds 1 minute 10 sec DR Sim Query Not Published Equal 1 #Verify 1 query response for not published files
Wait Until Keyword Succeeds 1 minute 10 sec MR Sim Emitted Files Equal 1 #Verify 1 file emitted from MR sim
Wait Until Keyword Succeeds 1 minute 10 sec DR Sim Query Not Published Equal 1 #Verify 1 query response for not published files
Verify single event with SFTP file, when host unknown and strict host key checking enabled. File not published
[TAGS] DFC_STRICT_HOST_KEY_CHECKING_4
[Documentation] Verify single event with SFTP file, when host unknown and strict host key checking enabled. File not published.
Verify single event with SFTP file, when host unknown and strict host key checking enabled. File not published
[TAGS] DFC_STRICT_HOST_KEY_CHECKING_4
[Documentation] Verify single event with SFTP file, when host unknown and strict host key checking enabled. File not published.
- [Setup] Setup Strict Host Key Checking Test ${CONSUL_UPL_APP} known_hosts_empty
+ [Setup] Setup Strict Host Key Checking Test ${DFC_CONFIG_FILE} known_hosts_empty
Wait Until Keyword Succeeds 1 minute 10 sec MR Sim Emitted Files Equal 1 #Verify 1 file emitted from MR sim
Wait Until Keyword Succeeds 1 minute 10 sec DR Sim Query Not Published Equal 1 #Verify 1 query response for not published files
Sleep 60
Wait Until Keyword Succeeds 1 minute 10 sec MR Sim Emitted Files Equal 1 #Verify 1 file emitted from MR sim
Wait Until Keyword Succeeds 1 minute 10 sec DR Sim Query Not Published Equal 1 #Verify 1 query response for not published files
Sleep 60
Setup Strict Host Key Checking Test
[Documentation] Sets up strict host key checking test with single 1MB file
Setup Strict Host Key Checking Test
[Documentation] Sets up strict host key checking test with single 1MB file
- [Arguments] ${consul_config_request} ${known_hosts_file}
+ [Arguments] ${dfc_config_path} ${known_hosts_file}
Set Environment Variable MR_TC --tc100
Set Environment Variable DR_TC --tc normal
Set Environment Variable DR_REDIR_TC --tc normal
Set Environment Variable MR_TC --tc100
Set Environment Variable DR_TC --tc normal
Set Environment Variable DR_REDIR_TC --tc normal
MR Sim Emitted Files Equal 0 #Verify 0 file emitted from MR sim
DR Sim Published Files Equal 0 #Verify 0 file published to DR sim
MR Sim Emitted Files Equal 0 #Verify 0 file emitted from MR sim
DR Sim Published Files Equal 0 #Verify 0 file published to DR sim
- ${cli_cmd_output}= Run Process ${consul_config_request} shell=yes
- Log To Console Consul APP write:
- Log To Console ${cli_cmd_output.stdout} ${cli_cmd_output.stderr}
-
- ${cli_cmd_output}= Run Process ${CONSUL_GET_APP} shell=yes
- Log To Console Consul APP read:
- Log To Console ${cli_cmd_output.stdout} ${cli_cmd_output.stderr}
-
- ${cli_cmd_output}= Run Process ${CBS_GET_MERGED_CONFIG} shell=yes
- Log To Console CBS merged configuration:
- Log To Console ${cli_cmd_output.stdout} ${cli_cmd_output.stderr}
-
- Sleep 10
+ Set DFC config ${dfc_config_path}
${cli_cmd_output}= Run Process ${DFC_ROOT}/dfc-start.sh cwd=${DFC_ROOT} env:KNOWN_HOSTS=${known_hosts_file} env:SIMGROUP_ROOT=${SIMGROUP_ROOT}
Log To Console Dfc-start:
${cli_cmd_output}= Run Process ${DFC_ROOT}/dfc-start.sh cwd=${DFC_ROOT} env:KNOWN_HOSTS=${known_hosts_file} env:SIMGROUP_ROOT=${SIMGROUP_ROOT}
Log To Console Dfc-start: