Пример #1
0
    def setUp(self):
        utils.get_rapi_client = lambda: XenRapiProxy

        # self.patches = (
        #     (self.rapi, 'GetNodes', lambda x: NODES),
        #     (self.rapi, 'GetNode', lambda y, x: NODE),
        #     (self.rapi, 'GetInfo', lambda x: XEN_INFO),
        #     (self.rapi, 'GetOperatingSystems',
        #      lambda x: XEN_OPERATING_SYSTEMS),
        #     (self.rapi, 'GetInstance', lambda x, y: XEN_HVM_INSTANCE),
        # )

        super(TestHvmModifyVirtualMachineForm, self).setUp()

        self.vm, self.cluster = self.create_virtual_machine(
            cluster=Cluster(
                hostname='xen-hvm.cluster',
                slug='xen-hvm',
                username='******',
                password='******',
            ),
            hostname='xen-hvm.virtualmachine'
        )

        self.cluster.info = XEN_INFO.copy()
        self.cluster.info['default_hypervisor'] = 'xen-hvm'
        self.vm.refresh()
        self.vm.info = XEN_HVM_INSTANCE.copy()

        # data custom to HVM
        self.data['os'] = 'debootstrap+default'
        self.data['boot_order'] = 'cd'
Пример #2
0
    def setUp(self):
        utils.get_rapi_client = lambda: XenRapiProxy

        # self.patches = (
        #     (self.rapi, 'GetNodes', lambda x: NODES),
        #     (self.rapi, 'GetNode', lambda y, x: NODE),
        #     (self.rapi, 'GetInfo', lambda x: XEN_INFO),
        #     (self.rapi, 'GetOperatingSystems',
        #      lambda x: XEN_OPERATING_SYSTEMS),
        #     (self.rapi, 'GetInstance', lambda x, y: XEN_HVM_INSTANCE),
        # )

        super(TestHvmModifyVirtualMachineForm, self).setUp()

        self.vm, self.cluster = self.create_virtual_machine(
            cluster=Cluster(
                hostname='xen-hvm.cluster',
                slug='xen-hvm',
                username='******',
                password='******',
            ),
            hostname='xen-hvm.virtualmachine')

        self.cluster.info = XEN_INFO.copy()
        self.cluster.info['default_hypervisor'] = 'xen-hvm'
        self.vm.refresh()
        self.vm.info = XEN_HVM_INSTANCE.copy()

        # data custom to HVM
        self.data['os'] = 'debootstrap+default'
        self.data['boot_order'] = 'cd'
Пример #3
0
    def setUp(self):
        utils.get_rapi_client = lambda: XenRapiProxy

        super(TestPvmModifyVirtualMachineForm, self).setUp()

        self.vm, self.cluster = self.create_virtual_machine(
            cluster=Cluster(
                hostname='xen-pvm.cluster',
                slug='xen-pvm',
                username='******',
                password='******',
            ),
            hostname='pvm.virtualmachine')

        self.cluster.info = XEN_INFO.copy()
        self.vm.info = XEN_PVM_INSTANCE.copy()
        self.vm.refresh()

        self.data['os'] = 'debootstrap+default'
Пример #4
0
    def setUp(self):
        utils.get_rapi_client = lambda: XenRapiProxy

        super(TestPvmModifyVirtualMachineForm, self).setUp()

        self.vm, self.cluster = self.create_virtual_machine(
            cluster=Cluster(
                hostname='xen-pvm.cluster',
                slug='xen-pvm',
                username='******',
                password='******',
            ),
            hostname='pvm.virtualmachine'
        )

        self.cluster.info = XEN_INFO.copy()
        self.vm.info = XEN_PVM_INSTANCE.copy()
        self.vm.refresh()

        self.data['os'] = 'debootstrap+default'