'Extend lun.'

@_connection_checker
def edit_lun(self, lun):

    (LOG.debug('LUNName:%(name)s,    LUNCapacity:%(cap)s,    LUNIndex:%(id)s'), {'name': lun['LUNName'], 'cap': lun['LUNCapacity'], 'id': lun['LUNIndex']})
    res_details = self._get_res_details('/cgi-bin/disk/iscsi_lun_setting.cgi?', func='edit_lun', LUNName=lun['LUNName'], LUNCapacity=lun['LUNCapacity'], LUNIndex=lun['LUNIndex'], LUNThinAllocate=lun['LUNThinAllocate'], LUNPath=lun['LUNPath'], LUNStatus=lun['LUNStatus'], sid=self.sid)
    root = ET.fromstring(res_details['data'])
    if (root.find('authPassed').text == '0'):
        raise exception.VolumeBackendAPIException(data=_('Session    id    expired'))
    if (root.find('result').text < '0'):
        raise exception.VolumeBackendAPIException(data=(_('Extend    lun    %s    failed') % lun['LUNIndex']))
