Ejemplo n.º 1
0
    def test_fill_obj_extarq_fields_with_dep_id(self, mock_get_devprof,
                                                mock_get_ah, mock_get_obj_dep,
                                                mock_obj_devprof):
        in_db_extarq = self.fake_db_extarqs[0]
        # Since state is not 'Bound', attach_handle_get_by_id is not called.
        in_db_extarq['state'] = 'Initial'
        in_db_extarq['deployable_id'] = '1'
        db_devprof = fake_device_profile.get_db_devprofs()[0]
        obj_devprof = fake_device_profile.get_obj_devprofs()[0]

        mock_get_devprof.return_value = db_devprof
        mock_obj_devprof.return_value = obj_devprof
        mock_get_obj_dep.return_value = \
            fake_deployable.fake_deployable_obj(self.context,
                                                uuid=self.deployable_uuids[0])

        out_db_extarq = objects.ExtARQ._fill_obj_extarq_fields(
            self.context, in_db_extarq)

        self.assertEqual(out_db_extarq['device_profile_name'],
                         db_devprof['name'])
        self.assertEqual(out_db_extarq['attach_handle_type'], '')
        self.assertEqual(out_db_extarq['attach_handle_info'], '')
        devprof_group_id = out_db_extarq['device_profile_group_id']
        self.assertEqual(out_db_extarq['device_profile_group'],
                         obj_devprof['groups'][devprof_group_id])
Ejemplo n.º 2
0
    def test_need_extra_bind_job(self, mock_check_state, mock_conn):
        mock_conn.return_value = type(
            "Connection", (object,),
            {"image": type("image", (object,), {"get": self.images_get})})
        dep_uuid = self.deployable_uuids[0]
        fake_dep = fake_deployable.fake_deployable_obj(
            self.context, uuid=dep_uuid)

        # function_id is require
        obj_extarq = self.class_fgpa_objects["function_program"]
        need = obj_extarq._need_extra_bind_job(self.context, fake_dep)
        self.assertTrue(need)

        # bitstream_id is require
        obj_extarq = self.class_fgpa_objects["bitstream_program"]
        need = obj_extarq._need_extra_bind_job(self.context, fake_dep)
        self.assertTrue(need)

        # Both bitstream_id and function_id are require
        obj_extarq = self.class_fgpa_objects["bad_program"]
        self.assertRaises(
            exception.InvalidParameterValue, obj_extarq._need_extra_bind_job,
            self.context, fake_dep)

        # None of bitstream_id or function_id is require
        obj_extarq = self.class_fgpa_objects["no_program"]
        need = obj_extarq._need_extra_bind_job(self.context, fake_dep)
        self.assertFalse(need)
Ejemplo n.º 3
0
    def test_master_with_async_jobs(self, mock_spawn, mock_get_result):
        # There are async job, so will start to monitor the job status
        def job(context, deployable):
            pass

        works = utils.ThreadWorks()
        dep_uuid = self.deployable_uuids[0]
        fake_dep = fake_deployable.fake_deployable_obj(self.context,
                                                       uuid=dep_uuid)
        arq_job_binds = {
            self.class_objects["bitstream_program"]:
            works.spawn(job, self.context, fake_dep),
            self.class_objects["function_program"]:
            works.spawn(job, self.context, fake_dep)
        }
        arq_binds = {
            self.class_objects["gpu"]: None,
            self.class_objects["no_program"]: None,
            self.class_objects["mlu"]: None,
        }
        arq_binds.update(arq_job_binds)
        objects.ext_arq.ExtARQJobMixin.master(self.context, arq_binds)
        mock_get_result.return_value = "Jobs_Generator"
        mock_get_result.assert_called_once()
        mock_spawn.assert_called_once()
Ejemplo n.º 4
0
 def test_get_all(self, mock_list_dep):
     fake_deps = []
     for uuid in self.deployable_uuids:
         fake_dep = fake_deployable.fake_deployable_obj(self.context,
                                                        uuid=uuid)
         fake_deps.append(fake_dep)
     mock_list_dep.return_value = fake_deps
     data = self.get_json('/accelerators/deployables', headers=self.headers)
     self.assertEqual(len(self.deployable_uuids), len(data['deployables']))
     mock_list_dep.assert_called_once()
