def setUp(self): super(Database, self).setUp() self.configure() self.addCleanup(objects.IMPL.cleanup) models.Base.metadata.create_all(objects.IMPL.get_engine()) objects.IMPL.get_engine().connect() objects.load()
def setUp(self): super(Database, self).setUp() self.configure() self.upgrade() self.addCleanup(self.engine.dispose) self.engine = session.get_engine() self.engine.connect() objects.load()
def test_objects_reloadable(self): objects.load() assert objects.registry.Application self.addCleanup(objects.load) objects.registry.clear() self.assertRaises(AttributeError, lambda: base.registry.Application)
def prepare_service(argv=None): if argv is None: argv = [] log.register_options(cfg.CONF) config.set_config_defaults() cfg.CONF(argv[1:], project='solum') log.setup(cfg.CONF, 'solum') objects.load()
def setUp(self): super(Database, self).setUp() self.configure() self.addCleanup(self.engine.dispose) self.engine = session.get_engine() models.Base.metadata.create_all(self.engine) self.engine.connect() objects.load()
def test_as_dict(self): objects.load() if self.data is None: s = model.Extension() self.data = {} else: s = model.Extension(**self.data) self.data.pop('uri', None) self.data.pop('type', None) self.assertEqual(self.data, s.as_dict(objects.registry.Extension))
def prepare_service(argv=[]): cfg.set_defaults(log.log_opts, default_log_levels=[ 'amqplib=WARN', 'qpid.messaging=INFO', 'sqlalchemy=WARN', 'keystoneclient=INFO', 'stevedore=INFO', 'eventlet.wsgi.server=WARN' ]) cfg.CONF(argv[1:], project='solum') log.setup('solum') objects.load()
def test_objects_reloadable(self): self.assertIsNotNone(objects.registry.Component) objects.registry.clear() with testtools.ExpectedException(KeyError): objects.registry.Component objects.load() self.assertIsNotNone(objects.registry.Component)
def test_objects_reloadable(self): self.assertIsNotNone(objects.registry.Plan) objects.registry.clear() with testtools.ExpectedException(KeyError): objects.registry.Plan objects.load() self.assertIsNotNone(objects.registry.Plan)
def test_as_dict(self): objects.load() if self.data is None: s = componentmodel.Component() self.data = {} else: s = componentmodel.Component(**self.data) if 'uri' in self.data: del self.data['uri'] if 'type' in self.data: del self.data['type'] self.assertEqual(self.data, s.as_dict(objects.registry.Component))
def prepare_service(argv=[]): cfg.set_defaults(log.log_opts, default_log_levels=['amqplib=WARN', 'qpid.messaging=INFO', 'sqlalchemy=WARN', 'keystoneclient=INFO', 'stevedore=INFO', 'eventlet.wsgi.server=WARN' ]) cfg.CONF(argv[1:], project='solum') log.setup('solum') objects.load()
def test_as_dict(self): objects.load() if self.data is None: s = servicemodel.Service() self.data = {} else: s = servicemodel.Service(**self.data) if 'uri' in self.data: del self.data['uri'] if 'type' in self.data: del self.data['type'] self.assertEqual(self.data, s.as_dict(objects.registry.Service))
def test_as_dict(self): objects.load() if self.data is None: s = operationmodel.Operation() self.data = {} else: s = operationmodel.Operation(**self.data) if 'uri' in self.data: del self.data['uri'] if 'type' in self.data: del self.data['type'] self.assertEqual(self.data, s.as_dict(objects.registry.Operation))
def test_as_dict(self): objects.load() if self.data is None: s = inframodel.InfrastructureStack() self.data = {} else: s = inframodel.InfrastructureStack(**self.data) if 'uri' in self.data: del self.data['uri'] if 'type' in self.data: del self.data['type'] self.assertEqual(self.data, s.as_dict( objects.registry.InfrastructureStack))
def test_as_dict(self): objects.load() if self.data is None: s = assemblymodel.Assembly() self.data = {} else: s = assemblymodel.Assembly(**self.data) if 'uri' in self.data: del self.data['uri'] if 'type' in self.data: del self.data['type'] self.assertEqual(self.data, s.as_dict(objects.registry.Assembly))
def test_object_persist_and_retrieve(self): objects.load() app = objects.registry.Application() assert app app.create(self.ctx) assert app.id is not None app2 = objects.registry.Application.get_by_id(None, app.id) assert app2 assert app.id == app2.id query = utils.get_dummy_session().query(app.__class__).filter_by(id=app.id) assert query.first().id == app.id
def test_as_dict(self): objects.load() if self.data is None: s = inframodel.InfrastructureStack() self.data = {} else: s = inframodel.InfrastructureStack(**self.data) if 'uri' in self.data: del self.data['uri'] if 'type' in self.data: del self.data['type'] self.assertEqual(self.data, s.as_dict(objects.registry.InfrastructureStack))
def test_object_persist_and_retrieve(self): objects.load() app = objects.registry.Application() assert app app.create(self.ctx) assert app.id is not None app2 = objects.registry.Application.get_by_id(None, app.id) assert app2 assert app.id == app2.id query = utils.get_dummy_session().query(app.__class__)\ .filter_by(id=app.id) assert query.first().id == app.id
def init_application(): i18n.enable_lazy() LOG = logging.getLogger('solum.api') logging.register_options(cfg.CONF) cfg.CONF(project='solum') logging.setup(cfg.CONF, 'solum') config.set_config_defaults() objects.load() port = cfg.CONF.api.port host = cfg.CONF.api.host LOG.info(('Starting Solum REST API on %(host)s:%(port)s'), {'host': host, 'port': port}) return api_app.setup_app()
def init_application(): i18n.enable_lazy() LOG = logging.getLogger('solum.api') logging.register_options(cfg.CONF) cfg.CONF(project='solum') logging.setup(cfg.CONF, 'solum') config.set_config_defaults() objects.load() port = cfg.CONF.api.port host = cfg.CONF.api.host LOG.info(('Starting Solum REST API on %(host)s:%(port)s'), { 'host': host, 'port': port }) return api_app.setup_app()
def setUp(self): super(TestAssemblyController, self).setUp() objects.load()
def setUp(self): super(TestImagesController, self).setUp() objects.load()
def setUp(self): super(TestPlanController, self).setUp() objects.load()
def setUp(self): super(TestSensorController, self).setUp() objects.load()
def test_as_dict(self): objects.load() s = model.Sensor(**self.data) self.data.pop('uri', None) self.data.pop('type', None) self.assertEqual(self.data, s.as_dict(objects.registry.Sensor))
def setUp(self): super(TestExtensionController, self).setUp() objects.load()
def setUp(self): super(TestPlans, self).setUp() objects.load()
def prepare_service(argv=[]): cfg.CONF(argv[1:], project='solum') logging.setup('solum') config.set_config_defaults() objects.load()
def setUp(self): super(TestAttributeDefinitions, self).setUp() objects.load()
def setUp(self): super(TestParameterDefinitions, self).setUp() objects.load()
def setUp(self): super(TestPipelineController, self).setUp() objects.load()
def setUp(self): super(TestAssemblies, self).setUp() objects.load()
def setUp(self): super(TestJSONFormat, self).setUp() objects.load()
def setUp(self): super(TestTypeDefinitions, self).setUp() objects.load()
def setUp(self): super(TestSensorsController, self).setUp() objects.load()
def setUp(self): super(TestPlatformEndpoints, self).setUp() objects.load()
def __init__(self): super(Handler, self).__init__() objects.load()
def setUp(self): super(TestServices, self).setUp() objects.load()
def setUp(self): super(TestExtensions, self).setUp() objects.load()
def setUp(self): super(TestInfrastructureStackController, self).setUp() objects.load()
def setUp(self): super(TestServiceController, self).setUp() objects.load()
def setUp(self): super(TestComponentController, self).setUp() objects.load()
def serve(self): objects.load() self._server.start() self._server.wait()