From da79a2b83f27d18a74075a51d69570c1f33ab379 Mon Sep 17 00:00:00 2001 From: David Lenwell Date: Fri, 4 Oct 2013 01:25:00 -0700 Subject: [PATCH] squash --- refstack/localmodels.py | 53 ----------------------------------------- 1 file changed, 53 deletions(-) delete mode 100755 refstack/localmodels.py diff --git a/refstack/localmodels.py b/refstack/localmodels.py deleted file mode 100755 index d8df7862..00000000 --- a/refstack/localmodels.py +++ /dev/null @@ -1,53 +0,0 @@ -# -# Copyright (c) 2013 Piston Cloud Computing, Inc. -# All Rights Reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. -from sqlalchemy import create_engine -from sqlalchemy.orm import scoped_session, sessionmaker,relationship, backref -from sqlalchemy.ext.declarative import declarative_base -from sqlalchemy import Column, Integer, String, ForeignKey - -engine = create_engine('sqlite:////tmp/refstack.db', convert_unicode=True) -db = scoped_session(sessionmaker(autocommit=False, - autoflush=False, - bind=engine)) - -Base = declarative_base() -Base.query = db.query_property() - - -class Cloud(Base): - __tablename__ = 'cloud' - id = Column(Integer, primary_key=True) - endpoint = Column(String(120), unique=True) - test_user = Column(String(80), unique=False) - test_key = Column(String(80), unique=False) - admin_endpoint = Column(String(120), unique=False) - admin_user = Column(String(80), unique=False) - admin_key = Column(String(80), unique=False) - - def __init__(self, - endpoint, - test_user, - test_key, - admin_endpoint, - admin_user, - admin_key): - self.endpoint = endpoint - self.test_user = test_user - self.test_key = test_key - self.admin_endpoint = admin_endpoint - self.admin_user = admin_user - self.admin_key = admin_key - \ No newline at end of file