René's URL Explorer Experiment


Title: deployVirtualMachine build unexpected query string for parameter iptonetworklist · Issue #32 · PCextreme/cloudstack-php · GitHub

Open Graph Title: deployVirtualMachine build unexpected query string for parameter iptonetworklist · Issue #32 · PCextreme/cloudstack-php

X Title: deployVirtualMachine build unexpected query string for parameter iptonetworklist · Issue #32 · PCextreme/cloudstack-php

Description: Hello there, I got the very same problem reported on issue #1 but here I'll try to explain how to reproduce the case. On deployVirtualMachine command the API accepts an array for parameter iptonetworklist, which is formatted this way if ...

Open Graph Description: Hello there, I got the very same problem reported on issue #1 but here I'll try to explain how to reproduce the case. On deployVirtualMachine command the API accepts an array for parameter iptonetw...

X Description: Hello there, I got the very same problem reported on issue #1 but here I'll try to explain how to reproduce the case. On deployVirtualMachine command the API accepts an array for parameter ipto...

Opengraph URL: https://github.com/PCextreme/cloudstack-php/issues/32

X: @github

direct link

Domain: patch-diff.githubusercontent.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"deployVirtualMachine build unexpected query string for parameter iptonetworklist","articleBody":"Hello there, I got the very same problem reported on issue #1 but here I'll try to explain how to reproduce the case.\r\n\r\nOn `deployVirtualMachine` command the API accepts an array for parameter `iptonetworklist`, which is formatted this way if you create a VM directly from CloudStack UI: `\u0026iptonetworklist[0].networkid=b6170452-820c-4a5b-bb76-6a22a0266c0d\u0026iptonetworklist[0].ip=10.1.1.100\u0026iptonetworklist[0].mac=DC-FE-49-00-66-0D`. The key [0] on this array can be incremented when you associate more than one network to the new VM.\r\n\r\nThe point is that the method `protected function buildQueryString(array $params)` on `PCextreme\\Cloudstack\\Client` is not able to build the query string array like expected by CloudStack API on this command, giving `Notice: Undefined index: key` if we try to send the array data with something like this:\r\n\r\n```php\r\n  \"iptonetworklist\" =\u003e array:1 [\r\n    0 =\u003e array:3 [\r\n      \"mac\" =\u003e \"54-77-2F-BA-67-74\"\r\n      \"networkid\" =\u003e \"b6170452-820c-4a5b-bb76-6a22a0266c0d\"\r\n      \"ip\" =\u003e \"10.1.1.50\"\r\n    ]\r\n  ]\r\n```\r\n\r\nOtherwise, if we try to send the array as expected by the method, like the example bellow:\r\n\r\n```php\r\n  \"iptonetworklist\" =\u003e array:3 [\r\n    0 =\u003e array:2 [\r\n      \"key\" =\u003e \"mac\"\r\n      \"value\" =\u003e \"54-77-2F-BA-67-74\"\r\n    ]\r\n    1 =\u003e array:2 [\r\n      \"key\" =\u003e \"networkid\"\r\n      \"value\" =\u003e \"b6170452-820c-4a5b-bb76-6a22a0266c0d\"\r\n    ]\r\n    2 =\u003e array:2 [\r\n      \"key\" =\u003e \"ip\"\r\n      \"value\" =\u003e \"10.1.1.50\"\r\n    ]\r\n  ]\r\n```\r\n\r\nWe get the query string as this: `\u0026iptonetworklist[0].key=mac\u0026iptonetworklist[0].value=54-77-2F-BA-67-74\u0026iptonetworklist[1].key=networkid\u0026iptonetworklist[1].value=b6170452-820c-4a5b-bb76-6a22a0266c0d\u0026iptonetworklist[2].key=ip\u0026iptonetworklist[2].value=10.1.1.50`\r\n\r\nThis way the method will not give the notice, but CloudStack API will treat each key on the array as a different entry in the map, returning this error:\r\n\r\n```php\r\nClientException {#3412\r\n  #response: array:1 [\r\n    \"deployvirtualmachineresponse\" =\u003e array:4 [\r\n      \"uuidList\" =\u003e []\r\n      \"errorcode\" =\u003e 431\r\n      \"cserrorcode\" =\u003e 4350\r\n      \"errortext\" =\u003e \"Unable to translate and find entity with networkId: null\"\r\n    ]\r\n  ]\r\n  #message: \"Unable to translate and find entity with networkId: null\"\r\n  #code: 431\r\n  #file: \"/var/www/html/vendor/pcextreme/cloudstack/src/Client.php\"\r\n  #line: 405\r\n```\r\n\r\nI'm not sure if this is the only endpoint treating array on request this way, but the way `buildQueryString()` method parses input and build query string is not working for the command `deployVirtualMachine`.\r\n\r\nIf you could confirm if there are other commands receiving and parsing arrays for requests I could eventually send a PR to fix this, but I'm afraid we fix for this command and break for others.\r\n\r\nPlease let me know if I can help sending other evidences of the case.\r\n\r\nFor the reference, I'm using **CloudStack 4.15.0.0** here.","author":{"url":"https://github.com/danielcosta","@type":"Person","name":"danielcosta"},"datePublished":"2021-06-10T17:20:30.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/32/cloudstack-php/issues/32"}

