From cb07500090e0c50929e7543a63b42ff5b8dc12e3 Mon Sep 17 00:00:00 2001 From: "Singal, Kapil (ks220y)" Date: Tue, 16 Mar 2021 00:30:22 -0400 Subject: Renaming ansible and saltstanck adapter to adaptor Issue-ID: CCSDK-3212 Signed-off-by: Singal, Kapil (ks220y) Change-Id: Ibf0366b31a37173050602bd692627647f4f29bb7 --- .../src/test/resources/config.sls | 2 + .../resources/org/onap/ccsdk/default.properties | 102 +++++++++++++++++++++ .../src/test/resources/test | 30 ++++++ .../src/test/resources/test-invalid.json | 29 ++++++ .../src/test/resources/test-sls.json | 35 +++++++ .../src/test/resources/test.json | 30 ++++++ .../src/test/resources/test.sls | 30 ++++++ .../src/test/resources/test.txt | 30 ++++++ 8 files changed, 288 insertions(+) create mode 100644 adaptors/saltstack-adaptor/saltstack-adaptor-provider/src/test/resources/config.sls create mode 100644 adaptors/saltstack-adaptor/saltstack-adaptor-provider/src/test/resources/org/onap/ccsdk/default.properties create mode 100644 adaptors/saltstack-adaptor/saltstack-adaptor-provider/src/test/resources/test create mode 100644 adaptors/saltstack-adaptor/saltstack-adaptor-provider/src/test/resources/test-invalid.json create mode 100644 adaptors/saltstack-adaptor/saltstack-adaptor-provider/src/test/resources/test-sls.json create mode 100644 adaptors/saltstack-adaptor/saltstack-adaptor-provider/src/test/resources/test.json create mode 100644 adaptors/saltstack-adaptor/saltstack-adaptor-provider/src/test/resources/test.sls create mode 100644 adaptors/saltstack-adaptor/saltstack-adaptor-provider/src/test/resources/test.txt (limited to 'adaptors/saltstack-adaptor/saltstack-adaptor-provider/src/test/resources') diff --git a/adaptors/saltstack-adaptor/saltstack-adaptor-provider/src/test/resources/config.sls b/adaptors/saltstack-adaptor/saltstack-adaptor-provider/src/test/resources/config.sls new file mode 100644 index 000000000..aff05939b --- /dev/null +++ b/adaptors/saltstack-adaptor/saltstack-adaptor-provider/src/test/resources/config.sls @@ -0,0 +1,2 @@ +vim: + pkg.installed diff --git a/adaptors/saltstack-adaptor/saltstack-adaptor-provider/src/test/resources/org/onap/ccsdk/default.properties b/adaptors/saltstack-adaptor/saltstack-adaptor-provider/src/test/resources/org/onap/ccsdk/default.properties new file mode 100644 index 000000000..ba54b4a53 --- /dev/null +++ b/adaptors/saltstack-adaptor/saltstack-adaptor-provider/src/test/resources/org/onap/ccsdk/default.properties @@ -0,0 +1,102 @@ +### +# ============LICENSE_START======================================================= +# ONAP : CCSDK +# ================================================================================ +# Copyright (C) 2018 Samsung Electronics. 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========================================================= +### +# +# Default properties for the APP-C Provider Adaptor +# +# ------------------------------------------------------------------------------------------------- +# +# Define the name and path of any user-provided configuration (bootstrap) file that can be loaded +# to supply configuration options +org.onap.appc.bootstrap.file=appc.properties +org.onap.appc.bootstrap.path=/opt/onap/appc/data/properties,${user.home},. +appc.application.name=APPC +# +# Define the message resource bundle name to be loaded +org.onap.appc.resources=org/onap/appc/i18n/MessageResources +# +# The name of the adaptor. +org.onap.appc.provider.adaptor.name=org.onap.appc.appc_provider_adaptor +# +# Set up the logging environment +# +org.onap.appc.logging.file=org/onap/appc/logback.xml +org.onap.appc.logging.path=${user.home};etc;../etc +org.onap.appc.logger=org.onap.appc +org.onap.appc.security.logger=org.onap.appc.security +# +# The minimum and maximum provider/tenant context pool sizes. Min=1 means that as soon +# as the provider/tenant is referenced a Context is opened and added to the pool. Max=0 +# means that the upper bound on the pool is unbounded. +org.onap.appc.provider.min.pool=1 +org.onap.appc.provider.max.pool=0 +# +# The following properties are used to configure the retry logic for connection to the +# IaaS provider(s). The retry delay property is the amount of time, in seconds, the +# application waits between retry attempts. The retry limit is the number of retries +# that are allowed before the request is failed. +org.onap.appc.provider.retry.delay=30 +org.onap.appc.provider.retry.limit=10 +# +# The trusted hosts list for SSL access when a certificate is not provided. +# +provider.trusted.hosts=* +# +# The amount of time, in seconds, to wait for a server state change (start->stop, stop->start, etc). +# If the server does not change state to a valid state within the alloted time, the operation +# fails. +org.onap.appc.server.state.change.timeout=300 +# +# The amount of time to wait, in seconds, between subsequent polls to the OpenStack provider +# to refresh the status of a resource we are waiting on. +# +org.onap.appc.openstack.poll.interval=20 +# +# The connection information to connect to the provider we are using. These properties +# are "structured" properties, in that the name is a compound name, where the nodes +# of the name can be ordered (1, 2, 3, ...). All of the properties with the same ordinal +# position are defining the same entity. For example, provider1.type and provider1.name +# are defining the same provider, whereas provider2.name and provider2.type are defining +# the values for a different provider. Any number of providers can be defined in this +# way. +# +# Don't change these 2 right now since they are hard coded in the DG +#provider1.type=appc +#provider1.name=appc +#These you can change +#provider1.identity=appc +#provider1.tenant1.name=appc +#provider1.tenant1.userid=appc +#provider1.tenant1.password=appc +# After a change to the provider make sure to recheck these values with an api call to provider1.identity/tokens +test.expected-regions=1 +test.expected-endpoints=1 +#Your OpenStack IP +#test.ip=192.168.1.2 +# Your OpenStack Platform's Keystone Port (default is 5000) +#test.port=5000 +#test.tenantid=abcde12345fghijk6789lmnopq123rst +#test.vmid=abc12345-1234-5678-890a-abcdefg12345 +# Port 8774 below is default port for OpenStack's Nova API Service +#test.url=http://192.168.1.2:8774/v2/abcde12345fghijk6789lmnopq123rst/servers/abc12345-1234-5678-890a-abcdefg12345 + diff --git a/adaptors/saltstack-adaptor/saltstack-adaptor-provider/src/test/resources/test b/adaptors/saltstack-adaptor/saltstack-adaptor-provider/src/test/resources/test new file mode 100644 index 000000000..dec578bd9 --- /dev/null +++ b/adaptors/saltstack-adaptor/saltstack-adaptor-provider/src/test/resources/test @@ -0,0 +1,30 @@ +operational-data.avpn-ip-port-information.port-level-cos.queueing.pe-egress-class-queueing-policing-codes.cos2v-queueing-code = P +operational-data.avpn-ip-port-information.port-level-cos.queueing.pe-egress-class-queueing-policing-codes.cos3-queueing-code = W +operational-data.avpn-ip-port-information.port-level-cos.queueing.pe-per-class-queueing-behaviors.cos2-queueing = WRED +operational-data.avpn-ip-port-information.port-level-cos.queueing.pe-per-class-queueing-behaviors.cos2v-queueing = QueueLimit +operational-data.avpn-ip-port-information.port-level-cos.queueing.pe-per-class-queueing-behaviors.cos3-queueing = WRED +operational-data.avpn-ip-port-information.port-level-cos.shaping.pe-egress-per-class-shaping-behaviors.cos2-shaping = Disable +operational-data.avpn-ip-port-information.port-level-cos.shaping.pe-egress-per-class-shaping-behaviors.cos2v-shaping = Enable +operational-data.avpn-ip-port-information.port-level-cos.shaping.pe-egress-per-class-shaping-behaviors.cos3-shaping = Disable +operational-data.avpn-ip-port-information.port-level-cos.shaping.pe-egress-per-class-shaping-codes.cos2-shaping-code = W +operational-data.avpn-ip-port-information.port-level-cos.shaping.pe-egress-per-class-shaping-codes.cos2v-shaping-code = P +service-configuration-notification-input.ack-final-indicator = Y +service-configuration-notification-input.response-code = 0 +service-configuration-notification-input.response-message = Plc Activation Failed: Device gblond2005me6 Sync-from Failed. Please check device IP address and NCS setup. +service-configuration-notification-input.service-information.service-instance-id = TEST7 +service-configuration-notification-input.service-information.service-type = AVPN +service-configuration-notification-input.svc-request-id = TEST7 +service-data.avpn-ip-port-information.avpn-access-information.access-circuit-id = DHEC.54831.170.ATI +service-data.avpn-ip-port-information.avpn-access-information.access-interface = _1G +service-data.avpn-ip-port-information.avpn-access-information.access-speed = 10000 +service-data.avpn-ip-port-information.avpn-access-information.access-speed-units = Kbps +service-data.avpn-ip-port-information.avpn-access-information.l1-customer-handoff = _1000BASELX +service-data.avpn-ip-port-information.avpn-access-information.managed-ce = N +service-data.avpn-ip-port-information.avpn-access-information.vlan-tag-control = _1Q +service-data.avpn-ip-port-information.clli = LONDENEH +service-data.avpn-ip-port-information.contracted-port-speed = 10000 +service-data.avpn-ip-port-information.contracted-port-speed-units = Kbps +service-data.avpn-ip-port-information.endpoint-information.bundle-id = 33 +service-data.avpn-ip-port-information.endpoint-information.interface-string = ae0 +service-data.service-information.service-instance-id = ICORESITE-2751508 +service-data.service-information.service-type = AVPN diff --git a/adaptors/saltstack-adaptor/saltstack-adaptor-provider/src/test/resources/test-invalid.json b/adaptors/saltstack-adaptor/saltstack-adaptor-provider/src/test/resources/test-invalid.json new file mode 100644 index 000000000..d16bfccdf --- /dev/null +++ b/adaptors/saltstack-adaptor/saltstack-adaptor-provider/src/test/resources/test-invalid.json @@ -0,0 +1,29 @@ +"equipment-data": [ +{ +"server-count": "4", +"max-server-speed": "1600000", +"number-primary-servers": "2", +"equipment-id": "Server1", +"server-model": "Unknown", +"server-id": "Server1", +"test-node": { +"test-inner-node": "Test-Value" +} +} +], +"resource-state": { +"threshold-value": "1600000", +"last-added": "1605000", +"used": "1605000", +"limit-value": "1920000" +}, +"resource-rule": { +"endpoint-position": "VCE-Cust", +"soft-limit-expression": "0.6 * max-server-speed * number-primary-servers", +"resource-name": "Bandwidth", +"service-model": "DUMMY", +"hard-limit-expression": "max-server-speed * number-primary-servers", +"equipment-level": "Server" +}, +"message": "The provisioned access bandwidth is at or exceeds 50% of the total server capacity." +} diff --git a/adaptors/saltstack-adaptor/saltstack-adaptor-provider/src/test/resources/test-sls.json b/adaptors/saltstack-adaptor/saltstack-adaptor-provider/src/test/resources/test-sls.json new file mode 100644 index 000000000..bc1c10c8d --- /dev/null +++ b/adaptors/saltstack-adaptor/saltstack-adaptor-provider/src/test/resources/test-sls.json @@ -0,0 +1,35 @@ +{ + "minion1": { + "retcode": 0, + "pkg_|-install_network_packages_|-install_network_packages_|-installed": { + "comment": "The following packages were installed/updated: lftp\nThe following packages were already installed: rsync, curl", + "name": "install_network_packages", + "start_time": "08:47:16.061765", + "result": true, + "duration": 11086.334, + "__run_num__": 0, + "__sls__": "nettools", + "changes": { + "lftp": { + "new": "4.6.3a-1build2", + "old": "" + } + }, + "__id__": "install_network_packages" + } + }, + "minion2": { + "retcode": 0, + "pkg_|-install_network_packages_|-install_network_packages_|-installed": { + "comment": "All specified packages are already installed", + "name": "curl", + "start_time": "08:47:16.152099", + "result": true, + "duration": 426.493, + "__run_num__": 0, + "__sls__": "nettools", + "changes": {}, + "__id__": "install_network_packages" + } + } +} diff --git a/adaptors/saltstack-adaptor/saltstack-adaptor-provider/src/test/resources/test.json b/adaptors/saltstack-adaptor/saltstack-adaptor-provider/src/test/resources/test.json new file mode 100644 index 000000000..81131d6f4 --- /dev/null +++ b/adaptors/saltstack-adaptor/saltstack-adaptor-provider/src/test/resources/test.json @@ -0,0 +1,30 @@ +{ + "equipment-data": [ + { + "server-count": "4", + "max-server-speed": "1600000", + "number-primary-servers": "2", + "equipment-id": "Server1", + "server-model": "Unknown", + "server-id": "Server1", + "test-node": { + "test-inner-node": "Test-Value" + } + } + ], + "resource-state": { + "threshold-value": "1600000", + "last-added": "1605000", + "used": "1605000", + "limit-value": "1920000" + }, + "resource-rule": { + "endpoint-position": "VCE-Cust", + "soft-limit-expression": "0.6 * max-server-speed * number-primary-servers", + "resource-name": "Bandwidth", + "service-model": "DUMMY", + "hard-limit-expression": "max-server-speed * number-primary-servers", + "equipment-level": "Server" + }, + "message": "The provisioned access bandwidth is at or exceeds 50% of the total server capacity." +} diff --git a/adaptors/saltstack-adaptor/saltstack-adaptor-provider/src/test/resources/test.sls b/adaptors/saltstack-adaptor/saltstack-adaptor-provider/src/test/resources/test.sls new file mode 100644 index 000000000..cd76486aa --- /dev/null +++ b/adaptors/saltstack-adaptor/saltstack-adaptor-provider/src/test/resources/test.sls @@ -0,0 +1,30 @@ +{ + "equipment-data": [ + { + "server-count": "4", + "max-server-speed": "1600000", + "number-primary-servers": "2", + "equipment-id": "Server1", + "server-model": "Unknown", + "server-id": "Server1", + "test-node" : { + "test-inner-node" : "Test-Value" + } + } + ], + "resource-state": { + "threshold-value": "1600000", + "last-added": "1605000", + "used": "1605000", + "limit-value": "1920000" + }, + "resource-rule": { + "endpoint-position": "VCE-Cust", + "soft-limit-expression": "0.6 * max-server-speed * number-primary-servers", + "resource-name": "Bandwidth", + "service-model": "DUMMY", + "hard-limit-expression": "max-server-speed * number-primary-servers", + "equipment-level": "Server" + }, + "message": "The provisioned access bandwidth is at or exceeds 50% of the total server capacity." +} diff --git a/adaptors/saltstack-adaptor/saltstack-adaptor-provider/src/test/resources/test.txt b/adaptors/saltstack-adaptor/saltstack-adaptor-provider/src/test/resources/test.txt new file mode 100644 index 000000000..dec578bd9 --- /dev/null +++ b/adaptors/saltstack-adaptor/saltstack-adaptor-provider/src/test/resources/test.txt @@ -0,0 +1,30 @@ +operational-data.avpn-ip-port-information.port-level-cos.queueing.pe-egress-class-queueing-policing-codes.cos2v-queueing-code = P +operational-data.avpn-ip-port-information.port-level-cos.queueing.pe-egress-class-queueing-policing-codes.cos3-queueing-code = W +operational-data.avpn-ip-port-information.port-level-cos.queueing.pe-per-class-queueing-behaviors.cos2-queueing = WRED +operational-data.avpn-ip-port-information.port-level-cos.queueing.pe-per-class-queueing-behaviors.cos2v-queueing = QueueLimit +operational-data.avpn-ip-port-information.port-level-cos.queueing.pe-per-class-queueing-behaviors.cos3-queueing = WRED +operational-data.avpn-ip-port-information.port-level-cos.shaping.pe-egress-per-class-shaping-behaviors.cos2-shaping = Disable +operational-data.avpn-ip-port-information.port-level-cos.shaping.pe-egress-per-class-shaping-behaviors.cos2v-shaping = Enable +operational-data.avpn-ip-port-information.port-level-cos.shaping.pe-egress-per-class-shaping-behaviors.cos3-shaping = Disable +operational-data.avpn-ip-port-information.port-level-cos.shaping.pe-egress-per-class-shaping-codes.cos2-shaping-code = W +operational-data.avpn-ip-port-information.port-level-cos.shaping.pe-egress-per-class-shaping-codes.cos2v-shaping-code = P +service-configuration-notification-input.ack-final-indicator = Y +service-configuration-notification-input.response-code = 0 +service-configuration-notification-input.response-message = Plc Activation Failed: Device gblond2005me6 Sync-from Failed. Please check device IP address and NCS setup. +service-configuration-notification-input.service-information.service-instance-id = TEST7 +service-configuration-notification-input.service-information.service-type = AVPN +service-configuration-notification-input.svc-request-id = TEST7 +service-data.avpn-ip-port-information.avpn-access-information.access-circuit-id = DHEC.54831.170.ATI +service-data.avpn-ip-port-information.avpn-access-information.access-interface = _1G +service-data.avpn-ip-port-information.avpn-access-information.access-speed = 10000 +service-data.avpn-ip-port-information.avpn-access-information.access-speed-units = Kbps +service-data.avpn-ip-port-information.avpn-access-information.l1-customer-handoff = _1000BASELX +service-data.avpn-ip-port-information.avpn-access-information.managed-ce = N +service-data.avpn-ip-port-information.avpn-access-information.vlan-tag-control = _1Q +service-data.avpn-ip-port-information.clli = LONDENEH +service-data.avpn-ip-port-information.contracted-port-speed = 10000 +service-data.avpn-ip-port-information.contracted-port-speed-units = Kbps +service-data.avpn-ip-port-information.endpoint-information.bundle-id = 33 +service-data.avpn-ip-port-information.endpoint-information.interface-string = ae0 +service-data.service-information.service-instance-id = ICORESITE-2751508 +service-data.service-information.service-type = AVPN -- cgit 1.2.3-korg