Created
August 22, 2019 06:43
-
-
Save Ara4Sh/8a9e8fddc0d706ce69f7548cb4e8c10c to your computer and use it in GitHub Desktop.
_url.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def _url(self, zone=None): | |
| """ | |
| Private method to generate api urls | |
| :param zone: Zone name if None it will use All zones available in the config | |
| :return: self.api_urls | |
| """ | |
| if zone is None: | |
| for zone_name in app.config['zones']: | |
| self.api_urls.append(urljoin(app.config.ZONES[zone_name],"/api/v1/query")) | |
| else: | |
| self.api_urls.append(urljoin(app.config.ZONES[zone], "/api/v1/query")) | |
| return self.api_urls |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment