From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by yocto-www.yoctoproject.org (Postfix, from userid 118) id 7D0D7E00BAA; Wed, 20 Jan 2016 05:47:54 -0800 (PST) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on yocto-www.yoctoproject.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 X-Spam-HAM-Report: * -5.0 RCVD_IN_DNSWL_HI RBL: Sender listed at http://www.dnswl.org/, high * trust * [192.55.52.93 listed in list.dnswl.org] * -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by yocto-www.yoctoproject.org (Postfix) with ESMTP id 10DDCE00B9C for ; Wed, 20 Jan 2016 05:47:53 -0800 (PST) Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga102.fm.intel.com with ESMTP; 20 Jan 2016 05:47:52 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.22,321,1449561600"; d="scan'208";a="32950791" Received: from linux.intel.com ([10.23.219.25]) by fmsmga004.fm.intel.com with ESMTP; 20 Jan 2016 05:47:52 -0800 Received: from vmed.fi.intel.com (vmed.fi.intel.com [10.237.72.51]) by linux.intel.com (Postfix) with ESMTP id 17B3D6A4002 for ; Wed, 20 Jan 2016 06:35:47 -0800 (PST) From: Ed Bartosh To: toaster@yoctoproject.org Date: Wed, 20 Jan 2016 13:50:10 +0200 Message-Id: X-Mailer: git-send-email 2.1.4 In-Reply-To: References: In-Reply-To: References: Subject: [review-request][PATCH 2/3] toaster: don't use sshbecontroller X-BeenThere: toaster@yoctoproject.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Web based interface for BitBake List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Jan 2016 13:47:54 -0000 Removed usage of sshbecontroller from bbcontroller, models, tests and database schema. Signed-off-by: Ed Bartosh --- bitbake/lib/toaster/bldcontrol/bbcontroller.py | 6 ------ .../migrations/0002_auto_20160120_1250.py | 19 +++++++++++++++++ bitbake/lib/toaster/bldcontrol/models.py | 2 -- bitbake/lib/toaster/bldcontrol/tests.py | 24 ---------------------- 4 files changed, 19 insertions(+), 32 deletions(-) create mode 100644 bitbake/lib/toaster/bldcontrol/migrations/0002_auto_20160120_1250.py diff --git a/bitbake/lib/toaster/bldcontrol/bbcontroller.py b/bitbake/lib/toaster/bldcontrol/bbcontroller.py index f228d37..f40103c 100644 --- a/bitbake/lib/toaster/bldcontrol/bbcontroller.py +++ b/bitbake/lib/toaster/bldcontrol/bbcontroller.py @@ -76,13 +76,10 @@ def getBuildEnvironmentController(**kwargs): """ from localhostbecontroller import LocalhostBEController - from sshbecontroller import SSHBEController be = BuildEnvironment.objects.filter(Q(**kwargs))[0] if be.betype == BuildEnvironment.TYPE_LOCAL: return LocalhostBEController(be) - elif be.betype == BuildEnvironment.TYPE_SSH: - return SSHBEController(be) else: raise Exception("FIXME: Implement BEC for type %s" % str(be.betype)) @@ -105,9 +102,6 @@ class BuildEnvironmentController(object): on the local machine, with the "build/" directory under the "poky/" source checkout directory. Bash is expected to be available. - * SSH controller will run the Toaster BE on a remote machine, where the current user - can connect without raise Exception("FIXME: implement")word (set up with either ssh-agent or raise Exception("FIXME: implement")phrase-less key authentication) - """ def __init__(self, be): """ Takes a BuildEnvironment object as parameter that points to the settings of the BE. diff --git a/bitbake/lib/toaster/bldcontrol/migrations/0002_auto_20160120_1250.py b/bitbake/lib/toaster/bldcontrol/migrations/0002_auto_20160120_1250.py new file mode 100644 index 0000000..0c2475a --- /dev/null +++ b/bitbake/lib/toaster/bldcontrol/migrations/0002_auto_20160120_1250.py @@ -0,0 +1,19 @@ +# -*- coding: utf-8 -*- +from __future__ import unicode_literals + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('bldcontrol', '0001_initial'), + ] + + operations = [ + migrations.AlterField( + model_name='buildenvironment', + name='betype', + field=models.IntegerField(choices=[(0, b'local')]), + ), + ] diff --git a/bitbake/lib/toaster/bldcontrol/models.py b/bitbake/lib/toaster/bldcontrol/models.py index bb613c6..9244ed1 100644 --- a/bitbake/lib/toaster/bldcontrol/models.py +++ b/bitbake/lib/toaster/bldcontrol/models.py @@ -12,10 +12,8 @@ class BuildEnvironment(models.Model): ) TYPE_LOCAL = 0 - TYPE_SSH = 1 TYPE = ( (TYPE_LOCAL, "local"), - (TYPE_SSH, "ssh"), ) LOCK_FREE = 0 diff --git a/bitbake/lib/toaster/bldcontrol/tests.py b/bitbake/lib/toaster/bldcontrol/tests.py index e808991..f20cc7d 100644 --- a/bitbake/lib/toaster/bldcontrol/tests.py +++ b/bitbake/lib/toaster/bldcontrol/tests.py @@ -9,7 +9,6 @@ from django.test import TestCase from bldcontrol.bbcontroller import BitbakeController, BuildSetupException from bldcontrol.localhostbecontroller import LocalhostBEController -from bldcontrol.sshbecontroller import SSHBEController from bldcontrol.models import BuildEnvironment, BuildRequest from bldcontrol.management.commands.runbuilds import Command @@ -110,29 +109,6 @@ class LocalhostBEControllerTests(TestCase, BEControllerTests): def _getBEController(self, obe): return LocalhostBEController(obe) -class SSHBEControllerTests(TestCase, BEControllerTests): - def __init__(self, *args): - super(SSHBEControllerTests, self).__init__(*args) - - def _getBuildEnvironment(self): - return BuildEnvironment.objects.create( - lock = BuildEnvironment.LOCK_FREE, - betype = BuildEnvironment.TYPE_SSH, - address = test_address, - sourcedir = test_sourcedir, - builddir = test_builddir ) - - def _getBEController(self, obe): - return SSHBEController(obe) - - def test_pathExists(self): - obe = BuildEnvironment.objects.create(betype = BuildEnvironment.TYPE_SSH, address= test_address) - sbc = SSHBEController(obe) - self.assertTrue(sbc._pathexists("/")) - self.assertFalse(sbc._pathexists("/.deadbeef")) - self.assertTrue(sbc._pathexists(sbc._shellcmd("pwd"))) - - class RunBuildsCommandTests(TestCase): def test_bec_select(self): """ -- 2.1.4