Merge "Use oslo_utils instead of deprecated oslo.utils"

This commit is contained in:
Jenkins 2015-01-15 03:50:20 +00:00 committed by Gerrit Code Review
commit 994543bb40
81 changed files with 85 additions and 85 deletions

View File

@ -22,7 +22,7 @@ import datetime
from ceilometerclient import client as ceiloclient
import croniter
from oslo.config import cfg
from oslo.utils import timeutils
from oslo_utils import timeutils
import pytz
import six

View File

@ -19,7 +19,7 @@
import datetime
import operator
from oslo.utils import timeutils
from oslo_utils import timeutils
from ceilometer.alarm import evaluator
from ceilometer.alarm.evaluator import utils

View File

@ -19,7 +19,7 @@ import math
import random
import uuid
from oslo.utils import timeutils
from oslo_utils import timeutils
from ceilometer.alarm import rpc as rpc_alarm
from ceilometer.i18n import _

View File

@ -21,7 +21,7 @@ import abc
from ceilometerclient import client as ceiloclient
from oslo.config import cfg
from oslo.utils import netutils
from oslo_utils import netutils
import six
from stevedore import extension

View File

@ -38,10 +38,10 @@ import uuid
import croniter
import jsonschema
from oslo.config import cfg
from oslo.utils import netutils
from oslo.utils import strutils
from oslo.utils import timeutils
from oslo_context import context
from oslo_utils import netutils
from oslo_utils import strutils
from oslo_utils import timeutils
import pecan
from pecan import rest
import pytz

View File

@ -29,8 +29,8 @@ import eventlet
# oslo.messaging use threading.local
eventlet.monkey_patch(socket=True, select=True, thread=True)
from oslo.config import cfg
from oslo.utils import timeutils
from oslo_context import context
from oslo_utils import timeutils
from ceilometer import pipeline
from ceilometer import sample

View File

@ -20,7 +20,7 @@ import socket
import msgpack
from oslo.config import cfg
import oslo.messaging
from oslo.utils import units
from oslo_utils import units
from ceilometer import dispatcher
from ceilometer import messaging

View File

@ -17,7 +17,7 @@
"""Converters for producing compute CPU sample messages from notification
events.
"""
from oslo.utils import timeutils
from oslo_utils import timeutils
from ceilometer.compute import notifications
from ceilometer.i18n import _

View File

@ -14,7 +14,7 @@
import abc
from oslo.utils import timeutils
from oslo_utils import timeutils
import six
from ceilometer.agent import plugin_base

View File

@ -19,7 +19,7 @@
import copy
from oslo.utils import timeutils
from oslo_utils import timeutils
import ceilometer
from ceilometer.compute import pollsters

View File

@ -16,7 +16,7 @@
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
from oslo.utils import timeutils
from oslo_utils import timeutils
from ceilometer.compute import util as compute_util
from ceilometer import sample

View File

@ -17,7 +17,7 @@
"""Implementation of Inspector abstraction for Hyper-V"""
from oslo.config import cfg
from oslo.utils import units
from oslo_utils import units
from ceilometer.compute.pollsters import util
from ceilometer.compute.virt.hyperv import utilsv2

View File

@ -18,7 +18,7 @@
from lxml import etree
from oslo.config import cfg
from oslo.utils import units
from oslo_utils import units
import six
from ceilometer.compute.pollsters import util

View File

@ -16,8 +16,8 @@
"""Implementation of Inspector abstraction for VMware vSphere"""
from oslo.config import cfg
from oslo.utils import units
from oslo.vmware import api
from oslo_utils import units
from ceilometer.compute.virt import inspector as virt_inspector
from ceilometer.compute.virt.vmware import vsphere_operations

View File

@ -17,7 +17,7 @@
from eventlet import timeout
from oslo.config import cfg
from oslo.utils import units
from oslo_utils import units
try:
import XenAPI as api
except ImportError:

View File

@ -14,7 +14,7 @@
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
from oslo.utils import timeutils
from oslo_utils import timeutils
from ceilometer import dispatcher
from ceilometer.i18n import _

View File

@ -20,7 +20,7 @@ import os
import jsonpath_rw
from oslo.config import cfg
from oslo.utils import timeutils
from oslo_utils import timeutils
import six
import yaml

View File

@ -12,7 +12,7 @@
# under the License.
"""Model classes for use in the events storage API.
"""
from oslo.utils import timeutils
from oslo_utils import timeutils
from ceilometer.storage import base

View File

@ -22,7 +22,7 @@
import abc
import itertools
from oslo.utils import netutils
from oslo_utils import netutils
import six
from ceilometer.agent import plugin_base

View File

@ -20,7 +20,7 @@
import copy
from oslo.utils import timeutils
from oslo_utils import timeutils
from six.moves.urllib import parse as urlparse
from ceilometer import sample

