Issue
=====
Exception observed while creating CPVM in VMware Setup with DVS.
Observed error "StartCommand failed due to Exception: com.vmware.vim25.AlreadyExists."
This is due to concurrent attempts to create same dv portgroup on same dvSwitch by
manager threads of CPVM and SSVM when both are started at same time.
Fix
===
Synchronize api calls to create/update dvportgroup.
Also maintaing local cache to avoid multiple fetch api calls to vCenter
when multiple threads try to create same object.
Signed-off-by: Sateesh Chodapuneedi <sateesh.chodapuneedi@accelerite.com>
This is 1st patch for feature 'Support for VMware dvSwitch in CloudStack'.
This contains 3 newly introduced classes. Added apache license header for all 3 files.
[1]TrafficLable and [2]VmwareTrafficLabel classes are to define and encapsulate virtual switch type per traffic type along with other network label fields (VLAN ID and physical network).
[3]DistributedVirtualSwitchMO class is wrapper class for vSphere API calls specific to a distributed virtual switch in a vCenter datacenter.
Signed-off-by: Sateesh Chodapuneedi <sateesh@apache.org>