From db558b57973d403db03c799492e0b2dc440ef787 Mon Sep 17 00:00:00 2001 From: Gerrit User 18653 <18653@4a232e18-c5a9-48ee-94c0-e04e7cca6543> Date: Wed, 26 Apr 2017 15:50:24 +0000 Subject: [PATCH] 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 --- a9f03270ce78ea7b09c1784e21a28d2af16db8d5 | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/a9f03270ce78ea7b09c1784e21a28d2af16db8d5 b/a9f03270ce78ea7b09c1784e21a28d2af16db8d5 index 1034715..a084d11 100644 --- a/a9f03270ce78ea7b09c1784e21a28d2af16db8d5 +++ b/a9f03270ce78ea7b09c1784e21a28d2af16db8d5 @@ -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",