CLOUDSTACK-4932: bugfix : listNetworks API doesn't return VLAN ID (VNI)

Signed-off-by: ynojima <mail@ynojima.net>
Signed-off-by: Toshiaki Hatano <haeena@haeena.net>
This commit is contained in:
ynojima 2013-10-22 21:09:27 -06:00 committed by Toshiaki Hatano
parent 089026f6af
commit a6b6fa65fa
1 changed files with 5 additions and 2 deletions

View File

@ -2198,8 +2198,11 @@ public class ApiResponseHelper implements ResponseGenerator {
String broadcastUri = network.getBroadcastUri().toString();
response.setBroadcastUri(broadcastUri);
String vlan = "N/A";
if (BroadcastDomainType.Vlan.scheme().equals(BroadcastDomainType.getSchemeValue(network.getBroadcastUri()))) {
vlan = BroadcastDomainType.getValue(network.getBroadcastUri());
switch (BroadcastDomainType.getSchemeValue(network.getBroadcastUri())){
case Vlan:
case Vxlan:
vlan = BroadcastDomainType.getValue(network.getBroadcastUri());
break;
}
// return vlan information only to Root admin
response.setVlan(vlan);