~niedbalski/ubuntu/vivid/neutron/fixes-1447803

« back to all changes in this revision

Viewing changes to neutron/tests/unit/nec/test_packet_filter.py

  • Committer: Package Import Robot
  • Author(s): James Page
  • Date: 2014-10-03 18:45:23 UTC
  • mfrom: (1.1.15)
  • Revision ID: package-import@ubuntu.com-20141003184523-4mt6dy1q3j8n30c9
Tags: 1:2014.2~rc1-0ubuntu1
* New upstream release candidate:
  - d/p/*: Refreshed.
  - d/control: Add python-requests-mock to BD's.
  - d/control: Align versioned requirements with upstream.
* Transition linuxbridge and openvswitch plugin users to modular
  layer 2 plugin (LP: #1323729):
  - d/control: Mark removed plugin packages as transitional, depend
    on neutron-plugin-ml2, mark oldlibs/extra.
  - d/neutron-plugin-{linuxbridge,openvswitch}.install: Drop.
  - d/control: Depend on neutron-plugin-ml2 for linuxbridge
    agent package.
  - d/neutron-plugin-linuxbridge-agent.upstart: Use ml2 plugin
    configuration files.

Show diffs side-by-side

added added

removed removed

Lines of Context:
100
100
            yield pf
101
101
            if do_delete:
102
102
                self._delete('packet_filters', pf['packet_filter']['id'])
 
103
            if not network:
 
104
                self._delete('networks', network_to_use['network']['id'])
103
105
 
104
106
    @contextlib.contextmanager
105
107
    def packet_filter_on_port(self, port=None, fmt=None, do_delete=True,
552
554
                   expected_code=webob.exc.HTTPNotFound.code)
553
555
 
554
556
    def test_auto_delete_pf_in_port_deletion(self):
555
 
        with self.port(do_delete=False) as port:
 
557
        with self.port() as port:
556
558
            network = self._show('networks', port['port']['network_id'])
557
559
 
558
560
            with self.packet_filter_on_network(network=network) as pfn: