* 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.
private static final Logger LOG = LoggerFactory.getLogger(VnfSdnUtil.class);
- public static File ODLHOME = null;
+ private static File ODLHOME = null;
private static Properties properties;
* 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.
try {
VnfSdnUtil.loadProperties();
} catch (Exception e) {
- log.error("Caught Exception while trying to load properties file");
+ log.error("Caught Exception while trying to load properties file: ", e);
}
rpcRegistration = rpcRegistry.addRpcImplementation(VNFAPIService.class, this);
} catch (InterruptedException | ExecutionException e) {
log.error("Create Containers Failed: " + e);
- e.printStackTrace();
}
}
log.error("Caught Exception reading MD-SAL ("+type+") for ["+siid+"] " ,e);
}
- if ( data.isPresent()) {
+ if (data != null && data.isPresent()) {
ServiceData serviceData = (ServiceData) data.get().getServiceData();
if (serviceData != null) {
log.info("Read MD-SAL ("+type+") data for ["+siid+"] ServiceData: " + serviceData);
log.error("Caught Exception reading MD-SAL ("+type+") for ["+siid+"] " ,e);
}
- if ( data.isPresent()) {
+ if (data != null && data.isPresent()) {
VnfInstanceServiceData vnfInstanceServiceData = (VnfInstanceServiceData) data.get().getVnfInstanceServiceData();
if (vnfInstanceServiceData != null) {
log.info("Read MD-SAL ("+type+") data for ["+siid+"] VnfInstanceServiceData: " + vnfInstanceServiceData);
log.error("Caught Exception reading MD-SAL ("+type+") for ["+siid+"] " ,e);
}
- if ( data.isPresent()) {
+ if (data != null && data.isPresent()) {
VfModuleServiceData vfModuleServiceData = (VfModuleServiceData) data.get().getVfModuleServiceData();
if (vfModuleServiceData != null) {
log.info("Read MD-SAL ("+type+") data for ["+siid+"] VfModuleServiceData: " + vfModuleServiceData);
log.error("Caught Exception reading MD-SAL ("+type+") for ["+preload_name+","+preload_type+"] " ,e);
}
- if ( data.isPresent()) {
+ if (data != null && data.isPresent()) {
PreloadData preloadData = (PreloadData) data.get().getPreloadData();
if (preloadData != null) {
log.info("Read MD-SAL ("+type+") data for ["+preload_name+","+preload_type+"] PreloadData: " + preloadData);
log.error("Caught Exception reading MD-SAL ("+type+") for ["+preload_name+","+preload_type+"] " ,e);
}
- if ( data.isPresent()) {
+ if (data != null && data.isPresent()) {
VnfInstancePreloadData preloadData = (VnfInstancePreloadData) data.get().getVnfInstancePreloadData();
if (preloadData != null) {
log.info("Read MD-SAL ("+type+") data for ["+preload_name+","+preload_type+"] VnfInstancePreloadData: " + preloadData);
log.error("Caught Exception reading MD-SAL ("+type+") for ["+preload_name+","+preload_type+"] " ,e);
}
- if ( data.isPresent()) {
+ if (data != null && data.isPresent()) {
VfModulePreloadData preloadData = (VfModulePreloadData) data.get().getVfModulePreloadData();
if (preloadData != null) {
log.info("Read MD-SAL ("+type+") data for ["+preload_name+","+preload_type+"] VfModulePreloadData: " + preloadData);