Fix: empty list of VDU-VIMInstance when deploying
@@ -214,7 +214,11 @@ public class NetworkServiceRecordManagement
networkServiceDescriptor.setProjectId(projectId);
// nsdUtils.fetchVimInstances(networkServiceDescriptor, projectId);
DeployNSRBody body = new DeployNSRBody();
+ if (vduVimInstances == null) {
+ body.setVduVimInstances(new HashMap<String, Collection<String>>());
+ } else {
body.setVduVimInstances(vduVimInstances);
+ }
if (configurations == null) {
body.setConfigurations(new HashMap());
} else {
@@ -895,7 +899,8 @@ public class NetworkServiceRecordManagement
if (body == null
|| body.getVduVimInstances() == null
- || body.getVduVimInstances().get(vdu.getName()) == null) {
+ || body.getVduVimInstances().get(vdu.getName()) == null
+ || body.getVduVimInstances().get(vdu.getName()).isEmpty()) {
if (vdu.getVimInstanceName() == null) {
throw new MissingParameterException(
"No VimInstances specified for vdu: " + vdu.getName());
