'Update the storagegroupinstance with qos details.
If maxIOPS or maxMBPS is in extra_specs, then DistributionType can be
modified in addition to maxIOPS or/and maxMBPS
If maxIOPS or maxMBPS is NOT in extra_specs, we check to see if
either is set in StorageGroup. If so, then DistributionType can be
modified
:param array: the array serial number
:param storage_group_name: the storagegroup instance name
:param extra_specs: extra specifications
:returns: bool, True if updated, else False'

def update_storagegroup_qos(self, array, storage_group_name, extra_specs):

    return_value = False
    sg_details = self.get_storage_group(array, storage_group_name)
    sg_qos_details = None
    sg_maxiops = None
    sg_maxmbps = None
    sg_distribution_type = None
    property_dict = {}
    try:
        sg_qos_details = sg_details['hostIOLimit']
        sg_maxiops = sg_qos_details['host_io_limit_io_sec']
        sg_maxmbps = sg_qos_details['host_io_limit_mb_sec']
        sg_distribution_type = sg_qos_details['dynamicDistribution']
    except KeyError:
        LOG.debug('Unable    to    get    storage    group    QoS    details.')
    if ('total_iops_sec' in extra_specs.get('qos')):
        property_dict = self.validate_qos_input('total_iops_sec', sg_maxiops, extra_specs.get('qos'), property_dict)
    if ('total_bytes_sec' in extra_specs.get('qos')):
        property_dict = self.validate_qos_input('total_bytes_sec', sg_maxmbps, extra_specs.get('qos'), property_dict)
    if (('DistributionType' in extra_specs.get('qos')) and property_dict):
        property_dict = self.validate_qos_distribution_type(sg_distribution_type, extra_specs.get('qos'), property_dict)
    if property_dict:
        payload = {'editStorageGroupActionParam': {'setHostIOLimitsParam': property_dict}}
        (status_code, message) = self.modify_storage_group(array, storage_group_name, payload)
        try:
            self.check_status_code_success('Add    qos    specs', status_code, message)
            return_value = True
        except Exception as e:
            LOG.error('Error    setting    qos.    Exception    received    was:    %(e)s', {'e': e})
            return_value = False
    return return_value
