mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
kubevirt_cdi_upload: fix the upload (#54048)
This commit is contained in:
parent
f43d97da8a
commit
d7c1bb2fc6
1 changed files with 1 additions and 2 deletions
|
@ -158,9 +158,8 @@ class KubeVirtCDIUpload(KubernetesRawModule):
|
||||||
result = self.perform_action(resource, definition)
|
result = self.perform_action(resource, definition)
|
||||||
|
|
||||||
headers = {'Authorization': "Bearer {0}".format(result['result']['status']['token'])}
|
headers = {'Authorization': "Bearer {0}".format(result['result']['status']['token'])}
|
||||||
files = {'file': imgfile}
|
|
||||||
url = "{0}/{1}/upload".format(upload_host, API)
|
url = "{0}/{1}/upload".format(upload_host, API)
|
||||||
requests.post(url, files=files, headers=headers, verify=upload_host_verify_ssl)
|
requests.post(url, data=imgfile, headers=headers, verify=upload_host_verify_ssl)
|
||||||
|
|
||||||
self.exit_json(changed=True)
|
self.exit_json(changed=True)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue