Return-Path: X-Original-To: apmail-deltacloud-dev-archive@www.apache.org Delivered-To: apmail-deltacloud-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 49DFFEA44 for ; Thu, 7 Feb 2013 02:32:53 +0000 (UTC) Received: (qmail 71066 invoked by uid 500); 7 Feb 2013 02:32:52 -0000 Delivered-To: apmail-deltacloud-dev-archive@deltacloud.apache.org Received: (qmail 71046 invoked by uid 500); 7 Feb 2013 02:32:52 -0000 Mailing-List: contact dev-help@deltacloud.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@deltacloud.apache.org Delivered-To: mailing list dev@deltacloud.apache.org Received: (qmail 71024 invoked by uid 99); 7 Feb 2013 02:32:52 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 07 Feb 2013 02:32:52 +0000 X-ASF-Spam-Status: No, hits=-5.0 required=5.0 tests=RCVD_IN_DNSWL_HI,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of lutter@redhat.com designates 209.132.183.28 as permitted sender) Received: from [209.132.183.28] (HELO mx1.redhat.com) (209.132.183.28) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 07 Feb 2013 02:32:44 +0000 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r172WMGW027392 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Wed, 6 Feb 2013 21:32:22 -0500 Received: from avon.watzmann.net (ovpn-112-74.phx2.redhat.com [10.3.112.74]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id r172WLuu030025 for ; Wed, 6 Feb 2013 21:32:21 -0500 From: lutter@redhat.com To: dev@deltacloud.apache.org Subject: Refactor how DB is used in CIMI Date: Wed, 6 Feb 2013 18:32:14 -0800 Message-Id: <1360204336-23517-1-git-send-email-lutter@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.23 X-Virus-Checked: Checked by ClamAV on apache.org The commit message for 2/2 explains most of what this is about. Be warned: you should remove your SQLite DB before using these patches (rm /var/tmp/deltacloud-${USER}-mock/db.sqlite) For now, there is no DB migration (which would mostly consist of rewriting what's in entities.be_kind) I am all for not providing any migration, and just have people recreate their DB, as this affects only the CIMI frontend which AFAIK nobody is using in anger yet. We will eventually need a framework for schema versioning and doing migrations though. There's more to be done: it shouldn't be too hard to greatly simplify the various *Template and similar classes, as they do little more than copy attributes to/from DB entities. A little introspection could go a long way here. David