Skip to content

Commit

Permalink
fix: scale out wait for ems
Browse files Browse the repository at this point in the history
  • Loading branch information
lorenzotomasini committed Jan 3, 2018
1 parent 272ade5 commit 0351eb8
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/main/java/org/openbaton/vnfm/generic/GenericVNFM.java
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,11 @@ public VirtualNetworkFunctionRecord scale(
if (scaleInOrOut.ordinal() == Action.SCALE_OUT.ordinal()) {
log.info("Created VNFComponent");
EmsRegistrationUnit registrationUnit = ems.addRegistrationUnit(vnfcInstance.getHostname());
ems.waitForEms(() -> registrationUnit.waitForEms(emsConfiguration.getWaitForEms() * 1000));
EmsRegistrationUnit finalRegistrationUnit = registrationUnit;
registrationUnit =
ems.waitForEms(
() -> finalRegistrationUnit.waitForEms(emsConfiguration.getWaitForEms() * 1000))
.get();
if (registrationUnit.isCanceled()) return null;
else log.info(String.format("Registered EMS: %s", registrationUnit.getValue()));
ems.saveScriptOnEms(vnfcInstance, scripts, virtualNetworkFunctionRecord);
Expand Down

0 comments on commit 0351eb8

Please sign in to comment.