def get_ss(self):
containers = self.get_containers()
for container in containers['data']:
# ????????
cmd = None
if re.fullmatch(ss_image_name, container['attributes']['image_name']):
cmd = re.fullmatch(re_pwd_encry, container['attributes']['cmd'])
password = cmd.group('password')
encryption = cmd.group('encryption')
for ss in container['attributes']['port_mappings']:
ss_dict = dict()
ss_dict['ip'] = re.search(re_ss_ip, ss[0]['host']).group().replace('-', '.')
ss_dict['port'] = ss[0]['service_port']
ss_dict['password'] = password
ss_dict['encryption'] = encryption
ss_dict['uri'] = generate_ss_uri(ss_dict)
self.ss_set.append(ss_dict)
评论列表
文章目录