Ejemplo n.º 5
0
 def test_allocate_attach_handle(self, mock_check_state):
     obj_extarq = self.fake_obj_extarqs[0]
     dep_uuid = self.deployable_uuids[0]
     fake_dep = fake_deployable.fake_deployable_obj(self.context,
                                                    uuid=dep_uuid)
     self.assertRaises(exception.ResourceNotFound,
                       obj_extarq._allocate_attach_handle, self.context,
                       fake_dep)
     mock_check_state.assert_called_once_with(self.context,
                                              constants.ARQ_BIND_FAILED)
Ejemplo n.º 6
0
 def test_fpga_sync_start_bind_job(self, mock_bind):
     # Test FPGA with no program does not need async bind
     obj_extarq = self.fpga_class_objects["no_program"]
     obj_extarq.arq.state = constants.ARQ_UNBOUND
     dep_uuid = self.deployable_uuids[0]
     fake_dep = fake_deployable.fake_deployable_obj(self.context,
                                                    uuid=dep_uuid)
     need_bind = getattr(obj_extarq.bind, "is_job", False)
     with mock.patch.object(obj_extarq, 'bind') as mock_aysnc_bind:
         mock_aysnc_bind.is_job = need_bind
         obj_extarq._bind_job(self.context, fake_dep)
         mock_aysnc_bind.assert_called_once_with(self.context, fake_dep)
         mock_bind.assert_not_called()
Ejemplo n.º 7
0
 def test_gpu_arq_start_bind_job(self, mock_aysnc_bind):
     # Test GPU ARQ does not need async bind
     obj_extarq = self.class_objects["gpu"]
     obj_extarq.arq.state = constants.ARQ_UNBOUND
     dep_uuid = self.deployable_uuids[0]
     fake_dep = fake_deployable.fake_deployable_obj(self.context,
                                                    uuid=dep_uuid)
     is_job = getattr(obj_extarq.bind, "is_job", False)
     with mock.patch.object(obj_extarq, 'bind') as mock_bind:
         mock_bind.is_job = is_job
         obj_extarq._bind_job(self.context, fake_dep)
         mock_bind.assert_called_once_with(self.context, fake_dep)
         mock_aysnc_bind.assert_not_called()
Ejemplo n.º 8
0
    def test_apply_patch_fpga_arq_monitor_job(self, mock_master, mock_get_dep,
                                              mock_check_state, mock_list,
                                              mock_get, mock_attach_handle,
                                              mock_notify_bind, mock_conn):

        good_states = constants.ARQ_STATES_TRANSFORM_MATRIX[
            constants.ARQ_BIND_STARTED]
        obj_extarq = self.fake_obj_extarqs[2]
        obj_fpga_extarq = self.fake_obj_fpga_extarqs[1]
        obj_fpga_extarq.state = self.fake_obj_fpga_extarqs[1]
        obj_extarq.arq.state = good_states[0]
        obj_fpga_extarq.arq.state = good_states[0]

        # TODO(Shaohe) we should control the state of arq to make
        # better testcase.
        # bound_extarq = copy.deepcopy(obj_extarq)
        # bound_extarq.arq.state = constants.ARQ_BOUND
        # mock_get.side_effect = [obj_extarq, bound_extarq]
        mock_get.side_effect = [obj_extarq, obj_fpga_extarq]
        mock_list.return_value = [obj_extarq]
        uuid = obj_extarq.arq.uuid
        instance_uuid = obj_extarq.arq.instance_uuid
        dep_uuid = self.deployable_uuids[0]
        fake_dep = fake_deployable.fake_deployable_obj(self.context,
                                                       uuid=dep_uuid)
        mock_get_dep.return_value = fake_dep
        valid_fields = {
            uuid: {
                'hostname': obj_extarq.arq.hostname,
                'device_rp_uuid': obj_extarq.arq.device_rp_uuid,
                'instance_uuid': instance_uuid
            }
        }
        patch_list = {
            str(uuid): [{
                "path": "/hostname",
                "op": "add",
                "value": obj_extarq.arq.hostname
            }, {
                "path": "/device_rp_uuid",
                "op": "add",
                "value": obj_extarq.arq.device_rp_uuid
            }, {
                "path": "/instance_uuid",
                "op": "add",
                "value": instance_uuid
            }]
        }
        objects.ExtARQ.apply_patch(self.context, patch_list, valid_fields)
        mock_master.assert_called_once()
