- Community Home
- >
- Networking
- >
- Switching and Routing
- >
- Aruba & ProVision-based
- >
- Re: REST CLI commands not working on WC.16.10.0011
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-24-2020 09:16 AM - edited 12-24-2020 09:16 AM
12-24-2020 09:16 AM - edited 12-24-2020 09:16 AM
REST CLI commands not working on WC.16.10.0011
Model 2930F
I've been upgrading and downgrading and can confirm that, at least for me, CLI commands don't work over REST on WC.16.10.0011
They do work however on WC.16.10.0002
I don't have any example handy, bu tI've been using python with napalm-arubaos-switch and/or aos-sw-api libraries.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-13-2021 02:01 AM
01-13-2021 02:01 AM
Re: REST CLI commands not working on WC.16.10.0011
@egabrum Could you please share more details about the issue. If possible the results to compre with working code and non working code WC.16.10.0011
I am an HPE Employee
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-22-2021 04:15 AM
01-22-2021 04:15 AM
Re: REST CLI commands not working on WC.16.10.0011
@drk787Thanks for reacting.
Here's an example of script that works perfecty on WC.16.10.0002 , but not on WC.16.10.0011 :
import aos_sw_api
def main():
with aos_sw_api.Client(
switch_ip="x.x.x.x",
api_version=7,
username="manager",
password="x",
https=False,
) as client:
client.cookie
res = client.vlan.get_all_vlans()
print(res)
if __name__ == "__main__":
main()
Similar if I use the napalm-arubaos-switch library.
The traceback with the script above is:
Traceback (most recent call last):
File "U:\dev\aruba\rest_bug.py", line 30, in <module>
main()
File "U:\dev\aruba\rest_bug.py", line 10, in main
with aos_sw_api.Client(
File "C:\Users\user\.virtualenvs\aruba-Fs4htifT\lib\site-packages\aos_sw_api\_client.py", line 104, in __enter__
self.auth.login(cookie=self.cookie)
File "C:\Users\user\.virtualenvs\aruba-Fs4htifT\lib\site-packages\aos_sw_api\auth\_auth.py", line 34, in login
r = self._session.post(url=self._auth_base_url, json=self._user_data)
File "C:\Users\user\.virtualenvs\aruba-Fs4htifT\lib\site-packages\httpx\_client.py", line 824, in post
return self.request(
File "C:\Users\user\.virtualenvs\aruba-Fs4htifT\lib\site-packages\httpx\_client.py", line 600, in request
return self.send(
File "C:\Users\user\.virtualenvs\aruba-Fs4htifT\lib\site-packages\httpx\_client.py", line 620, in send
response = self.send_handling_redirects(
File "C:\Users\user\.virtualenvs\aruba-Fs4htifT\lib\site-packages\httpx\_client.py", line 647, in send_handling_redirects
response = self.send_handling_auth(
File "C:\Users\user\.virtualenvs\aruba-Fs4htifT\lib\site-packages\httpx\_client.py", line 684, in send_handling_auth
response = self.send_single_request(request, timeout)
File "C:\Users\user\.virtualenvs\aruba-Fs4htifT\lib\site-packages\httpx\_client.py", line 714, in send_single_request
) = transport.request(
File "C:\Users\user\.virtualenvs\aruba-Fs4htifT\lib\site-packages\httpcore\_sync\connection_pool.py", line 152, in request
response = connection.request(
File "C:\Users\user\.virtualenvs\aruba-Fs4htifT\lib\site-packages\httpcore\_sync\connection.py", line 78, in request
return self.connection.request(method, url, headers, stream, timeout)
File "C:\Users\user\.virtualenvs\aruba-Fs4htifT\lib\site-packages\httpcore\_sync\http11.py", line 62, in request
) = self._receive_response(timeout)
File "C:\Users\user\.virtualenvs\aruba-Fs4htifT\lib\site-packages\httpcore\_sync\http11.py", line 115, in _receive_response
event = self._receive_event(timeout)
File "C:\Users\user\.virtualenvs\aruba-Fs4htifT\lib\site-packages\httpcore\_sync\http11.py", line 142, in _receive_event
event = self.h11_state.next_event()
File "c:\program files\python39\lib\contextlib.py", line 135, in __exit__
self.gen.throw(type, value, traceback)
File "C:\Users\user\.virtualenvs\aruba-Fs4htifT\lib\site-packages\httpcore\_exceptions.py", line 12, in map_exceptions
raise to_exc(exc) from None
httpcore._exceptions.ProtocolError: can't handle event type ConnectionClosed when role=SERVER and state=SEND_RESPONSE
Maybe this is an issue on the Python side, not on the AOS side but what could have changed on AOS to break this?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-23-2021 12:48 AM
01-23-2021 12:48 AM
Re: REST CLI commands not working on WC.16.10.0011
WC.16.10.0011 works with curl:
POST /rest/v7/login-sessions HTTP/1.1
Host: x.x.x.x
User-Agent: curl/7.55.1
Accept: */*
Content-Length: 46
Content-Type: application/x-www-form-urlencoded
{"userName":"manager", "password":"x"}
But not with Python (I have tried httpx and requests):
POST /rest/v7/login-sessions HTTP/1.1
Host: x.x.x.x
Accept: */*
Accept-Encoding: gzip, deflate
Connection: keep-alive
User-Agent: python-httpx/0.16.1
Content-Length: 48
Content-Type: application/json
{"userName": "manager", "password": "x"}
No response, the switch just shuts the connection.
I'm reading and researching as much as I can. But I'm flabbergastered as to why this version would behave differently. I read the changelog and can't find anything that seems relevant.
Can somebody look into this? I've been chasing this for long now.
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-25-2021 05:54 PM
01-25-2021 05:54 PM
Re: REST CLI commands not working on WC.16.10.0011
@egabrum I would suggest to open a support case to investigate further on the differences between the codes.
Also can you try enabling the debugging and see the evetns during non-peak hours.
debug destination session (to display the events on the terminal)
debug rest-interface (debuggin the rest api)
Once done, stop the debugging using 'no debug all'
I am an HPE Employee
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-28-2021 03:16 PM
01-28-2021 03:16 PM
Re: REST CLI commands not working on WC.16.10.0011
Thank you drk787
It was a bug in WC.16.10.0011 , fixed in WC.16.10.0012