public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
* [PATCH network] sdn: remove faucet controller and zone
@ 2026-09-03 12:56 Gabriel Goller
  0 siblings, 0 replies; only message in thread
From: Gabriel Goller @ 2026-09-03 12:56 UTC (permalink / raw)
  To: pve-devel

Was never exposed and doesn't work anyways.

Signed-off-by: Gabriel Goller <g.goller@proxmox.com>
---
 src/PVE/API2/Network/SDN/Controllers.pm       |  1 -
 src/PVE/API2/Network/SDN/Zones.pm             |  1 -
 src/PVE/Network/SDN/Controllers.pm            |  2 -
 .../Network/SDN/Controllers/FaucetPlugin.pm   | 95 -------------------
 src/PVE/Network/SDN/Controllers/Makefile      |  2 +-
 src/PVE/Network/SDN/Zones.pm                  |  2 -
 src/PVE/Network/SDN/Zones/FaucetPlugin.pm     | 72 --------------
 src/PVE/Network/SDN/Zones/Makefile            |  2 +-
 8 files changed, 2 insertions(+), 175 deletions(-)
 delete mode 100644 src/PVE/Network/SDN/Controllers/FaucetPlugin.pm
 delete mode 100644 src/PVE/Network/SDN/Zones/FaucetPlugin.pm

diff --git a/src/PVE/API2/Network/SDN/Controllers.pm b/src/PVE/API2/Network/SDN/Controllers.pm
index 7f8729334cf6..9b119607f43f 100644
--- a/src/PVE/API2/Network/SDN/Controllers.pm
+++ b/src/PVE/API2/Network/SDN/Controllers.pm
@@ -12,7 +12,6 @@ use PVE::Network::SDN::Controllers;
 use PVE::Network::SDN::Controllers::Plugin;
 use PVE::Network::SDN::Controllers::EvpnPlugin;
 use PVE::Network::SDN::Controllers::BgpPlugin;
-use PVE::Network::SDN::Controllers::FaucetPlugin;
 
 use Storable qw(dclone);
 use PVE::JSONSchema qw(get_standard_option);
diff --git a/src/PVE/API2/Network/SDN/Zones.pm b/src/PVE/API2/Network/SDN/Zones.pm
index b897cbdff973..5d98ef6656ca 100644
--- a/src/PVE/API2/Network/SDN/Zones.pm
+++ b/src/PVE/API2/Network/SDN/Zones.pm
@@ -18,7 +18,6 @@ use PVE::Network::SDN::Vnets;
 use PVE::Network::SDN;
 
 use PVE::Network::SDN::Zones::EvpnPlugin;
-use PVE::Network::SDN::Zones::FaucetPlugin;
 use PVE::Network::SDN::Zones::Plugin;
 use PVE::Network::SDN::Zones::QinQPlugin;
 use PVE::Network::SDN::Zones::SimplePlugin;
diff --git a/src/PVE/Network/SDN/Controllers.pm b/src/PVE/Network/SDN/Controllers.pm
index b2c2f9d91a5c..b1c0a72f2aeb 100644
--- a/src/PVE/Network/SDN/Controllers.pm
+++ b/src/PVE/Network/SDN/Controllers.pm
@@ -14,12 +14,10 @@ use PVE::Network::SDN::Zones;
 use PVE::Network::SDN::Controllers::EvpnPlugin;
 use PVE::Network::SDN::Controllers::BgpPlugin;
 use PVE::Network::SDN::Controllers::IsisPlugin;
-use PVE::Network::SDN::Controllers::FaucetPlugin;
 use PVE::Network::SDN::Controllers::Plugin;
 PVE::Network::SDN::Controllers::EvpnPlugin->register();
 PVE::Network::SDN::Controllers::BgpPlugin->register();
 PVE::Network::SDN::Controllers::IsisPlugin->register();
