Skip to content

Commit 42584b7

Browse files
committed
<fix>[sdnController]: fix code review commemt
Resolves: ZCF-1365 Change-Id: I65767164636167726d6369726f63666b68666477
1 parent 1416f61 commit 42584b7

2 files changed

Lines changed: 7 additions & 2 deletions

File tree

build/pom.xml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -636,6 +636,11 @@
636636
<artifactId>ovn</artifactId>
637637
<version>${project.version}</version>
638638
</dependency>
639+
<dependency>
640+
<groupId>org.zstack</groupId>
641+
<artifactId>zns</artifactId>
642+
<version>${project.version}</version>
643+
</dependency>
639644
<dependency>
640645
<groupId>org.zstack</groupId>
641646
<artifactId>observabilityServer</artifactId>

plugin/sdnController/src/main/java/org/zstack/sdnController/SdnControllerManagerImpl.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -921,7 +921,7 @@ public void beforeAllocateVmNic(VmNicInventory nic, VmInstanceSpec spec, Complet
921921
String controllerUuid = L2NetworkSystemTags.L2_NETWORK_SDN_CONTROLLER_UUID.getTokenByResourceUuid(
922922
l2VO.getUuid(), L2NetworkSystemTags.L2_NETWORK_SDN_CONTROLLER_UUID_TOKEN);
923923
if (controllerUuid == null) {
924-
completion.success();
924+
completion.fail(operr(ORG_ZSTACK_SDNCONTROLLER_10006, "sdn l2 network[uuid:%s] is not attached controller", l2VO.getUuid()));
925925
return;
926926
}
927927

@@ -947,7 +947,7 @@ public void afterReleaseVmNic(VmNicInventory nic, Completion completion) {
947947
String controllerUuid = L2NetworkSystemTags.L2_NETWORK_SDN_CONTROLLER_UUID.getTokenByResourceUuid(
948948
l2VO.getUuid(), L2NetworkSystemTags.L2_NETWORK_SDN_CONTROLLER_UUID_TOKEN);
949949
if (controllerUuid == null) {
950-
completion.success();
950+
completion.fail(operr(ORG_ZSTACK_SDNCONTROLLER_10006, "sdn l2 network[uuid:%s] is not attached controller", l2VO.getUuid()));
951951
return;
952952
}
953953

0 commit comments

Comments
 (0)