mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
Fixed agent code to handle untagged public vlan while parsing the vlan id
This commit is contained in:
parent
adf6026d21
commit
7f780f26f9
@ -391,7 +391,7 @@ namespace HypervResource
|
||||
string vlan = null;
|
||||
string isolationUri = nic.isolationUri;
|
||||
string broadcastUri = nic.broadcastUri;
|
||||
if ( (broadcastUri != null ) || (isolationUri != null && isolationUri.StartsWith("vlan://")) && !isolationUri.Equals("vlan://untagged"))
|
||||
if ( (broadcastUri != null ) || (isolationUri != null && isolationUri.StartsWith("vlan://")))
|
||||
{
|
||||
if (broadcastUri != null && broadcastUri.StartsWith("storage"))
|
||||
{
|
||||
@ -402,7 +402,11 @@ namespace HypervResource
|
||||
vlan = isolationUri.Substring("vlan://".Length);
|
||||
}
|
||||
int tmp;
|
||||
if (!int.TryParse(vlan, out tmp))
|
||||
if (vlan.Equals("untagged", StringComparison.CurrentCultureIgnoreCase) ) {
|
||||
// recevied vlan is untagged, don't parse for the vlan in the isolation uri
|
||||
vlan = null;
|
||||
}
|
||||
else if (!int.TryParse(vlan, out tmp))
|
||||
{
|
||||
// TODO: double check exception type
|
||||
errMsg = string.Format("Invalid VLAN value {0} for on vm {1} for nic uuid {2}", isolationUri, vmName, nic.uuid);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user