diff options
| author | Justin Santa Barbara <justin@fathomdb.com> | 2011-03-22 22:38:37 -0700 |
|---|---|---|
| committer | Justin Santa Barbara <justin@fathomdb.com> | 2011-03-22 22:38:37 -0700 |
| commit | 19da125805eedbfcfd202abac4a90c57e6c538c4 (patch) | |
| tree | 02fca72031c87442cf450d304c5da235c8b40ac3 /nova/compute | |
| parent | c8e8b44ef27e49b3986659ee0cb6bd77b38430d8 (diff) | |
Filled out the base-driver contract, so it's not a false-promise
Diffstat (limited to 'nova/compute')
| -rw-r--r-- | nova/compute/driver.py | 38 | ||||
| -rw-r--r-- | nova/compute/manager.py | 3 |
2 files changed, 2 insertions, 39 deletions
diff --git a/nova/compute/driver.py b/nova/compute/driver.py deleted file mode 100644 index bda82c60a..000000000 --- a/nova/compute/driver.py +++ /dev/null @@ -1,38 +0,0 @@ -# vim: tabstop=4 shiftwidth=4 softtabstop=4 - -# Copyright 2011 Justin Santa Barbara -# All Rights Reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. - -""" -Driver base-classes: - - (Beginning of) the contract that compute drivers must follow, and shared - types that support that contract -""" - -from nova.compute import power_state - - -class InstanceInfo(object): - def __init__(self, name, state): - self.name = name - assert state in power_state.valid_states() - self.state = state - - -class ComputeDriver(object): - def list_instances_detail(self): - """Return a list of InstanceInfo for all registered VMs""" - raise NotImplementedError() diff --git a/nova/compute/manager.py b/nova/compute/manager.py index b21f0b836..f37651ea6 100644 --- a/nova/compute/manager.py +++ b/nova/compute/manager.py @@ -52,7 +52,7 @@ from nova import manager from nova import rpc from nova import utils from nova.compute import power_state -from nova.compute import driver +from nova.virt import driver FLAGS = flags.FLAGS flags.DEFINE_string('instances_path', '$state_path/instances', @@ -441,6 +441,7 @@ class ComputeManager(manager.Manager): #TODO(mdietz): we may want to split these into separate methods. if migration_ref['source_compute'] == FLAGS.host: + #NOTE(justinsb): Naughty calling of internal method self.driver._start(instance_ref) self.db.migration_update(context, migration_id, {'status': 'reverted'}) |
