Esempio n. 1
0
def main():
    config = migration.get_alembic_config()
    # attach the Murano conf to the Alembic conf
    config.murano_config = CONF

    CONF(project='murano')
    log.setup('murano')
    CONF.command.func(config)
Esempio n. 2
0
def main():
    config = migration.get_alembic_config()
    # attach the Murano conf to the Alembic conf
    config.murano_config = CONF

    CONF(project='murano')
    log.setup('murano')
    CONF.command.func(config)
Esempio n. 3
0
def main():
    try:
        config.parse_args()
        log.setup('murano')

        launcher = service.ServiceLauncher()
        launcher.launch_service(engine.get_rpc_service())

        launcher.wait()
    except RuntimeError, e:
        sys.stderr.write("ERROR: %s\n" % e)
        sys.exit(1)
Esempio n. 4
0
def main():
    try:
        config.parse_args()
        log.setup('murano')

        launcher = service.ServiceLauncher()
        launcher.launch_service(engine.get_rpc_service())

        launcher.wait()
    except RuntimeError as e:
        sys.stderr.write("ERROR: %s\n" % e)
        sys.exit(1)
Esempio n. 5
0
def main():
    CONF.register_cli_opt(command_opt)

    try:
        default_config_files = cfg.find_config_files('murano', 'murano')
        CONF(sys.argv[1:], project='murano', prog='murano-manage',
             version=version.version_string,
             default_config_files=default_config_files)
        logging.setup("murano")
    except RuntimeError as e:
        LOG.error(_LE("failed to initialize murano-manage: %s") % e)
        sys.exit("ERROR: %s" % e)

    try:
        CONF.command.func()
    except Exception as e:
        tb = traceback.format_exc()
        err_msg = _LE("murano-manage command failed: {0}\n{1}").format(e, tb)
        LOG.error(err_msg)
        sys.exit(err_msg)
Esempio n. 6
0
def main():
    try:
        config.parse_args()
        log.setup('murano')
        request_statistics.init_stats()
        policy.init()

        launcher = service.ServiceLauncher()

        app = config.load_paste_app('murano')
        port, host = (config.CONF.bind_port, config.CONF.bind_host)

        launcher.launch_service(wsgi.Service(app, port, host))
        launcher.launch_service(server.get_rpc_service())
        launcher.launch_service(server.get_notification_service())
        launcher.launch_service(stats.StatsCollectingService())

        launcher.wait()
    except RuntimeError, e:
        sys.stderr.write("ERROR: %s\n" % e)
        sys.exit(1)
Esempio n. 7
0
def main():
    try:
        config.parse_args()
        log.setup('murano')
        request_statistics.init_stats()
        policy.init()

        launcher = service.ServiceLauncher()

        app = config.load_paste_app('murano')
        port, host = (config.CONF.bind_port, config.CONF.bind_host)

        launcher.launch_service(wsgi.Service(app, port, host))
        launcher.launch_service(server.get_rpc_service())
        launcher.launch_service(server.get_notification_service())
        launcher.launch_service(stats.StatsCollectingService())

        launcher.wait()
    except RuntimeError as e:
        sys.stderr.write("ERROR: %s\n" % e)
        sys.exit(1)
Esempio n. 8
0
def main():
    CONF.register_cli_opt(command_opt)

    try:
        default_config_files = cfg.find_config_files('murano', 'murano')
        CONF(sys.argv[1:],
             project='murano',
             prog='murano-manage',
             version=murano.__version__,
             default_config_files=default_config_files)
        logging.setup("murano")
    except RuntimeError as e:
        LOG.error("failed to initialize murano-manage: %s" % e)
        sys.exit("ERROR: %s" % e)

    try:
        CONF.command.func()
    except Exception as e:
        tb = traceback.format_exc()
        err_msg = "murano-manage command failed: {0}\n{1}".format(e, tb)
        LOG.error(err_msg)
        sys.exit(err_msg)
Esempio n. 9
0
File: base.py Progetto: aawm/murano
# 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.

import fixtures
from oslo_config import cfg
import testtools

from murano.db import api as db_api
from murano.openstack.common import log

CONF = cfg.CONF
log.setup('murano')


class MuranoTestCase(testtools.TestCase):

    def setUp(self):
        super(MuranoTestCase, self).setUp()
        self.useFixture(fixtures.FakeLogger('murano'))

    def override_config(self, name, override, group=None):
        CONF.set_override(name, override, group)
        self.addCleanup(CONF.clear_override, name, group)


class MuranoWithDBTestCase(MuranoTestCase):
Esempio n. 10
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.

import fixtures
from oslo.config import cfg
import testtools

from murano.db import api as db_api
from murano.openstack.common import log

CONF = cfg.CONF
log.setup('murano')


class MuranoTestCase(testtools.TestCase):
    def setUp(self):
        super(MuranoTestCase, self).setUp()
        self.useFixture(fixtures.FakeLogger('murano'))

    def override_config(self, name, override, group=None):
        CONF.set_override(name, override, group)
        self.addCleanup(CONF.clear_override, name, group)


class MuranoWithDBTestCase(MuranoTestCase):
    def setUp(self):
        super(MuranoWithDBTestCase, self).setUp()