summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/network/MsoNetworkAdapterAsyncImpl.java13
-rw-r--r--adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/network/MsoNetworkAdapterImpl.java4
-rw-r--r--adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/network/NetworkAdapterRest.java10
-rw-r--r--adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/network/async/client/NetworkAdapterNotify_Service.java6
-rw-r--r--adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/network/async/client/ObjectFactory.java42
-rw-r--r--asdc-controller/src/main/java/org/onap/so/asdc/installer/heat/ToscaResourceInstaller.java9
-rw-r--r--common/src/main/java/org/onap/so/client/RestClient.java1
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/MsoRequest.java5
-rw-r--r--pom.xml2
9 files changed, 50 insertions, 42 deletions
diff --git a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/network/MsoNetworkAdapterAsyncImpl.java b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/network/MsoNetworkAdapterAsyncImpl.java
index 4753b1c18d..d042c9eb19 100644
--- a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/network/MsoNetworkAdapterAsyncImpl.java
+++ b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/network/MsoNetworkAdapterAsyncImpl.java
@@ -71,6 +71,7 @@ public class MsoNetworkAdapterAsyncImpl implements MsoNetworkAdapterAsync {
private static final String NETWORK_EXCEPTION_MSG = "Got a NetworkException on createNetwork: ";
private static final String CREATE_NETWORK_ERROR_LOGMSG = "{} {} Error sending createNetwork notification {} ";
private static final String FAULT_INFO_ERROR_LOGMSG = "{} {} Exception - fault info ";
+ private static final String SHARED = "shared";
@Autowired
private Environment environment;
@@ -127,11 +128,11 @@ public class MsoNetworkAdapterAsyncImpl implements MsoNetworkAdapterAsync {
HashMap<String, String> params = (HashMap<String, String>) networkParams;
if (params == null)
- params = new HashMap<String, String>();
+ params = new HashMap<>();
String shared = null;
String external = null;
- if (params.containsKey("shared"))
- shared = params.get("shared");
+ if (params.containsKey(SHARED))
+ shared = params.get(SHARED);
if (params.containsKey("external"))
external = params.get("external");
@@ -211,11 +212,11 @@ public class MsoNetworkAdapterAsyncImpl implements MsoNetworkAdapterAsync {
HashMap<String, String> params = (HashMap<String, String>) networkParams;
if (params == null)
- params = new HashMap<String, String>();
+ params = new HashMap<>();
String shared = null;
String external = null;
- if (params.containsKey("shared"))
- shared = params.get("shared");
+ if (params.containsKey(SHARED))
+ shared = params.get(SHARED);
if (params.containsKey("external"))
external = params.get("external");
diff --git a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/network/MsoNetworkAdapterImpl.java b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/network/MsoNetworkAdapterImpl.java
index a79a6191cf..029da43f48 100644
--- a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/network/MsoNetworkAdapterImpl.java
+++ b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/network/MsoNetworkAdapterImpl.java
@@ -88,7 +88,6 @@ public class MsoNetworkAdapterImpl implements MsoNetworkAdapter {
private static final String NETWORK_ID = "network_id";
private static final String NETWORK_FQDN = "network_fqdn";
private static final String CREATE_NETWORK_CONTEXT = "CreateNetwork";
- private static final String MSO_CONFIGURATION_ERROR = "MsoConfigurationError";
private static final String NEUTRON_MODE = "NEUTRON";
private static final Logger logger = LoggerFactory.getLogger(MsoNetworkAdapterImpl.class);
@@ -115,6 +114,8 @@ public class MsoNetworkAdapterImpl implements MsoNetworkAdapter {
@Autowired
private NetworkResourceRepository networkResourceRepo;
+ public MsoNetworkAdapterImpl() {}
+
/**
* Health Check web method. Does nothing but return to show the adapter is deployed.
*/
@@ -128,7 +129,6 @@ public class MsoNetworkAdapterImpl implements MsoNetworkAdapter {
*
* @see MsoNetworkAdapterImpl#MsoNetworkAdapterImpl(MsoPropertiesFactory)
*/
- public MsoNetworkAdapterImpl() {}
@Override
public void createNetwork(String cloudSiteId, String tenantId, String networkType, String modelCustomizationUuid,
diff --git a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/network/NetworkAdapterRest.java b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/network/NetworkAdapterRest.java
index b44704d1cf..c15fc0d204 100644
--- a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/network/NetworkAdapterRest.java
+++ b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/network/NetworkAdapterRest.java
@@ -86,7 +86,7 @@ public class NetworkAdapterRest {
private static final Logger logger = LoggerFactory.getLogger(NetworkAdapterRest.class);
private static final String TESTING_KEYWORD = "___TESTING___";
- private String EXCEPTION = "Exception:";
+ private String exceptionMsg = "Exception:";
@Autowired
private MsoNetworkAdapterImpl adapter;
@@ -233,7 +233,7 @@ public class NetworkAdapterRest {
rollback.value.getNetworkStackId(), networkFqdn.value, rollback.value.getNetworkCreated(),
subnetIdMap.value, rollback.value, req.getMessageId());
} catch (NetworkException e) {
- logger.debug(EXCEPTION, e);
+ logger.debug(exceptionMsg, e);
eresp = new CreateNetworkError(e.getMessage(), MsoExceptionCategory.INTERNAL, true, req.getMessageId());
}
if (!req.isSynchronous()) {
@@ -328,7 +328,7 @@ public class NetworkAdapterRest {
}
response = new DeleteNetworkResponse(req.getNetworkId(), networkDeleted.value, req.getMessageId());
} catch (NetworkException e) {
- logger.debug(EXCEPTION, e);
+ logger.debug(exceptionMsg, e);
eresp = new DeleteNetworkError(e.getMessage(), MsoExceptionCategory.INTERNAL, true, req.getMessageId());
}
if (!req.isSynchronous()) {
@@ -467,7 +467,7 @@ public class NetworkAdapterRest {
adapter.rollbackNetwork(nwr);
response = new RollbackNetworkResponse(true, req.getMessageId());
} catch (NetworkException e) {
- logger.debug(EXCEPTION, e);
+ logger.debug(exceptionMsg, e);
eresp = new RollbackNetworkError(e.getMessage(), MsoExceptionCategory.INTERNAL, true,
req.getMessageId());
}
@@ -614,7 +614,7 @@ public class NetworkAdapterRest {
// an update
subnetIdMap.value, req.getMessageId());
} catch (NetworkException e) {
- logger.debug(EXCEPTION, e);
+ logger.debug(exceptionMsg, e);
eresp = new UpdateNetworkError(e.getMessage(), MsoExceptionCategory.INTERNAL, true, req.getMessageId());
}
if (!req.isSynchronous()) {
diff --git a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/network/async/client/NetworkAdapterNotify_Service.java b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/network/async/client/NetworkAdapterNotify_Service.java
index c275073c46..68142e6cc9 100644
--- a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/network/async/client/NetworkAdapterNotify_Service.java
+++ b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/network/async/client/NetworkAdapterNotify_Service.java
@@ -57,11 +57,11 @@ public class NetworkAdapterNotify_Service extends Service {
}
public NetworkAdapterNotify_Service() {
- super(__getWsdlLocation(), NETWORKADAPTERNOTIFY_QNAME);
+ super(getWsdlLocation(), NETWORKADAPTERNOTIFY_QNAME);
}
public NetworkAdapterNotify_Service(WebServiceFeature... features) {
- super(__getWsdlLocation(), NETWORKADAPTERNOTIFY_QNAME, features);
+ super(getWsdlLocation(), NETWORKADAPTERNOTIFY_QNAME, features);
}
public NetworkAdapterNotify_Service(URL wsdlLocation) {
@@ -100,7 +100,7 @@ public class NetworkAdapterNotify_Service extends Service {
return super.getPort(new QName(URL, "MsoNetworkAdapterAsyncImplPort"), NetworkAdapterNotify.class, features);
}
- private static URL __getWsdlLocation() {
+ private static URL getWsdlLocation() {
if (NETWORKADAPTERNOTIFY_EXCEPTION != null) {
throw NETWORKADAPTERNOTIFY_EXCEPTION;
}
diff --git a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/network/async/client/ObjectFactory.java b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/network/async/client/ObjectFactory.java
index 81ccd8aa04..a7a2974660 100644
--- a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/network/async/client/ObjectFactory.java
+++ b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/network/async/client/ObjectFactory.java
@@ -39,22 +39,22 @@ import javax.xml.namespace.QName;
@XmlRegistry
public class ObjectFactory {
- private static final String Url = "http://org.onap.so/networkNotify";
- private static final QName _RollbackNetworkNotification_QNAME = new QName(Url, "rollbackNetworkNotification");
- private static final QName _UpdateNetworkNotification_QNAME = new QName(Url, "updateNetworkNotification");
+ private static final String URL = "http://org.onap.so/networkNotify";
+ private static final QName _RollbackNetworkNotification_QNAME = new QName(URL, "rollbackNetworkNotification");
+ private static final QName _UpdateNetworkNotification_QNAME = new QName(URL, "updateNetworkNotification");
private static final QName _QueryNetworkNotificationResponse_QNAME =
- new QName(Url, "queryNetworkNotificationResponse");
+ new QName(URL, "queryNetworkNotificationResponse");
private static final QName _UpdateNetworkNotificationResponse_QNAME =
- new QName(Url, "updateNetworkNotificationResponse");
+ new QName(URL, "updateNetworkNotificationResponse");
private static final QName _CreateNetworkNotificationResponse_QNAME =
- new QName(Url, "createNetworkNotificationResponse");
- private static final QName _DeleteNetworkNotification_QNAME = new QName(Url, "deleteNetworkNotification");
+ new QName(URL, "createNetworkNotificationResponse");
+ private static final QName _DeleteNetworkNotification_QNAME = new QName(URL, "deleteNetworkNotification");
private static final QName _DeleteNetworkNotificationResponse_QNAME =
- new QName(Url, "deleteNetworkNotificationResponse");
- private static final QName _CreateNetworkNotification_QNAME = new QName(Url, "createNetworkNotification");
- private static final QName _QueryNetworkNotification_QNAME = new QName(Url, "queryNetworkNotification");
+ new QName(URL, "deleteNetworkNotificationResponse");
+ private static final QName _CreateNetworkNotification_QNAME = new QName(URL, "createNetworkNotification");
+ private static final QName _QueryNetworkNotification_QNAME = new QName(URL, "queryNetworkNotification");
private static final QName _RollbackNetworkNotificationResponse_QNAME =
- new QName(Url, "rollbackNetworkNotificationResponse");
+ new QName(URL, "rollbackNetworkNotificationResponse");
/**
* Create a new ObjectFactory that can be used to create new instances of schema derived classes for package:
@@ -211,7 +211,7 @@ public class ObjectFactory {
* Create an instance of {@link JAXBElement }{@code <}{@link RollbackNetworkNotification }{@code >}}
*
*/
- @XmlElementDecl(namespace = Url, name = "rollbackNetworkNotification")
+ @XmlElementDecl(namespace = URL, name = "rollbackNetworkNotification")
public JAXBElement<RollbackNetworkNotification> createRollbackNetworkNotification(
RollbackNetworkNotification value) {
return new JAXBElement<>(_RollbackNetworkNotification_QNAME, RollbackNetworkNotification.class, null, value);
@@ -221,7 +221,7 @@ public class ObjectFactory {
* Create an instance of {@link JAXBElement }{@code <}{@link UpdateNetworkNotification }{@code >}}
*
*/
- @XmlElementDecl(namespace = Url, name = "updateNetworkNotification")
+ @XmlElementDecl(namespace = URL, name = "updateNetworkNotification")
public JAXBElement<UpdateNetworkNotification> createUpdateNetworkNotification(UpdateNetworkNotification value) {
return new JAXBElement<>(_UpdateNetworkNotification_QNAME, UpdateNetworkNotification.class, null, value);
}
@@ -230,7 +230,7 @@ public class ObjectFactory {
* Create an instance of {@link JAXBElement }{@code <}{@link QueryNetworkNotificationResponse }{@code >}}
*
*/
- @XmlElementDecl(namespace = Url, name = "queryNetworkNotificationResponse")
+ @XmlElementDecl(namespace = URL, name = "queryNetworkNotificationResponse")
public JAXBElement<QueryNetworkNotificationResponse> createQueryNetworkNotificationResponse(
QueryNetworkNotificationResponse value) {
return new JAXBElement<>(_QueryNetworkNotificationResponse_QNAME, QueryNetworkNotificationResponse.class, null,
@@ -241,7 +241,7 @@ public class ObjectFactory {
* Create an instance of {@link JAXBElement }{@code <}{@link UpdateNetworkNotificationResponse }{@code >}}
*
*/
- @XmlElementDecl(namespace = Url, name = "updateNetworkNotificationResponse")
+ @XmlElementDecl(namespace = URL, name = "updateNetworkNotificationResponse")
public JAXBElement<UpdateNetworkNotificationResponse> createUpdateNetworkNotificationResponse(
UpdateNetworkNotificationResponse value) {
return new JAXBElement<>(_UpdateNetworkNotificationResponse_QNAME, UpdateNetworkNotificationResponse.class,
@@ -252,7 +252,7 @@ public class ObjectFactory {
* Create an instance of {@link JAXBElement }{@code <}{@link CreateNetworkNotificationResponse }{@code >}}
*
*/
- @XmlElementDecl(namespace = Url, name = "createNetworkNotificationResponse")
+ @XmlElementDecl(namespace = URL, name = "createNetworkNotificationResponse")
public JAXBElement<CreateNetworkNotificationResponse> createCreateNetworkNotificationResponse(
CreateNetworkNotificationResponse value) {
return new JAXBElement<>(_CreateNetworkNotificationResponse_QNAME, CreateNetworkNotificationResponse.class,
@@ -263,7 +263,7 @@ public class ObjectFactory {
* Create an instance of {@link JAXBElement }{@code <}{@link DeleteNetworkNotification }{@code >}}
*
*/
- @XmlElementDecl(namespace = Url, name = "deleteNetworkNotification")
+ @XmlElementDecl(namespace = URL, name = "deleteNetworkNotification")
public JAXBElement<DeleteNetworkNotification> createDeleteNetworkNotification(DeleteNetworkNotification value) {
return new JAXBElement<>(_DeleteNetworkNotification_QNAME, DeleteNetworkNotification.class, null, value);
}
@@ -272,7 +272,7 @@ public class ObjectFactory {
* Create an instance of {@link JAXBElement }{@code <}{@link DeleteNetworkNotificationResponse }{@code >}}
*
*/
- @XmlElementDecl(namespace = Url, name = "deleteNetworkNotificationResponse")
+ @XmlElementDecl(namespace = URL, name = "deleteNetworkNotificationResponse")
public JAXBElement<DeleteNetworkNotificationResponse> createDeleteNetworkNotificationResponse(
DeleteNetworkNotificationResponse value) {
return new JAXBElement<>(_DeleteNetworkNotificationResponse_QNAME, DeleteNetworkNotificationResponse.class,
@@ -283,7 +283,7 @@ public class ObjectFactory {
* Create an instance of {@link JAXBElement }{@code <}{@link CreateNetworkNotification }{@code >}}
*
*/
- @XmlElementDecl(namespace = Url, name = "createNetworkNotification")
+ @XmlElementDecl(namespace = URL, name = "createNetworkNotification")
public JAXBElement<CreateNetworkNotification> createCreateNetworkNotification(CreateNetworkNotification value) {
return new JAXBElement<>(_CreateNetworkNotification_QNAME, CreateNetworkNotification.class, null, value);
}
@@ -292,7 +292,7 @@ public class ObjectFactory {
* Create an instance of {@link JAXBElement }{@code <}{@link QueryNetworkNotification }{@code >}}
*
*/
- @XmlElementDecl(namespace = Url, name = "queryNetworkNotification")
+ @XmlElementDecl(namespace = URL, name = "queryNetworkNotification")
public JAXBElement<QueryNetworkNotification> createQueryNetworkNotification(QueryNetworkNotification value) {
return new JAXBElement<>(_QueryNetworkNotification_QNAME, QueryNetworkNotification.class, null, value);
}
@@ -301,7 +301,7 @@ public class ObjectFactory {
* Create an instance of {@link JAXBElement }{@code <}{@link RollbackNetworkNotificationResponse }{@code >}}
*
*/
- @XmlElementDecl(namespace = Url, name = "rollbackNetworkNotificationResponse")
+ @XmlElementDecl(namespace = URL, name = "rollbackNetworkNotificationResponse")
public JAXBElement<RollbackNetworkNotificationResponse> createRollbackNetworkNotificationResponse(
RollbackNetworkNotificationResponse value) {
return new JAXBElement<>(_RollbackNetworkNotificationResponse_QNAME, RollbackNetworkNotificationResponse.class,
diff --git a/asdc-controller/src/main/java/org/onap/so/asdc/installer/heat/ToscaResourceInstaller.java b/asdc-controller/src/main/java/org/onap/so/asdc/installer/heat/ToscaResourceInstaller.java
index 23c31f3298..50a555882d 100644
--- a/asdc-controller/src/main/java/org/onap/so/asdc/installer/heat/ToscaResourceInstaller.java
+++ b/asdc-controller/src/main/java/org/onap/so/asdc/installer/heat/ToscaResourceInstaller.java
@@ -2140,19 +2140,24 @@ public class ToscaResourceInstaller {
}
protected VnfResourceCustomization createVnfResource(NodeTemplate vfNodeTemplate,
- ToscaResourceStructure toscaResourceStructure, Service service) {
+ ToscaResourceStructure toscaResourceStructure, Service service) throws ArtifactInstallerException {
VnfResourceCustomization vnfResourceCustomization = null;
if (vnfResourceCustomization == null) {
VnfResource vnfResource = findExistingVnfResource(service,
vfNodeTemplate.getMetaData().getValue(SdcPropertyNames.PROPERTY_NAME_UUID));
- if (vnfResource == null)
+ if (vnfResource == null) {
vnfResource = createVnfResource(vfNodeTemplate);
+ }
vnfResourceCustomization =
createVnfResourceCustomization(vfNodeTemplate, toscaResourceStructure, vnfResource);
vnfResourceCustomization.setVnfResources(vnfResource);
vnfResourceCustomization.setService(service);
+
+ // setting resource input for vnf customization
+ vnfResourceCustomization.setResourceInput(
+ getResourceInput(toscaResourceStructure, vnfResourceCustomization.getModelCustomizationUUID()));
vnfResource.getVnfResourceCustomizations().add(vnfResourceCustomization);
}
diff --git a/common/src/main/java/org/onap/so/client/RestClient.java b/common/src/main/java/org/onap/so/client/RestClient.java
index 0b10d85bbf..0b3aa651a0 100644
--- a/common/src/main/java/org/onap/so/client/RestClient.java
+++ b/common/src/main/java/org/onap/so/client/RestClient.java
@@ -28,7 +28,6 @@ import java.net.URL;
import java.security.GeneralSecurityException;
import java.util.ArrayList;
import java.util.Base64;
-import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
diff --git a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/MsoRequest.java b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/MsoRequest.java
index 277675f310..401a6a9db6 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/MsoRequest.java
+++ b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/MsoRequest.java
@@ -574,7 +574,7 @@ public class MsoRequest {
throws JsonGenerationException, JsonMappingException, IOException {
ObjectMapper mapper = new ObjectMapper();
mapper.setSerializationInclusion(Include.NON_NULL);
- // mapper.configure(Feature.WRAP_ROOT_VALUE, true);
+
logger.debug("building sir from object {}", sir);
String requestJSON = mapper.writeValueAsString(sir);
@@ -636,7 +636,7 @@ public class MsoRequest {
public String getVfModuleType(ServiceInstancesRequest sir, String requestScope, Actions action, int reqVersion) {
String serviceInstanceType = null;
- String networkType = null;
+
String vnfType = null;
String vfModuleType = null;
String vfModuleModelName = null;
@@ -800,6 +800,7 @@ public class MsoRequest {
selfLinkUrl = Optional.of(new URL(aUrl.getProtocol(), aUrl.getHost(), aUrl.getPort(), selfLinkPath));
} catch (Exception e) {
selfLinkUrl = Optional.empty(); // ignore
+ logger.info(e.getMessage());
}
return selfLinkUrl;
}
diff --git a/pom.xml b/pom.xml
index 90fa8d4e14..8b2d3ec445 100644
--- a/pom.xml
+++ b/pom.xml
@@ -444,6 +444,7 @@
<goals>
<goal>format</goal>
</goals>
+ <phase>process-sources</phase>
<configuration>
<skip>${format.skipExecute}</skip>
<configFile>${base-path}/project-configs/code-tools/onap-eclipse-format.xml</configFile>
@@ -454,6 +455,7 @@
<goals>
<goal>format</goal>
</goals>
+ <phase>process-sources</phase>
<configuration>
<skip>${format.skipExecute}</skip>
<sourceDirectory>${project.basedir}</sourceDirectory>