Skip to content

Commit 582ca98

Browse files
committed
CLOUDSTACK-9074: Fix network orchestrator
1 parent 029cf80 commit 582ca98

1 file changed

Lines changed: 4 additions & 10 deletions

File tree

engine/orchestration/src/org/apache/cloudstack/engine/orchestration/NetworkOrchestrator.java

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -676,14 +676,9 @@ public void doInTransactionWithoutResult(TransactionStatus status) {
676676
finalizeServicesAndProvidersForNetwork(offering, plan.getPhysicalNetworkId()));
677677
networks.add(networkPersisted);
678678

679-
if (predefined instanceof NetworkVO){
680-
try{
681-
NetworkGuruAdditionalFunctions functions = (NetworkGuruAdditionalFunctions) guru;
682-
functions.finalizeNetworkDesign(networkPersisted.getId(), ((NetworkVO)predefined).getVlanIdAsUUID());
683-
}
684-
catch (Exception e){
685-
//Couldn't cast to NetworkGuruAdditionalFunctions, continue
686-
}
679+
if (predefined instanceof NetworkVO && guru instanceof NetworkGuruAdditionalFunctions){
680+
NetworkGuruAdditionalFunctions functions = (NetworkGuruAdditionalFunctions) guru;
681+
functions.finalizeNetworkDesign(networkPersisted.getId(), ((NetworkVO)predefined).getVlanIdAsUUID());
687682
}
688683

689684
if (domainId != null && aclType == ACLType.Domain) {
@@ -1034,13 +1029,12 @@ public Pair<NetworkGuru, NetworkVO> implementNetwork(long networkId, DeployDesti
10341029
s_logger.error(e.getMessage());
10351030
return null;
10361031
} catch (CloudRuntimeException e) {
1037-
s_logger.error("[NSX_PLUGIN_LOG] NetworkOrchestor caught exception " + e.getMessage() + " returning null");
1032+
s_logger.error("Caught exception: " + e.getMessage());
10381033
return null;
10391034
} finally {
10401035
if (implemented.first() == null) {
10411036
s_logger.debug("Cleaning up because we're unable to implement the network " + network);
10421037
try {
1043-
s_logger.info("[NSX_PLUGIN_LOG] isSharedNetworkWithServices? " + isSharedNetworkWithServices(network));
10441038
if (isSharedNetworkWithServices(network)) {
10451039
network.setState(Network.State.Shutdown);
10461040
_networksDao.update(networkId, network);

0 commit comments

Comments
 (0)