You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by GitBox <gi...@apache.org> on 2022/03/02 10:00:33 UTC

[GitHub] [cloudstack] weizhouapache opened a new pull request #6051: UI: update vm with userdata

weizhouapache opened a new pull request #6051:
URL: https://github.com/apache/cloudstack/pull/6051


   ### Description
   
   This PR provides the feature to update vm with userdata.
   
   ![image](https://user-images.githubusercontent.com/57355700/156339456-5268e06a-4ea6-49e3-b75e-2286b0df902d.png)
   
   <!--- Describe your changes in DETAIL - And how has behaviour functionally changed. -->
   
   <!-- 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: # -->
   
   <!--- ********************************************************************************* -->
   <!--- NOTE: AUTOMATATION USES THE DESCRIPTIONS TO SET LABELS AND PRODUCE DOCUMENTATION. -->
   <!--- PLEASE PUT AN 'X' in only **ONE** box -->
   <!--- ********************************************************************************* -->
   
   ### Types of changes
   
   - [ ] Breaking change (fix or feature that would cause existing functionality to change)
   - [ ] New feature (non-breaking change which adds functionality)
   - [ ] Bug fix (non-breaking change which fixes an issue)
   - [x] Enhancement (improves an existing feature and functionality)
   - [ ] Cleanup (Code refactoring and cleanup, that may add test cases)
   
   ### Feature/Enhancement Scale or Bug Severity
   
   #### Feature/Enhancement Scale
   
   - [ ] Major
   - [ ] Minor
   
   #### Bug Severity
   
   - [ ] BLOCKER
   - [ ] Critical
   - [ ] Major
   - [ ] Minor
   - [ ] Trivial
   
   
   ### 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. -->
   
   
   <!-- Please read the [CONTRIBUTING](https://github.com/apache/cloudstack/blob/main/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.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] weizhouapache commented on pull request #6051: UI: update vm with userdata

Posted by GitBox <gi...@apache.org>.
weizhouapache commented on pull request #6051:
URL: https://github.com/apache/cloudstack/pull/6051#issuecomment-1060275721


   
   > Hi @weizhouapache I've found a case for fixing:
   > 
   > * Edit VM -> Enter metadata -> Press OK
   > * Click edit VM again -> Metadata text field is empty (expected: previously added metadata)
   
   @nvazquez 
   currently userdata is not returned in the user vm response.
   it requires few server changes. It is simple but we need to get a consensus whether userdata can be returned in the response.


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] davidjumani commented on pull request #6051: UI: update vm with userdata

Posted by GitBox <gi...@apache.org>.
davidjumani commented on pull request #6051:
URL: https://github.com/apache/cloudstack/pull/6051#issuecomment-1060390305


   @blueorangutan ui


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] rohityadavcloud commented on pull request #6051: UI: update vm with userdata

Posted by GitBox <gi...@apache.org>.
rohityadavcloud commented on pull request #6051:
URL: https://github.com/apache/cloudstack/pull/6051#issuecomment-1060393270


   Manual test confirmation necessary, otherwise LGTM


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] blueorangutan commented on pull request #6051: UI: update vm with userdata

Posted by GitBox <gi...@apache.org>.
blueorangutan commented on pull request #6051:
URL: https://github.com/apache/cloudstack/pull/6051#issuecomment-1060514749


   UI build: :heavy_check_mark:
   Live QA URL: http://qa.cloudstack.cloud:8080/client/pr/6051 (SL-JID-1215)


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] weizhouapache commented on a change in pull request #6051: UI: update vm with userdata

Posted by GitBox <gi...@apache.org>.
weizhouapache commented on a change in pull request #6051:
URL: https://github.com/apache/cloudstack/pull/6051#discussion_r820434349



##########
File path: ui/src/views/compute/EditVM.vue
##########
@@ -215,6 +227,9 @@ export default {
           params.haenable = values.haenable
         }
         params.group = values.group
+        if (values.userdata && values.userdata.length > 0) {
+          params.userdata = encodeURIComponent(btoa(this.sanitizeReverse(values.userdata)))
+        }
         this.loading = true
 
         api('updateVirtualMachine', params).then(json => {

Review comment:
       @davidjumani 
   good point. thanks !




-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] weizhouapache commented on pull request #6051: UI: update vm with userdata

Posted by GitBox <gi...@apache.org>.
weizhouapache commented on pull request #6051:
URL: https://github.com/apache/cloudstack/pull/6051#issuecomment-1056732604


    @nvazquez @sureshanaparti 
   please decide which cloudstack version this should be in


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] blueorangutan commented on pull request #6051: UI: update vm with userdata

Posted by GitBox <gi...@apache.org>.
blueorangutan commented on pull request #6051:
URL: https://github.com/apache/cloudstack/pull/6051#issuecomment-1060391036


   @davidjumani a Jenkins job has been kicked to build UI QA env. I'll keep you posted as I make progress.


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] davidjumani commented on a change in pull request #6051: UI: update vm with userdata

