コード例 #1
0
ファイル: vrf.py プロジェクト: rkandilarov/ifupdown2
 def _init_command_handlers(self):
     if not self.ipcmd:
         self.ipcmd = iproute2()
     if not self.bondcmd:
         self.bondcmd = bondutil()
     if not self.dhclientcmd:
         self.dhclientcmd = dhclient()
コード例 #2
0
ファイル: mstpctl.py プロジェクト: puppet-py/ifupdown2
 def _init_command_handlers(self):
     flags = self.get_flags()
     if not self.ipcmd:
         self.ipcmd = iproute2(**flags)
     if not self.brctlcmd:
         self.brctlcmd = brctl(**flags)
     if not self.mstpctlcmd:
         self.mstpctlcmd = mstpctlutil(**flags)
コード例 #3
0
    def run (self, ifaceobj, operation, query_ifaceobj = None, **extra_args):
    	op_handler = self._run_ops.get(operation)
	if not op_handler:
		return
	if operation != 'query-running' and not self._is_my_interface (ifaceobj):
		return
	if not self.ipcmd:
		self.ipcmd = iproute2 ()
	if operation == 'query-checkcurr':
		op_handler (self, ifaceobj, query_ifaceobj)
	else:
		op_handler (self, ifaceobj)
コード例 #4
0
 def _init_command_handlers(self):
     if not self.ipcmd:
         self.ipcmd = iproute2(**self.get_flags())
コード例 #5
0
 def _init_command_handlers(self):
     if not self.ipcmd:
         self.ipcmd = iproute2()
コード例 #6
0
ファイル: ifenslave.py プロジェクト: puppet-py/ifupdown2
 def _init_command_handlers(self):
     flags = self.get_flags()
     if not self.ipcmd:
         self.ipcmd = iproute2(**flags)
     if not self.ifenslavecmd:
         self.ifenslavecmd = ifenslaveutil(**flags)
コード例 #7
0
 def _init_command_handlers(self):
     if not self.ipcmd:
         self.ipcmd = iproute2(**self.get_flags())