'Get or create a storage group for a masking view.
:param serial_number: the array serial number
:param masking_view_dict: the masking view dict
:param storagegroup_name: the storage group name
:param extra_specs: the extra specifications
:param parent: flag to indicate if this a parent storage group
:returns: msg -- string or None'

def _get_or_create_storage_group(self, serial_number, masking_view_dict, storagegroup_name, extra_specs, parent=False):

    msg = None
    srp = extra_specs[utils.SRP]
    workload = extra_specs[utils.WORKLOAD]
    if parent:
        slo = None
    else:
        slo = extra_specs[utils.SLO]
    do_disable_compression = masking_view_dict[utils.DISABLECOMPRESSION]
    storagegroup = self.rest.get_storage_group(serial_number, storagegroup_name)
    if (storagegroup is None):
        storagegroup = self.provision.create_storage_group(serial_number, storagegroup_name, srp, slo, workload, extra_specs, do_disable_compression)
    if (storagegroup is None):
        msg = ('Cannot    get    or    create    a    storage    group:    %(storagegroup_name)s    for    volume    %(volume_name)s.' % {'storagegroup_name': storagegroup_name, 'volume_name': masking_view_dict[utils.VOL_NAME]})
        LOG.error(msg)
    if ('qos' in extra_specs):
        self.rest.update_storagegroup_qos(serial_number, storagegroup_name, extra_specs)
    return msg
