1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116
|
def create(self, req, body): -> (instances, resv_id) = self.compute_api.create(context, *
def create(self, context, instance_type, * -> self._create_instance( * def _create_instance(self, context, instance_type, * -> self.compute_task_api.schedule_and_build_instances( *
def schedule_and_build_instances(self, context, build_requests, * -> host_lists = self._schedule_instances(context, request_specs[0], * -> accel_uuids = self._create_and_bind_arq_for_instance( * -> self.compute_rpcapi.build_and_run_instance( *
def select_destinations(self, ctxt, request_spec=None, *
def _create_and_bind_arq_for_instance(self, context, instance, host, * -> return self._create_and_bind_arqs( * def _create_and_bind_arqs(self, context, instance_uuid, extra_specs, * -> arqs = cyclient.create_arqs_and_match_resource_providers( * -> cyclient.bind_arqs(bindings=bindings)
def create_arqs_and_match_resource_providers(self, dp_name, rg_rp_map): -> arqs = self._create_arqs(dp_name) def _create_arqs(self, dp_name): -> resp, err_msg = self._call_cyborg(self._client.post, * def bind_arqs(self, bindings): -> resp, err_msg = self._call_cyborg(self._client.patch, *
@authorize_wsgi.authorize_wsgi("cyborg:arq", "create", False) def post(self, req): obj_extarq = objects.ExtARQ(context, **extarq_fields) -> new_extarq = pecan.request.conductor_api.arq_create( *
def arq_create(self, context, obj_extarq, devprof_id): -> obj_extarq.create(context, devprof_id)
def create(self, context, device_profile_id=None): -> db_extarq = self.dbapi.extarq_create(context, values)
def extarq_create(self, context, values):
@authorize_wsgi.authorize_wsgi("cyborg:arq", "update", False) def patch(self, patch_list): -> objects.ExtARQ.apply_patch(context, patch_list, valid_fields)
def apply_patch(cls, context, patch_list, valid_fields): -> job = extarq.start_bind_job(context, valid_fields) def start_bind_job(self, context, valid_fields): -> return self._bind_job(context, dep) def _bind_job(self, context, deployable): -> self.bind(context, deployable)
def bind(self, context, deployable): -> self._allocate_attach_handle(context, deployable) -> self.update_check_state(context, constants.ARQ_BOUND) def _allocate_attach_handle(self, context, deployable): -> ah = AttachHandle.allocate(context, deployable.id)
def allocate(cls, context, deployable_id): -> db_ah = cls.dbapi.attach_handle_allocate(context, deployable_id)
def attach_handle_allocate(self, context, deployable_id): -> ah = self._do_allocate_attach_handle( * def _do_allocate_attach_handle(self, context, deployable_id):
def build_and_run_instance(self, context, instance, image, request_spec, * -> result = self._do_build_and_run_instance(*args, **kwargs)
def _do_build_and_run_instance(self, context, instance, image, * -> self._build_and_run_instance(context, instance, image, *
def _build_and_run_instance(self, context, instance, image, injected_files, * -> with self._build_resources(context, instance, * -> self.driver.spawn(context, instance, image_meta, *
def _build_resources(self, context, instance, requested_networks, * -> arqs = self._get_bound_arq_resources( * def _get_bound_arq_resources(self, context, instance, arq_uuids): -> return arqs
def spawn(self, context, instance, image_meta, injected_files, -> mdevs = self._allocate_mdevs(allocations) -> self._create_guest_with_network( def _allocate_mdevs(self, allocations): -> mdevs_available = self._get_existing_mdevs_not_assigned( * -> chosen_mdev = self._create_new_mediated_device(parent_device) -> return chosen_mdevs def _create_guest_with_network(self, context, xml, instance, network_info, * -> guest = self._create_guest( * def _create_guest( * -> guest = libvirt_guest.Guest.create(xml, self._host)
|