Use olso.log directly

As the openstack/common is deprecated, Watcher should use oslo lib
directly to run in the openstack env. So there is much work to do
with oslo. This patch fixed the log part.

Change-Id: I3145a842fe3a22b3d08fec60d180329073edd50f
This commit is contained in:
unknown
2015-11-12 11:45:50 +08:00
committed by wangxiyuan
parent f763d6c608
commit 0c348313a4
41 changed files with 74 additions and 70 deletions

View File

@@ -13,6 +13,7 @@
# implied.
# See the License for the specific language governing permissions and
# limitations under the License.
from oslo_log import log
from watcher.common.messaging.events.event import Event
from watcher.decision_engine.api.messaging.decision_engine_command import \
@@ -24,7 +25,6 @@ from watcher.decision_engine.framework.strategy.StrategyManagerImpl import \
from watcher.objects.audit import Audit
from watcher.objects.audit import AuditStatus
from watcher.objects.audit_template import AuditTemplate
from watcher.openstack.common import log
LOG = log.getLogger(__name__)

View File

@@ -16,6 +16,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
from oslo_log import log
from enum import Enum
from watcher.common.exception import MetaActionNotFound
@@ -31,7 +32,6 @@ from watcher.decision_engine.framework.meta_actions.power_state import \
ChangePowerState
from watcher.objects.action import Status as AStatus
from watcher.objects.action_plan import Status as APStatus
from watcher.openstack.common import log
LOG = log.getLogger(__name__)

View File

@@ -16,8 +16,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
from oslo_log import log
from watcher.decision_engine.api.solution.solution import Solution
from watcher.openstack.common import log
LOG = log.getLogger(__name__)

View File

@@ -19,6 +19,7 @@
from concurrent.futures import ThreadPoolExecutor
from oslo_config import cfg
from oslo_log import log
from watcher.decision_engine.framework.events.event_consumer_factory import \
EventConsumerFactory
@@ -33,7 +34,6 @@ from watcher.common.messaging.notification_handler import \
NotificationHandler
from watcher.decision_engine.framework.strategy.StrategyManagerImpl import \
StrategyContextImpl
from watcher.openstack.common import log
LOG = log.getLogger(__name__)
CONF = cfg.CONF

View File

@@ -16,10 +16,11 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
from oslo_log import log
from watcher.decision_engine.framework.command.trigger_audit_command import \
TriggerAuditCommand
from watcher.metrics_engine.framework.collector_manager import CollectorManager
from watcher.openstack.common import log
LOG = log.getLogger(__name__)

View File

@@ -13,10 +13,9 @@
# implied.
# See the License for the specific language governing permissions and
# limitations under the License.
from oslo_log import log
from threading import Lock
from watcher.openstack.common import log
LOG = log.getLogger(__name__)

View File

@@ -13,6 +13,7 @@
# implied.
# See the License for the specific language governing permissions and
# limitations under the License.
from oslo_log import log
from watcher.common.exception import HypervisorNotFound
from watcher.common.exception import IllegalArgumentException
@@ -20,7 +21,6 @@ from watcher.common.exception import VMNotFound
from watcher.decision_engine.framework.model.hypervisor import Hypervisor
from watcher.decision_engine.framework.model.mapping import Mapping
from watcher.decision_engine.framework.model.vm import VM
from watcher.openstack.common import log
LOG = log.getLogger(__name__)

View File

@@ -19,6 +19,7 @@
from oslo_config import cfg
from oslo_log import log
import oslo_messaging as om
from watcher.common import exception
@@ -38,8 +39,6 @@ from watcher.decision_engine.framework.manager_decision_engine import \
from watcher.decision_engine.framework.messaging.events import Events
from watcher.openstack.common import log
LOG = log.getLogger(__name__)
CONF = cfg.CONF

View File

@@ -13,13 +13,13 @@
# implied.
# See the License for the specific language governing permissions and
# limitations under the License.
from oslo_log import log
from watcher.decision_engine.api.strategy.strategy_context import \
StrategyContext
from watcher.decision_engine.framework.default_planner import DefaultPlanner
from watcher.decision_engine.framework.strategy.strategy_selector import \
StrategySelector
from watcher.openstack.common import log
LOG = log.getLogger(__name__)

View File

@@ -17,10 +17,10 @@
# limitations under the License.
#
from oslo_config import cfg
from oslo_log import log
from stevedore import driver
from watcher.decision_engine.strategies.basic_consolidation import \
BasicConsolidation
from watcher.openstack.common import log
LOG = log.getLogger(__name__)
CONF = cfg.CONF

View File

@@ -15,11 +15,11 @@
# limitations under the License.
from oslo_config import cfg
from oslo_log import log
from watcher.decision_engine.api.strategy.selector import Selector
from watcher.decision_engine.framework.strategy.strategy_loader import \
StrategyLoader
from watcher.objects.audit_template import Goal
from watcher.openstack.common import log
LOG = log.getLogger(__name__)
CONF = cfg.CONF

View File

@@ -16,6 +16,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
from oslo_log import log
from watcher.decision_engine.framework.model.vm_state import VMState
from watcher.metrics_engine.api.metrics_resource_collector import \
AggregationFunction
@@ -38,7 +40,6 @@ from watcher.decision_engine.framework.meta_actions.power_state import \
from watcher.decision_engine.framework.model.hypervisor_state import \
HypervisorState
from watcher.decision_engine.framework.model.resource import ResourceType
from watcher.openstack.common import log
LOG = log.getLogger(__name__)

View File

@@ -16,9 +16,9 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
from oslo_log import log
from watcher.decision_engine.api.strategy.strategy import Strategy
from watcher.openstack.common import log
LOG = log.getLogger(__name__)