'Maps the Dell backend volume object to the Dell server object.
The check for the Dell server object existence is elsewhere;  does not
create the Dell server object.
:param scvolume: Storage Center volume object.
:param scserver: Storage Center server object.
:returns: SC mapping profile or None'

def map_volume(self, scvolume, scserver):

    serverid = self._get_id(scserver)
    volumeid = self._get_id(scvolume)
    if ((serverid is not None) and (volumeid is not None)):
        mprofiles = self._find_mapping_profiles(scvolume)
        for mprofile in mprofiles:
            if (self._get_id(mprofile.get('server')) == serverid):
                LOG.info('Volume    %(vol)s    already    mapped    to    %(srv)s', {'vol': scvolume['name'], 'srv': scserver['name']})
                return mprofile
        payload = {}
        payload['server'] = serverid
        payload['Advanced'] = {'MapToDownServerHbas': True}
        r = self.client.post(('StorageCenter/ScVolume/%s/MapToServer' % volumeid), payload, True)
        if self._check_result(r):
            LOG.info('Volume    %(vol)s    mapped    to    %(srv)s', {'vol': scvolume['name'], 'srv': scserver['name']})
            return self._first_result(r)
    LOG.error('Unable    to    map    %(vol)s    to    %(srv)s', {'vol': scvolume['name'], 'srv': scserver['name']})
    return None
