get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 84655,
    "url": "https://patches.dpdk.org/api/patches/84655/?format=api",
    "web_url": "https://patches.dpdk.org/project/dts/patch/20201201175750.24381-1-linglix.chen@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": "<20201201175750.24381-1-linglix.chen@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dts/20201201175750.24381-1-linglix.chen@intel.com",
    "date": "2020-12-01T17:57:50",
    "name": "[V2] tests/TestSuite_shutdown_api:fixed differences brought about by speed units",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": false,
    "hash": "28144ae79c8c05ab60185a23c0c8757bc58d812e",
    "submitter": {
        "id": 1843,
        "url": "https://patches.dpdk.org/api/people/1843/?format=api",
        "name": "Lingli Chen",
        "email": "linglix.chen@intel.com"
    },
    "delegate": null,
    "mbox": "https://patches.dpdk.org/project/dts/patch/20201201175750.24381-1-linglix.chen@intel.com/mbox/",
    "series": [
        {
            "id": 14159,
            "url": "https://patches.dpdk.org/api/series/14159/?format=api",
            "web_url": "https://patches.dpdk.org/project/dts/list/?series=14159",
            "date": "2020-12-01T17:57:50",
            "name": "[V2] tests/TestSuite_shutdown_api:fixed differences brought about by speed units",
            "version": 2,
            "mbox": "https://patches.dpdk.org/series/14159/mbox/"
        }
    ],
    "comments": "https://patches.dpdk.org/api/patches/84655/comments/",
    "check": "pending",
    "checks": "https://patches.dpdk.org/api/patches/84655/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 dpdk.org (dpdk.org [92.243.14.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id 1CA06A04DB;\n\tTue,  1 Dec 2020 10:19:29 +0100 (CET)",
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id E750FC982;\n\tTue,  1 Dec 2020 10:19:27 +0100 (CET)",
            "from mga09.intel.com (mga09.intel.com [134.134.136.24])\n by dpdk.org (Postfix) with ESMTP id 5E309C956\n for <dts@dpdk.org>; Tue,  1 Dec 2020 10:19:25 +0100 (CET)",
            "from orsmga005.jf.intel.com ([10.7.209.41])\n by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 01 Dec 2020 01:19:22 -0800",
            "from unknown (HELO dpdk-wenjielx-tetser203.icx.intel.com)\n ([10.240.183.105])\n by orsmga005-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 01 Dec 2020 01:19:20 -0800"
        ],
        "IronPort-SDR": [
            "\n XUC+VIeYepV9qN8niWPep/5UoUytTQXqB2VaaLZauTYpJpe6CIKKEjvSgWWWnxV15c4BDX6f3s\n /QC2HSrOngHg==",
            "\n DuEBsNti3r9arWETe3t7hDqhi5hqzkK2LXQLpa4Br4Qoa+1Qbgp1sGhGej0pq91mhv334/4Cta\n XMjI+MLc12Zw=="
        ],
        "X-IronPort-AV": [
            "E=McAfee;i=\"6000,8403,9821\"; a=\"172955295\"",
            "E=Sophos;i=\"5.78,384,1599548400\"; d=\"scan'208\";a=\"172955295\"",
            "E=Sophos;i=\"5.78,384,1599548400\"; d=\"scan'208\";a=\"549482780\""
        ],
        "X-Amp-Result": "SKIPPED(no attachment in message)",
        "X-Amp-File-Uploaded": "False",
        "From": "\"Chen, Lingli\" <linglix.chen@intel.com>",
        "To": "dts@dpdk.org",
        "Cc": "\"Chen, Lingli\" <linglix.chen@intel.com>, Chen@dpdk.org",
        "Date": "Tue,  1 Dec 2020 17:57:50 +0000",
        "Message-Id": "<20201201175750.24381-1-linglix.chen@intel.com>",
        "X-Mailer": "git-send-email 2.17.1",
        "Subject": "[dts] [PATCH V2] tests/TestSuite_shutdown_api:fixed differences\n\tbrought about by speed units",
        "X-BeenThere": "dts@dpdk.org",
        "X-Mailman-Version": "2.1.15",
        "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",
        "Sender": "\"dts\" <dts-bounces@dpdk.org>"
    },
    "content": "V2:optimize script to fixed differences brought about by speed units\n   Sagepond nic only support 1000baseT and 10000baseT\n\nV1:fixed differences brought about by speed units\n\nSigned-off-by: Chen, Lingli <linglix.chen@intel.com>\n---\n tests/TestSuite_shutdown_api.py | 20 ++++++++++++++------\n 1 file changed, 14 insertions(+), 6 deletions(-)",
    "diff": "diff --git a/tests/TestSuite_shutdown_api.py b/tests/TestSuite_shutdown_api.py\nindex 1e98c64..c647870 100644\n--- a/tests/TestSuite_shutdown_api.py\n+++ b/tests/TestSuite_shutdown_api.py\n@@ -501,7 +501,7 @@ class TestShutdownApi(TestCase):\n                 if config[0] != '1000' or '10000':\n                     continue\n             elif self.nic in [\"sagepond\"]:\n-                if config[0] != '1000' and '10000':\n+                if config[0] not in ['1000', '10000']:\n                     continue\n             self.dut.send_expect(\"port stop all\", \"testpmd> \", 100)\n             for port in self.ports:\n@@ -515,8 +515,13 @@ class TestShutdownApi(TestCase):\n                 out = self.dut.send_expect(\"show port info %s\" % port, \"testpmd>\")\n                 self.verify(\"Link status: up\" in out,\n                             \"Wrong link status reported by the dut\")\n-                self.verify(\"Link speed: %s Mbps\" % config[0] in out,\n-                            \"Wrong speed reported by the dut\")\n+                if int(config[0]) < 1000:\n+                    self.verify(\"Link speed: %s Mbps\" % config[0] in out,\n+                                 \"Wrong speed reported by the dut\")\n+                else:\n+                    num =int(int(config[0])/1000)\n+                    self.verify(\"Link speed: %d Gbps\" % num in out,\n+                                 \"Wrong speed reported by the dut\")\n                 self.verify(\"Link duplex: %s-duplex\" % config[1].lower() in out,\n                             \"Wrong link type reported by the dut\")\n                 out = self.tester.send_expect(\n@@ -547,7 +552,7 @@ class TestShutdownApi(TestCase):\n         if not self.check_linkspeed_config(configs):\n             return\n \n-        result_linkspeed_scanner = r\"Link\\s*speed:\\s([0-9]+)\\s*Mbps\"\n+        result_linkspeed_scanner = r\"Link\\s*speed:\\s([0-9]+)\\s*(\\S+)\"\n         linkspeed_scanner = re.compile(result_linkspeed_scanner, re.DOTALL)\n         result_linktype_scanner = r\"Link\\s*duplex:\\s*(\\S*)\\s*-\\s*duplex\"\n         linktype_scanner = re.compile(result_linktype_scanner, re.DOTALL)\n@@ -577,10 +582,13 @@ class TestShutdownApi(TestCase):\n \n             out = self.vm0_testpmd.execute_cmd('show port info all')\n \n-            linkspeed = linkspeed_scanner.findall(out)\n+            linkspeed = linkspeed_scanner.findall(out)[0]\n             linktype = linktype_scanner.findall(out)\n \n-            self.verify(config[0] in linkspeed,\n+            actual_speed = int(linkspeed[0])\n+            if linkspeed[1] == \"Gbps\":\n+                actual_speed = actual_speed * 1000\n+            self.verify(config[0] == str(actual_speed),\n                         \"Wrong VF speed reported by the self.tester.\")\n             self.verify(config[1].lower() == linktype[0].lower(),\n                         \"Wrong VF link type reported by the self.tester.\")\n",
    "prefixes": [
        "V2"
    ]
}