diff options
Diffstat (limited to 'src/test/resources')
11 files changed, 186 insertions, 0 deletions
diff --git a/src/test/resources/bundleconfig/etc/appprops/source-of-truth.properties b/src/test/resources/bundleconfig/etc/appprops/source-of-truth.properties new file mode 100644 index 0000000..f08722f --- /dev/null +++ b/src/test/resources/bundleconfig/etc/appprops/source-of-truth.properties @@ -0,0 +1,47 @@ +# Source of Truth mappings. This file maps an enitity path to a source of truth identifier +# AAI v7 +/v7/network/ipsec-configurations/ipsec-configuration/requested-vig-address-type=service-manager +/v7/network/ipsec-configurations/ipsec-configuration/requested-encryption-strength=service-manager +/v7/network/ipsec-configurations/ipsec-configuration/requested-dmz-type=service-manager +/v7/network/ipsec-configurations/ipsec-configuration/shared-dmz-network-address=service-manager +/v7/network/ipsec-configurations/ipsec-configuration/requested-customer-name=service-manager +/v7/network/ipsec-configurations/ipsec-configuration/ike-version=service-manager +/v7/network/ipsec-configurations/ipsec-configuration/ikev1-authentication=service-manager +/v7/network/ipsec-configurations/ipsec-configuration/ikev1-encryption=service-manager +/v7/network/ipsec-configurations/ipsec-configuration/ikev1-dh-group=service-manager +/v7/network/ipsec-configurations/ipsec-configuration/ikev1-am-group-id=service-manager +/v7/network/ipsec-configurations/ipsec-configuration/ikev1-am-password=service-manager +/v7/network/ipsec-configurations/ipsec-configuration/ikev1-sa-lifetime=service-manager +/v7/network/ipsec-configurations/ipsec-configuration/ipsec-authentication=service-manager +/v7/network/ipsec-configurations/ipsec-configuration/ipsec-encryption=service-manager +/v7/network/ipsec-configurations/ipsec-configuration/ipsec-sa-lifetime=service-manager +/v7/network/ipsec-configurations/ipsec-configuration/ipsec-pfs=service-manager +/v7/network/ipsec-configurations/ipsec-configuration/xauth-userid=service-manager +/v7/network/ipsec-configurations/ipsec-configuration/xauth-user-password=service-manager +/v7/network/ipsec-configurations/ipsec-configuration/dpd-interval=service-manager +/v7/network/ipsec-configurations/ipsec-configuration/dpd-frequency=service-manager +/v7/network/ipsec-configurations/ipsec-configuration/vig-servers=service-manager + +# AAI v8 +/v8/network/ipsec-configurations/ipsec-configuration/requested-vig-address-type=service-manager +/v8/network/ipsec-configurations/ipsec-configuration/requested-encryption-strength=service-manager +/v8/network/ipsec-configurations/ipsec-configuration/requested-dmz-type=service-manager +/v8/network/ipsec-configurations/ipsec-configuration/shared-dmz-network-address=service-manager +/v8/network/ipsec-configurations/ipsec-configuration/requested-customer-name=service-manager +/v8/network/ipsec-configurations/ipsec-configuration/ike-version=service-manager +/v8/network/ipsec-configurations/ipsec-configuration/ikev1-authentication=service-manager +/v8/network/ipsec-configurations/ipsec-configuration/ikev1-encryption=service-manager +/v8/network/ipsec-configurations/ipsec-configuration/ikev1-dh-group=service-manager +/v8/network/ipsec-configurations/ipsec-configuration/ikev1-am-group-id=service-manager +/v8/network/ipsec-configurations/ipsec-configuration/ikev1-am-password=service-manager +/v8/network/ipsec-configurations/ipsec-configuration/ikev1-sa-lifetime=service-manager +/v8/network/ipsec-configurations/ipsec-configuration/ipsec-authentication=service-manager +/v8/network/ipsec-configurations/ipsec-configuration/ipsec-encryption=service-manager +/v8/network/ipsec-configurations/ipsec-configuration/ipsec-sa-lifetime=service-manager +/v8/network/ipsec-configurations/ipsec-configuration/ipsec-pfs=service-manager +/v8/network/ipsec-configurations/ipsec-configuration/xauth-userid=service-manager +/v8/network/ipsec-configurations/ipsec-configuration/xauth-user-password=service-manager +/v8/network/ipsec-configurations/ipsec-configuration/dpd-interval=service-manager +/v8/network/ipsec-configurations/ipsec-configuration/dpd-frequency=service-manager +/v8/network/ipsec-configurations/ipsec-configuration/vig-servers=service-manager + diff --git a/src/test/resources/es_test_scripts/commands.txt b/src/test/resources/es_test_scripts/commands.txt new file mode 100644 index 0000000..5d25157 --- /dev/null +++ b/src/test/resources/es_test_scripts/commands.txt @@ -0,0 +1,3 @@ +commands histoty +curl -XPUT localhost:9200/topographyhistorysearchindex?pretty --data-binary @topoHistoryConfigSettings.json +curl -XPUT localhost:9200/_bulk?pretty --data-binary @topoHistoryBulkLoad.json diff --git a/src/test/resources/es_test_scripts/geoEntities.json b/src/test/resources/es_test_scripts/geoEntities.json new file mode 100644 index 0000000..9af3978 --- /dev/null +++ b/src/test/resources/es_test_scripts/geoEntities.json @@ -0,0 +1,6 @@ +{"index":{"_index":"topographicalsearchindex-localhost","_type":"default"} +{"pkey": "complex.TEST1", "entityType": "complex", "longitude": "-82.089844", "latitude": "33.642063", "selfLink": "http://localhost:8443/complex/TEST1"} +{"index":{"_index":"topographicalsearchindex-localhost","_type":"default"} +{"pkey": "complex.TEST2", "entityType": "complex", "longitude": "-114.785156", "latitude": "37.640335", "selfLink": "http://localhost:8443/complex/TEST2"} +{"index":{"_index":"topographicalsearchindex-localhost","_type":"default"} +{"pkey": "complex.TEST3", "entityType": "complex", "longitude": "-97.910156", "latitude": "27.595935", "selfLink": "http://localhost:8443/complex/TEST3"} diff --git a/src/test/resources/es_test_scripts/prepareGeoEntityBulkImport.pl b/src/test/resources/es_test_scripts/prepareGeoEntityBulkImport.pl new file mode 100644 index 0000000..67ed571 --- /dev/null +++ b/src/test/resources/es_test_scripts/prepareGeoEntityBulkImport.pl @@ -0,0 +1,41 @@ +#!/usr/bin/perl + +use strict; +use warnings; + +my $filename = $ARGV[0]; +my $outputfile= $ARGV[1]; + +open my $fh_input, '<', $filename or die "Cannot open $filename: $!"; +open my $fh_output, '>', $outputfile or die "Cannot open $outputfile: $!"; + +while ( my $line = <$fh_input> ) { + chomp ($line); + + if ( $line =~ /(.*)(\".*\")(.*)/ ) { + + # we have seen examples of the status field containing quoted comma-delimited + # strings which is messing up parsing of the record data which is supposed to be + # comma-separated at the field level. This little block converts sections of + # this type of data into a single-quoted-string with a semi-colon delimiter instead. + + my $beforeBadStr = $1; + my $badStr = $2; + my $afterBadStr = $3; + + $badStr =~ s/,/;/g; + $badStr =~ s/"/'/g; + + $line = $beforeBadStr . $badStr . $afterBadStr ; + + } + + my @row = split(",", $line); + print $fh_output "{\"index\":{\"_index\":\"topographicalsearchindex-localhost\",\"_type\":\"default\"}\n"; + print $fh_output "{\"pkey\": \"$row[0]\", \"entityType\": \"$row[1]\", \"location\" : {\"lat\": \"$row[3]\", \"lon\": \"$row[2]\"}, \"selfLink\": \"$row[4]\"}\n"; + +} + +close($fh_input); +close($fh_output); + diff --git a/src/test/resources/es_test_scripts/sampleGeoEntities.csv b/src/test/resources/es_test_scripts/sampleGeoEntities.csv new file mode 100644 index 0000000..d149e39 --- /dev/null +++ b/src/test/resources/es_test_scripts/sampleGeoEntities.csv @@ -0,0 +1,4 @@ +complex.TEST1,complex,-82.089844,33.642063,http://localhost:8443/complex/TEST1, +complex.TEST2,complex,-114.785156,37.640335,http://localhost:8443/complex/TEST2, +complex.TEST3,complex,-97.910156,27.595935,http://localhost:8443/complex/TEST3, +pserver.TEST1,pserver,-97.910156,27.595935,http://localhost:8443/pserver/TEST1
\ No newline at end of file diff --git a/src/test/resources/es_test_scripts/topoHistoryBulkLoad.json b/src/test/resources/es_test_scripts/topoHistoryBulkLoad.json new file mode 100644 index 0000000..77d57f7 --- /dev/null +++ b/src/test/resources/es_test_scripts/topoHistoryBulkLoad.json @@ -0,0 +1,24 @@ +{"index":{"_index":"topographyhistorysearchindex-localhost","_type":"default"} +{"count":4,"entityType":"vServer","timestamp":"31-01-2017 03:00:00"} +{"index":{"_index":"topographyhistorysearchindex-localhost","_type":"default"} +{"count":2,"entityType":"pServer","timestamp":"31-01-2017 03:00:00"} +{"index":{"_index":"topographyhistorysearchindex-localhost","_type":"default"} +{"count":3,"entityType":"pServer","timestamp":"31-01-2017 02:00:00"} +{"index":{"_index":"topographyhistorysearchindex-localhost","_type":"default"} +{"count":4,"entityType":"pServer","timestamp":"31-01-2017 03:00:00"} +{"index":{"_index":"topographyhistorysearchindex-localhost","_type":"default"} +{"count":2,"entityType":"vServer","timestamp":"31-01-2017 01:00:00"} +{"index":{"_index":"topographyhistorysearchindex-localhost","_type":"default"} +{"count":4,"entityType":"pServer","timestamp":"30-01-2017 03:00:00"} +{"index":{"_index":"topographyhistorysearchindex-localhost","_type":"default"} +{"count":4,"entityType":"generic-vnf","timestamp":"30-01-2017 03:00:00"} +{"index":{"_index":"topographyhistorysearchindex-localhost","_type":"default"} +{"count":4,"entityType":"vpe","timestamp":"31-01-2017 03:00:00"} +{"index":{"_index":"topographyhistorysearchindex-localhost","_type":"default"} +{"count":4,"entityType":"newvce","timestamp":"31-01-2017 03:00:00"} +{"index":{"_index":"topographyhistorysearchindex-localhost","_type":"default"} +{"count":4,"entityType":"vce","timestamp":"31-01-2017 03:00:00"} +{"index":{"_index":"topographyhistorysearchindex-localhost","_type":"default"} +{"count":4,"entityType":"vce","timestamp":"30-01-2017 03:00:00"} +{"index":{"_index":"topographyhistorysearchindex-localhost","_type":"default"} +{"count":4,"entityType":"vce","timestamp":"01-02-2017 03:00:00"} diff --git a/src/test/resources/es_test_scripts/topoHistoryConfigSettings.json b/src/test/resources/es_test_scripts/topoHistoryConfigSettings.json new file mode 100644 index 0000000..875813e --- /dev/null +++ b/src/test/resources/es_test_scripts/topoHistoryConfigSettings.json @@ -0,0 +1,20 @@ +{ + "topographyhistorysearchindex-localhost" : { + "mappings" : { + "default" : { + "properties" : { + "count" : { + "type" : "keyword" + }, + "entityType" : { + "type" : "keyword" + }, + "timestamp" : { + "type" : "date", + "format" : "MMM d y HH:m:s||dd-MM-yyyy HH:mm:ss||yyyy-MM-dd'T'HH:mm:ss.SSSZZ||MM/dd/yyyy||yyyyMMdd'T'HHmmssZ" + } + } + } + } + } +} diff --git a/src/test/resources/es_test_scripts/topographicalConfigSettings.json b/src/test/resources/es_test_scripts/topographicalConfigSettings.json new file mode 100644 index 0000000..c9f5d5d --- /dev/null +++ b/src/test/resources/es_test_scripts/topographicalConfigSettings.json @@ -0,0 +1,24 @@ +{ + "mappings": { + "default": { + "properties": { + "pkey": { + "type": "string" + }, + "entityType": { + "type": "string" + }, + "longitude": { + "type": "string" + }, + "latitude": { + "type": "string" + }, + "selfLink": { + "type": "string" + } + } + } + + } +} diff --git a/src/test/resources/es_test_scripts/topographysearch_schema.json b/src/test/resources/es_test_scripts/topographysearch_schema.json new file mode 100644 index 0000000..5de6904 --- /dev/null +++ b/src/test/resources/es_test_scripts/topographysearch_schema.json @@ -0,0 +1,9 @@ +{ + "fields": [ + {"name": "pkey", "data-type": "string", "searchable": "false"}, + {"name": "entityType", "data-type": "string", "searchable": "false"}, + {"name": "latitude", "data-type": "string", "searchable": "false"}, + {"name": "longitude", "data-type": "string", "searchable": "false"}, + {"name": "selfLink", "data-type": "string", "searchable": "false"} + ] +}
\ No newline at end of file diff --git a/src/test/resources/portal/portal-authentication.properties b/src/test/resources/portal/portal-authentication.properties new file mode 100644 index 0000000..d0732a1 --- /dev/null +++ b/src/test/resources/portal/portal-authentication.properties @@ -0,0 +1,2 @@ +username=testuser +password=18fa91d072b7b072a8d3326c448e5861
\ No newline at end of file diff --git a/src/test/resources/portal/roles.config b/src/test/resources/portal/roles.config new file mode 100644 index 0000000..b8313bd --- /dev/null +++ b/src/test/resources/portal/roles.config @@ -0,0 +1,6 @@ +[ + { + "id":1, + "name":"View" + } +]
\ No newline at end of file |