route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:98450501-5709-c0e0-9a82-bba774cc5739
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-id8B4A:DA11A:38F5B99:4BDD33E:6981A989
html-safe-nonceacf07a2a7a6f09ac1b34b481af7d6ceb371011a1f42c9fd58632e6b6fc67c9ce
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4QjRBOkRBMTFBOjM4RjVCOTk6NEJERDMzRTo2OTgxQTk4OSIsInZpc2l0b3JfaWQiOiI2MzQ1MDIyNjM1MDY4Mzk5NDUiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmacdcfb295e5dbc7bdde5e63aa897942207a239e4bdfbf94e96825707147198a2b0
hovercard-subject-tagissue:917597314
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/PCextreme/cloudstack-php/32/issue_layout
twitter:imagehttps://opengraph.githubassets.com/65f712a40d55b1f386ff686408b0e25dc6f170eb4f83f0b48d236ea600a3f359/PCextreme/cloudstack-php/issues/32
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/65f712a40d55b1f386ff686408b0e25dc6f170eb4f83f0b48d236ea600a3f359/PCextreme/cloudstack-php/issues/32
og:image:altHello there, I got the very same problem reported on issue #1 but here I'll try to explain how to reproduce the case. On deployVirtualMachine command the API accepts an array for parameter iptonetw...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamedanielcosta
hostnamegithub.com
expected-hostnamegithub.com
Nonee137814e266030874fd2c86863529d0622b13889eeda04148c57654b6ea84ad6
turbo-cache-controlno-preview
go-importgithub.com/PCextreme/cloudstack-php git https://github.com/PCextreme/cloudstack-php.git
octolytics-dimension-user_id5224940
octolytics-dimension-user_loginPCextreme
octolytics-dimension-repository_id65943685
octolytics-dimension-repository_nwoPCextreme/cloudstack-php
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id65943685
octolytics-dimension-repository_network_root_nwoPCextreme/cloudstack-php
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
releasedd58d68a7813bbec9c91422c8c35f4af33832d70
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://patch-diff.githubusercontent.com/PCextreme/cloudstack-php/issues/32#start-of-content
https://patch-diff.githubusercontent.com/
Sign in https://patch-diff.githubusercontent.com/login?return_to=https%3A%2F%2Fgithub.com%2FPCextreme%2Fcloudstack-php%2Fissues%2F32
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub SparkBuild and deploy intelligent appshttps://github.com/features/spark
GitHub ModelsManage and compare promptshttps://github.com/features/models
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
GitHub SponsorsFund open source developershttps://github.com/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/accelerator
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://patch-diff.githubusercontent.com/login?return_to=https%3A%2F%2Fgithub.com%2FPCextreme%2Fcloudstack-php%2Fissues%2F32
Sign up https://patch-diff.githubusercontent.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=PCextreme%2Fcloudstack-php
Reloadhttps://patch-diff.githubusercontent.com/PCextreme/cloudstack-php/issues/32
Reloadhttps://patch-diff.githubusercontent.com/PCextreme/cloudstack-php/issues/32
Reloadhttps://patch-diff.githubusercontent.com/PCextreme/cloudstack-php/issues/32
PCextreme https://patch-diff.githubusercontent.com/PCextreme
cloudstack-phphttps://patch-diff.githubusercontent.com/PCextreme/cloudstack-php
Notifications https://patch-diff.githubusercontent.com/login?return_to=%2FPCextreme%2Fcloudstack-php
Fork 10 https://patch-diff.githubusercontent.com/login?return_to=%2FPCextreme%2Fcloudstack-php
Star 10 https://patch-diff.githubusercontent.com/login?return_to=%2FPCextreme%2Fcloudstack-php
Code https://patch-diff.githubusercontent.com/PCextreme/cloudstack-php
Issues 3 https://patch-diff.githubusercontent.com/PCextreme/cloudstack-php/issues
Pull requests 0 https://patch-diff.githubusercontent.com/PCextreme/cloudstack-php/pulls
Actions https://patch-diff.githubusercontent.com/PCextreme/cloudstack-php/actions
Security 0 https://patch-diff.githubusercontent.com/PCextreme/cloudstack-php/security
Insights https://patch-diff.githubusercontent.com/PCextreme/cloudstack-php/pulse
Code https://patch-diff.githubusercontent.com/PCextreme/cloudstack-php
Issues https://patch-diff.githubusercontent.com/PCextreme/cloudstack-php/issues
Pull requests https://patch-diff.githubusercontent.com/PCextreme/cloudstack-php/pulls
Actions https://patch-diff.githubusercontent.com/PCextreme/cloudstack-php/actions
Security https://patch-diff.githubusercontent.com/PCextreme/cloudstack-php/security
Insights https://patch-diff.githubusercontent.com/PCextreme/cloudstack-php/pulse
deployVirtualMachine build unexpected query string for parameter iptonetworklisthttps://patch-diff.githubusercontent.com/PCextreme/cloudstack-php/issues/32#top
https://github.com/danielcosta
https://github.com/danielcosta
danielcostahttps://github.com/danielcosta
on Jun 10, 2021https://github.com/PCextreme/cloudstack-php/issues/32#issue-917597314
#1https://github.com/PCextreme/cloudstack-php/issues/1
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.