get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 124102,
    "url": "https://patches.dpdk.org/api/patches/124102/?format=api",
    "web_url": "https://patches.dpdk.org/project/dts/patch/20230217122023.2345221-2-songx.jiale@intel.com/",
    "project": {
        "id": 3,
        "url": "https://patches.dpdk.org/api/projects/3/?format=api",
        "name": "DTS",
        "link_name": "dts",
        "list_id": "dts.dpdk.org",
        "list_email": "dts@dpdk.org",
        "web_url": "",
        "scm_url": "git://dpdk.org/tools/dts",
        "webscm_url": "http://git.dpdk.org/tools/dts/",
        "list_archive_url": "https://inbox.dpdk.org/dts",
        "list_archive_url_format": "https://inbox.dpdk.org/dts/{}",
        "commit_url_format": ""
    },
    "msgid": "<20230217122023.2345221-2-songx.jiale@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dts/20230217122023.2345221-2-songx.jiale@intel.com",
    "date": "2023-02-17T12:20:19",
    "name": "[V2,1/5] tests/bonding: modify script to adapt changes in dpdk",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": false,
    "hash": "96435c54ed638106ad33489a994a9ad034ef5d46",
    "submitter": {
        "id": 2352,
        "url": "https://patches.dpdk.org/api/people/2352/?format=api",
        "name": "Jiale, SongX",
        "email": "songx.jiale@intel.com"
    },
    "delegate": null,
    "mbox": "https://patches.dpdk.org/project/dts/patch/20230217122023.2345221-2-songx.jiale@intel.com/mbox/",
    "series": [
        {
            "id": 27055,
            "url": "https://patches.dpdk.org/api/series/27055/?format=api",
            "web_url": "https://patches.dpdk.org/project/dts/list/?series=27055",
            "date": "2023-02-17T12:20:18",
            "name": "modify script to adapt changes in dpdk",
            "version": 2,
            "mbox": "https://patches.dpdk.org/series/27055/mbox/"
        }
    ],
    "comments": "https://patches.dpdk.org/api/patches/124102/comments/",
    "check": "pending",
    "checks": "https://patches.dpdk.org/api/patches/124102/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<dts-bounces@dpdk.org>",
        "X-Original-To": "patchwork@inbox.dpdk.org",
        "Delivered-To": "patchwork@inbox.dpdk.org",
        "Received": [
            "from mails.dpdk.org (mails.dpdk.org [217.70.189.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id B60FD41CB9;\n\tFri, 17 Feb 2023 05:23:17 +0100 (CET)",
            "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id AD83640F18;\n\tFri, 17 Feb 2023 05:23:17 +0100 (CET)",
            "from mga01.intel.com (mga01.intel.com [192.55.52.88])\n by mails.dpdk.org (Postfix) with ESMTP id 5338440A8B\n for <dts@dpdk.org>; Fri, 17 Feb 2023 05:23:15 +0100 (CET)",
            "from orsmga007.jf.intel.com ([10.7.209.58])\n by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 16 Feb 2023 20:23:14 -0800",
            "from unknown (HELO localhost.localdomain) ([10.239.252.20])\n by orsmga007-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 16 Feb 2023 20:23:13 -0800"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple;\n d=intel.com; i=@intel.com; q=dns/txt; s=Intel;\n t=1676607795; x=1708143795;\n h=from:to:cc:subject:date:message-id:in-reply-to:\n references:mime-version:content-transfer-encoding;\n bh=n6n9hRRm43CXH+bBGY6Mb6wDOmgSYS40tWLrS+Xu22c=;\n b=lq8CkOKWFc0cHDYwff0LiPDa4o6BDM9Gr8HEIogTMLsORo9IvAw5+l6T\n ldY8gT8UIZbeTYMpEO0jHFuV9+I6TsOWEYVO3Z9ZNQl1iZJRN3Wt3Y8at\n d6yi2NbDymi5YK0PPMSQltU5Mv0g0OCniN/lJXZi9YSg0JJIf6Mki32fN\n vTk2zfzvGMNwD9SybcqqLqP7VmKJJbbtd83yo2gidV6dx4IF4BpvPX3oA\n oFY3DjuvLbH+rkY27EKIT4RQF7QWyYOoyGseYxPyVwrEbMvAeqpluN7Ct\n jVL4MHRyIXsvexYd/rnkxOwQYqyKo8b/wpqX4+f/6UWEhC3OplsyqzP9q w==;",
        "X-IronPort-AV": [
            "E=McAfee;i=\"6500,9779,10623\"; a=\"359353883\"",
            "E=Sophos;i=\"5.97,304,1669104000\"; d=\"scan'208\";a=\"359353883\"",
            "E=McAfee;i=\"6500,9779,10623\"; a=\"663757836\"",
            "E=Sophos;i=\"5.97,304,1669104000\"; d=\"scan'208\";a=\"663757836\""
        ],
        "From": "Song Jiale <songx.jiale@intel.com>",
        "To": "dts@dpdk.org",
        "Cc": "Song Jiale <songx.jiale@intel.com>",
        "Subject": "[dts] [PATCH V2 1/5] tests/bonding: modify script to adapt changes in\n dpdk",
        "Date": "Fri, 17 Feb 2023 12:20:19 +0000",
        "Message-Id": "<20230217122023.2345221-2-songx.jiale@intel.com>",
        "X-Mailer": "git-send-email 2.25.1",
        "In-Reply-To": "<20230217122023.2345221-1-songx.jiale@intel.com>",
        "References": "<20230217122023.2345221-1-songx.jiale@intel.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "X-BeenThere": "dts@dpdk.org",
        "X-Mailman-Version": "2.1.29",
        "Precedence": "list",
        "List-Id": "test suite reviews and discussions <dts.dpdk.org>",
        "List-Unsubscribe": "<https://mails.dpdk.org/options/dts>,\n <mailto:dts-request@dpdk.org?subject=unsubscribe>",
        "List-Archive": "<http://mails.dpdk.org/archives/dts/>",
        "List-Post": "<mailto:dts@dpdk.org>",
        "List-Help": "<mailto:dts-request@dpdk.org?subject=help>",
        "List-Subscribe": "<https://mails.dpdk.org/listinfo/dts>,\n <mailto:dts-request@dpdk.org?subject=subscribe>",
        "Errors-To": "dts-bounces@dpdk.org"
    },
    "content": "the display information of the binding port in dpdk-testpmd has changed.\nmodify the script to adapt to this change.\n\nAccording to dpdk commit f3b5f3d35c59e1(\"app/testpmd: use dump API to show bonding info\").\n\nSigned-off-by: Song Jiale <songx.jiale@intel.com>\n---\n tests/bonding.py | 36 +++++++++++++++++++-----------------\n 1 file changed, 19 insertions(+), 17 deletions(-)",
    "diff": "diff --git a/tests/bonding.py b/tests/bonding.py\nindex 30f55c7f..c2c13b2a 100644\n--- a/tests/bonding.py\n+++ b/tests/bonding.py\n@@ -19,13 +19,13 @@ from framework.pmd_output import PmdOutput\n from framework.settings import HEADER_SIZE\n \n # define bonding mode\n-MODE_ROUND_ROBIN = 0\n-MODE_ACTIVE_BACKUP = 1\n-MODE_XOR_BALANCE = 2\n-MODE_BROADCAST = 3\n-MODE_LACP = 4\n-MODE_TLB_BALANCE = 5\n-MODE_ALB_BALANCE = 6\n+MODE_ROUND_ROBIN = \"ROUND_ROBIN(0)\"\n+MODE_ACTIVE_BACKUP = \"ACTIVE_BACKUP(1)\"\n+MODE_XOR_BALANCE = \"BALANCE(2)\"\n+MODE_BROADCAST = \"BROADCAST(3)\"\n+MODE_LACP = \"8023AD(4)\"\n+MODE_TLB_BALANCE = \"TLB(5)\"\n+MODE_ALB_BALANCE = \"ALB(6)\"\n \n # define packet size\n FRAME_SIZE_64 = 64\n@@ -643,7 +643,7 @@ class PmdBonding(object):\n     def get_bonding_info(self, bond_port, info_types):\n         \"\"\"Get the specified port information by its output message format\"\"\"\n         info_set = {\n-            \"mode\": [\"Bonding mode: \", \"\\d*\"],\n+            \"mode\": [\"Bonding mode: \", \"\\S*\"],\n             \"agg_mode\": [\"IEEE802.3AD Aggregator Mode: \", \"\\S*\"],\n             \"balance_policy\": [\"Balance Xmit Policy: \", \"\\S+\"],\n             \"slaves\": [\n@@ -654,7 +654,7 @@ class PmdBonding(object):\n                 [\"Active Slaves \\(\\d\\): \\[\", \"\\d*( \\d*)*\"],\n                 [\"Acitve Slaves: \\[\", \"\\d*( \\d*)*\"],\n             ],\n-            \"primary\": [\"Primary: \\[\", \"\\d*\"],\n+            \"current_primary\": [\"Current Primary: \\[\", \"\\d*\"],\n         }\n         # get all config information\n         config_content = self.d_console(\"show bonding config %d\" % bond_port)\n@@ -684,18 +684,20 @@ class PmdBonding(object):\n                 return None\n \n     def get_active_slaves(self, bond_port):\n-        primary_port = int(self.get_bonding_info(bond_port, \"primary\"))\n+        primary_port = int(self.get_bonding_info(bond_port, \"current_primary\"))\n         active_slaves = self.get_bonding_info(bond_port, \"active_slaves\")\n \n         return int(primary_port), [int(slave) for slave in active_slaves]\n \n-    def create_bonded_device(self, mode=0, socket=0, verify_detail=False):\n+    def create_bonded_device(self, mode=\"\", socket=0, verify_detail=False):\n         \"\"\"\n         Create a bonding device with the parameters you specified.\n         \"\"\"\n-        cmd = \"create bonded device %d %d\" % (mode, socket)\n+        p = r\"\\w+\\((\\d+)\\)\"\n+        mode_id = int(re.match(p, mode).group(1))\n+        cmd = \"create bonded device %d %d\" % (mode_id, socket)\n         out = self.d_console(cmd)\n-        err_fmt = \"Create bonded device on mode [%d] socket [%d] failed\"\n+        err_fmt = \"Create bonded device on mode [%s] socket [%d] failed\"\n         self.verify(\"Created new bonded device\" in out, err_fmt % (mode, socket))\n         fmts = [\n             \"Created new bonded device net_bond_testpmd_[\\d] on \\(port \",\n@@ -708,7 +710,7 @@ class PmdBonding(object):\n         if verify_detail:\n             out = self.d_console(\"show bonding config %d\" % bond_port)\n             self.verify(\n-                \"Bonding mode: %d\" % mode in out,\n+                \"Bonding mode: %s\" % mode in out,\n                 \"Bonding mode display error when create bonded device\",\n             )\n             self.verify(\n@@ -719,8 +721,8 @@ class PmdBonding(object):\n                 \"Active Slaves display error when create bonded device\",\n             )\n             self.verify(\n-                \"Primary: []\" not in out,\n-                \"Primary display error when create bonded device\",\n+                \"Current Primary: []\" not in out,\n+                \"Current Primary display error when create bonded device\",\n             )\n             out = self.d_console(\"show port info %d\" % bond_port)\n             self.verify(\n@@ -796,7 +798,7 @@ class PmdBonding(object):\n         \"\"\"\n         cmd = \"set bonding primary %d %d\" % (slave_port, bond_port)\n         self.d_console(cmd)\n-        out = self.get_bonding_info(bond_port, \"primary\")\n+        out = self.get_bonding_info(bond_port, \"current_primary\")\n         if not invert_verify:\n             self.verify(str(slave_port) in out, \"Set bonding primary port failed\")\n         else:\n",
    "prefixes": [
        "V2",
        "1/5"
    ]
}