summaryrefslogtreecommitdiffstats
path: root/nova/scheduler
diff options
context:
space:
mode:
authorMark McLoughlin <markmc@redhat.com>2013-02-15 22:30:16 +0000
committerVishvananda Ishaya <vishvananda@gmail.com>2013-02-19 21:16:32 -0800
commit706a1370056ffccc2c8811fc1ac0679944564ece (patch)
tree0b71139bbf282e7909b0df37a69a2aaa8f3e32d2 /nova/scheduler
parentd62205f316ad9490e1379e943972a007e071c688 (diff)
downloadnova-706a1370056ffccc2c8811fc1ac0679944564ece.tar.gz
nova-706a1370056ffccc2c8811fc1ac0679944564ece.tar.xz
nova-706a1370056ffccc2c8811fc1ac0679944564ece.zip
Use oslo-config-2013.1b4
The cfg API is now available via the oslo-config library, so switch to it and remove the copied-and-pasted version. Add the 2013.1b4 tarball to tools/pip-requires - this will be changed to 'oslo-config>=2013.1' when oslo-config is published to pypi. This will happen in time for grizzly final. Add dependency_links to setup.py so that oslo-config can be installed from the tarball URL specified in pip-requires. Remove the 'deps = pep8==1.3.3' from tox.ini as it means all the other deps get installed with easy_install which can't install oslo-config from the URL. Make tools/hacking.py include oslo in IMPORT_EXCEPTIONS like it already does for paste. It turns out imp.find_module() doesn't correct handle namespace packages. Retain dummy cfg.py file until keystoneclient middleware has been updated (I18c450174277c8e2d15ed93879da6cd92074c27a). Change-Id: I4815aeb8a9341a31a250e920157f15ee15cfc5bc
Diffstat (limited to 'nova/scheduler')
-rw-r--r--nova/scheduler/chance.py3
-rw-r--r--nova/scheduler/driver.py3
-rw-r--r--nova/scheduler/filter_scheduler.py3
-rw-r--r--nova/scheduler/filters/availability_zone_filter.py3
-rw-r--r--nova/scheduler/filters/compute_filter.py3
-rw-r--r--nova/scheduler/filters/core_filter.py4
-rw-r--r--nova/scheduler/filters/disk_filter.py3
-rw-r--r--nova/scheduler/filters/io_ops_filter.py3
-rw-r--r--nova/scheduler/filters/isolated_hosts_filter.py3
-rw-r--r--nova/scheduler/filters/num_instances_filter.py3
-rw-r--r--nova/scheduler/filters/ram_filter.py3
-rw-r--r--nova/scheduler/filters/trusted_filter.py4
-rw-r--r--nova/scheduler/host_manager.py3
-rw-r--r--nova/scheduler/manager.py3
-rw-r--r--nova/scheduler/multi.py3
-rw-r--r--nova/scheduler/rpcapi.py3
-rw-r--r--nova/scheduler/scheduler_options.py3
-rw-r--r--nova/scheduler/weights/__init__.py2
-rw-r--r--nova/scheduler/weights/least_cost.py3
-rw-r--r--nova/scheduler/weights/ram.py4
20 files changed, 38 insertions, 24 deletions
diff --git a/nova/scheduler/chance.py b/nova/scheduler/chance.py
index 806758e42..c639aaf80 100644
--- a/nova/scheduler/chance.py
+++ b/nova/scheduler/chance.py
@@ -23,8 +23,9 @@ Chance (Random) Scheduler implementation
import random
+from oslo.config import cfg
+
from nova import exception
-from nova.openstack.common import cfg
from nova.scheduler import driver
CONF = cfg.CONF
diff --git a/nova/scheduler/driver.py b/nova/scheduler/driver.py
index a8531a587..96a3e5e98 100644
--- a/nova/scheduler/driver.py
+++ b/nova/scheduler/driver.py
@@ -23,6 +23,8 @@ Scheduler base class that all Schedulers should inherit from
import sys
+from oslo.config import cfg
+
from nova.compute import power_state
from nova.compute import rpcapi as compute_rpcapi
from nova.compute import utils as compute_utils
@@ -32,7 +34,6 @@ from nova import db
from nova import exception
from nova.image import glance
from nova import notifications
-from nova.openstack.common import cfg
from nova.openstack.common import importutils
from nova.openstack.common import log as logging
from nova.openstack.common.notifier import api as notifier
diff --git a/nova/scheduler/filter_scheduler.py b/nova/scheduler/filter_scheduler.py
index 905b582cd..b886a04cc 100644
--- a/nova/scheduler/filter_scheduler.py
+++ b/nova/scheduler/filter_scheduler.py
@@ -21,8 +21,9 @@ Weighing Functions.
import random
+from oslo.config import cfg
+
from nova import exception
-from nova.openstack.common import cfg
from nova.openstack.common import log as logging
from nova.openstack.common.notifier import api as notifier
from nova.scheduler import driver
diff --git a/nova/scheduler/filters/availability_zone_filter.py b/nova/scheduler/filters/availability_zone_filter.py
index 390276ea3..f6c7472bf 100644
--- a/nova/scheduler/filters/availability_zone_filter.py
+++ b/nova/scheduler/filters/availability_zone_filter.py
@@ -13,12 +13,11 @@
# License for the specific language governing permissions and limitations
# under the License.
+from oslo.config import cfg
from nova import db
-from nova.openstack.common import cfg
from nova.scheduler import filters
-
CONF = cfg.CONF
CONF.import_opt('default_availability_zone', 'nova.availability_zones')
diff --git a/nova/scheduler/filters/compute_filter.py b/nova/scheduler/filters/compute_filter.py
index 2cdfb91f4..f571955d9 100644
--- a/nova/scheduler/filters/compute_filter.py
+++ b/nova/scheduler/filters/compute_filter.py
@@ -13,7 +13,8 @@
# License for the specific language governing permissions and limitations
# under the License.
-from nova.openstack.common import cfg
+from oslo.config import cfg
+
from nova.openstack.common import log as logging
from nova.scheduler import filters
from nova import servicegroup
diff --git a/nova/scheduler/filters/core_filter.py b/nova/scheduler/filters/core_filter.py
index 54561b811..a07a1b39a 100644
--- a/nova/scheduler/filters/core_filter.py
+++ b/nova/scheduler/filters/core_filter.py
@@ -15,11 +15,11 @@
# License for the specific language governing permissions and limitations
# under the License.
-from nova.openstack.common import cfg
+from oslo.config import cfg
+
from nova.openstack.common import log as logging
from nova.scheduler import filters
-
LOG = logging.getLogger(__name__)
cpu_allocation_ratio_opt = cfg.FloatOpt('cpu_allocation_ratio',
diff --git a/nova/scheduler/filters/disk_filter.py b/nova/scheduler/filters/disk_filter.py
index e7a292c45..812b9b212 100644
--- a/nova/scheduler/filters/disk_filter.py
+++ b/nova/scheduler/filters/disk_filter.py
@@ -13,7 +13,8 @@
# License for the specific language governing permissions and limitations
# under the License.
-from nova.openstack.common import cfg
+from oslo.config import cfg
+
from nova.openstack.common import log as logging
from nova.scheduler import filters
diff --git a/nova/scheduler/filters/io_ops_filter.py b/nova/scheduler/filters/io_ops_filter.py
index 2780ff252..a60be57e2 100644
--- a/nova/scheduler/filters/io_ops_filter.py
+++ b/nova/scheduler/filters/io_ops_filter.py
@@ -13,7 +13,8 @@
# License for the specific language governing permissions and limitations
# under the License.
-from nova.openstack.common import cfg
+from oslo.config import cfg
+
from nova.openstack.common import log as logging
from nova.scheduler import filters
diff --git a/nova/scheduler/filters/isolated_hosts_filter.py b/nova/scheduler/filters/isolated_hosts_filter.py
index 37a8f440d..89beb0ed0 100644
--- a/nova/scheduler/filters/isolated_hosts_filter.py
+++ b/nova/scheduler/filters/isolated_hosts_filter.py
@@ -13,7 +13,8 @@
# License for the specific language governing permissions and limitations
# under the License.
-from nova.openstack.common import cfg
+from oslo.config import cfg
+
from nova.scheduler import filters
isolated_opts = [
diff --git a/nova/scheduler/filters/num_instances_filter.py b/nova/scheduler/filters/num_instances_filter.py
index bdc350f95..f65fccbf6 100644
--- a/nova/scheduler/filters/num_instances_filter.py
+++ b/nova/scheduler/filters/num_instances_filter.py
@@ -13,7 +13,8 @@
# License for the specific language governing permissions and limitations
# under the License.
-from nova.openstack.common import cfg
+from oslo.config import cfg
+
from nova.openstack.common import log as logging
from nova.scheduler import filters
diff --git a/nova/scheduler/filters/ram_filter.py b/nova/scheduler/filters/ram_filter.py
index f9d6bb750..3345bf386 100644
--- a/nova/scheduler/filters/ram_filter.py
+++ b/nova/scheduler/filters/ram_filter.py
@@ -14,7 +14,8 @@
# License for the specific language governing permissions and limitations
# under the License.
-from nova.openstack.common import cfg
+from oslo.config import cfg
+
from nova.openstack.common import log as logging
from nova.scheduler import filters
diff --git a/nova/scheduler/filters/trusted_filter.py b/nova/scheduler/filters/trusted_filter.py
index 14f1a37b0..a7bb850bf 100644
--- a/nova/scheduler/filters/trusted_filter.py
+++ b/nova/scheduler/filters/trusted_filter.py
@@ -48,15 +48,15 @@ import httplib
import socket
import ssl
+from oslo.config import cfg
+
from nova import context
from nova import db
-from nova.openstack.common import cfg
from nova.openstack.common import jsonutils
from nova.openstack.common import log as logging
from nova.openstack.common import timeutils
from nova.scheduler import filters
-
LOG = logging.getLogger(__name__)
trusted_opts = [
diff --git a/nova/scheduler/host_manager.py b/nova/scheduler/host_manager.py
index 7203fb735..c004b2947 100644
--- a/nova/scheduler/host_manager.py
+++ b/nova/scheduler/host_manager.py
@@ -19,11 +19,12 @@ Manage hosts in the current zone.
import UserDict
+from oslo.config import cfg
+
from nova.compute import task_states
from nova.compute import vm_states
from nova import db
from nova import exception
-from nova.openstack.common import cfg
from nova.openstack.common import log as logging
from nova.openstack.common import timeutils
from nova.scheduler import filters
diff --git a/nova/scheduler/manager.py b/nova/scheduler/manager.py
index 6b47f37f8..a9b774a4d 100644
--- a/nova/scheduler/manager.py
+++ b/nova/scheduler/manager.py
@@ -23,6 +23,8 @@ Scheduler Service
import sys
+from oslo.config import cfg
+
from nova.compute import rpcapi as compute_rpcapi
from nova.compute import task_states
from nova.compute import utils as compute_utils
@@ -33,7 +35,6 @@ from nova import db
from nova import exception
from nova import manager
from nova import notifications
-from nova.openstack.common import cfg
from nova.openstack.common import excutils
from nova.openstack.common import importutils
from nova.openstack.common import jsonutils
diff --git a/nova/scheduler/multi.py b/nova/scheduler/multi.py
index a92e09556..ec45ad618 100644
--- a/nova/scheduler/multi.py
+++ b/nova/scheduler/multi.py
@@ -27,7 +27,8 @@ schedule requests to compute nodes but provide their own manager and topic.
https://bugs.launchpad.net/nova/+bug/1009681
"""
-from nova.openstack.common import cfg
+from oslo.config import cfg
+
from nova.openstack.common import importutils
from nova.scheduler import driver
diff --git a/nova/scheduler/rpcapi.py b/nova/scheduler/rpcapi.py
index 5ce8abd7f..47b1de79b 100644
--- a/nova/scheduler/rpcapi.py
+++ b/nova/scheduler/rpcapi.py
@@ -18,7 +18,8 @@
Client side of the scheduler manager RPC API.
"""
-from nova.openstack.common import cfg
+from oslo.config import cfg
+
from nova.openstack.common import jsonutils
import nova.openstack.common.rpc.proxy
diff --git a/nova/scheduler/scheduler_options.py b/nova/scheduler/scheduler_options.py
index e0840dd01..1753c897b 100644
--- a/nova/scheduler/scheduler_options.py
+++ b/nova/scheduler/scheduler_options.py
@@ -26,7 +26,8 @@ import datetime
import json
import os
-from nova.openstack.common import cfg
+from oslo.config import cfg
+
from nova.openstack.common import log as logging
from nova.openstack.common import timeutils
diff --git a/nova/scheduler/weights/__init__.py b/nova/scheduler/weights/__init__.py
index b979b1e55..f96ec929a 100644
--- a/nova/scheduler/weights/__init__.py
+++ b/nova/scheduler/weights/__init__.py
@@ -17,8 +17,8 @@
Scheduler host weights
"""
+from oslo.config import cfg
-from nova.openstack.common import cfg
from nova.openstack.common import log as logging
from nova.scheduler.weights import least_cost
from nova import weights
diff --git a/nova/scheduler/weights/least_cost.py b/nova/scheduler/weights/least_cost.py
index 26b9e7a8c..0e617ff42 100644
--- a/nova/scheduler/weights/least_cost.py
+++ b/nova/scheduler/weights/least_cost.py
@@ -25,8 +25,9 @@ NOTE(comstud): This is deprecated. One should use the RAMWeigher and/or
create other weight modules.
"""
+from oslo.config import cfg
+
from nova import exception
-from nova.openstack.common import cfg
from nova.openstack.common import importutils
from nova.openstack.common import log as logging
diff --git a/nova/scheduler/weights/ram.py b/nova/scheduler/weights/ram.py
index ea4cfab38..3fc15fbdf 100644
--- a/nova/scheduler/weights/ram.py
+++ b/nova/scheduler/weights/ram.py
@@ -20,9 +20,9 @@ stacking, you can set the 'ram_weight_multiplier' option to a negative
number and the weighing has the opposite effect of the default.
"""
-from nova.openstack.common import cfg
-from nova.scheduler import weights
+from oslo.config import cfg
+from nova.scheduler import weights
ram_weight_opts = [
cfg.FloatOpt('ram_weight_multiplier',