[pve-devel] [PATCH pve-manager 5/5] api2 : nodes : sdn status endpoint
Alexandre Derumier
aderumier at odiso.com
Wed Aug 21 05:22:40 CEST 2019
Signed-off-by: Alexandre Derumier <aderumier at odiso.com>
---
PVE/API2/Nodes.pm | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/PVE/API2/Nodes.pm b/PVE/API2/Nodes.pm
index 9921c9e1..af9fe732 100644
--- a/PVE/API2/Nodes.pm
+++ b/PVE/API2/Nodes.pm
@@ -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 => '',
--
2.20.1
More information about the pve-devel
mailing list