From be1691d5b7f889b4ccdd79b8eabd6f9f247be7ae Mon Sep 17 00:00:00 2001 From: Kazuhiko Shiozaki <kazuhiko@nexedi.com> Date: Fri, 12 Jul 2013 13:18:29 +0900 Subject: [PATCH] rename backend url parameter name : tidstorage-url -> backend-url still keepking backward compatibility. --- slapos/recipe/README.generic_varnish.txt | 5 ++--- slapos/recipe/generic_varnish/__init__.py | 5 ++++- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/slapos/recipe/README.generic_varnish.txt b/slapos/recipe/README.generic_varnish.txt index a0272b1d..91787d23 100644 --- a/slapos/recipe/README.generic_varnish.txt +++ b/slapos/recipe/README.generic_varnish.txt @@ -12,15 +12,14 @@ On slap console, you can instanciate varnish like this: instance = request( software_type='varnish', partition_parameter_kw={ - 'tidstorage-url':'http://[your tidstrage address]:your tid strage port', + 'backend-url':'https://[your_backend_address]:your_backend_port', 'web-checker-frontend-url':'http://www.example.com', 'web-checker-mail-address':'web-checker-result@example.com', 'web-checker-smtp-host':'mail.example.com', } ) -tidstrage-url is the backend url that varnish will cache. It is expected that -the backend is created by tidstorage recipe. +backend-url is the backend url that varnish will cache. web-checker-frontend-url is the entry-point-url that web checker will check the HTTP headers of all the pages in the web site. diff --git a/slapos/recipe/generic_varnish/__init__.py b/slapos/recipe/generic_varnish/__init__.py index 1ede08aa..de96e119 100644 --- a/slapos/recipe/generic_varnish/__init__.py +++ b/slapos/recipe/generic_varnish/__init__.py @@ -37,7 +37,10 @@ class Recipe(GenericSlapRecipe): """ def _install(self): ip = self.options['ip'] - backend_url = self.parameter_dict['tidstorage-url'] + backend_url = self.parameter_dict.get( + 'backend-url', + self.parameter_dict.get('tidstorage-url') # BBB + ) backend_server, backend_port = self._getBackendServer(backend_url) path_list = [] if backend_url.startswith('https://'): -- 2.30.9