View File

@ -22,7 +22,7 @@ import itertools
import glanceclient
from oslo.config import cfg
from oslo.utils import timeutils
from oslo_utils import timeutils
from ceilometer.agent import plugin_base
from ceilometer import sample

View File

@ -17,7 +17,7 @@
import abc
from oslo.config import cfg
from oslo.utils import timeutils
from oslo_utils import timeutils
import six
from ceilometer.agent import plugin_base

View File

@ -15,7 +15,7 @@
# under the License.
from oslo.config import cfg
from oslo.utils import timeutils
from oslo_utils import timeutils
from ceilometer.agent import plugin_base
from ceilometer.ipmi.notifications import ironic as parser

View File

@ -19,7 +19,7 @@
# under the License.
from oslo.config import cfg
from oslo.utils import timeutils
from oslo_utils import timeutils
from ceilometer.agent import plugin_base
from ceilometer.i18n import _

View File

@ -14,7 +14,7 @@
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
from oslo.utils import timeutils
from oslo_utils import timeutils
from ceilometer.i18n import _
from ceilometer.network.services import base

View File

@ -18,7 +18,7 @@
import abc
import collections
from oslo.utils import timeutils
from oslo_utils import timeutils
import six
from ceilometer.i18n import _

View File

@ -14,7 +14,7 @@
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
from oslo.utils import timeutils
from oslo_utils import timeutils
from ceilometer.i18n import _
from ceilometer.network.services import base

View File

@ -15,7 +15,7 @@
import abc
from oslo.utils import netutils
from oslo_utils import netutils
import six
from six.moves.urllib import parse as urlparse
from stevedore import driver as _driver

View File

@ -13,7 +13,7 @@
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
from oslo.utils import timeutils
from oslo_utils import timeutils
from six.moves.urllib import parse as urlparse
from ceilometer.network.statistics import driver

View File

@ -12,7 +12,7 @@
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
from oslo.utils import timeutils
from oslo_utils import timeutils
import six
from six import moves
from six.moves.urllib import parse as urlparse

View File

@ -21,7 +21,7 @@ from __future__ import absolute_import
from keystoneclient import exceptions
from oslo.config import cfg
from oslo.utils import timeutils
from oslo_utils import timeutils
import six.moves.urllib.parse as urlparse
from swiftclient import client as swift

View File

@ -42,8 +42,8 @@ before "proxy-server" and add the following filter in the file:
from __future__ import absolute_import
import logging
from oslo.utils import timeutils
from oslo_context import context
from oslo_utils import timeutils
import six
import six.moves.urllib.parse as urlparse

View File

@ -19,7 +19,7 @@ import logging
import os
import tempfile
from oslo.utils import excutils
from oslo_utils import excutils
LOG = logging.getLogger(__name__)

View File

@ -40,7 +40,7 @@ import traceback
from oslo.config import cfg
from oslo.serialization import jsonutils
from oslo.utils import importutils
from oslo_utils import importutils
import six
from six import moves

View File

@ -19,7 +19,7 @@
import abc
from oslo.utils import netutils
from oslo_utils import netutils
import six
from stevedore import driver

View File

@ -22,7 +22,7 @@ import socket
import msgpack
from oslo.config import cfg
from oslo.utils import netutils
from oslo_utils import netutils
from ceilometer.i18n import _
from ceilometer.openstack.common import log

View File

@ -21,7 +21,7 @@ import datetime
import inspect
import math
from oslo.utils import timeutils
from oslo_utils import timeutils
import six
from six import moves

View File

@ -14,7 +14,7 @@
import os
import happybase
from oslo.utils import netutils
from oslo_utils import netutils
from six.moves.urllib import parse as urlparse
from ceilometer.i18n import _

View File

@ -29,7 +29,7 @@ import sys
import bson.code
import bson.objectid
from oslo.config import cfg
from oslo.utils import timeutils
from oslo_utils import timeutils
import pymongo
import six

View File

@ -15,7 +15,7 @@ import datetime
import operator
import time
from oslo.utils import timeutils
from oslo_utils import timeutils
import ceilometer
from ceilometer.i18n import _

View File

@ -30,7 +30,7 @@ import uuid
import bson.code
import bson.objectid
from oslo.config import cfg
from oslo.utils import timeutils
from oslo_utils import timeutils
import pymongo
import six

View File

@ -25,7 +25,7 @@ from oslo.config import cfg
from oslo.db import exception as dbexc
from oslo.db.sqlalchemy import session as db_session
from oslo.serialization import jsonutils
from oslo.utils import timeutils
from oslo_utils import timeutils
import six
import sqlalchemy as sa
from sqlalchemy import and_

View File

@ -22,7 +22,7 @@ import time
import weakref
from oslo.config import cfg
from oslo.utils import netutils
from oslo_utils import netutils
import pymongo
import six
from six.moves.urllib import parse

