Untitled

mail@pastecode.io avatar
unknown
plain_text
a year ago
440 B
1
Indexable
Never
with open(agent_file, 'rt', encoding='latin-1') as file:
                for line in file:
                    if str(i) + ".privatip" in line:
                        vm_ip = str(line.split('='))
                        vm_ip = re.findall( r'[0-9]+(?:\.[0-9]+){3}', vm_ip)
                        vm_ip = list(map(str, vm_ip))
                        vm_ip = vm_ip[0]
                        VM_Details[vm_id]['vm_ip'].append(vm_ip)