From patchwork Wed Jul 26 21:28:12 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Michelson X-Patchwork-Id: 794121 X-Patchwork-Delegate: rbryant@redhat.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=openvswitch.org (client-ip=140.211.169.12; helo=mail.linuxfoundation.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver=) Received: from mail.linuxfoundation.org (mail.linuxfoundation.org [140.211.169.12]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3xHpBs3NmCz9s7g for ; Thu, 27 Jul 2017 07:28:53 +1000 (AEST) Received: from mail.linux-foundation.org (localhost [127.0.0.1]) by mail.linuxfoundation.org (Postfix) with ESMTP id 74530B49; Wed, 26 Jul 2017 21:28:19 +0000 (UTC) X-Original-To: dev@openvswitch.org Delivered-To: ovs-dev@mail.linuxfoundation.org Received: from smtp1.linuxfoundation.org (smtp1.linux-foundation.org [172.17.192.35]) by mail.linuxfoundation.org (Postfix) with ESMTPS id 31A30B10 for ; Wed, 26 Jul 2017 21:28:17 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by smtp1.linuxfoundation.org (Postfix) with ESMTPS id B4A3A124 for ; Wed, 26 Jul 2017 21:28:16 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 2E1BE19D386 for ; Wed, 26 Jul 2017 21:28:16 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 2E1BE19D386 Authentication-Results: ext-mx05.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx05.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=mmichels@redhat.com Received: from monae.redhat.com (ovpn-124-2.rdu2.redhat.com [10.10.124.2]) by smtp.corp.redhat.com (Postfix) with ESMTP id 8BACF6FEEA for ; Wed, 26 Jul 2017 21:28:15 +0000 (UTC) From: Mark Michelson To: dev@openvswitch.org Date: Wed, 26 Jul 2017 16:28:12 -0500 Message-Id: <20170726212813.6976-2-mmichels@redhat.com> In-Reply-To: <20170726212813.6976-1-mmichels@redhat.com> References: <20170726212813.6976-1-mmichels@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.29]); Wed, 26 Jul 2017 21:28:16 +0000 (UTC) X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on smtp1.linux-foundation.org Subject: [ovs-dev] [PATCH v2 2/3] tests: Use ovn-nbctl lsp-set-dhcpvX-options X-BeenThere: ovs-dev@openvswitch.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: ovs-dev-bounces@openvswitch.org Errors-To: ovs-dev-bounces@openvswitch.org Existing OVN tests manually added DHCP options to the Logical_Switch_Port database. There is a shortcut CLI command for doing the same thing, so we may as well use it and get the extra test coverage as a result. Signed-off-by: Mark Michelson --- tests/ovn.at | 31 ++++++++++++++++++------------- 1 file changed, 18 insertions(+), 13 deletions(-) diff --git a/tests/ovn.at b/tests/ovn.at index 248aea4b2..c7b9a6c9a 100644 --- a/tests/ovn.at +++ b/tests/ovn.at @@ -3663,15 +3663,18 @@ ovn-nbctl lsp-add ls2 ls2-lp2 \ -- lsp-set-addresses ls2-lp2 "f0:00:00:00:00:04 30.0.0.7" ovn-nbctl lsp-set-port-security ls2-lp2 "f0:00:00:00:00:04 30.0.0.7" -ovn-nbctl -- --id=@d1 create DHCP_Options cidr=10.0.0.0/24 \ +d1="$(ovn-nbctl create DHCP_Options cidr=10.0.0.0/24 \ options="\"server_id\"=\"10.0.0.1\" \"server_mac\"=\"ff:10:00:00:00:01\" \ -\"lease_time\"=\"3600\" \"router\"=\"10.0.0.1\"" \ --- add Logical_Switch_Port ls1-lp1 dhcpv4_options @d1 \ --- add Logical_Switch_Port ls1-lp2 dhcpv4_options @d1 +\"lease_time\"=\"3600\" \"router\"=\"10.0.0.1\"")" -ovn-nbctl -- --id=@d2 create DHCP_Options cidr=30.0.0.0/24 \ +ovn-nbctl lsp-set-dhcpv4-options ls1-lp1 ${d1} +ovn-nbctl lsp-set-dhcpv4-options ls1-lp2 ${d1} + +d2="$(ovn-nbctl create DHCP_Options cidr=30.0.0.0/24 \ options="\"server_id\"=\"30.0.0.1\" \"server_mac\"=\"ff:10:00:00:00:02\" \ -\"lease_time\"=\"3600\"" -- add Logical_Switch_Port ls2-lp2 dhcpv4_options @d2 +\"lease_time\"=\"3600\"")" + +ovn-nbctl lsp-set-dhcpv4-options ls2-lp2 ${d2} net_add n1 sim_add hv1 @@ -3994,14 +3997,16 @@ ovn-nbctl lsp-add ls1 ls1-lp3 \ ovn-nbctl lsp-set-port-security ls1-lp3 "f0:00:00:00:00:22 ae70::22" -ovn-nbctl -- --id=@d1 create DHCP_Options cidr="ae70\:\:/64" \ -options="\"server_id\"=\"00:00:00:10:00:01\"" \ --- add Logical_Switch_Port ls1-lp1 dhcpv6_options @d1 \ --- add Logical_Switch_Port ls1-lp2 dhcpv6_options @d1 +d1="$(ovn-nbctl create DHCP_Options cidr="ae70\:\:/64" \ +options="\"server_id\"=\"00:00:00:10:00:01\"")" + +ovn-nbctl lsp-set-dhcpv6-options ls1-lp1 ${d1} +ovn-nbctl lsp-set-dhcpv6-options ls1-lp2 ${d1} + +d2="$(ovn-nbctl create DHCP_Options cidr="ae70\:\:/64" \ +options="\"dhcpv6_stateless\"=\"true\" \"server_id\"=\"00:00:00:10:00:01\"")" -ovn-nbctl -- --id=@d2 create DHCP_Options cidr="ae70\:\:/64" \ -options="\"dhcpv6_stateless\"=\"true\" \"server_id\"=\"00:00:00:10:00:01\"" \ --- add Logical_Switch_Port ls1-lp3 dhcpv6_options @d2 +ovn-nbctl lsp-set-dhcpv6-options ls1-lp3 ${d2} ovn-nbctl ls-add ls2 ovn-nbctl lsp-add ls2 ls2-lp1 \