...
- 'cloud'.'vmware_data_center' table to track all DC specific information along with details of resources & vCenter.
- Columns in this table are id, uuid, DC name, guid, vCenter host, username & password. The 'guid' field encapsulates 'vCenter host/ip' and DC mor. E.g. 'Datacenter:datacenter-101@vcenter.abc.com'
- id is primary key field of this table
- Schema definition
- CREATE TABLE `cloud`.`vmware_data_center` (
`id` bigint unsigned NOT NULL AUTO_INCREMENT COMMENT 'id',
`uuid` varchar(255) UNIQUE,
`name` varchar(255) NOT NULL COMMENT 'Name of VMware datacenter',
`guid` varchar(255) NOT NULL UNIQUE COMMENT 'id of String encapsulating VMware datacenter and vCenter',
`vcenter_host` varchar(255) NOT NULL COMMENT 'vCenter host containing this VMware datacenter',
`username` varchar(255) NOT NULL COMMENT 'Name of vCenter host user',
`password` varchar(255) NOT NULL COMMENT 'Password of vCenter host user',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
- 'cloud'.'vmware_data_center_zone_map' table will be added to persist the mapping of zone with DC.
- Columns in this table are id, vmware_data_center_id, zone_id
- Foreign key id from vmware_data_center table
- Schema definition
- CREATE TABLE `cloud`.`vmware_data_center_zone_map` (
`id` bigint unsigned NOT NULL AUTO_INCREMENT COMMENT 'id',
`zone_id` bigint unsigned NOT NULL UNIQUE COMMENT 'id of CloudStack zone',
`vmware_data_center_id` bigint unsigned NOT NULL UNIQUE COMMENT 'id of VMware datacenter',
PRIMARY KEY (`id`),
CONSTRAINT `fk_vmware_data_center_zone_map__vmware_data_center_id` FOREIGN KEY (`vmware_data_center_id`) REFERENCES `vmware_data_center`(`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
- 'cloud'.'legacy_zones' table to track legacy zones in cloudstack deployment. During CloudStack upgrade, this table is populated.
- Columns in this table are id, zone id
- id is primary key field of this table
- Foreign key zone_id refers id from data_center table
- Schema definition
- CREATE TABLE `cloud`.`legacy_zones` (
`id` bigint unsigned NOT NULL AUTO_INCREMENT COMMENT 'id',
`zone_id` bigint unsigned NOT NULL UNIQUE COMMENT 'id of CloudStack zone',
PRIMARY KEY (`id`),
CONSTRAINT `fk_legacy_zones__zone_id` FOREIGN KEY (`zone_id`) REFERENCES `data_center`(`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
...
- addCluster will be modified
- Interface perspective -
- No change
- If the zone is legacy, then hide Datacenter/DC text field in UI. Hence cluster url becomes http://vcenterhost/cluster
Image Removed
- addVmwareDc -
- Maps a cloudstack zone with specified VMware DC.
- Throws RemoteException if vCenter is not reachable or any other server side Exception caught.
- Upon failure in parameter validation throw InvalidParameterValueException
- Parameters are,
- zoneId - required
- name - required
- url vcenter - required
- username - required
- password - required
- removeVmwareDc -
- Removes and unmaps the VMWare DC that is added to specified zone.
- If no association exists already, then throw CloudRuntimeException.
- If no such zone exists, throw InvalidParameterValueException
- If zone is have one or more clusters / elements, then throw ResourceInUseException - Zone should be empty (no clusters or other elements like Nexus 1000v VSM instance)
- Parameter are,
- zoneId - required
- listVmwareDcs -
- Lists VMware DCs associated with specified zone.
- If no association exists already, then returns empty list
- Parameter is,
- zoneId - required
UI Flow
...
{"serverDuration": 168, "requestCorrelationId": "64a8db1b2104108f"}