aboutsummaryrefslogtreecommitdiffstats
path: root/appc-common
diff options
context:
space:
mode:
Diffstat (limited to 'appc-common')
-rw-r--r--appc-common/pom.xml1
-rw-r--r--appc-common/src/main/java/org/openecomp/appc/CmdLine.java60
-rw-r--r--appc-common/src/main/java/org/openecomp/appc/i18n/Msg.java6
-rw-r--r--appc-common/src/main/resources/org/openecomp/appc/i18n/MessageResources.properties5
-rw-r--r--appc-common/src/main/resources/org/openecomp/appc/org.ops4j.pax.logging.cfg145
-rw-r--r--appc-common/src/test/resources/org/openecomp/appc/i18n/TestResources_de.properties5
6 files changed, 219 insertions, 3 deletions
diff --git a/appc-common/pom.xml b/appc-common/pom.xml
index 90cec79a7..9565cb84e 100644
--- a/appc-common/pom.xml
+++ b/appc-common/pom.xml
@@ -135,7 +135,6 @@
<plugin>
<groupId>com.att.eelf</groupId>
<artifactId>eelf-maven-plugin</artifactId>
- <version>${eelf.maven.plugin.version}</version>
<executions>
<execution>
<id>validation</id>
diff --git a/appc-common/src/main/java/org/openecomp/appc/CmdLine.java b/appc-common/src/main/java/org/openecomp/appc/CmdLine.java
new file mode 100644
index 000000000..699edc70c
--- /dev/null
+++ b/appc-common/src/main/java/org/openecomp/appc/CmdLine.java
@@ -0,0 +1,60 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP : APPC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Copyright (C) 2017 Amdocs
+ * =============================================================================
+ * 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.
+ *
+ * ECOMP is a trademark and service mark of AT&T Intellectual Property.
+ * ============LICENSE_END=========================================================
+ */
+
+ package org.openecomp.appc;
+
+import org.openecomp.appc.encryption.EncryptionTool;
+
+public class CmdLine {
+
+ public static void main(String[] args) {
+ if(args.length <= 1 || args.length >= 3){
+ printUsage();
+ }else{
+ String command = args[0];
+
+ switch(command){
+ case "encrypt":
+ if(args[1]!= null){
+ String clearText = args[1];
+ String encrypted = EncryptionTool.getInstance().encrypt(clearText);
+ System.out.println(encrypted);
+ }else{
+ printUsage();
+ }
+ break;
+ default:
+ printUsage();
+ break;
+
+ }
+ }
+
+ }
+
+ private static void printUsage(){
+ System.out.println("Usage: java -jar <this jar> ...");
+ System.out.println("\tencrypt <your text> \t\t(Encrypts your text)");
+ }
+}
diff --git a/appc-common/src/main/java/org/openecomp/appc/i18n/Msg.java b/appc-common/src/main/java/org/openecomp/appc/i18n/Msg.java
index c6e87c6e7..7306b4c5d 100644
--- a/appc-common/src/main/java/org/openecomp/appc/i18n/Msg.java
+++ b/appc-common/src/main/java/org/openecomp/appc/i18n/Msg.java
@@ -702,6 +702,12 @@ public enum Msg implements EELFResolvableErrorEnum {
*
*/
HYPERVISOR_DOWN_ERROR,
+
+ /**
+ * Unable to determine Hypervisor status for Server {0}. failed.
+ *
+ */
+ HYPERVISOR_STATUS_UKNOWN,
/**
* Hypervisor Network check for Server {0} failed. Not reachable by APPC
diff --git a/appc-common/src/main/resources/org/openecomp/appc/i18n/MessageResources.properties b/appc-common/src/main/resources/org/openecomp/appc/i18n/MessageResources.properties
index 08020f8b3..28971c7b0 100644
--- a/appc-common/src/main/resources/org/openecomp/appc/i18n/MessageResources.properties
+++ b/appc-common/src/main/resources/org/openecomp/appc/i18n/MessageResources.properties
@@ -879,6 +879,11 @@ HYPERVISOR_DOWN_ERROR=APPC0141E|\
the requested operation on it.
.
+HYPERVISOR_STATUS_UKNOWN=APPC0158E|\
+ Unable to determine the status of the Hypervisor for the Server {0} |\
+ Please ensure the userid has privileges enabled to query for the Hypervisor status. |\
+ If you wish to proceed with the requested operation, either obtain the privileges from the Cloud provider, or skip the Hypervisor check and retry the request.
+ .
HYPERVISOR_NETWORK_ERROR=APPC0142E|\
Hypervisor {0} for the Server {1} is NOT Reachable by APPC for initiating the requested operation|\
diff --git a/appc-common/src/main/resources/org/openecomp/appc/org.ops4j.pax.logging.cfg b/appc-common/src/main/resources/org/openecomp/appc/org.ops4j.pax.logging.cfg
new file mode 100644
index 000000000..78b50cf55
--- /dev/null
+++ b/appc-common/src/main/resources/org/openecomp/appc/org.ops4j.pax.logging.cfg
@@ -0,0 +1,145 @@
+ ################################################################################
+ #
+ # Licensed to the Apache Software Foundation (ASF) under one or more
+ # contributor license agreements. See the NOTICE file distributed with
+ # this work for additional information regarding copyright ownership.
+ # The ASF licenses this file to You 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,
+ # WITH WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ # See the License for the specific language governing permissions and
+ # limitations under the License.
+ #
+ ################################################################################
+
+ # Root
+ #log4j.rootLogger=TRACE, osgi:VmLogAppender
+ log4j.rootLogger=TRACE, out, sift, osgi:*
+ log4j.throwableRenderer=org.apache.log4j.OsgiThrowableRenderer
+
+ # CONSOLE appender not used by default
+ log4j.appender.stdout=org.apache.log4j.ConsoleAppender
+ log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
+ log4j.appender.stdout.layout.ConversionPattern=%d{ISO8601} | %-5.5p | %-16.16t | %-32.32c{1} | %X{bundle.id} - %X{bundle.name} - %X{bundle.version} | %m%n
+
+ # Async appender forwarding to file appender
+ log4j.appender.async=org.apache.log4j.AsyncAppender
+ log4j.appender.async.appenders=out
+
+ # Karaf appenders
+ # File appender
+ log4j.appender.out=org.apache.log4j.RollingFileAppender
+ log4j.appender.out.layout=org.apache.log4j.PatternLayout
+ log4j.appender.out.layout.ConversionPattern=%d{ISO8601} | %-5.5p | %-16.16t | %-32.32c{1} | %X{bundle.id} - %X{bundle.name} - %X{bundle.version} | %m%n
+ log4j.appender.out.file=${karaf.data}/log/karaf.log
+ log4j.appender.out.append=true
+ log4j.appender.out.maxFileSize=10MB
+ log4j.appender.out.maxBackupIndex=100
+
+
+ # Sift appender
+ log4j.appender.sift=org.apache.log4j.sift.MDCSiftingAppender
+ log4j.appender.sift.key=bundle.name
+ log4j.appender.sift.default=karaf
+ log4j.appender.sift.appender=org.apache.log4j.RollingFileAppender
+ log4j.appender.sift.appender.layout=org.apache.log4j.PatternLayout
+ log4j.appender.sift.appender.layout.ConversionPattern=%d{MM/dd-HH:mm:ss.SSS}|%X{RequestId}|%X{ServiceInstanceId}|%t|%X{ServiceName} - %X{bundle.id} - %X{bundle.name} - %X{bundle.version}|%-5.5p|%X{AlertSeverity}|%X{ServerFQDN}|%X{ServerIPAddress}|[%c{3}]|%m%n
+ log4j.appender.sift.appender.file=${karaf.data}/log/eelf/karaf.log
+ log4j.appender.sift.appender.append=true
+
+ log4j.category.org.opendaylight.controller.netconf.persist.impl.osgi.ConfigPusherImpl=DEBUG
+ log4j.category.org.opendaylight.controller.netconf.persist.impl.osgi.ConfigPersisterActivator=DEBUG
+
+
+ #ECOMP Debug appender
+ log4j.appender.debug=org.apache.log4j.RollingFileAppender
+ log4j.appender.debug.key=bundle.name
+ log4j.appender.debug.default=karaf
+
+ log4j.appender.debug.appName=EELFDebug
+ log4j.appender.debug.layout=org.apache.log4j.PatternLayout
+ log4j.appender.debug.layout.ConversionPattern=%d{yyyy-MM-dd'T'hh:mm:ss.SSSXXX}|%X{RequestId}|%m%n
+ #log4j.appender.debug.filter.f1=org.apache.log4j.varia.LevelRangeFilter
+ #log4j.appender.debug.filter.f1.LevelMax=WARN
+ #log4j.appender.debug.filter.f1.LevelMin=TRACE
+
+
+ log4j.appender.debug.file=${karaf.data}/log/APPC/appc-debug.log
+ log4j.appender.debug.append=true
+ log4j.appender.debug.maxFileSize=100MB
+ log4j.appender.debug.maxBackupIndex=10
+
+
+ #Error appender
+ log4j.appender.error=org.apache.log4j.RollingFileAppender
+ log4j.appender.error.appName=EELFError
+ log4j.appender.error.File=${karaf.data}/log/APPC/appc-error.log
+ log4j.appender.error.Threshold=ERROR
+ log4j.appender.error.MaxBackupIndex=1
+ log4j.appender.error.MaxFileSize=100MB
+ log4j.appender.error.layout=org.apache.log4j.PatternLayout
+ log4j.appender.error.layout.ConversionPattern=%d{yyyy-MM-dd'T'hh:mm:ss.SSSXXX}|%X{RequestId}|%t|%X{ServiceName}|%X{PartnerName}|%X{TargetEntity}|%X{TargetServiceName}|%-5.5p|%X{ErrorCode}|%X{ErrorDescription}|%m%n
+
+ #Metrics appender
+ log4j.appender.metric=org.apache.log4j.RollingFileAppender
+ log4j.appender.metric.appName=EELFMetrics
+ log4j.appender.metric.File=${karaf.data}/log/APPC/appc-metric.log
+ log4j.appender.metric.MaxBackupIndex=1
+ log4j.appender.metric.MaxFileSize=100MB
+ log4j.appender.metric.layout=org.apache.log4j.PatternLayout
+ log4j.appender.metric.layout.ConversionPattern=%X{BeginTimestamp}|%X{EndTimestamp}|%X{RequestId}|%X{ServiceInstanceId}|%t|%X{ServerName}|%X{ServiceName}|%X{PartnerName}|%X{TargetEntity}|%X{TargetServiceName}|%X{StatusCode}|%X{ResponseCode}|%X{ResponseDescription}|%X{InstanceUUID}|%-5.5p|%X{Severity}|%X{ServerIPAddress}|%X{ElapsedTime}|%X{ServerFQDN}|%X{ClientIPAddress}|%X{ClassName}||%X{ProcessKey}|%X{TargetVirtualEntity}|%X{CustomField1}|%X{CustomField2}|%X{CustomField3}|%X{CustomField4}|%m%n
+
+ #Audit appender
+ log4j.appender.audit=org.apache.log4j.RollingFileAppender
+ log4j.appender.audit.appName=EELFAudit
+ log4j.appender.audit.File=${karaf.data}/log/APPC/appc-audit.log
+ log4j.appender.audit.MaxBackupIndex=1
+ log4j.appender.audit.MaxFileSize=100MB
+ log4j.appender.audit.layout=org.apache.log4j.PatternLayout
+ log4j.appender.audit.layout.ConversionPattern=%X{BeginTimestamp}|%X{EndTimestamp}|%X{RequestId}|%X{ServiceInstanceId}|%t|%X{ServerName}|%X{ServiceName}|%X{PartnerName}|%X{StatusCode}|%X{ResponseCode}|%X{ResponseDescription}|%X{InstanceUUID}|%-5.5p|%X{Severity}|%X{ServerIPAddress}|%X{ElapsedTime}|%X{ServerFQDN}|%X{ClientIPAddress}|%X{ClassName}||%X{ProcessKey}|%X{CustomField1}|%X{CustomField2}|%X{CustomField3}|%X{CustomField4}|%m%n
+
+ #Loggers
+
+ #Routing of all messages from root logger
+ log4j.logger.org.openecomp=TRACE, debug, error
+ #Store to the same log file messages from upper level appender or not
+ log4j.additivity.org.openecomp=false
+
+ #EELFManager loggers
+ #EELF parent logger
+ log4j.logger.com.att.eelf=TRACE, debug
+ log4j.additivity.com.att.eelf=false
+
+ #Audit logger routing
+ log4j.logger.com.att.eelf.audit=DEBUG, audit
+ log4j.additivity.com.att.eelf.audit=false
+
+ #Metric logger routing
+ log4j.logger.com.att.eelf.metrics=DEBUG, metric
+ log4j.additivity.com.att.eelf.metrics=false
+
+ #Performance logger routing
+ log4j.logger.com.att.eelf.perf=DEBUG, metric
+ log4j.additivity.com.att.eelf.perf=false
+
+ #Server logger routing
+ log4j.logger.com.att.eelf.server=DEBUG, debug
+ log4j.additivity.com.att.eelf.server=false
+
+ #Policy logger routing
+ log4j.logger.com.att.eelf.policy=DEBUG, debug
+ log4j.additivity.com.att.eelf.policy=false
+
+ #Error logger routing
+ log4j.logger.com.att.eelf.error=DEBUG, error
+ log4j.additivity.com.att.eelf.error=false
+
+ #Debug logger routing
+ log4j.logger.com.att.eelf.debug=DEBUG, debug
+ log4j.additivity.com.att.eelf.debug=false
+
diff --git a/appc-common/src/test/resources/org/openecomp/appc/i18n/TestResources_de.properties b/appc-common/src/test/resources/org/openecomp/appc/i18n/TestResources_de.properties
index c71d690f5..805b3dff0 100644
--- a/appc-common/src/test/resources/org/openecomp/appc/i18n/TestResources_de.properties
+++ b/appc-common/src/test/resources/org/openecomp/appc/i18n/TestResources_de.properties
@@ -24,6 +24,7 @@
#
# Message bundle for German (language de, no specific country)
+#
#
-MESSAGE_TEST=Eine Nachricht f�r Unit-Tests den Ressource-Manager, arg0 = {0}, arg1 = {1}, arg2 = {2}
-TEST_001=Dies ist eine Testnachricht ohne Eins�tze bearbeitet werden!
+MESSAGE_TEST=Eine Nachricht f\u00FCr Unit-Tests den Ressource-Manager, arg0 = {0}, arg1 = {1}, arg2 = {2}
+TEST_001=Dies ist eine Testnachricht ohne Eins\u00FCtze bearbeitet werden!