def _ghost2loggergetGUID(self):
# Let's deal with the JSON API calls here
HEADERS = {"Content-Type": 'application/json'}
_URL = self._ghost_url + "/v1/guid"
try:
r = requests.get(_URL, headers=HEADERS, verify=False,
auth=(self._username, self._password))
_data = r.json()
if _data['host'] == "GUID":
for _item in _data['pattern']:
_guid = str(_item)
return str(_guid)
else:
return ""
except Exception as e:
self._logger.info('[Ghost2logger]: Cannot get GUID: ' +
str(e))
ghost2loggerloopback.py 文件源码
python
阅读 31
收藏 0
点赞 0
评论 0
评论列表
文章目录