You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cloudstack.apache.org by Saksham Srivastava <sa...@citrix.com> on 2013/05/24 16:38:06 UTC

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/11379/
-----------------------------------------------------------

Review request for cloudstack, Devdeep Singh and Prachi Damle.


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/CLOUDSTACK/dedicated-resources-private-zone-pod-cluster-host-functional-spec.html
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 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.

Created 2 patches for the bug:
Patch 2 is for files that are modifying the files that have windows line endings. git am will not work for such files in a single patch.


This addresses bug CLOUDSTACK-681.


Diffs
-----

  api/src/com/cloud/dc/DedicatedResources.java PRE-CREATION 
  api/src/com/cloud/event/EventTypes.java da96294 
  client/pom.xml 0c38ecb 
  client/tomcatconf/applicationContext.xml.in edf83a9 
  client/tomcatconf/commands.properties.in fd5479f 
  client/tomcatconf/componentContext.xml.in e946f44 
  engine/orchestration/src/org/apache/cloudstack/platform/orchestration/CloudOrchestrator.java 963e4d7 
  engine/schema/src/com/cloud/dc/dao/ClusterDao.java 3ce0798 
  engine/schema/src/com/cloud/dc/dao/ClusterDaoImpl.java 86dc65e 
  engine/schema/src/com/cloud/domain/dao/DomainDaoImpl.java 9460a73 
  engine/schema/src/com/cloud/host/dao/HostDao.java 98bdcb4 
  engine/schema/src/com/cloud/host/dao/HostDaoImpl.java 07a4232 
  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/manager/DedicatedApiUnitTest.java PRE-CREATION 
  plugins/dedicated-resources/test/resource/dedicatedContext.xml PRE-CREATION 
  plugins/pom.xml 2efa248 
  server/src/com/cloud/api/query/QueryManagerImpl.java c586a7b 
  server/src/com/cloud/configuration/ConfigurationManagerImpl.java 214e292 
  server/src/com/cloud/dc/DedicatedResourceVO.java PRE-CREATION 
  server/src/com/cloud/dc/dao/DedicatedResourceDao.java PRE-CREATION 
  server/src/com/cloud/dc/dao/DedicatedResourceDaoImpl.java PRE-CREATION 
  server/src/com/cloud/resource/ResourceManagerImpl.java 25f451e 
  server/src/com/cloud/user/AccountManagerImpl.java 7421422 
  server/src/com/cloud/user/DomainManagerImpl.java c451041 
  server/src/com/cloud/vm/UserVmManagerImpl.java 96b9529 
  server/test/org/apache/cloudstack/networkoffering/ChildTestConfiguration.java f862a2a 
  setup/db/create-schema.sql b1feb02 
  setup/db/db/schema-410to420.sql 435bb83 
  test/integration/component/test_explicit_dedication.py PRE-CREATION 
  tools/apidoc/gen_toc.py 793f720 

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


Testing
-------

Unittest: For the new APIs and Service, added unit tests under : plugins/dedicated-resources/test/org/apache/cloudstack/dedicated/DedicatedApiUnitTest.java
Marvin Test: To dedicate host, create affinity group, deploy-vm, check if vm is deployed on the dedicated host.
Rat Build Successful.


Thanks,

