Commit 017a02ef authored by Lucas Carvalho's avatar Lucas Carvalho

Added a new parameter in Software init method.

The new parameter is:
  - upload_authentication_file: the content must be the path of
    SSL key which must be used to make the user authentication in the
    Networkcache HTTP server.

It must be propagated to buildout command line, of course.
parent 81312bb9
......@@ -49,7 +49,7 @@ class Software(object):
"""This class is responsible of installing a software release"""
def __init__(self, url, software_root, console, buildout,
signature_private_key_file=None, upload_cache_url=None,
upload_dir_url=None):
upload_dir_url=None, upload_authentication_file=None):
"""Initialisation of class parameters
"""
self.url = url
......@@ -62,6 +62,7 @@ class Software(object):
self.signature_private_key_file = signature_private_key_file
self.upload_cache_url = upload_cache_url
self.upload_dir_url = upload_dir_url
self.upload_authentication_file = upload_authentication_file
def install(self):
""" Fetches buildout configuration from the server, run buildout with
......@@ -86,15 +87,14 @@ class Software(object):
'buildout:directory=%s' % self.software_path,]
if self.signature_private_key_file or \
self.upload_cache_url or \
self.upload_dir_url is not None:
self.upload_cache_url or self.upload_dir_url or \
self.upload_authentication_file is not None:
buildout_parameter_list.append('buildout:networkcache-section=networkcache')
if self.signature_private_key_file is not None:
buildout_parameter_list.append( \
'networkcache:signature-private-key-file=%s' % \
self.signature_private_key_file)
if self.upload_cache_url is not None:
buildout_parameter_list.append( \
'networkcache:upload-cache-url=%s' % \
......@@ -103,6 +103,10 @@ class Software(object):
buildout_parameter_list.append( \
'networkcache:upload-dir-url=%s' % \
self.upload_dir_url)
if self.upload_authentication_file is not None:
buildout_parameter_list.append( \
'networkcache:upload-authentication-file=%s' % \
self.upload_authentication_file)
buildout_parameter_list.extend(['-c', self.url])
bootstrapBuildout(self.software_path, self.buildout,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment