Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
use PVE::API2::HAConfig;
use PVE::API2::ReplicationConfig;
+my $have_sdn;
+eval {
+ require PVE::API2::Network::SDN;
+ $have_sdn = 1;
+};
+
use base qw(PVE::RESTHandler);
__PACKAGE__->register_method ({
path => 'ceph',
});
+if ($have_sdn) {
+ __PACKAGE__->register_method ({
+ subclass => "PVE::API2::Network::SDN",
+ path => 'sdn',
+ });
+}
+
my $dc_schema = PVE::Cluster::get_datacenter_schema();
my $dc_properties = {
delete => {
{ name => 'ceph' },
];
+ if ($have_sdn) {
+ push(@{$result}, { name => 'sdn' });
+ }
+
return $result;
}});