Пример #1
0
 def run(self):
     cmdline = 'virsh'
     cmdline += ' %s' % utils.escape(str(self.get('subcmd')))
     options = self.get('options')
     if options is not None:
         for opt in options:
             cmdline += ' --%s' % utils.escape(str(opt))
     self.res = utils.run(cmdline)
Пример #2
0
 def run(self):
     cmdline = "virsh"
     cmdline += " %s" % utils.escape(str(self.get("subcmd")))
     options = self.get("options")
     if options is not None:
         for opt in options:
             cmdline += " --%s" % utils.escape(str(opt))
     self.res = utils.run(cmdline)
Пример #3
0
    def run(self):
        cmdline = 'virsh'
        cmd = utils.escape(str(self.get('subcmd')))
        cmdline += ' %s' % cmd

        options = self.get('options')
        if options is not None:
            for opt in options:
                cmdline += ' --%s' % utils.escape(str(opt))
                opt = str(opt) + '_arg'
                opt = opt.replace('-', '_')
                arg = self.get(opt)

                if arg is None:
                    arg = ''
                arg = utils.escape(str(arg))
                cmdline += ' %s' % arg
        self.res = utils.run(cmdline)
Пример #4
0
 def run(self):
     cmdline = os.path.join(self.provider.path, 'pyramid')
     cmdline += ' %s' % utils.escape(str(self.get('option')))
     self.res = utils.run(cmdline)
Пример #5
0
 def run(self):
     cmdline = './pyramid'
     cmdline += ' %s' % utils.escape(str(self.get('option')))
     self.res = utils.run(cmdline)