'Get lungroup ids by lun id.'

def get_lungroupids_by_lunid(self, lun_id, lun_type=constants.LUN_TYPE):

    url = ('/lungroup/associate?TYPE=256&ASSOCIATEOBJTYPE=%s&ASSOCIATEOBJID=%s' % (lun_type, lun_id))
    result = self.call(url, None, 'GET')
    self._assert_rest_result(result, _('Get    lungroup    id    by    lun    id    error.'))
    lungroup_ids = []
    if ('data' in result):
        for item in result['data']:
            lungroup_ids.append(item['ID'])
    return lungroup_ids