Ejemplo n.º 9
0
 def test_allocate_attach_handle_with_error_log(self, mock_check_state,
                                                mock_allocate, mock_log):
     obj_extarq = self.fake_obj_extarqs[0]
     dep_uuid = self.deployable_uuids[0]
     e = exception.ResourceNotFound(resource='AttachHandle',
                                    msg="Just for Test")
     msg = ("Failed to allocate attach handle for ARQ %s"
            "from deployable %s. Reason: %s")
     mock_allocate.side_effect = e
     fake_dep = fake_deployable.fake_deployable_obj(self.context,
                                                    uuid=dep_uuid)
     self.assertRaises(exception.ResourceNotFound,
                       obj_extarq._allocate_attach_handle, self.context,
                       fake_dep)
     mock_log.assert_called_once_with(msg, obj_extarq.arq.uuid,
                                      fake_dep.uuid, str(e))
Ejemplo n.º 10
0
 def test_program(self, mock_get_dep):
     self.headers['X-Roles'] = 'admin'
     self.headers['Content-Type'] = 'application/json'
     dep_uuid = self.deployable_uuids[0]
     fake_dep = fake_deployable.fake_deployable_obj(self.context,
                                                    uuid=dep_uuid)
     mock_get_dep.return_value = fake_dep
     body = [{"image_uuid": "9a17439a-85d0-4c53-a3d3-0f68a2eac896"}]
     response = self.\
         patch_json('/accelerators/deployables/%s/program' % dep_uuid,
                    [{'path': '/program', 'value': body,
                     'op': 'replace'}],
                    headers=self.headers)
     self.assertEqual(http_client.OK, response.status_code)
     data = response.json_body
     self.assertEqual(dep_uuid, data['uuid'])
Ejemplo n.º 11
0
    def test_do_programming(self, mock_cpid_list, mock_check_state, mock_conn,
                            mock_program):
        dep_uuid = self.deployable_uuids[0]
        fake_dep = fake_deployable.fake_deployable_obj(
            self.context, uuid=dep_uuid)

        # function_id is require
        obj_extarq = self.class_fgpa_objects["function_program"]
        obj_extarq.arq.hostname = 'newtestnode1'
        fake_dep.driver_name = "intel_fpga"

        mock_cpid_list.return_value = [self.cpid]
        bs_id = obj_extarq._get_bitstream_id()
        obj_extarq._do_programming(self.context, fake_dep, bs_id)
        mock_program.assert_called_once_with(
            self.context, 'newtestnode1', self.cpid, bs_id, "intel_fpga")
Ejemplo n.º 12
0
 def setUp(self):
     super(TestFPGAProgramController, self).setUp()
     self.headers = self.gen_headers(self.context)
     self.deployable_uuids = ['0acbf8d6-e02a-4394-aae3-57557d209498']
     self.existent_image_uuid = "9a17439a-85d0-4c53-a3d3-0f68a2eac896"
     self.nonexistent_image_uuid = "1234abcd-1234-1234-1234-abcde1234567"
     self.invalid_image_uuid = "abcd1234"
     dep_uuid = self.deployable_uuids[0]
     self.dep = fake_deployable.fake_deployable_obj(self.context,
                                                    uuid=dep_uuid)
     self.dev = fake_device.get_fake_devices_objs()[0]
     bdf = {"domain": "0000", "bus": "00", "device": "01", "function": "1"}
     self.cpid = {
         "id": 0,
         "uuid": "e4a66b0d-b377-40d6-9cdc-6bf7e720e596",
         "device_id": "1",
         "cpid_type": "PCI",
         "cpid_info": jsonutils.dumps(bdf).encode('utf-8')
     }
Ejemplo n.º 13
0
    def _test_save_objectfield_fk_constraint_fails(self, foreign_key,
                                                   expected_exception):

        error = db_exc.DBReferenceError('table', 'constraint', foreign_key,
                                        'key_table')
        # Prevent lazy-loading any fields, results in InstanceNotFound
        deployable = fake_deployable.fake_deployable_obj(self.context)
        fields_with_save_methods = [field for field in deployable.fields
                                    if hasattr(deployable, '_save_%s' % field)]
        for field in fields_with_save_methods:
            @mock.patch.object(deployable, '_save_%s' % field)
            @mock.patch.object(deployable, 'obj_attr_is_set')
            def _test(mock_is_set, mock_save_field):
                mock_is_set.return_value = True
                mock_save_field.side_effect = error
                deployable.obj_reset_changes(fields=[field])
                deployable._changed_fields.add(field)
                self.assertRaises(expected_exception, deployable.save)
                deployable.obj_reset_changes(fields=[field])
            _test()
