Add info about status to describe
Change-Id: I18b0ad156363f08b526be9d7765dad5383612a88
diff --git a/src/interpreter.cpp b/src/interpreter.cpp
index d01cb1d..8f419c3 100644
--- a/src/interpreter.cpp
+++ b/src/interpreter.cpp
@@ -142,7 +142,12 @@
void Interpreter::operator()(const describe_& describe) const
{
auto path = absolutePathFromCommand(describe);
- std::cout << path << ": " << buildTypeInfo(path) << std::endl;
+ auto status = m_datastore.schema()->status(path);
+ auto statusStr = status == yang::Status::Deprecated ? " (deprecated)" :
+ status == yang::Status::Obsolete ? " (obsolete)" :
+ "";
+
+ std::cout << path << ": " << buildTypeInfo(path) << statusStr << std::endl;
if (auto description = m_datastore.schema()->description(path)) {
std::cout << std::endl << *description << std::endl;
}