diff --git a/holo-daemon/src/northbound/client/grpc.rs b/holo-daemon/src/northbound/client/grpc.rs index 4a3cec6c..4ecbb8b5 100644 --- a/holo-daemon/src/northbound/client/grpc.rs +++ b/holo-daemon/src/northbound/client/grpc.rs @@ -9,7 +9,7 @@ use std::time::SystemTime; use futures::Stream; use holo_utils::Sender; -use holo_yang::YANG_CTX; +use holo_yang::{YANG_CTX, YANG_FEATURES}; use tokio::sync::oneshot; use tonic::transport::{Server, ServerTlsConfig}; use tonic::{Request, Response, Status}; @@ -63,6 +63,15 @@ impl proto::Northbound for NorthboundService { .unwrap_or_default() .to_owned(), revision: module.revision().unwrap_or_default().to_owned(), + supported_features: YANG_FEATURES + .get(&module.name()) + .map(|features| { + features + .iter() + .map(|feature| (*feature).to_owned()) + .collect() + }) + .unwrap_or_default(), }) .collect(); diff --git a/proto/holo.proto b/proto/holo.proto index 985c0f7d..1fb4af72 100644 --- a/proto/holo.proto +++ b/proto/holo.proto @@ -231,6 +231,9 @@ message ModuleData { // Latest revision of the module; string revision = 3; + + // Supported features. + repeated string supported_features = 4; } // Supported encodings for YANG instance data.