refactor baremetal/proxy => baremetal/driver

Part of bp:virt-driver-cleanup

Make the baremetal driver consistent in naming as a driver
instead of a proxy / connection.

Change-Id: I75d7d90bd8139842b588f1fafb1267511f29a1fb
This commit is contained in:
Sean Dague 2012-07-06 10:30:04 -04:00
parent 38b594fedc
commit d72bf92224
3 changed files with 9 additions and 6 deletions

View File

@ -27,7 +27,7 @@ from nova import test
from nova.tests import fake_utils
from nova.virt.baremetal import dom
from nova.virt.baremetal import proxy
from nova.virt.baremetal import driver
FLAGS = flags.FLAGS
@ -226,7 +226,7 @@ class BareMetalDomTestCase(test.TestCase):
self.assertEquals(bmdom.find_domain('instance-00000001'), domain)
class ProxyBareMetalTestCase(test.TestCase):
class BareMetalTestCase(test.TestCase):
test_ip = '10.11.12.13'
test_instance = {'memory_kb': '1024000',
@ -240,7 +240,7 @@ class ProxyBareMetalTestCase(test.TestCase):
'instance_type_id': '5'} # m1.small
def setUp(self):
super(ProxyBareMetalTestCase, self).setUp()
super(BareMetalTestCase, self).setUp()
self.flags(baremetal_driver='fake')
fake_utils.stub_out_utils_execute(self.stubs)
@ -257,7 +257,7 @@ class ProxyBareMetalTestCase(test.TestCase):
self.mox.ReplayAll()
# Code under test
conn = proxy.ProxyConnection(True)
conn = driver.BareMetalDriver(True)
# TODO(mikalstill): this is not a very good fake instance
info = conn.get_info({'name': 'instance-00000001'})

View File

@ -13,3 +13,6 @@
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
# NOTE(sdague) for more convenient compute_driver names
from nova.virt.baremetal.driver import BareMetalDriver

View File

@ -74,13 +74,13 @@ def _late_load_cheetah():
Template = t.Template
class ProxyConnection(driver.ComputeDriver):
class BareMetalDriver(driver.ComputeDriver):
def __init__(self, read_only):
_late_load_cheetah()
# Note that baremetal doesn't have a read-only connection
# mode, so the read_only parameter is ignored
super(ProxyConnection, self).__init__()
super(BareMetalDriver, self).__init__()
self.baremetal_nodes = nodes.get_baremetal_nodes()
self._wrapped_conn = None
self._host_state = None