← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1378756] Re: set_context in L3NatTestCaseMixin.floatingip_with_assoc does not work

 

** Changed in: neutron
       Status: Fix Committed => Fix Released

** Changed in: neutron
    Milestone: None => kilo-1

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to neutron.
https://bugs.launchpad.net/bugs/1378756

Title:
  set_context in L3NatTestCaseMixin.floatingip_with_assoc does not work

Status in OpenStack Neutron (virtual network service):
  Fix Released

Bug description:
  We have following code in
  neutron.test.unit.L3NatTestCaseMixin.floatingip_with_assoc get
  "set_context" from external but not use it.

      @contextlib.contextmanager
      def floatingip_with_assoc(self, port_id=None, fmt=None, fixed_ip=None,

      ######################################
                                set_context=False):                                                 # <---- We get set_context here
      ######################################

          with self.subnet(cidr='11.0.0.0/24') as public_sub:
              self._set_net_external(public_sub['subnet']['network_id'])
              private_port = None
              if port_id:
                  private_port = self._show('ports', port_id)
              with test_db_plugin.optional_ctx(private_port,
                                               self.port) as private_port:
                  with self.router() as r:
                      sid = private_port['port']['fixed_ips'][0]['subnet_id']
                      private_sub = {'subnet': {'id': sid}}
                      floatingip = None

                      self._add_external_gateway_to_router(
                          r['router']['id'],
                          public_sub['subnet']['network_id'])
                      self._router_interface_action(
                          'add', r['router']['id'],
                          private_sub['subnet']['id'], None)

                      floatingip = self._make_floatingip(
                          fmt or self.fmt,
                          public_sub['subnet']['network_id'],
                          port_id=private_port['port']['id'],
                          fixed_ip=fixed_ip,

      ######################################
                          set_context=False)                                                    ### <---- But we don't really use it
      ######################################

                      yield floatingip

To manage notifications about this bug go to:
https://bugs.launchpad.net/neutron/+bug/1378756/+subscriptions


References