From bc0d823b9350d7ffe01c632583c4eaf8d31f5118 Mon Sep 17 00:00:00 2001 From: Dan Timoney Date: Fri, 31 Mar 2017 16:00:20 -0400 Subject: [SDNC-5] Rebase sdnc-northbound Port to OpenDaylight Boron and sync updates since 16.10 Change-Id: I036c5d0bb600b305300e653023caffc83a262604 Signed-off-by: Dan Timoney --- .../impl/rev140523/VnfapiProviderModule.java | 2 +- .../rev140523/VnfapiProviderModuleFactory.java | 2 +- .../sdnc/vnfapi/VNFSDNSvcLogicServiceClient.java | 2 +- .../java/org/openecomp/sdnc/vnfapi/VnfSdnUtil.java | 29 +++++++++++----------- .../org/openecomp/sdnc/vnfapi/vnfapiProvider.java | 2 +- .../src/main/resources/initial/vnfapi-provider.xml | 2 +- 6 files changed, 20 insertions(+), 19 deletions(-) (limited to 'vnfapi/provider/src/main') diff --git a/vnfapi/provider/src/main/java/org/opendaylight/yang/gen/v1/org/openecomp/sdnc/vnfapi/provider/impl/rev140523/VnfapiProviderModule.java b/vnfapi/provider/src/main/java/org/opendaylight/yang/gen/v1/org/openecomp/sdnc/vnfapi/provider/impl/rev140523/VnfapiProviderModule.java index 88d3e2ea..56a1b186 100644 --- a/vnfapi/provider/src/main/java/org/opendaylight/yang/gen/v1/org/openecomp/sdnc/vnfapi/provider/impl/rev140523/VnfapiProviderModule.java +++ b/vnfapi/provider/src/main/java/org/opendaylight/yang/gen/v1/org/openecomp/sdnc/vnfapi/provider/impl/rev140523/VnfapiProviderModule.java @@ -3,7 +3,7 @@ * openECOMP : SDN-C * ================================================================================ * Copyright (C) 2017 AT&T Intellectual Property. All rights - * reserved. + * reserved. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/vnfapi/provider/src/main/java/org/opendaylight/yang/gen/v1/org/openecomp/sdnc/vnfapi/provider/impl/rev140523/VnfapiProviderModuleFactory.java b/vnfapi/provider/src/main/java/org/opendaylight/yang/gen/v1/org/openecomp/sdnc/vnfapi/provider/impl/rev140523/VnfapiProviderModuleFactory.java index c696a4e6..2df2bfa9 100644 --- a/vnfapi/provider/src/main/java/org/opendaylight/yang/gen/v1/org/openecomp/sdnc/vnfapi/provider/impl/rev140523/VnfapiProviderModuleFactory.java +++ b/vnfapi/provider/src/main/java/org/opendaylight/yang/gen/v1/org/openecomp/sdnc/vnfapi/provider/impl/rev140523/VnfapiProviderModuleFactory.java @@ -3,7 +3,7 @@ * openECOMP : SDN-C * ================================================================================ * Copyright (C) 2017 AT&T Intellectual Property. All rights - * reserved. + * reserved. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/vnfapi/provider/src/main/java/org/openecomp/sdnc/vnfapi/VNFSDNSvcLogicServiceClient.java b/vnfapi/provider/src/main/java/org/openecomp/sdnc/vnfapi/VNFSDNSvcLogicServiceClient.java index 56bac4e6..e15a9864 100644 --- a/vnfapi/provider/src/main/java/org/openecomp/sdnc/vnfapi/VNFSDNSvcLogicServiceClient.java +++ b/vnfapi/provider/src/main/java/org/openecomp/sdnc/vnfapi/VNFSDNSvcLogicServiceClient.java @@ -3,7 +3,7 @@ * openECOMP : SDN-C * ================================================================================ * Copyright (C) 2017 AT&T Intellectual Property. All rights - * reserved. + * reserved. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/vnfapi/provider/src/main/java/org/openecomp/sdnc/vnfapi/VnfSdnUtil.java b/vnfapi/provider/src/main/java/org/openecomp/sdnc/vnfapi/VnfSdnUtil.java index 8c7fc7ab..74359630 100644 --- a/vnfapi/provider/src/main/java/org/openecomp/sdnc/vnfapi/VnfSdnUtil.java +++ b/vnfapi/provider/src/main/java/org/openecomp/sdnc/vnfapi/VnfSdnUtil.java @@ -3,7 +3,7 @@ * openECOMP : SDN-C * ================================================================================ * Copyright (C) 2017 AT&T Intellectual Property. All rights - * reserved. + * reserved. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -36,37 +36,38 @@ public class VnfSdnUtil extends MdsalHelper { private static final Logger LOG = LoggerFactory.getLogger(VnfSdnUtil.class); public static File ODLHOME = null; + private static Properties properties; public static void loadProperties() { - if (ODLHOME == null) { - ODLHOME = new File("/opt/opendaylight/current"); - - if (!ODLHOME.isDirectory()) { - ODLHOME = new File("/opt/bvc/controller"); - } + if (ODLHOME == null) { + ODLHOME = new File("/opt/opendaylight/current"); - } + if (!ODLHOME.isDirectory()) { + ODLHOME = new File("/opt/bvc/controller"); + } + } - File file = new File(ODLHOME.getAbsoluteFile()+"/configuration/vnfapi.properties"); + File propFile = new File(ODLHOME.getAbsolutePath() + "/configuration/vnfapi.properties"); + String propFileName = propFile.getAbsolutePath(); properties = new Properties(); InputStream input = null; - if (file.isFile() && file.canRead()) { + if (propFile.isFile() && propFile.canRead()) { try { - input = new FileInputStream(file); + input = new FileInputStream(propFile); properties.load(input); - LOG.info("Loaded properties from " + PROPERTIES_FILE ); + LOG.info("Loaded properties from " + propFileName ); setProperties(properties); } catch (Exception e) { - LOG.error("Failed to load properties " + PROPERTIES_FILE +"\n",e); + LOG.error("Failed to load properties " + propFileName +"\n",e); } finally { if (input != null) { try { input.close(); } catch (IOException e) { - LOG.error("Failed to close properties file " + PROPERTIES_FILE +"\n",e); + LOG.error("Failed to close properties file " + propFileName +"\n",e); } } } diff --git a/vnfapi/provider/src/main/java/org/openecomp/sdnc/vnfapi/vnfapiProvider.java b/vnfapi/provider/src/main/java/org/openecomp/sdnc/vnfapi/vnfapiProvider.java index 31aeed26..0d31c071 100644 --- a/vnfapi/provider/src/main/java/org/openecomp/sdnc/vnfapi/vnfapiProvider.java +++ b/vnfapi/provider/src/main/java/org/openecomp/sdnc/vnfapi/vnfapiProvider.java @@ -3,7 +3,7 @@ * openECOMP : SDN-C * ================================================================================ * Copyright (C) 2017 AT&T Intellectual Property. All rights - * reserved. + * reserved. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/vnfapi/provider/src/main/resources/initial/vnfapi-provider.xml b/vnfapi/provider/src/main/resources/initial/vnfapi-provider.xml index 4db02193..eebba0c4 100644 --- a/vnfapi/provider/src/main/resources/initial/vnfapi-provider.xml +++ b/vnfapi/provider/src/main/resources/initial/vnfapi-provider.xml @@ -4,7 +4,7 @@ openECOMP : SDN-C ================================================================================ Copyright (C) 2017 AT&T Intellectual Property. All rights - reserved. + reserved. ================================================================================ Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. -- cgit 1.2.3-korg