Example #1
0
    def testProcessNetworkInterface(self):
        self.mock.StubOutWithMock(api, 'subnet_delete_by_ids')

        api.subnet_delete_by_ids(mox.IgnoreArg(),
                                 mox.IgnoreArg()).MultipleTimes().AndReturn(None)
        self.mock.ReplayAll()
        self.assertEquals(self.LibvirtNetwork._processNetworkInterface(
            libvirt.virLibvirtInterfaceEth0()),
            None)
        host = InventoryCacheManager.get_object_from_cache(
            '1', Constants.VmHost)
        self.assertTrue(host.get_ipAddresses is not None)
        self.mock.stubs.UnsetAll()