Saksham Srivastava


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/11379/#review21213
-----------------------------------------------------------


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 30, 2013, 6:20 a.m., Saksham Srivastava wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/11379/
> -----------------------------------------------------------
> 
> (Updated May 30, 2013, 6:20 a.m.)
> 
> 
> Review request for cloudstack, Devdeep Singh and Prachi Damle.
> 
> 
> 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/CLOUDSTACK/dedicated-resources-private-zone-pod-cluster-host-functional-spec.html
> 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 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.
> 
> Created 2 patches for the bug:
> Patch 2 is for files that are modifying the files that have windows line endings. git am will not work for such files in a single patch.
> 
> 
> This addresses bug CLOUDSTACK-681.
> 
> 
> Diffs
> -----
> 
>   api/src/com/cloud/dc/DedicatedResources.java PRE-CREATION 
>   api/src/com/cloud/event/EventTypes.java 6dfb1ab 
>   client/pom.xml 0c38ecb 
>   client/tomcatconf/applicationContext.xml.in edf83a9 
>   client/tomcatconf/commands.properties.in fd5479f 
>   client/tomcatconf/componentContext.xml.in e946f44 
>   engine/orchestration/src/org/apache/cloudstack/platform/orchestration/CloudOrchestrator.java 963e4d7 
>   engine/schema/src/com/cloud/dc/dao/ClusterDao.java 3ce0798 
>   engine/schema/src/com/cloud/dc/dao/ClusterDaoImpl.java 86dc65e 
>   engine/schema/src/com/cloud/domain/dao/DomainDaoImpl.java 9460a73 
>   engine/schema/src/com/cloud/host/dao/HostDao.java 98bdcb4 
>   engine/schema/src/com/cloud/host/dao/HostDaoImpl.java 07a4232 
>   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/manager/DedicatedApiUnitTest.java PRE-CREATION 
>   plugins/dedicated-resources/test/resource/dedicatedContext.xml PRE-CREATION 
>   plugins/pom.xml 2efa248 
>   server/src/com/cloud/api/query/QueryManagerImpl.java 5a25732 
>   server/src/com/cloud/configuration/ConfigurationManagerImpl.java 79375f9 
>   server/src/com/cloud/dc/DedicatedResourceVO.java PRE-CREATION 
>   server/src/com/cloud/dc/dao/DedicatedResourceDao.java PRE-CREATION 
>   server/src/com/cloud/dc/dao/DedicatedResourceDaoImpl.java PRE-CREATION 
>   server/src/com/cloud/resource/ResourceManagerImpl.java 74bd6d0 
>   server/src/com/cloud/user/AccountManagerImpl.java e72005e 
>   server/src/com/cloud/user/DomainManagerImpl.java 00a779e 
>   server/src/com/cloud/vm/UserVmManagerImpl.java a734d44 
>   server/test/org/apache/cloudstack/networkoffering/ChildTestConfiguration.java f862a2a 
>   setup/db/create-schema.sql b1feb02 
>   setup/db/db/schema-410to420.sql e081a25 
>   test/integration/component/test_explicit_dedication.py PRE-CREATION 
>   tools/apidoc/gen_toc.py 793f720 
> 
> Diff: https://reviews.apache.org/r/11379/diff/
> 
> 
> Testing
> -------
> 
> Unittest: For the new APIs and Service, added unit tests under : plugins/dedicated-resources/test/org/apache/cloudstack/dedicated/DedicatedApiUnitTest.java
> Marvin Test: To dedicate host, create affinity group, deploy-vm, check if vm is deployed on the dedicated host.
> Rat Build Successful.
> 
> 
> Thanks,
> 
> Saksham Srivastava
> 
>


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/11379/#review21186
-----------------------------------------------------------


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 30, 2013, 6:20 a.m., Saksham Srivastava wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/11379/
> -----------------------------------------------------------
> 
> (Updated May 30, 2013, 6:20 a.m.)
> 
> 
> Review request for cloudstack, Devdeep Singh and Prachi Damle.
> 
> 
> 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/CLOUDSTACK/dedicated-resources-private-zone-pod-cluster-host-functional-spec.html
> 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 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.
> 
> Created 2 patches for the bug:
> Patch 2 is for files that are modifying the files that have windows line endings. git am will not work for such files in a single patch.
> 
> 
> This addresses bug CLOUDSTACK-681.
> 
> 
> Diffs
> -----
> 
>   api/src/com/cloud/dc/DedicatedResources.java PRE-CREATION 
>   api/src/com/cloud/event/EventTypes.java 6dfb1ab 
>   client/pom.xml 0c38ecb 
>   client/tomcatconf/applicationContext.xml.in edf83a9 
>   client/tomcatconf/commands.properties.in fd5479f 
>   client/tomcatconf/componentContext.xml.in e946f44 
>   engine/orchestration/src/org/apache/cloudstack/platform/orchestration/CloudOrchestrator.java 963e4d7 
>   engine/schema/src/com/cloud/dc/dao/ClusterDao.java 3ce0798 
>   engine/schema/src/com/cloud/dc/dao/ClusterDaoImpl.java 86dc65e 
>   engine/schema/src/com/cloud/domain/dao/DomainDaoImpl.java 9460a73 
>   engine/schema/src/com/cloud/host/dao/HostDao.java 98bdcb4 
>   engine/schema/src/com/cloud/host/dao/HostDaoImpl.java 07a4232 
>   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/manager/DedicatedApiUnitTest.java PRE-CREATION 
>   plugins/dedicated-resources/test/resource/dedicatedContext.xml PRE-CREATION 
>   plugins/pom.xml 2efa248 
>   server/src/com/cloud/api/query/QueryManagerImpl.java 5a25732 
>   server/src/com/cloud/configuration/ConfigurationManagerImpl.java 79375f9 
>   server/src/com/cloud/dc/DedicatedResourceVO.java PRE-CREATION 
>   server/src/com/cloud/dc/dao/DedicatedResourceDao.java PRE-CREATION 
>   server/src/com/cloud/dc/dao/DedicatedResourceDaoImpl.java PRE-CREATION 
>   server/src/com/cloud/resource/ResourceManagerImpl.java 74bd6d0 
>   server/src/com/cloud/user/AccountManagerImpl.java e72005e 
>   server/src/com/cloud/user/DomainManagerImpl.java 00a779e 
>   server/src/com/cloud/vm/UserVmManagerImpl.java a734d44 
>   server/test/org/apache/cloudstack/networkoffering/ChildTestConfiguration.java f862a2a 
>   setup/db/create-schema.sql b1feb02 
>   setup/db/db/schema-410to420.sql e081a25 
>   test/integration/component/test_explicit_dedication.py PRE-CREATION 
>   tools/apidoc/gen_toc.py 793f720 
> 
> Diff: https://reviews.apache.org/r/11379/diff/
> 
> 
> Testing
> -------
> 
> Unittest: For the new APIs and Service, added unit tests under : plugins/dedicated-resources/test/org/apache/cloudstack/dedicated/DedicatedApiUnitTest.java
> Marvin Test: To dedicate host, create affinity group, deploy-vm, check if vm is deployed on the dedicated host.
> Rat Build Successful.
> 
> 
> Thanks,
> 
> Saksham Srivastava
> 
>


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/11379/#review21189
-----------------------------------------------------------


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 30, 2013, 6:20 a.m., Saksham Srivastava wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/11379/
> -----------------------------------------------------------
> 
> (Updated May 30, 2013, 6:20 a.m.)
> 
> 
> Review request for cloudstack, Devdeep Singh and Prachi Damle.
> 
> 
> 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/CLOUDSTACK/dedicated-resources-private-zone-pod-cluster-host-functional-spec.html
> 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 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.
> 
> Created 2 patches for the bug:
> Patch 2 is for files that are modifying the files that have windows line endings. git am will not work for such files in a single patch.
> 
> 
> This addresses bug CLOUDSTACK-681.
> 
> 
> Diffs
> -----
> 
>   api/src/com/cloud/dc/DedicatedResources.java PRE-CREATION 
>   api/src/com/cloud/event/EventTypes.java 6dfb1ab 
>   client/pom.xml 0c38ecb 
>   client/tomcatconf/applicationContext.xml.in edf83a9 
>   client/tomcatconf/commands.properties.in fd5479f 
>   client/tomcatconf/componentContext.xml.in e946f44 
>   engine/orchestration/src/org/apache/cloudstack/platform/orchestration/CloudOrchestrator.java 963e4d7 
>   engine/schema/src/com/cloud/dc/dao/ClusterDao.java 3ce0798 
>   engine/schema/src/com/cloud/dc/dao/ClusterDaoImpl.java 86dc65e 
>   engine/schema/src/com/cloud/domain/dao/DomainDaoImpl.java 9460a73 
>   engine/schema/src/com/cloud/host/dao/HostDao.java 98bdcb4 
>   engine/schema/src/com/cloud/host/dao/HostDaoImpl.java 07a4232 
>   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/manager/DedicatedApiUnitTest.java PRE-CREATION 
>   plugins/dedicated-resources/test/resource/dedicatedContext.xml PRE-CREATION 
>   plugins/pom.xml 2efa248 
>   server/src/com/cloud/api/query/QueryManagerImpl.java 5a25732 
>   server/src/com/cloud/configuration/ConfigurationManagerImpl.java 79375f9 
>   server/src/com/cloud/dc/DedicatedResourceVO.java PRE-CREATION 
>   server/src/com/cloud/dc/dao/DedicatedResourceDao.java PRE-CREATION 
>   server/src/com/cloud/dc/dao/DedicatedResourceDaoImpl.java PRE-CREATION 
>   server/src/com/cloud/resource/ResourceManagerImpl.java 74bd6d0 
>   server/src/com/cloud/user/AccountManagerImpl.java e72005e 
>   server/src/com/cloud/user/DomainManagerImpl.java 00a779e 
>   server/src/com/cloud/vm/UserVmManagerImpl.java a734d44 
>   server/test/org/apache/cloudstack/networkoffering/ChildTestConfiguration.java f862a2a 
>   setup/db/create-schema.sql b1feb02 
>   setup/db/db/schema-410to420.sql e081a25 
>   test/integration/component/test_explicit_dedication.py PRE-CREATION 
>   tools/apidoc/gen_toc.py 793f720 
> 
> Diff: https://reviews.apache.org/r/11379/diff/
> 
> 
> Testing
> -------
> 
> Unittest: For the new APIs and Service, added unit tests under : plugins/dedicated-resources/test/org/apache/cloudstack/dedicated/DedicatedApiUnitTest.java
> Marvin Test: To dedicate host, create affinity group, deploy-vm, check if vm is deployed on the dedicated host.
> Rat Build Successful.
> 
> 
> Thanks,
> 
> Saksham Srivastava
> 
>


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

