예제 #1
0
 def run(self):
     log.debug('Running task %s with command %s',
               self.task.name, self.command)
     exit_code, stdout, stderr = utils.execute(self.command)
     log.debug(
         'Task %s with command %s\n returned code %s\n out %s err%s',
         self.task.name, self.command, exit_code, stdout, stderr)
     if exit_code != 0:
         raise exceptions.Failed()
     return exit_code
예제 #2
0
파일: puppet.py 프로젝트: toby82/fuel-web
 def run(self):
     log.debug('Running puppet task %s with command %s',
               self.task.name, self.command)
     exit_code, stdout, stderr = utils.execute(self.command)
     log.debug(
         'Task %s with command %s\n returned code %s\n out %s err%s',
         self.task.name, self.command, exit_code, stdout, stderr)
     # 0 - no changes
     # 2 - was some changes but successfull
     # 4 - failures during transaction
     # 6 - changes and failures
     if exit_code not in [0, 2]:
         raise exceptions.Failed()
     return exit_code
예제 #3
0
 def execute(self, add_command):
     command = self.base_command + add_command
     cmd = ' '.join(command)
     return utils.execute(cmd)
예제 #4
0
 def check_puppet_installed(self):
     exit_code, out, err = utils.execute('which puppet')
     if exit_code == 1:
         self.skipTest('Puppet is not installed')
예제 #5
0
파일: base.py 프로젝트: CGenie/fuel-web
 def execute(self, add_command):
     command = self.base_command + add_command
     cmd = ' '.join(command)
     return utils.execute(cmd)
예제 #6
0
파일: base.py 프로젝트: CGenie/fuel-web
 def check_puppet_installed(self):
     exit_code, out, err = utils.execute('which puppet')
     if exit_code == 1:
         self.skipTest('Puppet is not installed')