def _handler(self, request, response): LOGGER.info("run generate_dem_processing") input_data = {'process_id': 'generate_dem_processing'} for lit_input in self.inputs: identifier = lit_input.identifier if identifier != 'IaaS_deploy_execute': input_data[identifier] = request.inputs[identifier][0].data from ogcservice.celery_request import format_body_request request_body = format_body_request(docker_image=self.docker_image, input_data=input_data, param_as_envar=True, volume_mapping={}) # TODO check on cloud params cloud_params = { 'IaaS_deploy_execute': json.loads(request.inputs['IaaS_deploy_execute'][0].data), 'IaaS_datastore': request.inputs['IaaS_datastore'][0].data } response = {'request_body': request_body, 'cloud_params': cloud_params} return response
def _handler(self, request, response): LOGGER.info("run docker app") docker_image = request.inputs['docker_image'][0].data input_data = {} for lit_input in self.inputs: identifier = lit_input.identifier # Avoid cloud params (that should not be in expose to the client ideally) if (identifier != 'IaaS_deploy_execute') and (identifier != 'IaaS_datastore'): input_data[identifier] = request.inputs[identifier][0].data from ogcservice.celery_request import format_body_request # TODO check on cloud params cloud_params = { 'IaaS_deploy_execute': json.loads(request.inputs['IaaS_deploy_execute'][0].data), 'IaaS_datastore': request.inputs['IaaS_datastore'][0].data } request_body = format_body_request( docker_image=docker_image, input_data=input_data, param_as_envar=True, queue_name=cloud_params['IaaS_deploy_execute']['QUEUE_NAME'], volume_mapping={}) response = {'request_body': request_body, 'cloud_params': cloud_params} return response
def _handler(self, request, response): LOGGER.info("run CPSWTC") docker_image = request.inputs['docker_image'][0].data input_data = {} for lit_input in self.inputs: identifier = lit_input.identifier # Avoid cloud params (that should not be in expose to the client ideally) if identifier != 'IaaS_deploy_execute': input_data[identifier] = request.inputs[identifier][0].data # Specific to this wps process input_data[ 'Poperation'] = 'Compact-Polarimetric-Synthesis-With-Terrain-Correction' from ogcservice.celery_request import format_body_request # TODO check on cloud params cloud_params = { 'IaaS_deploy_execute': json.loads(request.inputs['IaaS_deploy_execute'][0].data), 'IaaS_datastore': request.inputs['IaaS_datastore'][0].data } request_body = format_body_request( docker_image=docker_image, input_data=input_data, param_as_envar=False, queue_name=cloud_params['IaaS_deploy_execute']['QUEUE_NAME'], volume_mapping={}) response = {'request_body': request_body, 'cloud_params': cloud_params} return response