Example #1
0
 def test__get_dvr_mac_address_by_host(self):
     with self.ctx.session.begin(subtransactions=True):
         entry = dvr_mac_db.DistributedVirtualRouterMacAddress(
             host='foo_host', mac_address='foo_mac_address')
         self.ctx.session.add(entry)
     result = self.mixin._get_dvr_mac_address_by_host(self.ctx, 'foo_host')
     self.assertEqual(entry, result)
Example #2
0
 def _create_dvr_mac_entry(self, host, mac_address):
     with self.ctx.session.begin(subtransactions=True):
         entry = dvr_mac_db.DistributedVirtualRouterMacAddress(
             host=host, mac_address=mac_address)
         self.ctx.session.add(entry)