Posted by Saksham Srivastava <sa...@citrix.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/11379/
-----------------------------------------------------------

(Updated May 30, 2013, 6:20 a.m.)


Review request for cloudstack, Devdeep Singh and Prachi Damle.


Changes
-------

Updated Diff resolving merge conflicts.


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/CLOUDSTACK/dedicated-resources-private-zone-pod-cluster-host-functional-spec.html
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 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.

Created 2 patches for the bug:
Patch 2 is for files that are modifying the files that have windows line endings. git am will not work for such files in a single patch.


This addresses bug CLOUDSTACK-681.


Diffs (updated)
-----

  api/src/com/cloud/dc/DedicatedResources.java PRE-CREATION 
  api/src/com/cloud/event/EventTypes.java 6dfb1ab 
  client/pom.xml 0c38ecb 
  client/tomcatconf/applicationContext.xml.in edf83a9 
  client/tomcatconf/commands.properties.in fd5479f 
  client/tomcatconf/componentContext.xml.in e946f44 
  engine/orchestration/src/org/apache/cloudstack/platform/orchestration/CloudOrchestrator.java 963e4d7 
  engine/schema/src/com/cloud/dc/dao/ClusterDao.java 3ce0798 
  engine/schema/src/com/cloud/dc/dao/ClusterDaoImpl.java 86dc65e 
  engine/schema/src/com/cloud/domain/dao/DomainDaoImpl.java 9460a73 
  engine/schema/src/com/cloud/host/dao/HostDao.java 98bdcb4 
  engine/schema/src/com/cloud/host/dao/HostDaoImpl.java 07a4232 
  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/manager/DedicatedApiUnitTest.java PRE-CREATION 
  plugins/dedicated-resources/test/resource/dedicatedContext.xml PRE-CREATION 
  plugins/pom.xml 2efa248 
  server/src/com/cloud/api/query/QueryManagerImpl.java 5a25732 
  server/src/com/cloud/configuration/ConfigurationManagerImpl.java 79375f9 
  server/src/com/cloud/dc/DedicatedResourceVO.java PRE-CREATION 
  server/src/com/cloud/dc/dao/DedicatedResourceDao.java PRE-CREATION 
  server/src/com/cloud/dc/dao/DedicatedResourceDaoImpl.java PRE-CREATION 
  server/src/com/cloud/resource/ResourceManagerImpl.java 74bd6d0 
  server/src/com/cloud/user/AccountManagerImpl.java e72005e 
  server/src/com/cloud/user/DomainManagerImpl.java 00a779e 
  server/src/com/cloud/vm/UserVmManagerImpl.java a734d44 
  server/test/org/apache/cloudstack/networkoffering/ChildTestConfiguration.java f862a2a 
  setup/db/create-schema.sql b1feb02 
  setup/db/db/schema-410to420.sql e081a25 
  test/integration/component/test_explicit_dedication.py PRE-CREATION 
  tools/apidoc/gen_toc.py 793f720 

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


Testing
-------

Unittest: For the new APIs and Service, added unit tests under : plugins/dedicated-resources/test/org/apache/cloudstack/dedicated/DedicatedApiUnitTest.java
Marvin Test: To dedicate host, create affinity group, deploy-vm, check if vm is deployed on the dedicated host.
Rat Build Successful.


Thanks,

Saksham Srivastava


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/11379/#review21178
-----------------------------------------------------------

Ship it!


Changes look good. Thanks for incorporating all changes.

- Prachi Damle


