{"action":"created","issue":{"url":"https://api.github.com/repos/apache/cloudstack/issues/1134","labels_url":"https://api.github.com/repos/apache/cloudstack/issues/1134/labels{/name}","comments_url":"https://api.github.com/repos/apache/cloudstack/issues/1134/comments","events_url":"https://api.github.com/repos/apache/cloudstack/issues/1134/events","html_url":"https://github.com/apache/cloudstack/pull/1134","id":119238825,"number":1134,"title":"CLOUDSTACK-6276 Fixing affinity groups for projects","user":{"login":"pdube","id":2355044,"avatar_url":"https://avatars.githubusercontent.com/u/2355044?v=3","gravatar_id":"","url":"https://api.github.com/users/pdube","html_url":"https://github.com/pdube","followers_url":"https://api.github.com/users/pdube/followers","following_url":"https://api.github.com/users/pdube/following{/other_user}","gists_url":"https://api.github.com/users/pdube/gists{/gist_id}","starred_url":"https://api.github.com/users/pdube/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pdube/subscriptions","organizations_url":"https://api.github.com/users/pdube/orgs","repos_url":"https://api.github.com/users/pdube/repos","events_url":"https://api.github.com/users/pdube/events{/privacy}","received_events_url":"https://api.github.com/users/pdube/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":11,"created_at":"2015-11-27T19:27:47Z","updated_at":"2015-12-01T14:57:20Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/apache/cloudstack/pulls/1134","html_url":"https://github.com/apache/cloudstack/pull/1134","diff_url":"https://github.com/apache/cloudstack/pull/1134.diff","patch_url":"https://github.com/apache/cloudstack/pull/1134.patch"},"body":"With some contributions from @resmo and @ustcweizhou.\r\nThis closes https://github.com/apache/cloudstack/pull/508\r\n\r\nTo test manually (need at least 2 hosts):\r\nCreate a project\r\nCreate an affinity group in that project\r\nDeploy a vm with that affinity group\r\nDeploy a second vm with that affinity group\r\nThey should be on different hosts\r\n\r\nRan old and new tests for affinity groups on the simulator\r\n\r\nTest create affinity group as admin in project ... === TestName: test_01_admin_create_aff_grp_for_project | Status : SUCCESS ===\r\nok\r\nTest create affinity group as domain admin for projects ... === TestName: test_02_doadmin_create_aff_grp_for_project | Status : SUCCESS ===\r\nok\r\nTest create affinity group as user for projects ... === TestName: test_03_user_create_aff_grp_for_project | Status : SUCCESS ===\r\nok\r\nTest create affinity group that exists (same name) for projects ... === TestName: test_4_user_create_aff_grp_existing_name_for_project | Status : SUCCESS ===\r\nok\r\n#Delete Affinity Group by id. ... === TestName: test_01_delete_aff_grp_by_id | Status : SUCCESS ===\r\nok\r\n#Delete Affinity Group by id should fail for user not in project ... === TestName: test_02_delete_aff_grp_by_id_another_user | Status : SUCCESS ===\r\nok\r\ntest DeployVM in anti-affinity groups ... === TestName: test_01_deploy_vm_anti_affinity_group | Status : SUCCESS ===\r\nok\r\ntest DeployVM in anti-affinity groups with more vms than hosts. ... === TestName: test_02_deploy_vm_anti_affinity_group_fail_on_not_enough_hosts | Status : SUCCESS ===\r\nok\r\nList affinity group for a vm for projects ... === TestName: test_01_list_aff_grps_for_vm | Status : SUCCESS ===\r\nok\r\nList multiple affinity groups associated with a vm for projects ... === TestName: test_02_list_multiple_aff_grps_for_vm | Status : SUCCESS ===\r\nok\r\nList affinity groups by id for projects ... === TestName: test_03_list_aff_grps_by_id | Status : SUCCESS ===\r\nok\r\nList Affinity Groups by name for projects ... === TestName: test_04_list_aff_grps_by_name | Status : SUCCESS ===\r\nok\r\nList Affinity Groups by non-existing id for projects ... === TestName: test_05_list_aff_grps_by_non_existing_id | Status : SUCCESS ===\r\nok\r\nList Affinity Groups by non-existing name for projects ... === TestName: test_06_list_aff_grps_by_non_existing_name | Status : SUCCESS ===\r\nok\r\nList affinity group should list all for a vms associated with that group for projects ... === TestName: test_07_list_all_vms_in_aff_grp | Status : SUCCESS ===\r\nok\r\nUpdate the list of affinityGroups by using affinity groupids ... === TestName: test_01_update_aff_grp_by_ids | Status : SUCCESS ===\r\nok\r\n\r\n----------------------------------------------------------------------\r\nRan 16 tests in 581.706s\r\n\r\nOK\r\n\r\n\r\n\r\nDeploy vm as Admin in Affinity Group belonging to regular user (should fail) ... === TestName: test_01_deploy_vm_another_user | Status : SUCCESS ===\r\nok\r\nCreate Affinity Group as admin for regular user ... === TestName: test_02_create_aff_grp_user | Status : SUCCESS ===\r\nok\r\nList Affinity Groups as admin for all the users ... === TestName: test_03_list_aff_grp_all_users | Status : SUCCESS ===\r\nok\r\nList Affinity Groups belonging to admin user ... === TestName: test_04_list_all_admin_aff_grp | Status : SUCCESS ===\r\nok\r\nList Affinity Groups belonging to regular user passing account id and domain id ... === TestName: test_05_list_all_users_aff_grp | Status : SUCCESS ===\r\nok\r\nList Affinity Groups belonging to regular user passing group id ... === TestName: test_06_list_all_users_aff_grp_by_id | Status : SUCCESS ===\r\nok\r\nDelete Affinity Group belonging to regular user ... === TestName: test_07_delete_aff_grp_of_other_user | Status : SUCCESS ===\r\nok\r\nTest create affinity group as admin ... === TestName: test_01_admin_create_aff_grp | Status : SUCCESS ===\r\nok\r\nTest create affinity group as domain admin ... === TestName: test_02_doadmin_create_aff_grp | Status : SUCCESS ===\r\nok\r\nTest create affinity group as user ... === TestName: test_03_user_create_aff_grp | Status : SUCCESS ===\r\nok\r\nTest create affinity group that exists (same name) ... === TestName: test_04_user_create_aff_grp_existing_name | Status : SUCCESS ===\r\nok\r\nTest create affinity group with existing name but within different account ... === TestName: test_05_create_aff_grp_same_name_diff_acc | Status : SUCCESS ===\r\nok\r\nTest create affinity group of non-existing type ... === TestName: test_06_create_aff_grp_nonexisting_type | Status : SUCCESS ===\r\nok\r\nDelete Affinity Group by name ... === TestName: test_01_delete_aff_grp_by_name | Status : SUCCESS ===\r\nok\r\nDelete Affinity Group as admin for an account ... === TestName: test_02_delete_aff_grp_for_acc | Status : SUCCESS ===\r\nok\r\nDelete Affinity Group which has vms in it ... === TestName: test_03_delete_aff_grp_with_vms | Status : SUCCESS ===\r\nok\r\nDelete Affinity Group with id which does not belong to this user ... === TestName: test_05_delete_aff_grp_id | Status : SUCCESS ===\r\nok\r\nDelete Affinity Group by name which does not belong to this user ... === TestName: test_06_delete_aff_grp_name | Status : SUCCESS ===\r\nok\r\nDelete Affinity Group by id. ... === TestName: test_08_delete_aff_grp_by_id | Status : SUCCESS ===\r\nok\r\nRoot admin should be able to delete affinity group of other users ... === TestName: test_09_delete_aff_grp_root_admin | Status : SUCCESS ===\r\nok\r\nDeploy VM without affinity group ... === TestName: test_01_deploy_vm_without_aff_grp | Status : SUCCESS ===\r\nok\r\nDeploy VM by aff grp name ... === TestName: test_02_deploy_vm_by_aff_grp_name | Status : SUCCESS ===\r\nok\r\nDeploy VM by aff grp id ... === TestName: test_03_deploy_vm_by_aff_grp_id | Status : SUCCESS ===\r\nok\r\ntest DeployVM in anti-affinity groups ... === TestName: test_04_deploy_vm_anti_affinity_group | Status : SUCCESS ===\r\nok\r\nDeploy vms by affinity group id ... === TestName: test_05_deploy_vm_by_id | Status : SUCCESS ===\r\nok\r\nDeploy vm in affinity group of another user by name ... === TestName: test_06_deploy_vm_aff_grp_of_other_user_by_name | Status : SUCCESS ===\r\nok\r\nDeploy vm in affinity group of another user by id ... === TestName: test_07_deploy_vm_aff_grp_of_other_user_by_id | Status : SUCCESS ===\r\nok\r\nDeploy vm in multiple affinity groups ... === TestName: test_08_deploy_vm_multiple_aff_grps | Status : SUCCESS ===\r\nok\r\nDeploy multiple vms in multiple affinity groups ... === TestName: test_09_deploy_vm_multiple_aff_grps | Status : SUCCESS ===\r\nok\r\nDeploy VM by aff grp name and id ... === TestName: test_10_deploy_vm_by_aff_grp_name_and_id | Status : SUCCESS ===\r\nok\r\nList affinity group for a vm ... === TestName: test_01_list_aff_grps_for_vm | Status : SUCCESS ===\r\nok\r\nList multiple affinity groups associated with a vm ... === TestName: test_02_list_multiple_aff_grps_for_vm | Status : SUCCESS ===\r\nok\r\nList affinity groups by id ... === TestName: test_03_list_aff_grps_by_id | Status : SUCCESS ===\r\nok\r\nList Affinity Groups by name ... === TestName: test_04_list_aff_grps_by_name | Status : SUCCESS ===\r\nok\r\nList Affinity Groups by non-existing id ... === TestName: test_05_list_aff_grps_by_non_existing_id | Status : SUCCESS ===\r\nok\r\nList Affinity Groups by non-existing name ... === TestName: test_06_list_aff_grps_by_non_existing_name | Status : SUCCESS ===\r\nok\r\nList affinity group should list all for a vms associated with that group ... === TestName: test_07_list_all_vms_in_aff_grp | Status : SUCCESS ===\r\nok\r\nUpdate the list of affinityGroups by using affinity groupids ... === TestName: test_01_update_aff_grp_by_ids | Status : SUCCESS ===\r\nok\r\nUpdate the list of affinityGroups by using affinity groupnames ... === TestName: test_02_update_aff_grp_by_names | Status : SUCCESS ===\r\nok\r\nUpdate the list of affinityGroups for vm which is not associated ... === TestName: test_03_update_aff_grp_for_vm_with_no_aff_grp | Status : SUCCESS ===\r\nok\r\nUpdate the list of Affinity Groups to empty list ... SKIP: Skip - Failing - work in progress\r\nUpdate the list of Affinity Groups on running vm ... === TestName: test_05_update_aff_grp_on_running_vm | Status : SUCCESS ===\r\nok\r\n\r\n----------------------------------------------------------------------\r\nRan 42 tests in 976.432s\r\n\r\nOK (SKIP=1)"},"comment":{"url":"https://api.github.com/repos/apache/cloudstack/issues/comments/160990441","html_url":"https://github.com/apache/cloudstack/pull/1134#issuecomment-160990441","issue_url":"https://api.github.com/repos/apache/cloudstack/issues/1134","id":160990441,"user":{"login":"resmo","id":23809,"avatar_url":"https://avatars.githubusercontent.com/u/23809?v=3","gravatar_id":"","url":"https://api.github.com/users/resmo","html_url":"https://github.com/resmo","followers_url":"https://api.github.com/users/resmo/followers","following_url":"https://api.github.com/users/resmo/following{/other_user}","gists_url":"https://api.github.com/users/resmo/gists{/gist_id}","starred_url":"https://api.github.com/users/resmo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/resmo/subscriptions","organizations_url":"https://api.github.com/users/resmo/orgs","repos_url":"https://api.github.com/users/resmo/repos","events_url":"https://api.github.com/users/resmo/events{/privacy}","received_events_url":"https://api.github.com/users/resmo/received_events","type":"User","site_admin":false},"created_at":"2015-12-01T14:57:20Z","updated_at":"2015-12-01T14:57:20Z","body":"@pdube good timing, testing it right now. expect feedback today."}}