Alteon Rest Api

6 views
Skip to first unread message

mamadouadaba

unread,
May 9, 2018, 6:13:52 AM5/9/18
to Ansible Project
Hello there,

I would like to get config of the Radware alteon vadc through Rest API.
Since I want to access directly without using vdirect, I inialized a module.
But the fact is I don't know the tree being the api in order to get alteon configuration.


here the part of the connection module

def get_config(module):

    host = module.params ['host']
    username = module.params ['username']
    password = module.params ['password']
  
    userAndPass = b64encode(b"username:password").decode("ascii")

    headers = { 'Authorization' : 'Basic userAndPass' }
    urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)
  
    session = requests.get("https://"+host"/config", headers=headers, verify=False)
   
     Issue : I got an issue while testing the code like : 
     requests.exceptions.ConnectionError: ('Connection aborted.', BadStatusLine("''",))

Thanks in advance for your help
Reply all
Reply to author
Forward
0 new messages