On May 28, 2013, 1:05 p.m., Saksham Srivastava wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/11379/
> -----------------------------------------------------------
> 
> (Updated May 28, 2013, 1:05 p.m.)
> 
> 
> Review request for cloudstack, Devdeep Singh and Prachi Damle.
> 
> 
> 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/CLOUDSTACK/dedicated-resources-private-zone-pod-cluster-host-functional-spec.html
> 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 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.
> 
> Created 2 patches for the bug:
> Patch 2 is for files that are modifying the files that have windows line endings. git am will not work for such files in a single patch.
> 
> 
> This addresses bug CLOUDSTACK-681.
> 
> 
> Diffs
> -----
> 
>   api/src/com/cloud/dc/DedicatedResources.java PRE-CREATION 
>   api/src/com/cloud/event/EventTypes.java 6dfb1ab 
>   client/pom.xml 0c38ecb 
>   client/tomcatconf/applicationContext.xml.in edf83a9 
>   client/tomcatconf/commands.properties.in fd5479f 
>   client/tomcatconf/componentContext.xml.in e946f44 
>   engine/orchestration/src/org/apache/cloudstack/platform/orchestration/CloudOrchestrator.java 963e4d7 
>   engine/schema/src/com/cloud/dc/dao/ClusterDao.java 3ce0798 
>   engine/schema/src/com/cloud/dc/dao/ClusterDaoImpl.java 86dc65e 
>   engine/schema/src/com/cloud/domain/dao/DomainDaoImpl.java 9460a73 
>   engine/schema/src/com/cloud/host/dao/HostDao.java 98bdcb4 
>   engine/schema/src/com/cloud/host/dao/HostDaoImpl.java 07a4232 
>   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/manager/DedicatedApiUnitTest.java PRE-CREATION 
>   plugins/dedicated-resources/test/resource/dedicatedContext.xml PRE-CREATION 
>   plugins/pom.xml 2efa248 
>   server/src/com/cloud/api/query/QueryManagerImpl.java c586a7b 
>   server/src/com/cloud/configuration/ConfigurationManagerImpl.java 214e292 
>   server/src/com/cloud/dc/DedicatedResourceVO.java PRE-CREATION 
>   server/src/com/cloud/dc/dao/DedicatedResourceDao.java PRE-CREATION 
>   server/src/com/cloud/dc/dao/DedicatedResourceDaoImpl.java PRE-CREATION 
>   server/src/com/cloud/resource/ResourceManagerImpl.java 25f451e 
>   server/src/com/cloud/user/AccountManagerImpl.java e72005e 
>   server/src/com/cloud/user/DomainManagerImpl.java c451041 
>   server/src/com/cloud/vm/UserVmManagerImpl.java 96b9529 
>   server/test/org/apache/cloudstack/networkoffering/ChildTestConfiguration.java f862a2a 
>   setup/db/create-schema.sql b1feb02 
>   setup/db/db/schema-410to420.sql 348523f 
>   test/integration/component/test_explicit_dedication.py PRE-CREATION 
>   tools/apidoc/gen_toc.py 793f720 
> 
> Diff: https://reviews.apache.org/r/11379/diff/
> 
> 
> Testing
> -------
> 
> Unittest: For the new APIs and Service, added unit tests under : plugins/dedicated-resources/test/org/apache/cloudstack/dedicated/DedicatedApiUnitTest.java
> Marvin Test: To dedicate host, create affinity group, deploy-vm, check if vm is deployed on the dedicated host.
> Rat Build Successful.
> 
> 
> Thanks,
> 
> Saksham Srivastava
> 
>


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

Posted by Saksham Srivastava <sa...@citrix.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/11379/
-----------------------------------------------------------

(Updated May 28, 2013, 1:05 p.m.)


Review request for cloudstack, Devdeep Singh and Prachi Damle.


Changes
-------

Resolved latest merge conflicts and updating the patch.


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/CLOUDSTACK/dedicated-resources-private-zone-pod-cluster-host-functional-spec.html
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 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.

Created 2 patches for the bug:
Patch 2 is for files that are modifying the files that have windows line endings. git am will not work for such files in a single patch.


This addresses bug CLOUDSTACK-681.


Diffs (updated)
-----

  api/src/com/cloud/dc/DedicatedResources.java PRE-CREATION 
  api/src/com/cloud/event/EventTypes.java 6dfb1ab 
  client/pom.xml 0c38ecb 
  client/tomcatconf/applicationContext.xml.in edf83a9 
  client/tomcatconf/commands.properties.in fd5479f 
  client/tomcatconf/componentContext.xml.in e946f44 
  engine/orchestration/src/org/apache/cloudstack/platform/orchestration/CloudOrchestrator.java 963e4d7 
  engine/schema/src/com/cloud/dc/dao/ClusterDao.java 3ce0798 
  engine/schema/src/com/cloud/dc/dao/ClusterDaoImpl.java 86dc65e 
  engine/schema/src/com/cloud/domain/dao/DomainDaoImpl.java 9460a73 
  engine/schema/src/com/cloud/host/dao/HostDao.java 98bdcb4 
  engine/schema/src/com/cloud/host/dao/HostDaoImpl.java 07a4232 
  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/manager/DedicatedApiUnitTest.java PRE-CREATION 
  plugins/dedicated-resources/test/resource/dedicatedContext.xml PRE-CREATION 
  plugins/pom.xml 2efa248 
  server/src/com/cloud/api/query/QueryManagerImpl.java c586a7b 
  server/src/com/cloud/configuration/ConfigurationManagerImpl.java 214e292 
  server/src/com/cloud/dc/DedicatedResourceVO.java PRE-CREATION 
  server/src/com/cloud/dc/dao/DedicatedResourceDao.java PRE-CREATION 
  server/src/com/cloud/dc/dao/DedicatedResourceDaoImpl.java PRE-CREATION 
  server/src/com/cloud/resource/ResourceManagerImpl.java 25f451e 
  server/src/com/cloud/user/AccountManagerImpl.java e72005e 
  server/src/com/cloud/user/DomainManagerImpl.java c451041 
  server/src/com/cloud/vm/UserVmManagerImpl.java 96b9529 
  server/test/org/apache/cloudstack/networkoffering/ChildTestConfiguration.java f862a2a 
  setup/db/create-schema.sql b1feb02 
  setup/db/db/schema-410to420.sql 348523f 
  test/integration/component/test_explicit_dedication.py PRE-CREATION 
  tools/apidoc/gen_toc.py 793f720 

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


Testing
-------

Unittest: For the new APIs and Service, added unit tests under : plugins/dedicated-resources/test/org/apache/cloudstack/dedicated/DedicatedApiUnitTest.java
Marvin Test: To dedicate host, create affinity group, deploy-vm, check if vm is deployed on the dedicated host.
Rat Build Successful.


Thanks,

Saksham Srivastava


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

Posted by Saksham Srivastava <sa...@citrix.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/11379/
-----------------------------------------------------------

(Updated May 28, 2013, 1:46 a.m.)


Review request for cloudstack, Devdeep Singh and Prachi Damle.


Changes
-------

Updated Diff with Prachi's suggestion on List API changes.
For additional changes on adding 'isDedicated' flag to existing list APIs of host/cluster/pod/zone, and enhancing the APIs to get details about which account the resource is dedicated to,  I will create issues on Jira and track them separately. 


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/CLOUDSTACK/dedicated-resources-private-zone-pod-cluster-host-functional-spec.html
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 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.

Created 2 patches for the bug:
Patch 2 is for files that are modifying the files that have windows line endings. git am will not work for such files in a single patch.


