Closed Melius-Group closed 8 years ago
Hi, have you specified the datacenter number?
If you are using get_hypervisors
, you have to pass with '-d' parameter
python get_hypervisors.py --username "FHU-XXXX" --password "xxxxxxxxxxxx" -d 1
Hi, Yes of course. I have VM at dc3, so i test it with it, and tested with 1 too.
The result is same.
I test it on ubuntu 14.04 LTS and 15.10,.. with: python examples/get_hypervisors.py -d 3 -u FHU-29* -w **
The result is different but failed.
If You have a working solution on any language (python, php, bash, anything) please contact me. I like to manage the VM-s from WHMCS via api, so if you have WHMCS module for it, it is also interesting for me :)
Thank You for your help. Regards.
Hi, I was able to reproduce the problem, and upgrading requests module to latest version should resolve the problem:
pip install requests --upgrade
I'm going to fix in requirements specification.
Let me know if this solve your problem.
I done it before you write, but the problem is same... Anything else? :)
Or suggested operating system and python version?
I'll install new VM with packages if you suggest. The IP of VM is not is Aruba's network.
Can you please paste me the error? I reproduced on an Ubuntu 14.04 today and it was working.
Could you please tell me distribution version, python version and requests version?
Thanks.
The Ubuntu version is now 15.10, python 2.7.
The input:
python get_hypervisors.py -d 3 -u FHU-2_4 -w "_**"
The output:
2016-03-25 08:14:19,058 MainThread ERROR CloudInterface: Caught Exception: <class 'requests.exceptions.ConnectionError'> in: PyArubaAPI.py at line: 67
Msg: ('Connection aborted.', gaierror(-2, 'Name or service not known'))
Traceback (most recent call last):
File "get_hypervisors.py", line 13, in
The VM ip what send the request: 95.140..
Should I install a fresh ubuntu 14.04 with python?
Thank You
You may have a DNS issue.
hm... what kind of?
Msg: ('Connection aborted.', gaierror(-2, 'Name or service not known'))
Try printing the URI. Figure out where, it is easy. wcf_baseurl
I'm going to try to reproduce the issue with Ubuntu 15.10, meanwhile if you can print wcf_baseurl it would be awesome.
Thank You, the Hungarian administrator suggest me to change the baseurl to ...arubacloud.hu i swap back to original, and its correct now.. Sorry for that :) and VERY VERY THANK YOU
Thank You again, this api is great, but:
Thank You
Hello, in order to retrieve the vm ip I just added a new example (print_vm.py), but basically the code is the follow:
if isinstance(vm, Smart):
print("VM IP: {}".format(vm.ip_addr))
elif isinstance(vm, Pro):
print("VM IP: {}".format(vm.ip_addr.ip_addr))
About the second question, how to set rDNS you can't do it right now via this client library. If you want, you can open another issue asking to add the functionality.
Alessio
OK, thank You,
I get ip address and name, status, etc, but the template_id is None.... why? How can I get, the correct id?
Not implemented yet, same as before, open an issue I will mark it as enhancement and we will provide it.
Since they are different requests, please don't use this thread, use different issues for different subjects, we are happy to improve the library if you need something.
Dear Developers,
I have an issue with this api: On Ubuntu 14.04 I got this error message: 2016-03-08 09:26:08,074 MainThread ERROR CloudInterface: Caught Exception: <type 'exceptions.TypeError'> in: PyArubaAPI.py at line: 67 Msg: request() got an unexpected keyword argument 'json' Traceback (most recent call last): File "teszt.py", line 7, in
ci.login(username="FHU-29_", password="_*****", load=True)
File "/usr/local/lib/python2.7/dist-packages/ArubaCloud/PyArubaAPI.py", line 74, in login
raise Exception(e)
Exception: request() got an unexpected keyword argument 'json'
After I upgrade Ubuntu 15.10 I got new one: python examples/get_hypervisors.py -d 3 -u 29* -w U****S 2016-03-16 17:06:24,058 MainThread ERROR CloudInterface: Caught Exception: <class 'requests.exceptions.ConnectionError'> in: PyArubaAPI.py at line: 67 Msg: ('Connection aborted.', gaierror(-2, 'Name or service not known')) Traceback (most recent call last): File "examples/get_hypervisors.py", line 13, in
i.login(username=p.username, password=p.password, load=True)
File "/usr/local/lib/python2.7/dist-packages/ArubaCloud/PyArubaAPI.py", line 74, in login
raise Exception(e)
Exception: ('Connection aborted.', gaierror(-2, 'Name or service not known'))
Please help me solve this issue. Thank You and best regards: Gabor Czipri Melius-Group Kft