You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cloudstack.apache.org by GitBox <gi...@apache.org> on 2020/10/27 18:11:18 UTC

[GitHub] [cloudstack-primate] ravening opened a new pull request #838: Allow changing template type by admin

ravening opened a new pull request #838:
URL: https://github.com/apache/cloudstack-primate/pull/838


   Fixes #835 
   
   Currently, the template has the following types:
   'BUILTIN', 'USER', 'SYSTEM', 'ROUTING', 'PERHOST'
   
   Provide ui support for admins os that they can change
   the template type
   
   ![Screenshot 2020-10-27 at 19 10 09](https://user-images.githubusercontent.com/10645273/97343646-0a28d880-1888-11eb-84f6-0f33c4ff5b9a.png)
   
   Template type can be seen in template details also
   
   ![Screenshot 2020-10-27 at 19 10 28](https://user-images.githubusercontent.com/10645273/97343687-157c0400-1888-11eb-835a-f1f0395d66f7.png)
   


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [cloudstack-primate] blueorangutan commented on pull request #838: Allow changing template type by admin

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


   Packaging result: :heavy_check_mark:centos :heavy_check_mark:debian :heavy_check_mark:archive.
   QA: http://primate-qa.cloudstack.cloud:8080/client/pr/838 (JID-3687)


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [cloudstack-primate] PaulAngus commented on pull request #838: Allow changing template type by admin

Posted by GitBox <gi...@apache.org>.
PaulAngus commented on pull request #838:
URL: https://github.com/apache/cloudstack-primate/pull/838#issuecomment-729021053


   @ravening 
   
   I've checked with Rohit regarding the base VM that we use to build primate.
   
   It can be built using any Ubuntu LTS 18.04/20.04 base docker container. 
   
   There are  build instructions are in the repo's README (_https://github.com/apache/cloudstack-primate#getting-started_)
   These are wrapped up in `https://github.com/apache/cloudstack-primate/blob/master/packaging/package.sh
   
   The overview of installation (again thanks to Rohit) is:
   
   Install nodejs LTS
   
   ```
   curl -sL https://deb.nodesource.com/setup_12.x | sudo -E bash -
   sudo apt-get install -y nodejs debhelper rpm
   ```
   Install build tools
   
   `npm install -g @vue/cli webpack eslint`
   
   In a cloned Primate repo and run package.sh
   
   ```
   cd packaging
   bash -x package.sh
   ```
   In the README.md - _https://github.com/apache/cloudstack-primate#packaging_
   


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [cloudstack-primate] GabrielBrascher commented on pull request #838: Allow changing template type by admin

Posted by GitBox <gi...@apache.org>.
GabrielBrascher commented on pull request #838:
URL: https://github.com/apache/cloudstack-primate/pull/838#issuecomment-718938025


   Ah ... it got merged yesterday (https://github.com/apache/cloudstack/pull/3945), I see. I will test it later then based on the recente merged commit.


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [cloudstack-primate] rhtyd commented on a change in pull request #838: Allow changing template type by admin

Posted by GitBox <gi...@apache.org>.
rhtyd commented on a change in pull request #838:
URL: https://github.com/apache/cloudstack-primate/pull/838#discussion_r513324894



##########
File path: src/config/section/image.js
##########
@@ -94,9 +102,14 @@ export default {
           args: (record, store) => {
             var fields = ['name', 'displaytext', 'passwordenabled', 'ostypeid', 'isdynamicallyscalable']
             if (['Admin'].includes(store.userInfo.roletype)) {
-              fields.push('isrouting')
+              fields.push('isrouting', 'templatetype')

Review comment:
       this LGTM

##########
File path: src/config/section/image.js
##########
@@ -94,9 +102,14 @@ export default {
           args: (record, store) => {
             var fields = ['name', 'displaytext', 'passwordenabled', 'ostypeid', 'isdynamicallyscalable']
             if (['Admin'].includes(store.userInfo.roletype)) {
-              fields.push('isrouting')
+              fields.push('isrouting', 'templatetype')
             }
             return fields
+          },
+          mapping: {
+            templatetype: {
+              options: ['BUILTIN', 'USER', 'SYSTEM', 'ROUTING', 'PERHOST']
+            }
           }
         },

Review comment:
       What is PERHOST @ravening @weizhouapache ?




----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [cloudstack-primate] ravening commented on a change in pull request #838: Allow changing template type by admin

Posted by GitBox <gi...@apache.org>.
ravening commented on a change in pull request #838:
URL: https://github.com/apache/cloudstack-primate/pull/838#discussion_r514100813



##########
File path: src/config/section/image.js
##########
@@ -94,9 +102,14 @@ export default {
           args: (record, store) => {
             var fields = ['name', 'displaytext', 'passwordenabled', 'ostypeid', 'isdynamicallyscalable']
             if (['Admin'].includes(store.userInfo.roletype)) {
-              fields.push('isrouting')
+              fields.push('isrouting', 'templatetype')
             }
             return fields
+          },
+          mapping: {
+            templatetype: {
+              options: ['BUILTIN', 'USER', 'SYSTEM', 'ROUTING', 'PERHOST']
+            }
           }
         },

Review comment:
       @rhtyd removed `PERHOST` as its not needed




----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [cloudstack-primate] GabrielBrascher commented on pull request #838: Allow changing template type by admin

Posted by GitBox <gi...@apache.org>.
GabrielBrascher commented on pull request #838:
URL: https://github.com/apache/cloudstack-primate/pull/838#issuecomment-718911915


   @blueorangutan package


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [cloudstack-primate] ravening commented on pull request #838: Allow changing template type by admin

Posted by GitBox <gi...@apache.org>.
ravening commented on pull request #838:
URL: https://github.com/apache/cloudstack-primate/pull/838#issuecomment-722263065


   > Blue Orangutan sends build requests to ShapeBlue's internal infra to do builds; So calls to it need to come from ShapeBlue people to protect the infra (and it's easier to shout at them than community members :) ).
   > 
   > We can happily share the actual build process (done via Jenkins).
   > 
   > The medium/long term goal is to have distributed build and test environments across 'donated' central community hardware and private environments, which would be orchestrated from a central location, with some kind of deployment planner.
   > 
   > Internally we know this project as Winston ("I fix things"), and we're going to create it internally which we will then share as a draft blueprint to be taken forward as a community (assuming people want it),
   
   @PaulAngus Can you please share the build process and steps so that I will try implementing the same for our internal infrastructure?


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [cloudstack-primate] GabrielBrascher edited a comment on pull request #838: Allow changing template type by admin

Posted by GitBox <gi...@apache.org>.
GabrielBrascher edited a comment on pull request #838:
URL: https://github.com/apache/cloudstack-primate/pull/838#issuecomment-718938025


   Ah ... it got merged yesterday (https://github.com/apache/cloudstack/pull/3945), I see. I will test it later based on the recently merged commit.


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [cloudstack-primate] rhtyd merged pull request #838: Allow changing template type by admin

Posted by GitBox <gi...@apache.org>.
rhtyd merged pull request #838:
URL: https://github.com/apache/cloudstack-primate/pull/838


   


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [cloudstack-primate] ravening commented on pull request #838: Allow changing template type by admin

Posted by GitBox <gi...@apache.org>.
ravening commented on pull request #838:
URL: https://github.com/apache/cloudstack-primate/pull/838#issuecomment-719427021


   > > It fails to open the edit popup when trying to edit a template. Tested via http://primate-qa.cloudstack.cloud:8080/client/pr/838.
   > > Can you please check this @ravening?
   > 
   > @GabrielBrascher do you have the back end change as well?
   > I tested with having backend change and worked fine. I have attached the screenshot as well
   
   @GabrielBrascher on a side note, Im curious to know how to have multiple instances on primate running for each pr? is it an automated task? is there a way I can do that on my setup as well? I see that for each pr, there is an endpoint /client/pr/<pr#> . I want to know how to generate new setup like that for each pr


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [cloudstack-primate] rhtyd commented on pull request #838: Allow changing template type by admin

Posted by GitBox <gi...@apache.org>.
rhtyd commented on pull request #838:
URL: https://github.com/apache/cloudstack-primate/pull/838#issuecomment-732058501


   Looks like related backend PR was merged, should we consider merging this @PaulAngus @DaanHoogland @davidjumani ?
   
   @blueorangutan package


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [cloudstack-primate] blueorangutan commented on pull request #838: Allow changing template type by admin

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


   Packaging result: :heavy_check_mark:centos :heavy_check_mark:debian :heavy_check_mark:archive.
   QA: http://primate-qa.cloudstack.cloud:8080/client/pr/838 (JID-3634)


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [cloudstack-primate] blueorangutan commented on pull request #838: Allow changing template type by admin

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


   @GabrielBrascher a Jenkins job has been kicked to build primate packages. 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.

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



[GitHub] [cloudstack-primate] blueorangutan commented on pull request #838: Allow changing template type by admin

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


   @rhtyd a Jenkins job has been kicked to build primate packages. 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.

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



[GitHub] [cloudstack-primate] ravening commented on pull request #838: Allow changing template type by admin

Posted by GitBox <gi...@apache.org>.
ravening commented on pull request #838:
URL: https://github.com/apache/cloudstack-primate/pull/838#issuecomment-718923115


   > It fails to open the edit popup when trying to edit a template. Tested via http://primate-qa.cloudstack.cloud:8080/client/pr/838.
   > 
   > 
   > 
   > Can you please check this @ravening?
   
   @GabrielBrascher do you have the back end change as well?
   I tested with having backend change and worked fine. I have attached the screenshot as well


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [cloudstack-primate] GabrielBrascher commented on pull request #838: Allow changing template type by admin

Posted by GitBox <gi...@apache.org>.
GabrielBrascher commented on pull request #838:
URL: https://github.com/apache/cloudstack-primate/pull/838#issuecomment-718922053


   It fails to open the edit popup when trying to edit a template. Tested via http://primate-qa.cloudstack.cloud:8080/client/pr/838.
   
   Can you please check this @ravening?


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [cloudstack-primate] rhtyd commented on a change in pull request #838: Allow changing template type by admin

Posted by GitBox <gi...@apache.org>.
rhtyd commented on a change in pull request #838:
URL: https://github.com/apache/cloudstack-primate/pull/838#discussion_r513324566



##########
File path: src/config/section/image.js
##########
@@ -43,7 +43,15 @@ export default {
         }
         return fields
       },
-      details: ['name', 'id', 'displaytext', 'checksum', 'hypervisor', 'format', 'ostypename', 'size', 'isready', 'passwordenabled', 'directdownload', 'deployasis', 'isextractable', 'isdynamicallyscalable', 'ispublic', 'isfeatured', 'crosszones', 'type', 'account', 'domain', 'created', 'url'],
+      details: () => {
+        var fields = ['name', 'id', 'displaytext', 'checksum', 'hypervisor', 'format', 'ostypename', 'size', 'isready', 'passwordenabled',
+          'directdownload', 'deployasis', 'isextractable', 'isdynamicallyscalable', 'crosszones', 'type',
+          'account', 'domain', 'created']
+        if (['Admin'].includes(store.getters.userInfo.roletype)) {
+          fields.push('ispublic', 'isrouting', 'isfeatured', 'templatetype', 'url')

Review comment:
       @ravening cc @weizhouapache @DaanHoogland can you check if this causes regression wrt legacy UI? The is public/routing/features and `url` were previously accepted by old UI as well. What about upload template API/form?




----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [cloudstack-primate] rhtyd commented on pull request #838: Allow changing template type by admin

Posted by GitBox <gi...@apache.org>.
rhtyd commented on pull request #838:
URL: https://github.com/apache/cloudstack-primate/pull/838#issuecomment-717819445


   Nevermind - I checked, it does; we may need to wait until the upstream PR is merged at all.


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [cloudstack-primate] ravening commented on a change in pull request #838: Allow changing template type by admin

Posted by GitBox <gi...@apache.org>.
ravening commented on a change in pull request #838:
URL: https://github.com/apache/cloudstack-primate/pull/838#discussion_r513334844



##########
File path: src/config/section/image.js
##########
@@ -43,7 +43,15 @@ export default {
         }
         return fields
       },
-      details: ['name', 'id', 'displaytext', 'checksum', 'hypervisor', 'format', 'ostypename', 'size', 'isready', 'passwordenabled', 'directdownload', 'deployasis', 'isextractable', 'isdynamicallyscalable', 'ispublic', 'isfeatured', 'crosszones', 'type', 'account', 'domain', 'created', 'url'],
+      details: () => {
+        var fields = ['name', 'id', 'displaytext', 'checksum', 'hypervisor', 'format', 'ostypename', 'size', 'isready', 'passwordenabled',
+          'directdownload', 'deployasis', 'isextractable', 'isdynamicallyscalable', 'crosszones', 'type',
+          'account', 'domain', 'created']
+        if (['Admin'].includes(store.getters.userInfo.roletype)) {
+          fields.push('ispublic', 'isrouting', 'isfeatured', 'templatetype', 'url')

Review comment:
       `ispublic` and `isfeatured` is displayed for regular users also. so made the change. All others look good including template register form

##########
File path: src/config/section/image.js
##########
@@ -43,7 +43,15 @@ export default {
         }
         return fields
       },
-      details: ['name', 'id', 'displaytext', 'checksum', 'hypervisor', 'format', 'ostypename', 'size', 'isready', 'passwordenabled', 'directdownload', 'deployasis', 'isextractable', 'isdynamicallyscalable', 'ispublic', 'isfeatured', 'crosszones', 'type', 'account', 'domain', 'created', 'url'],
+      details: () => {
+        var fields = ['name', 'id', 'displaytext', 'checksum', 'hypervisor', 'format', 'ostypename', 'size', 'isready', 'passwordenabled',
+          'directdownload', 'deployasis', 'isextractable', 'isdynamicallyscalable', 'crosszones', 'type',
+          'account', 'domain', 'created']
+        if (['Admin'].includes(store.getters.userInfo.roletype)) {
+          fields.push('ispublic', 'isrouting', 'isfeatured', 'templatetype', 'url')

Review comment:
       @rhtyd  `ispublic` and `isfeatured` is displayed for regular users also. so made the change. All others look good including template register form




----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [cloudstack-primate] ravening commented on a change in pull request #838: Allow changing template type by admin

Posted by GitBox <gi...@apache.org>.
ravening commented on a change in pull request #838:
URL: https://github.com/apache/cloudstack-primate/pull/838#discussion_r513334844



##########
File path: src/config/section/image.js
##########
@@ -43,7 +43,15 @@ export default {
         }
         return fields
       },
-      details: ['name', 'id', 'displaytext', 'checksum', 'hypervisor', 'format', 'ostypename', 'size', 'isready', 'passwordenabled', 'directdownload', 'deployasis', 'isextractable', 'isdynamicallyscalable', 'ispublic', 'isfeatured', 'crosszones', 'type', 'account', 'domain', 'created', 'url'],
+      details: () => {
+        var fields = ['name', 'id', 'displaytext', 'checksum', 'hypervisor', 'format', 'ostypename', 'size', 'isready', 'passwordenabled',
+          'directdownload', 'deployasis', 'isextractable', 'isdynamicallyscalable', 'crosszones', 'type',
+          'account', 'domain', 'created']
+        if (['Admin'].includes(store.getters.userInfo.roletype)) {
+          fields.push('ispublic', 'isrouting', 'isfeatured', 'templatetype', 'url')

Review comment:
       `ispublic` and `isfeatured` is displayed for regular users also. so made the change




----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [cloudstack-primate] GabrielBrascher commented on pull request #838: Allow changing template type by admin

Posted by GitBox <gi...@apache.org>.
GabrielBrascher commented on pull request #838:
URL: https://github.com/apache/cloudstack-primate/pull/838#issuecomment-722057603


   @ravening I have not much idea on the _blueoragutan_ configuration. @rhtyd or @PaulAngus would be able to give some details.
   
   My guess is that this was configured via Jenkins in order to provide the same _Mocked_ infra (hosts, zone, networks, VMs, etc) for all PRs that are tested.


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [cloudstack-primate] rhtyd commented on pull request #838: Allow changing template type by admin

Posted by GitBox <gi...@apache.org>.
rhtyd commented on pull request #838:
URL: https://github.com/apache/cloudstack-primate/pull/838#issuecomment-717819152


   Does this depend on any backend API change? 


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [cloudstack-primate] PaulAngus commented on pull request #838: Allow changing template type by admin

Posted by GitBox <gi...@apache.org>.
PaulAngus commented on pull request #838:
URL: https://github.com/apache/cloudstack-primate/pull/838#issuecomment-722238689


   Blue Orangutan sends build requests to ShapeBlue's internal infra to do builds;  So calls to it need to come from ShapeBlue people to protect the infra (and it's easier to shout at them than community members :) ).
   
   We can happily share the actual build process (done via Jenkins).
   
   The medium/long term goal is to have distributed build and test environments across 'donated' central community hardware and private environments, which would be orchestrated from a central location, with some kind of deployment planner.
   
   Internally we know this project as Winston ("I fix things"), and we're going to create it internally which we will then share as a draft blueprint to be taken forward as a community (assuming people want it),
   
   


----------------------------------------------------------------
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:
users@infra.apache.org