-PVE::Network::SDN::Controllers::FaucetPlugin->register();
 PVE::Network::SDN::Controllers::Plugin->init();
 
 sub sdn_controllers_config {
diff --git a/src/PVE/Network/SDN/Controllers/FaucetPlugin.pm b/src/PVE/Network/SDN/Controllers/FaucetPlugin.pm
deleted file mode 100644
index 5024bed99b9e..000000000000
--- a/src/PVE/Network/SDN/Controllers/FaucetPlugin.pm
+++ /dev/null
@@ -1,95 +0,0 @@
-package PVE::Network::SDN::Controllers::FaucetPlugin;
-
-use strict;
-use warnings;
-use PVE::Network::SDN::Controllers::Plugin;
-use PVE::Tools;
-use PVE::INotify;
-use PVE::JSONSchema qw(get_standard_option);
-use CPAN::Meta::YAML;
-use Encode;
-
-use base('PVE::Network::SDN::Controllers::Plugin');
-
-sub type {
-    return 'faucet';
-}
-
-sub properties {
-    return {};
-}
-
-# Plugin implementation
-sub generate_controller_config {
-    my ($class, $plugin_config, $controller_cfg, $id, $uplinks, $config) = @_;
-
-}
-
-sub generate_controller_zone_config {
-    my ($class, $plugin_config, $controller, $controller_cfg, $id, $uplinks, $config) = @_;
-
-    my $dpid = $plugin_config->{'dp-id'};
-    my $dphex = printf("%x", $dpid);
-
-    my $zone_config = {
-        dp_id => $dphex,
-        hardware => "Open vSwitch",
-    };
-
-    $config->{faucet}->{dps}->{$id} = $zone_config;
-
-}
-
-sub generate_controller_vnet_config {
-    my ($class, $plugin_config, $controller, $zone, $zoneid, $vnetid, $config) = @_;
-
-    my $mac = $plugin_config->{mac};
-    my $ipv4 = $plugin_config->{ipv4};
-    my $ipv6 = $plugin_config->{ipv6};
-    my $tag = $plugin_config->{tag};
-    my $alias = $plugin_config->{alias};
-
-    my @ips = ();
-    push @ips, $ipv4 if $ipv4;
-    push @ips, $ipv6 if $ipv6;
-
-    my $vlan_config = { vid => $tag };
-
-    $vlan_config->{description} = $alias if $alias;
-    $vlan_config->{faucet_mac} = $mac if $mac;
-    $vlan_config->{faucet_vips} = \@ips if scalar @ips > 0;
-
-    $config->{faucet}->{vlans}->{$vnetid} = $vlan_config;
-
-    push(@{ $config->{faucet}->{routers}->{$zoneid}->{vlans} }, $vnetid);
-
-}
-
-sub write_controller_config {
-    my ($class, $plugin_config, $config) = @_;
-
-    my $rawconfig = encode('UTF-8', CPAN::Meta::YAML::Dump($config->{faucet}));
-
-    return if !$rawconfig;
-    return if !-d "/etc/faucet";
-
-    my $frr_config_file = "/etc/faucet/faucet.yaml";
-
-    my $writefh = IO::File->new($frr_config_file, ">");
-    print $writefh $rawconfig;
-    $writefh->close();
-}
-
-sub reload_controller {
-    my ($class) = @_;
-
-    my $conf_file = "/etc/faucet/faucet.yaml";
-    my $bin_path = "/usr/bin/faucet";
-
-    if (-e $conf_file && -e $bin_path) {
-        PVE::Tools::run_command(['systemctl', 'reload', 'faucet']);
-    }
-}
-
-1;
-
diff --git a/src/PVE/Network/SDN/Controllers/Makefile b/src/PVE/Network/SDN/Controllers/Makefile
index fd9f881a0ad2..1464f29086f7 100644
--- a/src/PVE/Network/SDN/Controllers/Makefile
+++ b/src/PVE/Network/SDN/Controllers/Makefile
@@ -1,4 +1,4 @@
-SOURCES=Plugin.pm FaucetPlugin.pm EvpnPlugin.pm BgpPlugin.pm IsisPlugin.pm
+SOURCES=Plugin.pm EvpnPlugin.pm BgpPlugin.pm IsisPlugin.pm
 
 
 PERL5DIR=${DESTDIR}/usr/share/perl5
diff --git a/src/PVE/Network/SDN/Zones.pm b/src/PVE/Network/SDN/Zones.pm
index f66830324766..3ea0b954d97d 100644
--- a/src/PVE/Network/SDN/Zones.pm
+++ b/src/PVE/Network/SDN/Zones.pm
@@ -14,7 +14,6 @@ use PVE::Network::SDN::Zones::VlanPlugin;
 use PVE::Network::SDN::Zones::QinQPlugin;
 use PVE::Network::SDN::Zones::VxlanPlugin;
 use PVE::Network::SDN::Zones::EvpnPlugin;
-use PVE::Network::SDN::Zones::FaucetPlugin;
 use PVE::Network::SDN::Zones::SimplePlugin;
 use PVE::Network::SDN::Zones::Plugin;
 
@@ -22,7 +21,6 @@ PVE::Network::SDN::Zones::VlanPlugin->register();
 PVE::Network::SDN::Zones::QinQPlugin->register();
 PVE::Network::SDN::Zones::VxlanPlugin->register();
 PVE::Network::SDN::Zones::EvpnPlugin->register();
-PVE::Network::SDN::Zones::FaucetPlugin->register();
 PVE::Network::SDN::Zones::SimplePlugin->register();
 PVE::Network::SDN::Zones::Plugin->init();
 
diff --git a/src/PVE/Network/SDN/Zones/FaucetPlugin.pm b/src/PVE/Network/SDN/Zones/FaucetPlugin.pm
deleted file mode 100644
index 5f069aea85de..000000000000
--- a/src/PVE/Network/SDN/Zones/FaucetPlugin.pm
+++ /dev/null
@@ -1,72 +0,0 @@
-package PVE::Network::SDN::Zones::FaucetPlugin;
-
-use strict;
-use warnings;
-use PVE::Network::SDN::Zones::VlanPlugin;
-
-use base('PVE::Network::SDN::Zones::VlanPlugin');
-
-sub type {
-    return 'faucet';
-}
-
-sub properties {
-    return {
-        'dp-id' => {
-            type => 'integer',
-            description => 'Faucet dataplane id',
-        },
-    };
-}
-
-sub options {
-
-    return {
-        nodes => { optional => 1 },
-        'dp-id' => { optional => 0 },
-        #	'uplink-id' => { optional => 0 },
-        'controller' => { optional => 0 },
-        dns => { optional => 1 },
-        reversedns => { optional => 1 },
-        dnszone => { optional => 1 },
-        ipam => { optional => 1 },
-    };
-}
-
-# Plugin implementation
-sub generate_sdn_config {
-    my ($class, $plugin_config, $zoneid, $vnetid, $vnet, $uplinks, $controller, $config) = @_;
-
-    my $mtu = $vnet->{mtu};
-    my $uplink = $plugin_config->{'uplink-id'};
-    my $dpid = $plugin_config->{'dp-id'};
-    my $dphex = printf("%x", $dpid); #fixme :should be 16characters hex
-
-    my $iface = $uplinks->{$uplink}->{name};
-    $iface = "uplink${uplink}" if !$iface;
-
-    #tagged interface
-    my @iface_config = ();
-    push @iface_config, "ovs_type OVSPort";
-    push @iface_config, "ovs_bridge $zoneid";
-    push @iface_config, "ovs_mtu $mtu" if $mtu;
-    push(@{ $config->{$iface} }, @iface_config) if !$config->{$iface};
-
-    #vnet bridge
-    @iface_config = ();
-    push @iface_config, "ovs_port $iface";
-    push @iface_config, "ovs_type OVSBridge";
-    push @iface_config, "ovs_mtu $mtu" if $mtu;
-
-    push @iface_config, "ovs_extra set bridge $zoneid other-config:datapath-id=$dphex";
-    push @iface_config, "ovs_extra set bridge $zoneid other-config:disable-in-band=true";
-    push @iface_config, "ovs_extra set bridge $zoneid fail_mode=secure";
-    push @iface_config, "ovs_extra set-controller $vnetid tcp:127.0.0.1:6653";
-
-    push(@{ $config->{$zoneid} }, @iface_config) if !$config->{$zoneid};
-
-    return $config;
-}
-
-1;
-
diff --git a/src/PVE/Network/SDN/Zones/Makefile b/src/PVE/Network/SDN/Zones/Makefile
index 8454388d7eb7..7ea779a46967 100644
--- a/src/PVE/Network/SDN/Zones/Makefile
+++ b/src/PVE/Network/SDN/Zones/Makefile
@@ -1,4 +1,4 @@
-SOURCES=Plugin.pm VlanPlugin.pm VxlanPlugin.pm FaucetPlugin.pm EvpnPlugin.pm QinQPlugin.pm SimplePlugin.pm
+SOURCES=Plugin.pm VlanPlugin.pm VxlanPlugin.pm EvpnPlugin.pm QinQPlugin.pm SimplePlugin.pm
 
 
 PERL5DIR=${DESTDIR}/usr/share/perl5
-- 
2.47.3





^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-09-03 12:56 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-03 12:56 [PATCH network] sdn: remove faucet controller and zone Gabriel Goller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal