Exemplo n.º 1
0
    def test_no_data(self):
        self.inspector.get_data.side_effect = (
            ironic_inspector_client.ClientError(mock.Mock()))

        action = baremetal.ConfigureRootDeviceAction(node_uuid='MOCK_UUID',
                                                     root_device='smallest')
        self.assertRaisesRegexp(exception.RootDeviceDetectionError,
                                "No introspection data", action.run)

        self.assertEqual(self.ironic.node.update.call_count, 0)
Exemplo n.º 2
0
 def get_data(self, uuid):
     try:
         return self.data[uuid]
     except KeyError:
         raise ironic_inspector_client.ClientError(mock.Mock())
Exemplo n.º 3
0
 def get_status(self, uuid):
     try:
         return self.states[uuid]
     except KeyError:
         raise ironic_inspector_client.ClientError(mock.Mock())