def _remove_networks(nets2remove, ovs_info, config): logging.debug('Removing networks: %s', list(nets2remove)) net_rem_setup = ovs_switch.NetsRemovalSetup(ovs_info) net_rem_setup.prepare_setup(nets2remove) net_rem_setup.commit_setup() for net, attrs in six.iteritems(nets2remove): config.removeNetwork(net)
def test_dry_run(self): ovs_info = MockedOvsInfo() net_rem_setup = ovs_switch.NetsRemovalSetup(self.ovsdb, ovs_info) net_rem_setup.remove({}) net_add_setup = ovs_switch.NetsAdditionSetup(self.ovsdb, ovs_info) with net_add_setup.add({}): pass
def test_dry_run(self): ovs_info = MockedOvsInfo() net_rem_setup = ovs_switch.NetsRemovalSetup(ovs_info) net_rem_setup.prepare_setup({}) net_rem_setup.commit_setup() net_add_setup = ovs_switch.NetsAdditionSetup(ovs_info) net_add_setup.prepare_setup({}) net_add_setup.commit_setup()