From ef768a7c864f0d807d8696449f5eed7a4552316f Mon Sep 17 00:00:00 2001 From: Steve Smokowski Date: Thu, 9 Feb 2017 15:43:35 -0500 Subject: Initial OpenECOMP A&AI Model Loader commit Change-Id: Iae343fa01ecc701919703fb7d61727555371321d Signed-off-by: Steve Smokowski --- src/main/resources/aai-os-cert.p12 | Bin 0 -> 4357 bytes src/main/resources/logback.xml | 195 ++ src/main/resources/model-loader.properties | 43 + .../filemonitor/FileMonitorMsgs.properties | 81 + .../modelloader/service/ModelLoaderMsgs.properties | 112 + src/main/resources/schema/aai_schema_v8.xsd | 2462 ++++++++++++++++++++ src/main/resources/schema/vnfcatalog.xsd | 127 + 7 files changed, 3020 insertions(+) create mode 100644 src/main/resources/aai-os-cert.p12 create mode 100644 src/main/resources/logback.xml create mode 100644 src/main/resources/model-loader.properties create mode 100644 src/main/resources/org/openecomp/modelloader/filemonitor/FileMonitorMsgs.properties create mode 100644 src/main/resources/org/openecomp/modelloader/service/ModelLoaderMsgs.properties create mode 100644 src/main/resources/schema/aai_schema_v8.xsd create mode 100644 src/main/resources/schema/vnfcatalog.xsd (limited to 'src/main/resources') diff --git a/src/main/resources/aai-os-cert.p12 b/src/main/resources/aai-os-cert.p12 new file mode 100644 index 0000000..ee57120 Binary files /dev/null and b/src/main/resources/aai-os-cert.p12 differ diff --git a/src/main/resources/logback.xml b/src/main/resources/logback.xml new file mode 100644 index 0000000..48233fe --- /dev/null +++ b/src/main/resources/logback.xml @@ -0,0 +1,195 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + ${defaultPattern} + + + + + + + + + + + ${logDirectory}/${generalLogName}.log + + ${logDirectory}/${generalLogName}.%d{yyyy-MM-dd}.log.zip + 60 + + + ${errorLogPattern} + + + + + + INFO + + 256 + + + + + + ${logDirectory}/${auditLogName}.log + + ${logDirectory}/${auditLogName}.%d{yyyy-MM-dd}.log.zip + 60 + + + ${auditMetricPattern} + + + + 256 + + + + + + ${logDirectory}/${metricsLogName}.log + + ${logDirectory}/${metricsLogName}.%d{yyyy-MM-dd}.log.zip + 60 + + + ${auditMetricPattern} + + + + 256 + + + + + + ${logDirectory}/${debugLogName}.log + + ${logDirectory}/${debugLogName}.%d{yyyy-MM-dd}.log.zip + 60 + + + ${errorLogPattern} + + + + 256 + + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/main/resources/model-loader.properties b/src/main/resources/model-loader.properties new file mode 100644 index 0000000..7b8f63d --- /dev/null +++ b/src/main/resources/model-loader.properties @@ -0,0 +1,43 @@ +### +# ============LICENSE_START======================================================= +# MODEL LOADER SERVICE +# ================================================================================ +# Copyright (C) 2017 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========================================================= +### + +# Model Loader Distribution Client Configuration +ml.distribution.ACTIVE_SERVER_TLS_AUTH=false +ml.distribution.ASDC_ADDRESS= +ml.distribution.CONSUMER_GROUP=aai-ml-group +ml.distribution.CONSUMER_ID=aai-ml +ml.distribution.ENVIRONMENT_NAME= +ml.distribution.KEYSTORE_PASSWORD= +ml.distribution.KEYSTORE_FILE=asdc-client.jks +ml.distribution.PASSWORD= +ml.distribution.POLLING_INTERVAL=30 +ml.distribution.POLLING_TIMEOUT=20 +ml.distribution.USER=ci +ml.distribution.ARTIFACT_TYPES=MODEL_INVENTORY_PROFILE,MODEL_QUERY_SPEC,VNF_CATALOG + +# Model Loader AAI REST Client Configuration +ml.aai.BASE_URL= +ml.aai.MODEL_URL=/aai/v8/service-design-and-creation/models/model/ +ml.aai.NAMED_QUERY_URL=/aai/v8/service-design-and-creation/named-queries/named-query/ +ml.aai.VNF_IMAGE_URL=/aai/v8/service-design-and-creation/vnf-images +ml.aai.KEYSTORE_FILE=aai-os-cert.p12 +ml.aai.KEYSTORE_PASSWORD= +ml.aai.AUTH_USER=ModelLoader +ml.aai.AUTH_PASSWORD= diff --git a/src/main/resources/org/openecomp/modelloader/filemonitor/FileMonitorMsgs.properties b/src/main/resources/org/openecomp/modelloader/filemonitor/FileMonitorMsgs.properties new file mode 100644 index 0000000..9abd55c --- /dev/null +++ b/src/main/resources/org/openecomp/modelloader/filemonitor/FileMonitorMsgs.properties @@ -0,0 +1,81 @@ +### +# ============LICENSE_START======================================================= +# MODEL LOADER SERVICE +# ================================================================================ +# Copyright (C) 2017 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========================================================= +### + +#Resource key=Error Code|Message text|Resolution text |Description text +####### +#Newlines can be utilized to add some clarity ensuring continuing line +#has atleast one leading space +#ResourceKey=\ +# ERR0000E\ +# Sample error msg txt\ +# Sample resolution msg\ +# Sample description txt +# +###### +#Error code classification category +#100 Permission errors +#200 Availability errors/Timeouts +#300 Data errors +#400 Schema Interface type/validation errors +#500 Business process errors +#900 Unknown errors +# +######################################################################## + +#AVAILABILITY ERRORS + +LOADING_FROM_FILE=\ + FILEMON2001I|\ + Loading service properties from file {0}|\ + None. Attempting to load file|\ + Attempting to load service properties from the given service file + +FILE_SUCCESSFULLY_LOADED=\ + FILEMON2002I|\ + File {0} is loaded into the map and the corresponding system properties have been refreshed|\ + None. Successfully loaded file|\ + The given service file and its properties were successfully loaded + +FILE_CANNOT_BE_LOADED=\ + FILEMON2003E|\ + File {0} cannot be loaded into the map|\ + Please check the file permissions and format of the file|\ + Unable to load the given service file due to an error + +CANNOT_READ_FILE_STREAM=\ + FILEMON2004E|\ + Error reading the file stream for file {0}|\ + Please ensure that the file exists and the permissions are set correctly|\ + Unable to read the file stream for the given file + +#UNKNOWN ERRORS + +FILE_LISTENER_ATTACH_FAILED=\ + FILEMON9002W|\ + Unable to attach file change listener to file {0} due to an internal error|\ + Failed to attach file change listener to the given file. Please check the reported exception for details|\ + The file will not be actively monitored for changes + + +PROP_MAP_CREATION_FAILED=\ + FILEMON9001E|\ + Internal Error occurred while creating property map for service files|\ + Error occurred due to an internal issue. Please check the reported exception for details |\ + Failed to create a property map for the service files diff --git a/src/main/resources/org/openecomp/modelloader/service/ModelLoaderMsgs.properties b/src/main/resources/org/openecomp/modelloader/service/ModelLoaderMsgs.properties new file mode 100644 index 0000000..53c96dc --- /dev/null +++ b/src/main/resources/org/openecomp/modelloader/service/ModelLoaderMsgs.properties @@ -0,0 +1,112 @@ +### +# ============LICENSE_START======================================================= +# MODEL LOADER SERVICE +# ================================================================================ +# Copyright (C) 2017 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========================================================= +### + +#Resource key=Error Code|Message text|Resolution text |Description text +####### +#Newlines can be utilized to add some clarity ensuring continuing line +#has at least one leading space +#ResourceKey=\ +# ERR0000E\ +# Sample error msg txt\ +# Sample resolution msg\ +# Sample description txt +# +###### +#Error code classification category +#000 Info/Debug +#100 Permission errors +#200 Availability errors/Timeouts +#300 Data errors +#400 Schema Interface type/validation errors +#500 Business process errors +#900 Unknown errors +# +######################################################################## + +# INFO Level Logs +LOADING_CONFIGURATION=\ + MDLSVC0001I|\ + Loading configuration |\ + None. Attempting to load configuration|\ + Attempting to load Model Loader Service configuration + +STOPPING_CLIENT=\ + MDLSVC0002I|\ + Stopping distribution client|\ + None. Stopping service|\ + Stopping the Model Service distribution client + +DISTRIBUTION_EVENT=\ + MDLSVC0003I|\ + Distribution event: {0}|\ + None. Processing distribution.|\ + A distribution event was received from the ASDC + +AAI_REST_REQUEST_SUCCESS=\ + MDLSVC0004I|\ + Sent {0} request to {1}. Response: {2}|\ + None. Successfully sent REST request to AAI.|\ + The given request was sent to the specified endpoint. + +AAI_REST_REQUEST_UNSUCCESSFUL=\ + MDLSVC0005I|\ + Sent {0} request to {1}. Response code: {2}, Response message: {3}|\ + REST request to AAI unsuccessful. Check response code, and message. |\ + The given request was unsuccessful. + +DOWNLOAD_COMPLETE=\ + MDLSVC0006I|\ + Download of artifact {0} from ASDC complete. Result: {1}|\ + None.|\ + An artifact was downloaded from the ASDC + +EVENT_PUBLISHED=\ + MDLSVC0007I|\ + Published {0} event for artifact {1}. Result: {2}|\ + None.|\ + An event was published to the event bus + +# ERROR Level Logs +ASDC_CONNECTION_ERROR=\ + MDLSVC2001E|\ + Unable to register with ASDC: {0}|\ + Check configuration. Check network connection to ASDC|\ + During initialization, was not able to register with the configured ASDC instance + +DISTRIBUTION_EVENT_ERROR=\ + MDLSVC2002E|\ + Distribution event error: {0}|\ + Check configuration. Check network connection to ASDC and UEB|\ + A failure occurred processing a distribution event + +AAI_REST_REQUEST_ERROR=\ + MDLSVC2003E|\ + Failed to send {0} request to {1}: {2}|\ + Check configuration. Check network connection to AAI.|\ + A failure occurred attempting to send a request to the AAI + +# DEBUG Level Logs +INITIALIZING=\ + MDLSVC0001D|\ + init(): {0}|\ + None. Initializing service|\ + Debug information during model loader initialization + + diff --git a/src/main/resources/schema/aai_schema_v8.xsd b/src/main/resources/schema/aai_schema_v8.xsd new file mode 100644 index 0000000..66bc3db --- /dev/null +++ b/src/main/resources/schema/aai_schema_v8.xsd @@ -0,0 +1,2462 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/main/resources/schema/vnfcatalog.xsd b/src/main/resources/schema/vnfcatalog.xsd new file mode 100644 index 0000000..9789124 --- /dev/null +++ b/src/main/resources/schema/vnfcatalog.xsd @@ -0,0 +1,127 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -- cgit 1.2.3-korg