Use oslo.utils
Files from oslo.utils will go away once Murano migrates to oslo.serialization. Change-Id: Ib3711164562bea4ac30a96384733d77753ffa69c
This commit is contained in:
parent
aa2c8f0a12
commit
bf05953c28
@ -17,6 +17,7 @@ import uuid
|
|||||||
from oslo import messaging
|
from oslo import messaging
|
||||||
from oslo.messaging.notify import dispatcher as oslo_dispatcher
|
from oslo.messaging.notify import dispatcher as oslo_dispatcher
|
||||||
from oslo.messaging import target
|
from oslo.messaging import target
|
||||||
|
from oslo.utils import timeutils
|
||||||
|
|
||||||
from sqlalchemy import desc
|
from sqlalchemy import desc
|
||||||
|
|
||||||
@ -28,7 +29,6 @@ from murano.db.services import instances
|
|||||||
from murano.db import session
|
from murano.db import session
|
||||||
from murano.openstack.common.gettextutils import _
|
from murano.openstack.common.gettextutils import _
|
||||||
from murano.openstack.common import log as logging
|
from murano.openstack.common import log as logging
|
||||||
from murano.openstack.common import timeutils
|
|
||||||
from murano.services import states
|
from murano.services import states
|
||||||
|
|
||||||
|
|
||||||
|
@ -24,13 +24,13 @@ revision = '001'
|
|||||||
down_revision = None
|
down_revision = None
|
||||||
|
|
||||||
from alembic import op
|
from alembic import op
|
||||||
|
from oslo.utils import timeutils
|
||||||
import sqlalchemy as sa
|
import sqlalchemy as sa
|
||||||
from sqlalchemy.sql.expression import table as sa_table
|
from sqlalchemy.sql.expression import table as sa_table
|
||||||
import uuid
|
import uuid
|
||||||
|
|
||||||
from murano.common import consts
|
from murano.common import consts
|
||||||
from murano.db.sqla import types as st
|
from murano.db.sqla import types as st
|
||||||
from murano.openstack.common import timeutils
|
|
||||||
|
|
||||||
|
|
||||||
MYSQL_ENGINE = 'InnoDB'
|
MYSQL_ENGINE = 'InnoDB'
|
||||||
|
@ -16,13 +16,13 @@
|
|||||||
SQLAlchemy models for murano data
|
SQLAlchemy models for murano data
|
||||||
"""
|
"""
|
||||||
from oslo.db.sqlalchemy import models
|
from oslo.db.sqlalchemy import models
|
||||||
|
from oslo.utils import timeutils
|
||||||
import sqlalchemy as sa
|
import sqlalchemy as sa
|
||||||
from sqlalchemy.ext import declarative
|
from sqlalchemy.ext import declarative
|
||||||
from sqlalchemy import orm as sa_orm
|
from sqlalchemy import orm as sa_orm
|
||||||
|
|
||||||
from murano.common import uuidutils
|
from murano.common import uuidutils
|
||||||
from murano.db.sqla import types as st
|
from murano.db.sqla import types as st
|
||||||
from murano.openstack.common import timeutils
|
|
||||||
|
|
||||||
|
|
||||||
class TimestampMixin(object):
|
class TimestampMixin(object):
|
||||||
|
@ -12,11 +12,12 @@
|
|||||||
# License for the specific language governing permissions and limitations
|
# License for the specific language governing permissions and limitations
|
||||||
# under the License.
|
# under the License.
|
||||||
import types
|
import types
|
||||||
|
|
||||||
|
from oslo.utils import timeutils
|
||||||
from webob import exc
|
from webob import exc
|
||||||
|
|
||||||
from murano.common import utils
|
from murano.common import utils
|
||||||
from murano.db.services import environments as envs
|
from murano.db.services import environments as envs
|
||||||
from murano.openstack.common import timeutils
|
|
||||||
|
|
||||||
|
|
||||||
class CoreServices(object):
|
class CoreServices(object):
|
||||||
|
@ -13,12 +13,12 @@
|
|||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
from oslo.db import exception
|
from oslo.db import exception
|
||||||
|
from oslo.utils import timeutils
|
||||||
import sqlalchemy
|
import sqlalchemy
|
||||||
from sqlalchemy.sql import func
|
from sqlalchemy.sql import func
|
||||||
|
|
||||||
from murano.db import models
|
from murano.db import models
|
||||||
from murano.db import session as db_session
|
from murano.db import session as db_session
|
||||||
from murano.openstack.common import timeutils
|
|
||||||
|
|
||||||
|
|
||||||
UNCLASSIFIED = 0
|
UNCLASSIFIED = 0
|
||||||
|
@ -16,13 +16,13 @@ import math
|
|||||||
|
|
||||||
import netaddr
|
import netaddr
|
||||||
from netaddr.strategy import ipv4
|
from netaddr.strategy import ipv4
|
||||||
|
import oslo.utils
|
||||||
|
|
||||||
import murano.common.config as config
|
import murano.common.config as config
|
||||||
import murano.dsl.helpers as helpers
|
import murano.dsl.helpers as helpers
|
||||||
import murano.dsl.murano_class as murano_class
|
import murano.dsl.murano_class as murano_class
|
||||||
import murano.dsl.murano_object as murano_object
|
import murano.dsl.murano_object as murano_object
|
||||||
from murano.openstack.common import log as logging
|
from murano.openstack.common import log as logging
|
||||||
import muranoclient.openstack.common.uuidutils as uuidutils
|
|
||||||
|
|
||||||
|
|
||||||
LOG = logging.getLogger(__name__)
|
LOG = logging.getLogger(__name__)
|
||||||
@ -52,7 +52,7 @@ class NetworkExplorer(murano_object.MuranoObject):
|
|||||||
format(router_name))
|
format(router_name))
|
||||||
external_network = self._settings.external_network
|
external_network = self._settings.external_network
|
||||||
kwargs = {'id': external_network} \
|
kwargs = {'id': external_network} \
|
||||||
if uuidutils.is_uuid_like(external_network) \
|
if oslo.utils.uuidutils.is_uuid_like(external_network) \
|
||||||
else {'name': external_network}
|
else {'name': external_network}
|
||||||
networks = client.list_networks(**kwargs).get('networks')
|
networks = client.list_networks(**kwargs).get('networks')
|
||||||
ext_nets = filter(lambda n: n['router:external'], networks)
|
ext_nets = filter(lambda n: n['router:external'], networks)
|
||||||
|
@ -16,6 +16,7 @@
|
|||||||
import fixtures
|
import fixtures
|
||||||
import logging
|
import logging
|
||||||
import mock
|
import mock
|
||||||
|
from oslo.utils import timeutils
|
||||||
import routes
|
import routes
|
||||||
import urllib
|
import urllib
|
||||||
import webob
|
import webob
|
||||||
@ -25,7 +26,6 @@ from murano.api.v1 import router
|
|||||||
from murano.common import policy
|
from murano.common import policy
|
||||||
from murano.common import rpc
|
from murano.common import rpc
|
||||||
from murano.common import wsgi
|
from murano.common import wsgi
|
||||||
from murano.openstack.common import timeutils
|
|
||||||
from murano.tests.unit import base
|
from murano.tests.unit import base
|
||||||
from murano.tests.unit import utils
|
from murano.tests.unit import utils
|
||||||
|
|
||||||
|
@ -15,11 +15,11 @@
|
|||||||
|
|
||||||
|
|
||||||
import mock
|
import mock
|
||||||
|
from oslo.utils import timeutils
|
||||||
|
|
||||||
from murano.api.v1 import actions
|
from murano.api.v1 import actions
|
||||||
from murano.common import policy
|
from murano.common import policy
|
||||||
from murano.db import models
|
from murano.db import models
|
||||||
from murano.openstack.common import timeutils
|
|
||||||
import murano.tests.unit.api.base as tb
|
import murano.tests.unit.api.base as tb
|
||||||
import murano.tests.unit.utils as test_utils
|
import murano.tests.unit.utils as test_utils
|
||||||
|
|
||||||
|
@ -14,10 +14,10 @@
|
|||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
import json
|
import json
|
||||||
|
from oslo.utils import timeutils
|
||||||
|
|
||||||
from murano.api.v1 import environments
|
from murano.api.v1 import environments
|
||||||
from murano.db import models
|
from murano.db import models
|
||||||
from murano.openstack.common import timeutils
|
|
||||||
import murano.tests.unit.api.base as tb
|
import murano.tests.unit.api.base as tb
|
||||||
import murano.tests.unit.utils as test_utils
|
import murano.tests.unit.utils as test_utils
|
||||||
|
|
||||||
|
@ -11,7 +11,6 @@ module=policy
|
|||||||
module=processutils
|
module=processutils
|
||||||
module=service
|
module=service
|
||||||
module=sslutils
|
module=sslutils
|
||||||
module=timeutils
|
|
||||||
|
|
||||||
# The base module to hold the copy of openstack.common
|
# The base module to hold the copy of openstack.common
|
||||||
base=murano
|
base=murano
|
||||||
|
@ -35,6 +35,7 @@ python-neutronclient>=2.3.6,<3
|
|||||||
oslo.db>=1.0.0 # Apache-2.0
|
oslo.db>=1.0.0 # Apache-2.0
|
||||||
oslo.config>=1.4.0 # Apache-2.0
|
oslo.config>=1.4.0 # Apache-2.0
|
||||||
oslo.messaging>=1.4.0
|
oslo.messaging>=1.4.0
|
||||||
|
oslo.utils>=1.0.0 # Apache-2.0
|
||||||
|
|
||||||
# not listed in global requirements
|
# not listed in global requirements
|
||||||
yaql>=0.2.3,<0.3
|
yaql>=0.2.3,<0.3
|
||||||
|
Loading…
Reference in New Issue
Block a user