Skip to content

Commit 968235a

Browse files
committed
NSX: Add shared network support (#41)
1 parent a899648 commit 968235a

File tree

2 files changed

+3
-10
lines changed

2 files changed

+3
-10
lines changed

server/src/main/java/com/cloud/network/NetworkServiceImpl.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1749,7 +1749,7 @@ public Network createGuestNetwork(CreateNetworkCmd cmd) throws InsufficientCapac
17491749

17501750
private void validateNetworkCreationSupported(long zoneId, String zoneName, GuestType guestType) {
17511751
NsxProviderVO nsxProviderVO = nsxProviderDao.findByZoneId(zoneId);
1752-
if (Objects.nonNull(nsxProviderVO) && List.of(GuestType.L2, GuestType.Shared).contains(guestType)) {
1752+
if (Objects.nonNull(nsxProviderVO) && List.of(GuestType.L2).contains(guestType)) {
17531753
throw new InvalidParameterValueException(
17541754
String.format("Creation of %s networks is not supported in NSX enabled zone %s", guestType.name(), zoneName)
17551755
);

ui/src/views/network/CreateSharedNetworkForm.vue

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,7 @@
1818
<template>
1919
<a-spin :spinning="loading">
2020
<div class="form-layout" v-ctrl-enter="handleSubmit">
21-
<div v-if="isNsxEnabled">
22-
<a-alert type="warning">
23-
<template #message>
24-
<span v-html="$t('message.shared.network.unsupported.for.nsx')" />
25-
</template>
26-
</a-alert>
27-
</div>
28-
<div v-else class="form">
21+
<div class="form">
2922
<a-form
3023
:ref="formRef"
3124
:model="form"
@@ -725,7 +718,7 @@ export default {
725718
var trafficTypes = json.listtraffictypesresponse.traffictype
726719
if (this.arrayHasItems(trafficTypes)) {
727720
for (const type of trafficTypes) {
728-
if (type.traffictype === 'Guest') {
721+
if (type.traffictype === 'Guest' && physicalNetwork.isolationmethods !== 'NSX') {
729722
this.formPhysicalNetworks.push(physicalNetwork)
730723
break
731724
}

0 commit comments

Comments
 (0)