示例#1
0
 def test_ensure_path_deleted_for_port_host_config(self):
     self.mgr.apic.fvRsPathAtt.delete = mock.Mock()
     self.mgr.ensure_path_deleted_for_port('tenant',
                                           'network',
                                           'ubuntu2',
                                           host_config=mocked.FakeQuery(
                                               ('switch', 'module',
                                                'port')))
     self.mgr.apic.fvRsPathAtt.delete.assert_called_once_with(
         'tenant',
         self.mgr.app_profile_name,
         'network',
         apic_manager.PORT_DN_PATH % ('switch', 'module', 'port'),
         transaction=mock.ANY)
示例#2
0
 def _mock_get_switch_and_port_for_host(self):
     self.mock_db_query_filterby_distinct_return(
         mocked.FakeQuery(('swid', 'mod', 'port')))