ravening opened a new pull request #4362: URL: https://github.com/apache/cloudstack/pull/4362
## Description <!--- Describe your changes in detail --> 1. Match the template tags with host tags for VM deployment/migration 2. Allow updating templates/isos with template tag by admin 3. Allow adding template tag while registering/creating template/iso 4. Allow searching templates/isos using template tags If a template has a template tag then deploy the VM which uses this template on hosts that match the template tags. If no suitable hosts are found then throw an exception Similarly, match the template tag with host tags while starting or migrating a VM to a different host <!-- For new features, provide link to FS, dev ML discussion etc. --> <!-- In case of bug fix, the expected and actual behaviours, steps to reproduce. --> <!-- When "Fixes: #<id>" is specified, the issue/PR will automatically be closed when this PR gets merged --> <!-- For addressing multiple issues/PRs, use multiple "Fixes: #<id>" --> <!-- Fixes: # --> ## Types of changes <!--- What types of changes does your code introduce? Put an `x` in all the boxes that apply: --> - [X] Bug fix (non-breaking change which fixes an issue) - [X] Enhancement (improves an existing feature and functionality) ## Screenshots (if appropriate): ## How Has This Been Tested? <!-- Please describe in detail how you tested your changes. --> <!-- Include details of your testing environment, and the tests you ran to --> <!-- see how your change affects other areas of the code, etc. --> test 1 add different tag to template than hosts try to deploy. it should fail try to migrating existing vm. it should fail test 2 remove all the tags on template add tags to hosts try to deploy vm it can be deployed on any host try to migrate it. migration should be possible stop/start is also possible test 3 add tag to template remove tags from host try to deploy vm deployment should fail try to migrate already created vm with template tag migration should fail test 4 set same template tag on template and only one host try to deploy vm it should deploy vm on host with matching tag test 5 ow try to migrate above created vm having specific tag migration should fail as other hosts have either no tags or different tag test 6 stop the above created vm try to start of different host start should fail as the tags dont match test 7 now remove the tag from the template of the above created vm try to migrate it it should work fine test 8 remove all tags from everyhwere select any vm and set service offering tag as "ubuntu" now set host tag as "windows" for all hosts try to start/deploymigrate vm it should not start/deploy/migrate as tags dont match test 9 now set service offering tag as "windows" try to start/deploy/migrate it should successfully start/deploy/migrate on/to any host Same steps for iso as well <!-- Please read the [CONTRIBUTING](https://github.com/apache/cloudstack/blob/master/CONTRIBUTING.md) document --> ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected]