View File

@ -14,7 +14,7 @@
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
from oslo.utils import timeutils
from oslo_utils import timeutils
from sqlalchemy import MetaData, Table, Column, DateTime

View File

@ -10,7 +10,7 @@
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
from oslo.utils import timeutils
from oslo_utils import timeutils
import sqlalchemy
from ceilometer.storage.sqlalchemy import models

View File

@ -19,7 +19,7 @@ SQLAlchemy models for Ceilometer data.
import hashlib
import json
from oslo.utils import timeutils
from oslo_utils import timeutils
import six
from sqlalchemy import (Column, Integer, String, ForeignKey, Index,
UniqueConstraint, BigInteger)

View File

@ -19,7 +19,7 @@
import datetime
import mock
from oslo.utils import timeutils
from oslo_utils import timeutils
from oslotest import base
from ceilometer.alarm import evaluator

View File

@ -24,7 +24,7 @@ import uuid
from ceilometerclient import exc
from ceilometerclient.v2 import alarms
import mock
from oslo.utils import timeutils
from oslo_utils import timeutils
import pytz
from ceilometer.alarm.evaluator import combination

View File

@ -23,7 +23,7 @@ from ceilometerclient import exc
from ceilometerclient.v2 import statistics
import mock
from oslo.config import cfg
from oslo.utils import timeutils
from oslo_utils import timeutils
import pytz
from six import moves

View File

@ -22,7 +22,7 @@ import uuid
import mock
from oslo.config import fixture as fixture_config
from oslo.utils import timeutils
from oslo_utils import timeutils
from six import moves
from ceilometer.alarm.partition import coordination

View File

