You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cloudstack.apache.org by deepti dohare <de...@citrix.com> on 2013/05/02 16:53:30 UTC

Re: Review Request: CLOUDSTACK-681: Dedicated Resources - Explicit Dedication, Private zone, pod, cluster or host

-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/10797/
-----------------------------------------------------------

(Updated May 2, 2013, 2:53 p.m.)


Review request for cloudstack, Devdeep Singh, Prachi Damle, and Nitin Mehta.


Changes
-------

Thanks Prachi for the reviews. Updating the patch with the suggested changes. Also added the changes for list zones.
An account user cannot list dedicated zones if not dedicated to his account/domain.  


Description
-------

Review Request for "Dedicated Resources: Explicit Dedication"
=============================================================

Functional Spec for the above Private zone, pod, cluster or host, can be found here: https://cwiki.apache.org/confluence/display/CLOUDSTACK/Dedicated+Resources+-+Private+zone%2C+pod%2C+cluster%2C+host+Functional+Spec
This patch request is a part of this feature.

This feature allows a user to deploy VMs only in the resources dedicated to his account or domain.

1. Resources(Zones, Pods, Clusters or hosts) can be dedicated to an account or domain.
   Implemented 12 new APIs to dedicate/list/release resources:
   - dedicateZone, listDedicatedZones, releaseDedicatedZone for a Zone.
   - dedicatePod, listDedicatedPods, releaseDedicatedPod for a Pod.
   - dedicateCluster, listDedicatedClusters, releaseDedicatedCluster for a Cluster
   - dedicateHost, listDedicatedHosts, releaseDedicatedHost for a Host.
2. Once a resource(eg. pod) is dedicated to an account, other resources(eg. clusters/hosts) inside that cannot be further dedicated.
3. Once a resource is dedicated to a domain, other resources inside that can be further dedicated to its sub-domain or account.
4. If any resource (eg.cluster) is dedicated to a account/domain, then resources(eg. Pod) above that cannot be dedicated to different accounts/domain (not belonging to the same domain) 
5. To use Explicit dedication, user needs to create an Affinity Group of type 'ExplicitDedication'
6. A VM can be deployed with the above affinity group parameter as an input.
7. A new ExplicitDedicationProcessor has been added which will process the affinity group of type 'Explicit Dedication' for a deployment of a VM that demands dedicated resources.
   This processor implements the AffinityGroupProcessor adapter. This processor will update the avoid list.
8. A VM requesting dedication will be deployed on dedicatd resources if available with the user account.
9. A VM requesting dedication can also be deployed on the dedicated resources available with the parent domains iff no dedicated resources are available with the current user's account or 
   domain. 
10. A VM (without dedication) can be deployed on shared host but not on dedicated hosts.
11. To modify the dedication, the resource has to be release first.
12. Existing Private zone functionality has been redirected to Explicit dedication of zones.
13. Updated the db upgrade schema script. A new table "dedicated_resources" has been added.
14. Added the right permissions in commands.properties
15. Unit tests:  For the new APIs and Service, added unit tests under : plugins/dedicated-resources/test/org/apache/cloudstack/dedicated/DedicatedApiUnitTest.java


This addresses bug CLOUDSTACK-681.


Diffs (updated)
-----

  api/src/com/cloud/dc/DedicatedResources.java PRE-CREATION 
  api/src/com/cloud/event/EventTypes.java 0ee7f40 
  client/pom.xml a7c7009 
  client/tomcatconf/applicationContext.xml.in 2e340bf 
  client/tomcatconf/commands.properties.in b49e1fb 
  client/tomcatconf/componentContext.xml.in 7a46981 
  engine/orchestration/src/org/apache/cloudstack/platform/orchestration/CloudOrchestrator.java 963e4d7 
  plugins/affinity-group-processors/explicit-dedication/pom.xml PRE-CREATION 
  plugins/affinity-group-processors/explicit-dedication/src/org/apache/cloudstack/affinity/ExplicitDedicationProcessor.java PRE-CREATION 
  plugins/dedicated-resources/pom.xml PRE-CREATION 
  plugins/dedicated-resources/src/org/apache/cloudstack/dedicated/api/commands/DedicateClusterCmd.java PRE-CREATION 
  plugins/dedicated-resources/src/org/apache/cloudstack/dedicated/api/commands/DedicateHostCmd.java PRE-CREATION 
  plugins/dedicated-resources/src/org/apache/cloudstack/dedicated/api/commands/DedicatePodCmd.java PRE-CREATION 
  plugins/dedicated-resources/src/org/apache/cloudstack/dedicated/api/commands/DedicateZoneCmd.java PRE-CREATION 
  plugins/dedicated-resources/src/org/apache/cloudstack/dedicated/api/commands/ListDedicatedClustersCmd.java PRE-CREATION 
  plugins/dedicated-resources/src/org/apache/cloudstack/dedicated/api/commands/ListDedicatedHostsCmd.java PRE-CREATION 
  plugins/dedicated-resources/src/org/apache/cloudstack/dedicated/api/commands/ListDedicatedPodsCmd.java PRE-CREATION 
  plugins/dedicated-resources/src/org/apache/cloudstack/dedicated/api/commands/ListDedicatedZonesCmd.java PRE-CREATION 
  plugins/dedicated-resources/src/org/apache/cloudstack/dedicated/api/commands/ReleaseDedicatedClusterCmd.java PRE-CREATION 
  plugins/dedicated-resources/src/org/apache/cloudstack/dedicated/api/commands/ReleaseDedicatedHostCmd.java PRE-CREATION 
  plugins/dedicated-resources/src/org/apache/cloudstack/dedicated/api/commands/ReleaseDedicatedPodCmd.java PRE-CREATION 
  plugins/dedicated-resources/src/org/apache/cloudstack/dedicated/api/commands/ReleaseDedicatedZoneCmd.java PRE-CREATION 
  plugins/dedicated-resources/src/org/apache/cloudstack/dedicated/api/response/DedicateClusterResponse.java PRE-CREATION 
  plugins/dedicated-resources/src/org/apache/cloudstack/dedicated/api/response/DedicateHostResponse.java PRE-CREATION 
  plugins/dedicated-resources/src/org/apache/cloudstack/dedicated/api/response/DedicatePodResponse.java PRE-CREATION 
  plugins/dedicated-resources/src/org/apache/cloudstack/dedicated/api/response/DedicateZoneResponse.java PRE-CREATION 
  plugins/dedicated-resources/src/org/apache/cloudstack/dedicated/manager/DedicatedResourceManagerImpl.java PRE-CREATION 
  plugins/dedicated-resources/src/org/apache/cloudstack/dedicated/services/DedicatedService.java PRE-CREATION 
  plugins/dedicated-resources/test/org/apache/cloudstack/dedicated/DedicatedApiTestConfiguration.java PRE-CREATION 
  plugins/dedicated-resources/test/org/apache/cloudstack/dedicated/DedicatedApiUnitTest.java PRE-CREATION 
  plugins/dedicated-resources/test/resource/dedicatedContext.xml PRE-CREATION 
  plugins/pom.xml b940271 
  server/src/com/cloud/api/query/QueryManagerImpl.java 50018e5 
  server/src/com/cloud/configuration/ConfigurationManagerImpl.java 37ca793 
  server/src/com/cloud/dc/DedicatedResourceVO.java PRE-CREATION 
  server/src/com/cloud/dc/dao/ClusterDao.java 3ce0798 
  server/src/com/cloud/dc/dao/ClusterDaoImpl.java 86dc65e 
  server/src/com/cloud/dc/dao/DedicatedResourceDao.java PRE-CREATION 
  server/src/com/cloud/dc/dao/DedicatedResourceDaoImpl.java PRE-CREATION 
  server/src/com/cloud/deploy/DeploymentPlanningManagerImpl.java c7162a2 
  server/src/com/cloud/domain/dao/DomainDaoImpl.java c30ca5e 
  server/src/com/cloud/host/dao/HostDao.java 98bdcb4 
  server/src/com/cloud/host/dao/HostDaoImpl.java 07a4232 
  server/src/com/cloud/resource/ResourceManagerImpl.java c9c3f9c 
  server/src/com/cloud/user/AccountManagerImpl.java 8de73fb 
  server/src/com/cloud/user/DomainManagerImpl.java dbcbe4e 
  server/src/com/cloud/vm/UserVmManagerImpl.java 6179948 
  server/test/org/apache/cloudstack/affinity/AffinityApiTestConfiguration.java 4dd6ad7 
  server/test/org/apache/cloudstack/networkoffering/ChildTestConfiguration.java 709dfe2 
  server/test/resources/affinityContext.xml 15476c1 
  setup/db/create-schema.sql b1feb02 
  setup/db/db/schema-410to420.sql 99b476d 

Diff: https://reviews.apache.org/r/10797/diff/


Testing
-------

Unit tests:  
For the new APIs and Service, added unit tests under: plugins/dedicated-resources/test/org/apache/cloudstack/dedicated/DedicatedApiUnitTest.java
The tests validates the APIs: dedication of zone, pod, cluster and hosts. Also added negative tests for the scenarios.

Manual Testing Done

Tests for DeployVirtualMachine
==============================
Setup : 2 zones Z1 and Z2 , infrastructure:
        Z1->(P1,P2), P1->(C1,C2), C1->(H1,H2), C2->H3, P2->C3, C3->H4  
        Z2-> P3, P3->C4, C4->H5
	
	    domain(account) -> sub-domain(account)
        D1(A1,U1)->SD1(SA1), D2(A2,U2)->SD2(SA2)
		
		Dedication: C1 dedicated to A1, P2 dedicated to D2
		Affinity group of type 'ExplicitDedication' for each account is created.

Tested the following scenarios:		
1. A1 deploys a VM with AG of type 'ExplicitDedication' on Z1, VM deployed on H1/H2 
2. SA1 deploys a VM with AG of type 'ExplicitDedication' on Z1. VM Deployment failed. H1/H2 cannot be picked, since C1 is dedicated to account A1, not domain.
3. SA1 deploys a VM with NO Dedication required. VM deployed on H3. 
4. A1/U1/SA1/A2/U2/SA2 deploys a VM with NO Dedication required on Z1, VM deployed on H3.
5. U1 deploys a VM with AG of type 'ExplicitDedication' on Z1, VM deployment failed.
6. A2 deploys a VM with AG of type 'ExplicitDedication' on Z1, VM deployed on H4.
7. SA2 deploys a VM with AG of type 'ExplicitDedication' on Z1, VM deployed on H4. SA2 belongs to SD2 which is a sub-domain of D2.
8. Deployment of VM with AG of type 'ExplicitDedication' on zone Z2 will get failed. since nothing is dedicated in Zone Z2

Tests for Migration of dedicated VMs
====================================
1. Migrate a non-dedicated VM on dedicated Host:
     - Alert is Raised
2. Migrate a dedicated VM on non-dedicated host : 
     - Alert is Raised


