← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1373756] Re: Unique check in allowed address pair's extension not work well

 

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

** Changed in: neutron
    Milestone: None => liberty-2

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

Title:
  Unique check in allowed address pair's extension not work well

Status in neutron:
  Fix Released

Bug description:
  Test this case:

  Assume a port's mac_address is 12:34:56:78:aa:bb

  Then put these to allowed address pair:
  [{"ip_address": "10.0.0.1"},
   {"ip_address": "10.0.0.1",
     "mac_address": "12:34:56:78:aa:bb"}]

  This can pass in extension's validator, but will cause error in db, for mac_address is None in extension, but conver to
  port's real mac_address in db.

  Unit test code:

      def test_update_add_none_and_own_mac_address_pairs(self):
          with self.network() as net:
              res = self._create_port(self.fmt, net['network']['id'])
              port = self.deserialize(self.fmt, res)
              mac_address = port['port']['mac_address']
              address_pairs = [{'ip_address': '10.0.0.1'},
                               {'mac_address': mac_address,
                                'ip_address': '10.0.0.1'}]
              update_port = {'port': {addr_pair.ADDRESS_PAIRS:
                                      address_pairs}}
              req = self.new_update_request('ports', update_port,
                                            port['port']['id'])
              res = req.get_response(self.api)
              self.assertEqual(res.status_int, 400)
              self._delete('ports', port['port']['id'])

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


References