Ejemplo n.º 14
0
    def test_start_bind_job(self, mock_state, mock_get_dep, mock_job):
        obj_extarq = self.class_objects["bitstream_program"]
        obj_extarq.arq.state = constants.ARQ_UNBOUND
        instance_uuid = obj_extarq.arq.instance_uuid
        uuid = obj_extarq.arq.uuid
        dep_uuid = self.deployable_uuids[0]
        fake_dep = fake_deployable.fake_deployable_obj(self.context,
                                                       uuid=dep_uuid)
        mock_get_dep.return_value = fake_dep

        valid_fields = {
            uuid: {
                'hostname': obj_extarq.arq.hostname,
                'device_rp_uuid': obj_extarq.arq.device_rp_uuid,
                'instance_uuid': instance_uuid
            }
        }
        obj_extarq.start_bind_job(self.context, valid_fields)
        mock_state.assert_called_once_with(self.context,
                                           constants.ARQ_BIND_STARTED)
        mock_job.assert_called_once_with(self.context, fake_dep)
Ejemplo n.º 15
0
 def test_patch(self, mock_get_dep, mock_deployable_update):
     self.headers['X-Roles'] = 'admin'
     self.headers['Content-Type'] = 'application/json'
     dep_uuid = self.deployable_uuids[0]
     fake_dep = fake_deployable.fake_deployable_obj(self.context,
                                                    uuid=dep_uuid)
     mock_get_dep.return_value = fake_dep
     instance_uuid = '10efe63d-dfea-4a37-ad94-4116fba50981'
     fake_dep.instance_uuid = instance_uuid
     mock_deployable_update.return_value = fake_dep
     response = self.patch_json('/accelerators/deployables/%s' % dep_uuid,
                                [{
                                    'path': '/instance_uuid',
                                    'value': instance_uuid,
                                    'op': 'replace'
                                }],
                                headers=self.headers)
     self.assertEqual(http_client.OK, response.status_code)
     data = response.json_body
     self.assertEqual(instance_uuid, data['instance_uuid'])
     mock_deployable_update.assert_called_once()
Ejemplo n.º 16
0
    def test_get_bitstream_md(self, mock_check_state, mock_conn):
        mock_conn.return_value = type(
            "Connection", (object,),
            {"image": type("image", (object,), {"get": self.images_get})})
        dep_uuid = self.deployable_uuids[0]
        fake_dep = fake_deployable.fake_deployable_obj(
            self.context, uuid=dep_uuid)

        # function_id is require
        obj_extarq = self.class_fgpa_objects["function_program"]
        bs_id = obj_extarq._get_bitstream_id()
        fun_id = obj_extarq._get_function_id()
        md = obj_extarq.get_bitstream_md(
            self.context, fake_dep, fun_id, bs_id)
        self.assertDictEqual(self.images_md["/images"][0], md)

        # bitstream_id is require
        obj_extarq = self.class_fgpa_objects["bitstream_program"]
        bs_id = obj_extarq._get_bitstream_id()
        fun_id = obj_extarq._get_function_id()
        md = obj_extarq.get_bitstream_md(
            self.context, fake_dep, fun_id, bs_id)
        self.assertDictEqual(self.images_md["/images"][0], md)

        # Both bitstream_id and function_id are require
        obj_extarq = self.class_fgpa_objects["bad_program"]
        bs_id = obj_extarq._get_bitstream_id()
        fun_id = obj_extarq._get_function_id()
        self.assertRaises(
            exception.InvalidParameterValue, obj_extarq.get_bitstream_md,
            self.context, fake_dep, fun_id, bs_id)

        # None of bitstream_id or function_id is require
        obj_extarq = self.class_fgpa_objects["no_program"]
        bs_id = obj_extarq._get_bitstream_id()
        fun_id = obj_extarq._get_function_id()
        md = obj_extarq.get_bitstream_md(
            self.context, fake_dep, fun_id, bs_id)
        self.assertIsNone(md)
