get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 787921,
    "url": "http://patchwork.ozlabs.org/api/patches/787921/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/openvswitch/patch/1499965361-32021-2-git-send-email-majopela@redhat.com/",
    "project": {
        "id": 47,
        "url": "http://patchwork.ozlabs.org/api/projects/47/?format=api",
        "name": "Open vSwitch",
        "link_name": "openvswitch",
        "list_id": "ovs-dev.openvswitch.org",
        "list_email": "ovs-dev@openvswitch.org",
        "web_url": "http://openvswitch.org/",
        "scm_url": "git@github.com:openvswitch/ovs.git",
        "webscm_url": "https://github.com/openvswitch/ovs",
        "list_archive_url": "",
        "list_archive_url_format": "",
        "commit_url_format": ""
    },
    "msgid": "<1499965361-32021-2-git-send-email-majopela@redhat.com>",
    "list_archive_url": null,
    "date": "2017-07-13T17:02:35",
    "name": "[ovs-dev,v5,2/8] ovn: l3ha, NBDB and SBDB changes and documentation",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": false,
    "hash": "8a4ed62d79bb5ba1483be89c5a0dcb67df982e30",
    "submitter": {
        "id": 67170,
        "url": "http://patchwork.ozlabs.org/api/people/67170/?format=api",
        "name": "Miguel Angel Ajo",
        "email": "majopela@redhat.com"
    },
    "delegate": {
        "id": 55721,
        "url": "http://patchwork.ozlabs.org/api/users/55721/?format=api",
        "username": "russellb",
        "first_name": "Russell",
        "last_name": "Bryant",
        "email": "rbryant@redhat.com"
    },
    "mbox": "http://patchwork.ozlabs.org/project/openvswitch/patch/1499965361-32021-2-git-send-email-majopela@redhat.com/mbox/",
    "series": [],
    "comments": "http://patchwork.ozlabs.org/api/patches/787921/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/787921/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@mail.linuxfoundation.org"
        ],
        "Received": [
            "from mail.linuxfoundation.org (mail.linuxfoundation.org\n\t[140.211.169.12])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256\n\tbits)) (No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3x7hwV62jdz9t2S\n\tfor <incoming@patchwork.ozlabs.org>;\n\tFri, 14 Jul 2017 03:03:22 +1000 (AEST)",
            "from mail.linux-foundation.org (localhost [127.0.0.1])\n\tby mail.linuxfoundation.org (Postfix) with ESMTP id 70082B69;\n\tThu, 13 Jul 2017 17:02:50 +0000 (UTC)",
            "from smtp1.linuxfoundation.org (smtp1.linux-foundation.org\n\t[172.17.192.35])\n\tby mail.linuxfoundation.org (Postfix) with ESMTPS id F1959B59\n\tfor <dev@openvswitch.org>; Thu, 13 Jul 2017 17:02:49 +0000 (UTC)",
            "from mail-wm0-f48.google.com (mail-wm0-f48.google.com\n\t[74.125.82.48])\n\tby smtp1.linuxfoundation.org (Postfix) with ESMTPS id C8718CD\n\tfor <dev@openvswitch.org>; Thu, 13 Jul 2017 17:02:48 +0000 (UTC)",
            "by mail-wm0-f48.google.com with SMTP id 70so5027529wmo.1\n\tfor <dev@openvswitch.org>; Thu, 13 Jul 2017 10:02:48 -0700 (PDT)",
            "from ctl.localdomain (111.148.134.37.dynamic.jazztel.es.\n\t[37.134.148.111]) by smtp.gmail.com with ESMTPSA id\n\t46sm7134176wrz.8.2017.07.13.10.02.45\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\n\tThu, 13 Jul 2017 10:02:45 -0700 (PDT)"
        ],
        "X-Greylist": "whitelisted by SQLgrey-1.7.6",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to\n\t:references;\n\tbh=j8eclqwqFyR7UShrUx6PelKO0pudyum5FYBJEXpHFnA=;\n\tb=KRKETXszntXaz2U1f2jnehJdDcetnvdDZwfhETs8Arg/yOocInA7PMiry+URoSk+r0\n\tV1VdbZSEA9+iTlSA+bDer6ApwJh8kzxA6/AspA8ur7lRtvznBecWKDwNRRWYK0/Yru/X\n\tUDm8PlDxGZpRTkoTbnpvOkFfHeyB9owyoFqxzedniNOOQPpCSk+oUKnw+3dfcdFwDDLc\n\tKFDYL2pQj/RiAg8GOPR7AkOQEbOH1TXGElh4AattfFEKX5eqNmQRBQrD6xq7lK7Prx/Y\n\t8QlY+heBx4+H6QX3jDNFVdS+Xdu5O2By+9SVDE060ssX6T1vfe5sEGPKdzuqIBIa6ywY\n\tAWUw==",
        "X-Gm-Message-State": "AIVw112e8Eu7CY6DF2eKMkNLWq1MlypiTHlxEH1lAKiuVx0sAjEOeJ0T\n\tmG1bsF8uVplxMslSvIL8PA==",
        "X-Received": "by 10.28.223.86 with SMTP id w83mr2875553wmg.9.1499965366855;\n\tThu, 13 Jul 2017 10:02:46 -0700 (PDT)",
        "From": "Miguel Angel Ajo <majopela@redhat.com>",
        "To": "dev@openvswitch.org",
        "Date": "Thu, 13 Jul 2017 17:02:35 +0000",
        "Message-Id": "<1499965361-32021-2-git-send-email-majopela@redhat.com>",
        "X-Mailer": "git-send-email 1.8.3.1",
        "In-Reply-To": "<1499965361-32021-1-git-send-email-majopela@redhat.com>",
        "References": "<1496930708-15441-1-git-send-email-majopela@redhat.com>\n\t<1499965361-32021-1-git-send-email-majopela@redhat.com>",
        "X-Spam-Status": "No, score=-1.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_NONE\n\tautolearn=ham version=3.3.1",
        "X-Spam-Checker-Version": "SpamAssassin 3.3.1 (2010-03-16) on\n\tsmtp1.linux-foundation.org",
        "Cc": "\"majopela@redhat.com\" <majopela@redhat.com>",
        "Subject": "[ovs-dev] [PATCH v5 2/8] ovn: l3ha,\n\tNBDB and SBDB changes and documentation",
        "X-BeenThere": "ovs-dev@openvswitch.org",
        "X-Mailman-Version": "2.1.12",
        "Precedence": "list",
        "List-Id": "<ovs-dev.openvswitch.org>",
        "List-Unsubscribe": "<https://mail.openvswitch.org/mailman/options/ovs-dev>,\n\t<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\t<mailto:ovs-dev-request@openvswitch.org?subject=subscribe>",
        "MIME-Version": "1.0",
        "Content-Type": "text/plain; charset=\"us-ascii\"",
        "Content-Transfer-Encoding": "7bit",
        "Sender": "ovs-dev-bounces@openvswitch.org",
        "Errors-To": "ovs-dev-bounces@openvswitch.org"
    },
    "content": "From: \"majopela@redhat.com\" <majopela@redhat.com>\n\nThis commit introduces the north and south db changes necessary for\nthe l3ha router implementation.\n\nIt defines a new Table in both NBDB and SBDB.\n\nThe Gateway_Chassis table is created, with a tiny difference between\nNBDB and SBDB, NBDB references the chassis via it's name (chassis_name)\nand SBDB references the chassis via reference (chassis) to the Chassis table.\n\nIn NBDB a new column (gateway_chassis) is added to Logical_Router_Ports\nwith a list of Gateway_Chassis which can be empty.\n\nIn SBDB a new column (gateway_chassis) is added to Port_Binding with\nthe same list, this column will be used for ports of type chassis-redirect.\n\nBump minor version since we've added new backwards compatible features.\n\nCo-authored-by: Russell Bryant <russell@ovn.org>\nSigned-off-by: Miguel Angel Ajo <majopela@redhat.com>\nSigned-off-by: Russell Bryant <russell@ovn.org>\n---\n ovn/ovn-nb.ovsschema | 28 +++++++++++++++--\n ovn/ovn-nb.xml       | 88 +++++++++++++++++++++++++++++++++++++++++++++++++++-\n ovn/ovn-sb.ovsschema | 30 ++++++++++++++++--\n ovn/ovn-sb.xml       | 51 ++++++++++++++++++++++++++++++\n 4 files changed, 190 insertions(+), 7 deletions(-)",
    "diff": "diff --git a/ovn/ovn-nb.ovsschema b/ovn/ovn-nb.ovsschema\nindex c6a1417..d85a3fe 100644\n--- a/ovn/ovn-nb.ovsschema\n+++ b/ovn/ovn-nb.ovsschema\n@@ -1,7 +1,7 @@\n {\n     \"name\": \"OVN_Northbound\",\n-    \"version\": \"5.6.0\",\n-    \"cksum\": \"2552205612 15123\",\n+    \"version\": \"5.7.0\",\n+    \"cksum\": \"3754583060 16164\",\n     \"tables\": {\n         \"NB_Global\": {\n             \"columns\": {\n@@ -196,6 +196,12 @@\n         \"Logical_Router_Port\": {\n             \"columns\": {\n                 \"name\": {\"type\": \"string\"},\n+                \"gateway_chassis\": {\n+                    \"type\": {\"key\": {\"type\": \"uuid\",\n+                                     \"refTable\": \"Gateway_Chassis\",\n+                                     \"refType\": \"strong\"},\n+                             \"min\": 0,\n+                             \"max\": \"unlimited\"}},\n                 \"options\": {\n                     \"type\": {\"key\": \"string\",\n                              \"value\": \"string\",\n@@ -293,4 +299,20 @@\n                                           \"value\": \"string\",\n                                           \"min\": 0,\n                                           \"max\": \"unlimited\"}}},\n-            \"maxRows\": 1}}}\n+            \"maxRows\": 1},\n+        \"Gateway_Chassis\": {\n+            \"columns\": {\n+                \"name\": {\"type\": \"string\"},\n+                \"chassis_name\": {\"type\": \"string\"},\n+                \"priority\": {\"type\": {\"key\": {\"type\": \"integer\",\n+                                              \"minInteger\": 0,\n+                                              \"maxInteger\": 32767}}},\n+                \"external_ids\": {\n+                    \"type\": {\"key\": \"string\", \"value\": \"string\",\n+                             \"min\": 0, \"max\": \"unlimited\"}},\n+                \"options\": {\n+                    \"type\": {\"key\": \"string\", \"value\": \"string\",\n+                             \"min\": 0, \"max\": \"unlimited\"}}},\n+            \"indexes\": [[\"name\"]],\n+            \"isRoot\": false}}\n+    }\ndiff --git a/ovn/ovn-nb.xml b/ovn/ovn-nb.xml\nindex 32c10c1..1e73465 100644\n--- a/ovn/ovn-nb.xml\n+++ b/ovn/ovn-nb.xml\n@@ -179,7 +179,7 @@\n       <column name=\"other_config\" key=\"subnet\">\n         Set this to an IPv4 subnet, e.g. <code>192.168.0.0/24</code>, to enable\n         <code>ovn-northd</code> to automatically assign IP addresses within\n-        that subnet.  \n+        that subnet.\n       </column>\n \n       <column name=\"other_config\" key=\"exclude_ips\">\n@@ -1250,6 +1250,34 @@\n       </p>\n     </column>\n \n+    <column name=\"gateway_chassis\">\n+      <p>\n+        If set, this indicates that this logical router port represents\n+        a distributed gateway port that connects this router to a logical\n+        switch with a localnet port.  There may be at most one such\n+        logical router port on each logical router.\n+      </p>\n+\n+      <p>\n+        Several <ref table=\"Gateway_Chassis\"/> can be referenced for a given\n+        logical router port.  A single <ref table=\"Gateway_Chassis\"/> is\n+        functionally equivalent to setting\n+        <ref column=\"options\" key=\"redirect-chassis\"/>.  Refer to the\n+        description of <ref column=\"options\" key=\"redirect-chassis\"/>\n+        for additional details on gateway handling.\n+      </p>\n+\n+      <p>\n+        Defining more than one <ref table=\"Gateway_Chassis\"/> will enable\n+        gateway high availability.  Only one gateway will be active at a\n+        time.  OVN chassis will use BFD to monitor connectivity to a\n+        gateway.  If connectivity to the active gateway is interrupted,\n+        another gateway will become active.\n+        The <ref column=\"priority\" table=\"Gateway_Chassis\"/> column\n+        specifies the order that gateways will be chosen by OVN.\n+      </p>\n+    </column>\n+\n     <column name=\"networks\">\n       <p>\n         The IP addresses and netmasks of the router.  For example,\n@@ -1319,6 +1347,14 @@\n           table=\"Logical_Switch_Port\"/> should be set to\n           <code>router</code>.\n         </p>\n+\n+        <p>\n+          While <ref column=\"options\" key=\"redirect-chassis\"/> is still\n+          supported for backwards compatibility, it is now preferred to\n+          specify one or more <ref column=\"gateway_chassis\"/> instead.\n+          It is functionally equivalent, but allows you to specify multiple\n+          chassis to enable high availability.\n+        </p>\n       </column>\n     </group>\n \n@@ -2111,4 +2147,54 @@\n       <column name=\"external_ids\"/>\n     </group>\n   </table>\n+  <table name=\"Gateway_Chassis\">\n+    <p>\n+      Association of one or more chassis to a logical router port. The traffic\n+      going out through an specific router port will be redirected to a\n+      chassis, or a set of them in high availability configurations.\n+      A single <ref table=\"Gateway_Chassis\"/> is equivalent to setting\n+      <ref column=\"options\" key=\"redirect-chassis\"/>.  Using\n+      <ref table=\"Gateway_Chassis\"/> allows associating multiple prioritized\n+      chassis with a single logical router port.\n+    </p>\n+\n+    <column name=\"name\">\n+      <p>\n+        Name of the <ref table=\"Gateway_Chassis\"/>.\n+      </p>\n+      <p>\n+        A suggested, but not required naming convention is\n+        <code>${port_name}_${chassis_name}</code>.\n+      </p>\n+    </column>\n+\n+    <column name=\"chassis_name\">\n+      <p>\n+        Name of the chassis that we want to redirect traffic through for the\n+        associated logical router port.  The value must match the\n+        <ref db=\"OVN_Southbound\" table=\"Chassis\" column=\"name\"/> column\n+        of the <ref db=\"OVN_Southbound\" table=\"Chassis\"/> table in the\n+        <ref db=\"OVN_Southbound\"/> database.\n+      </p>\n+    </column>\n+\n+    <column name=\"priority\">\n+      <p>\n+        This is the priority of a chassis among all\n+        <ref table=\"Gateway_Chassis\"/> belonging to the same logical router\n+        port.\n+      </p>\n+    </column>\n+\n+    <column name=\"options\">\n+      Reserved for future use.\n+    </column>\n+\n+    <group title=\"Common Columns\">\n+      <column name=\"external_ids\">\n+        See <em>External IDs</em> at the beginning of this document.\n+      </column>\n+    </group>\n+  </table>\n+\n </database>\ndiff --git a/ovn/ovn-sb.ovsschema b/ovn/ovn-sb.ovsschema\nindex 8a68e7c..2643640 100644\n--- a/ovn/ovn-sb.ovsschema\n+++ b/ovn/ovn-sb.ovsschema\n@@ -1,7 +1,7 @@\n {\n     \"name\": \"OVN_Southbound\",\n-    \"version\": \"1.13.0\",\n-    \"cksum\": \"3451836240 12038\",\n+    \"version\": \"1.14.0\",\n+    \"cksum\": \"3613553908 13275\",\n     \"tables\": {\n         \"SB_Global\": {\n             \"columns\": {\n@@ -104,6 +104,12 @@\n             \"columns\": {\n                 \"logical_port\": {\"type\": \"string\"},\n                 \"type\": {\"type\": \"string\"},\n+                \"gateway_chassis\": {\n+                    \"type\": {\"key\": {\"type\": \"uuid\",\n+                                     \"refTable\": \"Gateway_Chassis\",\n+                                     \"refType\": \"strong\"},\n+                             \"min\": 0,\n+                             \"max\": \"unlimited\"}},\n                 \"options\": {\n                      \"type\": {\"key\": \"string\",\n                               \"value\": \"string\",\n@@ -244,4 +250,22 @@\n                 \"update\" : {\"type\": {\"key\": \"string\",\n                                      \"min\": 0,\n                                      \"max\": \"unlimited\"}}},\n-            \"isRoot\": true}}}\n+            \"isRoot\": true},\n+        \"Gateway_Chassis\": {\n+            \"columns\": {\n+                \"name\": {\"type\": \"string\"},\n+                \"chassis\": {\"type\": {\"key\": {\"type\": \"uuid\",\n+                                             \"refTable\": \"Chassis\",\n+                                             \"refType\": \"weak\"},\n+                                     \"min\": 0, \"max\": 1}},\n+                \"priority\": {\"type\": {\"key\": {\"type\": \"integer\",\n+                                              \"minInteger\": 0,\n+                                              \"maxInteger\": 32767}}},\n+                \"external_ids\": {\n+                    \"type\": {\"key\": \"string\", \"value\": \"string\",\n+                             \"min\": 0, \"max\": \"unlimited\"}},\n+                \"options\": {\n+                    \"type\": {\"key\": \"string\", \"value\": \"string\",\n+                             \"min\": 0, \"max\": \"unlimited\"}}},\n+            \"indexes\": [[\"name\"]],\n+            \"isRoot\": false}}}\ndiff --git a/ovn/ovn-sb.xml b/ovn/ovn-sb.xml\nindex b22d1ac..c1731d2 100644\n--- a/ovn/ovn-sb.xml\n+++ b/ovn/ovn-sb.xml\n@@ -1837,6 +1837,18 @@ tcp.flags = RST;\n \n       </column>\n \n+      <column name=\"gateway_chassis\">\n+        <p>\n+          A list of <ref table=\"Gateway_Chassis\"/>.\n+        </p>\n+        <p>\n+          This should only be populated for ports with\n+          <ref column=\"type\"/> set to <code>chassisredirect</code>.\n+          This column defines the list of chassis used as gateways where\n+          traffic will be redirected through.\n+        </p>\n+      </column>\n+\n       <column name=\"tunnel_key\">\n         <p>\n           A number that represents the logical port in the key (e.g. STT key or\n@@ -2883,4 +2895,43 @@ tcp.flags = RST;\n         clients are allowed to modify.\n     </column>\n   </table>\n+  <table name=\"Gateway_Chassis\">\n+    <p>\n+      Association of <ref table=\"Port_Binding\"/> rows of\n+      <ref table=\"Port_Binding\" column=\"type\"/> <code>chassisredirect</code> to\n+      a <ref table=\"Chassis\"/>. The traffic going out through a specific\n+      <code>chassisredirect</code> port will be redirected to a chassis,\n+      or a set of them in high availability configurations.\n+    </p>\n+\n+    <column name=\"name\">\n+      <p>\n+        Name of the <ref table=\"Gateway_Chassis\"/>.\n+      </p>\n+      <p>\n+        A suggested, but not required naming convention is\n+        <code>${port_name}_${chassis_name}</code>.\n+      </p>\n+    </column>\n+\n+    <column name=\"chassis\">\n+      The <ref table=\"Chassis\"/> to which we send the traffic.\n+    </column>\n+\n+    <column name=\"priority\">\n+      This is the priority the specific <ref table=\"Chassis\"/> among all\n+      Gateway_Chassis belonging to the same <ref table=\"Port_Binding\"/>.\n+    </column>\n+\n+    <column name=\"options\">\n+      Reserved for future use.\n+    </column>\n+\n+    <group title=\"Common Columns\">\n+      The overall purpose of these columns is described under <code>Common\n+      Columns</code> at the beginning of this document.\n+\n+      <column name=\"external_ids\"/>\n+    </group>\n+  </table>\n </database>\n",
    "prefixes": [
        "ovs-dev",
        "v5",
        "2/8"
    ]
}