CLOUDSTACK-1963 New mapping model for CloudStack zone and Vmware datacenter

Support for custom field "cloud.zone" for datacenter object in vCenter.

Signed-off-by: Sateesh Chodapuneedi <sateesh@apache.org>
CLOUDSTACK-1963 New mapping model for CloudStack zone and Vmware datacenter

Support for DB changes for Vmware datacenter objects
Support for DB changes to store mapping with CloudStack zones.

Signed-off-by: Sateesh Chodapuneedi <sateesh@apache.org>
CLOUDSTACK-1963 New mapping model for CloudStack zone and Vmware datacenter

Introduced 2 new API command classes AddVmwareDcCmd & RemoveVmwareDcCmd.
The new APIs are addVmwareDc & removeVmwareDc, these APIs will associate a Vmware datacenter to a cloudstack zone & dis-associate a Vmware datacenter from a cloudstack zone.
Constraint checks are added for infrastructure change operations in zone that encompass resources like clusters.
Constraint checks are added in discoverer and manager classes.
Added a service 'VmwareDatacenterService' to expose methods that will have API implementation for 2 APIs addVmwareDc & removeVmwareDc

Signed-off-by: Sateesh Chodapuneedi <sateesh@apache.org>
CLOUDSTACK-1963 New mapping model for CloudStack zone and Vmware datacenter

DB schema changes to support this feature.
Added 3 new tables.
'vmware_data_center' to persist information about each Vmware datacenter known to cloudstack.
'vmware_data_center_zone_map' to persist mapping information of a Vmware datacenter & cloudstack zone.
'legacy_zones' to persist the known legacy zones in the deployment.

Signed-off-by: Sateesh Chodapuneedi <sateesh@apache.org>
CLOUDSTACK-1963 New mapping model for CloudStack zone and Vmware datacenter

Adding all new beans introduced during the feature implementation to nonoss component context.

Signed-off-by: Sateesh Chodapuneedi <sateesh@apache.org>
CLOUDSTACK-1963 New mapping model for CloudStack zone and Vmware datacenter

Upgrade handling.
Detect legacy zones during db upgrade and perform data migration.
If legacy zone is detected the table 'cloud'.'legacy_zones' is populated.
If an existing zone which has resources that belong to single VMware datacenter then such zone would not be marked as legacy zone. Such zone would be automatically associated with the specific Vmware datacenter of the clusters inside the zone.

Signed-off-by: Sateesh Chodapuneedi <sateesh@apache.org>
CLOUDSTACK-1963 New mapping model for CloudStack zone and Vmware datacenter

Unit tests to test functionality of the feature.

Signed-off-by: Sateesh Chodapuneedi <sateesh@apache.org>
Added check for legacy zones. Improved log statements.

Signed-off-by: Sateesh Chodapuneedi <sateesh@apache.org>