Ejemplo n.º 17
0
    def test_update_placement(
        self, mock_delete_traits, mock_add_traits, mock_placement_init):
        mock_placement_init.return_value = None
        dep_uuid = self.deployable_uuids[0]
        fake_dep = fake_deployable.fake_deployable_obj(
            self.context, uuid=dep_uuid)

        # function_id is require
        obj_extarq = self.class_fgpa_objects["function_program"]
        obj_extarq.arq.hostname = 'newtestnode1'
        # fake_dep.driver_name = "intel_fpga"
        fun_id = obj_extarq._get_function_id()
        rp_uuid = obj_extarq.arq.device_rp_uuid
        obj_extarq._update_placement(
            self.context, fun_id, fake_dep.driver_name)

        function_id = fun_id.upper().replace('-', '_-')
        vendor = fake_dep.driver_name.upper()
        trait_names = ["_".join((
            constants.FPGA_FUNCTION_ID, vendor, function_id))]
        mock_add_traits.assert_called_once_with(rp_uuid, trait_names)
        mock_delete_traits.assert_called_once_with(
            rp_uuid, [constants.FPGA_FUNCTION_ID])
Ejemplo n.º 18
0
    def test_bind(
        self, mock_bind, mock_check_state, mock_conn, mock_delete_traits,
        mock_add_traits, mock_placement_init, mock_dp_update,
        mock_cpid_list, mock_program):

        mock_placement_init.return_value = None
        mock_conn.return_value = type(
            "Connection", (object,),
            {"image": type("image", (object,), {"get": self.images_get})})

        dep_uuid = self.deployable_uuids[0]
        fake_dep = fake_deployable.fake_deployable_obj(
            self.context, uuid=dep_uuid)

        mock_cpid_list.return_value = [self.cpid]

        # None of bitstream_id or function_id is require
        obj_extarq = self.class_fgpa_objects["no_program"]
        obj_extarq.bind(self.context, fake_dep)
        self.assertFalse(mock_program.called)
        self.assertFalse(mock_placement_init.called)
        self.assertFalse(mock_dp_update.called)
        mock_bind.assert_called_once_with(self.context, fake_dep)

        self.cpid["cpid_info"] = json.dumps(self.bdf).encode('utf-8')
        # function_id is require
        obj_extarq = self.class_fgpa_objects["function_program"]
        obj_extarq.bind(self.context, fake_dep)
        mock_bind.assert_called_with(self.context, fake_dep)
        self.assertEqual(mock_bind.call_count, 2)

        self.cpid["cpid_info"] = json.dumps(self.bdf).encode('utf-8')
        # bitstream_id is require
        obj_extarq = self.class_fgpa_objects["bitstream_program"]
        obj_extarq.bind(self.context, fake_dep)
        mock_bind.assert_called_with(self.context, fake_dep)
        self.assertEqual(mock_bind.call_count, 3)
Ejemplo n.º 19
0
    def test_apply_patch_for_common_extarq(self, mock_get_dep,
                                           mock_check_state, mock_list,
                                           mock_get, mock_attach_handle,
                                           mock_notify_bind, mock_conn,
                                           mock_get_bind_st):

        good_states = constants.ARQ_STATES_TRANSFORM_MATRIX[
            constants.ARQ_BIND_STARTED]
        obj_extarq = self.fake_obj_extarqs[0]
        obj_extarq.arq.state = good_states[0]

        # NOTE(Sundar): Since update_check_state is mocked, ARQ state
        # remains as 'Initial'. So, we mock get_arq_bind_statuses to
        # prevent that from raising exception.
        mock_get_bind_st.return_value = [(obj_extarq.arq.uuid,
                                          constants.ARQ_BIND_STATUS_FINISH)]

        # TODO(Shaohe) we should control the state of arq to make
        # better testcase.
        # bound_extarq = copy.deepcopy(obj_extarq)
        # bound_extarq.arq.state = constants.ARQ_BOUND
        # mock_get.side_effect = [obj_extarq, bound_extarq]
        mock_get.side_effect = [obj_extarq] * 2
        mock_list.return_value = [obj_extarq]
        uuid = obj_extarq.arq.uuid
        instance_uuid = obj_extarq.arq.instance_uuid

        dep_uuid = self.deployable_uuids[0]
        fake_dep = fake_deployable.fake_deployable_obj(self.context,
                                                       uuid=dep_uuid)
        mock_get_dep.return_value = fake_dep
        valid_fields = {
            uuid: {
                'hostname': obj_extarq.arq.hostname,
                'device_rp_uuid': obj_extarq.arq.device_rp_uuid,
                'instance_uuid': instance_uuid
            }
        }
        patch_list = {
            str(uuid): [{
                "path": "/hostname",
                "op": "add",
                "value": obj_extarq.arq.hostname
            }, {
                "path": "/device_rp_uuid",
                "op": "add",
                "value": obj_extarq.arq.device_rp_uuid
            }, {
                "path": "/instance_uuid",
                "op": "add",
                "value": instance_uuid
            }]
        }
        objects.ExtARQ.apply_patch(self.context, patch_list, valid_fields)
        # NOTE(Shaohe) we set the fake_obj_extarqs state is ARQ_INITIAL
        # TODO(Shaohe) we should control the state of arq to make
        # complete status testcase.
        self.assertEqual(obj_extarq.arq.state, 'Initial')
        mock_notify_bind.assert_called_once_with(
            instance_uuid,
            [(obj_extarq.arq.uuid, constants.ARQ_BIND_STATUS_FINISH)])
