'Create volume on SolidFire device.
The account is where CHAP settings are derived from, volume is
created and exported.  Note that the new volume is immediately ready
for use.
One caveat here is that an existing user account must be specified
in the API call to create a new volume.  We use a set algorithm to
determine account info based on passed in cinder volume object.  First
we check to see if the account already exists (and use it), or if it
does not already exist, we\'ll go ahead and create it.'

def create_volume(self, volume):

    slice_count = 1
    attributes = {}
    sf_account = self._get_create_account(volume['project_id'])
    qos = self._retrieve_qos_setting(volume)
    create_time = volume['created_at'].isoformat()
    attributes = {'uuid': volume['id'], 'is_clone': 'False', 'created_at': create_time}
    vname = ('%s%s' % (self.configuration.sf_volume_prefix, volume['id']))
    params = {'name': vname, 'accountID': sf_account['accountID'], 'sliceCount': slice_count, 'totalSize': int((volume['size'] * units.Gi)), 'enable512e': self.configuration.sf_emulate_512, 'attributes': attributes, 'qos': qos}
    migration_status = volume.get('migration_status', None)
    if (migration_status and ('target' in migration_status)):
        (k, v) = migration_status.split(':')
        vname = ('%s%s' % (self.configuration.sf_volume_prefix, v))
        params['name'] = vname
        params['attributes']['migration_uuid'] = volume['id']
        params['attributes']['uuid'] = v
    model_update = self._do_volume_create(sf_account, params)
    try:
        rep_settings = self._retrieve_replication_settings(volume)
        if (self.replication_enabled and rep_settings):
            volume['volumeID'] = int(model_update['provider_id'].split()[0])
            self._replicate_volume(volume, params, sf_account, rep_settings)
    except exception.SolidFireAPIException:
        with excutils.save_and_reraise_exception():
            sf_volid = int(model_update['provider_id'].split()[0])
            self._issue_api_request('DeleteVolume', {'volumeID': sf_volid})
            self._issue_api_request('PurgeDeletedVolume', {'volumeID': sf_volid})
    return model_update
