Title: config: fix setting postrequest config by shwstppr · Pull Request #190 · apache/cloudstack-cloudmonkey · GitHub
Open Graph Title: config: fix setting postrequest config by shwstppr · Pull Request #190 · apache/cloudstack-cloudmonkey
X Title: config: fix setting postrequest config by shwstppr · Pull Request #190 · apache/cloudstack-cloudmonkey
Description: PR #161 introduced postrequest config but there was no way to update that config other than updating the config file. This PR fixes the behaviour. Also adds a log to highlight what HTTP method is used. Tested changing config; ⇒ make run ▶ Running gofmt… ▶ Building executable… 7510f73 ▶ Done! ./bin/cmk Apache CloudStack 🐵 CloudMonkey 6.5.0-rc Report issues: https://github.com/apache/cloudstack-cloudmonkey/issues (421-test) 🐱 > set profile postrequesttest Loaded in-built API cache. Failed to read API cache, please run 'sync'. Loaded server profile: postrequesttest Url: http://localhost:8080/client/api Username: admin Domain: / API Key: Total APIs: 880 (postrequesttest) 🐱 > set url http://10.0.32.197:8080/client/api Loaded in-built API cache. Failed to read API cache, please run 'sync'. (postrequesttest) 🐱 > set debug true [debug] UpdateConfig key:debug value:true update:true [debug] Trying to read API cache from:/home/shwstppr/.cmk/profiles/postrequesttest.cache Loaded in-built API cache. Failed to read API cache, please run 'sync'. (postrequesttest) 🐱 > list zones filter=id,name [debug] ExecLine line:list zones filter=id,name [debug] ExecCmd args: list, zones, filter=id,name [debug] Login POST URL:http://10.0.32.197:8080/client/apimap[command:[login] domain:[/] password:[password] response:[json] username:[admin]] [debug] Login POST response status code:200 [debug] Login response body:{"loginresponse":{"username":"admin","userid":"9357510b-7e61-11f0-ba77-1e00c8000158","domainid":"430d0c02-7e61-11f0-ba77-1e00c8000158","timeout":1800,"account":"admin","firstname":"admin","lastname":"cloud","type":"1","timezone":"UTC","timezoneoffset":"0.0","registered":"false","sessionkey":"vBI44baeXU3Wpik2PLxZwRqcCsA","is2faenabled":"false","is2faverified":"true","issuerfor2fa":"CloudStack","managementserverid":"061c8be8-8efa-44f6-ade6-3c5502ce5b22"}} [debug] Login sessionkey:vBI44baeXU3Wpik2PLxZwRqcCsA [debug] Checking if 2FA is enabled and verified for the user map[account:admin domainid:430d0c02-7e61-11f0-ba77-1e00c8000158 firstname:admin is2faenabled:false is2faverified:true issuerfor2fa:CloudStack lastname:cloud managementserverid:061c8be8-8efa-44f6-ade6-3c5502ce5b22 registered:false sessionkey:vBI44baeXU3Wpik2PLxZwRqcCsA timeout:1800 timezone:UTC timezoneoffset:0.0 type:1 userid:9357510b-7e61-11f0-ba77-1e00c8000158 username:admin] [debug] 2FA is not enabled for the user, skipping 2FA validation [debug] NewAPIRequest API request URL:http://10.0.32.197:8080/client/api?command=listZones&expires=2025-08-26T09:25:04Z&filter=id,name&response=json&sessionkey=vBI44baeXU3Wpik2PLxZwRqcCsA&signatureversion=3 [debug] Using HTTP POST for the request: http://10.0.32.197:8080/client/api [debug] NewAPIRequest response status code:200 [debug] NewAPIRequest response body:{"listzonesresponse":{"count":1,"zone":[{"id":"ea7e88b7-0798-4ea7-adf3-253cf8b3d229","name":"ref-trl-9283-k-Mr8-abhishek-kumar","dns1":"10.0.32.1","dns2":"8.8.8.8","internaldns1":"10.0.32.1","internaldns2":"8.8.4.4","guestcidraddress":"10.1.1.0/24","networktype":"Advanced","securitygroupsenabled":false,"gputotal":0,"gpuused":0,"allocationstate":"Enabled","zonetoken":"891489eb-6f53-3e39-84d6-e97116312e88","dhcpprovider":"VirtualRouter","localstorageenabled":false,"tags":[],"allowuserspecifyvrmtu":false,"routerprivateinterfacemaxmtu":1500,"routerpublicinterfacemaxmtu":1500,"type":"Core","isnsxenabled":false,"ismultiarch":false,"asnrange":"","routedmodeenabled":true,"hasannotations":false}]}} { "count": 1, "zone": [ { "id": "ea7e88b7-0798-4ea7-adf3-253cf8b3d229", "name": "ref-trl-9283-k-Mr8-abhishek-kumar" } ] } (postrequesttest) 🐱 > set postrequest false [debug] ExecLine line:set postrequest false [debug] ExecCmd args: set, postrequest, false [debug] Set command received:postrequest values:false [debug] UpdateConfig key:postrequest value:false update:true [debug] Trying to read API cache from:/home/shwstppr/.cmk/profiles/postrequesttest.cache Loaded in-built API cache. Failed to read API cache, please run 'sync'. (postrequesttest) 🐱 > list zones filter=id,name [debug] ExecLine line:list zones filter=id,name [debug] ExecCmd args: list, zones, filter=id,name [debug] Login POST URL:http://10.0.32.197:8080/client/apimap[command:[login] domain:[/] password:[password] response:[json] username:[admin]] [debug] Login POST response status code:200 [debug] Login response body:{"loginresponse":{"username":"admin","userid":"9357510b-7e61-11f0-ba77-1e00c8000158","domainid":"430d0c02-7e61-11f0-ba77-1e00c8000158","timeout":1800,"account":"admin","firstname":"admin","lastname":"cloud","type":"1","timezone":"UTC","timezoneoffset":"0.0","registered":"false","sessionkey":"8wnjcYpx7qzkjvlxLaDeHaZ7iLI","is2faenabled":"false","is2faverified":"true","issuerfor2fa":"CloudStack","managementserverid":"061c8be8-8efa-44f6-ade6-3c5502ce5b22"}} [debug] Login sessionkey:8wnjcYpx7qzkjvlxLaDeHaZ7iLI [debug] Checking if 2FA is enabled and verified for the user map[account:admin domainid:430d0c02-7e61-11f0-ba77-1e00c8000158 firstname:admin is2faenabled:false is2faverified:true issuerfor2fa:CloudStack lastname:cloud managementserverid:061c8be8-8efa-44f6-ade6-3c5502ce5b22 registered:false sessionkey:8wnjcYpx7qzkjvlxLaDeHaZ7iLI timeout:1800 timezone:UTC timezoneoffset:0.0 type:1 userid:9357510b-7e61-11f0-ba77-1e00c8000158 username:admin] [debug] 2FA is not enabled for the user, skipping 2FA validation [debug] NewAPIRequest API request URL:http://10.0.32.197:8080/client/api?command=listZones&expires=2025-08-26T09:25:40Z&filter=id,name&response=json&sessionkey=8wnjcYpx7qzkjvlxLaDeHaZ7iLI&signatureversion=3 [debug] Using HTTP GET for the request: http://10.0.32.197:8080/client/api?command=listZones&expires=2025-08-26T09:25:40Z&filter=id,name&response=json&sessionkey=8wnjcYpx7qzkjvlxLaDeHaZ7iLI&signatureversion=3 [debug] NewAPIRequest response status code:200 [debug] NewAPIRequest response body:{"listzonesresponse":{"count":1,"zone":[{"id":"ea7e88b7-0798-4ea7-adf3-253cf8b3d229","name":"ref-trl-9283-k-Mr8-abhishek-kumar","dns1":"10.0.32.1","dns2":"8.8.8.8","internaldns1":"10.0.32.1","internaldns2":"8.8.4.4","guestcidraddress":"10.1.1.0/24","networktype":"Advanced","securitygroupsenabled":false,"gputotal":0,"gpuused":0,"allocationstate":"Enabled","zonetoken":"891489eb-6f53-3e39-84d6-e97116312e88","dhcpprovider":"VirtualRouter","localstorageenabled":false,"tags":[],"allowuserspecifyvrmtu":false,"routerprivateinterfacemaxmtu":1500,"routerpublicinterfacemaxmtu":1500,"type":"Core","isnsxenabled":false,"ismultiarch":false,"asnrange":"","routedmodeenabled":true,"hasannotations":false}]}} { "count": 1, "zone": [ { "id": "ea7e88b7-0798-4ea7-adf3-253cf8b3d229", "name": "ref-trl-9283-k-Mr8-abhishek-kumar" } ] } (postrequesttest) 🐱 > set postrequest true [debug] ExecLine line:set postrequest true [debug] ExecCmd args: set, postrequest, true [debug] Set command received:postrequest values:true [debug] UpdateConfig key:postrequest value:true update:true [debug] Trying to read API cache from:/home/shwstppr/.cmk/profiles/postrequesttest.cache Loaded in-built API cache. Failed to read API cache, please run 'sync'. (postrequesttest) 🐱 > list zones filter=id,name [debug] ExecLine line:list zones filter=id,name [debug] ExecCmd args: list, zones, filter=id,name [debug] Login POST URL:http://10.0.32.197:8080/client/apimap[command:[login] domain:[/] password:[password] response:[json] username:[admin]] [debug] Login POST response status code:200 [debug] Login response body:{"loginresponse":{"username":"admin","userid":"9357510b-7e61-11f0-ba77-1e00c8000158","domainid":"430d0c02-7e61-11f0-ba77-1e00c8000158","timeout":1800,"account":"admin","firstname":"admin","lastname":"cloud","type":"1","timezone":"UTC","timezoneoffset":"0.0","registered":"false","sessionkey":"RdGJhjn9r4MymvjBOTRio4hRqpg","is2faenabled":"false","is2faverified":"true","issuerfor2fa":"CloudStack","managementserverid":"061c8be8-8efa-44f6-ade6-3c5502ce5b22"}} [debug] Login sessionkey:RdGJhjn9r4MymvjBOTRio4hRqpg [debug] Checking if 2FA is enabled and verified for the user map[account:admin domainid:430d0c02-7e61-11f0-ba77-1e00c8000158 firstname:admin is2faenabled:false is2faverified:true issuerfor2fa:CloudStack lastname:cloud managementserverid:061c8be8-8efa-44f6-ade6-3c5502ce5b22 registered:false sessionkey:RdGJhjn9r4MymvjBOTRio4hRqpg timeout:1800 timezone:UTC timezoneoffset:0.0 type:1 userid:9357510b-7e61-11f0-ba77-1e00c8000158 username:admin] [debug] 2FA is not enabled for the user, skipping 2FA validation [debug] NewAPIRequest API request URL:http://10.0.32.197:8080/client/api?command=listZones&expires=2025-08-26T09:26:03Z&filter=id,name&response=json&sessionkey=RdGJhjn9r4MymvjBOTRio4hRqpg&signatureversion=3 [debug] Using HTTP POST for the request: http://10.0.32.197:8080/client/api [debug] NewAPIRequest response status code:200 [debug] NewAPIRequest response body:{"listzonesresponse":{"count":1,"zone":[{"id":"ea7e88b7-0798-4ea7-adf3-253cf8b3d229","name":"ref-trl-9283-k-Mr8-abhishek-kumar","dns1":"10.0.32.1","dns2":"8.8.8.8","internaldns1":"10.0.32.1","internaldns2":"8.8.4.4","guestcidraddress":"10.1.1.0/24","networktype":"Advanced","securitygroupsenabled":false,"gputotal":0,"gpuused":0,"allocationstate":"Enabled","zonetoken":"891489eb-6f53-3e39-84d6-e97116312e88","dhcpprovider":"VirtualRouter","localstorageenabled":false,"tags":[],"allowuserspecifyvrmtu":false,"routerprivateinterfacemaxmtu":1500,"routerpublicinterfacemaxmtu":1500,"type":"Core","isnsxenabled":false,"ismultiarch":false,"asnrange":"","routedmodeenabled":true,"hasannotations":false}]}} { "count": 1, "zone": [ { "id": "ea7e88b7-0798-4ea7-adf3-253cf8b3d229", "name": "ref-trl-9283-k-Mr8-abhishek-kumar" } ] } (postrequesttest) 🐱 > exit [debug] ExecLine line:exit [debug] ExecCmd args: exit
Open Graph Description: PR #161 introduced postrequest config but there was no way to update that config other than updating the config file. This PR fixes the behaviour. Also adds a log to highlight what HTTP method is u...
X Description: PR #161 introduced postrequest config but there was no way to update that config other than updating the config file. This PR fixes the behaviour. Also adds a log to highlight what HTTP method is u...
Opengraph URL: https://github.com/apache/cloudstack-cloudmonkey/pull/190
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:61fb03c3-f864-5120-0da0-6ced6ef8ae9b |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | E662:2965CC:E506D0:1366C39:6A516FFE |
| html-safe-nonce | 0324adfa7a0c3ee492d0980752dd57dd549ccaa26d93784972833f7d9e935ebb |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFNjYyOjI5NjVDQzpFNTA2RDA6MTM2NkMzOTo2QTUxNkZGRSIsInZpc2l0b3JfaWQiOiI5MTk0ODcxMjkyNzkyMjM4MDc4IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 92ae13f30d8a2f3d0d9871ca0bd2f7f894e6cfed85921db6e13c5481380e798f |
| hovercard-subject-tag | pull_request:2774438791 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/apache/cloudstack-cloudmonkey/pull/190/files |
| twitter:image | https://avatars.githubusercontent.com/u/153340?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/153340?s=400&v=4 |
| og:image:alt | PR #161 introduced postrequest config but there was no way to update that config other than updating the config file. This PR fixes the behaviour. Also adds a log to highlight what HTTP method is u... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | b9a586c06a05a7a86fc7e3f4dbd03e42f6869085879aa184aa6369456dbd50fb |
| turbo-cache-control | no-preview |
| diff-view | unified |
| go-import | github.com/apache/cloudstack-cloudmonkey git https://github.com/apache/cloudstack-cloudmonkey.git |
| octolytics-dimension-user_id | 47359 |
| octolytics-dimension-user_login | apache |
| octolytics-dimension-repository_id | 13641478 |
| octolytics-dimension-repository_nwo | apache/cloudstack-cloudmonkey |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 13641478 |
| octolytics-dimension-repository_network_root_nwo | apache/cloudstack-cloudmonkey |
| turbo-body-classes | logged-out env-production page-responsive full-width |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | b19955a9dd40fd99462443f7911b522d7216776a |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width