You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by "shwstppr (via GitHub)" <gi...@apache.org> on 2025/04/24 12:29:28 UTC
[PR] Deployvm improvements [cloudstack]
shwstppr opened a new pull request, #10773:
URL: https://github.com/apache/cloudstack/pull/10773
### Description
TBA
New interface for template selection in Deploy VM wizard and other forms based on OS categorisation
### 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)
- [ ] build/CI
- [ ] test (unit or integration test code)
### 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 -->
#### How did you try to break this feature and the system with this change?
<!-- 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
Re: [PR] ui,api,server: template categorization based on os [cloudstack]
Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #10773:
URL: https://github.com/apache/cloudstack/pull/10773#issuecomment-2940195901
Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 13602
--
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
Re: [PR] ui,api,server: template categorization based on os [cloudstack]
Posted by "Pearl1594 (via GitHub)" <gi...@apache.org>.
Pearl1594 commented on code in PR #10773:
URL: https://github.com/apache/cloudstack/pull/10773#discussion_r2072955386
##########
ui/src/views/AutogenView.vue:
##########
@@ -1256,6 +1256,9 @@ export default {
}
var paramName = param.name
var extractedParamName = paramName.replace('ids', '').replace('id', '').toLowerCase()
+ if (extractedParamName.endsWith('ory')) {
+ extractedParamName = extractedParamName.slice(0, -3) + 'orie'
Review Comment:
thanks for explaining @shwstppr :+1:
--
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
Re: [PR] ui,api,server: template categorization based on os [cloudstack]
Posted by "shwstppr (via GitHub)" <gi...@apache.org>.
shwstppr commented on code in PR #10773:
URL: https://github.com/apache/cloudstack/pull/10773#discussion_r2073008771
##########
api/src/main/java/org/apache/cloudstack/api/command/admin/guest/UpdateGuestOsCmd.java:
##########
@@ -50,7 +50,7 @@ public class UpdateGuestOsCmd extends BaseAsyncCmd {
@Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = GuestOSResponse.class, required = true, description = "UUID of the Guest OS")
private Long id;
- @Parameter(name = ApiConstants.OS_DISPLAY_NAME, type = CommandType.STRING, required = true, description = "Unique display name for Guest OS")
Review Comment:
@vishesh92 created https://github.com/apache/cloudstack-go/pull/109
##########
api/src/main/java/org/apache/cloudstack/api/command/admin/guest/DeleteGuestOsCategoryCmd.java:
##########
@@ -0,0 +1,78 @@
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements. See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership. The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied. See the License for the
+// specific language governing permissions and limitations
+// under the License.
+
+package org.apache.cloudstack.api.command.admin.guest;
+
+import org.apache.cloudstack.acl.RoleType;
+import org.apache.cloudstack.api.APICommand;
+import org.apache.cloudstack.api.ApiConstants;
+import org.apache.cloudstack.api.ApiErrorCode;
+import org.apache.cloudstack.api.BaseCmd;
+import org.apache.cloudstack.api.Parameter;
+import org.apache.cloudstack.api.ServerApiException;
+import org.apache.cloudstack.api.response.GuestOSCategoryResponse;
+import org.apache.cloudstack.api.response.SuccessResponse;
+
+import com.cloud.user.Account;
+
+
+@APICommand(name = "deleteOsCategory",
+ description = "Deletes an OS category",
+ responseObject = SuccessResponse.class,
+ requestHasSensitiveInfo = false,
+ responseHasSensitiveInfo = false,
+ since = "4.20.1",
+ authorized = {RoleType.Admin})
+public class DeleteGuestOsCategoryCmd extends BaseCmd {
+
+
+ /////////////////////////////////////////////////////
+ //////////////// API parameters /////////////////////
+ /////////////////////////////////////////////////////
+
+ @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = GuestOSCategoryResponse.class,
+ required = true, description = "ID of the guest OS")
+ private Long id;
+
+ /////////////////////////////////////////////////////
+ /////////////////// Accessors ///////////////////////
+ /////////////////////////////////////////////////////
+
+ public Long getId() {
+ return id;
+ }
+
+ /////////////////////////////////////////////////////
+ /////////////// API Implementation///////////////////
+ /////////////////////////////////////////////////////
+
+ @Override
+ public void execute() {
+ boolean result = _mgr.deleteGuestOsCategory(this);
+ if (result) {
+ SuccessResponse response = new SuccessResponse(getCommandName());
+ setResponseObject(response);
+ } else {
+ throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to remove guest OS");
Review Comment:
Done
--
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
Re: [PR] ui,api,server: template categorization based on os [cloudstack]
Posted by "shwstppr (via GitHub)" <gi...@apache.org>.
shwstppr commented on PR #10773:
URL: https://github.com/apache/cloudstack/pull/10773#issuecomment-2862887421
@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.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] ui,api,server: template categorization based on os [cloudstack]
Posted by "codecov[bot] (via GitHub)" <gi...@apache.org>.
codecov[bot] commented on PR #10773:
URL: https://github.com/apache/cloudstack/pull/10773#issuecomment-2827467036
## [Codecov](https://app.codecov.io/gh/apache/cloudstack/pull/10773?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
All modified and coverable lines are covered by tests :white_check_mark:
> Project coverage is 3.99%. Comparing base [(`603cd84`)](https://app.codecov.io/gh/apache/cloudstack/commit/603cd84b49428c08fae50470c8c69a66468b53fe?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) to head [(`5aadb37`)](https://app.codecov.io/gh/apache/cloudstack/commit/5aadb377feb1f78bf16c4c7b503d62f6307a225b?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
> :exclamation: There is a different number of reports uploaded between BASE (603cd84) and HEAD (5aadb37). Click for more details.
>
> <details><summary>HEAD has 1 upload less than BASE</summary>
>
>| Flag | BASE (603cd84) | HEAD (5aadb37) |
>|------|------|------|
>|unittests|1|0|
></details>
<details><summary>Additional details and impacted files</summary>
```diff
@@ Coverage Diff @@
## 4.20 #10773 +/- ##
=============================================
- Coverage 16.02% 3.99% -12.04%
=============================================
Files 5652 400 -5252
Lines 496021 32622 -463399
Branches 60065 5774 -54291
=============================================
- Hits 79488 1303 -78185
+ Misses 407665 31169 -376496
+ Partials 8868 150 -8718
```
| [Flag](https://app.codecov.io/gh/apache/cloudstack/pull/10773/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Coverage Δ | |
|---|---|---|
| [uitests](https://app.codecov.io/gh/apache/cloudstack/pull/10773/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `3.99% <ø> (-0.02%)` | :arrow_down: |
| [unittests](https://app.codecov.io/gh/apache/cloudstack/pull/10773/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `?` | |
Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#carryforward-flags-in-the-pull-request-comment) to find out more.
</details>
[:umbrella: View full report in Codecov by Sentry](https://app.codecov.io/gh/apache/cloudstack/pull/10773?dropdown=coverage&src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
:loudspeaker: Have feedback on the report? [Share it here](https://about.codecov.io/codecov-pr-comment-feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
<details><summary> :rocket: New features to boost your workflow: </summary>
- :snowflake: [Test Analytics](https://docs.codecov.com/docs/test-analytics): Detect flaky tests, report on failures, and find test suite problems.
- :package: [JS Bundle Analysis](https://docs.codecov.com/docs/javascript-bundle-analysis): Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
</details>
--
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
Re: [PR] ui,api,server: template categorization based on os [cloudstack]
Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #10773:
URL: https://github.com/apache/cloudstack/pull/10773#issuecomment-2934652108
@shwstppr a [SL] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. 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
Re: [PR] ui,api,server: template categorization based on os [cloudstack]
Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #10773:
URL: https://github.com/apache/cloudstack/pull/10773#issuecomment-2939957573
@shwstppr a [SL] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. 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
Re: [PR] ui,api,server: template categorization based on os [cloudstack]
Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #10773:
URL: https://github.com/apache/cloudstack/pull/10773#issuecomment-2854122420
@shwstppr a [SL] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. 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
Re: [PR] ui,api,server: template categorization based on os [cloudstack]
Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #10773:
URL: https://github.com/apache/cloudstack/pull/10773#issuecomment-2852460558
<b>[SF] Trillian test result (tid-13201)</b>
Environment: kvm-ol8 (x2), Advanced Networking with Mgmt server ol8
Total time taken: 55404 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr10773-t13201-kvm-ol8.zip
Smoke tests completed. 139 look OK, 2 have errors, 0 did not run
Only failed and skipped tests results shown below:
Test | Result | Time (s) | Test File
--- | --- | --- | ---
test_CRUD_operations_guest_OS | `Error` | 0.02 | test_guest_os.py
test_CRUD_operations_guest_OS_mapping | `Error` | 0.01 | test_guest_os.py
test_guest_OS_mapping_check_with_hypervisor | `Error` | 0.01 | test_guest_os.py
test_guest_OS_mapping_check_with_hypervisor_failure | `Error` | 0.01 | test_guest_os.py
test_02_restore_vm_strict_tags_failure | `Failure` | 54.39 | test_vm_strict_host_tags.py
test_02_scale_vm_strict_tags_failure | `Failure` | 55.66 | test_vm_strict_host_tags.py
test_06_deploy_vm_on_any_host_with_strict_tags_failure | `Failure` | 3.73 | test_vm_strict_host_tags.py
--
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
Re: [PR] ui,api,server: template categorization based on os [cloudstack]
Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #10773:
URL: https://github.com/apache/cloudstack/pull/10773#issuecomment-2842469389
Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 13228
--
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
Re: [PR] ui,api,server: template categorization based on os [cloudstack]
Posted by "Pearl1594 (via GitHub)" <gi...@apache.org>.
Pearl1594 commented on code in PR #10773:
URL: https://github.com/apache/cloudstack/pull/10773#discussion_r2072920296
##########
ui/src/views/AutogenView.vue:
##########
@@ -1256,6 +1256,9 @@ export default {
}
var paramName = param.name
var extractedParamName = paramName.replace('ids', '').replace('id', '').toLowerCase()
+ if (extractedParamName.endsWith('ory')) {
+ extractedParamName = extractedParamName.slice(0, -3) + 'orie'
Review Comment:
would this need to be 'ories' ?
--
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
Re: [PR] ui,api,server: template categorization based on os [cloudstack]
Posted by "shwstppr (via GitHub)" <gi...@apache.org>.
shwstppr commented on code in PR #10773:
URL: https://github.com/apache/cloudstack/pull/10773#discussion_r2072983258
##########
engine/schema/src/main/java/com/cloud/storage/dao/GuestOSCategoryDaoImpl.java:
##########
@@ -27,7 +27,7 @@
public class GuestOSCategoryDaoImpl extends GenericDaoBase<GuestOSCategoryVO, Long> implements GuestOSCategoryDao {
protected GuestOSCategoryDaoImpl() {
-
+ this._count = "select count(distinct id) from guest_os_category WHERE ";
Review Comment:
I was trying to support searchAndDistinctCount earlier. Forgot to remove. Rmoved now.
--
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
Re: [PR] ui,api,server: template categorization based on os [cloudstack]
Posted by "shwstppr (via GitHub)" <gi...@apache.org>.
shwstppr commented on PR #10773:
URL: https://github.com/apache/cloudstack/pull/10773#issuecomment-2862335402
@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.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] ui,api,server: template categorization based on os [cloudstack]
Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #10773:
URL: https://github.com/apache/cloudstack/pull/10773#issuecomment-2941082890
@shwstppr a [SL] Trillian-Jenkins test job (ol8 mgmt + kvm-ol8) has been kicked to run smoke tests
--
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
Re: [PR] ui,api,server: template categorization based on os [cloudstack]
Posted by "vishesh92 (via GitHub)" <gi...@apache.org>.
vishesh92 commented on PR #10773:
URL: https://github.com/apache/cloudstack/pull/10773#issuecomment-2850218294
@shwstppr Found one bug in `listTemplates` command.
After setting `showAllCategoryForModernImageSelection` to true in the `config.json`, if you select the all category the request to the MS fails with the below error.
```
Unable to find on DB, due to: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ') AND template_view.account_type != 5 AND template_view.hypervisor_type='KVM' ' at line 1
```
Query params for the failed request
```json
{
"oscategoryid": "-1",
"page": "1",
"pageSize": "10",
"zoneid": "cd313a1e-89f5-4d20-bfab-2ec2f41d259c",
"account": "admin",
"domainid": "22bb67fe-2976-11f0-93a0-1e0077000180",
"templatefilter": "all",
"details": "all",
"showicon": "true",
"isvnf": "false",
"command": "listTemplates"
}
```
--
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
Re: [PR] ui,api,server: template categorization based on os [cloudstack]
Posted by "shwstppr (via GitHub)" <gi...@apache.org>.
shwstppr commented on code in PR #10773:
URL: https://github.com/apache/cloudstack/pull/10773#discussion_r2073010037
##########
api/src/main/java/org/apache/cloudstack/api/command/admin/guest/UpdateGuestOsCmd.java:
##########
@@ -71,7 +77,7 @@ public String getOsDisplayName() {
return osDisplayName;
}
- public Map getDetails() {
+ public Map<String, String> getDetails() {
Map<String, String> detailsMap = new HashMap<>();;
if (MapUtils.isNotEmpty(detailsMap)) {
Collection<?> servicesCollection = details.values();
Review Comment:
thanks for catching. Fixed
--
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
Re: [PR] ui,api,server: template categorization based on os [cloudstack]
Posted by "vishesh92 (via GitHub)" <gi...@apache.org>.
vishesh92 commented on code in PR #10773:
URL: https://github.com/apache/cloudstack/pull/10773#discussion_r2072956007
##########
ui/public/locales/en.json:
##########
@@ -86,6 +86,7 @@
"label.action.delete.firewall": "Delete firewall rule",
"label.action.delete.interface.static.route": "Remove Tungsten Fabric interface static route",
"label.action.delete.guest.os": "Delete guest os",
+"label.action.delete.guest.os.category": "Delete guest os category",
Review Comment:
```suggestion
"label.action.delete.guest.os.category": "Delete guest OS category",
```
##########
ui/public/locales/en.json:
##########
@@ -258,6 +259,7 @@
"label.add.firewallrule": "Add Firewall Rule",
"label.add.guest.network": "Add guest Network",
"label.add.guest.os": "Add guest os",
+"label.add.guest.os.category": "Add guest os category",
Review Comment:
```suggestion
"label.add.guest.os.category": "Add guest OS category",
```
##########
ui/public/locales/en.json:
##########
@@ -1606,7 +1611,6 @@
"label.offeringtype": "Compute offering type",
"label.ok": "OK",
"label.only.end.date.and.time": "Only end date and time",
Review Comment:
```suggestion
"label.only.end.date.and.time": "Only end date and time",
"label.only.start.date.and.time": "Only start date and time",
```
--
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
Re: [PR] ui,api,server: template categorization based on os [cloudstack]
Posted by "shwstppr (via GitHub)" <gi...@apache.org>.
shwstppr commented on PR #10773:
URL: https://github.com/apache/cloudstack/pull/10773#issuecomment-2863625000
@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.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] ui,api,server: template categorization based on os [cloudstack]
Posted by "rohityadavcloud (via GitHub)" <gi...@apache.org>.
rohityadavcloud commented on PR #10773:
URL: https://github.com/apache/cloudstack/pull/10773#issuecomment-2865161301
@shwstppr is this ready for review/testing now, or is this still dev in 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
Re: [PR] ui,api,server: template categorization based on os [cloudstack]
Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #10773:
URL: https://github.com/apache/cloudstack/pull/10773#issuecomment-2862282413
Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 13296
--
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
Re: [PR] ui,api,server: template categorization based on os [cloudstack]
Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #10773:
URL: https://github.com/apache/cloudstack/pull/10773#issuecomment-2864987925
<b>[SF] Trillian test result (tid-13239)</b>
Environment: kvm-ol8 (x2), Advanced Networking with Mgmt server ol8
Total time taken: 58969 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr10773-t13239-kvm-ol8.zip
Smoke tests completed. 141 look OK, 0 have errors, 0 did not run
Only failed and skipped tests results shown below:
Test | Result | Time (s) | Test File
--- | --- | --- | ---
--
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
Re: [PR] ui,api,server: template categorization based on os [cloudstack]
Posted by "shwstppr (via GitHub)" <gi...@apache.org>.
shwstppr commented on PR #10773:
URL: https://github.com/apache/cloudstack/pull/10773#issuecomment-2868657185
@blueorangutan test
--
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
Re: [PR] ui,api,server: template categorization based on os [cloudstack]
Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #10773:
URL: https://github.com/apache/cloudstack/pull/10773#issuecomment-2870388114
<b>[SF] Trillian test result (tid-13256)</b>
Environment: kvm-ol8 (x2), Advanced Networking with Mgmt server ol8
Total time taken: 55682 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr10773-t13256-kvm-ol8.zip
Smoke tests completed. 141 look OK, 0 have errors, 0 did not run
Only failed and skipped tests results shown below:
Test | Result | Time (s) | Test File
--- | --- | --- | ---
--
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
Re: [PR] ui,api,server: template categorization based on os [cloudstack]
Posted by "shwstppr (via GitHub)" <gi...@apache.org>.
shwstppr commented on PR #10773:
URL: https://github.com/apache/cloudstack/pull/10773#issuecomment-2941076315
@blueorangutan test
--
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
Re: [PR] ui,api,server: template categorization based on os [cloudstack]
Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #10773:
URL: https://github.com/apache/cloudstack/pull/10773#issuecomment-2863626569
@shwstppr a [SL] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. 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
Re: [PR] ui,api,server: template categorization based on os [cloudstack]
Posted by "rohityadavcloud (via GitHub)" <gi...@apache.org>.
rohityadavcloud closed pull request #10773: ui,api,server: template categorization based on os
URL: https://github.com/apache/cloudstack/pull/10773
--
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
Re: [PR] ui,api,server: template categorization based on os [cloudstack]
Posted by "shwstppr (via GitHub)" <gi...@apache.org>.
shwstppr commented on code in PR #10773:
URL: https://github.com/apache/cloudstack/pull/10773#discussion_r2073009199
##########
api/src/main/java/org/apache/cloudstack/api/command/admin/guest/DeleteGuestOsCategoryCmd.java:
##########
@@ -0,0 +1,78 @@
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements. See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership. The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied. See the License for the
+// specific language governing permissions and limitations
+// under the License.
+
+package org.apache.cloudstack.api.command.admin.guest;
+
+import org.apache.cloudstack.acl.RoleType;
+import org.apache.cloudstack.api.APICommand;
+import org.apache.cloudstack.api.ApiConstants;
+import org.apache.cloudstack.api.ApiErrorCode;
+import org.apache.cloudstack.api.BaseCmd;
+import org.apache.cloudstack.api.Parameter;
+import org.apache.cloudstack.api.ServerApiException;
+import org.apache.cloudstack.api.response.GuestOSCategoryResponse;
+import org.apache.cloudstack.api.response.SuccessResponse;
+
+import com.cloud.user.Account;
+
+
+@APICommand(name = "deleteOsCategory",
+ description = "Deletes an OS category",
+ responseObject = SuccessResponse.class,
+ requestHasSensitiveInfo = false,
+ responseHasSensitiveInfo = false,
+ since = "4.20.1",
+ authorized = {RoleType.Admin})
+public class DeleteGuestOsCategoryCmd extends BaseCmd {
+
+
+ /////////////////////////////////////////////////////
+ //////////////// API parameters /////////////////////
+ /////////////////////////////////////////////////////
+
+ @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = GuestOSCategoryResponse.class,
+ required = true, description = "ID of the guest OS")
Review Comment:
Done
##########
api/src/main/java/org/apache/cloudstack/api/command/admin/guest/UpdateGuestOsCategoryCmd.java:
##########
@@ -0,0 +1,102 @@
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements. See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership. The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied. See the License for the
+// specific language governing permissions and limitations
+// under the License.
+
+package org.apache.cloudstack.api.command.admin.guest;
+
+import org.apache.cloudstack.acl.RoleType;
+import org.apache.cloudstack.api.APICommand;
+import org.apache.cloudstack.api.ApiConstants;
+import org.apache.cloudstack.api.ApiErrorCode;
+import org.apache.cloudstack.api.BaseCmd;
+import org.apache.cloudstack.api.Parameter;
+import org.apache.cloudstack.api.ServerApiException;
+import org.apache.cloudstack.api.response.GuestOSCategoryResponse;
+
+import com.cloud.storage.GuestOsCategory;
+import com.cloud.user.Account;
+
+@APICommand(name = "updateOsCategory",
+ description = "Updates an OS category",
+ responseObject = GuestOSCategoryResponse.class,
+ requestHasSensitiveInfo = false,
+ responseHasSensitiveInfo = false,
+ since = "4.20.1",
+ authorized = {RoleType.Admin})
+public class UpdateGuestOsCategoryCmd extends BaseCmd {
+
+
+
+ /////////////////////////////////////////////////////
+ //////////////// API parameters /////////////////////
+ /////////////////////////////////////////////////////
+
+ @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = GuestOSCategoryResponse.class,
+ required = true, description = "ID of the OS Category")
+ private Long id;
+
+ @Parameter(name = ApiConstants.NAME, type = CommandType.STRING, description = "Name for the OS category")
+ private String name;
+
+ @Parameter(name = ApiConstants.IS_FEATURED, type = CommandType.BOOLEAN,
+ description = "Whether the category is featured or not")
+ private Boolean featured;
+
+ @Parameter(name = ApiConstants.SORT_KEY, type = CommandType.INTEGER,
+ description = "sort key of the OS category for listing")
+ private Integer sortKey;
+
+ /////////////////////////////////////////////////////
+ /////////////////// Accessors ///////////////////////
+ /////////////////////////////////////////////////////
+
+ public Long getId() {
+ return id;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public Boolean isFeatured() {
+ return featured;
+ }
+
+ public Integer getSortKey() {
+ return sortKey;
+ }
+
+ /////////////////////////////////////////////////////
+ /////////////// API Implementation///////////////////
+ /////////////////////////////////////////////////////
+
+ @Override
+ public long getEntityOwnerId() {
+ return Account.ACCOUNT_ID_SYSTEM;
+ }
+
+ @Override
+ public void execute() {
+ GuestOsCategory guestOs = _mgr.updateGuestOsCategory(this);
+ if (guestOs != null) {
+ GuestOSCategoryResponse response = _responseGenerator.createGuestOSCategoryResponse(guestOs);
+ response.setResponseName(getCommandName());
+ setResponseObject(response);
+ } else {
+ throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to update guest OS type");
Review Comment:
Done
--
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
Re: [PR] ui,api,server: template categorization based on os [cloudstack]
Posted by "shwstppr (via GitHub)" <gi...@apache.org>.
shwstppr commented on code in PR #10773:
URL: https://github.com/apache/cloudstack/pull/10773#discussion_r2073008038
##########
ui/public/locales/en.json:
##########
@@ -1606,7 +1611,6 @@
"label.offeringtype": "Compute offering type",
"label.ok": "OK",
"label.only.end.date.and.time": "Only end date and time",
Review Comment:
Done. May have removed by mistake during rebase/merge :man_facepalming:
##########
ui/public/locales/en.json:
##########
@@ -258,6 +259,7 @@
"label.add.firewallrule": "Add Firewall Rule",
"label.add.guest.network": "Add guest Network",
"label.add.guest.os": "Add guest os",
+"label.add.guest.os.category": "Add guest os category",
Review Comment:
Done
##########
ui/public/locales/en.json:
##########
@@ -86,6 +86,7 @@
"label.action.delete.firewall": "Delete firewall rule",
"label.action.delete.interface.static.route": "Remove Tungsten Fabric interface static route",
"label.action.delete.guest.os": "Delete guest os",
+"label.action.delete.guest.os.category": "Delete guest os category",
Review Comment:
Done
--
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
Re: [PR] ui,api,server: template categorization based on os [cloudstack]
Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #10773:
URL: https://github.com/apache/cloudstack/pull/10773#issuecomment-2862338927
@shwstppr a [SL] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. 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
Re: [PR] ui,api,server: template categorization based on os [cloudstack]
Posted by "DaanHoogland (via GitHub)" <gi...@apache.org>.
DaanHoogland commented on PR #10773:
URL: https://github.com/apache/cloudstack/pull/10773#issuecomment-2827619051
looks nice. would be great for end-users.
--
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
Re: [PR] ui,api,server: template categorization based on os [cloudstack]
Posted by "Copilot (via GitHub)" <gi...@apache.org>.
Copilot commented on code in PR #10773:
URL: https://github.com/apache/cloudstack/pull/10773#discussion_r2068484008
##########
api/src/main/java/org/apache/cloudstack/api/command/admin/guest/UpdateGuestOsCmd.java:
##########
@@ -71,7 +77,7 @@ public String getOsDisplayName() {
return osDisplayName;
}
- public Map getDetails() {
+ public Map<String, String> getDetails() {
Review Comment:
The getDetails() method initializes a new empty map and then checks if it is not empty, which will always return false, effectively ignoring the 'details' parameter intended to be processed. Also, remove the redundant semicolon in the map initialization ("new HashMap<>();;").
--
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
Re: [PR] ui,api,server: template categorization based on os [cloudstack]
Posted by "shwstppr (via GitHub)" <gi...@apache.org>.
shwstppr commented on PR #10773:
URL: https://github.com/apache/cloudstack/pull/10773#issuecomment-2865858989
@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.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] ui,api,server: template categorization based on os [cloudstack]
Posted by "shwstppr (via GitHub)" <gi...@apache.org>.
shwstppr commented on PR #10773:
URL: https://github.com/apache/cloudstack/pull/10773#issuecomment-2862083703
@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.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] ui,api,server: template categorization based on os [cloudstack]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #10773:
URL: https://github.com/apache/cloudstack/pull/10773#issuecomment-2865785454
This pull request has merge conflicts. Dear author, please fix the conflicts and sync your branch with the base branch.
--
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
Re: [PR] ui,api,server: template categorization based on os [cloudstack]
Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #10773:
URL: https://github.com/apache/cloudstack/pull/10773#issuecomment-2866079274
Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 13316
--
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
Re: [PR] ui,api,server: template categorization based on os [cloudstack]
Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #10773:
URL: https://github.com/apache/cloudstack/pull/10773#issuecomment-2869620374
@shwstppr a [SL] Trillian-Jenkins test job (ol8 mgmt + kvm-ol8) has been kicked to run smoke tests
--
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
Re: [PR] ui,api,server: template categorization based on os [cloudstack]
Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #10773:
URL: https://github.com/apache/cloudstack/pull/10773#issuecomment-2940638446
@shwstppr a [SL] Trillian-Jenkins test job (ol8 mgmt + kvm-ol8) has been kicked to run smoke tests
--
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
Re: [PR] ui,api,server: template categorization based on os [cloudstack]
Posted by "rohityadavcloud (via GitHub)" <gi...@apache.org>.
rohityadavcloud commented on PR #10773:
URL: https://github.com/apache/cloudstack/pull/10773#issuecomment-2911298531
@shwstppr can you change base from 4.20 to main? 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
Re: [PR] ui,api,server: template categorization based on os [cloudstack]
Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #10773:
URL: https://github.com/apache/cloudstack/pull/10773#issuecomment-2835555322
Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 13202
--
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
Re: [PR] ui,api,server: template categorization based on os [cloudstack]
Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #10773:
URL: https://github.com/apache/cloudstack/pull/10773#issuecomment-2944264216
<b>[SF] Trillian test result (tid-13471)</b>
Environment: kvm-ol8 (x2), Advanced Networking with Mgmt server ol8
Total time taken: 63050 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr10773-t13471-kvm-ol8.zip
Smoke tests completed. 141 look OK, 0 have errors, 0 did not run
Only failed and skipped tests results shown below:
Test | Result | Time (s) | Test File
--- | --- | --- | ---
--
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
Re: [PR] ui,api,server: template categorization based on os [cloudstack]
Posted by "shwstppr (via GitHub)" <gi...@apache.org>.
shwstppr commented on PR #10773:
URL: https://github.com/apache/cloudstack/pull/10773#issuecomment-2840775622
@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.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] ui,api,server: template categorization based on os [cloudstack]
Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #10773:
URL: https://github.com/apache/cloudstack/pull/10773#issuecomment-2842176624
@shwstppr a [SL] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. 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
Re: [PR] ui,api,server: template categorization based on os [cloudstack]
Posted by "shwstppr (via GitHub)" <gi...@apache.org>.
shwstppr commented on PR #10773:
URL: https://github.com/apache/cloudstack/pull/10773#issuecomment-2865284034
@rohityadavcloud this is largely ready for review/testing but awaiting internal testing. Also, I may add some fixes if I find any issues
--
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
Re: [PR] ui,api,server: template categorization based on os [cloudstack]
Posted by "shwstppr (via GitHub)" <gi...@apache.org>.
shwstppr commented on PR #10773:
URL: https://github.com/apache/cloudstack/pull/10773#issuecomment-2849992515
@blueorangutan test
--
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
Re: [PR] ui,api,server: template categorization based on os [cloudstack]
Posted by "vishesh92 (via GitHub)" <gi...@apache.org>.
vishesh92 commented on code in PR #10773:
URL: https://github.com/apache/cloudstack/pull/10773#discussion_r2072863861
##########
api/src/main/java/org/apache/cloudstack/api/command/admin/guest/DeleteGuestOsCategoryCmd.java:
##########
@@ -0,0 +1,78 @@
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements. See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership. The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied. See the License for the
+// specific language governing permissions and limitations
+// under the License.
+
+package org.apache.cloudstack.api.command.admin.guest;
+
+import org.apache.cloudstack.acl.RoleType;
+import org.apache.cloudstack.api.APICommand;
+import org.apache.cloudstack.api.ApiConstants;
+import org.apache.cloudstack.api.ApiErrorCode;
+import org.apache.cloudstack.api.BaseCmd;
+import org.apache.cloudstack.api.Parameter;
+import org.apache.cloudstack.api.ServerApiException;
+import org.apache.cloudstack.api.response.GuestOSCategoryResponse;
+import org.apache.cloudstack.api.response.SuccessResponse;
+
+import com.cloud.user.Account;
+
+
+@APICommand(name = "deleteOsCategory",
+ description = "Deletes an OS category",
+ responseObject = SuccessResponse.class,
+ requestHasSensitiveInfo = false,
+ responseHasSensitiveInfo = false,
+ since = "4.20.1",
+ authorized = {RoleType.Admin})
+public class DeleteGuestOsCategoryCmd extends BaseCmd {
+
+
+ /////////////////////////////////////////////////////
+ //////////////// API parameters /////////////////////
+ /////////////////////////////////////////////////////
+
+ @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = GuestOSCategoryResponse.class,
+ required = true, description = "ID of the guest OS")
Review Comment:
```suggestion
required = true, description = "ID of the guest OS category")
```
##########
api/src/main/java/org/apache/cloudstack/api/command/admin/guest/DeleteGuestOsCategoryCmd.java:
##########
@@ -0,0 +1,78 @@
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements. See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership. The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied. See the License for the
+// specific language governing permissions and limitations
+// under the License.
+
+package org.apache.cloudstack.api.command.admin.guest;
+
+import org.apache.cloudstack.acl.RoleType;
+import org.apache.cloudstack.api.APICommand;
+import org.apache.cloudstack.api.ApiConstants;
+import org.apache.cloudstack.api.ApiErrorCode;
+import org.apache.cloudstack.api.BaseCmd;
+import org.apache.cloudstack.api.Parameter;
+import org.apache.cloudstack.api.ServerApiException;
+import org.apache.cloudstack.api.response.GuestOSCategoryResponse;
+import org.apache.cloudstack.api.response.SuccessResponse;
+
+import com.cloud.user.Account;
+
+
+@APICommand(name = "deleteOsCategory",
+ description = "Deletes an OS category",
+ responseObject = SuccessResponse.class,
+ requestHasSensitiveInfo = false,
+ responseHasSensitiveInfo = false,
+ since = "4.20.1",
+ authorized = {RoleType.Admin})
+public class DeleteGuestOsCategoryCmd extends BaseCmd {
+
+
+ /////////////////////////////////////////////////////
+ //////////////// API parameters /////////////////////
+ /////////////////////////////////////////////////////
+
+ @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = GuestOSCategoryResponse.class,
+ required = true, description = "ID of the guest OS")
+ private Long id;
+
+ /////////////////////////////////////////////////////
+ /////////////////// Accessors ///////////////////////
+ /////////////////////////////////////////////////////
+
+ public Long getId() {
+ return id;
+ }
+
+ /////////////////////////////////////////////////////
+ /////////////// API Implementation///////////////////
+ /////////////////////////////////////////////////////
+
+ @Override
+ public void execute() {
+ boolean result = _mgr.deleteGuestOsCategory(this);
+ if (result) {
+ SuccessResponse response = new SuccessResponse(getCommandName());
+ setResponseObject(response);
+ } else {
+ throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to remove guest OS");
Review Comment:
```suggestion
throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to remove guest OS category");
```
##########
api/src/main/java/org/apache/cloudstack/api/command/admin/guest/UpdateGuestOsCategoryCmd.java:
##########
@@ -0,0 +1,102 @@
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements. See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership. The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied. See the License for the
+// specific language governing permissions and limitations
+// under the License.
+
+package org.apache.cloudstack.api.command.admin.guest;
+
+import org.apache.cloudstack.acl.RoleType;
+import org.apache.cloudstack.api.APICommand;
+import org.apache.cloudstack.api.ApiConstants;
+import org.apache.cloudstack.api.ApiErrorCode;
+import org.apache.cloudstack.api.BaseCmd;
+import org.apache.cloudstack.api.Parameter;
+import org.apache.cloudstack.api.ServerApiException;
+import org.apache.cloudstack.api.response.GuestOSCategoryResponse;
+
+import com.cloud.storage.GuestOsCategory;
+import com.cloud.user.Account;
+
+@APICommand(name = "updateOsCategory",
+ description = "Updates an OS category",
+ responseObject = GuestOSCategoryResponse.class,
+ requestHasSensitiveInfo = false,
+ responseHasSensitiveInfo = false,
+ since = "4.20.1",
+ authorized = {RoleType.Admin})
+public class UpdateGuestOsCategoryCmd extends BaseCmd {
+
+
+
+ /////////////////////////////////////////////////////
+ //////////////// API parameters /////////////////////
+ /////////////////////////////////////////////////////
+
+ @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = GuestOSCategoryResponse.class,
+ required = true, description = "ID of the OS Category")
+ private Long id;
+
+ @Parameter(name = ApiConstants.NAME, type = CommandType.STRING, description = "Name for the OS category")
+ private String name;
+
+ @Parameter(name = ApiConstants.IS_FEATURED, type = CommandType.BOOLEAN,
+ description = "Whether the category is featured or not")
+ private Boolean featured;
+
+ @Parameter(name = ApiConstants.SORT_KEY, type = CommandType.INTEGER,
+ description = "sort key of the OS category for listing")
+ private Integer sortKey;
+
+ /////////////////////////////////////////////////////
+ /////////////////// Accessors ///////////////////////
+ /////////////////////////////////////////////////////
+
+ public Long getId() {
+ return id;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public Boolean isFeatured() {
+ return featured;
+ }
+
+ public Integer getSortKey() {
+ return sortKey;
+ }
+
+ /////////////////////////////////////////////////////
+ /////////////// API Implementation///////////////////
+ /////////////////////////////////////////////////////
+
+ @Override
+ public long getEntityOwnerId() {
+ return Account.ACCOUNT_ID_SYSTEM;
+ }
+
+ @Override
+ public void execute() {
+ GuestOsCategory guestOs = _mgr.updateGuestOsCategory(this);
+ if (guestOs != null) {
+ GuestOSCategoryResponse response = _responseGenerator.createGuestOSCategoryResponse(guestOs);
+ response.setResponseName(getCommandName());
+ setResponseObject(response);
+ } else {
+ throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to update guest OS type");
Review Comment:
```suggestion
throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to update guest OS category");
```
##########
api/src/main/java/org/apache/cloudstack/api/command/admin/guest/UpdateGuestOsCmd.java:
##########
@@ -71,7 +77,7 @@ public String getOsDisplayName() {
return osDisplayName;
}
- public Map getDetails() {
+ public Map<String, String> getDetails() {
Map<String, String> detailsMap = new HashMap<>();;
if (MapUtils.isNotEmpty(detailsMap)) {
Collection<?> servicesCollection = details.values();
Review Comment:
```suggestion
public Map<String, String> getDetails() {
Map<String, String> detailsMap = new HashMap<>();
if (MapUtils.isNotEmpty(details)) {
Collection<?> servicesCollection = details.values();
```
From the code, I don't think this is even working.
##########
server/src/main/java/com/cloud/server/ManagementServerImpl.java:
##########
@@ -2723,29 +2728,109 @@ public Pair<List<? extends GuestOS>, Integer> listGuestOSByCriteria(final ListGu
@Override
public Pair<List<? extends GuestOsCategory>, Integer> listGuestOSCategoriesByCriteria(final ListGuestOsCategoriesCmd cmd) {
- final Filter searchFilter = new Filter(GuestOSCategoryVO.class, "id", true, cmd.getStartIndex(), cmd.getPageSizeVal());
+ final Filter searchFilter = new Filter(GuestOSCategoryVO.class, "sortKey", true,
+ cmd.getStartIndex(), cmd.getPageSizeVal());
+ searchFilter.addOrderBy(GuestOSCategoryVO.class, "id", true);
final Long id = cmd.getId();
final String name = cmd.getName();
final String keyword = cmd.getKeyword();
+ final Boolean featured = cmd.isFeatured();
+ final Boolean isIso = cmd.isIso();
+ final Boolean isVnf = cmd.isVnf();
+ final Long zoneId = cmd.getZoneId();
+ final CPU.CPUArch arch = cmd.getArch();
- final SearchCriteria<GuestOSCategoryVO> sc = _guestOSCategoryDao.createSearchCriteria();
-
+ final SearchBuilder<GuestOSCategoryVO> sb = _guestOSCategoryDao.createSearchBuilder();
+ sb.and("id", sb.entity().getId(), SearchCriteria.Op.EQ);
+ sb.and("name", sb.entity().getId(), SearchCriteria.Op.LIKE);
+ sb.and("keyword", sb.entity().getId(), SearchCriteria.Op.LIKE);
Review Comment:
```suggestion
sb.and("name", sb.entity().getName(), SearchCriteria.Op.LIKE);
sb.and("keyword", sb.entity().getName(), SearchCriteria.Op.LIKE);
```
##########
api/src/main/java/org/apache/cloudstack/api/command/admin/guest/UpdateGuestOsCmd.java:
##########
@@ -50,7 +50,7 @@ public class UpdateGuestOsCmd extends BaseAsyncCmd {
@Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = GuestOSResponse.class, required = true, description = "UUID of the Guest OS")
private Long id;
- @Parameter(name = ApiConstants.OS_DISPLAY_NAME, type = CommandType.STRING, required = true, description = "Unique display name for Guest OS")
Review Comment:
JFYI, this will require a change in go sdk [here](https://github.com/apache/cloudstack-go/blob/main/generate/requiredParams.go) to ensure the SDK is backward compatible.
##########
engine/schema/src/main/java/com/cloud/storage/dao/GuestOSCategoryDaoImpl.java:
##########
@@ -27,7 +27,7 @@
public class GuestOSCategoryDaoImpl extends GenericDaoBase<GuestOSCategoryVO, Long> implements GuestOSCategoryDao {
protected GuestOSCategoryDaoImpl() {
-
+ this._count = "select count(distinct id) from guest_os_category WHERE ";
Review Comment:
Why is this required?
##########
server/src/test/java/com/cloud/server/ManagementServerImplTest.java:
##########
@@ -124,27 +139,27 @@ public class ManagementServerImplTest {
UserDataManager userDataManager;
@Spy
+ @InjectMocks
ManagementServerImpl spy = new ManagementServerImpl();
@Mock
UserVmDetailsDao userVmDetailsDao;
@Mock
HostDetailsDao hostDetailsDao;
+
+ @Mock
+ GuestOSCategoryDao guestOSCategoryDao;
+
+ @Mock
+ GuestOSDao guestOSDao;
Review Comment:
```suggestion
GuestOSCategoryDao _guestOSCategoryDao;
@Mock
GuestOSDao _guestOSDao;
```
Use the same name for dao as in the class being 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.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] ui,api,server: template categorization based on os [cloudstack]
Posted by "shwstppr (via GitHub)" <gi...@apache.org>.
shwstppr commented on PR #10773:
URL: https://github.com/apache/cloudstack/pull/10773#issuecomment-2869619214
An unrelated, weird exception failed the test,
```
2025-05-10 11:42:27,682 DEBUG [c.c.c.CapacityManagerImpl] (Work-Job-Executor-146:[ctx-34767c04, job-458/job-461, ctx-84b3b693]) (logid:bf45ed95) Host does not have enough reserved CPU available, cannot allocate to this host.
2025-05-10 11:42:27,682 DEBUG [c.c.c.CapacityManagerImpl] (Work-Job-Executor-146:[ctx-34767c04, job-458/job-461, ctx-84b3b693]) (logid:bf45ed95) Checking if host: Host {"id":1,"name":"pr10773-t13253-kvm-ol8-kvm1","type":"Routing","uuid":"8a91c98f-44c0-4de8-9ecd-0b939865d323"} has enough capacity for requested CPU: 100 and requested RAM: (256.00 MB) 268435456 , cpuOverprovisioningFactor: 2.0
2025-05-10 11:42:27,683 DEBUG [c.c.c.CapacityManagerImpl] (Work-Job-Executor-146:[ctx-34767c04, job-458/job-461, ctx-84b3b693]) (logid:bf45ed95) Hosts's actual total CPU: 6300 and CPU after applying overprovisioning: 12600
2025-05-10 11:42:27,683 DEBUG [c.c.c.CapacityManagerImpl] (Work-Job-Executor-146:[ctx-34767c04, job-458/job-461, ctx-84b3b693]) (logid:bf45ed95) Free CPU: 11600 , Requested CPU: 100
2025-05-10 11:42:27,683 DEBUG [c.c.c.CapacityManagerImpl] (Work-Job-Executor-146:[ctx-34767c04, job-458/job-461, ctx-84b3b693]) (logid:bf45ed95) Free RAM: (5.26 GB) 5648531456 , Requested RAM: (256.00 MB) 268435456
2025-05-10 11:42:27,683 DEBUG [c.c.c.CapacityManagerImpl] (Work-Job-Executor-146:[ctx-34767c04, job-458/job-461, ctx-84b3b693]) (logid:bf45ed95) Host has enough CPU and RAM available
2025-05-10 11:42:27,683 DEBUG [c.c.c.CapacityManagerImpl] (Work-Job-Executor-146:[ctx-34767c04, job-458/job-461, ctx-84b3b693]) (logid:bf45ed95) STATS: Can alloc CPU from host: Host {"id":1,"name":"pr10773-t13253-kvm-ol8-kvm1","type":"Routing","uuid":"8a91c98f-44c0-4de8-9ecd-0b939865d323"}, used: 1000, reserved: 0, actual total: 6300, total with overprovisioning: 12600; requested cpu: 100, alloc_from_last_host?: false, considerReservedCapacity?: true
2025-05-10 11:42:27,683 DEBUG [c.c.c.CapacityManagerImpl] (Work-Job-Executor-146:[ctx-34767c04, job-458/job-461, ctx-84b3b693]) (logid:bf45ed95) STATS: Can alloc MEM from host: Host {"id":1,"name":"pr10773-t13253-kvm-ol8-kvm1","type":"Routing","uuid":"8a91c98f-44c0-4de8-9ecd-0b939865d323"}, used: (1.50 GB) 1610612736, reserved: (0 bytes) 0, total: (6.76 GB) 7259144192; requested mem: (256.00 MB) 268435456, alloc_from_last_host?: false, considerReservedCapacity?: true
2025-05-10 11:42:27,693 DEBUG [c.c.v.ClusteredVirtualMachineManagerImpl] (Work-Job-Executor-146:[ctx-34767c04, job-458/job-461, ctx-84b3b693]) (logid:bf45ed95) Cleaning up resources for the vm VM instance {"id":45,"instanceName":"i-2-45-VM","state":"Starting","type":"User","uuid":"166483d6-2e6e-4ce2-9b82-2636d3592147"} in Starting state
2025-05-10 11:42:27,702 DEBUG [c.c.v.ClusteredVirtualMachineManagerImpl] (Work-Job-Executor-146:[ctx-34767c04, job-458/job-461, ctx-84b3b693]) (logid:bf45ed95) VM instance {"id":45,"instanceName":"i-2-45-VM","state":"Starting","type":"User","uuid":"166483d6-2e6e-4ce2-9b82-2636d3592147"} is a [User], returning null for control Nic IP.
2025-05-10 11:42:27,703 DEBUG [c.c.a.m.ClusteredAgentManagerImpl] (Work-Job-Executor-146:[ctx-34767c04, job-458/job-461, ctx-84b3b693]) (logid:bf45ed95) Wait time setting on com.cloud.agent.api.StopCommand is 1800 seconds
2025-05-10 11:42:27,704 DEBUG [c.c.a.m.ClusteredAgentAttache] (Work-Job-Executor-146:[ctx-34767c04, job-458/job-461, ctx-84b3b693]) (logid:bf45ed95) Seq 4-1773855303230554692: Routed from 32987664089784
2025-05-10 11:42:27,704 DEBUG [c.c.a.t.Request] (Work-Job-Executor-146:[ctx-34767c04, job-458/job-461, ctx-84b3b693]) (logid:bf45ed95) Seq 1-1773855303230554692: Sending { Cmd , MgmtId: 32987664089784, via: 1(pr10773-t13253-kvm-ol8-kvm1), Ver: v1, Flags: 100011, [{"com.cloud.agent.api.StopCommand":{"isProxy":"false","checkBeforeCleanup":"false","forceStop":"false","volumesToDisconnect":[],"vmName":"i-2-45-VM","executeInSequence":"false","wait":"0","bypassHostMaintenance":"false"}}] }
2025-05-10 11:42:27,750 DEBUG [o.a.c.h.H.HAManagerBgPollTask] (BackgroundTaskPollManager-4:[ctx-0ef90b21]) (logid:30023ce3) HA health check task is running...
2025-05-10 11:42:27,977 DEBUG [c.c.a.t.Request] (AgentManager-Handler-4:[]) (logid:) Seq 1-1773855303230554692: Processing: { Ans: , MgmtId: 32987664089784, via: 1, Ver: v1, Flags: 10, [{"com.cloud.agent.api.StopAnswer":{"result":"true","wait":"0","bypassHostMaintenance":"false"}}] }
2025-05-10 11:42:27,977 DEBUG [c.c.a.t.Request] (Work-Job-Executor-146:[ctx-34767c04, job-458/job-461, ctx-84b3b693]) (logid:bf45ed95) Seq 1-1773855303230554692: Received: { Ans: , MgmtId: 32987664089784, via: 1(pr10773-t13253-kvm-ol8-kvm1), Ver: v1, Flags: 10, { StopAnswer } }
2025-05-10 11:42:27,985 WARN [c.c.v.ClusteredVirtualMachineManagerImpl] (Work-Job-Executor-146:[ctx-34767c04, job-458/job-461, ctx-84b3b693]) (logid:bf45ed95) Unable to release some network resources for the VM VM instance {"id":45,"instanceName":"i-2-45-VM","state":"Starting","type":"User","uuid":"166483d6-2e6e-4ce2-9b82-2636d3592147"} in Starting state java.lang.NullPointerException: Cannot invoke "com.cloud.network.dao.NetworkVO.getId()" because "vmNetwork" is null
at org.apache.cloudstack.engine.orchestration.NetworkOrchestrator.releaseNic(NetworkOrchestrator.java:2490)
at org.apache.cloudstack.engine.orchestration.NetworkOrchestrator.release(NetworkOrchestrator.java:2433)
at com.cloud.vm.VirtualMachineManagerImpl.releaseVmResources(VirtualMachineManagerImpl.java:1983)
at com.cloud.vm.VirtualMachineManagerImpl.cleanup(VirtualMachineManagerImpl.java:1973)
at com.cloud.vm.VirtualMachineManagerImpl.orchestrateStart(VirtualMachineManagerImpl.java:1442)
at com.cloud.vm.VirtualMachineManagerImpl.orchestrateStart(VirtualMachineManagerImpl.java:5473)
at jdk.internal.reflect.GeneratedMethodAccessor710.invoke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:569)
```
Trying again
@blueorangutan test
--
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
Re: [PR] ui,api,server: template categorization based on os [cloudstack]
Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #10773:
URL: https://github.com/apache/cloudstack/pull/10773#issuecomment-2862087805
@shwstppr a [SL] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. 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
Re: [PR] ui,api,server: template categorization based on os [cloudstack]
Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #10773:
URL: https://github.com/apache/cloudstack/pull/10773#issuecomment-2934899157
Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 13592
--
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
Re: [PR] ui,api,server: template categorization based on os [cloudstack]
Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #10773:
URL: https://github.com/apache/cloudstack/pull/10773#issuecomment-2868657860
@shwstppr a [SL] Trillian-Jenkins test job (ol8 mgmt + kvm-ol8) has been kicked to run smoke tests
--
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
Re: [PR] ui,api,server: template categorization based on os [cloudstack]
Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #10773:
URL: https://github.com/apache/cloudstack/pull/10773#issuecomment-2869388860
<b>[SF] Trillian test result (tid-13253)</b>
Environment: kvm-ol8 (x2), Advanced Networking with Mgmt server ol8
Total time taken: 64178 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr10773-t13253-kvm-ol8.zip
Smoke tests completed. 140 look OK, 1 have errors, 0 did not run
Only failed and skipped tests results shown below:
Test | Result | Time (s) | Test File
--- | --- | --- | ---
test_02_deploy_vm_with_extraconfig_kvm | `Error` | 104.90 | test_deploy_vm_extra_config_data.py
--
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
Re: [PR] ui,api,server: template categorization based on os [cloudstack]
Posted by "shwstppr (via GitHub)" <gi...@apache.org>.
shwstppr commented on code in PR #10773:
URL: https://github.com/apache/cloudstack/pull/10773#discussion_r2100001857
##########
ui/src/config/section/config.js:
##########
@@ -187,6 +187,56 @@ export default {
}
]
},
+ {
+ name: 'guestoscategory',
+ title: 'label.guest.os.categories',
+ docHelp: 'adminguide/guest_os.html#guest-os',
Review Comment:
```suggestion
docHelp: 'adminguide/guest_os.html#guest-os-categories',
```
--
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
Re: [PR] ui,api,server: template categorization based on os [cloudstack]
Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #10773:
URL: https://github.com/apache/cloudstack/pull/10773#issuecomment-2835254754
@shwstppr a [SL] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. 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
Re: [PR] ui,api,server: template categorization based on os [cloudstack]
Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #10773:
URL: https://github.com/apache/cloudstack/pull/10773#issuecomment-2840902104
Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 13221
--
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
Re: [PR] ui,api,server: template categorization based on os [cloudstack]
Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #10773:
URL: https://github.com/apache/cloudstack/pull/10773#issuecomment-2840776708
@shwstppr a [SL] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. 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
Re: [PR] ui,api,server: template categorization based on os [cloudstack]
Posted by "shwstppr (via GitHub)" <gi...@apache.org>.
shwstppr commented on code in PR #10773:
URL: https://github.com/apache/cloudstack/pull/10773#discussion_r2072986724
##########
api/src/main/java/org/apache/cloudstack/api/command/admin/guest/UpdateGuestOsCmd.java:
##########
@@ -50,7 +50,7 @@ public class UpdateGuestOsCmd extends BaseAsyncCmd {
@Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = GuestOSResponse.class, required = true, description = "UUID of the Guest OS")
private Long id;
- @Parameter(name = ApiConstants.OS_DISPLAY_NAME, type = CommandType.STRING, required = true, description = "Unique display name for Guest OS")
Review Comment:
noted
--
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
Re: [PR] ui,api,server: template categorization based on os [cloudstack]
Posted by "Copilot (via GitHub)" <gi...@apache.org>.
Copilot commented on code in PR #10773:
URL: https://github.com/apache/cloudstack/pull/10773#discussion_r2073001575
##########
engine/schema/src/main/java/com/cloud/storage/dao/GuestOSDaoImpl.java:
##########
@@ -152,4 +153,14 @@ public Pair<List<? extends GuestOS>, Integer> listGuestOSByCriteria(Long startIn
return new Pair<>(result.first(), result.second());
}
Review Comment:
[nitpick] Consider adding a brief comment for the new listIdsByCategoryId method to clarify its purpose and usage in retrieving guest OS IDs by category.
```suggestion
/**
* Retrieves a list of guest OS IDs that belong to the specified category.
*
* @param categoryId the ID of the guest OS category
* @return a list of guest OS IDs
*/
```
--
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
Re: [PR] ui,api,server: template categorization based on os [cloudstack]
Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #10773:
URL: https://github.com/apache/cloudstack/pull/10773#issuecomment-2850458513
Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 13259
--
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
Re: [PR] ui,api,server: template categorization based on os [cloudstack]
Posted by "shwstppr (via GitHub)" <gi...@apache.org>.
shwstppr commented on PR #10773:
URL: https://github.com/apache/cloudstack/pull/10773#issuecomment-2842174504
@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.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] ui,api,server: template categorization based on os [cloudstack]
Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #10773:
URL: https://github.com/apache/cloudstack/pull/10773#issuecomment-2849994668
@shwstppr a [SL] Trillian-Jenkins test job (ol8 mgmt + kvm-ol8) has been kicked to run smoke tests
--
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
Re: [PR] ui,api,server: template categorization based on os [cloudstack]
Posted by "shwstppr (via GitHub)" <gi...@apache.org>.
shwstppr commented on code in PR #10773:
URL: https://github.com/apache/cloudstack/pull/10773#discussion_r2073010449
##########
server/src/main/java/com/cloud/server/ManagementServerImpl.java:
##########
@@ -2723,29 +2728,109 @@ public Pair<List<? extends GuestOS>, Integer> listGuestOSByCriteria(final ListGu
@Override
public Pair<List<? extends GuestOsCategory>, Integer> listGuestOSCategoriesByCriteria(final ListGuestOsCategoriesCmd cmd) {
- final Filter searchFilter = new Filter(GuestOSCategoryVO.class, "id", true, cmd.getStartIndex(), cmd.getPageSizeVal());
+ final Filter searchFilter = new Filter(GuestOSCategoryVO.class, "sortKey", true,
+ cmd.getStartIndex(), cmd.getPageSizeVal());
+ searchFilter.addOrderBy(GuestOSCategoryVO.class, "id", true);
final Long id = cmd.getId();
final String name = cmd.getName();
final String keyword = cmd.getKeyword();
+ final Boolean featured = cmd.isFeatured();
+ final Boolean isIso = cmd.isIso();
+ final Boolean isVnf = cmd.isVnf();
+ final Long zoneId = cmd.getZoneId();
+ final CPU.CPUArch arch = cmd.getArch();
- final SearchCriteria<GuestOSCategoryVO> sc = _guestOSCategoryDao.createSearchCriteria();
-
+ final SearchBuilder<GuestOSCategoryVO> sb = _guestOSCategoryDao.createSearchBuilder();
+ sb.and("id", sb.entity().getId(), SearchCriteria.Op.EQ);
+ sb.and("name", sb.entity().getId(), SearchCriteria.Op.LIKE);
+ sb.and("keyword", sb.entity().getId(), SearchCriteria.Op.LIKE);
Review Comment:
Done :man_facepalming:
##########
server/src/test/java/com/cloud/server/ManagementServerImplTest.java:
##########
@@ -124,27 +139,27 @@ public class ManagementServerImplTest {
UserDataManager userDataManager;
@Spy
+ @InjectMocks
ManagementServerImpl spy = new ManagementServerImpl();
@Mock
UserVmDetailsDao userVmDetailsDao;
@Mock
HostDetailsDao hostDetailsDao;
+
+ @Mock
+ GuestOSCategoryDao guestOSCategoryDao;
+
+ @Mock
+ GuestOSDao guestOSDao;
Review Comment:
done
--
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
Re: [PR] ui,api,server: template categorization based on os [cloudstack]
Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #10773:
URL: https://github.com/apache/cloudstack/pull/10773#issuecomment-2850274805
@shwstppr a [SL] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. 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
Re: [PR] ui,api,server: template categorization based on os [cloudstack]
Posted by "vishesh92 (via GitHub)" <gi...@apache.org>.
vishesh92 commented on PR #10773:
URL: https://github.com/apache/cloudstack/pull/10773#issuecomment-2850271960
@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.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] ui,api,server: template categorization based on os [cloudstack]
Posted by "shwstppr (via GitHub)" <gi...@apache.org>.
shwstppr commented on PR #10773:
URL: https://github.com/apache/cloudstack/pull/10773#issuecomment-2854117344
@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.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] ui,api,server: template categorization based on os [cloudstack]
Posted by "shwstppr (via GitHub)" <gi...@apache.org>.
shwstppr commented on code in PR #10773:
URL: https://github.com/apache/cloudstack/pull/10773#discussion_r2072949218
##########
ui/src/views/AutogenView.vue:
##########
@@ -1256,6 +1256,9 @@ export default {
}
var paramName = param.name
var extractedParamName = paramName.replace('ids', '').replace('id', '').toLowerCase()
+ if (extractedParamName.endsWith('ory')) {
+ extractedParamName = extractedParamName.slice(0, -3) + 'orie'
Review Comment:
@Pearl1594 in that code later at ln 1266 we seem to be using the following, therefore I didn't use ories
```
const possibleName = 'list' + extractedParamName + 's'
```
--
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
Re: [PR] ui,api,server: template categorization based on os [cloudstack]
Posted by "shwstppr (via GitHub)" <gi...@apache.org>.
shwstppr commented on PR #10773:
URL: https://github.com/apache/cloudstack/pull/10773#issuecomment-2940635082
@blueorangutan test
--
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
Re: [PR] ui,api,server: template categorization based on os [cloudstack]
Posted by "rohityadavcloud (via GitHub)" <gi...@apache.org>.
rohityadavcloud merged PR #10773:
URL: https://github.com/apache/cloudstack/pull/10773
--
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
Re: [PR] ui,api,server: template categorization based on os [cloudstack]
Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #10773:
URL: https://github.com/apache/cloudstack/pull/10773#issuecomment-2862889132
@shwstppr a [SL] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. 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
Re: [PR] ui,api,server: template categorization based on os [cloudstack]
Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #10773:
URL: https://github.com/apache/cloudstack/pull/10773#issuecomment-2862537635
Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 13300
--
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
Re: [PR] ui,api,server: template categorization based on os [cloudstack]
Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #10773:
URL: https://github.com/apache/cloudstack/pull/10773#issuecomment-2863789057
Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 13305
--
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
Re: [PR] ui,api,server: template categorization based on os [cloudstack]
Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #10773:
URL: https://github.com/apache/cloudstack/pull/10773#issuecomment-2943201455
<b>[SF] Trillian test result (tid-13470)</b>
Environment: kvm-ol8 (x2), Advanced Networking with Mgmt server ol8
Total time taken: 54137 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr10773-t13470-kvm-ol8.zip
Smoke tests completed. 141 look OK, 0 have errors, 0 did not run
Only failed and skipped tests results shown below:
Test | Result | Time (s) | Test File
--- | --- | --- | ---
--
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
Re: [PR] ui,api,server: template categorization based on os [cloudstack]
Posted by "shwstppr (via GitHub)" <gi...@apache.org>.
shwstppr commented on PR #10773:
URL: https://github.com/apache/cloudstack/pull/10773#issuecomment-2939951740
@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.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] ui,api,server: template categorization based on os [cloudstack]
Posted by "shwstppr (via GitHub)" <gi...@apache.org>.
shwstppr commented on PR #10773:
URL: https://github.com/apache/cloudstack/pull/10773#issuecomment-2934646487
@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.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] ui,api,server: template categorization based on os [cloudstack]
Posted by "rohityadavcloud (via GitHub)" <gi...@apache.org>.
rohityadavcloud closed pull request #10773: ui,api,server: template categorization based on os
URL: https://github.com/apache/cloudstack/pull/10773
--
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
Re: [PR] ui,api,server: template categorization based on os [cloudstack]
Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #10773:
URL: https://github.com/apache/cloudstack/pull/10773#issuecomment-2854336213
Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 13276
--
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
Re: [PR] ui,api,server: template categorization based on os [cloudstack]
Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #10773:
URL: https://github.com/apache/cloudstack/pull/10773#issuecomment-2862548735
@shwstppr a [SL] Trillian-Jenkins test job (ol8 mgmt + kvm-ol8) has been kicked to run smoke tests
--
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
Re: [PR] ui,api,server: template categorization based on os [cloudstack]
Posted by "shwstppr (via GitHub)" <gi...@apache.org>.
shwstppr commented on PR #10773:
URL: https://github.com/apache/cloudstack/pull/10773#issuecomment-2862546594
@blueorangutan test
--
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
Re: [PR] ui,api,server: template categorization based on os [cloudstack]
Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #10773:
URL: https://github.com/apache/cloudstack/pull/10773#issuecomment-2863109564
Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 13301
--
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
Re: [PR] ui,api,server: template categorization based on os [cloudstack]
Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #10773:
URL: https://github.com/apache/cloudstack/pull/10773#issuecomment-2865861171
@shwstppr a [SL] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. 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
Re: [PR] ui,api,server: template categorization based on os [cloudstack]
Posted by "shwstppr (via GitHub)" <gi...@apache.org>.
shwstppr commented on PR #10773:
URL: https://github.com/apache/cloudstack/pull/10773#issuecomment-2835251522
@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.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] ui,api,server: template categorization based on os [cloudstack]
Posted by "shwstppr (via GitHub)" <gi...@apache.org>.
shwstppr commented on PR #10773:
URL: https://github.com/apache/cloudstack/pull/10773#issuecomment-2850269990
@vishesh92 thanks for the review and testing. I've addressed the review comments and fixed the listTemplates issue
@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.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org