def __init__(self, *args, **kargs): Addon.__init__(self) moduleBase.__init__(self, *args, **kargs) self.dhclientcmd = dhclient(**kargs) vrf_id = self._get_vrf_context() if vrf_id and vrf_id == 'mgmt': self.mgmt_vrf_context = True else: self.mgmt_vrf_context = False self.logger.info('mgmt vrf_context = %s' % self.mgmt_vrf_context) try: self.dhclient_retry_on_failure = int( policymanager.policymanager_api.get_module_globals( module_name=self.__class__.__name__, attr="dhclient_retry_on_failure")) except Exception: self.dhclient_retry_on_failure = self.DHCLIENT_RETRY_ON_FAILURE if self.dhclient_retry_on_failure < 0: self.dhclient_retry_on_failure = 0 self.logger.info("dhclient: dhclient_retry_on_failure set to %s" % self.dhclient_retry_on_failure)
def __init__(self, *args, **kargs): Addon.__init__(self) moduleBase.__init__(self, *args, **kargs) self.dhclientcmd = dhclient(**kargs) vrf_id = self._get_vrf_context() if vrf_id and vrf_id == 'mgmt': self.mgmt_vrf_context = True else: self.mgmt_vrf_context = False self.logger.info('mgmt vrf_context = %s' % self.mgmt_vrf_context)
def _init_command_handlers(self): if not self.dhclientcmd: self.dhclientcmd = dhclient()
def _init_command_handlers(self): if not self.ipcmd: self.ipcmd = self.bondcmd = LinkUtils() if not self.dhclientcmd: self.dhclientcmd = dhclient()