Daniel Dayley
8ac4d52d5f
I need to finish up some of the F5 features but I'm starting on Aruba anyway
17 lines
598 B
Python
17 lines
598 B
Python
from servicebase import ServiceBase
|
|
|
|
class ServiceDelegate(ServiceBase) :
|
|
def get_arguments(cls) :
|
|
"""Returns an array of information used to construct an argumentparser argument."""
|
|
return [ '-d', '--dns', 'store_true', "Return DNS resolution about the subject" ]
|
|
|
|
def perform_lookup(self,host_tuple) :
|
|
return_dict = {}
|
|
if len(host_tuple[2]) > 0 :
|
|
return_dict['ipaddresses'] = list(host_tuple[2])
|
|
if host_tuple[0] and host_tuple[0] != '' :
|
|
return_dict['hostname'] = host_tuple[0]
|
|
if len(host_tuple[1]) > 0 :
|
|
return_dict['aliases'] = list(host_tuple[1])
|
|
return return_dict
|