Ejemplo n.º 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())
Ejemplo n.º 2
0
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')
Ejemplo 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)
Ejemplo n.º 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)
Ejemplo n.º 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)
Ejemplo n.º 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)
Ejemplo n.º 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())