This addresses bug CLOUDSTACK-681.


Diffs (updated)
-----

  api/src/com/cloud/dc/DedicatedResources.java PRE-CREATION 
  api/src/com/cloud/event/EventTypes.java da96294 
  client/pom.xml 0c38ecb 
  client/tomcatconf/applicationContext.xml.in edf83a9 
  client/tomcatconf/commands.properties.in fd5479f 
  client/tomcatconf/componentContext.xml.in e946f44 
  engine/orchestration/src/org/apache/cloudstack/platform/orchestration/CloudOrchestrator.java 963e4d7 
  engine/schema/src/com/cloud/dc/dao/ClusterDao.java 3ce0798 
  engine/schema/src/com/cloud/dc/dao/ClusterDaoImpl.java 86dc65e 
  engine/schema/src/com/cloud/domain/dao/DomainDaoImpl.java 9460a73 
  engine/schema/src/com/cloud/host/dao/HostDao.java 98bdcb4 
  engine/schema/src/com/cloud/host/dao/HostDaoImpl.java 07a4232 
  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/manager/DedicatedApiUnitTest.java PRE-CREATION 
  plugins/dedicated-resources/test/resource/dedicatedContext.xml PRE-CREATION 
  plugins/pom.xml 2efa248 
  server/src/com/cloud/api/query/QueryManagerImpl.java c586a7b 
  server/src/com/cloud/configuration/ConfigurationManagerImpl.java 214e292 
  server/src/com/cloud/dc/DedicatedResourceVO.java PRE-CREATION 
  server/src/com/cloud/dc/dao/DedicatedResourceDao.java PRE-CREATION 
  server/src/com/cloud/dc/dao/DedicatedResourceDaoImpl.java PRE-CREATION 
  server/src/com/cloud/resource/ResourceManagerImpl.java 25f451e 
  server/src/com/cloud/user/AccountManagerImpl.java 7421422 
  server/src/com/cloud/user/DomainManagerImpl.java c451041 
  server/src/com/cloud/vm/UserVmManagerImpl.java 96b9529 
  server/test/org/apache/cloudstack/networkoffering/ChildTestConfiguration.java f862a2a 
  setup/db/create-schema.sql b1feb02 
  setup/db/db/schema-410to420.sql 435bb83 
  test/integration/component/test_explicit_dedication.py PRE-CREATION 
  tools/apidoc/gen_toc.py 793f720 

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


Testing
-------

Unittest: For the new APIs and Service, added unit tests under : plugins/dedicated-resources/test/org/apache/cloudstack/dedicated/DedicatedApiUnitTest.java
Marvin Test: To dedicate host, create affinity group, deploy-vm, check if vm is deployed on the dedicated host.
Rat Build Successful.


Thanks,

Saksham Srivastava


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

Posted by Pranav Saxena <pr...@citrix.com>.
Hi Prachi ,

Regarding the 3rd point you just mentioned - If in case you are thinking from the UI perspective , then this change is not required since I can have the flags set to Yes/No through some UI code hacks for each of those resources. But yes, if you still want those flags to be set in the API's , may be if someone is using the APIs or  Cloudmonkey to infer information about a particular resource (if it's dedicated/not dedicated assuming the dedicate resource plugin is being used by the admin) , then there is no doubt that we should be refraining from incorporating that flag in the list *API's . 

All upto you to take a decision on this !!

Thanks,
Pranav

-----Original Message-----
From: Prachi Damle [mailto:noreply@reviews.apache.org] On Behalf Of Prachi Damle
Sent: Saturday, May 25, 2013 5:26 AM
To: Prachi Damle; Devdeep Singh
Cc: Saksham Srivastava; cloudstack
Subject: 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/11379/#review21039
-----------------------------------------------------------


About listDedicated* API's:
1) The response should include a count of the entities listed.
   To do this, we should use the method GenericDaoBase.searchAndCount() which serached using a given criteria and also counts the entities in the result. Refer API ListPodsByCmd.
2) The list API should not throw error if no match is found for the given criteria - instead the result should be an empty list. Whne the #1 is incorporated, this will be taken care of
3) For existing list APIs of host/cluster/pod/zone, I think it will be good to add a flag 'isDedicated' to the responses to indicate if the resource is dedicated to some account. Further, to get details about which account the resource is dedicated to, caller can issue a listDedicate* API. 
   To do this, we will need to create a view joining the two tables - say for pod, join host_pod_ref and dedicated_resources and add *Join VO/Dao/DaoImpl and use that for listing pods - refer the listServiceOffering API to see this pattern 

- Prachi Damle


