get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 105917,
    "url": "http://patchwork.dpdk.org/api/patches/105917/?format=api",
    "web_url": "http://patchwork.dpdk.org/project/dts/patch/20220117100823.4747-1-junx.dong@intel.com/",
    "project": {
        "id": 3,
        "url": "http://patchwork.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": "<20220117100823.4747-1-junx.dong@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dts/20220117100823.4747-1-junx.dong@intel.com",
    "date": "2022-01-17T10:08:23",
    "name": "[V1] framework/crb: Add functions of check and wait link status up",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": false,
    "hash": "f6379c4b5433f07b0515279804458bf9465ed0e7",
    "submitter": {
        "id": 2237,
        "url": "http://patchwork.dpdk.org/api/people/2237/?format=api",
        "name": "Jun Dong",
        "email": "junx.dong@intel.com"
    },
    "delegate": null,
    "mbox": "http://patchwork.dpdk.org/project/dts/patch/20220117100823.4747-1-junx.dong@intel.com/mbox/",
    "series": [
        {
            "id": 21204,
            "url": "http://patchwork.dpdk.org/api/series/21204/?format=api",
            "web_url": "http://patchwork.dpdk.org/project/dts/list/?series=21204",
            "date": "2022-01-17T10:08:23",
            "name": "[V1] framework/crb: Add functions of check and wait link status up",
            "version": 1,
            "mbox": "http://patchwork.dpdk.org/series/21204/mbox/"
        }
    ],
    "comments": "http://patchwork.dpdk.org/api/patches/105917/comments/",
    "check": "success",
    "checks": "http://patchwork.dpdk.org/api/patches/105917/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 3D8AEA034C;\n\tMon, 17 Jan 2022 11:08:33 +0100 (CET)",
            "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 0E22F4118A;\n\tMon, 17 Jan 2022 11:08:33 +0100 (CET)",
            "from mga03.intel.com (mga03.intel.com [134.134.136.65])\n by mails.dpdk.org (Postfix) with ESMTP id 71DAC4067B\n for <dts@dpdk.org>; Mon, 17 Jan 2022 11:08:31 +0100 (CET)",
            "from fmsmga008.fm.intel.com ([10.253.24.58])\n by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 17 Jan 2022 02:08:30 -0800",
            "from shwdenpg197.ccr.corp.intel.com ([10.253.109.35])\n by fmsmga008-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 17 Jan 2022 02:08:28 -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=1642414111; x=1673950111;\n h=from:to:cc:subject:date:message-id:mime-version:\n content-transfer-encoding;\n bh=CVG3GOdtAykgItr/TIeTbHY8FiGTlNrri8DbGblbwaA=;\n b=aoB5IHbbo3HyclmG7+f1d6u9ukXz2DmVBXkXbxiYvxvtceAWqdB5DuL6\n 7+9vLQp7t/cvhGvJPC3bfn1T2mIeIGZ+n5ci0aitOJQLBL+kB1mVMKqGz\n 2xjKN2/G1/3xVJyevt9DotVEUnCHXNePhleTjhqI8tZTsdjIT4YJen+oi\n BMDUCJDFgws0/FVrNwf1MFpOI/rXcldv6kS2IMQfMCwHu3NltkQBs9vAm\n MfhfvEJYVJVkhAEEiRLwceXrXQ3aEIaihYs4vw9gtAHq/n4eKoYEm1ocl\n 5JkXLqE8eE+gf+IZ3+bao8LxEpOyah1oa/f2CvDsXwjnx9V41gBx6DOhT A==;",
        "X-IronPort-AV": [
            "E=McAfee;i=\"6200,9189,10229\"; a=\"244553227\"",
            "E=Sophos;i=\"5.88,295,1635231600\"; d=\"scan'208\";a=\"244553227\"",
            "E=Sophos;i=\"5.88,295,1635231600\"; d=\"scan'208\";a=\"578001040\""
        ],
        "From": "DongJunX <junx.dong@intel.com>",
        "To": "dts@dpdk.org",
        "Cc": "lijuan.tu@intel.com,\n\tqingx.sun@intel.com,\n\tjunx.dong@intel.com",
        "Subject": "[V1] framework/crb: Add functions of check and wait link status up",
        "Date": "Mon, 17 Jan 2022 18:08:23 +0800",
        "Message-Id": "<20220117100823.4747-1-junx.dong@intel.com>",
        "X-Mailer": "git-send-email 2.33.1.windows.1",
        "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": "Signed-off-by: DongJunX <junx.dong@intel.com>\n---\n framework/crb.py | 18 ++++++++++++++++++\n 1 file changed, 18 insertions(+)",
    "diff": "diff --git a/framework/crb.py b/framework/crb.py\nindex bd4f565d..c97b01ce 100755\n--- a/framework/crb.py\n+++ b/framework/crb.py\n@@ -907,3 +907,21 @@ class Crb(object):\n         else:\n             self.logger.info(\"NIC %s may be not find %s\" % (intf, flag))\n             return False\n+\n+    def is_interface_up(self, intf, timeout=15):\n+        \"\"\"\n+        check and wait port link status up until timeout\n+        \"\"\"\n+        for i in range(timeout):\n+            link_status = self.get_interface_link_status(intf)\n+            if link_status == 'Up':\n+                return True\n+            time.sleep(1)\n+        self.logger.error(f\"check and wait {intf} link up timeout\")\n+        return False\n+\n+    def get_interface_link_status(self, intf):\n+        out = self.send_expect(f\"ethtool {intf}\", \"#\")\n+        link_status_matcher = r'Link detected: (\\w+)'\n+        link_status = re.search(link_status_matcher, out).groups()[0]\n+        return 'Up' if link_status == 'yes' else 'Down'\n",
    "prefixes": [
        "V1"
    ]
}