libnetworkcache - Client for ShaCache and ShaDir HTTP Server
The goal of libnetworkcache python library is to abstract the HTTP calls. It works as wrapper of python httplib to use the Networkcache HTTP Server.
- The Networkcache HTTP Server are sub-divided into two Web services:
It is a simple HTTP Server used to cache files.
It is a simple HTTP Server used to cache information, working like a directory.
Please see slapos/libnetworkcache.py and slapos/libnetworkcachetests.py
- Use ‘openssl’ executable if pyOpenSSL is not available.
- New scripts to download & upload manually from command line.
- Small API changes. slapos.networkcachehelper is deprecated.
- Many bugfixes and code cleanup.
- Performance/reliability improvements, by:
- using pyOpenSSL instead of spawning openssl subprocesses
- reducing the number of created temporary files
- Define timeouts for every connection we initiate. May allow not to hang forever in a hostile environment when connection to networkcache server can stall / be reset.
- Don’t use logger.debug() but logger.info() in helpers so that it doesn’t. silent an error. [Cedric de Saint Martin]
- Fix regression where multiple certificates caused most of them to be ignored. [Cedric de Saint Martin]
- Correctly return False if no entry is found while downloading. [Cedric de Saint Martin]
- Add high-level helper functions to easily download/upload to networkcache. [Cedric de Saint Martin]
- Set timeout in httplib connections. [Cedric de Saint Martin]
- networkcache won’t stupidly loop for 1000 iterations if “certificate” parameter is a string instead of a list. [Cedric de Saint Martin]
- Binary cache support. [Yingjie Xu]
- If given key has multiple signed values pick up the first one. [Łukasz Nowak]
- Create infinite certificates. [Łukasz Nowak]
- Bugfix: Do not trust received content. [Łukasz Nowak]
- Bugfix: Do not try to validate against empty signatures. [Łukasz Nowak]
- Remove M2Crypto dependency and rely on openssl binary presence. [Łukasz Nowak]
- Fix signing and verification. [Łukasz Nowak]
- Simplify key generation and use slapos.cfg file by default. [Łukasz Nowak]
- Internals: Increase test coverage.
- Authentication keys are supported. [Łukasz Nowak]
- Re-implemente signature support. [Łukasz Nowak]
- Follow corrected specification. [Łukasz Nowak]
- internals: Use urllib2. [Łukasz Nowak]
- Implement signature checking of downloaded content [Lucas Carvalho]
- Deal with proxy in correct way [Sebastien Robin]
- Incompatible change: NetworkcacheClient.download returns opened temporary file object, which will be deleted on close. This minimises memory footprint. [Lucas Carvalho]
- Minimise memory footprint during upload. [Łukasz Nowak]
- Use PUT instead of POST during upload. [Lucas Carvalho]
- Initial version.