def _provision_resource_locally(self, context, build_plan_item,
            request_spec, kwargs):
        host = build_plan_item['hostname']
        base_options = request_spec['instance_properties']
        image = request_spec['image']
        instance_type = request_spec.get('instance_type')

        # TODO(sandy): I guess someone needs to add block_device_mapping
        # support at some point? Also, OS API has no concept of security
        # groups.
        instance = compute_api.API().create_db_entry_for_new_instance(context,
                instance_type, image, base_options, None, [])

        instance_id = instance['id']
        kwargs['instance_id'] = instance_id

        queue = db.queue_get_for(context, "compute", host)
        params = {"method": "run_instance", "args": kwargs}
        rpc.cast(context, queue, params)
        LOG.debug(_("Provisioning locally via compute node %(host)s")
                % locals())
Create the requested resource in this Zone.
dataset/ETHPy150Open nii-cloud/dodai-compute/nova/scheduler/abstract_scheduler.py/AbstractScheduler._provision_resource_locally