How to solve the problem in a round-robin dns when dealing with HTTP API?

Comrades, good morning. =) I have a problem on the level design of the script, I can not figure out
prompt who than can, please.
There is a script which polls a HTTP device in your network. Before sending the main query is required
authentication sends a hash from "imparl" (just HTTP), we receive a token that
then attached to the headers of the main query.
Have device may be two controllers, each with its own IP to which we can refer. So, if
we will configure both the IP for one DNS record (round-robin), then when referring to the DNS without using cache
DNS will send the request to one controller to another. Ie we can retrieve the authentication token
from the controller, And have the following query to try to retrieve data from this token from controller B.
If you use the IP address to connect, this is not a problem, but I'm trying to implement a connection
HTTPS with certificate validation, where, as I understand it, be sure to use the FQDN, which accounts for
to allow the IP. Can be requests has some clever mechanisms for this?
If needed, here's the code on GitHub:
https://github.com/asand3r/zbx-hpmsa/blob/master/z...
June 8th 19 at 21:16
0 answer

Find more questions by tags Python