On May 24, 2013, 7:30 p.m., Saksham Srivastava wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/11379/
> -----------------------------------------------------------
> 
> (Updated May 24, 2013, 7:30 p.m.)
> 
> 
> Review request for cloudstack, Devdeep Singh and Prachi Damle.
> 
> 
> 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/CLOUDSTACK/dedicated-resources-private-zone-p
> od-cluster-host-functional-spec.html
> 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 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/Dedic
> atedApiUnitTest.java 16. Marvin Test: To dedicate host, create 
> affinity group, deploy-vm, check if vm is deployed on the dedicated host.
> 
> Created 2 patches for the bug:
> Patch 2 is for files that are modifying the files that have windows line endings. git am will not work for such files in a single patch.
> 
> 
> This addresses bug CLOUDSTACK-681.
> 
> 
> Diffs
> -----
> 
>   api/src/com/cloud/dc/DedicatedResources.java PRE-CREATION 
>   api/src/com/cloud/event/EventTypes.java da96294 
>   client/pom.xml 0c38ecb 
>   client/tomcatconf/applicationContext.xml.in edf83a9 
>   client/tomcatconf/commands.properties.in fd5479f 
>   client/tomcatconf/componentContext.xml.in e946f44 
>   engine/orchestration/src/org/apache/cloudstack/platform/orchestration/CloudOrchestrator.java 963e4d7 
>   engine/schema/src/com/cloud/dc/dao/ClusterDao.java 3ce0798 
>   engine/schema/src/com/cloud/dc/dao/ClusterDaoImpl.java 86dc65e 
>   engine/schema/src/com/cloud/domain/dao/DomainDaoImpl.java 9460a73 
>   engine/schema/src/com/cloud/host/dao/HostDao.java 98bdcb4 
>   engine/schema/src/com/cloud/host/dao/HostDaoImpl.java 07a4232 
>   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/manager/DedicatedApiUnitTest.java PRE-CREATION 
>   plugins/dedicated-resources/test/resource/dedicatedContext.xml PRE-CREATION 
>   plugins/pom.xml 2efa248 
>   server/src/com/cloud/api/query/QueryManagerImpl.java c586a7b 
>   server/src/com/cloud/configuration/ConfigurationManagerImpl.java 214e292 
>   server/src/com/cloud/dc/DedicatedResourceVO.java PRE-CREATION 
>   server/src/com/cloud/dc/dao/DedicatedResourceDao.java PRE-CREATION 
>   server/src/com/cloud/dc/dao/DedicatedResourceDaoImpl.java PRE-CREATION 
>   server/src/com/cloud/resource/ResourceManagerImpl.java 25f451e 
>   server/src/com/cloud/user/AccountManagerImpl.java 7421422 
>   server/src/com/cloud/user/DomainManagerImpl.java c451041 
>   server/src/com/cloud/vm/UserVmManagerImpl.java 96b9529 
>   server/test/org/apache/cloudstack/networkoffering/ChildTestConfiguration.java f862a2a 
>   setup/db/create-schema.sql b1feb02 
>   setup/db/db/schema-410to420.sql 435bb83 
>   test/integration/component/test_explicit_dedication.py PRE-CREATION 
>   tools/apidoc/gen_toc.py 793f720
> 
> Diff: https://reviews.apache.org/r/11379/diff/
> 
> 
> Testing
> -------
> 
> Unittest: For the new APIs and Service, added unit tests under : 
> plugins/dedicated-resources/test/org/apache/cloudstack/dedicated/Dedic
> atedApiUnitTest.java Marvin Test: To dedicate host, create affinity 
> group, deploy-vm, check if vm is deployed on the dedicated host.
> Rat Build Successful.
> 
> 
> Thanks,
> 
> Saksham Srivastava
> 
>


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/11379/#review21039
-----------------------------------------------------------


About listDedicated* API's:
1) The response should include a count of the entities listed.
   To do this, we should use the method GenericDaoBase.searchAndCount() which serached using a given criteria and also counts the entities in the result. Refer API ListPodsByCmd.
2) The list API should not throw error if no match is found for the given criteria - instead the result should be an empty list. Whne the #1 is incorporated, this will be taken care of
3) For existing list APIs of host/cluster/pod/zone, I think it will be good to add a flag 'isDedicated' to the responses to indicate if the resource is dedicated to some account. Further, to get details about which account the resource is dedicated to, caller can issue a listDedicate* API. 
   To do this, we will need to create a view joining the two tables - say for pod, join host_pod_ref and dedicated_resources and add *Join VO/Dao/DaoImpl and use that for listing pods - refer the listServiceOffering API to see this pattern 

- Prachi Damle


On May 24, 2013, 7:30 p.m., Saksham Srivastava wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/11379/
> -----------------------------------------------------------
> 
> (Updated May 24, 2013, 7:30 p.m.)
> 
> 
> Review request for cloudstack, Devdeep Singh and Prachi Damle.
> 
> 
> 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/CLOUDSTACK/dedicated-resources-private-zone-pod-cluster-host-functional-spec.html
> 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 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.
> 
> Created 2 patches for the bug:
> Patch 2 is for files that are modifying the files that have windows line endings. git am will not work for such files in a single patch.
> 
> 
> This addresses bug CLOUDSTACK-681.
> 
> 
> Diffs
> -----
> 
>   api/src/com/cloud/dc/DedicatedResources.java PRE-CREATION 
>   api/src/com/cloud/event/EventTypes.java da96294 
>   client/pom.xml 0c38ecb 
>   client/tomcatconf/applicationContext.xml.in edf83a9 
>   client/tomcatconf/commands.properties.in fd5479f 
>   client/tomcatconf/componentContext.xml.in e946f44 
>   engine/orchestration/src/org/apache/cloudstack/platform/orchestration/CloudOrchestrator.java 963e4d7 
>   engine/schema/src/com/cloud/dc/dao/ClusterDao.java 3ce0798 
>   engine/schema/src/com/cloud/dc/dao/ClusterDaoImpl.java 86dc65e 
>   engine/schema/src/com/cloud/domain/dao/DomainDaoImpl.java 9460a73 
>   engine/schema/src/com/cloud/host/dao/HostDao.java 98bdcb4 
>   engine/schema/src/com/cloud/host/dao/HostDaoImpl.java 07a4232 
>   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/manager/DedicatedApiUnitTest.java PRE-CREATION 
>   plugins/dedicated-resources/test/resource/dedicatedContext.xml PRE-CREATION 
>   plugins/pom.xml 2efa248 
>   server/src/com/cloud/api/query/QueryManagerImpl.java c586a7b 
>   server/src/com/cloud/configuration/ConfigurationManagerImpl.java 214e292 
>   server/src/com/cloud/dc/DedicatedResourceVO.java PRE-CREATION 
>   server/src/com/cloud/dc/dao/DedicatedResourceDao.java PRE-CREATION 
>   server/src/com/cloud/dc/dao/DedicatedResourceDaoImpl.java PRE-CREATION 
>   server/src/com/cloud/resource/ResourceManagerImpl.java 25f451e 
>   server/src/com/cloud/user/AccountManagerImpl.java 7421422 
>   server/src/com/cloud/user/DomainManagerImpl.java c451041 
>   server/src/com/cloud/vm/UserVmManagerImpl.java 96b9529 
>   server/test/org/apache/cloudstack/networkoffering/ChildTestConfiguration.java f862a2a 
>   setup/db/create-schema.sql b1feb02 
>   setup/db/db/schema-410to420.sql 435bb83 
>   test/integration/component/test_explicit_dedication.py PRE-CREATION 
>   tools/apidoc/gen_toc.py 793f720 
> 
> Diff: https://reviews.apache.org/r/11379/diff/
> 
> 
> Testing
> -------
> 
> Unittest: For the new APIs and Service, added unit tests under : plugins/dedicated-resources/test/org/apache/cloudstack/dedicated/DedicatedApiUnitTest.java
> Marvin Test: To dedicate host, create affinity group, deploy-vm, check if vm is deployed on the dedicated host.
> Rat Build Successful.
> 
> 
> Thanks,
> 
> Saksham Srivastava
> 
>


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

