aruba / pyaoscx

Python modules for AOS-CX
Apache License 2.0
37 stars 25 forks source link

Firmware update fails #22

Closed mrkslm closed 1 year ago

mrkslm commented 1 year ago

Hello,

pyaoscx version 2.3.1

I tried to upload firmware but get an error: pyaoscx.exceptions.response_error.ResponseError: "RESPONSE ERROR: Invalid URL 'firmware?image=secondary': No scheme supplied. Perhaps you meant http://firmware?image=secondary?: Response: POST"

alagoutte commented 1 year ago

Hi,

What your code ? and what product and release actually ?

mrkslm commented 1 year ago

Hello Switch model is Aruba JL725A 6200F 24G PoE+ / 4SFP+ Current firmware 10.08 and wanted to test the upgrade to 10.11 with a simple code

`import urllib3 from pyaoscx.device import Device from pyaoscx.session import Session

urllib3.disable_warnings() VERSION = '10.04' SWITCH = '10.10.10.10'

USERNAME = "username" PASSWORD = 'password'

ses = Session(SWITCH, VERSION) ses.open(USERNAME, PASSWORD)

device = Device(ses) image = '.\ArubaOS-CX_6200_10_11_1010.swi' device.upload_firmware(partition_name='secondary', firmware_file_path=image, remote_firmware_file_path=None, vrf=None)

ses.close()`

alagoutte commented 1 year ago

the script run on what platform ? (Linux or Windows ?)

do you try to use upload_firmware_local ? https://github.com/aruba/pyaoscx/blob/3320612efe70e4293e4c3916c5f52e3d77c16c47/pyaoscx/device.py#L490

tchiapuziowong commented 1 year ago

Hi @mrkslm this is a known issue we're tracking through https://github.com/aruba/aoscx-ansible-collection/issues/52 - we've completed a fix and working on some additional bug fixes we're packaging in the next release which is planned for next week. we'll update this issue when we've published the fix, thank you for your patience!

mrkslm commented 1 year ago

@tchiapuziowong Understood! Will wait for the fix then :)

alagoutte commented 1 year ago

Hi @mrkslm this is a known issue we're tracking through aruba/aoscx-ansible-collection#52 - we've completed a fix and working on some additional bug fixes we're packaging in the next release which is planned for next week. we'll update this issue when we've published the fix, thank you for your patience!

use pycurl ? like for ansible module https://github.com/aruba/aoscx-ansible-collection/blob/31fa1c7d2a158ba20e00ee570534be96fe8e2d2f/plugins/modules/aoscx_upload_firmware.py#L155 (What Platform is Bristol and Lemans ? (PL ? RL ?))

mrkslm commented 1 year ago

Hello, tested with the version 2.4.0 and everything is working now. You can close this issue :)