From patchwork Wed Sep 7 16:21:12 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zygmunt Krynicki X-Patchwork-Id: 3966 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id 5858723EFC for ; Wed, 7 Sep 2011 16:21:16 +0000 (UTC) Received: from mail-fx0-f52.google.com (mail-fx0-f52.google.com [209.85.161.52]) by fiordland.canonical.com (Postfix) with ESMTP id ABCA8A180B7 for ; Wed, 7 Sep 2011 16:21:14 +0000 (UTC) Received: by fxd18 with SMTP id 18so988662fxd.11 for ; Wed, 07 Sep 2011 09:21:14 -0700 (PDT) Received: by 10.223.24.21 with SMTP id t21mr413192fab.24.1315412474460; Wed, 07 Sep 2011 09:21:14 -0700 (PDT) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.152.11.8 with SMTP id m8cs145438lab; Wed, 7 Sep 2011 09:21:14 -0700 (PDT) Received: by 10.227.130.104 with SMTP id r40mr6473856wbs.73.1315412473852; Wed, 07 Sep 2011 09:21:13 -0700 (PDT) Received: from indium.canonical.com (indium.canonical.com [91.189.90.7]) by mx.google.com with ESMTPS id b20si835370wbh.129.2011.09.07.09.21.13 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 07 Sep 2011 09:21:13 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of bounces@canonical.com designates 91.189.90.7 as permitted sender) client-ip=91.189.90.7; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of bounces@canonical.com designates 91.189.90.7 as permitted sender) smtp.mail=bounces@canonical.com Received: from ackee.canonical.com ([91.189.89.26]) by indium.canonical.com with esmtp (Exim 4.71 #1 (Debian)) id 1R1KsD-0004aL-0a for ; Wed, 07 Sep 2011 16:21:13 +0000 Received: from ackee.canonical.com (localhost [127.0.0.1]) by ackee.canonical.com (Postfix) with ESMTP id EF98CE0030 for ; Wed, 7 Sep 2011 16:21:12 +0000 (UTC) MIME-Version: 1.0 X-Launchpad-Project: lava-server X-Launchpad-Branch: ~linaro-validation/lava-server/trunk X-Launchpad-Message-Rationale: Subscriber X-Launchpad-Branch-Revision-Number: 236 X-Launchpad-Notification-Type: branch-revision To: Linaro Patch Tracker From: noreply@launchpad.net Subject: [Branch ~linaro-validation/lava-server/trunk] Rev 236: Fix make instance pathname flexible Message-Id: <20110907162112.28746.98764.launchpad@ackee.canonical.com> Date: Wed, 07 Sep 2011 16:21:12 -0000 Reply-To: noreply@launchpad.net Sender: bounces@canonical.com Errors-To: bounces@canonical.com Precedence: bulk X-Generated-By: Launchpad (canonical.com); Revision="13861"; Instance="initZopeless config overlay" X-Launchpad-Hash: d27e34f89b89dfd0ec5e9dcd44ddfa5f6f9e4124 ------------------------------------------------------------ revno: 236 committer: Zygmunt Krynicki branch nick: trunk timestamp: Wed 2011-09-07 18:19:46 +0200 message: Fix make instance pathname flexible modified: lava_server/manage.py --- lp:lava-server https://code.launchpad.net/~linaro-validation/lava-server/trunk You are subscribed to branch lp:lava-server. To unsubscribe from this branch go to https://code.launchpad.net/~linaro-validation/lava-server/trunk/+edit-subscription === modified file 'lava_server/manage.py' --- lava_server/manage.py 2011-09-05 14:53:14 +0000 +++ lava_server/manage.py 2011-09-07 16:19:46 +0000 @@ -77,6 +77,10 @@ action="store", default=None, help="Use the specified instance (works only with --production)") + group.add_argument("-I", "--instance-template", + action="store", + default="/srv/lava/instances/{instance}/etc/lava-server/{{filename}}.conf", + help="Template used for constructing instance pathname. The default value is: %(default)s") parser.add_argument("command", nargs="...", help="Invoke this Django management command") @@ -88,7 +92,8 @@ if self.args.instance: if not os.path.isdir(self.args.instance): self.parser.error("Specified instance does not exsit") - os.environ["DJANGO_DEBIAN_SETTINGS_TEMPLATE"] = self.args.instance + "/etc/{filename}.conf" + os.environ["DJANGO_DEBIAN_SETTINGS_TEMPLATE"] = ( + self.args.instance_template.format(instance=self.args.instance)) settings = __import__(settings_module, fromlist=['']) from django.core.management import execute_manager execute_manager(settings, ['lava-server'] + self.args.command)