list async jobs for a resource type#13011
Conversation
c378e9d to
6a6ebbe
Compare
|
@blueorangutan package |
|
@blueorangutan package |
|
@sureshanaparti 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. |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## 4.22 #13011 +/- ##
=========================================
Coverage 17.60% 17.61%
- Complexity 15688 15692 +4
=========================================
Files 5919 5919
Lines 532005 532004 -1
Branches 65060 65060
=========================================
+ Hits 93683 93695 +12
+ Misses 427755 427744 -11
+ Partials 10567 10565 -2
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
Packaging result [SF]: ✖️ el8 ✖️ el9 ✖️ debian ✖️ suse15. SL-JID 17468 |
6a6ebbe to
e2eb7de
Compare
|
@blueorangutan package |
|
@sureshanaparti 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. |
|
Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ el10 ✔️ debian ✔️ suse15. SL-JID 17469 |
kiranchavala
left a comment
There was a problem hiding this comment.
LGTM
Tested the api calls (list asyncjobs and query asyncjobresult) with resourcetype and resourceid parameters
list asyncjobs resourcetype=<> resourceid=<>
list asyncjobs resourcetype=<>
query asyncjobresult resourcetype=<> resourceid=<>
Sample
(localcloud) 🐱 > list asyncjobs resourcetype=VirtualMachine
{
"asyncjobs": [
{
"account": "admin",
"accountid": "c0b7685d-371d-11f1-8b66-1e00d80002e8",
"cmd": "org.apache.cloudstack.api.command.admin.vm.StartVMCmdByAdmin",
"created": "2026-04-14T09:25:51+0000",
"domainid": "7f740ce2-371d-11f1-8b66-1e00d80002e8",
"domainpath": "ROOT",
"jobid": "786b5392-e575-4f3b-a198-dec8a64598dc",
"jobinstanceid": "69fd8295-0809-4a9f-ab61-60ff42bfb189",
"jobinstancetype": "VirtualMachine",
"jobprocstatus": 0,
"jobresultcode": 0,
"jobstatus": 0,
"managementserverid": "86e26ae0-b43c-45a1-86a9-96458553a33a",
"managementservername": "ref-trl-11563-k-mol8-kiran-chavala-mgmt1.sofia.shapeblue.com",
"userid": "c0b8df47-371d-11f1-8b66-1e00d80002e8"
}
],
"count": 1
}
(localcloud) 🐱 > query asyncjobresult resourcetype=VirtualMachine resourceid=69fd8295-0809-4a9f-ab61-60ff42bfb189
{
"account": "admin",
"accountid": "c0b7685d-371d-11f1-8b66-1e00d80002e8",
"cmd": "org.apache.cloudstack.api.command.admin.vm.StartVMCmdByAdmin",
"created": "2026-04-14T09:25:51+0000",
"domainid": "7f740ce2-371d-11f1-8b66-1e00d80002e8",
"domainpath": "ROOT",
"jobid": "786b5392-e575-4f3b-a198-dec8a64598dc",
"jobinstanceid": "69fd8295-0809-4a9f-ab61-60ff42bfb189",
"jobinstancetype": "VirtualMachine",
"jobprocstatus": 0,
"jobresultcode": 0,
"jobstatus": 0,
"managementserverid": "86e26ae0-b43c-45a1-86a9-96458553a33a",
"managementservername": "ref-trl-11563-k-mol8-kiran-chavala-mgmt1.sofia.shapeblue.com",
"userid": "c0b8df47-371d-11f1-8b66-1e00d80002e8"
}
(localcloud) 🐱 > list asyncjobs resourcetype=VirtualMachine resourceid=69fd8295-0809-4a9f-ab61-60ff42bfb189
(localcloud) 🐱 > list asyncjobs resourcetype=VirtualMachine resourceid=69fd8295-0809-4a9f-ab61-60ff42bfb189
{
"asyncjobs": [
{
"account": "admin",
"accountid": "c0b7685d-371d-11f1-8b66-1e00d80002e8",
"cmd": "org.apache.cloudstack.api.command.admin.vm.StopVMCmdByAdmin",
"created": "2026-04-14T09:27:02+0000",
"domainid": "7f740ce2-371d-11f1-8b66-1e00d80002e8",
"domainpath": "ROOT",
"jobid": "3e976fc8-bdba-4b82-98be-48d616312b1d",
"jobinstanceid": "69fd8295-0809-4a9f-ab61-60ff42bfb189",
"jobinstancetype": "VirtualMachine",
"jobprocstatus": 0,
"jobresultcode": 0,
"jobstatus": 0,
"managementserverid": "86e26ae0-b43c-45a1-86a9-96458553a33a",
"managementservername": "ref-trl-11563-k-mol8-kiran-chavala-mgmt1.sofia.shapeblue.com",
"userid": "c0b8df47-371d-11f1-8b66-1e00d80002e8"
}
],
"count": 1
}
(localcloud) 🐱 > query asyncjobresult resourcetype=VirtualMachine resourceid=69fd8295-0809-4a9f-ab61-60ff42bfb189
{
"account": "admin",
"accountid": "c0b7685d-371d-11f1-8b66-1e00d80002e8",
"cmd": "org.apache.cloudstack.api.command.admin.vm.StopVMCmdByAdmin",
"completed": "2026-04-14T09:27:05+0000",
"created": "2026-04-14T09:27:02+0000",
"domainid": "7f740ce2-371d-11f1-8b66-1e00d80002e8",
"domainpath": "ROOT",
"jobid": "3e976fc8-bdba-4b82-98be-48d616312b1d",
"jobinstanceid": "69fd8295-0809-4a9f-ab61-60ff42bfb189",
"jobinstancetype": "VirtualMachine",
"jobprocstatus": 0,
"jobresult": {
"virtualmachine": {
"account": "admin",
"affinitygroup": [],
"cpunumber": 1,
"cpuspeed": 500,
"cpuused": "0%",
"created": "2026-04-13T10:11:55+0000",
"details": {
"Message.ReservedCapacityFreed.Flag": "false",
"cpuOvercommitRatio": "2.0"
},
"diskioread": 0,
"diskiowrite": 0,
"diskkbsread": 0,
"diskkbswrite": 0,
"displayname": "test",
"displayvm": true,
"domain": "ROOT",
"domainid": "7f740ce2-371d-11f1-8b66-1e00d80002e8",
"guestosid": "7f9ddbe2-371d-11f1-8b66-1e00d80002e8",
"haenable": false,
"hasannotations": false,
"hypervisor": "KVM",
"id": "69fd8295-0809-4a9f-ab61-60ff42bfb189",
"instancename": "i-2-3-VM",
"isdynamicallyscalable": false,
"jobid": "3e976fc8-bdba-4b82-98be-48d616312b1d",
"jobstatus": 0,
"lastupdated": "2026-04-14T09:27:05+0000",
"memory": 512,
"memoryintfreekbs": -1,
"memorykbs": 524288,
"memorytargetkbs": 524288,
"name": "test",
"networkkbsread": 0,
"networkkbswrite": 0,
"nic": [
{
"deviceid": "0",
"extradhcpoption": [],
"gateway": "10.1.1.1",
"id": "3e4cfda4-f574-4af7-84f3-78d14b023425",
"ipaddress": "10.1.1.128",
"isdefault": true,
"macaddress": "02:01:00:cc:00:01",
"netmask": "255.255.255.0",
"networkid": "22bd44ba-36b9-4e5d-a14e-799e2f4e8016",
"networkname": "test",
"secondaryip": [],
"traffictype": "Guest",
"type": "Isolated"
}
],
"osdisplayname": "CentOS 5.5 (64-bit)",
"ostypeid": "7f9ddbe2-371d-11f1-8b66-1e00d80002e8",
"passwordenabled": false,
"pooltype": "NetworkFilesystem",
"receivedbytes": 0,
"rootdeviceid": 0,
"rootdevicetype": "ROOT",
"securitygroup": [],
"sentbytes": 0,
"serviceofferingid": "d6fbfcd8-aa18-40f4-b5d4-c96f9ff4a292",
"serviceofferingname": "Small Instance",
"state": "Stopped",
"tags": [],
"templatedisplaytext": "CentOS 5.5(64-bit) no GUI (KVM)",
"templateid": "7f7b47e0-371d-11f1-8b66-1e00d80002e8",
"templatename": "CentOS 5.5(64-bit) no GUI (KVM)",
"userid": "c0b8df47-371d-11f1-8b66-1e00d80002e8",
"username": "admin",
"zoneid": "4346705d-480b-42a2-8fac-a2c3e0414c74",
"zonename": "ref-trl-11563-k-Mol8-kiran-chavala"
}
},
"jobresultcode": 0,
"jobresulttype": "object",
"jobstatus": 1,
"userid": "c0b8df47-371d-11f1-8b66-1e00d80002e8"
}
(localcloud) 🐱 > query asyncjobresult resourceid=69fd8295-0809-4a9f-ab61-60ff42bfb189
🙈 Error: (HTTP 431, error code 4350) Both resourceid and resourcetype required
(localcloud) 🐱 > list asyncjobs resourceid=69fd8295-0809-4a9f-ab61-60ff42bfb189
🙈 Error: (HTTP 431, error code 4350) resourceid parameter must be used with resourcetype parameter
|
@blueorangutan test |
|
@kiranchavala a [SL] Trillian-Jenkins test job (ol8 mgmt + kvm-ol8) has been kicked to run smoke tests |
Description
This PR allows list async jobs for a resource type (VirtualMachine/Volume/etc)
Types of changes
Feature/Enhancement Scale or Bug Severity
Feature/Enhancement Scale
Bug Severity
Screenshots (if appropriate):
How Has This Been Tested?
How did you try to break this feature and the system with this change?