boolean bWaitPortGroupReady = false;
if (!hostMo.hasPortGroup(vSwitch, networkName)) {
hostMo.createPortGroup(vSwitch, networkName, vid, secPolicy, shapingPolicy);
bWaitPortGroupReady = true;
} else {
HostPortGroupSpec spec = hostMo.getPortGroupSpec(networkName);
if(!isSpecMatch(spec, vid, shapingPolicy)) {
hostMo.updatePortGroup(vSwitch, networkName, vid, secPolicy, shapingPolicy);
bWaitPortGroupReady = true;
}
}