示例#1
0
 def postcmd(self, stop, line):
     '''
          Hook method executed just after a command dispatch is finished
          line is the command line which was executed,           
          stop is a variable which indicates whether execution 
                will be terminated after the call to postcmd();
       '''
     new_prompt = self.prompt.split()
     if (vps_cli.get_current_prompt() != new_prompt[0]):
         if vps_cli.get_current_prompt() == None:
             vps_cli.set_current_prompt(new_prompt[0])
     if not stop:
         self.prompt = vps_cli.create_enable_config_prompt()
     return stop
示例#2
0
 def postcmd(self, stop, line):
     """
          Hook method executed just after a command dispatch is finished
          line is the command line which was executed,           
          stop is a variable which indicates whether execution 
                will be terminated after the call to postcmd();
       """
     new_prompt = self.prompt.split()
     if vps_cli.get_current_prompt() != new_prompt[0]:
         if vps_cli.get_current_prompt() == None:
             vps_cli.set_current_prompt(new_prompt[0])
     if not stop:
         self.prompt = vps_cli.create_enable_config_prompt()
     return stop
示例#3
0
 def __invokeDisable(self):
     '''This will bring the prompt back to standard mode'''
     vps_cli.set_current_prompt(lib.constants._VFM_STAN)
     new_prompt = lib.constants._VFM_STAN
     vps_cli.cli_runner('disable')
示例#4
0
 def __invokeDisable(self):
     """This will bring the prompt back to standard mode"""
     vps_cli.set_current_prompt(lib.constants._VFM_STAN)
     new_prompt = lib.constants._VFM_STAN
     vps_cli.cli_runner("disable")