diff options
| author | Sean Dague <sdague@linux.vnet.ibm.com> | 2013-01-08 16:48:56 -0500 |
|---|---|---|
| committer | Sean Dague <sdague@linux.vnet.ibm.com> | 2013-01-09 00:19:10 -0500 |
| commit | f6fedfc50590c9f8cc024fb3fa94080198c47572 (patch) | |
| tree | 6c8da9d56dc3801276a3663113c2ac5c5e3cb1ab | |
| parent | 22498d2ac061b911eea6fcccc1621840ad912e7b (diff) | |
| download | nova-f6fedfc50590c9f8cc024fb3fa94080198c47572.tar.gz nova-f6fedfc50590c9f8cc024fb3fa94080198c47572.tar.xz nova-f6fedfc50590c9f8cc024fb3fa94080198c47572.zip | |
fix N402 for nova/scheduler
fixes N402 (single line docstrings should end in period) for
nova/scheduler files.
Change-Id: I8e7b6a93df53fcd5c9491f533cadd093f4b802e0
| -rw-r--r-- | nova/scheduler/chance.py | 2 | ||||
| -rw-r--r-- | nova/scheduler/driver.py | 2 | ||||
| -rw-r--r-- | nova/scheduler/filters/compute_filter.py | 4 | ||||
| -rw-r--r-- | nova/scheduler/filters/disk_filter.py | 4 | ||||
| -rw-r--r-- | nova/scheduler/filters/io_ops_filter.py | 2 | ||||
| -rw-r--r-- | nova/scheduler/filters/json_filter.py | 2 | ||||
| -rw-r--r-- | nova/scheduler/filters/num_instances_filter.py | 2 | ||||
| -rw-r--r-- | nova/scheduler/filters/ram_filter.py | 2 | ||||
| -rw-r--r-- | nova/scheduler/filters/retry_filter.py | 2 | ||||
| -rw-r--r-- | nova/scheduler/host_manager.py | 6 | ||||
| -rw-r--r-- | nova/scheduler/manager.py | 2 | ||||
| -rw-r--r-- | nova/scheduler/weights/least_cost.py | 2 |
12 files changed, 16 insertions, 16 deletions
diff --git a/nova/scheduler/chance.py b/nova/scheduler/chance.py index bc5725acd..ff7c38cb1 100644 --- a/nova/scheduler/chance.py +++ b/nova/scheduler/chance.py @@ -61,7 +61,7 @@ class ChanceScheduler(driver.Scheduler): admin_password, injected_files, requested_networks, is_first_time, filter_properties): - """Create and run an instance or instances""" + """Create and run an instance or instances.""" instance_uuids = request_spec.get('instance_uuids') for num, instance_uuid in enumerate(instance_uuids): request_spec['instance_properties']['launch_index'] = num diff --git a/nova/scheduler/driver.py b/nova/scheduler/driver.py index c63b5643b..2873c96ef 100644 --- a/nova/scheduler/driver.py +++ b/nova/scheduler/driver.py @@ -95,7 +95,7 @@ def instance_update_db(context, instance_uuid): def encode_instance(instance, local=True): - """Encode locally created instance for return via RPC""" + """Encode locally created instance for return via RPC.""" # TODO(comstud): I would love to be able to return the full # instance information here, but we'll need some modifications # to the RPC code to handle datetime conversions with the diff --git a/nova/scheduler/filters/compute_filter.py b/nova/scheduler/filters/compute_filter.py index e35f68ab5..2cdfb91f4 100644 --- a/nova/scheduler/filters/compute_filter.py +++ b/nova/scheduler/filters/compute_filter.py @@ -24,13 +24,13 @@ LOG = logging.getLogger(__name__) class ComputeFilter(filters.BaseHostFilter): - """Filter on active Compute nodes""" + """Filter on active Compute nodes.""" def __init__(self): self.servicegroup_api = servicegroup.API() def host_passes(self, host_state, filter_properties): - """Returns True for only active compute nodes""" + """Returns True for only active compute nodes.""" capabilities = host_state.capabilities service = host_state.service diff --git a/nova/scheduler/filters/disk_filter.py b/nova/scheduler/filters/disk_filter.py index 49fcb4720..e7a292c45 100644 --- a/nova/scheduler/filters/disk_filter.py +++ b/nova/scheduler/filters/disk_filter.py @@ -27,10 +27,10 @@ CONF.register_opt(disk_allocation_ratio_opt) class DiskFilter(filters.BaseHostFilter): - """Disk Filter with over subscription flag""" + """Disk Filter with over subscription flag.""" def host_passes(self, host_state, filter_properties): - """Filter based on disk usage""" + """Filter based on disk usage.""" instance_type = filter_properties.get('instance_type') requested_disk = 1024 * (instance_type['root_gb'] + instance_type['ephemeral_gb']) diff --git a/nova/scheduler/filters/io_ops_filter.py b/nova/scheduler/filters/io_ops_filter.py index 4429f20fa..2780ff252 100644 --- a/nova/scheduler/filters/io_ops_filter.py +++ b/nova/scheduler/filters/io_ops_filter.py @@ -28,7 +28,7 @@ CONF.register_opt(max_io_ops_per_host_opt) class IoOpsFilter(filters.BaseHostFilter): - """Filter out hosts with too many concurrent I/O operations""" + """Filter out hosts with too many concurrent I/O operations.""" def host_passes(self, host_state, filter_properties): """Use information about current vm and task states collected from diff --git a/nova/scheduler/filters/json_filter.py b/nova/scheduler/filters/json_filter.py index cfb2698db..2d070ea8e 100644 --- a/nova/scheduler/filters/json_filter.py +++ b/nova/scheduler/filters/json_filter.py @@ -51,7 +51,7 @@ class JsonFilter(filters.BaseHostFilter): return self._op_compare(args, operator.gt) def _in(self, args): - """First term is in set of remaining terms""" + """First term is in set of remaining terms.""" return self._op_compare(args, operator.contains) def _less_than_equal(self, args): diff --git a/nova/scheduler/filters/num_instances_filter.py b/nova/scheduler/filters/num_instances_filter.py index 197959a5f..bdc350f95 100644 --- a/nova/scheduler/filters/num_instances_filter.py +++ b/nova/scheduler/filters/num_instances_filter.py @@ -28,7 +28,7 @@ CONF.register_opt(max_instances_per_host_opt) class NumInstancesFilter(filters.BaseHostFilter): - """Filter out hosts with too many instances""" + """Filter out hosts with too many instances.""" def host_passes(self, host_state, filter_properties): num_instances = host_state.num_instances diff --git a/nova/scheduler/filters/ram_filter.py b/nova/scheduler/filters/ram_filter.py index dc43ced29..f9d6bb750 100644 --- a/nova/scheduler/filters/ram_filter.py +++ b/nova/scheduler/filters/ram_filter.py @@ -29,7 +29,7 @@ CONF.register_opt(ram_allocation_ratio_opt) class RamFilter(filters.BaseHostFilter): - """Ram Filter with over subscription flag""" + """Ram Filter with over subscription flag.""" def host_passes(self, host_state, filter_properties): """Only return hosts with sufficient available RAM.""" diff --git a/nova/scheduler/filters/retry_filter.py b/nova/scheduler/filters/retry_filter.py index 91d2cb2a2..4d6ed50ee 100644 --- a/nova/scheduler/filters/retry_filter.py +++ b/nova/scheduler/filters/retry_filter.py @@ -25,7 +25,7 @@ class RetryFilter(filters.BaseHostFilter): """ def host_passes(self, host_state, filter_properties): - """Skip nodes that have already been attempted""" + """Skip nodes that have already been attempted.""" retry = filter_properties.get('retry', None) if not retry: # Re-scheduling is disabled diff --git a/nova/scheduler/host_manager.py b/nova/scheduler/host_manager.py index d5b8aeb52..b472220bd 100644 --- a/nova/scheduler/host_manager.py +++ b/nova/scheduler/host_manager.py @@ -196,7 +196,7 @@ class HostState(object): self.num_io_ops = int(statmap.get('io_workload', 0)) def consume_from_instance(self, instance): - """Incrementally update host state from an instance""" + """Incrementally update host state from an instance.""" disk_mb = (instance['root_gb'] + instance['ephemeral_gb']) * 1024 ram_mb = instance['memory_mb'] vcpus = instance['vcpus'] @@ -294,7 +294,7 @@ class HostManager(object): def get_filtered_hosts(self, hosts, filter_properties, filter_class_names=None): - """Filter hosts and return only ones passing all filters""" + """Filter hosts and return only ones passing all filters.""" def _strip_ignore_hosts(host_map, hosts_to_ignore): ignored_hosts = [] @@ -338,7 +338,7 @@ class HostManager(object): hosts, filter_properties) def get_weighed_hosts(self, hosts, weight_properties): - """Weigh the hosts""" + """Weigh the hosts.""" return self.weight_handler.get_weighed_objects(self.weight_classes, hosts, weight_properties) diff --git a/nova/scheduler/manager.py b/nova/scheduler/manager.py index f3eb6e2e8..033ee9cc8 100644 --- a/nova/scheduler/manager.py +++ b/nova/scheduler/manager.py @@ -155,7 +155,7 @@ class SchedulerManager(manager.Manager): def _set_vm_state_and_notify(self, method, updates, context, ex, request_spec): - """changes VM state and notifies""" + """changes VM state and notifies.""" # FIXME(comstud): Re-factor this somehow. Not sure this belongs in the # scheduler manager like this. We should make this easier. # run_instance only sends a request_spec, and an instance may or may diff --git a/nova/scheduler/weights/least_cost.py b/nova/scheduler/weights/least_cost.py index f6702bc1b..26b9e7a8c 100644 --- a/nova/scheduler/weights/least_cost.py +++ b/nova/scheduler/weights/least_cost.py @@ -52,7 +52,7 @@ CONF.register_opts(least_cost_opts) def noop_cost_fn(host_state, weight_properties): - """Return a pre-weight cost of 1 for each host""" + """Return a pre-weight cost of 1 for each host.""" return 1 |
