'Execute CGI to create snapshot from source lun NAA.'

@_connection_checker
def create_snapshot_api(self, lun_id, snapshot_name):

    res_details = self._get_res_details('/cgi-bin/disk/snapshot.cgi?', func='create_snapshot', lunID=lun_id, snapshot_name=snapshot_name, expire_min='0', vital='1', snapshot_type='0', 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=_('create    snapshot    failed'))