@ -214,7 +214,7 @@ class TestAlarmNotifier(tests_base.BaseTestCase):
raise Exception("Evil urlsplit!")
def test_notify_alarm_invalid_url(self):
with mock.patch('oslo.utils.netutils.urlsplit',
with mock.patch('oslo_utils.netutils.urlsplit',
self._fake_urlsplit):
LOG = mock.MagicMock()
with mock.patch('ceilometer.alarm.service.LOG', LOG):

View File

@ -20,7 +20,7 @@ import uuid
from ceilometerclient.v2 import alarms
import eventlet
from oslo.config import fixture as fixture_config
from oslo.utils import timeutils
from oslo_utils import timeutils
import six
from ceilometer.alarm import rpc as rpc_alarm

View File

@ -19,7 +19,7 @@
import datetime
import json
from oslo.utils import timeutils
from oslo_utils import timeutils
import webtest
from ceilometer.api import app

View File

@ -835,7 +835,7 @@ class TestAlarms(v2.FunctionalTest,
raise Exception("Evil urlsplit!")
def test_post_invalid_alarm_actions_format(self):
with mock.patch('oslo.utils.netutils.urlsplit',
with mock.patch('oslo_utils.netutils.urlsplit',
self._fake_urlsplit):
self._do_post_alarm_invalid_action(
alarm_actions=['http://[::1'],

View File

@ -20,7 +20,7 @@
import datetime
from oslo.utils import timeutils
from oslo_utils import timeutils
from ceilometer.alarm.storage import models
from ceilometer.publisher import utils

View File

@ -20,7 +20,7 @@
import datetime
import mock
from oslo.utils import timeutils
from oslo_utils import timeutils
from ceilometer.storage import models
from ceilometer.tests.api import v2

View File

@ -20,7 +20,7 @@
import datetime
import mock
from oslo.utils import timeutils
from oslo_utils import timeutils
import six
import webtest.app

View File

@ -20,7 +20,7 @@
import datetime
import json
from oslo.utils import timeutils
from oslo_utils import timeutils
import six
from ceilometer.publisher import utils

View File

@ -21,7 +21,7 @@ import copy
import datetime
import mock
from oslo.utils import timeutils
from oslo_utils import timeutils
from oslotest import mockpatch
from ceilometer.tests.api import v2

View File

@ -18,7 +18,7 @@ import datetime
import fixtures
import mock
from oslo.utils import timeutils
from oslo_utils import timeutils
from oslotest import base
from oslotest import mockpatch
import wsme

View File

@ -22,7 +22,7 @@ import os.path
import eventlet
import oslo.messaging.conffixture
from oslo.utils import timeutils
from oslo_utils import timeutils
from oslotest import base
from oslotest import mockpatch
import six

View File

@ -18,7 +18,7 @@ Tests for Hyper-V inspector.
"""
import mock
from oslo.utils import units
from oslo_utils import units
from oslotest import base
from ceilometer.compute.virt.hyperv import inspector as hyperv_inspector

View File

@ -22,7 +22,7 @@ import contextlib
import fixtures
import mock
from oslo.utils import units
from oslo_utils import units
from oslotest import base
from ceilometer.compute.virt import inspector as virt_inspector

View File

@ -547,7 +547,7 @@ class TestEventDefinition(ConverterBase):
edef = converter.EventDefinition(cfg, self.fake_plugin_mgr)
self.assertTrue(edef.is_catchall)
@mock.patch('oslo.utils.timeutils.utcnow')
@mock.patch('oslo_utils.timeutils.utcnow')
def test_extract_when(self, mock_utcnow):
now = datetime.datetime.utcnow()
modified = now + datetime.timedelta(minutes=1)
@ -624,7 +624,7 @@ class TestNotificationConverter(ConverterBase):
host='cydonia')
self.fake_plugin_mgr = {}
@mock.patch('oslo.utils.timeutils.utcnow')
@mock.patch('oslo_utils.timeutils.utcnow')
def test_converter_missing_keys(self, mock_utcnow):
# test a malformed notification
now = datetime.datetime.utcnow()

View File

@ -14,7 +14,7 @@
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
from oslo.utils import netutils
from oslo_utils import netutils
from ceilometer.hardware import inspector
from ceilometer.tests import base

View File

@ -16,7 +16,7 @@
# under the License.
"""Tests for ceilometer/hardware/inspector/snmp/inspector.py
"""
from oslo.utils import netutils
from oslo_utils import netutils
from oslotest import mockpatch
from ceilometer.hardware.inspector import snmp

View File

@ -15,7 +15,7 @@
# License for the specific language governing permissions and limitations
# under the License.
from oslo.utils import netutils
from oslo_utils import netutils
from ceilometer.hardware.pollsters import util
from ceilometer import sample

View File

@ -15,7 +15,7 @@
import datetime
from oslo.utils import timeutils
from oslo_utils import timeutils
from oslotest import base
from ceilometer.network import statistics

View File

@ -22,7 +22,7 @@ import datetime
import traceback
import mock
from oslo.utils import timeutils
from oslo_utils import timeutils
from oslotest import base
from oslotest import mockpatch
import six

View File

@ -22,7 +22,7 @@ import logging.handlers
import os
import tempfile
from oslo.utils import netutils
from oslo_utils import netutils
from oslotest import base
from ceilometer.publisher import file

View File

@ -23,8 +23,8 @@ import eventlet
import mock
from oslo.config import fixture as fixture_config
import oslo.messaging
from oslo.utils import netutils
from oslo_context import context
from oslo_utils import netutils
import testscenarios.testcase
from ceilometer import messaging

View File

@ -22,7 +22,7 @@ import datetime
import mock
import msgpack
from oslo.config import fixture as fixture_config
from oslo.utils import netutils
from oslo_utils import netutils
from oslotest import base
from ceilometer.publisher import udp

View File

@ -26,7 +26,7 @@ import datetime
import repr
import mock
from oslo.utils import timeutils
from oslo_utils import timeutils
from ceilometer.alarm.storage import impl_sqlalchemy as impl_sqla_alarm
from ceilometer.event.storage import impl_sqlalchemy as impl_sqla_event

View File

@ -24,7 +24,7 @@ import operator
import mock
from oslo.config import cfg
from oslo.utils import timeutils
from oslo_utils import timeutils
import pymongo
import ceilometer

View File

@ -21,8 +21,8 @@ import mock
import msgpack
from oslo.config import fixture as fixture_config
import oslo.messaging
from oslo.utils import timeutils
from oslo_context import context
from oslo_utils import timeutils
from oslotest import mockpatch
from stevedore import extension

View File

@ -21,8 +21,8 @@ import mock
from oslo.config import fixture as fixture_config
import oslo.messaging
import oslo.messaging.conffixture
from oslo.utils import timeutils
from oslo_context import context
from oslo_utils import timeutils
from stevedore import extension
import yaml

View File

@ -18,7 +18,7 @@
import collections
import re
from oslo.utils import timeutils
from oslo_utils import timeutils
import six
from ceilometer.i18n import _

View File

@ -28,9 +28,9 @@ import multiprocessing
import struct
from oslo.config import cfg
from oslo.utils import timeutils
from oslo.utils import units
from oslo_concurrency import processutils
from oslo_utils import timeutils
from oslo_utils import units
import six

View File

@ -22,7 +22,7 @@ import contextlib
import datetime
import mock
from oslo.utils import importutils
from oslo_utils import importutils
from oslotest import base
from oslotest import moxstubout

View File

@ -36,7 +36,7 @@ import sys
import uuid
from oslo.config import cfg
from oslo.utils import timeutils
from oslo_utils import timeutils
from ceilometer.publisher import utils
from ceilometer import sample

View File

@ -31,7 +31,7 @@ import sys
import uuid
from oslo.config import cfg
from oslo.utils import timeutils
from oslo_utils import timeutils
from ceilometer.event.storage import models
from ceilometer import storage