*** Settings *** Documentation The main interface for interacting with ASDC. It handles low level stuff like managing the http request library and DCAE required fields Library RequestsLibrary Library UUID Library JSONUtils Library OperatingSystem Library Collections Library ExtendedSelenium2Library Library HttpLibrary.HTTP Library String Library StringTemplater Library ArchiveLibrary Library HEATUtils Resource global_properties.robot Resource browser_setup.robot Resource json_templater.robot *** Variables *** ${ASDC_DESIGNER_USER_ID} cs0008 ${ASDC_TESTER_USER_ID} jm0007 ${ASDC_GOVERNOR_USER_ID} gv0001 ${ASDC_OPS_USER_ID} op0001 ${ASDC_HEALTH_CHECK_PATH} /sdc1/rest/healthCheck ${ASDC_VENDOR_LICENSE_MODEL_PATH} /onboarding-api/v1.0/vendor-license-models ${ASDC_VENDOR_SOFTWARE_PRODUCT_PATH} /onboarding-api/v1.0/vendor-software-products ${ASDC_VENDOR_KEY_GROUP_PATH} /license-key-groups ${ASDC_VENDOR_ENTITLEMENT_POOL_PATH} /entitlement-pools ${ASDC_VENDOR_FEATURE_GROUP_PATH} /feature-groups ${ASDC_VENDOR_LICENSE_AGREEMENT_PATH} /license-agreements ${ASDC_VENDOR_ACTIONS_PATH} /actions ${ASDC_VENDOR_SOFTWARE_UPLOAD_PATH} /orchestration-template-candidate ${ASDC_FE_CATALOG_RESOURCES_PATH} /sdc1/feProxy/rest/v1/catalog/resources ${ASDC_FE_CATALOG_SERVICES_PATH} /sdc1/feProxy/rest/v1/catalog/services ${ASDC_CATALOG_RESOURCES_PATH} /sdc2/rest/v1/catalog/resources ${ASDC_CATALOG_SERVICES_PATH} /sdc2/rest/v1/catalog/services ${ASDC_CATALOG_INACTIVE_RESOURCES_PATH} /sdc2/rest/v1/inactiveComponents/resource ${ASDC_CATALOG_RESOURCES_QUERY_PATH} /sdc2/rest/v1/catalog/resources/resourceName ${ASDC_CATALOG_INACTIVE_SERVICES_PATH} /sdc2/rest/v1/inactiveComponents/service ${ASDC_CATALOG_LIFECYCLE_PATH} /lifecycleState ${ASDC_CATALOG_SERVICE_RESOURCE_INSTANCE_PATH} /resourceInstance ${ASDC_CATALOG_SERVICE_RESOURCE_ARTIFACT_PATH} /artifacts ${ASDC_CATALOG_SERVICE_DISTRIBUTION_STATE_PATH} /distribution-state ${ASDC_CATALOG_SERVICE_DISTRIBUTION_PATH} /distribution ${ASDC_DISTRIBUTION_STATE_APPROVE_PATH} /approve ${ASDC_CATALOG_SERVICE_DISTRIBUTION_ACTIVATE_PATH} /distribution/PROD/activate ${ASDC_LICENSE_MODEL_TEMPLATE} robot/assets/templates/asdc/license_model.template ${ASDC_KEY_GROUP_TEMPLATE} robot/assets/templates/asdc/key_group.template ${ASDC_ENTITLEMENT_POOL_TEMPLATE} robot/assets/templates/asdc/entitlement_pool.template ${ASDC_FEATURE_GROUP_TEMPLATE} robot/assets/templates/asdc/feature_group.template ${ASDC_LICENSE_AGREEMENT_TEMPLATE} robot/assets/templates/asdc/license_agreement.template ${ASDC_ACTION_TEMPLATE} robot/assets/templates/asdc/action.template ${ASDC_SOFTWARE_PRODUCT_TEMPLATE} robot/assets/templates/asdc/software_product.template ${ASDC_ARTIFACT_UPLOAD_TEMPLATE} robot/assets/templates/asdc/artifact_upload.template ${ASDC_CATALOG_RESOURCE_TEMPLATE} robot/assets/templates/asdc/catalog_resource.template ${ASDC_USER_REMARKS_TEMPLATE} robot/assets/templates/asdc/user_remarks.template ${ASDC_CATALOG_SERVICE_TEMPLATE} robot/assets/templates/asdc/catalog_service.template ${ASDC_RESOURCE_INSTANCE_TEMPLATE} robot/assets/templates/asdc/resource_instance.template ${ASDC_RESOURCE_INSTANCE_VNF_PROPERTIES_TEMPLATE} robot/assets/templates/asdc/catalog_vnf_properties.template ${ASDC_RESOURCE_INSTANCE_VNF_INPUTS_TEMPLATE} robot/assets/templates/asdc/catalog_vnf_inputs.template ${SDC_CATALOG_NET_RESOURCE_INPUT_TEMPLATE} robot/assets/templates/asdc/catalog_net_input_properties.template ${ASDC_ALLOTTED_RESOURCE_CATALOG_RESOURCE_TEMPLATE} robot/assets/templates/asdc/catalog_resource_alloted_resource.template ${SDC_CATALOG_ALLOTTED_RESOURCE_PROPERTIES_TEMPLATE} robot/assets/templates/asdc/catalog_allotted_properties.template ${SDC_CATALOG_ALLOTTED_RESOURCE_INPUTS_TEMPLATE} robot/assets/templates/asdc/catalog_allotted_inputs.template ${SDC_CATALOG_DEPLOYMENT_ARTIFACT_PATH} robot/assets/asdc/blueprints/ ${ASDC_FE_ENDPOINT} ${GLOBAL_ASDC_SERVER_PROTOCOL}://${GLOBAL_INJECTED_SDC_FE_IP_ADDR}:${GLOBAL_ASDC_FE_PORT} ${ASDC_BE_ENDPOINT} ${GLOBAL_ASDC_SERVER_PROTOCOL}://${GLOBAL_INJECTED_SDC_BE_IP_ADDR}:${GLOBAL_ASDC_BE_PORT} ${ASDC_BE_ONBOARD_ENDPOINT} ${GLOBAL_ASDC_SERVER_PROTOCOL}://${GLOBAL_INJECTED_SDC_BE_ONBOARD_IP_ADDR}:${GLOBAL_ASDC_BE_ONBOARD_PORT} *** Keywords *** Distribute Model From ASDC [Documentation] goes end to end creating all the asdc objects based ona model and distributing it to the systems. it then returns the service name, vf name and vf module name [Arguments] ${model_zip_path} ${catalog_service_name}= ${cds}= ${service}= # For Testing use random service names #${random}= Get Current Date #${catalog_service_id}= Add ASDC Catalog Service ${catalog_service_name}_${random} ${catalog_service_id}= Add ASDC Catalog Service ${catalog_service_name} ${catalog_resource_ids}= Create List ${catalog_resources}= Create Dictionary ##### TODO: Support for Multiple resources of one type in a service ###### # The zip list is the resources - no mechanism to indicate more than 1 of the items in the zip list # GLOBAL_SERVICE_VNF_MAPPING has the logical mapping but its not the same key as model_zip_path # ${vnflist}= Get From Dictionary ${GLOBAL_SERVICE_VNF_MAPPING} ${service} # Save the resource_id in a dictionary keyed byt the resource NAme in the zipfile name (vFWDT_vFWSNK.zip or vFWDT_vPKG.zip) # Create the resources but dont immediately add resource # Add Resource to Service in a separate FOR loop # TODO: CHECK vCPE models to make sure they aren't broken with the split ${resource_types}= Create Dictionary : FOR ${zip} IN @{model_zip_path} \ ${loop_catalog_resource_id}= Setup ASDC Catalog Resource ${zip} ${cds} # zip can be vFW.zip or vFWDT_VFWSNK.zip \ ${resource_type_match}= Get Regexp Matches ${zip} ${service}_(.*)\.zip 1 # Need to be able to distribute preload for vFWCL vFWSNK and vFWDT vFWSNK to prepend service to vnf_type \ ${resource_type_string}= Set Variable If len(${resource_type_match})==0 ${service} ${service}${resource_type_match[0]} \ Set To Dictionary ${resource_types} ${resource_type_string} ${loop_catalog_resource_id} \ Append To List ${catalog_resource_ids} ${loop_catalog_resource_id} ${vnflist}= Get From Dictionary ${GLOBAL_SERVICE_VNF_MAPPING} ${service} # Spread the icons on the pallette starting on the left ${xoffset}= Set
#!/usr/bin/env sh
#
# ============LICENSE_START=======================================================
# Copyright (C) 2018 Ericsson. All rights reserved.
# Modifications Copyright (C) 2019-2022 Nordix Foundation.
# Modifications Copyright (C) 2020-2021 AT&T.
# ================================================================================
# 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.
#
# SPDX-License-Identifier: Apache-2.0
# ============LICENSE_END=========================================================
#
KEYSTORE="${KEYSTORE:-$POLICY_HOME/etc/ssl/policy-keystore}"
TRUSTSTORE="${TRUSTSTORE:-$POLICY_HOME/etc/ssl/policy-truststore}"
KEYSTORE_PASSWD="${KEYSTORE_PASSWD:-Pol1cy_0nap}"
TRUSTSTORE_PASSWD="${TRUSTSTORE_PASSWD:-Pol1cy_0nap}"
if [ "$#" -eq 1 ]; then
CONFIG_FILE=$1
else
CONFIG_FILE=${CONFIG_FILE}
fi
if [ -z "$CONFIG_FILE" ]; then
CONFIG_FILE="${POLICY_HOME}/etc/defaultConfig.json"
fi
if [ -f "${POLICY_HOME}/etc/mounted/policy-truststore" ]; then
echo "overriding policy-truststore"
cp -f "${POLICY_HOME}"/etc/mounted/policy-truststore "${TRUSTSTORE}"
fi
if [ -f "${POLICY_HOME}/etc/mounted/policy-keystore" ]; then
echo "overriding policy-keystore"
cp -f "${POLICY_HOME}"/etc/mounted/policy-keystore "${KEYSTORE}"
fi
if [ -f "${POLICY_HOME}/etc/mounted/logback.xml" ]; then
echo "overriding logback.xml"
cp -f "${POLICY_HOME}"/etc/mounted/logback.xml "${POLICY_HOME}"/etc/
fi
echo "Policy distribution config file: $CONFIG_FILE"
$JAVA_HOME/bin/java -cp "${POLICY_HOME}/etc:${POLICY_HOME}/lib/*" -Dlogback.configurationFile="${POLICY_HOME}/etc/logback.xml" -Djavax.net.ssl.keyStore="${KEYSTORE}" -Djavax.net.ssl.keyStorePassword="${KEYSTORE_PASSWD}" -Djavax.net.ssl.trustStore="${TRUSTSTORE}" -Djavax.net.ssl.trustStorePassword="${TRUSTSTORE_PASSWD}" org.onap.policy.distribution.main.startstop.Main -c "${CONFIG_FILE}"