]> git.proxmox.com Git - pve-manager.git/commitdiff
api2 : nodes : sdn status endpoint
authorAlexandre Derumier <aderumier@odiso.com>
Wed, 21 Aug 2019 03:22:40 +0000 (05:22 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Tue, 3 Sep 2019 08:28:55 +0000 (10:28 +0200)
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
PVE/API2/Nodes.pm

index 97510574f46df9c3babfe75278325e690916c27a..9e731e05b7d854edc8500a51231d9b6a358ca0e9 100644 (file)
@@ -50,6 +50,12 @@ use PVE::API2::Disks;
 use JSON;
 use Socket;
 
+my $have_sdn;
+eval {
+    require PVE::API2::Network::SDN::Status;
+    $have_sdn = 1;
+};
+
 use base qw(PVE::RESTHandler);
 
 __PACKAGE__->register_method ({
@@ -139,6 +145,13 @@ __PACKAGE__->register_method ({
     path => 'config',
 });
 
+if ($have_sdn) {
+    __PACKAGE__->register_method ({
+       subclass => "PVE::API2::Network::SDN::Status",
+       path => 'sdn',
+    });
+}
+
 __PACKAGE__->register_method ({
     name => 'index',
     path => '',