Ejemplo n.º 20
0
    def test_apply_patch_start_fpga_arq_job(self, mock_spawn, mock_get_dep,
                                            mock_check_state, mock_list,
                                            mock_get, mock_attach_handle,
                                            mock_notify_bind, mock_conn,
                                            mock_get_bind_st):
        good_states = constants.ARQ_STATES_TRANSFORM_MATRIX[
            constants.ARQ_BIND_STARTED]
        obj_extarq = self.fake_obj_extarqs[2]
        obj_fpga_extarq = self.fake_obj_fpga_extarqs[1]
        obj_fpga_extarq.state = self.fake_obj_fpga_extarqs[1]
        obj_extarq.arq.state = good_states[0]
        obj_fpga_extarq.arq.state = good_states[0]

        # TODO(Shaohe) we should control the state of arq to make
        # better testcase.
        # bound_extarq = copy.deepcopy(obj_extarq)
        # bound_extarq.arq.state = constants.ARQ_BOUND
        # mock_get.side_effect = [obj_extarq, bound_extarq]
        mock_get.side_effect = [obj_extarq, obj_fpga_extarq]
        mock_list.return_value = [obj_extarq]
        uuid = obj_extarq.arq.uuid
        instance_uuid = obj_extarq.arq.instance_uuid
        # mock_job_get_ext_arq.side_effect = obj_extarq
        dep_uuid = self.deployable_uuids[0]
        fake_dep = fake_deployable.fake_deployable_obj(self.context,
                                                       uuid=dep_uuid)
        mock_get_bind_st.return_value = [(obj_extarq.arq.uuid,
                                          constants.ARQ_BIND_STATUS_FINISH)]
        mock_get_dep.return_value = fake_dep
        mock_spawn.return_value = None
        valid_fields = {
            uuid: {
                'hostname': obj_extarq.arq.hostname,
                'device_rp_uuid': obj_extarq.arq.device_rp_uuid,
                'instance_uuid': instance_uuid
            }
        }
        patch_list = {
            str(uuid): [{
                "path": "/hostname",
                "op": "add",
                "value": obj_extarq.arq.hostname
            }, {
                "path": "/device_rp_uuid",
                "op": "add",
                "value": obj_extarq.arq.device_rp_uuid
            }, {
                "path": "/instance_uuid",
                "op": "add",
                "value": instance_uuid
            }]
        }
        objects.ExtARQ.apply_patch(self.context, patch_list, valid_fields)
        # NOTE(Shaohe) we set the fake_obj_extarqs state is ARQ_INITIAL
        # TODO(Shaohe) we should control the state of arq to make
        # better testcase.
        self.assertEqual(obj_extarq.arq.state, 'Initial')
        mock_notify_bind.assert_called_once_with(
            instance_uuid,
            [(obj_extarq.arq.uuid, constants.ARQ_BIND_STATUS_FINISH)])
        # NOTE(Shaohe) check it spawn to start a job.
        mock_spawn.assert_called_once_with(obj_fpga_extarq.bind, self.context,
                                           fake_dep)
Ejemplo n.º 21
0
 def setUp(self):
     super(TestDeployablesController, self).setUp()
     self.headers = self.gen_headers(self.context)
     self.fake_deployable = fake_deployable.fake_deployable_obj(
         self.context)