예제 #1
0
#     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.
""" A leaner set of broker suite definitions.

    Now imports the full suite directly from orderedsuite. Synchronization
    to the main suite is no longer required.
"""

import utils

utils.load_classpath()
import nose

from test_start import TestBrokerStart
from test_stop import TestBrokerStop
from test_ping import TestPing
from test_add_building import TestAddBuilding
from test_add_network import TestAddNetwork
from test_del_network import TestDelNetwork
from test_del_building import TestDelBuilding

from test_add_dns_domain import TestAddDnsDomain
from test_del_dns_domain import TestDelDnsDomain
from test_add_dns_records import TestAddDnsRecords
from test_del_dns_records import TestDelDnsRecords
from test_map_dns_domain import TestMapDnsDomain
예제 #2
0
#
#     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.
""" tests create and delete of a machine through the session """
import logging

log = logging.getLogger("nose.aqdb.test_machine")

from utils import load_classpath, add, commit

load_classpath()

from sqlalchemy import and_
from sqlalchemy.orm import join

import aquilon.aqdb.depends
from aquilon.aqdb.db_factory import DbFactory
from aquilon.aqdb.model import Vendor, Model, Machine, Cpu, Rack

db = DbFactory()
sess = db.Session()
NAME = "test_machine"
MODEL = "bl45p"


def cleanup():
예제 #3
0
#
# 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.
""" tests create and delete of a machine through the session """
from utils import load_classpath, commit, create, func_name

load_classpath()

from aquilon.aqdb.db_factory import DbFactory
from aquilon.aqdb.model import (Archetype, Building, Cluster, Personality,
                                Service, ServiceInstance, EsxCluster, Domain,
                                ClusterAlignedService, ClusterServiceBinding)

from sqlalchemy import and_
from sqlalchemy.orm import join
from sqlalchemy.exc import InvalidRequestError

from nose.tools import raises

db = DbFactory()
sess = db.Session()
예제 #4
0
파일: build_db.py 프로젝트: piojo/aquilon
# 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.
""" The way to populate an aqdb instance """
import sys
import logging
import optparse
import getpass
import os
import subprocess

logging.basicConfig(levl=logging.ERROR)
log = logging.getLogger('aqdb.populate')

import utils
utils.load_classpath()

import argparse

from sqlalchemy.orm import configure_mappers

from aquilon.config import Config
config = Config()

from aquilon.aqdb.model import *
from aquilon.aqdb.db_factory import DbFactory
from aquilon.aqdb.utils import constraints as cnst
from loader import load_from_file


BINDIR = os.path.dirname(os.path.realpath(__file__))