示例#1
0
 def configure(self, options, conf):
     if options.with_guest_launcher is None:
         return
     global guest_starter
     guest_starter = create_guest_starter(
         options.with_guest_launcher,
         scripts.create_executor())
示例#2
0
文件: scripts.py 项目: thomassa/xenrt
def start(args=None, stdout=None):
    init_logging()
    params = parse_args_for_snap(args)
    starter = guest_starter.create_guest_starter(params.guest_spec,
                                                 create_executor())
    ip_address = starter.start()
    stdout = stdout or sys.stdout
    stdout.write(ip_address)
    stdout.write('\n')
示例#3
0
    def test_creating_a_xenserver_starter(self):
        obj = guest_starter.create_guest_starter(
            'xenserver:root@host:password:vmname/snapname', 'executor')

        self.assertTrue(obj is not None)
示例#4
0
    def test_created_object_has_executor(self):
        obj = guest_starter.create_guest_starter(
            'virtualbox-pfwd:127.0.0.1:windows/t', 'executor')

        self.assertEquals('executor', obj.executor)
示例#5
0
    def test_creating_a_xenserver_starter(self):
        obj = guest_starter.create_guest_starter(
            'xenserver:root@host:password:vmname/snapname', 'executor')

        self.assertTrue(obj is not None)
示例#6
0
    def test_created_object_has_executor(self):
        obj = guest_starter.create_guest_starter(
            'virtualbox-pfwd:127.0.0.1:windows/t', 'executor')

        self.assertEquals(
            'executor', obj.executor)
示例#7
0
 def configure(self, options, conf):
     if options.with_guest_launcher is None:
         return
     global guest_starter
     guest_starter = create_guest_starter(options.with_guest_launcher,
                                          scripts.create_executor())