Update patch set 2

Patch Set 2:

(1 comment)

Hey Anton!

Thanks for the review!
Please, see my explanation inline.

Cheers,
milan

Patch-set: 2
This commit is contained in:
Gerrit User 18653 2017-04-26 15:50:24 +00:00 committed by Gerrit Code Review
parent 5f5747a3a5
commit db558b5797
1 changed files with 18 additions and 0 deletions

View File

@ -106,6 +106,24 @@
"serverId": "4a232e18-c5a9-48ee-94c0-e04e7cca6543",
"unresolved": false
},
{
"key": {
"uuid": "5ff73747_81cb8870",
"filename": "specs/multiple-pxe-filtering-backends.rst",
"patchSetId": 2
},
"lineNbr": 87,
"author": {
"id": 18653
},
"writtenOn": "2017-04-26T15:50:24Z",
"side": 1,
"message": "I thought if there was a driver that didn\u0027t require blacklist it might override the generic method. Also if the criteria is more specific w/ a custom driver the implementation might override.\n\nThe generic methods would just do this:\n\n def get_whitelist(ports):\n active_macs \u003d node_cache.get_active_macs()\n return [port for port in ports\n if port.address in active_macs]\n\n def get_blacklist(ports):\n active_macs \u003d node_cache.get_active_macs()\n return [port for port in ports\n if port.address not in active_macs]\n\nSince this seems sufficient for neutron, iptables \u0026 dnsmasq I thought it would be OK to have it in the generic part.\n\nIn total then:\n\n def sync(self, ironic\u003dNone):\n ports \u003d self.get_ironic_ports(ironic\u003dironic)\n whitelist \u003d self.get_whitelist(ports)\n blacklist \u003d self.get_blacklist(ports)\n self.update_filter(blacklist, whitelist)\n\nThe driver implements the specific part: update_filter.\ninspector uses the sync \u0026 get_periodic_task internally.",
"parentUuid": "5ff73747_9b7779d5",
"revId": "a9f03270ce78ea7b09c1784e21a28d2af16db8d5",
"serverId": "4a232e18-c5a9-48ee-94c0-e04e7cca6543",
"unresolved": false
},
{
"key": {
"uuid": "5ff73747_9149a3d1",