get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

GET /api/patches/1551374/
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 1551374,
    "url": "http://patchwork.ozlabs.org/api/patches/1551374/",
    "web_url": "http://patchwork.ozlabs.org/project/ovn/patch/20211105133019.1991280-3-frode.nordahl@canonical.com/",
    "project": {
        "id": 68,
        "url": "http://patchwork.ozlabs.org/api/projects/68/",
        "name": "Open Virtual Network development",
        "link_name": "ovn",
        "list_id": "ovs-dev.openvswitch.org",
        "list_email": "ovs-dev@openvswitch.org",
        "web_url": "http://openvswitch.org/",
        "scm_url": "",
        "webscm_url": "",
        "list_archive_url": "",
        "list_archive_url_format": "",
        "commit_url_format": ""
    },
    "msgid": "<20211105133019.1991280-3-frode.nordahl@canonical.com>",
    "list_archive_url": null,
    "date": "2021-11-05T13:30:17",
    "name": "[ovs-dev,v9,2/4] ovn-controller: Prepare VIF plug provider infrastructure.",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": false,
    "hash": "ebd6a34fea0efefdb76a5b0976cc3fdea6de3a6c",
    "submitter": {
        "id": 77851,
        "url": "http://patchwork.ozlabs.org/api/people/77851/",
        "name": "Frode Nordahl",
        "email": "frode.nordahl@canonical.com"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/ovn/patch/20211105133019.1991280-3-frode.nordahl@canonical.com/mbox/",
    "series": [
        {
            "id": 270562,
            "url": "http://patchwork.ozlabs.org/api/series/270562/",
            "web_url": "http://patchwork.ozlabs.org/project/ovn/list/?series=270562",
            "date": "2021-11-05T13:30:19",
            "name": "Introduce infrastructure for VIF plug providers.",
            "version": 9,
            "mbox": "http://patchwork.ozlabs.org/series/270562/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/1551374/comments/",
    "check": "fail",
    "checks": "http://patchwork.ozlabs.org/api/patches/1551374/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<ovs-dev-bounces@openvswitch.org>",
        "X-Original-To": [
            "incoming@patchwork.ozlabs.org",
            "dev@openvswitch.org"
        ],
        "Delivered-To": [
            "patchwork-incoming@bilbo.ozlabs.org",
            "ovs-dev@lists.linuxfoundation.org"
        ],
        "Authentication-Results": [
            "bilbo.ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n unprotected) header.d=canonical.com header.i=@canonical.com\n header.a=rsa-sha256 header.s=20210705 header.b=EsrEkqhY;\n\tdkim-atps=neutral",
            "ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=openvswitch.org\n (client-ip=2605:bc80:3010::133; helo=smtp2.osuosl.org;\n envelope-from=ovs-dev-bounces@openvswitch.org; receiver=<UNKNOWN>)",
            "smtp3.osuosl.org (amavisd-new);\n dkim=pass (2048-bit key) header.d=canonical.com"
        ],
        "Received": [
            "from smtp2.osuosl.org (smtp2.osuosl.org [IPv6:2605:bc80:3010::133])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest\n SHA256)\n\t(No client certificate requested)\n\tby bilbo.ozlabs.org (Postfix) with ESMTPS id 4Hm1bl3NNmz9sf8\n\tfor <incoming@patchwork.ozlabs.org>; Sat,  6 Nov 2021 00:30:43 +1100 (AEDT)",
            "from localhost (localhost [127.0.0.1])\n\tby smtp2.osuosl.org (Postfix) with ESMTP id 9EACB40498;\n\tFri,  5 Nov 2021 13:30:40 +0000 (UTC)",
            "from smtp2.osuosl.org ([127.0.0.1])\n\tby localhost (smtp2.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)\n\twith ESMTP id LLtgP6gBlc-9; Fri,  5 Nov 2021 13:30:38 +0000 (UTC)",
            "from lists.linuxfoundation.org (lf-lists.osuosl.org\n [IPv6:2605:bc80:3010:104::8cd3:938])\n\tby smtp2.osuosl.org (Postfix) with ESMTPS id 590AF40494;\n\tFri,  5 Nov 2021 13:30:37 +0000 (UTC)",
            "from lf-lists.osuosl.org (localhost [127.0.0.1])\n\tby lists.linuxfoundation.org (Postfix) with ESMTP id C1160C0038;\n\tFri,  5 Nov 2021 13:30:35 +0000 (UTC)",
            "from smtp3.osuosl.org (smtp3.osuosl.org [140.211.166.136])\n by lists.linuxfoundation.org (Postfix) with ESMTP id CF488C0019\n for <dev@openvswitch.org>; Fri,  5 Nov 2021 13:30:33 +0000 (UTC)",
            "from localhost (localhost [127.0.0.1])\n by smtp3.osuosl.org (Postfix) with ESMTP id AF34B6157E\n for <dev@openvswitch.org>; Fri,  5 Nov 2021 13:30:33 +0000 (UTC)",
            "from smtp3.osuosl.org ([127.0.0.1])\n by localhost (smtp3.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)\n with ESMTP id djjdLGXLcW1C for <dev@openvswitch.org>;\n Fri,  5 Nov 2021 13:30:33 +0000 (UTC)",
            "from smtp-relay-canonical-0.canonical.com\n (smtp-relay-canonical-0.canonical.com [185.125.188.120])\n by smtp3.osuosl.org (Postfix) with ESMTPS id EE7BB61577\n for <dev@openvswitch.org>; Fri,  5 Nov 2021 13:30:32 +0000 (UTC)",
            "from frode-threadripper.. (1.general.frode.uk.vpn [10.172.193.250])\n (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest\n SHA256)\n (No client certificate requested)\n by smtp-relay-canonical-0.canonical.com (Postfix) with ESMTPSA id 8FFC43F1E4;\n Fri,  5 Nov 2021 13:30:28 +0000 (UTC)"
        ],
        "X-Virus-Scanned": [
            "amavisd-new at osuosl.org",
            "amavisd-new at osuosl.org"
        ],
        "X-Greylist": "domain auto-whitelisted by SQLgrey-1.8.0",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com;\n s=20210705; t=1636119028;\n bh=WiO4qAVHeDyJrcLKrE+qz39I020drkJ3KpEuRVk7Snk=;\n h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References:\n MIME-Version;\n b=EsrEkqhYruD8TbbLKqEv93CoJVlSBgog+SrwGdfmrjoZN8hVBRyT/cna4BWm6J15d\n lsso3RIxgHGSBB5S4w4HvXG6K+tKa6lnUnHSF5fcu9GoXybBa/znNGaT/gF8s/zhSK\n MrPHAqljk5UdlTm0NYQfERV0vstmnE1Tfv5Dpa0Lu4EDRNswafmNOegCKK5+vFRqpx\n reiVB3u0Ys3N/L4I22HzWFNImqi7x/bLiC+wSnkqYLQGUB9OuKP5ZTX1AkXfyhxg7b\n LY7V0pr2A/jO7PFYAWAOyzIAFBYwCTxJTO95bQYY3Anx4tk7KGIlHSZpHLenZz4LFu\n M6LzX4yVOfhPg==",
        "From": "Frode Nordahl <frode.nordahl@canonical.com>",
        "To": "dev@openvswitch.org",
        "Date": "Fri,  5 Nov 2021 14:30:17 +0100",
        "Message-Id": "<20211105133019.1991280-3-frode.nordahl@canonical.com>",
        "X-Mailer": "git-send-email 2.32.0",
        "In-Reply-To": "<20211105133019.1991280-1-frode.nordahl@canonical.com>",
        "References": "<20211105133019.1991280-1-frode.nordahl@canonical.com>",
        "MIME-Version": "1.0",
        "Subject": "[ovs-dev] [PATCH ovn v9 2/4] ovn-controller: Prepare VIF plug\n\tprovider infrastructure.",
        "X-BeenThere": "ovs-dev@openvswitch.org",
        "X-Mailman-Version": "2.1.15",
        "Precedence": "list",
        "List-Id": "<ovs-dev.openvswitch.org>",
        "List-Unsubscribe": "<https://mail.openvswitch.org/mailman/options/ovs-dev>,\n <mailto:ovs-dev-request@openvswitch.org?subject=unsubscribe>",
        "List-Archive": "<http://mail.openvswitch.org/pipermail/ovs-dev/>",
        "List-Post": "<mailto:ovs-dev@openvswitch.org>",
        "List-Help": "<mailto:ovs-dev-request@openvswitch.org?subject=help>",
        "List-Subscribe": "<https://mail.openvswitch.org/mailman/listinfo/ovs-dev>,\n <mailto:ovs-dev-request@openvswitch.org?subject=subscribe>",
        "Content-Type": "text/plain; charset=\"us-ascii\"",
        "Content-Transfer-Encoding": "7bit",
        "Errors-To": "ovs-dev-bounces@openvswitch.org",
        "Sender": "\"dev\" <ovs-dev-bounces@openvswitch.org>"
    },
    "content": "Add port by interfaces index - To be able to effectively remove\nports previously plugged by us we need to look up ports by\ninterface records.\n\nAdd Port_Binding by requested_chassis index - To be able to\neffectively iterate over ports destined to our chassis we need to\nlook up Port_Binding records by requested_chassis.\n\nAdd `enable-dummy-plug` option - To enable testing of the VIF plug\nprovider infrastructure without building OVN with an external VIF\nplug provider we include a dummy implementation which can be\nenabled using this command line option.\n\nSigned-off-by: Frode Nordahl <frode.nordahl@canonical.com>\n---\n controller/ovn-controller.c | 19 +++++++++++++++++++\n 1 file changed, 19 insertions(+)",
    "diff": "diff --git a/controller/ovn-controller.c b/controller/ovn-controller.c\nindex 4d99da03a..b51997f01 100644\n--- a/controller/ovn-controller.c\n+++ b/controller/ovn-controller.c\n@@ -56,6 +56,8 @@\n #include \"lib/ovn-sb-idl.h\"\n #include \"lib/ovn-util.h\"\n #include \"patch.h\"\n+#include \"vif-plug.h\"\n+#include \"vif-plug-provider.h\"\n #include \"physical.h\"\n #include \"pinctrl.h\"\n #include \"openvswitch/poll-loop.h\"\n@@ -3082,11 +3084,17 @@ main(int argc, char *argv[])\n     patch_init();\n     pinctrl_init();\n     lflow_init();\n+    vif_plug_provider_initialize();\n \n     /* Connect to OVS OVSDB instance. */\n     struct ovsdb_idl_loop ovs_idl_loop = OVSDB_IDL_LOOP_INITIALIZER(\n         ovsdb_idl_create(ovs_remote, &ovsrec_idl_class, false, true));\n     ctrl_register_ovs_idl(ovs_idl_loop.idl);\n+\n+    struct ovsdb_idl_index *ovsrec_port_by_interfaces\n+        = ovsdb_idl_index_create1(ovs_idl_loop.idl,\n+                                  &ovsrec_port_col_interfaces);\n+\n     ovsdb_idl_get_initial_snapshot(ovs_idl_loop.idl);\n \n     /* Configure OVN SB database. */\n@@ -3122,6 +3130,9 @@ main(int argc, char *argv[])\n     struct ovsdb_idl_index *sbrec_port_binding_by_type\n         = ovsdb_idl_index_create1(ovnsb_idl_loop.idl,\n                                   &sbrec_port_binding_col_type);\n+    struct ovsdb_idl_index *sbrec_port_binding_by_requested_chassis\n+        = ovsdb_idl_index_create1(ovnsb_idl_loop.idl,\n+                                  &sbrec_port_binding_col_requested_chassis);\n     struct ovsdb_idl_index *sbrec_datapath_binding_by_key\n         = ovsdb_idl_index_create1(ovnsb_idl_loop.idl,\n                                   &sbrec_datapath_binding_col_tunnel_key);\n@@ -3879,6 +3890,7 @@ loop_done:\n     pinctrl_destroy();\n     patch_destroy();\n     if_status_mgr_destroy(if_mgr);\n+    vif_plug_provider_destroy_all();\n \n     ovsdb_idl_loop_destroy(&ovs_idl_loop);\n     ovsdb_idl_loop_destroy(&ovnsb_idl_loop);\n@@ -3899,6 +3911,7 @@ parse_options(int argc, char *argv[])\n         VLOG_OPTION_ENUMS,\n         OVN_DAEMON_OPTION_ENUMS,\n         SSL_OPTION_ENUMS,\n+        OPT_ENABLE_DUMMY_VIF_PLUG,\n     };\n \n     static struct option long_options[] = {\n@@ -3909,6 +3922,8 @@ parse_options(int argc, char *argv[])\n         STREAM_SSL_LONG_OPTIONS,\n         {\"peer-ca-cert\", required_argument, NULL, OPT_PEER_CA_CERT},\n         {\"bootstrap-ca-cert\", required_argument, NULL, OPT_BOOTSTRAP_CA_CERT},\n+        {\"enable-dummy-vif-plug\", no_argument, NULL,\n+         OPT_ENABLE_DUMMY_VIF_PLUG},\n         {NULL, 0, NULL, 0}\n     };\n     char *short_options = ovs_cmdl_long_options_to_short_options(long_options);\n@@ -3954,6 +3969,10 @@ parse_options(int argc, char *argv[])\n             stream_ssl_set_ca_cert_file(optarg, true);\n             break;\n \n+        case OPT_ENABLE_DUMMY_VIF_PLUG:\n+            vif_plug_dummy_enable();\n+            break;\n+\n         case '?':\n             exit(EXIT_FAILURE);\n \n",
    "prefixes": [
        "ovs-dev",
        "v9",
        "2/4"
    ]
}