throw new Exception(msg);
}
} else {
s_logger.info("Found Distributed Virtual Port group " + networkName);
// TODO(sateesh): Handle Exceptions
DVPortgroupConfigInfo dvPortgroupInfo = dataCenterMo.getDvPortGroupSpec(networkName);
if (!isSpecMatch(dvPortgroupInfo, vid, shapingPolicy)) {
s_logger.info("Updating Distributed Virtual Port group " + networkName);
dvPortGroupSpec.setDefaultPortConfig(dvsPortSetting);
dvPortGroupSpec.setConfigVersion(dvPortgroupInfo.getConfigVersion());
ManagedObjectReference morDvPortGroup = dataCenterMo.getDvPortGroupMor(networkName);
try {
dvSwitchMo.updateDvPortGroup(morDvPortGroup, dvPortGroupSpec);
} catch (Exception e) {
String msg = "Failed to update distributed virtual port group " + networkName + " on dvSwitch " + physicalNetwork;