Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Update API / DB section

...

  1. All VMware test cases need to be covered, as new mapping of DC to CloudStack zone is a change in critical path of VMware hypervisor plugin.
  2. Test upgrade to new product (with this feature) when the deployment already has multiple zones, where clusters in each zone encompasses one or more of following,
    1. Single DC
    2. Multiple DCs
    3. Multiple vCenters
  3. After upgrade, test adding new cluster to existing/new zone, where the cluster belongs to a DC/vCenter that is,
    1. Already part of zone
    2. Not part of zone
  4. Test new creation of new zone

Hypervisor support

...

  1. 'cloud'.'vmware_data_center' table to track all DC specific information along with details of resources & vCenter.
    1. 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. 'vcenterDatacenter:datacenter-101@vcenter.abc.com@dc-101com'
    2. id is primary key field of this table
    3. Schema definition
      1. 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 'id Name of CloudStack zoneVMware datacenter',
        `guid` varchar(255) NOT NULL UNIQUE COMMENT 'id of VMware datacenter',
        PRIMARY KEY (`id`) ENGINE=InnoDB DEFAULT CHARSET=utf8; `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;
  2. 'cloud'.''cloud'.'zone_vmware_data_center_zone_map' table will be added to persist the mapping of zone to with DC.
    1. Columns in this table are id, vmware_dcdata_center_id, zone_id
    2. Foreign key id from vmware_dc table
    3. Foreign key id from data_center table
    4. Foreign key zone_id from data_center table.
    5. Schema definition
      1. CREATE TABLE `cloud`.`zone_vmware`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_zone_vmware_data_center_map__zone_id` FOREIGN KEY (`zone_id`) REFERENCES `data_center`KEY (`id`) ON DELETE CASCADE,
        CONSTRAINT `fk_zone_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;
  3. 'cloud'.'legacy_zones' table to track legacy zones in cloudstack deployment. During CloudStack upgrade, this table is populated.
    1. Columns in this table are id, zone id
      1. id is primary key field of this table
      2. Foreign key zone_id refers id from data_center table
    2. Schema definition
      1. 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_zone_vmware_data_center_maplegacy_zones__zone_id` FOREIGN KEY (`zone_id`) REFERENCES `data_center`(`id`) ON DELETE CASCADE
        ) ENGINE=InnoDB DEFAULT CHARSET=utf8;

...

  1. addCluster will be modified
    1. Interface perspective - Remove parameters vCenter host/ip, username, password and DC name optional based on zone id's presence in zone_dc_map.
    2. Only required parameter is cluster name.
      1. No change
      2. If the zone is legacy, then hide Datacenter/DC text field in UI. Hence url becomes http://vcenterhost/clusterImage Added
  2. addVmwareDc associateZoneWithDc -
    1. Maps a cloudstack zone with specified VMware DC.
    2. Throws RemoteException if vCenter is not reachable or any other server side Exception caught.
    3. Upon failure in successful parameter validation throw InvalidParameterValueException
    4. Parameters are,
      1. zoneId - required
      2. dcName name - required
      3. vCenterHost url - required
      4. vCenterUser username - required
      5. vCenterPassword password - required
  3. disAssocaiteZoneWithDc removeVmwareDc -
    1. Unmaps a cloudstack zone from a Removes and unmaps the VMWare DC that is associated with it earlieradded to specified zone.
    2. If no association exists already, then throw CloudRuntimeException.
    3. If no such zone exists, throw InvalidParameterValueException
    4. 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)
    5. Parameter are,
      1. zoneId - required

UI Flow

  1. Changes required in UI
    1. Associate zone with DC
      1. Add VMware DC to zone
      2. Remove VMware DC from zone
      Dis-associate zone with DC
      1. Add Cluster form in zone wizard
      2. Add Cluster wizard
      3. Changes to support legacy zones.

    Open Issues
    Anchor
    OpenIssues
    OpenIssues

    ...