my $scfg = PVE::Network::Network::network_config($cfg, $networkid);
-# my $plugin = PVE::Network::Network::Plugin->lookup($scfg->{type});
-# $plugin->on_delete_hook($networkid, $scfg);
+ my $plugin = PVE::Network::Network::Plugin->lookup($scfg->{type});
+ $plugin->on_delete_hook($networkid, $scfg);
delete $cfg->{ids}->{$networkid};
- #improveme:
- #check that vnet don't use this transport
PVE::Network::Network::write_config($cfg);
}, "delete network object failed");
die "please implement inside plugin";
}
+sub on_delete_hook {
+ my ($class, $networkid, $scfg) = @_;
+
+ # do nothing by default
+}
+
#helpers
sub parse_tag_number_or_range {
my ($str, $max, $tag) = @_;
return $config;
}
+sub on_delete_hook {
+ my ($class, $networkid, $scfg) = @_;
+
+ # verify that no vnet are associated to this transport
+}
+
1;
};
}
+sub on_delete_hook {
+ my ($class, $networkid, $scfg) = @_;
+
+ # verify than no vm or ct have interfaces in this bridge
+}
+
1;
return $config;
}
+sub on_delete_hook {
+ my ($class, $networkid, $scfg) = @_;
+
+ # verify that no vnet are associated to this transport
+}
+
1;