'Check if the masking view has the child storage group.
Get the parent storage group associated with a masking view and check
if the required child storage group is already a member. If not, get
or create the child storage group.
:param serial_number: the array serial number
:param maskingview_name: the masking view name
:param default_sg_name: the default sg name
:param masking_view_dict: the masking view dict
:returns: storage group name, msg'

def _check_existing_storage_group(self, serial_number, maskingview_name, default_sg_name, masking_view_dict):

    msg = None
    child_sg_name = masking_view_dict[utils.SG_NAME]
    sg_from_mv = self.rest.get_element_from_masking_view(serial_number, maskingview_name, storagegroup=True)
    storagegroup = self.rest.get_storage_group(serial_number, sg_from_mv)
    if (not storagegroup):
        msg = ('Cannot    get    storage    group:    %(sg_from_mv)s    from    masking    view    %(masking_view)s.' % {'sg_from_mv': sg_from_mv, 'masking_view': maskingview_name})
        LOG.error(msg)
    else:
        check_child = self.rest.is_child_sg_in_parent_sg(serial_number, child_sg_name, sg_from_mv)
        child_sg = self.rest.get_storage_group(serial_number, child_sg_name)
        if (check_child and (not child_sg)):
            msg = ('Cannot    get    child    storage    group:    %(sg_name)s    but    it    is    listed    as    child    of    %(parent_sg)s' % {'sg_name': child_sg_name, 'parent_sg': sg_from_mv})
            LOG.error(msg)
        elif (check_child and child_sg):
            LOG.info('Retrieved    child    sg    %(sg_name)s    from    %(mv_name)s', {'sg_name': child_sg_name, 'mv_name': maskingview_name})
        else:
            msg = self._get_or_create_storage_group(serial_number, masking_view_dict, child_sg_name, masking_view_dict[utils.EXTRA_SPECS])
        if (not msg):
            msg = self._move_vol_from_default_sg(serial_number, masking_view_dict[utils.DEVICE_ID], masking_view_dict[utils.VOL_NAME], default_sg_name, child_sg_name, masking_view_dict[utils.EXTRA_SPECS])
        if ((not msg) and (not check_child)):
            msg = self._check_add_child_sg_to_parent_sg(serial_number, child_sg_name, sg_from_mv, masking_view_dict[utils.EXTRA_SPECS])
    return (child_sg_name, msg)
