[pve-devel] [PATCH pve-network 0/3] add zones/controllers tests

Alexandre Derumier aderumier at odiso.com
Wed Dec 9 16:11:16 CET 2020


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





More information about the pve-devel mailing list