Posted by Saksham Srivastava <sa...@citrix.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/11379/
-----------------------------------------------------------

(Updated May 24, 2013, 7:30 p.m.)


Review request for cloudstack, Devdeep Singh and Prachi Damle.


Changes
-------

Updated the patch, with Rajesh's comment.


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/CLOUDSTACK/dedicated-resources-private-zone-pod-cluster-host-functional-spec.html
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 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.

Created 2 patches for the bug:
Patch 2 is for files that are modifying the files that have windows line endings. git am will not work for such files in a single patch.


This addresses bug CLOUDSTACK-681.


Diffs (updated)
-----

  api/src/com/cloud/dc/DedicatedResources.java PRE-CREATION 
  api/src/com/cloud/event/EventTypes.java da96294 
  client/pom.xml 0c38ecb 
  client/tomcatconf/applicationContext.xml.in edf83a9 
  client/tomcatconf/commands.properties.in fd5479f 
  client/tomcatconf/componentContext.xml.in e946f44 
  engine/orchestration/src/org/apache/cloudstack/platform/orchestration/CloudOrchestrator.java 963e4d7 
  engine/schema/src/com/cloud/dc/dao/ClusterDao.java 3ce0798 
  engine/schema/src/com/cloud/dc/dao/ClusterDaoImpl.java 86dc65e 
  engine/schema/src/com/cloud/domain/dao/DomainDaoImpl.java 9460a73 
  engine/schema/src/com/cloud/host/dao/HostDao.java 98bdcb4 
  engine/schema/src/com/cloud/host/dao/HostDaoImpl.java 07a4232 
  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/manager/DedicatedApiUnitTest.java PRE-CREATION 
  plugins/dedicated-resources/test/resource/dedicatedContext.xml PRE-CREATION 
  plugins/pom.xml 2efa248 
  server/src/com/cloud/api/query/QueryManagerImpl.java c586a7b 
  server/src/com/cloud/configuration/ConfigurationManagerImpl.java 214e292 
  server/src/com/cloud/dc/DedicatedResourceVO.java PRE-CREATION 
  server/src/com/cloud/dc/dao/DedicatedResourceDao.java PRE-CREATION 
  server/src/com/cloud/dc/dao/DedicatedResourceDaoImpl.java PRE-CREATION 
  server/src/com/cloud/resource/ResourceManagerImpl.java 25f451e 
  server/src/com/cloud/user/AccountManagerImpl.java 7421422 
  server/src/com/cloud/user/DomainManagerImpl.java c451041 
  server/src/com/cloud/vm/UserVmManagerImpl.java 96b9529 
  server/test/org/apache/cloudstack/networkoffering/ChildTestConfiguration.java f862a2a 
  setup/db/create-schema.sql b1feb02 
  setup/db/db/schema-410to420.sql 435bb83 
  test/integration/component/test_explicit_dedication.py PRE-CREATION 
  tools/apidoc/gen_toc.py 793f720 

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


Testing
-------

Unittest: For the new APIs and Service, added unit tests under : plugins/dedicated-resources/test/org/apache/cloudstack/dedicated/DedicatedApiUnitTest.java
Marvin Test: To dedicate host, create affinity group, deploy-vm, check if vm is deployed on the dedicated host.
Rat Build Successful.


Thanks,

Saksham Srivastava


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

Posted by Saksham Srivastava <sa...@citrix.com>.

> On May 24, 2013, 4:31 p.m., Rajesh Battala wrote:
> > engine/schema/src/com/cloud/host/dao/HostDaoImpl.java, line 223
> > <https://reviews.apache.org/r/11379/diff/1/?file=296552#file296552line223>
> >
> >     current code is searching with "pod" and it is replacing with "podId" make sure this won't break other calls.

It should not break because the search builder is used from findByPodId and expects podId.


> On May 24, 2013, 4:31 p.m., Rajesh Battala wrote:
> > plugins/dedicated-resources/src/org/apache/cloudstack/dedicated/api/commands/ReleaseDedicatedPodCmd.java, line 35
> > <https://reviews.apache.org/r/11379/diff/1/?file=296566#file296566line35>
> >
> >     Api Command Description is not proper. have the description to be specific not generic ("release the dedication")

Fixed for all resources.


- Saksham


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


On May 24, 2013, 7:30 p.m., Saksham Srivastava wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/11379/
> -----------------------------------------------------------
> 
> (Updated May 24, 2013, 7:30 p.m.)
> 
> 
> Review request for cloudstack, Devdeep Singh and Prachi Damle.
> 
> 
> 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/CLOUDSTACK/dedicated-resources-private-zone-pod-cluster-host-functional-spec.html
> 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 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.
> 
> Created 2 patches for the bug:
> Patch 2 is for files that are modifying the files that have windows line endings. git am will not work for such files in a single patch.
> 
> 
> This addresses bug CLOUDSTACK-681.
> 
> 
> Diffs
> -----
> 
>   api/src/com/cloud/dc/DedicatedResources.java PRE-CREATION 
>   api/src/com/cloud/event/EventTypes.java da96294 
>   client/pom.xml 0c38ecb 
>   client/tomcatconf/applicationContext.xml.in edf83a9 
>   client/tomcatconf/commands.properties.in fd5479f 
>   client/tomcatconf/componentContext.xml.in e946f44 
>   engine/orchestration/src/org/apache/cloudstack/platform/orchestration/CloudOrchestrator.java 963e4d7 
>   engine/schema/src/com/cloud/dc/dao/ClusterDao.java 3ce0798 
>   engine/schema/src/com/cloud/dc/dao/ClusterDaoImpl.java 86dc65e 
>   engine/schema/src/com/cloud/domain/dao/DomainDaoImpl.java 9460a73 
>   engine/schema/src/com/cloud/host/dao/HostDao.java 98bdcb4 
>   engine/schema/src/com/cloud/host/dao/HostDaoImpl.java 07a4232 
>   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/manager/DedicatedApiUnitTest.java PRE-CREATION 
>   plugins/dedicated-resources/test/resource/dedicatedContext.xml PRE-CREATION 
>   plugins/pom.xml 2efa248 
>   server/src/com/cloud/api/query/QueryManagerImpl.java c586a7b 
>   server/src/com/cloud/configuration/ConfigurationManagerImpl.java 214e292 
>   server/src/com/cloud/dc/DedicatedResourceVO.java PRE-CREATION 
>   server/src/com/cloud/dc/dao/DedicatedResourceDao.java PRE-CREATION 
>   server/src/com/cloud/dc/dao/DedicatedResourceDaoImpl.java PRE-CREATION 
>   server/src/com/cloud/resource/ResourceManagerImpl.java 25f451e 
>   server/src/com/cloud/user/AccountManagerImpl.java 7421422 
>   server/src/com/cloud/user/DomainManagerImpl.java c451041 
>   server/src/com/cloud/vm/UserVmManagerImpl.java 96b9529 
>   server/test/org/apache/cloudstack/networkoffering/ChildTestConfiguration.java f862a2a 
>   setup/db/create-schema.sql b1feb02 
>   setup/db/db/schema-410to420.sql 435bb83 
>   test/integration/component/test_explicit_dedication.py PRE-CREATION 
>   tools/apidoc/gen_toc.py 793f720 
> 
> Diff: https://reviews.apache.org/r/11379/diff/
> 
> 
> Testing
> -------
> 
> Unittest: For the new APIs and Service, added unit tests under : plugins/dedicated-resources/test/org/apache/cloudstack/dedicated/DedicatedApiUnitTest.java
> Marvin Test: To dedicate host, create affinity group, deploy-vm, check if vm is deployed on the dedicated host.
> Rat Build Successful.
> 
> 
> Thanks,
> 
> Saksham Srivastava
> 
>


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