Posted by GitBox <gi...@apache.org>.
davidjumani commented on a change in pull request #6051:
URL: https://github.com/apache/cloudstack/pull/6051#discussion_r820405286



##########
File path: ui/src/views/compute/EditVM.vue
##########
@@ -215,6 +227,9 @@ export default {
           params.haenable = values.haenable
         }
         params.group = values.group
+        if (values.userdata && values.userdata.length > 0) {
+          params.userdata = encodeURIComponent(btoa(this.sanitizeReverse(values.userdata)))
+        }
         this.loading = true
 
         api('updateVirtualMachine', params).then(json => {

Review comment:
       ```suggestion
           api('updateVirtualMachine', {}, 'POST', params).then(json => {
   ```
   
   Would be a good idea to make the API call via POST since the userdata can get quite large




-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] blueorangutan commented on pull request #6051: UI: update vm with userdata

Posted by GitBox <gi...@apache.org>.
blueorangutan commented on pull request #6051:
URL: https://github.com/apache/cloudstack/pull/6051#issuecomment-1060394777


   UI build: :heavy_check_mark:
   Live QA URL: http://qa.cloudstack.cloud:8080/client/pr/6051 (SL-JID-1214)


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] nvazquez commented on pull request #6051: UI: update vm with userdata

Posted by GitBox <gi...@apache.org>.
nvazquez commented on pull request #6051:
URL: https://github.com/apache/cloudstack/pull/6051#issuecomment-1059973696


   @blueorangutan ui


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] weizhouapache commented on pull request #6051: UI: update vm with userdata

Posted by GitBox <gi...@apache.org>.
weizhouapache commented on pull request #6051:
URL: https://github.com/apache/cloudstack/pull/6051#issuecomment-1060502387


   @blueorangutan ui
   
   


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] nvazquez commented on pull request #6051: UI: update vm with userdata

Posted by GitBox <gi...@apache.org>.
nvazquez commented on pull request #6051:
URL: https://github.com/apache/cloudstack/pull/6051#issuecomment-1059961353


   Update: as discussed offline let's keep the target branch as 4.16 and we can merge forward to main
   @blueorangutan ui


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] nvazquez commented on pull request #6051: UI: update vm with userdata

Posted by GitBox <gi...@apache.org>.
nvazquez commented on pull request #6051:
URL: https://github.com/apache/cloudstack/pull/6051#issuecomment-1059981898


   Hi @weizhouapache I've found a case for fixing:
   - Edit VM -> Enter metadata -> Press OK
   - Click edit VM again -> Metadata text field is empty (expected: previously added metadata)


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] nvazquez commented on pull request #6051: UI: update vm with userdata

Posted by GitBox <gi...@apache.org>.
nvazquez commented on pull request #6051:
URL: https://github.com/apache/cloudstack/pull/6051#issuecomment-1058199963


   @weizhouapache @sureshanaparti since 4.16.1 has been voted already, can we target it to the main branch to be available on 4.17?


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] blueorangutan commented on pull request #6051: UI: update vm with userdata

Posted by GitBox <gi...@apache.org>.
blueorangutan commented on pull request #6051:
URL: https://github.com/apache/cloudstack/pull/6051#issuecomment-1059973900


   @nvazquez a Jenkins job has been kicked to build UI QA env. I'll keep you posted as I make progress.


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] nvazquez merged pull request #6051: UI: update vm with userdata

Posted by GitBox <gi...@apache.org>.
nvazquez merged pull request #6051:
URL: https://github.com/apache/cloudstack/pull/6051


   


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] davidjumani commented on pull request #6051: UI: update vm with userdata

Posted by GitBox <gi...@apache.org>.
davidjumani commented on pull request #6051:
URL: https://github.com/apache/cloudstack/pull/6051#issuecomment-1060217113


   @nvazquez I think it is fine if the userdata is not persisted after closing the form. Only pre-existing data which can be found from the db such as the VM name, os, etc is prefilled


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] blueorangutan commented on pull request #6051: UI: update vm with userdata

Posted by GitBox <gi...@apache.org>.
blueorangutan commented on pull request #6051:
URL: https://github.com/apache/cloudstack/pull/6051#issuecomment-1059975048


   UI build: :heavy_check_mark:
   Live QA URL: http://qa.cloudstack.cloud:8080/client/pr/6051 (SL-JID-1211)


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] blueorangutan commented on pull request #6051: UI: update vm with userdata

Posted by GitBox <gi...@apache.org>.
blueorangutan commented on pull request #6051:
URL: https://github.com/apache/cloudstack/pull/6051#issuecomment-1060503257


   @weizhouapache a Jenkins job has been kicked to build UI QA env. I'll keep you posted as I make progress.


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org