Hello,
I am trying to add IPv6 and proxy server support in my plugin.
I am facing a issue while cloning the session ticket via a IPv6 proxy server.
My set up has:
IPv6 vCenter Server
IPv6 Proxy Server
IPv6 Plugin appliance
I am using below code:
import requests
import json
url = "https://[2604:a140:1501:404:20c:29ff:fe8b:a9b9]/api/ui/vcenter/session/clone-ticket"
payload = {'vc_guid': '038dff91-fd40-40cd-bfe6-3092321da61b'}
headers = {
'vmware-api-session-id': 'vmw-sid:[issuer:f8461db2-69e3-43a1-a0b2-adcdaeee6651,version:2,value:60c635dcbeef1c6d62cdcfd70d055c08e68a3981]',
'Content-Type': 'application/json'
}
proxies = {
'http': 'http://[2604:a140:1501:404::104]:3128',
'https': 'http://[2604:a140:1501:404::104]:3128',
}
#proxies={}
response = requests.request("POST", url, headers=headers, data=json.dumps(payload), proxies=proxies, verify=False)
print(response.text)
I am getting below response if I use proxy server in this communication:
<!doctype html><html lang="en"><head><title>HTTP Status 400 – Bad Request</title><style type="text/css">body {font-family:Tahoma,Arial,sans-serif;} h1, h2, h3, b {color:white;background-color:#525D76;} h1 {font-size:22px;} h2 {font-size:16px;} h3 {font-size:14px;} p {font-size:12px;} a {color:black;} .line {height:1px;background-color:#525D76;border:none;}</style></head><body><h1>HTTP Status 400 – Bad Request</h1></body></html>
Not sure why this is happening? Does the API not support communication via IPv6 proxy server? I have verified this via IPv4 proxy server.
Please let me know what I am doing wrong here.
Attaching vsphere-ui logs from vCenter server.