Пример #1
0
    def test__exec_seamicrotool(self):
		self.mox.StubOutWithMock(seamicro, '_connect')
		seamicro._connect(self.info['address'],self.info['username'],self.info['password'],'enable;show server summary ' + self.info['ccard']).AndReturn((0, None))
		self.mox.ReplayAll()

		seamicro._exec_seamicrotool(self.info, 'enable;show server summary ' + self.info['ccard'])
		self.mox.VerifyAll()
Пример #2
0
    def test_set_boot_device_ok(self):
        self.mox.StubOutWithMock(seamicro, '_exec_seamicrotool')

        seamicro._exec_seamicrotool(self.info, 'enable;configure terminal;server id ' + self.info['ccard'] + '; bios boot-order pxe,hd0').\
        AndReturn([None,None])
        self.mox.ReplayAll()

        with task_manager.acquire([self.node['uuid']]) as task:
            self.driver.power._set_boot_device(task, self.node, 'pxe', persistent=True)
        self.mox.VerifyAll()