def hash_asynchronously_au(host, auth, auid): '''Returns a request id for a asychrounous hash of the given AU ''' req = HasherServiceImplService_client.hashAsynchronously() req._hasherParams = HasherServiceImplService_client.hasherParams req._hasherParams._auId = auid return _ws_port(host, auth).hashAsynchronously(req)._return._requestId
def hash_au(host, auth, auid): '''Returns the full hash of the given AU ''' req = HasherServiceImplService_client.hash() req.HasherParams = req.new_hasherParams() req.HasherParams.AuId = auid return _ws_port(host, auth).hash(req).Return
def hash_au(host, auth, auid): '''Returns the full hash of the given AU ''' req = HasherServiceImplService_client.hash() req._hasherParams = HasherServiceImplService_client.hasherParams req._hasherParams._auId = auid return _ws_port(host, auth).hash(req)._return
def hash_asynchronously_au(host, auth, auid): '''Returns a request id for a asychrounous hash of the given AU ''' req = HasherServiceImplService_client.hashAsynchronously() req.HasherParams = req.new_hasherParams() req.HasherParams.AuId = auid try: return _ws_port(host, auth).hashAsynchronously(req).Return.RequestId except AttributeError: return None
def hash_au(host, auth, auid, include_weight=False): '''Returns the full hash of the given AU ''' req = HasherServiceImplService_client.hash() req.HasherParams = req.new_hasherParams() req.HasherParams.AuId = auid req.HasherParams.IncludeWeight = include_weight return _ws_port(host, auth).hash(req).Return
def hash_asynchronously_au(host, auth, auid, include_weight=False): '''Returns a request id for a asychrounous hash of the given AU ''' req = HasherServiceImplService_client.hashAsynchronously() req.HasherParams = req.new_hasherParams() req.HasherParams.AuId = auid req.HasherParams.IncludeWeight = include_weight try: return _ws_port(host, auth).hashAsynchronously(req).Return.RequestId except AttributeError: return None
def hash_asynchronously_au_url(host, auth, auid, url): '''Returns a request id for a asychrounous hash of the given url ''' req = HasherServiceImplService_client.hashAsynchronously() req._hasherParams = HasherServiceImplService_client.hasherParams req._hasherParams._auId = auid req._hasherParams._url = url req._hasherParams._hashType = "V3File" req._hasherParams._recordFilteredStream = True return _ws_port(host, auth).hashAsynchronously(req)._return._requestId
def hash_au_url(host, auth, auid, url): '''Returns the filtered file of the given Url and AU ''' req = HasherServiceImplService_client.hash() req._hasherParams = HasherServiceImplService_client.hasherParams req._hasherParams._auId = auid req._hasherParams._url = url req._hasherParams._hashType = "V3File" req._hasherParams._recordFilteredStream = "True" return _ws_port(host, auth, sys.stdout).hash(req)._return
def hash_asynchronously_au_url(host, auth, auid, url): '''Returns a request id for a asychrounous hash of the given url ''' req = HasherServiceImplService_client.hashAsynchronously() req.HasherParams = req.new_hasherParams() req.HasherParams.AuId = auid req.HasherParams.Url = url req.HasherParams.HashType = "V3File" req.HasherParams.RecordFilteredStream = True try: return _ws_port(host, auth).hashAsynchronously(req).Return.RequestId except AttributeError: return None
def hash_asynchronously_au_url(host, auth, auid, url): '''Returns a request id for a asychrounous hash of the given url ''' req = HasherServiceImplService_client.hashAsynchronously() req.HasherParams = req.new_hasherParams() req.HasherParams.AuId = auid req.HasherParams.Url = url req.HasherParams.HashType = "V3File" req.HasherParams.RecordFilteredStream = True try: return _ws_port(host, auth).hashAsynchronously(req).Return.RequestId except AttributeError: return None
def remove_asynchronous_hash_request(host, auth, request_id): '''Removes the hash associated with given request_id ''' req = HasherServiceImplService_client.removeAsynchronousHashRequest() req.RequestId = request_id return _ws_port(host, auth).removeAsynchronousHashRequest(req).Return
def get_asynchronous_hash_result(host, auth, request_id): '''Returns a hash result for the hash associated with given request_id ''' req = HasherServiceImplService_client.getAsynchronousHashResult() req.RequestId = request_id return _ws_port(host, auth).getAsynchronousHashResult(req).Return
def remove_asynchronous_hash_request(host, auth, request_id): '''Removes the hash associated with given request_id ''' req = HasherServiceImplService_client.removeAsynchronousHashRequest() req.RequestId = request_id return _ws_port(host, auth).removeAsynchronousHashRequest(req).Return
def get_asynchronous_hash_result(host, auth, request_id): '''Returns a hash result for the hash associated with given request_id ''' req = HasherServiceImplService_client.getAsynchronousHashResult() req.RequestId = request_id return _ws_port(host, auth).getAsynchronousHashResult(req).Return
def _ws_port(host, auth, tracefile=None): url = 'http://%s/ws/HasherService' % (host,) locator = HasherServiceImplService_client.HasherServiceImplServiceLocator() if tracefile is None: return locator.getHasherServiceImplPort(url=url, auth=auth) else: return locator.getHasherServiceImplPort(url=url, auth=auth, tracefile=tracefile)