Test for HostTags and Explicit Dedication
=========================================
1. Host Tag and AG of type 'ExplicitDedication': both provided
     - if Host or its cluster/pod/zone is dedicated (to the caller's account/domain) and Host is tagged, then deployment is successful else fail the request.
2. Host tag is provided and No dedication is required
     - Host should be tagged but not dedicated.

Test for Deletion of domains and accounts
=========================================
1. If an account or a domain has dedicated resources and admin deletes that account/domain, dedication is automatically removed.
  


Thanks,

deepti dohare


Re: Review Request: CLOUDSTACK-681: Dedicated Resources - Explicit Dedication, Private zone, pod, cluster or host

Posted by ASF Subversion and Git Services <as...@urd.zones.apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/10797/#review21188
-----------------------------------------------------------


Commit 17267794adb2bab923fb20515a7b943780d61921 in branch refs/heads/master from Prachi Damle <pr...@cloud.com>
[ https://git-wip-us.apache.org/repos/asf?p=cloudstack.git;h=1726779 ]

CLOUDSTACK-681: Dedicated Resources - Explicit Dedication, Private zone, pod, cluster or host. <Patch1>

This feature allows a user to deploy VMs only in the resources dedicated to his account or domain.

1. Resources(Zones, Pods, Clusters or hosts) can be dedicated to an account or domain.
   Implemented 12 new APIs to dedicate/list/release resources:
   - dedicateZone, listDedicatedZones, releaseDedicatedZone for a Zone.
   - dedicatePod, listDedicatedPods, releaseDedicatedPod for a Pod.
   - dedicateCluster, listDedicatedClusters, releaseDedicatedCluster for a Cluster
   - dedicateHost, listDedicatedHosts, releaseDedicatedHost for a Host.
2. Once a resource(eg. pod) is dedicated to an account, other resources(eg. clusters/hosts) inside that cannot be further dedicated.
3. Once a resource is dedicated to a domain, other resources inside that can be further dedicated to its sub-domain or account.
4. If any resource (eg.cluster) is dedicated to a account/domain, then resources(eg. Pod) above that cannot be dedicated to different accounts/domain (not belonging to the same domain)
5. To use Explicit dedication, user needs to create an Affinity Group of type 'ExplicitDedication'
6. A VM can be deployed with the above affinity group parameter as an input.
7. A new ExplicitDedicationProcessor has been added which will process the affinity group of type 'Explicit Dedication' for a deployment of a VM that demands dedicated resources.
   This processor implements the AffinityGroupProcessor adapter. This processor will update the avoid list.
8. A VM requesting dedication will be deployed on dedicatd resources if available with the user account.
9. A VM requesting dedication can also be deployed on the dedicated resources available with the parent domains iff no dedicated resources are available with the current user's account or
   domain.
10. A VM (without dedication) can be deployed on shared host but not on dedicated hosts.
11. To modify the dedication, the resource has to be released first.
12. Existing Private zone functionality has been redirected to Explicit dedication of zones.
13. Updated the db upgrade schema script. A new table "dedicated_resources" has been added.
14. Added the right permissions in commands.properties
15. Unit tests:  For the new APIs and Service, added unit tests under : plugins/dedicated-resources/test/org/apache/cloudstack/dedicated/DedicatedApiUnitTest.java
16. Marvin Test: To dedicate host, create affinity group, deploy-vm, check if vm is deployed on the dedicated host.


- ASF Subversion and Git Services


On May 2, 2013, 2:53 p.m., deepti dohare wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/10797/
> -----------------------------------------------------------
> 
> (Updated May 2, 2013, 2:53 p.m.)
> 
> 
> Review request for cloudstack, Devdeep Singh, Prachi Damle, and Nitin Mehta.
> 
> 
> Description
> -------
> 
> Review Request for "Dedicated Resources: Explicit Dedication"
> =============================================================
> 
> Functional Spec for the above Private zone, pod, cluster or host, can be found here: https://cwiki.apache.org/confluence/display/CLOUDSTACK/Dedicated+Resources+-+Private+zone%2C+pod%2C+cluster%2C+host+Functional+Spec
> This patch request is a part of this feature.
> 
> This feature allows a user to deploy VMs only in the resources dedicated to his account or domain.
> 
> 1. Resources(Zones, Pods, Clusters or hosts) can be dedicated to an account or domain.
>    Implemented 12 new APIs to dedicate/list/release resources:
>    - dedicateZone, listDedicatedZones, releaseDedicatedZone for a Zone.
>    - dedicatePod, listDedicatedPods, releaseDedicatedPod for a Pod.
>    - dedicateCluster, listDedicatedClusters, releaseDedicatedCluster for a Cluster
>    - dedicateHost, listDedicatedHosts, releaseDedicatedHost for a Host.
> 2. Once a resource(eg. pod) is dedicated to an account, other resources(eg. clusters/hosts) inside that cannot be further dedicated.
> 3. Once a resource is dedicated to a domain, other resources inside that can be further dedicated to its sub-domain or account.
> 4. If any resource (eg.cluster) is dedicated to a account/domain, then resources(eg. Pod) above that cannot be dedicated to different accounts/domain (not belonging to the same domain) 
> 5. To use Explicit dedication, user needs to create an Affinity Group of type 'ExplicitDedication'
> 6. A VM can be deployed with the above affinity group parameter as an input.
> 7. A new ExplicitDedicationProcessor has been added which will process the affinity group of type 'Explicit Dedication' for a deployment of a VM that demands dedicated resources.
>    This processor implements the AffinityGroupProcessor adapter. This processor will update the avoid list.
> 8. A VM requesting dedication will be deployed on dedicatd resources if available with the user account.
> 9. A VM requesting dedication can also be deployed on the dedicated resources available with the parent domains iff no dedicated resources are available with the current user's account or 
>    domain. 
> 10. A VM (without dedication) can be deployed on shared host but not on dedicated hosts.
> 11. To modify the dedication, the resource has to be release first.
> 12. Existing Private zone functionality has been redirected to Explicit dedication of zones.
> 13. Updated the db upgrade schema script. A new table "dedicated_resources" has been added.
> 14. Added the right permissions in commands.properties
> 15. Unit tests:  For the new APIs and Service, added unit tests under : plugins/dedicated-resources/test/org/apache/cloudstack/dedicated/DedicatedApiUnitTest.java
> 
> 
> This addresses bug CLOUDSTACK-681.
> 
> 
> Diffs
> -----
> 
>   api/src/com/cloud/dc/DedicatedResources.java PRE-CREATION 
>   api/src/com/cloud/event/EventTypes.java 0ee7f40 
>   client/pom.xml a7c7009 
>   client/tomcatconf/applicationContext.xml.in 2e340bf 
>   client/tomcatconf/commands.properties.in b49e1fb 
>   client/tomcatconf/componentContext.xml.in 7a46981 
>   engine/orchestration/src/org/apache/cloudstack/platform/orchestration/CloudOrchestrator.java 963e4d7 
>   plugins/affinity-group-processors/explicit-dedication/pom.xml PRE-CREATION 
>   plugins/affinity-group-processors/explicit-dedication/src/org/apache/cloudstack/affinity/ExplicitDedicationProcessor.java PRE-CREATION 
>   plugins/dedicated-resources/pom.xml PRE-CREATION 
>   plugins/dedicated-resources/src/org/apache/cloudstack/dedicated/api/commands/DedicateClusterCmd.java PRE-CREATION 
>   plugins/dedicated-resources/src/org/apache/cloudstack/dedicated/api/commands/DedicateHostCmd.java PRE-CREATION 
>   plugins/dedicated-resources/src/org/apache/cloudstack/dedicated/api/commands/DedicatePodCmd.java PRE-CREATION 
>   plugins/dedicated-resources/src/org/apache/cloudstack/dedicated/api/commands/DedicateZoneCmd.java PRE-CREATION 
>   plugins/dedicated-resources/src/org/apache/cloudstack/dedicated/api/commands/ListDedicatedClustersCmd.java PRE-CREATION 
>   plugins/dedicated-resources/src/org/apache/cloudstack/dedicated/api/commands/ListDedicatedHostsCmd.java PRE-CREATION 
>   plugins/dedicated-resources/src/org/apache/cloudstack/dedicated/api/commands/ListDedicatedPodsCmd.java PRE-CREATION 
>   plugins/dedicated-resources/src/org/apache/cloudstack/dedicated/api/commands/ListDedicatedZonesCmd.java PRE-CREATION 
>   plugins/dedicated-resources/src/org/apache/cloudstack/dedicated/api/commands/ReleaseDedicatedClusterCmd.java PRE-CREATION 
>   plugins/dedicated-resources/src/org/apache/cloudstack/dedicated/api/commands/ReleaseDedicatedHostCmd.java PRE-CREATION 
>   plugins/dedicated-resources/src/org/apache/cloudstack/dedicated/api/commands/ReleaseDedicatedPodCmd.java PRE-CREATION 
>   plugins/dedicated-resources/src/org/apache/cloudstack/dedicated/api/commands/ReleaseDedicatedZoneCmd.java PRE-CREATION 
>   plugins/dedicated-resources/src/org/apache/cloudstack/dedicated/api/response/DedicateClusterResponse.java PRE-CREATION 
>   plugins/dedicated-resources/src/org/apache/cloudstack/dedicated/api/response/DedicateHostResponse.java PRE-CREATION 
>   plugins/dedicated-resources/src/org/apache/cloudstack/dedicated/api/response/DedicatePodResponse.java PRE-CREATION 
>   plugins/dedicated-resources/src/org/apache/cloudstack/dedicated/api/response/DedicateZoneResponse.java PRE-CREATION 
>   plugins/dedicated-resources/src/org/apache/cloudstack/dedicated/manager/DedicatedResourceManagerImpl.java PRE-CREATION 
>   plugins/dedicated-resources/src/org/apache/cloudstack/dedicated/services/DedicatedService.java PRE-CREATION 
>   plugins/dedicated-resources/test/org/apache/cloudstack/dedicated/DedicatedApiTestConfiguration.java PRE-CREATION 
>   plugins/dedicated-resources/test/org/apache/cloudstack/dedicated/DedicatedApiUnitTest.java PRE-CREATION 
>   plugins/dedicated-resources/test/resource/dedicatedContext.xml PRE-CREATION 
>   plugins/pom.xml b940271 
>   server/src/com/cloud/api/query/QueryManagerImpl.java 50018e5 
>   server/src/com/cloud/configuration/ConfigurationManagerImpl.java 37ca793 
>   server/src/com/cloud/dc/DedicatedResourceVO.java PRE-CREATION 
>   server/src/com/cloud/dc/dao/ClusterDao.java 3ce0798 
>   server/src/com/cloud/dc/dao/ClusterDaoImpl.java 86dc65e 
>   server/src/com/cloud/dc/dao/DedicatedResourceDao.java PRE-CREATION 
>   server/src/com/cloud/dc/dao/DedicatedResourceDaoImpl.java PRE-CREATION 
>   server/src/com/cloud/deploy/DeploymentPlanningManagerImpl.java c7162a2 
>   server/src/com/cloud/domain/dao/DomainDaoImpl.java c30ca5e 
>   server/src/com/cloud/host/dao/HostDao.java 98bdcb4 
>   server/src/com/cloud/host/dao/HostDaoImpl.java 07a4232 
>   server/src/com/cloud/resource/ResourceManagerImpl.java c9c3f9c 
>   server/src/com/cloud/user/AccountManagerImpl.java 8de73fb 
>   server/src/com/cloud/user/DomainManagerImpl.java dbcbe4e 
>   server/src/com/cloud/vm/UserVmManagerImpl.java 6179948 
>   server/test/org/apache/cloudstack/affinity/AffinityApiTestConfiguration.java 4dd6ad7 
>   server/test/org/apache/cloudstack/networkoffering/ChildTestConfiguration.java 709dfe2 
>   server/test/resources/affinityContext.xml 15476c1 
>   setup/db/create-schema.sql b1feb02 
>   setup/db/db/schema-410to420.sql 99b476d 
> 
> Diff: https://reviews.apache.org/r/10797/diff/
> 
> 
> Testing
> -------
> 
> Unit tests:  
> For the new APIs and Service, added unit tests under: plugins/dedicated-resources/test/org/apache/cloudstack/dedicated/DedicatedApiUnitTest.java
> The tests validates the APIs: dedication of zone, pod, cluster and hosts. Also added negative tests for the scenarios.
> 
> Manual Testing Done
> 
> Tests for DeployVirtualMachine
> ==============================
> Setup : 2 zones Z1 and Z2 , infrastructure:
>         Z1->(P1,P2), P1->(C1,C2), C1->(H1,H2), C2->H3, P2->C3, C3->H4  
>         Z2-> P3, P3->C4, C4->H5
> 	
> 	    domain(account) -> sub-domain(account)
>         D1(A1,U1)->SD1(SA1), D2(A2,U2)->SD2(SA2)
> 		
> 		Dedication: C1 dedicated to A1, P2 dedicated to D2
> 		Affinity group of type 'ExplicitDedication' for each account is created.
> 
> Tested the following scenarios:		
> 1. A1 deploys a VM with AG of type 'ExplicitDedication' on Z1, VM deployed on H1/H2 
> 2. SA1 deploys a VM with AG of type 'ExplicitDedication' on Z1. VM Deployment failed. H1/H2 cannot be picked, since C1 is dedicated to account A1, not domain.
> 3. SA1 deploys a VM with NO Dedication required. VM deployed on H3. 
> 4. A1/U1/SA1/A2/U2/SA2 deploys a VM with NO Dedication required on Z1, VM deployed on H3.
> 5. U1 deploys a VM with AG of type 'ExplicitDedication' on Z1, VM deployment failed.
> 6. A2 deploys a VM with AG of type 'ExplicitDedication' on Z1, VM deployed on H4.
> 7. SA2 deploys a VM with AG of type 'ExplicitDedication' on Z1, VM deployed on H4. SA2 belongs to SD2 which is a sub-domain of D2.
> 8. Deployment of VM with AG of type 'ExplicitDedication' on zone Z2 will get failed. since nothing is dedicated in Zone Z2
> 
> Tests for Migration of dedicated VMs
> ====================================
> 1. Migrate a non-dedicated VM on dedicated Host:
>      - Alert is Raised
> 2. Migrate a dedicated VM on non-dedicated host : 
>      - Alert is Raised
> 
> 
> Test for HostTags and Explicit Dedication
> =========================================
> 1. Host Tag and AG of type 'ExplicitDedication': both provided
>      - if Host or its cluster/pod/zone is dedicated (to the caller's account/domain) and Host is tagged, then deployment is successful else fail the request.
> 2. Host tag is provided and No dedication is required
>      - Host should be tagged but not dedicated.
> 
> Test for Deletion of domains and accounts
> =========================================
> 1. If an account or a domain has dedicated resources and admin deletes that account/domain, dedication is automatically removed.
>   
> 
> 
> Thanks,
> 
> deepti dohare
> 
>


Re: Review Request: CLOUDSTACK-681: Dedicated Resources - Explicit Dedication, Private zone, pod, cluster or host

Posted by Prachi Damle <pr...@citrix.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/10797/#review20928
-----------------------------------------------------------


In all the Dedicate* API's we should check if any VM's of other accounts are running on that host/cluster/pod/zone. If yes, dedication should fail.

- Prachi Damle


On May 2, 2013, 2:53 p.m., deepti dohare wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/10797/
> -----------------------------------------------------------
> 
> (Updated May 2, 2013, 2:53 p.m.)
> 
> 
> Review request for cloudstack, Devdeep Singh, Prachi Damle, and Nitin Mehta.
> 
> 
> Description
> -------
> 
> Review Request for "Dedicated Resources: Explicit Dedication"
> =============================================================
> 
> Functional Spec for the above Private zone, pod, cluster or host, can be found here: https://cwiki.apache.org/confluence/display/CLOUDSTACK/Dedicated+Resources+-+Private+zone%2C+pod%2C+cluster%2C+host+Functional+Spec
> This patch request is a part of this feature.
> 
> This feature allows a user to deploy VMs only in the resources dedicated to his account or domain.
> 
> 1. Resources(Zones, Pods, Clusters or hosts) can be dedicated to an account or domain.
>    Implemented 12 new APIs to dedicate/list/release resources:
>    - dedicateZone, listDedicatedZones, releaseDedicatedZone for a Zone.
>    - dedicatePod, listDedicatedPods, releaseDedicatedPod for a Pod.
>    - dedicateCluster, listDedicatedClusters, releaseDedicatedCluster for a Cluster
>    - dedicateHost, listDedicatedHosts, releaseDedicatedHost for a Host.
> 2. Once a resource(eg. pod) is dedicated to an account, other resources(eg. clusters/hosts) inside that cannot be further dedicated.
> 3. Once a resource is dedicated to a domain, other resources inside that can be further dedicated to its sub-domain or account.
> 4. If any resource (eg.cluster) is dedicated to a account/domain, then resources(eg. Pod) above that cannot be dedicated to different accounts/domain (not belonging to the same domain) 
> 5. To use Explicit dedication, user needs to create an Affinity Group of type 'ExplicitDedication'
> 6. A VM can be deployed with the above affinity group parameter as an input.
> 7. A new ExplicitDedicationProcessor has been added which will process the affinity group of type 'Explicit Dedication' for a deployment of a VM that demands dedicated resources.
>    This processor implements the AffinityGroupProcessor adapter. This processor will update the avoid list.
> 8. A VM requesting dedication will be deployed on dedicatd resources if available with the user account.
> 9. A VM requesting dedication can also be deployed on the dedicated resources available with the parent domains iff no dedicated resources are available with the current user's account or 
>    domain. 
> 10. A VM (without dedication) can be deployed on shared host but not on dedicated hosts.
> 11. To modify the dedication, the resource has to be release first.
> 12. Existing Private zone functionality has been redirected to Explicit dedication of zones.
> 13. Updated the db upgrade schema script. A new table "dedicated_resources" has been added.
> 14. Added the right permissions in commands.properties
> 15. Unit tests:  For the new APIs and Service, added unit tests under : plugins/dedicated-resources/test/org/apache/cloudstack/dedicated/DedicatedApiUnitTest.java
> 
> 
> This addresses bug CLOUDSTACK-681.
> 
> 
> Diffs
> -----
> 
>   api/src/com/cloud/dc/DedicatedResources.java PRE-CREATION 
>   api/src/com/cloud/event/EventTypes.java 0ee7f40 
>   client/pom.xml a7c7009 
>   client/tomcatconf/applicationContext.xml.in 2e340bf 
>   client/tomcatconf/commands.properties.in b49e1fb 
>   client/tomcatconf/componentContext.xml.in 7a46981 
>   engine/orchestration/src/org/apache/cloudstack/platform/orchestration/CloudOrchestrator.java 963e4d7 
>   plugins/affinity-group-processors/explicit-dedication/pom.xml PRE-CREATION 
>   plugins/affinity-group-processors/explicit-dedication/src/org/apache/cloudstack/affinity/ExplicitDedicationProcessor.java PRE-CREATION 
>   plugins/dedicated-resources/pom.xml PRE-CREATION 
>   plugins/dedicated-resources/src/org/apache/cloudstack/dedicated/api/commands/DedicateClusterCmd.java PRE-CREATION 
>   plugins/dedicated-resources/src/org/apache/cloudstack/dedicated/api/commands/DedicateHostCmd.java PRE-CREATION 
>   plugins/dedicated-resources/src/org/apache/cloudstack/dedicated/api/commands/DedicatePodCmd.java PRE-CREATION 
>   plugins/dedicated-resources/src/org/apache/cloudstack/dedicated/api/commands/DedicateZoneCmd.java PRE-CREATION 
>   plugins/dedicated-resources/src/org/apache/cloudstack/dedicated/api/commands/ListDedicatedClustersCmd.java PRE-CREATION 
>   plugins/dedicated-resources/src/org/apache/cloudstack/dedicated/api/commands/ListDedicatedHostsCmd.java PRE-CREATION 
>   plugins/dedicated-resources/src/org/apache/cloudstack/dedicated/api/commands/ListDedicatedPodsCmd.java PRE-CREATION 
>   plugins/dedicated-resources/src/org/apache/cloudstack/dedicated/api/commands/ListDedicatedZonesCmd.java PRE-CREATION 
>   plugins/dedicated-resources/src/org/apache/cloudstack/dedicated/api/commands/ReleaseDedicatedClusterCmd.java PRE-CREATION 
>   plugins/dedicated-resources/src/org/apache/cloudstack/dedicated/api/commands/ReleaseDedicatedHostCmd.java PRE-CREATION 
>   plugins/dedicated-resources/src/org/apache/cloudstack/dedicated/api/commands/ReleaseDedicatedPodCmd.java PRE-CREATION 
>   plugins/dedicated-resources/src/org/apache/cloudstack/dedicated/api/commands/ReleaseDedicatedZoneCmd.java PRE-CREATION 
>   plugins/dedicated-resources/src/org/apache/cloudstack/dedicated/api/response/DedicateClusterResponse.java PRE-CREATION 
>   plugins/dedicated-resources/src/org/apache/cloudstack/dedicated/api/response/DedicateHostResponse.java PRE-CREATION 
>   plugins/dedicated-resources/src/org/apache/cloudstack/dedicated/api/response/DedicatePodResponse.java PRE-CREATION 
>   plugins/dedicated-resources/src/org/apache/cloudstack/dedicated/api/response/DedicateZoneResponse.java PRE-CREATION 
>   plugins/dedicated-resources/src/org/apache/cloudstack/dedicated/manager/DedicatedResourceManagerImpl.java PRE-CREATION 
>   plugins/dedicated-resources/src/org/apache/cloudstack/dedicated/services/DedicatedService.java PRE-CREATION 
>   plugins/dedicated-resources/test/org/apache/cloudstack/dedicated/DedicatedApiTestConfiguration.java PRE-CREATION 
>   plugins/dedicated-resources/test/org/apache/cloudstack/dedicated/DedicatedApiUnitTest.java PRE-CREATION 
>   plugins/dedicated-resources/test/resource/dedicatedContext.xml PRE-CREATION 
>   plugins/pom.xml b940271 
>   server/src/com/cloud/api/query/QueryManagerImpl.java 50018e5 
>   server/src/com/cloud/configuration/ConfigurationManagerImpl.java 37ca793 
>   server/src/com/cloud/dc/DedicatedResourceVO.java PRE-CREATION 
>   server/src/com/cloud/dc/dao/ClusterDao.java 3ce0798 
>   server/src/com/cloud/dc/dao/ClusterDaoImpl.java 86dc65e 
>   server/src/com/cloud/dc/dao/DedicatedResourceDao.java PRE-CREATION 
>   server/src/com/cloud/dc/dao/DedicatedResourceDaoImpl.java PRE-CREATION 
>   server/src/com/cloud/deploy/DeploymentPlanningManagerImpl.java c7162a2 
>   server/src/com/cloud/domain/dao/DomainDaoImpl.java c30ca5e 
>   server/src/com/cloud/host/dao/HostDao.java 98bdcb4 
>   server/src/com/cloud/host/dao/HostDaoImpl.java 07a4232 
>   server/src/com/cloud/resource/ResourceManagerImpl.java c9c3f9c 
>   server/src/com/cloud/user/AccountManagerImpl.java 8de73fb 
>   server/src/com/cloud/user/DomainManagerImpl.java dbcbe4e 
>   server/src/com/cloud/vm/UserVmManagerImpl.java 6179948 
>   server/test/org/apache/cloudstack/affinity/AffinityApiTestConfiguration.java 4dd6ad7 
>   server/test/org/apache/cloudstack/networkoffering/ChildTestConfiguration.java 709dfe2 
>   server/test/resources/affinityContext.xml 15476c1 
>   setup/db/create-schema.sql b1feb02 
>   setup/db/db/schema-410to420.sql 99b476d 
> 
> Diff: https://reviews.apache.org/r/10797/diff/
> 
> 
> Testing
> -------
> 
> Unit tests:  
> For the new APIs and Service, added unit tests under: plugins/dedicated-resources/test/org/apache/cloudstack/dedicated/DedicatedApiUnitTest.java
> The tests validates the APIs: dedication of zone, pod, cluster and hosts. Also added negative tests for the scenarios.
> 
> Manual Testing Done
> 
> Tests for DeployVirtualMachine
> ==============================
> Setup : 2 zones Z1 and Z2 , infrastructure:
>         Z1->(P1,P2), P1->(C1,C2), C1->(H1,H2), C2->H3, P2->C3, C3->H4  
>         Z2-> P3, P3->C4, C4->H5
> 	
> 	    domain(account) -> sub-domain(account)
>         D1(A1,U1)->SD1(SA1), D2(A2,U2)->SD2(SA2)
> 		
> 		Dedication: C1 dedicated to A1, P2 dedicated to D2
> 		Affinity group of type 'ExplicitDedication' for each account is created.
> 
> Tested the following scenarios:		
> 1. A1 deploys a VM with AG of type 'ExplicitDedication' on Z1, VM deployed on H1/H2 
> 2. SA1 deploys a VM with AG of type 'ExplicitDedication' on Z1. VM Deployment failed. H1/H2 cannot be picked, since C1 is dedicated to account A1, not domain.
> 3. SA1 deploys a VM with NO Dedication required. VM deployed on H3. 
> 4. A1/U1/SA1/A2/U2/SA2 deploys a VM with NO Dedication required on Z1, VM deployed on H3.
> 5. U1 deploys a VM with AG of type 'ExplicitDedication' on Z1, VM deployment failed.
> 6. A2 deploys a VM with AG of type 'ExplicitDedication' on Z1, VM deployed on H4.
> 7. SA2 deploys a VM with AG of type 'ExplicitDedication' on Z1, VM deployed on H4. SA2 belongs to SD2 which is a sub-domain of D2.
> 8. Deployment of VM with AG of type 'ExplicitDedication' on zone Z2 will get failed. since nothing is dedicated in Zone Z2
> 
> Tests for Migration of dedicated VMs
> ====================================
> 1. Migrate a non-dedicated VM on dedicated Host:
>      - Alert is Raised
> 2. Migrate a dedicated VM on non-dedicated host : 
>      - Alert is Raised
> 
> 
> Test for HostTags and Explicit Dedication
> =========================================
> 1. Host Tag and AG of type 'ExplicitDedication': both provided
>      - if Host or its cluster/pod/zone is dedicated (to the caller's account/domain) and Host is tagged, then deployment is successful else fail the request.
> 2. Host tag is provided and No dedication is required
>      - Host should be tagged but not dedicated.
> 
> Test for Deletion of domains and accounts
> =========================================
> 1. If an account or a domain has dedicated resources and admin deletes that account/domain, dedication is automatically removed.
>   
> 
> 
> Thanks,
> 
> deepti dohare
> 
>


Re: Review Request: CLOUDSTACK-681: Dedicated Resources - Explicit Dedication, Private zone, pod, cluster or host

Posted by ASF Subversion and Git Services <as...@urd.zones.apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/10797/#review21187
-----------------------------------------------------------


Commit 965c7b9c35fc5680b2f35a8c8fed35c1232a643b in branch refs/heads/master from Prachi Damle <pr...@cloud.com>
[ https://git-wip-us.apache.org/repos/asf?p=cloudstack.git;h=965c7b9 ]

Patch 2: CLOUDSTACK-681: Dedicated Resources - Explicit Dedication, Private zone, pod, cluster or host

Patch 2 for https://reviews.apache.org/r/11379/
Created for files server/src/com/cloud/deploy/DeploymentPlanningManagerImpl.java, server/test/com/cloud/vm/DeploymentPlanningManagerImplTest.java, server/test/org/apache/cloudstack/affinity/AffinityApiUnitTest.java


- ASF Subversion and Git Services


On May 2, 2013, 2:53 p.m., deepti dohare wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/10797/
> -----------------------------------------------------------
> 
> (Updated May 2, 2013, 2:53 p.m.)
> 
> 
> Review request for cloudstack, Devdeep Singh, Prachi Damle, and Nitin Mehta.
> 
> 
> Description
> -------
> 
> Review Request for "Dedicated Resources: Explicit Dedication"
> =============================================================
> 
> Functional Spec for the above Private zone, pod, cluster or host, can be found here: https://cwiki.apache.org/confluence/display/CLOUDSTACK/Dedicated+Resources+-+Private+zone%2C+pod%2C+cluster%2C+host+Functional+Spec
> This patch request is a part of this feature.
> 
> This feature allows a user to deploy VMs only in the resources dedicated to his account or domain.
> 
> 1. Resources(Zones, Pods, Clusters or hosts) can be dedicated to an account or domain.
>    Implemented 12 new APIs to dedicate/list/release resources:
>    - dedicateZone, listDedicatedZones, releaseDedicatedZone for a Zone.
>    - dedicatePod, listDedicatedPods, releaseDedicatedPod for a Pod.
>    - dedicateCluster, listDedicatedClusters, releaseDedicatedCluster for a Cluster
>    - dedicateHost, listDedicatedHosts, releaseDedicatedHost for a Host.
> 2. Once a resource(eg. pod) is dedicated to an account, other resources(eg. clusters/hosts) inside that cannot be further dedicated.
> 3. Once a resource is dedicated to a domain, other resources inside that can be further dedicated to its sub-domain or account.
> 4. If any resource (eg.cluster) is dedicated to a account/domain, then resources(eg. Pod) above that cannot be dedicated to different accounts/domain (not belonging to the same domain) 
> 5. To use Explicit dedication, user needs to create an Affinity Group of type 'ExplicitDedication'
> 6. A VM can be deployed with the above affinity group parameter as an input.
> 7. A new ExplicitDedicationProcessor has been added which will process the affinity group of type 'Explicit Dedication' for a deployment of a VM that demands dedicated resources.
>    This processor implements the AffinityGroupProcessor adapter. This processor will update the avoid list.
> 8. A VM requesting dedication will be deployed on dedicatd resources if available with the user account.
> 9. A VM requesting dedication can also be deployed on the dedicated resources available with the parent domains iff no dedicated resources are available with the current user's account or 
>    domain. 
> 10. A VM (without dedication) can be deployed on shared host but not on dedicated hosts.
> 11. To modify the dedication, the resource has to be release first.
> 12. Existing Private zone functionality has been redirected to Explicit dedication of zones.
> 13. Updated the db upgrade schema script. A new table "dedicated_resources" has been added.
> 14. Added the right permissions in commands.properties
> 15. Unit tests:  For the new APIs and Service, added unit tests under : plugins/dedicated-resources/test/org/apache/cloudstack/dedicated/DedicatedApiUnitTest.java
> 
> 
> This addresses bug CLOUDSTACK-681.
> 
> 
> Diffs
> -----
> 
>   api/src/com/cloud/dc/DedicatedResources.java PRE-CREATION 
>   api/src/com/cloud/event/EventTypes.java 0ee7f40 
>   client/pom.xml a7c7009 
>   client/tomcatconf/applicationContext.xml.in 2e340bf 
>   client/tomcatconf/commands.properties.in b49e1fb 
>   client/tomcatconf/componentContext.xml.in 7a46981 
>   engine/orchestration/src/org/apache/cloudstack/platform/orchestration/CloudOrchestrator.java 963e4d7 
>   plugins/affinity-group-processors/explicit-dedication/pom.xml PRE-CREATION 
>   plugins/affinity-group-processors/explicit-dedication/src/org/apache/cloudstack/affinity/ExplicitDedicationProcessor.java PRE-CREATION 
>   plugins/dedicated-resources/pom.xml PRE-CREATION 
>   plugins/dedicated-resources/src/org/apache/cloudstack/dedicated/api/commands/DedicateClusterCmd.java PRE-CREATION 
>   plugins/dedicated-resources/src/org/apache/cloudstack/dedicated/api/commands/DedicateHostCmd.java PRE-CREATION 
>   plugins/dedicated-resources/src/org/apache/cloudstack/dedicated/api/commands/DedicatePodCmd.java PRE-CREATION 
>   plugins/dedicated-resources/src/org/apache/cloudstack/dedicated/api/commands/DedicateZoneCmd.java PRE-CREATION 
>   plugins/dedicated-resources/src/org/apache/cloudstack/dedicated/api/commands/ListDedicatedClustersCmd.java PRE-CREATION 
>   plugins/dedicated-resources/src/org/apache/cloudstack/dedicated/api/commands/ListDedicatedHostsCmd.java PRE-CREATION 
>   plugins/dedicated-resources/src/org/apache/cloudstack/dedicated/api/commands/ListDedicatedPodsCmd.java PRE-CREATION 
>   plugins/dedicated-resources/src/org/apache/cloudstack/dedicated/api/commands/ListDedicatedZonesCmd.java PRE-CREATION 
>   plugins/dedicated-resources/src/org/apache/cloudstack/dedicated/api/commands/ReleaseDedicatedClusterCmd.java PRE-CREATION 
>   plugins/dedicated-resources/src/org/apache/cloudstack/dedicated/api/commands/ReleaseDedicatedHostCmd.java PRE-CREATION 
>   plugins/dedicated-resources/src/org/apache/cloudstack/dedicated/api/commands/ReleaseDedicatedPodCmd.java PRE-CREATION 
>   plugins/dedicated-resources/src/org/apache/cloudstack/dedicated/api/commands/ReleaseDedicatedZoneCmd.java PRE-CREATION 
>   plugins/dedicated-resources/src/org/apache/cloudstack/dedicated/api/response/DedicateClusterResponse.java PRE-CREATION 
>   plugins/dedicated-resources/src/org/apache/cloudstack/dedicated/api/response/DedicateHostResponse.java PRE-CREATION 
>   plugins/dedicated-resources/src/org/apache/cloudstack/dedicated/api/response/DedicatePodResponse.java PRE-CREATION 
>   plugins/dedicated-resources/src/org/apache/cloudstack/dedicated/api/response/DedicateZoneResponse.java PRE-CREATION 
>   plugins/dedicated-resources/src/org/apache/cloudstack/dedicated/manager/DedicatedResourceManagerImpl.java PRE-CREATION 
>   plugins/dedicated-resources/src/org/apache/cloudstack/dedicated/services/DedicatedService.java PRE-CREATION 
>   plugins/dedicated-resources/test/org/apache/cloudstack/dedicated/DedicatedApiTestConfiguration.java PRE-CREATION 
>   plugins/dedicated-resources/test/org/apache/cloudstack/dedicated/DedicatedApiUnitTest.java PRE-CREATION 
>   plugins/dedicated-resources/test/resource/dedicatedContext.xml PRE-CREATION 
>   plugins/pom.xml b940271 
>   server/src/com/cloud/api/query/QueryManagerImpl.java 50018e5 
>   server/src/com/cloud/configuration/ConfigurationManagerImpl.java 37ca793 
>   server/src/com/cloud/dc/DedicatedResourceVO.java PRE-CREATION 
>   server/src/com/cloud/dc/dao/ClusterDao.java 3ce0798 
>   server/src/com/cloud/dc/dao/ClusterDaoImpl.java 86dc65e 
>   server/src/com/cloud/dc/dao/DedicatedResourceDao.java PRE-CREATION 
>   server/src/com/cloud/dc/dao/DedicatedResourceDaoImpl.java PRE-CREATION 
>   server/src/com/cloud/deploy/DeploymentPlanningManagerImpl.java c7162a2 
>   server/src/com/cloud/domain/dao/DomainDaoImpl.java c30ca5e 
>   server/src/com/cloud/host/dao/HostDao.java 98bdcb4 
>   server/src/com/cloud/host/dao/HostDaoImpl.java 07a4232 
>   server/src/com/cloud/resource/ResourceManagerImpl.java c9c3f9c 
>   server/src/com/cloud/user/AccountManagerImpl.java 8de73fb 
>   server/src/com/cloud/user/DomainManagerImpl.java dbcbe4e 
>   server/src/com/cloud/vm/UserVmManagerImpl.java 6179948 
>   server/test/org/apache/cloudstack/affinity/AffinityApiTestConfiguration.java 4dd6ad7 
>   server/test/org/apache/cloudstack/networkoffering/ChildTestConfiguration.java 709dfe2 
>   server/test/resources/affinityContext.xml 15476c1 
>   setup/db/create-schema.sql b1feb02 
>   setup/db/db/schema-410to420.sql 99b476d 
> 
> Diff: https://reviews.apache.org/r/10797/diff/
> 
> 
> Testing
> -------
> 
> Unit tests:  
> For the new APIs and Service, added unit tests under: plugins/dedicated-resources/test/org/apache/cloudstack/dedicated/DedicatedApiUnitTest.java
> The tests validates the APIs: dedication of zone, pod, cluster and hosts. Also added negative tests for the scenarios.
> 
> Manual Testing Done
> 
> Tests for DeployVirtualMachine
> ==============================
> Setup : 2 zones Z1 and Z2 , infrastructure:
>         Z1->(P1,P2), P1->(C1,C2), C1->(H1,H2), C2->H3, P2->C3, C3->H4  
>         Z2-> P3, P3->C4, C4->H5
> 	
> 	    domain(account) -> sub-domain(account)
>         D1(A1,U1)->SD1(SA1), D2(A2,U2)->SD2(SA2)
> 		
> 		Dedication: C1 dedicated to A1, P2 dedicated to D2
> 		Affinity group of type 'ExplicitDedication' for each account is created.
> 
> Tested the following scenarios:		
> 1. A1 deploys a VM with AG of type 'ExplicitDedication' on Z1, VM deployed on H1/H2 
> 2. SA1 deploys a VM with AG of type 'ExplicitDedication' on Z1. VM Deployment failed. H1/H2 cannot be picked, since C1 is dedicated to account A1, not domain.
> 3. SA1 deploys a VM with NO Dedication required. VM deployed on H3. 
> 4. A1/U1/SA1/A2/U2/SA2 deploys a VM with NO Dedication required on Z1, VM deployed on H3.
> 5. U1 deploys a VM with AG of type 'ExplicitDedication' on Z1, VM deployment failed.
> 6. A2 deploys a VM with AG of type 'ExplicitDedication' on Z1, VM deployed on H4.
> 7. SA2 deploys a VM with AG of type 'ExplicitDedication' on Z1, VM deployed on H4. SA2 belongs to SD2 which is a sub-domain of D2.
> 8. Deployment of VM with AG of type 'ExplicitDedication' on zone Z2 will get failed. since nothing is dedicated in Zone Z2
> 
> Tests for Migration of dedicated VMs
> ====================================
> 1. Migrate a non-dedicated VM on dedicated Host:
>      - Alert is Raised
> 2. Migrate a dedicated VM on non-dedicated host : 
>      - Alert is Raised
> 
> 
> Test for HostTags and Explicit Dedication
> =========================================
> 1. Host Tag and AG of type 'ExplicitDedication': both provided
>      - if Host or its cluster/pod/zone is dedicated (to the caller's account/domain) and Host is tagged, then deployment is successful else fail the request.
> 2. Host tag is provided and No dedication is required
>      - Host should be tagged but not dedicated.
> 
> Test for Deletion of domains and accounts
> =========================================
> 1. If an account or a domain has dedicated resources and admin deletes that account/domain, dedication is automatically removed.
>   
> 
> 
> Thanks,
> 
> deepti dohare
> 
>


Re: Review Request: CLOUDSTACK-681: Dedicated Resources - Explicit Dedication, Private zone, pod, cluster or host

Posted by Prachi Damle <pr...@citrix.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/10797/#review20775
-----------------------------------------------------------


One more change we should make to all APIs:
- I see that most of the APIs are exposing accoutnID as an input parameter. CS has the convention of always using the pair domainId+ accountName to pass account information and never expose the accountId.
- Please change the APIs to not take in accountID directly.


- Prachi Damle


On May 2, 2013, 2:53 p.m., deepti dohare wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/10797/
> -----------------------------------------------------------
> 
> (Updated May 2, 2013, 2:53 p.m.)
> 
> 
> Review request for cloudstack, Devdeep Singh, Prachi Damle, and Nitin Mehta.
> 
> 
> Description
> -------
> 
> Review Request for "Dedicated Resources: Explicit Dedication"
> =============================================================
> 
> Functional Spec for the above Private zone, pod, cluster or host, can be found here: https://cwiki.apache.org/confluence/display/CLOUDSTACK/Dedicated+Resources+-+Private+zone%2C+pod%2C+cluster%2C+host+Functional+Spec
> This patch request is a part of this feature.
> 
> This feature allows a user to deploy VMs only in the resources dedicated to his account or domain.
> 
> 1. Resources(Zones, Pods, Clusters or hosts) can be dedicated to an account or domain.
>    Implemented 12 new APIs to dedicate/list/release resources:
>    - dedicateZone, listDedicatedZones, releaseDedicatedZone for a Zone.
>    - dedicatePod, listDedicatedPods, releaseDedicatedPod for a Pod.
>    - dedicateCluster, listDedicatedClusters, releaseDedicatedCluster for a Cluster
>    - dedicateHost, listDedicatedHosts, releaseDedicatedHost for a Host.
> 2. Once a resource(eg. pod) is dedicated to an account, other resources(eg. clusters/hosts) inside that cannot be further dedicated.
> 3. Once a resource is dedicated to a domain, other resources inside that can be further dedicated to its sub-domain or account.
> 4. If any resource (eg.cluster) is dedicated to a account/domain, then resources(eg. Pod) above that cannot be dedicated to different accounts/domain (not belonging to the same domain) 
> 5. To use Explicit dedication, user needs to create an Affinity Group of type 'ExplicitDedication'
> 6. A VM can be deployed with the above affinity group parameter as an input.
> 7. A new ExplicitDedicationProcessor has been added which will process the affinity group of type 'Explicit Dedication' for a deployment of a VM that demands dedicated resources.
>    This processor implements the AffinityGroupProcessor adapter. This processor will update the avoid list.
> 8. A VM requesting dedication will be deployed on dedicatd resources if available with the user account.
> 9. A VM requesting dedication can also be deployed on the dedicated resources available with the parent domains iff no dedicated resources are available with the current user's account or 
>    domain. 
> 10. A VM (without dedication) can be deployed on shared host but not on dedicated hosts.
> 11. To modify the dedication, the resource has to be release first.
> 12. Existing Private zone functionality has been redirected to Explicit dedication of zones.
> 13. Updated the db upgrade schema script. A new table "dedicated_resources" has been added.
> 14. Added the right permissions in commands.properties
> 15. Unit tests:  For the new APIs and Service, added unit tests under : plugins/dedicated-resources/test/org/apache/cloudstack/dedicated/DedicatedApiUnitTest.java
> 
> 
> This addresses bug CLOUDSTACK-681.
> 
> 
> Diffs
> -----
> 
>   api/src/com/cloud/dc/DedicatedResources.java PRE-CREATION 
>   api/src/com/cloud/event/EventTypes.java 0ee7f40 
>   client/pom.xml a7c7009 
>   client/tomcatconf/applicationContext.xml.in 2e340bf 
>   client/tomcatconf/commands.properties.in b49e1fb 
>   client/tomcatconf/componentContext.xml.in 7a46981 
>   engine/orchestration/src/org/apache/cloudstack/platform/orchestration/CloudOrchestrator.java 963e4d7 
>   plugins/affinity-group-processors/explicit-dedication/pom.xml PRE-CREATION 
>   plugins/affinity-group-processors/explicit-dedication/src/org/apache/cloudstack/affinity/ExplicitDedicationProcessor.java PRE-CREATION 
>   plugins/dedicated-resources/pom.xml PRE-CREATION 
>   plugins/dedicated-resources/src/org/apache/cloudstack/dedicated/api/commands/DedicateClusterCmd.java PRE-CREATION 
>   plugins/dedicated-resources/src/org/apache/cloudstack/dedicated/api/commands/DedicateHostCmd.java PRE-CREATION 
>   plugins/dedicated-resources/src/org/apache/cloudstack/dedicated/api/commands/DedicatePodCmd.java PRE-CREATION 
>   plugins/dedicated-resources/src/org/apache/cloudstack/dedicated/api/commands/DedicateZoneCmd.java PRE-CREATION 
>   plugins/dedicated-resources/src/org/apache/cloudstack/dedicated/api/commands/ListDedicatedClustersCmd.java PRE-CREATION 
>   plugins/dedicated-resources/src/org/apache/cloudstack/dedicated/api/commands/ListDedicatedHostsCmd.java PRE-CREATION 
>   plugins/dedicated-resources/src/org/apache/cloudstack/dedicated/api/commands/ListDedicatedPodsCmd.java PRE-CREATION 
>   plugins/dedicated-resources/src/org/apache/cloudstack/dedicated/api/commands/ListDedicatedZonesCmd.java PRE-CREATION 
>   plugins/dedicated-resources/src/org/apache/cloudstack/dedicated/api/commands/ReleaseDedicatedClusterCmd.java PRE-CREATION 
>   plugins/dedicated-resources/src/org/apache/cloudstack/dedicated/api/commands/ReleaseDedicatedHostCmd.java PRE-CREATION 
>   plugins/dedicated-resources/src/org/apache/cloudstack/dedicated/api/commands/ReleaseDedicatedPodCmd.java PRE-CREATION 
>   plugins/dedicated-resources/src/org/apache/cloudstack/dedicated/api/commands/ReleaseDedicatedZoneCmd.java PRE-CREATION 
>   plugins/dedicated-resources/src/org/apache/cloudstack/dedicated/api/response/DedicateClusterResponse.java PRE-CREATION 
>   plugins/dedicated-resources/src/org/apache/cloudstack/dedicated/api/response/DedicateHostResponse.java PRE-CREATION 
>   plugins/dedicated-resources/src/org/apache/cloudstack/dedicated/api/response/DedicatePodResponse.java PRE-CREATION 
>   plugins/dedicated-resources/src/org/apache/cloudstack/dedicated/api/response/DedicateZoneResponse.java PRE-CREATION 
>   plugins/dedicated-resources/src/org/apache/cloudstack/dedicated/manager/DedicatedResourceManagerImpl.java PRE-CREATION 
>   plugins/dedicated-resources/src/org/apache/cloudstack/dedicated/services/DedicatedService.java PRE-CREATION 
>   plugins/dedicated-resources/test/org/apache/cloudstack/dedicated/DedicatedApiTestConfiguration.java PRE-CREATION 
>   plugins/dedicated-resources/test/org/apache/cloudstack/dedicated/DedicatedApiUnitTest.java PRE-CREATION 
>   plugins/dedicated-resources/test/resource/dedicatedContext.xml PRE-CREATION 
>   plugins/pom.xml b940271 
>   server/src/com/cloud/api/query/QueryManagerImpl.java 50018e5 
>   server/src/com/cloud/configuration/ConfigurationManagerImpl.java 37ca793 
>   server/src/com/cloud/dc/DedicatedResourceVO.java PRE-CREATION 
>   server/src/com/cloud/dc/dao/ClusterDao.java 3ce0798 
>   server/src/com/cloud/dc/dao/ClusterDaoImpl.java 86dc65e 
>   server/src/com/cloud/dc/dao/DedicatedResourceDao.java PRE-CREATION 
>   server/src/com/cloud/dc/dao/DedicatedResourceDaoImpl.java PRE-CREATION 
>   server/src/com/cloud/deploy/DeploymentPlanningManagerImpl.java c7162a2 
>   server/src/com/cloud/domain/dao/DomainDaoImpl.java c30ca5e 
>   server/src/com/cloud/host/dao/HostDao.java 98bdcb4 
>   server/src/com/cloud/host/dao/HostDaoImpl.java 07a4232 
>   server/src/com/cloud/resource/ResourceManagerImpl.java c9c3f9c 
>   server/src/com/cloud/user/AccountManagerImpl.java 8de73fb 
>   server/src/com/cloud/user/DomainManagerImpl.java dbcbe4e 
>   server/src/com/cloud/vm/UserVmManagerImpl.java 6179948 
>   server/test/org/apache/cloudstack/affinity/AffinityApiTestConfiguration.java 4dd6ad7 
>   server/test/org/apache/cloudstack/networkoffering/ChildTestConfiguration.java 709dfe2 
>   server/test/resources/affinityContext.xml 15476c1 
>   setup/db/create-schema.sql b1feb02 
>   setup/db/db/schema-410to420.sql 99b476d 
> 
> Diff: https://reviews.apache.org/r/10797/diff/
> 
> 
> Testing
> -------
> 
> Unit tests:  
> For the new APIs and Service, added unit tests under: plugins/dedicated-resources/test/org/apache/cloudstack/dedicated/DedicatedApiUnitTest.java
> The tests validates the APIs: dedication of zone, pod, cluster and hosts. Also added negative tests for the scenarios.
> 
> Manual Testing Done
> 
> Tests for DeployVirtualMachine
> ==============================
> Setup : 2 zones Z1 and Z2 , infrastructure:
>         Z1->(P1,P2), P1->(C1,C2), C1->(H1,H2), C2->H3, P2->C3, C3->H4  
>         Z2-> P3, P3->C4, C4->H5
> 	
> 	    domain(account) -> sub-domain(account)
>         D1(A1,U1)->SD1(SA1), D2(A2,U2)->SD2(SA2)
> 		
> 		Dedication: C1 dedicated to A1, P2 dedicated to D2
> 		Affinity group of type 'ExplicitDedication' for each account is created.
> 
> Tested the following scenarios:		
> 1. A1 deploys a VM with AG of type 'ExplicitDedication' on Z1, VM deployed on H1/H2 
> 2. SA1 deploys a VM with AG of type 'ExplicitDedication' on Z1. VM Deployment failed. H1/H2 cannot be picked, since C1 is dedicated to account A1, not domain.
> 3. SA1 deploys a VM with NO Dedication required. VM deployed on H3. 
> 4. A1/U1/SA1/A2/U2/SA2 deploys a VM with NO Dedication required on Z1, VM deployed on H3.
> 5. U1 deploys a VM with AG of type 'ExplicitDedication' on Z1, VM deployment failed.
> 6. A2 deploys a VM with AG of type 'ExplicitDedication' on Z1, VM deployed on H4.
> 7. SA2 deploys a VM with AG of type 'ExplicitDedication' on Z1, VM deployed on H4. SA2 belongs to SD2 which is a sub-domain of D2.
> 8. Deployment of VM with AG of type 'ExplicitDedication' on zone Z2 will get failed. since nothing is dedicated in Zone Z2
> 
> Tests for Migration of dedicated VMs
> ====================================
> 1. Migrate a non-dedicated VM on dedicated Host:
>      - Alert is Raised
> 2. Migrate a dedicated VM on non-dedicated host : 
>      - Alert is Raised
> 
> 
> Test for HostTags and Explicit Dedication
> =========================================
> 1. Host Tag and AG of type 'ExplicitDedication': both provided
>      - if Host or its cluster/pod/zone is dedicated (to the caller's account/domain) and Host is tagged, then deployment is successful else fail the request.
> 2. Host tag is provided and No dedication is required
>      - Host should be tagged but not dedicated.
> 
> Test for Deletion of domains and accounts
> =========================================
> 1. If an account or a domain has dedicated resources and admin deletes that account/domain, dedication is automatically removed.
>   
> 
> 
> Thanks,
> 
> deepti dohare
> 
>


Re: Review Request: CLOUDSTACK-681: Dedicated Resources - Explicit Dedication, Private zone, pod, cluster or host

Posted by ASF Subversion and Git Services <as...@urd.zones.apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/10797/#review20894
-----------------------------------------------------------


Commit 49e39e51f2bd39c1e5cd60389f4433d58f9415bc in branch refs/heads/vmware-datamodel from Pranav Saxena <pr...@citrix.com>
[ https://git-wip-us.apache.org/repos/asf?p=cloudstack.git;h=49e39e5 ]

CLOUDSTACK-681:Implicit Dedication UI support


- ASF Subversion and Git Services


On May 2, 2013, 2:53 p.m., deepti dohare wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/10797/
> -----------------------------------------------------------
> 
> (Updated May 2, 2013, 2:53 p.m.)
> 
> 
> Review request for cloudstack, Devdeep Singh, Prachi Damle, and Nitin Mehta.
> 
> 
> Description
> -------
> 
> Review Request for "Dedicated Resources: Explicit Dedication"
> =============================================================
> 
> Functional Spec for the above Private zone, pod, cluster or host, can be found here: https://cwiki.apache.org/confluence/display/CLOUDSTACK/Dedicated+Resources+-+Private+zone%2C+pod%2C+cluster%2C+host+Functional+Spec
> This patch request is a part of this feature.
> 
> This feature allows a user to deploy VMs only in the resources dedicated to his account or domain.
> 
> 1. Resources(Zones, Pods, Clusters or hosts) can be dedicated to an account or domain.
>    Implemented 12 new APIs to dedicate/list/release resources:
>    - dedicateZone, listDedicatedZones, releaseDedicatedZone for a Zone.
>    - dedicatePod, listDedicatedPods, releaseDedicatedPod for a Pod.
>    - dedicateCluster, listDedicatedClusters, releaseDedicatedCluster for a Cluster
>    - dedicateHost, listDedicatedHosts, releaseDedicatedHost for a Host.
> 2. Once a resource(eg. pod) is dedicated to an account, other resources(eg. clusters/hosts) inside that cannot be further dedicated.
> 3. Once a resource is dedicated to a domain, other resources inside that can be further dedicated to its sub-domain or account.
> 4. If any resource (eg.cluster) is dedicated to a account/domain, then resources(eg. Pod) above that cannot be dedicated to different accounts/domain (not belonging to the same domain) 
> 5. To use Explicit dedication, user needs to create an Affinity Group of type 'ExplicitDedication'
> 6. A VM can be deployed with the above affinity group parameter as an input.
> 7. A new ExplicitDedicationProcessor has been added which will process the affinity group of type 'Explicit Dedication' for a deployment of a VM that demands dedicated resources.
>    This processor implements the AffinityGroupProcessor adapter. This processor will update the avoid list.
> 8. A VM requesting dedication will be deployed on dedicatd resources if available with the user account.
> 9. A VM requesting dedication can also be deployed on the dedicated resources available with the parent domains iff no dedicated resources are available with the current user's account or 
>    domain. 
> 10. A VM (without dedication) can be deployed on shared host but not on dedicated hosts.
> 11. To modify the dedication, the resource has to be release first.
> 12. Existing Private zone functionality has been redirected to Explicit dedication of zones.
> 13. Updated the db upgrade schema script. A new table "dedicated_resources" has been added.
> 14. Added the right permissions in commands.properties
> 15. Unit tests:  For the new APIs and Service, added unit tests under : plugins/dedicated-resources/test/org/apache/cloudstack/dedicated/DedicatedApiUnitTest.java
> 
> 
> This addresses bug CLOUDSTACK-681.
> 
> 
> Diffs
> -----
> 
>   api/src/com/cloud/dc/DedicatedResources.java PRE-CREATION 
>   api/src/com/cloud/event/EventTypes.java 0ee7f40 
>   client/pom.xml a7c7009 
>   client/tomcatconf/applicationContext.xml.in 2e340bf 
>   client/tomcatconf/commands.properties.in b49e1fb 
>   client/tomcatconf/componentContext.xml.in 7a46981 
>   engine/orchestration/src/org/apache/cloudstack/platform/orchestration/CloudOrchestrator.java 963e4d7 
>   plugins/affinity-group-processors/explicit-dedication/pom.xml PRE-CREATION 
>   plugins/affinity-group-processors/explicit-dedication/src/org/apache/cloudstack/affinity/ExplicitDedicationProcessor.java PRE-CREATION 
>   plugins/dedicated-resources/pom.xml PRE-CREATION 
>   plugins/dedicated-resources/src/org/apache/cloudstack/dedicated/api/commands/DedicateClusterCmd.java PRE-CREATION 
>   plugins/dedicated-resources/src/org/apache/cloudstack/dedicated/api/commands/DedicateHostCmd.java PRE-CREATION 
>   plugins/dedicated-resources/src/org/apache/cloudstack/dedicated/api/commands/DedicatePodCmd.java PRE-CREATION 
>   plugins/dedicated-resources/src/org/apache/cloudstack/dedicated/api/commands/DedicateZoneCmd.java PRE-CREATION 
>   plugins/dedicated-resources/src/org/apache/cloudstack/dedicated/api/commands/ListDedicatedClustersCmd.java PRE-CREATION 
>   plugins/dedicated-resources/src/org/apache/cloudstack/dedicated/api/commands/ListDedicatedHostsCmd.java PRE-CREATION 
>   plugins/dedicated-resources/src/org/apache/cloudstack/dedicated/api/commands/ListDedicatedPodsCmd.java PRE-CREATION 
>   plugins/dedicated-resources/src/org/apache/cloudstack/dedicated/api/commands/ListDedicatedZonesCmd.java PRE-CREATION 
>   plugins/dedicated-resources/src/org/apache/cloudstack/dedicated/api/commands/ReleaseDedicatedClusterCmd.java PRE-CREATION 
>   plugins/dedicated-resources/src/org/apache/cloudstack/dedicated/api/commands/ReleaseDedicatedHostCmd.java PRE-CREATION 
>   plugins/dedicated-resources/src/org/apache/cloudstack/dedicated/api/commands/ReleaseDedicatedPodCmd.java PRE-CREATION 
>   plugins/dedicated-resources/src/org/apache/cloudstack/dedicated/api/commands/ReleaseDedicatedZoneCmd.java PRE-CREATION 
>   plugins/dedicated-resources/src/org/apache/cloudstack/dedicated/api/response/DedicateClusterResponse.java PRE-CREATION 
>   plugins/dedicated-resources/src/org/apache/cloudstack/dedicated/api/response/DedicateHostResponse.java PRE-CREATION 
>   plugins/dedicated-resources/src/org/apache/cloudstack/dedicated/api/response/DedicatePodResponse.java PRE-CREATION 
>   plugins/dedicated-resources/src/org/apache/cloudstack/dedicated/api/response/DedicateZoneResponse.java PRE-CREATION 
>   plugins/dedicated-resources/src/org/apache/cloudstack/dedicated/manager/DedicatedResourceManagerImpl.java PRE-CREATION 
>   plugins/dedicated-resources/src/org/apache/cloudstack/dedicated/services/DedicatedService.java PRE-CREATION 
>   plugins/dedicated-resources/test/org/apache/cloudstack/dedicated/DedicatedApiTestConfiguration.java PRE-CREATION 
>   plugins/dedicated-resources/test/org/apache/cloudstack/dedicated/DedicatedApiUnitTest.java PRE-CREATION 
>   plugins/dedicated-resources/test/resource/dedicatedContext.xml PRE-CREATION 
>   plugins/pom.xml b940271 
>   server/src/com/cloud/api/query/QueryManagerImpl.java 50018e5 
>   server/src/com/cloud/configuration/ConfigurationManagerImpl.java 37ca793 
>   server/src/com/cloud/dc/DedicatedResourceVO.java PRE-CREATION 
>   server/src/com/cloud/dc/dao/ClusterDao.java 3ce0798 
>   server/src/com/cloud/dc/dao/ClusterDaoImpl.java 86dc65e 
>   server/src/com/cloud/dc/dao/DedicatedResourceDao.java PRE-CREATION 
>   server/src/com/cloud/dc/dao/DedicatedResourceDaoImpl.java PRE-CREATION 
>   server/src/com/cloud/deploy/DeploymentPlanningManagerImpl.java c7162a2 
>   server/src/com/cloud/domain/dao/DomainDaoImpl.java c30ca5e 
>   server/src/com/cloud/host/dao/HostDao.java 98bdcb4 
>   server/src/com/cloud/host/dao/HostDaoImpl.java 07a4232 
>   server/src/com/cloud/resource/ResourceManagerImpl.java c9c3f9c 
>   server/src/com/cloud/user/AccountManagerImpl.java 8de73fb 
>   server/src/com/cloud/user/DomainManagerImpl.java dbcbe4e 
>   server/src/com/cloud/vm/UserVmManagerImpl.java 6179948 
>   server/test/org/apache/cloudstack/affinity/AffinityApiTestConfiguration.java 4dd6ad7 
>   server/test/org/apache/cloudstack/networkoffering/ChildTestConfiguration.java 709dfe2 
>   server/test/resources/affinityContext.xml 15476c1 
>   setup/db/create-schema.sql b1feb02 
>   setup/db/db/schema-410to420.sql 99b476d 
> 
> Diff: https://reviews.apache.org/r/10797/diff/
> 
> 
> Testing
> -------
> 
> Unit tests:  
> For the new APIs and Service, added unit tests under: plugins/dedicated-resources/test/org/apache/cloudstack/dedicated/DedicatedApiUnitTest.java
> The tests validates the APIs: dedication of zone, pod, cluster and hosts. Also added negative tests for the scenarios.
> 
> Manual Testing Done
> 
> Tests for DeployVirtualMachine
> ==============================
> Setup : 2 zones Z1 and Z2 , infrastructure:
>         Z1->(P1,P2), P1->(C1,C2), C1->(H1,H2), C2->H3, P2->C3, C3->H4  
>         Z2-> P3, P3->C4, C4->H5
> 	
> 	    domain(account) -> sub-domain(account)
>         D1(A1,U1)->SD1(SA1), D2(A2,U2)->SD2(SA2)
> 		
> 		Dedication: C1 dedicated to A1, P2 dedicated to D2
> 		Affinity group of type 'ExplicitDedication' for each account is created.
> 
> Tested the following scenarios:		
> 1. A1 deploys a VM with AG of type 'ExplicitDedication' on Z1, VM deployed on H1/H2 
> 2. SA1 deploys a VM with AG of type 'ExplicitDedication' on Z1. VM Deployment failed. H1/H2 cannot be picked, since C1 is dedicated to account A1, not domain.
> 3. SA1 deploys a VM with NO Dedication required. VM deployed on H3. 
> 4. A1/U1/SA1/A2/U2/SA2 deploys a VM with NO Dedication required on Z1, VM deployed on H3.
> 5. U1 deploys a VM with AG of type 'ExplicitDedication' on Z1, VM deployment failed.
> 6. A2 deploys a VM with AG of type 'ExplicitDedication' on Z1, VM deployed on H4.
> 7. SA2 deploys a VM with AG of type 'ExplicitDedication' on Z1, VM deployed on H4. SA2 belongs to SD2 which is a sub-domain of D2.
> 8. Deployment of VM with AG of type 'ExplicitDedication' on zone Z2 will get failed. since nothing is dedicated in Zone Z2
> 
> Tests for Migration of dedicated VMs
> ====================================
> 1. Migrate a non-dedicated VM on dedicated Host:
>      - Alert is Raised
> 2. Migrate a dedicated VM on non-dedicated host : 
>      - Alert is Raised
> 
> 
> Test for HostTags and Explicit Dedication
> =========================================
> 1. Host Tag and AG of type 'ExplicitDedication': both provided
>      - if Host or its cluster/pod/zone is dedicated (to the caller's account/domain) and Host is tagged, then deployment is successful else fail the request.
> 2. Host tag is provided and No dedication is required
>      - Host should be tagged but not dedicated.
> 
> Test for Deletion of domains and accounts
> =========================================
> 1. If an account or a domain has dedicated resources and admin deletes that account/domain, dedication is automatically removed.
>   
> 
> 
> Thanks,
> 
> deepti dohare
> 
>


Re: Review Request: CLOUDSTACK-681: Dedicated Resources - Explicit Dedication, Private zone, pod, cluster or host

Posted by Prachi Damle <pr...@citrix.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/10797/#review20776
-----------------------------------------------------------


Also, the patch is failing on latest master, please can you create an updated patch.

- Prachi Damle


On May 2, 2013, 2:53 p.m., deepti dohare wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/10797/
> -----------------------------------------------------------
> 
> (Updated May 2, 2013, 2:53 p.m.)
> 
> 
> Review request for cloudstack, Devdeep Singh, Prachi Damle, and Nitin Mehta.
> 
> 
> Description
> -------
> 
> Review Request for "Dedicated Resources: Explicit Dedication"
> =============================================================
> 
> Functional Spec for the above Private zone, pod, cluster or host, can be found here: https://cwiki.apache.org/confluence/display/CLOUDSTACK/Dedicated+Resources+-+Private+zone%2C+pod%2C+cluster%2C+host+Functional+Spec
> This patch request is a part of this feature.
> 
> This feature allows a user to deploy VMs only in the resources dedicated to his account or domain.
> 
> 1. Resources(Zones, Pods, Clusters or hosts) can be dedicated to an account or domain.
>    Implemented 12 new APIs to dedicate/list/release resources:
>    - dedicateZone, listDedicatedZones, releaseDedicatedZone for a Zone.
>    - dedicatePod, listDedicatedPods, releaseDedicatedPod for a Pod.
>    - dedicateCluster, listDedicatedClusters, releaseDedicatedCluster for a Cluster
>    - dedicateHost, listDedicatedHosts, releaseDedicatedHost for a Host.
> 2. Once a resource(eg. pod) is dedicated to an account, other resources(eg. clusters/hosts) inside that cannot be further dedicated.
> 3. Once a resource is dedicated to a domain, other resources inside that can be further dedicated to its sub-domain or account.
> 4. If any resource (eg.cluster) is dedicated to a account/domain, then resources(eg. Pod) above that cannot be dedicated to different accounts/domain (not belonging to the same domain) 
> 5. To use Explicit dedication, user needs to create an Affinity Group of type 'ExplicitDedication'
> 6. A VM can be deployed with the above affinity group parameter as an input.
> 7. A new ExplicitDedicationProcessor has been added which will process the affinity group of type 'Explicit Dedication' for a deployment of a VM that demands dedicated resources.
>    This processor implements the AffinityGroupProcessor adapter. This processor will update the avoid list.
> 8. A VM requesting dedication will be deployed on dedicatd resources if available with the user account.
> 9. A VM requesting dedication can also be deployed on the dedicated resources available with the parent domains iff no dedicated resources are available with the current user's account or 
>    domain. 
> 10. A VM (without dedication) can be deployed on shared host but not on dedicated hosts.
> 11. To modify the dedication, the resource has to be release first.
> 12. Existing Private zone functionality has been redirected to Explicit dedication of zones.
> 13. Updated the db upgrade schema script. A new table "dedicated_resources" has been added.
> 14. Added the right permissions in commands.properties
> 15. Unit tests:  For the new APIs and Service, added unit tests under : plugins/dedicated-resources/test/org/apache/cloudstack/dedicated/DedicatedApiUnitTest.java
> 
> 
> This addresses bug CLOUDSTACK-681.
> 
> 
> Diffs
> -----
> 
>   api/src/com/cloud/dc/DedicatedResources.java PRE-CREATION 
>   api/src/com/cloud/event/EventTypes.java 0ee7f40 
>   client/pom.xml a7c7009 
>   client/tomcatconf/applicationContext.xml.in 2e340bf 
>   client/tomcatconf/commands.properties.in b49e1fb 
>   client/tomcatconf/componentContext.xml.in 7a46981 
>   engine/orchestration/src/org/apache/cloudstack/platform/orchestration/CloudOrchestrator.java 963e4d7 
>   plugins/affinity-group-processors/explicit-dedication/pom.xml PRE-CREATION 
>   plugins/affinity-group-processors/explicit-dedication/src/org/apache/cloudstack/affinity/ExplicitDedicationProcessor.java PRE-CREATION 
>   plugins/dedicated-resources/pom.xml PRE-CREATION 
>   plugins/dedicated-resources/src/org/apache/cloudstack/dedicated/api/commands/DedicateClusterCmd.java PRE-CREATION 
>   plugins/dedicated-resources/src/org/apache/cloudstack/dedicated/api/commands/DedicateHostCmd.java PRE-CREATION 
>   plugins/dedicated-resources/src/org/apache/cloudstack/dedicated/api/commands/DedicatePodCmd.java PRE-CREATION 
>   plugins/dedicated-resources/src/org/apache/cloudstack/dedicated/api/commands/DedicateZoneCmd.java PRE-CREATION 
>   plugins/dedicated-resources/src/org/apache/cloudstack/dedicated/api/commands/ListDedicatedClustersCmd.java PRE-CREATION 
>   plugins/dedicated-resources/src/org/apache/cloudstack/dedicated/api/commands/ListDedicatedHostsCmd.java PRE-CREATION 
>   plugins/dedicated-resources/src/org/apache/cloudstack/dedicated/api/commands/ListDedicatedPodsCmd.java PRE-CREATION 
>   plugins/dedicated-resources/src/org/apache/cloudstack/dedicated/api/commands/ListDedicatedZonesCmd.java PRE-CREATION 
>   plugins/dedicated-resources/src/org/apache/cloudstack/dedicated/api/commands/ReleaseDedicatedClusterCmd.java PRE-CREATION 
>   plugins/dedicated-resources/src/org/apache/cloudstack/dedicated/api/commands/ReleaseDedicatedHostCmd.java PRE-CREATION 
>   plugins/dedicated-resources/src/org/apache/cloudstack/dedicated/api/commands/ReleaseDedicatedPodCmd.java PRE-CREATION 
>   plugins/dedicated-resources/src/org/apache/cloudstack/dedicated/api/commands/ReleaseDedicatedZoneCmd.java PRE-CREATION 
>   plugins/dedicated-resources/src/org/apache/cloudstack/dedicated/api/response/DedicateClusterResponse.java PRE-CREATION 
>   plugins/dedicated-resources/src/org/apache/cloudstack/dedicated/api/response/DedicateHostResponse.java PRE-CREATION 
>   plugins/dedicated-resources/src/org/apache/cloudstack/dedicated/api/response/DedicatePodResponse.java PRE-CREATION 
>   plugins/dedicated-resources/src/org/apache/cloudstack/dedicated/api/response/DedicateZoneResponse.java PRE-CREATION 
>   plugins/dedicated-resources/src/org/apache/cloudstack/dedicated/manager/DedicatedResourceManagerImpl.java PRE-CREATION 
>   plugins/dedicated-resources/src/org/apache/cloudstack/dedicated/services/DedicatedService.java PRE-CREATION 
>   plugins/dedicated-resources/test/org/apache/cloudstack/dedicated/DedicatedApiTestConfiguration.java PRE-CREATION 
>   plugins/dedicated-resources/test/org/apache/cloudstack/dedicated/DedicatedApiUnitTest.java PRE-CREATION 
>   plugins/dedicated-resources/test/resource/dedicatedContext.xml PRE-CREATION 
>   plugins/pom.xml b940271 
>   server/src/com/cloud/api/query/QueryManagerImpl.java 50018e5 
>   server/src/com/cloud/configuration/ConfigurationManagerImpl.java 37ca793 
>   server/src/com/cloud/dc/DedicatedResourceVO.java PRE-CREATION 
>   server/src/com/cloud/dc/dao/ClusterDao.java 3ce0798 
>   server/src/com/cloud/dc/dao/ClusterDaoImpl.java 86dc65e 
>   server/src/com/cloud/dc/dao/DedicatedResourceDao.java PRE-CREATION 
>   server/src/com/cloud/dc/dao/DedicatedResourceDaoImpl.java PRE-CREATION 
>   server/src/com/cloud/deploy/DeploymentPlanningManagerImpl.java c7162a2 
>   server/src/com/cloud/domain/dao/DomainDaoImpl.java c30ca5e 
>   server/src/com/cloud/host/dao/HostDao.java 98bdcb4 
>   server/src/com/cloud/host/dao/HostDaoImpl.java 07a4232 
>   server/src/com/cloud/resource/ResourceManagerImpl.java c9c3f9c 
>   server/src/com/cloud/user/AccountManagerImpl.java 8de73fb 
>   server/src/com/cloud/user/DomainManagerImpl.java dbcbe4e 
>   server/src/com/cloud/vm/UserVmManagerImpl.java 6179948 
>   server/test/org/apache/cloudstack/affinity/AffinityApiTestConfiguration.java 4dd6ad7 
>   server/test/org/apache/cloudstack/networkoffering/ChildTestConfiguration.java 709dfe2 
>   server/test/resources/affinityContext.xml 15476c1 
>   setup/db/create-schema.sql b1feb02 
>   setup/db/db/schema-410to420.sql 99b476d 
> 
> Diff: https://reviews.apache.org/r/10797/diff/
> 
> 
> Testing
> -------
> 
> Unit tests:  
> For the new APIs and Service, added unit tests under: plugins/dedicated-resources/test/org/apache/cloudstack/dedicated/DedicatedApiUnitTest.java
> The tests validates the APIs: dedication of zone, pod, cluster and hosts. Also added negative tests for the scenarios.
> 
> Manual Testing Done
> 
> Tests for DeployVirtualMachine
> ==============================
> Setup : 2 zones Z1 and Z2 , infrastructure:
>         Z1->(P1,P2), P1->(C1,C2), C1->(H1,H2), C2->H3, P2->C3, C3->H4  
>         Z2-> P3, P3->C4, C4->H5
> 	
> 	    domain(account) -> sub-domain(account)
>         D1(A1,U1)->SD1(SA1), D2(A2,U2)->SD2(SA2)
> 		
> 		Dedication: C1 dedicated to A1, P2 dedicated to D2
> 		Affinity group of type 'ExplicitDedication' for each account is created.
> 
> Tested the following scenarios:		
> 1. A1 deploys a VM with AG of type 'ExplicitDedication' on Z1, VM deployed on H1/H2 
> 2. SA1 deploys a VM with AG of type 'ExplicitDedication' on Z1. VM Deployment failed. H1/H2 cannot be picked, since C1 is dedicated to account A1, not domain.
> 3. SA1 deploys a VM with NO Dedication required. VM deployed on H3. 
> 4. A1/U1/SA1/A2/U2/SA2 deploys a VM with NO Dedication required on Z1, VM deployed on H3.
> 5. U1 deploys a VM with AG of type 'ExplicitDedication' on Z1, VM deployment failed.
> 6. A2 deploys a VM with AG of type 'ExplicitDedication' on Z1, VM deployed on H4.
> 7. SA2 deploys a VM with AG of type 'ExplicitDedication' on Z1, VM deployed on H4. SA2 belongs to SD2 which is a sub-domain of D2.
> 8. Deployment of VM with AG of type 'ExplicitDedication' on zone Z2 will get failed. since nothing is dedicated in Zone Z2
> 
> Tests for Migration of dedicated VMs
> ====================================
> 1. Migrate a non-dedicated VM on dedicated Host:
>      - Alert is Raised
> 2. Migrate a dedicated VM on non-dedicated host : 
>      - Alert is Raised
> 
> 
> Test for HostTags and Explicit Dedication
> =========================================
> 1. Host Tag and AG of type 'ExplicitDedication': both provided
>      - if Host or its cluster/pod/zone is dedicated (to the caller's account/domain) and Host is tagged, then deployment is successful else fail the request.
> 2. Host tag is provided and No dedication is required
>      - Host should be tagged but not dedicated.
> 
> Test for Deletion of domains and accounts
> =========================================
> 1. If an account or a domain has dedicated resources and admin deletes that account/domain, dedication is automatically removed.
>   
> 
> 
> Thanks,
> 
> deepti dohare
> 
>


Re: Review Request: CLOUDSTACK-681: Dedicated Resources - Explicit Dedication, Private zone, pod, cluster or host

Posted by Prasanna Santhanam <ts...@apache.org>.
On Mon, May 20, 2013 at 06:37:12PM -0000, Prachi Damle wrote:
> 
> It will be good to add an integration test using marvin on these lines:
> - dedicate a host to a test account
> - create the explicit dedication affinity group for the test account
> - deploy Vm using explicit dedication affinity group
> - make sure that the hostId of the running VM is the dedicated host.

- And finally 'un-dedicate' the host in tearDown. :)

-- 
Prasanna.,

------------------------
Powered by BigRock.com


Re: Review Request: CLOUDSTACK-681: Dedicated Resources - Explicit Dedication, Private zone, pod, cluster or host

Posted by Prachi Damle <pr...@citrix.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/10797/#review20777
-----------------------------------------------------------


It will be good to add an integration test using marvin on these lines:
- dedicate a host to a test account
- create the explicit dedication affinity group for the test account
- deploy Vm using explicit dedication affinity group
- make sure that the hostId of the running VM is the dedicated host.

- Prachi Damle


On May 2, 2013, 2:53 p.m., deepti dohare wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/10797/
> -----------------------------------------------------------
> 
> (Updated May 2, 2013, 2:53 p.m.)
> 
> 
> Review request for cloudstack, Devdeep Singh, Prachi Damle, and Nitin Mehta.
> 
> 
> Description
> -------
> 
> Review Request for "Dedicated Resources: Explicit Dedication"
> =============================================================
> 
> Functional Spec for the above Private zone, pod, cluster or host, can be found here: https://cwiki.apache.org/confluence/display/CLOUDSTACK/Dedicated+Resources+-+Private+zone%2C+pod%2C+cluster%2C+host+Functional+Spec
> This patch request is a part of this feature.
> 
> This feature allows a user to deploy VMs only in the resources dedicated to his account or domain.
> 
> 1. Resources(Zones, Pods, Clusters or hosts) can be dedicated to an account or domain.
>    Implemented 12 new APIs to dedicate/list/release resources:
>    - dedicateZone, listDedicatedZones, releaseDedicatedZone for a Zone.
>    - dedicatePod, listDedicatedPods, releaseDedicatedPod for a Pod.
>    - dedicateCluster, listDedicatedClusters, releaseDedicatedCluster for a Cluster
>    - dedicateHost, listDedicatedHosts, releaseDedicatedHost for a Host.
> 2. Once a resource(eg. pod) is dedicated to an account, other resources(eg. clusters/hosts) inside that cannot be further dedicated.
> 3. Once a resource is dedicated to a domain, other resources inside that can be further dedicated to its sub-domain or account.
> 4. If any resource (eg.cluster) is dedicated to a account/domain, then resources(eg. Pod) above that cannot be dedicated to different accounts/domain (not belonging to the same domain) 
> 5. To use Explicit dedication, user needs to create an Affinity Group of type 'ExplicitDedication'
> 6. A VM can be deployed with the above affinity group parameter as an input.
> 7. A new ExplicitDedicationProcessor has been added which will process the affinity group of type 'Explicit Dedication' for a deployment of a VM that demands dedicated resources.
>    This processor implements the AffinityGroupProcessor adapter. This processor will update the avoid list.
> 8. A VM requesting dedication will be deployed on dedicatd resources if available with the user account.
> 9. A VM requesting dedication can also be deployed on the dedicated resources available with the parent domains iff no dedicated resources are available with the current user's account or 
>    domain. 
> 10. A VM (without dedication) can be deployed on shared host but not on dedicated hosts.
> 11. To modify the dedication, the resource has to be release first.
> 12. Existing Private zone functionality has been redirected to Explicit dedication of zones.
> 13. Updated the db upgrade schema script. A new table "dedicated_resources" has been added.
> 14. Added the right permissions in commands.properties
> 15. Unit tests:  For the new APIs and Service, added unit tests under : plugins/dedicated-resources/test/org/apache/cloudstack/dedicated/DedicatedApiUnitTest.java
> 
> 
> This addresses bug CLOUDSTACK-681.
> 
> 
> Diffs
> -----
> 
>   api/src/com/cloud/dc/DedicatedResources.java PRE-CREATION 
>   api/src/com/cloud/event/EventTypes.java 0ee7f40 
>   client/pom.xml a7c7009 
>   client/tomcatconf/applicationContext.xml.in 2e340bf 
>   client/tomcatconf/commands.properties.in b49e1fb 
>   client/tomcatconf/componentContext.xml.in 7a46981 
>   engine/orchestration/src/org/apache/cloudstack/platform/orchestration/CloudOrchestrator.java 963e4d7 
>   plugins/affinity-group-processors/explicit-dedication/pom.xml PRE-CREATION 
>   plugins/affinity-group-processors/explicit-dedication/src/org/apache/cloudstack/affinity/ExplicitDedicationProcessor.java PRE-CREATION 
>   plugins/dedicated-resources/pom.xml PRE-CREATION 
>   plugins/dedicated-resources/src/org/apache/cloudstack/dedicated/api/commands/DedicateClusterCmd.java PRE-CREATION 
>   plugins/dedicated-resources/src/org/apache/cloudstack/dedicated/api/commands/DedicateHostCmd.java PRE-CREATION 
>   plugins/dedicated-resources/src/org/apache/cloudstack/dedicated/api/commands/DedicatePodCmd.java PRE-CREATION 
>   plugins/dedicated-resources/src/org/apache/cloudstack/dedicated/api/commands/DedicateZoneCmd.java PRE-CREATION 
>   plugins/dedicated-resources/src/org/apache/cloudstack/dedicated/api/commands/ListDedicatedClustersCmd.java PRE-CREATION 
>   plugins/dedicated-resources/src/org/apache/cloudstack/dedicated/api/commands/ListDedicatedHostsCmd.java PRE-CREATION 
>   plugins/dedicated-resources/src/org/apache/cloudstack/dedicated/api/commands/ListDedicatedPodsCmd.java PRE-CREATION 
>   plugins/dedicated-resources/src/org/apache/cloudstack/dedicated/api/commands/ListDedicatedZonesCmd.java PRE-CREATION 
>   plugins/dedicated-resources/src/org/apache/cloudstack/dedicated/api/commands/ReleaseDedicatedClusterCmd.java PRE-CREATION 
>   plugins/dedicated-resources/src/org/apache/cloudstack/dedicated/api/commands/ReleaseDedicatedHostCmd.java PRE-CREATION 
>   plugins/dedicated-resources/src/org/apache/cloudstack/dedicated/api/commands/ReleaseDedicatedPodCmd.java PRE-CREATION 
>   plugins/dedicated-resources/src/org/apache/cloudstack/dedicated/api/commands/ReleaseDedicatedZoneCmd.java PRE-CREATION 
>   plugins/dedicated-resources/src/org/apache/cloudstack/dedicated/api/response/DedicateClusterResponse.java PRE-CREATION 
>   plugins/dedicated-resources/src/org/apache/cloudstack/dedicated/api/response/DedicateHostResponse.java PRE-CREATION 
>   plugins/dedicated-resources/src/org/apache/cloudstack/dedicated/api/response/DedicatePodResponse.java PRE-CREATION 
>   plugins/dedicated-resources/src/org/apache/cloudstack/dedicated/api/response/DedicateZoneResponse.java PRE-CREATION 
>   plugins/dedicated-resources/src/org/apache/cloudstack/dedicated/manager/DedicatedResourceManagerImpl.java PRE-CREATION 
>   plugins/dedicated-resources/src/org/apache/cloudstack/dedicated/services/DedicatedService.java PRE-CREATION 
>   plugins/dedicated-resources/test/org/apache/cloudstack/dedicated/DedicatedApiTestConfiguration.java PRE-CREATION 
>   plugins/dedicated-resources/test/org/apache/cloudstack/dedicated/DedicatedApiUnitTest.java PRE-CREATION 
>   plugins/dedicated-resources/test/resource/dedicatedContext.xml PRE-CREATION 
>   plugins/pom.xml b940271 
>   server/src/com/cloud/api/query/QueryManagerImpl.java 50018e5 
>   server/src/com/cloud/configuration/ConfigurationManagerImpl.java 37ca793 
>   server/src/com/cloud/dc/DedicatedResourceVO.java PRE-CREATION 
>   server/src/com/cloud/dc/dao/ClusterDao.java 3ce0798 
>   server/src/com/cloud/dc/dao/ClusterDaoImpl.java 86dc65e 
>   server/src/com/cloud/dc/dao/DedicatedResourceDao.java PRE-CREATION 
>   server/src/com/cloud/dc/dao/DedicatedResourceDaoImpl.java PRE-CREATION 
>   server/src/com/cloud/deploy/DeploymentPlanningManagerImpl.java c7162a2 
>   server/src/com/cloud/domain/dao/DomainDaoImpl.java c30ca5e 
>   server/src/com/cloud/host/dao/HostDao.java 98bdcb4 
>   server/src/com/cloud/host/dao/HostDaoImpl.java 07a4232 
>   server/src/com/cloud/resource/ResourceManagerImpl.java c9c3f9c 
>   server/src/com/cloud/user/AccountManagerImpl.java 8de73fb 
>   server/src/com/cloud/user/DomainManagerImpl.java dbcbe4e 
>   server/src/com/cloud/vm/UserVmManagerImpl.java 6179948 
>   server/test/org/apache/cloudstack/affinity/AffinityApiTestConfiguration.java 4dd6ad7 
>   server/test/org/apache/cloudstack/networkoffering/ChildTestConfiguration.java 709dfe2 
>   server/test/resources/affinityContext.xml 15476c1 
>   setup/db/create-schema.sql b1feb02 
>   setup/db/db/schema-410to420.sql 99b476d 
> 
> Diff: https://reviews.apache.org/r/10797/diff/
> 
> 
> Testing
> -------
> 
> Unit tests:  
> For the new APIs and Service, added unit tests under: plugins/dedicated-resources/test/org/apache/cloudstack/dedicated/DedicatedApiUnitTest.java
> The tests validates the APIs: dedication of zone, pod, cluster and hosts. Also added negative tests for the scenarios.
> 
> Manual Testing Done
> 
> Tests for DeployVirtualMachine
> ==============================
> Setup : 2 zones Z1 and Z2 , infrastructure:
>         Z1->(P1,P2), P1->(C1,C2), C1->(H1,H2), C2->H3, P2->C3, C3->H4  
>         Z2-> P3, P3->C4, C4->H5
> 	
> 	    domain(account) -> sub-domain(account)
>         D1(A1,U1)->SD1(SA1), D2(A2,U2)->SD2(SA2)
> 		
> 		Dedication: C1 dedicated to A1, P2 dedicated to D2
> 		Affinity group of type 'ExplicitDedication' for each account is created.
> 
> Tested the following scenarios:		
> 1. A1 deploys a VM with AG of type 'ExplicitDedication' on Z1, VM deployed on H1/H2 
> 2. SA1 deploys a VM with AG of type 'ExplicitDedication' on Z1. VM Deployment failed. H1/H2 cannot be picked, since C1 is dedicated to account A1, not domain.
> 3. SA1 deploys a VM with NO Dedication required. VM deployed on H3. 
> 4. A1/U1/SA1/A2/U2/SA2 deploys a VM with NO Dedication required on Z1, VM deployed on H3.
> 5. U1 deploys a VM with AG of type 'ExplicitDedication' on Z1, VM deployment failed.
> 6. A2 deploys a VM with AG of type 'ExplicitDedication' on Z1, VM deployed on H4.
> 7. SA2 deploys a VM with AG of type 'ExplicitDedication' on Z1, VM deployed on H4. SA2 belongs to SD2 which is a sub-domain of D2.
> 8. Deployment of VM with AG of type 'ExplicitDedication' on zone Z2 will get failed. since nothing is dedicated in Zone Z2
> 
> Tests for Migration of dedicated VMs
> ====================================
> 1. Migrate a non-dedicated VM on dedicated Host:
>      - Alert is Raised
> 2. Migrate a dedicated VM on non-dedicated host : 
>      - Alert is Raised
> 
> 
> Test for HostTags and Explicit Dedication
> =========================================
> 1. Host Tag and AG of type 'ExplicitDedication': both provided
>      - if Host or its cluster/pod/zone is dedicated (to the caller's account/domain) and Host is tagged, then deployment is successful else fail the request.
> 2. Host tag is provided and No dedication is required
>      - Host should be tagged but not dedicated.
> 
> Test for Deletion of domains and accounts
> =========================================
> 1. If an account or a domain has dedicated resources and admin deletes that account/domain, dedication is automatically removed.
>   
> 
> 
> Thanks,
> 
> deepti dohare
> 
>


Re: Review Request: CLOUDSTACK-681: Dedicated Resources - Explicit Dedication, Private zone, pod, cluster or host

Posted by ASF Subversion and Git Services <as...@urd.zones.apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/10797/#review21214
-----------------------------------------------------------


Commit 8ece25c1f2bd6d0126c2a22b42e1c4da65fc2856 in branch refs/heads/master from Jessica Wang <je...@apache.org>
[ https://git-wip-us.apache.org/repos/asf?p=cloudstack.git;h=8ece25c ]

CLOUDSTACK-681: deployment planner - create compute offering dialog - deployment planner dropdown - add blank option and make it as default option. Not pass anything to API call when blank option is selected.


- ASF Subversion and Git Services


On May 2, 2013, 2:53 p.m., deepti dohare wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/10797/
> -----------------------------------------------------------
> 
> (Updated May 2, 2013, 2:53 p.m.)
> 
> 
> Review request for cloudstack, Devdeep Singh, Prachi Damle, and Nitin Mehta.
> 
> 
> Description
> -------
> 
> Review Request for "Dedicated Resources: Explicit Dedication"
> =============================================================
> 
> Functional Spec for the above Private zone, pod, cluster or host, can be found here: https://cwiki.apache.org/confluence/display/CLOUDSTACK/Dedicated+Resources+-+Private+zone%2C+pod%2C+cluster%2C+host+Functional+Spec
> This patch request is a part of this feature.
> 
> This feature allows a user to deploy VMs only in the resources dedicated to his account or domain.
> 
> 1. Resources(Zones, Pods, Clusters or hosts) can be dedicated to an account or domain.
>    Implemented 12 new APIs to dedicate/list/release resources:
>    - dedicateZone, listDedicatedZones, releaseDedicatedZone for a Zone.
>    - dedicatePod, listDedicatedPods, releaseDedicatedPod for a Pod.
>    - dedicateCluster, listDedicatedClusters, releaseDedicatedCluster for a Cluster
>    - dedicateHost, listDedicatedHosts, releaseDedicatedHost for a Host.
> 2. Once a resource(eg. pod) is dedicated to an account, other resources(eg. clusters/hosts) inside that cannot be further dedicated.
> 3. Once a resource is dedicated to a domain, other resources inside that can be further dedicated to its sub-domain or account.
> 4. If any resource (eg.cluster) is dedicated to a account/domain, then resources(eg. Pod) above that cannot be dedicated to different accounts/domain (not belonging to the same domain) 
> 5. To use Explicit dedication, user needs to create an Affinity Group of type 'ExplicitDedication'
> 6. A VM can be deployed with the above affinity group parameter as an input.
> 7. A new ExplicitDedicationProcessor has been added which will process the affinity group of type 'Explicit Dedication' for a deployment of a VM that demands dedicated resources.
>    This processor implements the AffinityGroupProcessor adapter. This processor will update the avoid list.
> 8. A VM requesting dedication will be deployed on dedicatd resources if available with the user account.
> 9. A VM requesting dedication can also be deployed on the dedicated resources available with the parent domains iff no dedicated resources are available with the current user's account or 
>    domain. 
> 10. A VM (without dedication) can be deployed on shared host but not on dedicated hosts.
> 11. To modify the dedication, the resource has to be release first.
> 12. Existing Private zone functionality has been redirected to Explicit dedication of zones.
> 13. Updated the db upgrade schema script. A new table "dedicated_resources" has been added.
> 14. Added the right permissions in commands.properties
> 15. Unit tests:  For the new APIs and Service, added unit tests under : plugins/dedicated-resources/test/org/apache/cloudstack/dedicated/DedicatedApiUnitTest.java
> 
> 
> This addresses bug CLOUDSTACK-681.
> 
> 
> Diffs
> -----
> 
>   api/src/com/cloud/dc/DedicatedResources.java PRE-CREATION 
>   api/src/com/cloud/event/EventTypes.java 0ee7f40 
>   client/pom.xml a7c7009 
>   client/tomcatconf/applicationContext.xml.in 2e340bf 
>   client/tomcatconf/commands.properties.in b49e1fb 
>   client/tomcatconf/componentContext.xml.in 7a46981 
>   engine/orchestration/src/org/apache/cloudstack/platform/orchestration/CloudOrchestrator.java 963e4d7 
>   plugins/affinity-group-processors/explicit-dedication/pom.xml PRE-CREATION 
>   plugins/affinity-group-processors/explicit-dedication/src/org/apache/cloudstack/affinity/ExplicitDedicationProcessor.java PRE-CREATION 
>   plugins/dedicated-resources/pom.xml PRE-CREATION 
>   plugins/dedicated-resources/src/org/apache/cloudstack/dedicated/api/commands/DedicateClusterCmd.java PRE-CREATION 
>   plugins/dedicated-resources/src/org/apache/cloudstack/dedicated/api/commands/DedicateHostCmd.java PRE-CREATION 
>   plugins/dedicated-resources/src/org/apache/cloudstack/dedicated/api/commands/DedicatePodCmd.java PRE-CREATION 
>   plugins/dedicated-resources/src/org/apache/cloudstack/dedicated/api/commands/DedicateZoneCmd.java PRE-CREATION 
>   plugins/dedicated-resources/src/org/apache/cloudstack/dedicated/api/commands/ListDedicatedClustersCmd.java PRE-CREATION 
>   plugins/dedicated-resources/src/org/apache/cloudstack/dedicated/api/commands/ListDedicatedHostsCmd.java PRE-CREATION 
>   plugins/dedicated-resources/src/org/apache/cloudstack/dedicated/api/commands/ListDedicatedPodsCmd.java PRE-CREATION 
>   plugins/dedicated-resources/src/org/apache/cloudstack/dedicated/api/commands/ListDedicatedZonesCmd.java PRE-CREATION 
>   plugins/dedicated-resources/src/org/apache/cloudstack/dedicated/api/commands/ReleaseDedicatedClusterCmd.java PRE-CREATION 
>   plugins/dedicated-resources/src/org/apache/cloudstack/dedicated/api/commands/ReleaseDedicatedHostCmd.java PRE-CREATION 
>   plugins/dedicated-resources/src/org/apache/cloudstack/dedicated/api/commands/ReleaseDedicatedPodCmd.java PRE-CREATION 
>   plugins/dedicated-resources/src/org/apache/cloudstack/dedicated/api/commands/ReleaseDedicatedZoneCmd.java PRE-CREATION 
>   plugins/dedicated-resources/src/org/apache/cloudstack/dedicated/api/response/DedicateClusterResponse.java PRE-CREATION 
>   plugins/dedicated-resources/src/org/apache/cloudstack/dedicated/api/response/DedicateHostResponse.java PRE-CREATION 
>   plugins/dedicated-resources/src/org/apache/cloudstack/dedicated/api/response/DedicatePodResponse.java PRE-CREATION 
>   plugins/dedicated-resources/src/org/apache/cloudstack/dedicated/api/response/DedicateZoneResponse.java PRE-CREATION 
>   plugins/dedicated-resources/src/org/apache/cloudstack/dedicated/manager/DedicatedResourceManagerImpl.java PRE-CREATION 
>   plugins/dedicated-resources/src/org/apache/cloudstack/dedicated/services/DedicatedService.java PRE-CREATION 
>   plugins/dedicated-resources/test/org/apache/cloudstack/dedicated/DedicatedApiTestConfiguration.java PRE-CREATION 
>   plugins/dedicated-resources/test/org/apache/cloudstack/dedicated/DedicatedApiUnitTest.java PRE-CREATION 
>   plugins/dedicated-resources/test/resource/dedicatedContext.xml PRE-CREATION 
>   plugins/pom.xml b940271 
>   server/src/com/cloud/api/query/QueryManagerImpl.java 50018e5 
>   server/src/com/cloud/configuration/ConfigurationManagerImpl.java 37ca793 
>   server/src/com/cloud/dc/DedicatedResourceVO.java PRE-CREATION 
>   server/src/com/cloud/dc/dao/ClusterDao.java 3ce0798 
>   server/src/com/cloud/dc/dao/ClusterDaoImpl.java 86dc65e 
>   server/src/com/cloud/dc/dao/DedicatedResourceDao.java PRE-CREATION 
>   server/src/com/cloud/dc/dao/DedicatedResourceDaoImpl.java PRE-CREATION 
>   server/src/com/cloud/deploy/DeploymentPlanningManagerImpl.java c7162a2 
>   server/src/com/cloud/domain/dao/DomainDaoImpl.java c30ca5e 
>   server/src/com/cloud/host/dao/HostDao.java 98bdcb4 
>   server/src/com/cloud/host/dao/HostDaoImpl.java 07a4232 
>   server/src/com/cloud/resource/ResourceManagerImpl.java c9c3f9c 
>   server/src/com/cloud/user/AccountManagerImpl.java 8de73fb 
>   server/src/com/cloud/user/DomainManagerImpl.java dbcbe4e 
>   server/src/com/cloud/vm/UserVmManagerImpl.java 6179948 
>   server/test/org/apache/cloudstack/affinity/AffinityApiTestConfiguration.java 4dd6ad7 
>   server/test/org/apache/cloudstack/networkoffering/ChildTestConfiguration.java 709dfe2 
>   server/test/resources/affinityContext.xml 15476c1 
>   setup/db/create-schema.sql b1feb02 
>   setup/db/db/schema-410to420.sql 99b476d 
> 
> Diff: https://reviews.apache.org/r/10797/diff/
> 
> 
> Testing
> -------
> 
> Unit tests:  
> For the new APIs and Service, added unit tests under: plugins/dedicated-resources/test/org/apache/cloudstack/dedicated/DedicatedApiUnitTest.java
> The tests validates the APIs: dedication of zone, pod, cluster and hosts. Also added negative tests for the scenarios.
> 
> Manual Testing Done
> 
> Tests for DeployVirtualMachine
> ==============================
> Setup : 2 zones Z1 and Z2 , infrastructure:
>         Z1->(P1,P2), P1->(C1,C2), C1->(H1,H2), C2->H3, P2->C3, C3->H4  
>         Z2-> P3, P3->C4, C4->H5
> 	
> 	    domain(account) -> sub-domain(account)
>         D1(A1,U1)->SD1(SA1), D2(A2,U2)->SD2(SA2)
> 		
> 		Dedication: C1 dedicated to A1, P2 dedicated to D2
> 		Affinity group of type 'ExplicitDedication' for each account is created.
> 
> Tested the following scenarios:		
> 1. A1 deploys a VM with AG of type 'ExplicitDedication' on Z1, VM deployed on H1/H2 
> 2. SA1 deploys a VM with AG of type 'ExplicitDedication' on Z1. VM Deployment failed. H1/H2 cannot be picked, since C1 is dedicated to account A1, not domain.
> 3. SA1 deploys a VM with NO Dedication required. VM deployed on H3. 
> 4. A1/U1/SA1/A2/U2/SA2 deploys a VM with NO Dedication required on Z1, VM deployed on H3.
> 5. U1 deploys a VM with AG of type 'ExplicitDedication' on Z1, VM deployment failed.
> 6. A2 deploys a VM with AG of type 'ExplicitDedication' on Z1, VM deployed on H4.
> 7. SA2 deploys a VM with AG of type 'ExplicitDedication' on Z1, VM deployed on H4. SA2 belongs to SD2 which is a sub-domain of D2.
> 8. Deployment of VM with AG of type 'ExplicitDedication' on zone Z2 will get failed. since nothing is dedicated in Zone Z2
> 
> Tests for Migration of dedicated VMs
> ====================================
> 1. Migrate a non-dedicated VM on dedicated Host:
>      - Alert is Raised
> 2. Migrate a dedicated VM on non-dedicated host : 
>      - Alert is Raised
> 
> 
> Test for HostTags and Explicit Dedication
> =========================================
> 1. Host Tag and AG of type 'ExplicitDedication': both provided
>      - if Host or its cluster/pod/zone is dedicated (to the caller's account/domain) and Host is tagged, then deployment is successful else fail the request.
> 2. Host tag is provided and No dedication is required
>      - Host should be tagged but not dedicated.
> 
> Test for Deletion of domains and accounts
> =========================================
> 1. If an account or a domain has dedicated resources and admin deletes that account/domain, dedication is automatically removed.
>   
> 
> 
> Thanks,
> 
> deepti dohare
> 
>


Re: Review Request: CLOUDSTACK-681: Dedicated Resources - Explicit Dedication, Private zone, pod, cluster or host

Posted by ASF Subversion and Git Services <as...@urd.zones.apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/10797/#review20888
-----------------------------------------------------------


Commit 49e39e51f2bd39c1e5cd60389f4433d58f9415bc in branch refs/heads/master from Pranav Saxena <pr...@citrix.com>
[ https://git-wip-us.apache.org/repos/asf?p=cloudstack.git;h=49e39e5 ]

CLOUDSTACK-681:Implicit Dedication UI support


- ASF Subversion and Git Services


On May 2, 2013, 2:53 p.m., deepti dohare wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/10797/
> -----------------------------------------------------------
> 
> (Updated May 2, 2013, 2:53 p.m.)
> 
> 
> Review request for cloudstack, Devdeep Singh, Prachi Damle, and Nitin Mehta.
> 
> 
> Description
> -------
> 
> Review Request for "Dedicated Resources: Explicit Dedication"
> =============================================================
> 
> Functional Spec for the above Private zone, pod, cluster or host, can be found here: https://cwiki.apache.org/confluence/display/CLOUDSTACK/Dedicated+Resources+-+Private+zone%2C+pod%2C+cluster%2C+host+Functional+Spec
> This patch request is a part of this feature.
> 
> This feature allows a user to deploy VMs only in the resources dedicated to his account or domain.
> 
> 1. Resources(Zones, Pods, Clusters or hosts) can be dedicated to an account or domain.
>    Implemented 12 new APIs to dedicate/list/release resources:
>    - dedicateZone, listDedicatedZones, releaseDedicatedZone for a Zone.
>    - dedicatePod, listDedicatedPods, releaseDedicatedPod for a Pod.
>    - dedicateCluster, listDedicatedClusters, releaseDedicatedCluster for a Cluster
>    - dedicateHost, listDedicatedHosts, releaseDedicatedHost for a Host.
> 2. Once a resource(eg. pod) is dedicated to an account, other resources(eg. clusters/hosts) inside that cannot be further dedicated.
> 3. Once a resource is dedicated to a domain, other resources inside that can be further dedicated to its sub-domain or account.
> 4. If any resource (eg.cluster) is dedicated to a account/domain, then resources(eg. Pod) above that cannot be dedicated to different accounts/domain (not belonging to the same domain) 
> 5. To use Explicit dedication, user needs to create an Affinity Group of type 'ExplicitDedication'
> 6. A VM can be deployed with the above affinity group parameter as an input.
> 7. A new ExplicitDedicationProcessor has been added which will process the affinity group of type 'Explicit Dedication' for a deployment of a VM that demands dedicated resources.
>    This processor implements the AffinityGroupProcessor adapter. This processor will update the avoid list.
> 8. A VM requesting dedication will be deployed on dedicatd resources if available with the user account.
> 9. A VM requesting dedication can also be deployed on the dedicated resources available with the parent domains iff no dedicated resources are available with the current user's account or 
>    domain. 
> 10. A VM (without dedication) can be deployed on shared host but not on dedicated hosts.
> 11. To modify the dedication, the resource has to be release first.
> 12. Existing Private zone functionality has been redirected to Explicit dedication of zones.
> 13. Updated the db upgrade schema script. A new table "dedicated_resources" has been added.
> 14. Added the right permissions in commands.properties
> 15. Unit tests:  For the new APIs and Service, added unit tests under : plugins/dedicated-resources/test/org/apache/cloudstack/dedicated/DedicatedApiUnitTest.java
> 
> 
> This addresses bug CLOUDSTACK-681.
> 
> 
> Diffs
> -----
> 
>   api/src/com/cloud/dc/DedicatedResources.java PRE-CREATION 
>   api/src/com/cloud/event/EventTypes.java 0ee7f40 
>   client/pom.xml a7c7009 
>   client/tomcatconf/applicationContext.xml.in 2e340bf 
>   client/tomcatconf/commands.properties.in b49e1fb 
>   client/tomcatconf/componentContext.xml.in 7a46981 
>   engine/orchestration/src/org/apache/cloudstack/platform/orchestration/CloudOrchestrator.java 963e4d7 
>   plugins/affinity-group-processors/explicit-dedication/pom.xml PRE-CREATION 
>   plugins/affinity-group-processors/explicit-dedication/src/org/apache/cloudstack/affinity/ExplicitDedicationProcessor.java PRE-CREATION 
>   plugins/dedicated-resources/pom.xml PRE-CREATION 
>   plugins/dedicated-resources/src/org/apache/cloudstack/dedicated/api/commands/DedicateClusterCmd.java PRE-CREATION 
>   plugins/dedicated-resources/src/org/apache/cloudstack/dedicated/api/commands/DedicateHostCmd.java PRE-CREATION 
>   plugins/dedicated-resources/src/org/apache/cloudstack/dedicated/api/commands/DedicatePodCmd.java PRE-CREATION 
>   plugins/dedicated-resources/src/org/apache/cloudstack/dedicated/api/commands/DedicateZoneCmd.java PRE-CREATION 
>   plugins/dedicated-resources/src/org/apache/cloudstack/dedicated/api/commands/ListDedicatedClustersCmd.java PRE-CREATION 
>   plugins/dedicated-resources/src/org/apache/cloudstack/dedicated/api/commands/ListDedicatedHostsCmd.java PRE-CREATION 
>   plugins/dedicated-resources/src/org/apache/cloudstack/dedicated/api/commands/ListDedicatedPodsCmd.java PRE-CREATION 
>   plugins/dedicated-resources/src/org/apache/cloudstack/dedicated/api/commands/ListDedicatedZonesCmd.java PRE-CREATION 
>   plugins/dedicated-resources/src/org/apache/cloudstack/dedicated/api/commands/ReleaseDedicatedClusterCmd.java PRE-CREATION 
>   plugins/dedicated-resources/src/org/apache/cloudstack/dedicated/api/commands/ReleaseDedicatedHostCmd.java PRE-CREATION 
>   plugins/dedicated-resources/src/org/apache/cloudstack/dedicated/api/commands/ReleaseDedicatedPodCmd.java PRE-CREATION 
>   plugins/dedicated-resources/src/org/apache/cloudstack/dedicated/api/commands/ReleaseDedicatedZoneCmd.java PRE-CREATION 
>   plugins/dedicated-resources/src/org/apache/cloudstack/dedicated/api/response/DedicateClusterResponse.java PRE-CREATION 
>   plugins/dedicated-resources/src/org/apache/cloudstack/dedicated/api/response/DedicateHostResponse.java PRE-CREATION 
>   plugins/dedicated-resources/src/org/apache/cloudstack/dedicated/api/response/DedicatePodResponse.java PRE-CREATION 
>   plugins/dedicated-resources/src/org/apache/cloudstack/dedicated/api/response/DedicateZoneResponse.java PRE-CREATION 
>   plugins/dedicated-resources/src/org/apache/cloudstack/dedicated/manager/DedicatedResourceManagerImpl.java PRE-CREATION 
>   plugins/dedicated-resources/src/org/apache/cloudstack/dedicated/services/DedicatedService.java PRE-CREATION 
>   plugins/dedicated-resources/test/org/apache/cloudstack/dedicated/DedicatedApiTestConfiguration.java PRE-CREATION 
>   plugins/dedicated-resources/test/org/apache/cloudstack/dedicated/DedicatedApiUnitTest.java PRE-CREATION 
>   plugins/dedicated-resources/test/resource/dedicatedContext.xml PRE-CREATION 
>   plugins/pom.xml b940271 
>   server/src/com/cloud/api/query/QueryManagerImpl.java 50018e5 
>   server/src/com/cloud/configuration/ConfigurationManagerImpl.java 37ca793 
>   server/src/com/cloud/dc/DedicatedResourceVO.java PRE-CREATION 
>   server/src/com/cloud/dc/dao/ClusterDao.java 3ce0798 
>   server/src/com/cloud/dc/dao/ClusterDaoImpl.java 86dc65e 
>   server/src/com/cloud/dc/dao/DedicatedResourceDao.java PRE-CREATION 
>   server/src/com/cloud/dc/dao/DedicatedResourceDaoImpl.java PRE-CREATION 
>   server/src/com/cloud/deploy/DeploymentPlanningManagerImpl.java c7162a2 
>   server/src/com/cloud/domain/dao/DomainDaoImpl.java c30ca5e 
>   server/src/com/cloud/host/dao/HostDao.java 98bdcb4 
>   server/src/com/cloud/host/dao/HostDaoImpl.java 07a4232 
>   server/src/com/cloud/resource/ResourceManagerImpl.java c9c3f9c 
>   server/src/com/cloud/user/AccountManagerImpl.java 8de73fb 
>   server/src/com/cloud/user/DomainManagerImpl.java dbcbe4e 
>   server/src/com/cloud/vm/UserVmManagerImpl.java 6179948 
>   server/test/org/apache/cloudstack/affinity/AffinityApiTestConfiguration.java 4dd6ad7 
>   server/test/org/apache/cloudstack/networkoffering/ChildTestConfiguration.java 709dfe2 
>   server/test/resources/affinityContext.xml 15476c1 
>   setup/db/create-schema.sql b1feb02 
>   setup/db/db/schema-410to420.sql 99b476d 
> 
> Diff: https://reviews.apache.org/r/10797/diff/
> 
> 
> Testing
> -------
> 
> Unit tests:  
> For the new APIs and Service, added unit tests under: plugins/dedicated-resources/test/org/apache/cloudstack/dedicated/DedicatedApiUnitTest.java
> The tests validates the APIs: dedication of zone, pod, cluster and hosts. Also added negative tests for the scenarios.
> 
> Manual Testing Done
> 
> Tests for DeployVirtualMachine
> ==============================
> Setup : 2 zones Z1 and Z2 , infrastructure:
>         Z1->(P1,P2), P1->(C1,C2), C1->(H1,H2), C2->H3, P2->C3, C3->H4  
>         Z2-> P3, P3->C4, C4->H5
> 	
> 	    domain(account) -> sub-domain(account)
>         D1(A1,U1)->SD1(SA1), D2(A2,U2)->SD2(SA2)
> 		
> 		Dedication: C1 dedicated to A1, P2 dedicated to D2
> 		Affinity group of type 'ExplicitDedication' for each account is created.
> 
> Tested the following scenarios:		
> 1. A1 deploys a VM with AG of type 'ExplicitDedication' on Z1, VM deployed on H1/H2 
> 2. SA1 deploys a VM with AG of type 'ExplicitDedication' on Z1. VM Deployment failed. H1/H2 cannot be picked, since C1 is dedicated to account A1, not domain.
> 3. SA1 deploys a VM with NO Dedication required. VM deployed on H3. 
> 4. A1/U1/SA1/A2/U2/SA2 deploys a VM with NO Dedication required on Z1, VM deployed on H3.
> 5. U1 deploys a VM with AG of type 'ExplicitDedication' on Z1, VM deployment failed.
> 6. A2 deploys a VM with AG of type 'ExplicitDedication' on Z1, VM deployed on H4.
> 7. SA2 deploys a VM with AG of type 'ExplicitDedication' on Z1, VM deployed on H4. SA2 belongs to SD2 which is a sub-domain of D2.
> 8. Deployment of VM with AG of type 'ExplicitDedication' on zone Z2 will get failed. since nothing is dedicated in Zone Z2
> 
> Tests for Migration of dedicated VMs
> ====================================
> 1. Migrate a non-dedicated VM on dedicated Host:
>      - Alert is Raised
> 2. Migrate a dedicated VM on non-dedicated host : 
>      - Alert is Raised
> 
> 
> Test for HostTags and Explicit Dedication
> =========================================
> 1. Host Tag and AG of type 'ExplicitDedication': both provided
>      - if Host or its cluster/pod/zone is dedicated (to the caller's account/domain) and Host is tagged, then deployment is successful else fail the request.
> 2. Host tag is provided and No dedication is required
>      - Host should be tagged but not dedicated.
> 
> Test for Deletion of domains and accounts
> =========================================
> 1. If an account or a domain has dedicated resources and admin deletes that account/domain, dedication is automatically removed.
>   
> 
> 
> Thanks,
> 
> deepti dohare
> 
>