From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 3C00D45C05; Tue, 29 Oct 2024 02:09:02 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id C16A34014F; Tue, 29 Oct 2024 02:09:01 +0100 (CET) Received: from mail-pf1-f182.google.com (mail-pf1-f182.google.com [209.85.210.182]) by mails.dpdk.org (Postfix) with ESMTP id 500CF40144 for ; Tue, 29 Oct 2024 02:09:00 +0100 (CET) Received: by mail-pf1-f182.google.com with SMTP id d2e1a72fcca58-71e7086c231so3766596b3a.0 for ; Mon, 28 Oct 2024 18:09:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=iol.unh.edu; s=unh-iol; t=1730164139; x=1730768939; darn=dpdk.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=FRYE/g9LBaq2aP11v45Rc6q8lh6Y1RcudTMSASlBmNE=; b=AjGf/d4dfK7zUiQhVLqxKOLxiGziCitjG5HcVpGUEv93RugH9O5VW2iAWhyJWH9sYk 4RQzeT/LgkX24sekN1NtOxNFHsp5MWc5BCBmSd2q5bBCSrrfUPNC9RGzq/p1maQLhzQ7 2gMEXTB7JjNs2pJJ/ObDEVrkpO08Ay6CLnmq0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730164139; x=1730768939; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=FRYE/g9LBaq2aP11v45Rc6q8lh6Y1RcudTMSASlBmNE=; b=uwEuzWzG7uwx1c6EQdo6cQkWhKSgZ2ZA+tktu4BJ9wgfGDz+oz6J2hNVsjbjkq2/Va A7VxNLXzs7JDpCTaCMZql0q02Tlq/y3HdVu8D2kncMGe3GaWoeGKDdFIG6RUpogYNLgA dzODAI0j7IWEjig30PZ6cTEOetlYqZH3nQp+h4LH8WZ9FFWKpGvXEgwxGqR35L9ZWvI1 ey114XvIoYa/6Qp3TH/vP/YGxzuisBfxeiaFrN8kSGBrveiGMA022anvF+FbnPyMV93C Z8nyHyX655Clxq7p7hiXhfYFBzQoAibxzohxZnvgXzeFMvZ1zXjSspJDEHIIBe65SAyS oPOQ== X-Gm-Message-State: AOJu0YxDgBV8AfSomVKlycx3GGhmu9b9Dk7KtZCk6F0x5Jb+e+U1rDpd F4Jdp7oK8xtCyJOxuBYXrXv3P1cipUxbjEXmzHutbD+pRdqxsEC3ootb1EVGicarwB4E2PDLk0A 0oCEncYmhk6ZsOelxNr0ydDnEvbn4EmLyC3xKEEH8TehDmF5YfFc= X-Google-Smtp-Source: AGHT+IG324TI5K9JUWyMUHw6nuC/OF0qXXM2btgW3RWQj09XsGjewt1Eq0mzKE6NTuUrvx/79W8cSEZHagUxw/9HS2A= X-Received: by 2002:a05:6a00:b86:b0:71e:7c92:a192 with SMTP id d2e1a72fcca58-72063093594mr12857232b3a.24.1730164139299; Mon, 28 Oct 2024 18:08:59 -0700 (PDT) MIME-Version: 1.0 References: <20240930160204.19582-1-tomas.durovec@pantheon.tech> <20241021134935.1210500-1-luca.vizzarro@arm.com> <20241021134935.1210500-5-luca.vizzarro@arm.com> In-Reply-To: <20241021134935.1210500-5-luca.vizzarro@arm.com> From: Patrick Robb Date: Mon, 28 Oct 2024 21:07:20 -0400 Message-ID: Subject: Re: [PATCH v2 4/7] dts: enable copying directories to and from nodes To: Luca Vizzarro Cc: dev@dpdk.org, Paul Szczepanek , =?UTF-8?B?VG9tw6HFoSDEjnVyb3ZlYw==?= Content-Type: multipart/alternative; boundary="000000000000ed38e80625933a9f" X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org --000000000000ed38e80625933a9f Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Mon, Oct 21, 2024 at 9:49=E2=80=AFAM Luca Vizzarro wrote: > > + > + @abstractmethod > + def remove_remote_file(self, remote_file_path: str | PurePath, force= : > bool =3D True) -> None: > + """Remove remote file, by default remove forcefully. > + > + Args: > + remote_file_path: The file path to remove. > + force: If :data:`True`, ignore all warnings and try to remov= e > at all costs. > + """ > This is outside of the scope of this patch, but I figured I would comment that we should use this to clean the dpdk-devbind.py file when we re-add that functionality. I'm glad this method is added. :) > + > @abstractmethod > def remove_remote_dir( > self, > @@ -213,11 +302,34 @@ def remove_remote_dir( > """Remove remote directory, by default remove recursively and > forcefully. > > Args: > - remote_dir_path: The path of the directory to remove. > + remote_dir_path: The directory path to remove. > recursive: If :data:`True`, also remove all contents inside > the directory. > force: If :data:`True`, ignore all warnings and try to remov= e > at all costs. > """ > > + @abstractmethod > + def create_remote_tarball( > + self, > + remote_dir_path: str | PurePath, > + compress_format: TarCompressionFormat =3D TarCompressionFormat.n= one, > + exclude: str | list[str] | None =3D None, > + ) -> PurePosixPath: > Does this have to be a PurePosixPath instead of a PurePath? I know adding Windows support for DTS seems far out, but we should not add in barriers to that now without good reason (though if there is a strong practical reason why we want to do this now, then okay). I believe we will have a PurePosixPath return in testbed_model/posix_session.py and a PureWindowsPath return in testbed_model/windows_session.py (when it exists)= . Otherwise, I know we discussed this at the DTS call on Thurs, but thanks for remaining .gz .xz agnostic. Reviewed-by: Patrick Robb --000000000000ed38e80625933a9f Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


