Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/113249/?format=api
http://patches.dpdk.org/api/patches/113249/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/patch/20220622121448.3304251-4-juraj.linkes@pantheon.tech/", "project": { "id": 1, "url": "http://patches.dpdk.org/api/projects/1/?format=api", "name": "DPDK", "link_name": "dpdk", "list_id": "dev.dpdk.org", "list_email": "dev@dpdk.org", "web_url": "http://core.dpdk.org", "scm_url": "git://dpdk.org/dpdk", "webscm_url": "http://git.dpdk.org/dpdk", "list_archive_url": "https://inbox.dpdk.org/dev", "list_archive_url_format": "https://inbox.dpdk.org/dev/{}", "commit_url_format": "" }, "msgid": "<20220622121448.3304251-4-juraj.linkes@pantheon.tech>", "list_archive_url": "https://inbox.dpdk.org/dev/20220622121448.3304251-4-juraj.linkes@pantheon.tech", "date": "2022-06-22T12:14:43", "name": "[v1,3/8] dts: add ssh connection extension", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": true, "hash": "5bc0ef1f0f13e32d42fb3972e860e07a8c839a2a", "submitter": { "id": 1626, "url": "http://patches.dpdk.org/api/people/1626/?format=api", "name": "Juraj Linkeš", "email": "juraj.linkes@pantheon.tech" }, "delegate": { "id": 1, "url": "http://patches.dpdk.org/api/users/1/?format=api", "username": "tmonjalo", "first_name": "Thomas", "last_name": "Monjalon", "email": "thomas@monjalon.net" }, "mbox": "http://patches.dpdk.org/project/dpdk/patch/20220622121448.3304251-4-juraj.linkes@pantheon.tech/mbox/", "series": [ { "id": 23695, "url": "http://patches.dpdk.org/api/series/23695/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=23695", "date": "2022-06-22T12:14:40", "name": "dts: ssh connection to a node", "version": 1, "mbox": "http://patches.dpdk.org/series/23695/mbox/" } ], "comments": "http://patches.dpdk.org/api/patches/113249/comments/", "check": "success", "checks": "http://patches.dpdk.org/api/patches/113249/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<dev-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 EF6B7A04FD;\n\tWed, 22 Jun 2022 14:15:24 +0200 (CEST)", "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id B386542905;\n\tWed, 22 Jun 2022 14:15:02 +0200 (CEST)", "from lb.pantheon.sk (lb.pantheon.sk [46.229.239.20])\n by mails.dpdk.org (Postfix) with ESMTP id 8B1A1427F3\n for <dev@dpdk.org>; Wed, 22 Jun 2022 14:14:58 +0200 (CEST)", "from localhost (localhost [127.0.0.1])\n by lb.pantheon.sk (Postfix) with ESMTP id A406331473;\n Wed, 22 Jun 2022 14:14:57 +0200 (CEST)", "from lb.pantheon.sk ([127.0.0.1])\n by localhost (lb.pantheon.sk [127.0.0.1]) (amavisd-new, port 10024)\n with ESMTP id ZbgEJmH7LPzK; Wed, 22 Jun 2022 14:14:53 +0200 (CEST)", "from entguard.lab.pantheon.local (unknown [46.229.239.141])\n by lb.pantheon.sk (Postfix) with ESMTP id 508823146C;\n Wed, 22 Jun 2022 14:14:50 +0200 (CEST)" ], "X-Virus-Scanned": "amavisd-new at siecit.sk", "From": "=?utf-8?q?Juraj_Linke=C5=A1?= <juraj.linkes@pantheon.tech>", "To": "thomas@monjalon.net, david.marchand@redhat.com, jerinjacobk@gmail.com,\n ronan.randles@intel.com, Honnappa.Nagarahalli@arm.com,\n ohilyard@iol.unh.edu, lijuan.tu@intel.com", "Cc": "dev@dpdk.org, =?utf-8?q?Juraj_Linke=C5=A1?= <juraj.linkes@pantheon.tech>", "Subject": "[PATCH v1 3/8] dts: add ssh connection extension", "Date": "Wed, 22 Jun 2022 12:14:43 +0000", "Message-Id": "<20220622121448.3304251-4-juraj.linkes@pantheon.tech>", "X-Mailer": "git-send-email 2.25.1", "In-Reply-To": "<20220622121448.3304251-1-juraj.linkes@pantheon.tech>", "References": "<20220622121448.3304251-1-juraj.linkes@pantheon.tech>", "MIME-Version": "1.0", "Content-Type": "text/plain; charset=UTF-8", "Content-Transfer-Encoding": "8bit", "X-BeenThere": "dev@dpdk.org", "X-Mailman-Version": "2.1.29", "Precedence": "list", "List-Id": "DPDK patches and discussions <dev.dpdk.org>", "List-Unsubscribe": "<https://mails.dpdk.org/options/dev>,\n <mailto:dev-request@dpdk.org?subject=unsubscribe>", "List-Archive": "<http://mails.dpdk.org/archives/dev/>", "List-Post": "<mailto:dev@dpdk.org>", "List-Help": "<mailto:dev-request@dpdk.org?subject=help>", "List-Subscribe": "<https://mails.dpdk.org/listinfo/dev>,\n <mailto:dev-request@dpdk.org?subject=subscribe>", "Errors-To": "dev-bounces@dpdk.org" }, "content": "The class adds logging to existing pexpect methods and history records.\n\nSigned-off-by: Juraj Linkeš <juraj.linkes@pantheon.tech>\n---\n dts/framework/ssh_connection.py | 52 +++++++++++++++++++++++++++++++++\n 1 file changed, 52 insertions(+)\n create mode 100644 dts/framework/ssh_connection.py", "diff": "diff --git a/dts/framework/ssh_connection.py b/dts/framework/ssh_connection.py\nnew file mode 100644\nindex 0000000000..2ddbc9c1c2\n--- /dev/null\n+++ b/dts/framework/ssh_connection.py\n@@ -0,0 +1,52 @@\n+# SPDX-License-Identifier: BSD-3-Clause\n+# Copyright(c) 2010-2014 Intel Corporation\n+#\n+\n+from .ssh_pexpect import SSHPexpect\n+\n+\n+class SSHConnection(object):\n+\n+ \"\"\"\n+ Module for create session to node.\n+ \"\"\"\n+\n+ def __init__(self, node, session_name, username, password=\"\", sut_id=0):\n+ self.session = SSHPexpect(node, username, password, sut_id)\n+ self.name = session_name\n+ self.history = None\n+\n+ def init_log(self, logger):\n+ self.logger = logger\n+ self.session.init_log(logger)\n+\n+ def set_history(self, history):\n+ self.history = history\n+\n+ def send_expect(self, cmds, expected, timeout=15, verify=False):\n+ self.logger.info(cmds)\n+ out = self.session.send_expect(cmds, expected, timeout, verify)\n+ if isinstance(out, str):\n+ self.logger.debug(out.replace(cmds, \"\"))\n+ if type(self.history) is list:\n+ self.history.append({\"command\": cmds, \"name\": self.name, \"output\": out})\n+ return out\n+\n+ def send_command(self, cmds, timeout=1):\n+ self.logger.info(cmds)\n+ out = self.session.send_command(cmds, timeout)\n+ self.logger.debug(out.replace(cmds, \"\"))\n+ if type(self.history) is list:\n+ self.history.append({\"command\": cmds, \"name\": self.name, \"output\": out})\n+ return out\n+\n+ def get_session_before(self, timeout=15):\n+ out = self.session.get_session_before(timeout)\n+ self.logger.debug(out)\n+ return out\n+\n+ def close(self, force=False):\n+ if getattr(self, \"logger\", None):\n+ self.logger.logger_exit()\n+\n+ self.session.close(force)\n", "prefixes": [ "v1", "3/8" ] }{ "id": 113249, "url": "