Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

KeyError: 'deviceid' #5

Open
DiegoGuisande opened this issue Oct 5, 2021 · 1 comment
Open

KeyError: 'deviceid' #5

DiegoGuisande opened this issue Oct 5, 2021 · 1 comment

Comments

@DiegoGuisande
Copy link

When execute:
./huawei_get_state.py --api_ip=xxx.xxx.xxx.xxx --api_port=8088 --api_user=username --api_password='password' --storage_name="storage_name_in_zabbix" --discovery

With de correct parameters, return the next error of de diviceid:
Traceback (most recent call last):
File "./huawei_get_state.py", line 274, in
main()
File "./huawei_get_state.py", line 263, in main
result_discovery = discovering_resources(arguments.api_user, arguments.api_password, arguments.api_ip, arguments.api_port, arguments.storage_name, list_resources)
File "./huawei_get_state.py", line 102, in discovering_resources
device_id = api_connection[0]['data']['deviceid']
KeyError: 'deviceid'

Can you help me? Thanks.

@proffust
Copy link

proffust commented Feb 8, 2022

Check error by curl
curl -k -X POST -d '{"scope":0,"username":"monitoring","password":""}' -H "Connection:keep-alive" -H "Content-Type:application/json" -H "Accept:application/json" https://addr:8088/deviceManager/rest/xxxxx/sessions

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants