From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by lists.proxmox.com (Postfix) with ESMTPS id 3BFD66AD93 for ; Wed, 9 Dec 2020 16:12:02 +0100 (CET) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 2E0EB12F5D for ; Wed, 9 Dec 2020 16:11:32 +0100 (CET) Received: from kvmformation1.odiso.net (globalOdiso.M6Lille.odiso.net [89.248.211.242]) by firstgate.proxmox.com (Proxmox) with ESMTP id 8F28612F38 for ; Wed, 9 Dec 2020 16:11:28 +0100 (CET) Received: by kvmformation1.odiso.net (Postfix, from userid 0) id 62602BF8A95; Wed, 9 Dec 2020 16:11:20 +0100 (CET) From: Alexandre Derumier To: pve-devel@lists.proxmox.com Date: Wed, 9 Dec 2020 16:11:16 +0100 Message-Id: <20201209151119.3620405-1-aderumier@odiso.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SPAM-LEVEL: Spam detection results: 1 AWL -0.202 Adjusted score from AWL reputation of From: address HEADER_FROM_DIFFERENT_DOMAINS 0.25 From and EnvelopeFrom 2nd level mail domains are different KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment KAM_LAZY_DOMAIN_SECURITY 1 Sending domain does not have any anti-forgery methods KHOP_HELO_FCRDNS 0.4 Relay HELO differs from its IP's reverse DNS NO_DNS_FOR_FROM 0.379 Envelope sender has no MX or A DNS records SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_NONE 0.001 SPF: sender does not publish an SPF Record URIBL_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to URIBL was blocked. See http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more information. [qinqplugin.pm, simpleplugin.pm, plugin.pm, controllers.pm, bgpplugin.pm, vlanplugin.pm, statuscheck.pl, generateconfig.pl, evpnplugin.pm] Subject: [pve-devel] [PATCH pve-network 0/3] add zones/controllers tests X-BeenThere: pve-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox VE development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 Dec 2020 15:12:02 -0000 This patch serie add unit tests for zones && controllers config generation. (This need to be apply on top of my last patches series) Alexandre Derumier (3): zones: add bridge helpers controllers: add generate_controller_rawconfig add zones && controllers unit tests Makefile | 6 +- PVE/Network/SDN/Controllers.pm | 19 ++- PVE/Network/SDN/Controllers/BgpPlugin.pm | 5 + PVE/Network/SDN/Controllers/EvpnPlugin.pm | 10 +- PVE/Network/SDN/Controllers/Plugin.pm | 6 + PVE/Network/SDN/Zones/Plugin.pm | 30 +++++ PVE/Network/SDN/Zones/QinQPlugin.pm | 17 +-- PVE/Network/SDN/Zones/SimplePlugin.pm | 1 + PVE/Network/SDN/Zones/VlanPlugin.pm | 16 +-- test/Makefile | 6 + test/{ => debug}/documentation.txt | 0 test/{ => debug}/generateconfig.pl | 0 test/{ => debug}/statuscheck.pl | 0 test/run_test_zones.pl | 124 ++++++++++++++++++ .../evpn/ebgp/expected_controller_config | 49 +++++++ test/zones/evpn/ebgp/expected_sdn_interfaces | 38 ++++++ test/zones/evpn/ebgp/interfaces | 7 + test/zones/evpn/ebgp/sdn_config | 29 ++++ .../ebgp_loopback/expected_controller_config | 53 ++++++++ .../ebgp_loopback/expected_sdn_interfaces | 38 ++++++ test/zones/evpn/ebgp_loopback/interfaces | 13 ++ test/zones/evpn/ebgp_loopback/sdn_config | 29 ++++ .../evpn/exitnode/expected_controller_config | 52 ++++++++ .../evpn/exitnode/expected_sdn_interfaces | 38 ++++++ test/zones/evpn/exitnode/interfaces | 7 + test/zones/evpn/exitnode/sdn_config | 26 ++++ .../exitnode_snat/expected_controller_config | 52 ++++++++ .../exitnode_snat/expected_sdn_interfaces | 42 ++++++ test/zones/evpn/exitnode_snat/interfaces | 7 + test/zones/evpn/exitnode_snat/sdn_config | 27 ++++ .../evpn/ipv4/expected_controller_config | 31 +++++ test/zones/evpn/ipv4/expected_sdn_interfaces | 38 ++++++ test/zones/evpn/ipv4/interfaces | 7 + test/zones/evpn/ipv4/sdn_config | 26 ++++ .../zones/qinq/bridge/expected_sdn_interfaces | 17 +++ test/zones/qinq/bridge/interfaces | 5 + test/zones/qinq/bridge/sdn_config | 11 ++ .../bridge_vlanaware/expected_sdn_interfaces | 15 +++ test/zones/qinq/bridge_vlanaware/interfaces | 7 + test/zones/qinq/bridge_vlanaware/sdn_config | 11 ++ .../expected_sdn_interfaces | 17 +++ .../bridge_vlanaware_vlanawarevnet/interfaces | 7 + .../bridge_vlanaware_vlanawarevnet/sdn_config | 11 ++ .../expected_sdn_interfaces | 19 +++ .../bridge_vlanaware_vlanprotocol/interfaces | 7 + .../bridge_vlanaware_vlanprotocol/sdn_config | 11 ++ .../expected_sdn_interfaces | 19 +++ .../qinq/bridge_vlanawarevnet/interfaces | 5 + .../qinq/bridge_vlanawarevnet/sdn_config | 11 ++ .../expected_sdn_interfaces | 18 +++ .../zones/qinq/bridge_vlanprotocol/interfaces | 5 + .../zones/qinq/bridge_vlanprotocol/sdn_config | 11 ++ test/zones/qinq/ovs/expected_sdn_interfaces | 25 ++++ test/zones/qinq/ovs/interfaces | 9 ++ test/zones/qinq/ovs/sdn_config | 11 ++ .../ovs_vlanawarevnet/expected_sdn_interfaces | 27 ++++ test/zones/qinq/ovs_vlanawarevnet/interfaces | 9 ++ test/zones/qinq/ovs_vlanawarevnet/sdn_config | 11 ++ .../ovs_vlanprotocol/expected_sdn_interfaces | 25 ++++ test/zones/qinq/ovs_vlanprotocol/interfaces | 9 ++ test/zones/qinq/ovs_vlanprotocol/sdn_config | 11 ++ .../simple/basic/expected_sdn_interfaces | 7 + test/zones/simple/basic/interfaces | 5 + test/zones/simple/basic/sdn_config | 11 ++ .../zones/simple/ipv4/expected_sdn_interfaces | 8 ++ test/zones/simple/ipv4/interfaces | 5 + test/zones/simple/ipv4/sdn_config | 22 ++++ .../simple/ipv4snat/expected_sdn_interfaces | 12 ++ test/zones/simple/ipv4snat/interfaces | 7 + test/zones/simple/ipv4snat/sdn_config | 23 ++++ .../zones/vlan/bridge/expected_sdn_interfaces | 23 ++++ test/zones/vlan/bridge/interfaces | 5 + test/zones/vlan/bridge/sdn_config | 11 ++ .../bridge_vlanaware/expected_sdn_interfaces | 7 + test/zones/vlan/bridge_vlanaware/interfaces | 7 + test/zones/vlan/bridge_vlanaware/sdn_config | 11 ++ .../expected_sdn_interfaces | 9 ++ .../bridge_vlanaware_vlanawarevnet/interfaces | 7 + .../bridge_vlanaware_vlanawarevnet/sdn_config | 11 ++ test/zones/vlan/ovs/expected_sdn_interfaces | 17 +++ test/zones/vlan/ovs/interfaces | 9 ++ test/zones/vlan/ovs/sdn_config | 11 ++ .../ovs_vlanware_vnet/expected_sdn_interfaces | 19 +++ test/zones/vlan/ovs_vlanware_vnet/interfaces | 9 ++ test/zones/vlan/ovs_vlanware_vnet/sdn_config | 11 ++ .../zones/vxlan/basic/expected_sdn_interfaces | 15 +++ test/zones/vxlan/basic/interfaces | 7 + test/zones/vxlan/basic/sdn_config | 11 ++ .../vlanawarevnet/expected_sdn_interfaces | 17 +++ test/zones/vxlan/vlanawarevnet/interfaces | 7 + test/zones/vxlan/vlanawarevnet/sdn_config | 11 ++ 91 files changed, 1503 insertions(+), 25 deletions(-) create mode 100644 test/Makefile rename test/{ => debug}/documentation.txt (100%) rename test/{ => debug}/generateconfig.pl (100%) rename test/{ => debug}/statuscheck.pl (100%) create mode 100755 test/run_test_zones.pl create mode 100644 test/zones/evpn/ebgp/expected_controller_config create mode 100644 test/zones/evpn/ebgp/expected_sdn_interfaces create mode 100644 test/zones/evpn/ebgp/interfaces create mode 100644 test/zones/evpn/ebgp/sdn_config create mode 100644 test/zones/evpn/ebgp_loopback/expected_controller_config create mode 100644 test/zones/evpn/ebgp_loopback/expected_sdn_interfaces create mode 100644 test/zones/evpn/ebgp_loopback/interfaces create mode 100644 test/zones/evpn/ebgp_loopback/sdn_config create mode 100644 test/zones/evpn/exitnode/expected_controller_config create mode 100644 test/zones/evpn/exitnode/expected_sdn_interfaces create mode 100644 test/zones/evpn/exitnode/interfaces create mode 100644 test/zones/evpn/exitnode/sdn_config create mode 100644 test/zones/evpn/exitnode_snat/expected_controller_config create mode 100644 test/zones/evpn/exitnode_snat/expected_sdn_interfaces create mode 100644 test/zones/evpn/exitnode_snat/interfaces create mode 100644 test/zones/evpn/exitnode_snat/sdn_config create mode 100644 test/zones/evpn/ipv4/expected_controller_config create mode 100644 test/zones/evpn/ipv4/expected_sdn_interfaces create mode 100644 test/zones/evpn/ipv4/interfaces create mode 100644 test/zones/evpn/ipv4/sdn_config create mode 100644 test/zones/qinq/bridge/expected_sdn_interfaces create mode 100644 test/zones/qinq/bridge/interfaces create mode 100644 test/zones/qinq/bridge/sdn_config create mode 100644 test/zones/qinq/bridge_vlanaware/expected_sdn_interfaces create mode 100644 test/zones/qinq/bridge_vlanaware/interfaces create mode 100644 test/zones/qinq/bridge_vlanaware/sdn_config create mode 100644 test/zones/qinq/bridge_vlanaware_vlanawarevnet/expected_sdn_interfaces create mode 100644 test/zones/qinq/bridge_vlanaware_vlanawarevnet/interfaces create mode 100644 test/zones/qinq/bridge_vlanaware_vlanawarevnet/sdn_config create mode 100644 test/zones/qinq/bridge_vlanaware_vlanprotocol/expected_sdn_interfaces create mode 100644 test/zones/qinq/bridge_vlanaware_vlanprotocol/interfaces create mode 100644 test/zones/qinq/bridge_vlanaware_vlanprotocol/sdn_config create mode 100644 test/zones/qinq/bridge_vlanawarevnet/expected_sdn_interfaces create mode 100644 test/zones/qinq/bridge_vlanawarevnet/interfaces create mode 100644 test/zones/qinq/bridge_vlanawarevnet/sdn_config create mode 100644 test/zones/qinq/bridge_vlanprotocol/expected_sdn_interfaces create mode 100644 test/zones/qinq/bridge_vlanprotocol/interfaces create mode 100644 test/zones/qinq/bridge_vlanprotocol/sdn_config create mode 100644 test/zones/qinq/ovs/expected_sdn_interfaces create mode 100644 test/zones/qinq/ovs/interfaces create mode 100644 test/zones/qinq/ovs/sdn_config create mode 100644 test/zones/qinq/ovs_vlanawarevnet/expected_sdn_interfaces create mode 100644 test/zones/qinq/ovs_vlanawarevnet/interfaces create mode 100644 test/zones/qinq/ovs_vlanawarevnet/sdn_config create mode 100644 test/zones/qinq/ovs_vlanprotocol/expected_sdn_interfaces create mode 100644 test/zones/qinq/ovs_vlanprotocol/interfaces create mode 100644 test/zones/qinq/ovs_vlanprotocol/sdn_config create mode 100644 test/zones/simple/basic/expected_sdn_interfaces create mode 100644 test/zones/simple/basic/interfaces create mode 100644 test/zones/simple/basic/sdn_config create mode 100644 test/zones/simple/ipv4/expected_sdn_interfaces create mode 100644 test/zones/simple/ipv4/interfaces create mode 100644 test/zones/simple/ipv4/sdn_config create mode 100644 test/zones/simple/ipv4snat/expected_sdn_interfaces create mode 100644 test/zones/simple/ipv4snat/interfaces create mode 100644 test/zones/simple/ipv4snat/sdn_config create mode 100644 test/zones/vlan/bridge/expected_sdn_interfaces create mode 100644 test/zones/vlan/bridge/interfaces create mode 100644 test/zones/vlan/bridge/sdn_config create mode 100644 test/zones/vlan/bridge_vlanaware/expected_sdn_interfaces create mode 100644 test/zones/vlan/bridge_vlanaware/interfaces create mode 100644 test/zones/vlan/bridge_vlanaware/sdn_config create mode 100644 test/zones/vlan/bridge_vlanaware_vlanawarevnet/expected_sdn_interfaces create mode 100644 test/zones/vlan/bridge_vlanaware_vlanawarevnet/interfaces create mode 100644 test/zones/vlan/bridge_vlanaware_vlanawarevnet/sdn_config create mode 100644 test/zones/vlan/ovs/expected_sdn_interfaces create mode 100644 test/zones/vlan/ovs/interfaces create mode 100644 test/zones/vlan/ovs/sdn_config create mode 100644 test/zones/vlan/ovs_vlanware_vnet/expected_sdn_interfaces create mode 100644 test/zones/vlan/ovs_vlanware_vnet/interfaces create mode 100644 test/zones/vlan/ovs_vlanware_vnet/sdn_config create mode 100644 test/zones/vxlan/basic/expected_sdn_interfaces create mode 100644 test/zones/vxlan/basic/interfaces create mode 100644 test/zones/vxlan/basic/sdn_config create mode 100644 test/zones/vxlan/vlanawarevnet/expected_sdn_interfaces create mode 100644 test/zones/vxlan/vlanawarevnet/interfaces create mode 100644 test/zones/vxlan/vlanawarevnet/sdn_config -- 2.20.1