Posted by Rajesh Battala <ra...@citrix.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/11379/#review21000
-----------------------------------------------------------



client/tomcatconf/commands.properties.in
<https://reviews.apache.org/r/11379/#comment43451>

    patch is re-writing the command to wrong name. don't change the command name. It will fail the revertToVMSnapshot command



engine/orchestration/src/org/apache/cloudstack/platform/orchestration/CloudOrchestrator.java
<https://reviews.apache.org/r/11379/#comment43452>

    remove auto generated TODOs



engine/schema/src/com/cloud/host/dao/HostDaoImpl.java
<https://reviews.apache.org/r/11379/#comment43457>

    current code is searching with "pod" and it is replacing with "podId" make sure this won't break other calls.



plugins/dedicated-resources/src/org/apache/cloudstack/dedicated/api/commands/ReleaseDedicatedPodCmd.java
<https://reviews.apache.org/r/11379/#comment43459>

    Api Command Description is not proper. have the description to be specific not generic ("release the dedication") 


- Rajesh Battala


On May 24, 2013, 2:37 p.m., Saksham Srivastava wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/11379/
> -----------------------------------------------------------
> 
> (Updated May 24, 2013, 2:37 p.m.)
> 
> 
> Review request for cloudstack, Devdeep Singh and Prachi Damle.
> 
> 
> 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/CLOUDSTACK/dedicated-resources-private-zone-pod-cluster-host-functional-spec.html
> 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 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.
> 
> Created 2 patches for the bug:
> Patch 2 is for files that are modifying the files that have windows line endings. git am will not work for such files in a single patch.
> 
> 
> This addresses bug CLOUDSTACK-681.
> 
> 
> Diffs
> -----
> 
>   api/src/com/cloud/dc/DedicatedResources.java PRE-CREATION 
>   api/src/com/cloud/event/EventTypes.java da96294 
>   client/pom.xml 0c38ecb 
>   client/tomcatconf/applicationContext.xml.in edf83a9 
>   client/tomcatconf/commands.properties.in fd5479f 
>   client/tomcatconf/componentContext.xml.in e946f44 
>   engine/orchestration/src/org/apache/cloudstack/platform/orchestration/CloudOrchestrator.java 963e4d7 
>   engine/schema/src/com/cloud/dc/dao/ClusterDao.java 3ce0798 
>   engine/schema/src/com/cloud/dc/dao/ClusterDaoImpl.java 86dc65e 
>   engine/schema/src/com/cloud/domain/dao/DomainDaoImpl.java 9460a73 
>   engine/schema/src/com/cloud/host/dao/HostDao.java 98bdcb4 
>   engine/schema/src/com/cloud/host/dao/HostDaoImpl.java 07a4232 
>   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/manager/DedicatedApiUnitTest.java PRE-CREATION 
>   plugins/dedicated-resources/test/resource/dedicatedContext.xml PRE-CREATION 
>   plugins/pom.xml 2efa248 
>   server/src/com/cloud/api/query/QueryManagerImpl.java c586a7b 
>   server/src/com/cloud/configuration/ConfigurationManagerImpl.java 214e292 
>   server/src/com/cloud/dc/DedicatedResourceVO.java PRE-CREATION 
>   server/src/com/cloud/dc/dao/DedicatedResourceDao.java PRE-CREATION 
>   server/src/com/cloud/dc/dao/DedicatedResourceDaoImpl.java PRE-CREATION 
>   server/src/com/cloud/resource/ResourceManagerImpl.java 25f451e 
>   server/src/com/cloud/user/AccountManagerImpl.java 7421422 
>   server/src/com/cloud/user/DomainManagerImpl.java c451041 
>   server/src/com/cloud/vm/UserVmManagerImpl.java 96b9529 
>   server/test/org/apache/cloudstack/networkoffering/ChildTestConfiguration.java f862a2a 
>   setup/db/create-schema.sql b1feb02 
>   setup/db/db/schema-410to420.sql 435bb83 
>   test/integration/component/test_explicit_dedication.py PRE-CREATION 
>   tools/apidoc/gen_toc.py 793f720 
> 
> Diff: https://reviews.apache.org/r/11379/diff/
> 
> 
> Testing
> -------
> 
> Unittest: For the new APIs and Service, added unit tests under : plugins/dedicated-resources/test/org/apache/cloudstack/dedicated/DedicatedApiUnitTest.java
> Marvin Test: To dedicate host, create affinity group, deploy-vm, check if vm is deployed on the dedicated host.
> Rat Build Successful.
> 
> 
> Thanks,
> 
> Saksham Srivastava
> 
>