Beispiel #1
0
 def setUp(self):
     super(TestShadeOperator, self).setUp()
     self.machine_id = uuid.uuid4().hex
     self.machine_name = self.getUniqueString('machine')
     self.node = fakes.make_fake_machine(
         machine_id=self.machine_id,
         machine_name=self.machine_name)
 def setUp(self):
     super(TestBaremetalPort, self).setUp()
     self.fake_baremetal_node = fakes.make_fake_machine(
         self.name, self.uuid)
     # TODO(TheJulia): Some tests below have fake ports,
     # since they are required in some processes. Lets refactor
     # them at some point to use self.fake_baremetal_port.
     self.fake_baremetal_port = fakes.make_fake_port('00:01:02:03:04:05',
                                                     node_id=self.uuid)
     self.fake_baremetal_port2 = fakes.make_fake_port('0a:0b:0c:0d:0e:0f',
                                                      node_id=self.uuid)
Beispiel #3
0
    def test_list_machines(self):
        fake_baremetal_two = fakes.make_fake_machine('two', str(uuid.uuid4()))
        self.register_uris([
            dict(
                method='GET',
                uri=self.get_mock_url(resource='nodes'),
                json={'nodes': [self.fake_baremetal_node,
                                fake_baremetal_two]}),
        ])

        machines = self.op_cloud.list_machines()
        self.assertEqual(2, len(machines))
        self.assertEqual(self.fake_baremetal_node, machines[0])
        self.assert_calls()
Beispiel #4
0
 def setUp(self):
     super(TestShadeOperator, self).setUp()
     self.machine_id = uuid.uuid4().hex
     self.machine_name = self.getUniqueString('machine')
     self.node = fakes.make_fake_machine(machine_id=self.machine_id,
                                         machine_name=self.machine_name)
Beispiel #5
0
 def setUp(self):
     super(TestUpdateMachinePatch, self).setUp()
     self.fake_baremetal_node = fakes.make_fake_machine(
         self.name, self.uuid)
Beispiel #6
0
 def setUp(self):
     super(TestBaremetalNode, self).setUp()
     self.fake_baremetal_node = fakes.make_fake_machine(
         self.name, self.uuid)