def __init__(self, *args, **kwargs): super(ovs,self).__init__(*args,**kwargs) self.IP = kwargs['IP'] self.usr = kwargs['username'] self.pwd = kwargs['password'] self.connect() logger_name = __name__.split('.')[-1] self.log_handler = fill_getLogger(logger_name) self.log_handler.writeInfolog("************* SSH to OVS SWITCH %s *************" % self.IP)
def __init__(self, *args, **kwargs): super(Karaf, self).__init__(*args, **kwargs) self.IP = kwargs['IP'] self.usr = kwargs['username'] self.pwd = kwargs['password'] self.connect() self.logger_name = __name__.split('.')[-1] self.log_handler = fill_getLogger(self.logger_name) self.log_handler.writeInfolog( '************* SSH to CONTROLLER %s *************' % kwargs["IP"])
def __init__(self, device_obj, node=None): self.Prompt = ">>>" self.TG = device_obj # flag = 0 # if config.MININET: # if self.TG.mini_execute_command(cmd='%s scapy'%node,prompt=self.Prompt): # flag += 1 # else: # if self.TG.execute_command_host(cmd='scapy',prompt=self.Prompt): # flag += 1 logger_name = __name__.split('.')[-1] self.log_handler = fill_getLogger(logger_name)
def __init__(self, device_obj, node=None): self.Prompt = ">>>" self.TG = device_obj flag = 0 if config.MININET: if self.TG.mini_execute_command(cmd='%s scapy' % node, prompt=self.Prompt): flag += 1 else: if self.TG.execute_command_host(cmd='scapy', prompt=self.Prompt): flag += 1 logger_name = __name__.split('.')[-1] self.log_handler = fill_getLogger(logger_name) # self.TG.wri2log('Entereded into SCAPY Traffic Gen mode') if flag >= 1 \ # else self.TG.wri2log('Failed to start SCAPY, check properly') self.log_handler.writeInfolog('Entereded into SCAPY Traffic Gen mode') if flag >= 1 \ else self.log_handler.writeErrorlog('Failed to start SCAPY, check properly')
def __init__(self): self.flow_obj = FLOW() logger_name = __name__.split('.')[-1] self.log_handler = fill_getLogger(logger_name)