From patchwork Wed Oct 27 14:02:45 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Ludovic_Court=C3=A8s?= X-Patchwork-Id: 34110 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 9336E27BBE3; Wed, 27 Oct 2021 15:52:29 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,T_DKIM_INVALID, URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 1F71927BBE1 for ; Wed, 27 Oct 2021 15:52:29 +0100 (BST) Received: from localhost ([::1]:56218 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mfkI0-0002qR-5x for patchwork@mira.cbaines.net; Wed, 27 Oct 2021 10:52:28 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43166) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mfjXC-0008Qs-8L for guix-patches@gnu.org; Wed, 27 Oct 2021 10:04:06 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:38549) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mfjXB-0005H7-U7 for guix-patches@gnu.org; Wed, 27 Oct 2021 10:04:05 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mfjXB-0002Zt-Pe for guix-patches@gnu.org; Wed, 27 Oct 2021 10:04:05 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#51440] [PATCH 10/10] tests: Replace uses of deprecated 'static-networking-service'. Resent-From: Ludovic =?utf-8?q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 27 Oct 2021 14:04:05 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 51440 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 51440@debbugs.gnu.org Cc: Ludovic =?utf-8?q?Court=C3=A8s?= Received: via spool by 51440-submit@debbugs.gnu.org id=B51440.16353434149787 (code B ref 51440); Wed, 27 Oct 2021 14:04:05 +0000 Received: (at 51440) by debbugs.gnu.org; 27 Oct 2021 14:03:34 +0000 Received: from localhost ([127.0.0.1]:50086 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mfjWg-0002Xn-AN for submit@debbugs.gnu.org; Wed, 27 Oct 2021 10:03:34 -0400 Received: from eggs.gnu.org ([209.51.188.92]:45582) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mfjWN-0002W4-1f for 51440@debbugs.gnu.org; Wed, 27 Oct 2021 10:03:15 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:37982) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mfjWH-00058o-R2; Wed, 27 Oct 2021 10:03:09 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:References:In-Reply-To:Date:Subject:To: From; bh=f0T5dgslaHqaANUOThtzyqZWhOicRkOBGFHzUtH5IrY=; b=qXujNXdaHUkz8+K+ivbi ZQJsJiQMQ7LIGNym9tuf9Ue3IjDLS+QSOzRr9wJ3PwKmOIocWSxnkYS2+Vna4tMDKEPZKB9/1OL8X mvgWDdOS7lvttdK/otf50osW0VhdF/CqVv/FaAOOrp1brZcW2tCwOaY8VTg3AxDG6y/svwpHbD+bP 2Hj7nWIGpdcGh6rrvUqQQecKoIUpNJlpEwCb2+TMjA+lJgr4LPnQ9jUvYf9ZomWV/2v9bMG3ud60Q gkgtSgJxfqYjaoyoKy9tAxHh5WPMeJ83LpnzvdA2botn50ZHZkbN0zm6I6OnkLo+bwpSrecmV40NE OGl+bnwkbE88OA==; Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=55004 helo=gnu.org) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mfjWH-0002Tf-76; Wed, 27 Oct 2021 10:03:09 -0400 From: Ludovic =?utf-8?q?Court=C3=A8s?= Date: Wed, 27 Oct 2021 16:02:45 +0200 Message-Id: <20211027140245.18970-10-ludo@gnu.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20211027140245.18970-1-ludo@gnu.org> References: <20211027140245.18970-1-ludo@gnu.org> MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches * gnu/tests/ganeti.scm (%ganeti-os): Replace call to 'static-networking-service' by instantiating STATIC-NETWORKING-SERVICE-TYPE. * gnu/tests/networking.scm (%test-static-networking) (%openvswitch-os, %dhcpd-os): Likewise. --- gnu/tests/ganeti.scm | 7 ++----- gnu/tests/networking.scm | 29 ++++++++++++++++++----------- 2 files changed, 20 insertions(+), 16 deletions(-) diff --git a/gnu/tests/ganeti.scm b/gnu/tests/ganeti.scm index 5ac2fd48dd..c29b885a5e 100644 --- a/gnu/tests/ganeti.scm +++ b/gnu/tests/ganeti.scm @@ -59,11 +59,8 @@ (define %ganeti-os (packages (append (list ganeti-instance-debootstrap ganeti-instance-guix) %base-packages)) (services - (append (list (static-networking-service "eth0" "10.0.2.15" - #:netmask "255.255.255.0" - #:gateway "10.0.2.2" - #:name-servers '("10.0.2.3")) - + (append (list (service static-networking-service-type + (list %qemu-static-networking)) (service openssh-service-type (openssh-configuration (permit-root-login 'prohibit-password))) diff --git a/gnu/tests/networking.scm b/gnu/tests/networking.scm index c66af279f2..246e0a15fa 100644 --- a/gnu/tests/networking.scm +++ b/gnu/tests/networking.scm @@ -122,10 +122,8 @@ (define %test-static-networking (value (let ((os (marionette-operating-system (simple-operating-system - (static-networking-service "eth0" "10.0.2.15" - #:netmask "255.255.255.0" - #:gateway "10.0.2.2" - #:name-servers '("10.0.2.2"))) + (service static-networking-service-type + (list %qemu-static-networking))) #:imported-modules '((gnu services herd) (guix combinators))))) (run-static-networking-test (virtual-machine os)))))) @@ -275,9 +273,13 @@ (define openvswitch-configuration-service (define %openvswitch-os (operating-system (inherit (simple-operating-system - (static-networking-service "ovs0" "10.1.1.1" - #:netmask "255.255.255.252" - #:requirement '(openvswitch-configuration)) + (simple-service 'openswitch-networking + static-networking-service-type + (list (static-networking + (addresses (list (network-address + (value "10.1.1.1/24") + (device "ovs0")))) + (requirement '(openvswitch-configuration))))) (service openvswitch-service-type) openvswitch-configuration-service)) ;; Ensure the interface name does not change depending on the driver. @@ -392,10 +394,15 @@ (define dhcpd-v4-configuration (define %dhcpd-os (simple-operating-system - (static-networking-service "ens3" "192.168.1.4" - #:netmask "255.255.255.0" - #:gateway "192.168.1.1" - #:name-servers '("192.168.1.2" "192.168.1.3")) + (service static-networking-service-type + (list (static-networking + (addresses (list (network-address + (value "192.168.1.4/24") + (device "ens3")))) + (routes (list (network-route + (destination "default") + (gateway "192.168.1.1")))) + (name-servers '("192.168.1.2" "192.168.1.3"))))) (service dhcpd-service-type dhcpd-v4-configuration))) (define (run-dhcpd-test)