parent
e35df38fd4
commit
718a4385bc
@ -0,0 +1,22 @@ |
||||
import argparse |
||||
import sys |
||||
|
||||
from utils import utils |
||||
|
||||
if __name__ == "__main__": |
||||
parser = argparse.ArgumentParser(description='This script helps you to collect public ips') |
||||
parser.add_argument('--region', type=str, dest='region_number', |
||||
default="4", help="region number") |
||||
parser.add_argument('--node_name_tag', type=str, |
||||
dest='node_name_tag', default='4-NODE-23-36-01-2018-07-05') |
||||
parser.add_argument('--region_config', type=str, |
||||
dest='region_config', default='configuration.txt') |
||||
parser.add_argument('--file_output', type=str, |
||||
dest='file_output', default='raw_ip.txt') |
||||
args = parser.parse_args() |
||||
|
||||
ip_list = utils.collect_public_ips(args.region_number, args.node_name_tag, args.region_config) |
||||
with open(args.file_output, "w") as fout: |
||||
for ip in ip_list: |
||||
fout.write(ip + "\n") |
||||
|
@ -0,0 +1,5 @@ |
||||
34.214.244.37 |
||||
34.220.54.177 |
||||
54.201.44.15 |
||||
54.202.250.175 |
||||
34.217.95.116 |
Loading…
Reference in new issue