baremetal: Drop unused columns in bm_nodes

Drop these two columns:
* bm_nodes.prov_vlan_id
* bm_nodes.registration_status

And update related code, tests and api_samples.

Change-Id: Iadefc83a00ad9ae5a3bb39f357080299875bdf09
This commit is contained in:
Arata Notsu
2013-02-27 03:30:36 +09:00
parent 1b5c3ef667
commit 3d273483b2
2 changed files with 6 additions and 2 deletions

View File

@@ -32,9 +32,7 @@ def new_bm_node(**kwargs):
h.pm_user = kwargs.pop('pm_user', 'ipmi_user')
h.pm_password = kwargs.pop('pm_password', 'ipmi_password')
h.prov_mac_address = kwargs.pop('prov_mac_address', '12:34:56:78:90:ab')
h.registration_status = kwargs.pop('registration_status', 'done')
h.task_state = kwargs.pop('task_state', None)
h.prov_vlan_id = kwargs.pop('prov_vlan_id', None)
h.terminal_port = kwargs.pop('terminal_port', 8000)
if len(kwargs) > 0:
raise test.TestingException("unknown field: %s"

View File

@@ -1238,3 +1238,9 @@ class TestBaremetalMigrations(BaseMigrationTestCase, CommonTestsMixIn):
def _post_downgrade_004(self, engine):
bm_nodes = get_table(engine, 'bm_nodes')
self.assertNotIn(u'instance_name', [c.name for c in bm_nodes.columns])
def _check_005(self, engine, data):
bm_nodes = get_table(engine, 'bm_nodes')
columns = [c.name for c in bm_nodes.columns]
self.assertNotIn(u'prov_vlan_id', columns)
self.assertNotIn(u'registration_status', columns)