=
On Mon, Oct 21, 2024 at 9:49=E2=80=AF= AM Luca Vizzarro <luca.vizzarro= @arm.com> wrote:

+
+=C2=A0 =C2=A0 @abstractmethod
+=C2=A0 =C2=A0 def remove_remote_file(self, remote_file_path: str | PurePat= h, force: bool =3D True) -> None:
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 """Remove remote file, by defau= lt remove forcefully.
+
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 Args:
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 remote_file_path: The file path = to remove.
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 force: If :data:`True`, ignore a= ll warnings and try to remove at all costs.
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 """

This is outside of the scope of this patch, but I figured I w= ould comment that we should use this to clean the dpdk-devbind.py file when= we re-add that functionality. I'm glad this method is added. :)
<= /div>
=C2=A0
+
=C2=A0 =C2=A0 =C2=A0@abstractmethod
=C2=A0 =C2=A0 =C2=A0def remove_remote_dir(
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0self,
@@ -213,11 +302,34 @@ def remove_remote_dir(
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0"""Remove remote directory= , by default remove recursively and forcefully.

=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0Args:
-=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 remote_dir_path: The path of the= directory to remove.
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 remote_dir_path: The directory p= ath to remove.
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0recursive: If :data:`True`,= also remove all contents inside the directory.
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0force: If :data:`True`, ign= ore all warnings and try to remove at all costs.
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0"""

+=C2=A0 =C2=A0 @abstractmethod
+=C2=A0 =C2=A0 def create_remote_tarball(
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 self,
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 remote_dir_path: str | PurePath,
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 compress_format: TarCompressionFormat =3D TarC= ompressionFormat.none,
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 exclude: str | list[str] | None =3D None,
+=C2=A0 =C2=A0 ) -> PurePosixPath:

D= oes this have to be a PurePosixPath instead of a PurePath? I know adding Wi= ndows support for DTS seems far out, but we should not add in barriers to t= hat now without good reason (though if there is a strong practical reason w= hy we want to do this now, then okay). I believe we will have a PurePosixPa= th return in testbed_model/posix_session.py and a PureWindowsPath return in= testbed_model/windows_session.py (when it exists).

Otherwise, I know we discussed this at the DTS call on Thurs, but thanks = for remaining .gz .xz agnostic.

Reviewed-by: Patri= ck Robb <probb@iol.unh.edu><= /div>
--000000000000ed38e80625933a9f--