def _run(self, application, socket): """Start a WSGI server in a new green thread.""" logger = logging.getLogger('eventlet.wsgi') eventlet.wsgi.server(socket, application, custom_pool=self.tg.pool, log=logging.WritableLogger(logger))
# 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 collections import functools as func import types import eventlet import jsonschema from murano.openstack.common.gettextutils import _ # noqa from murano.openstack.common import log as logging LOG = logging.getLogger(__name__) class TraverseHelper(object): value_type = (types.StringTypes, types.IntType, types.FloatType, types.BooleanType) @staticmethod def get(path, source): """ Provides the ability to traverse a data source made up of any combination of lists and dicts. Has simple rules for selecting item of the list: * each item should have id property * to select item from the list, specify id value
# 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. """Session management functions.""" import threading from oslo.db import options from oslo.db.sqlalchemy import session as db_session from murano.common import config from murano.openstack.common import log as logging LOG = logging.getLogger(__name__) CONF = config.CONF options.set_defaults(CONF) _FACADE = None _LOCK = threading.Lock() def _create_facade_lazily(): global _LOCK, _FACADE if _FACADE is None: with _LOCK: if _FACADE is None: _FACADE = db_session.EngineFacade.from_config(CONF,