Automate virtual test (#714)

* using argparse for parsing command line arguments

* added command line option to specify which servers to run

---------

Co-authored-by: Erik Fröjdh <erik.frojdh@gmail.com>
This commit is contained in:
2023-05-11 12:15:22 +02:00
committed by GitHub
parent da4dd0df7e
commit fb25a01db5
5 changed files with 212 additions and 4 deletions

View File

@ -1441,6 +1441,10 @@ class Detector(CppDetectorApi):
@udp_srcip.setter
def udp_srcip(self, ip):
if ip == "auto":
if self.type == detectorType.GOTTHARD:
raise NotImplementedError('Auto for udp_srcip cannot be used for GotthardI')
ip = socket.gethostbyname(self.hostname[0])
ip = ut.make_ip(ip)
ut.set_using_dict(self.setSourceUDPIP, ip)
@ -1467,6 +1471,8 @@ class Detector(CppDetectorApi):
@udp_srcip2.setter
def udp_srcip2(self, ip):
if ip == "auto":
ip = socket.gethostbyname(self.hostname)
ip = ut.make_ip(ip)
ut.set_using_dict(self.setSourceUDPIP2, ip)