

def _build_header(self, raw_msg, raw_headers):
    '\n        Builds the header for this Process-level RPC conversation.\n        https://confluence.oceanobservatories.org/display/syseng/CIAD+COI+OV+Common+Message+Format\n        '
    header = EndpointUnit._build_header(self, raw_msg, raw_headers)
    header.update({
        'sender-name': (self._process.name or 'unnamed-process'),
        'sender': self._process.id,
    })
    if hasattr(self._process, 'process_type'):
        header.update({
            'sender-type': (self._process.process_type or 'unknown-process-type'),
        })
        if ((self._process.process_type == 'service') and hasattr(self.channel, '_send_name')):
            header.update({
                'sender-service': ('%s,%s' % (self.channel._send_name.exchange, self._process.name)),
            })
    context = self.get_context()
    if isinstance(context, dict):
        new_header = self.build_security_headers(context)
        header.update(new_header)
    else:
        container_id = BaseEndpoint._get_container_instance().id
        header['origin-container-id'] = container_id
        if ('conv-id' in raw_headers):
            header['original-conv-id'] = raw_headers['conv-id']
    return header

dataset/ETHPy150Open ooici/pyon/pyon/ion/endpoint.py ProcessEndpointUnitMixin._build_header/original