From 209e50e557be81c33cd5f5852711fd467c8965de Mon Sep 17 00:00:00 2001 From: Yan Gorelik Date: Fri, 5 Jan 2018 17:52:42 -0800 Subject: [PATCH 01/24] Updated libyang library to support more than 255 typedef statements --- sdk/cpp/core/CMakeLists.txt | 22 +++++++++++-- sdk/cpp/core/src/path/data_node.cpp | 32 +++++++++++-------- sdk/cpp/core/src/path/path.cpp | 4 +-- sdk/cpp/core/src/path/repository.cpp | 11 ++++--- sdk/cpp/core/src/path/root_data_node.cpp | 2 +- sdk/cpp/core/src/path/root_schema_node.cpp | 2 +- sdk/cpp/core/src/path/rpc.cpp | 15 ++++++--- sdk/cpp/core/src/path/schema_node.cpp | 5 ++- sdk/cpp/core/tests/CMakeLists.txt | 3 +- .../models/ydktest-sanity@2015-11-17.yang | 2 +- yang/ydktest/ydktest-sanity@2015-11-17.yang | 2 +- 11 files changed, 65 insertions(+), 35 deletions(-) diff --git a/sdk/cpp/core/CMakeLists.txt b/sdk/cpp/core/CMakeLists.txt index e010d70ed..98c08b948 100644 --- a/sdk/cpp/core/CMakeLists.txt +++ b/sdk/cpp/core/CMakeLists.txt @@ -279,13 +279,16 @@ set(netconf_objs # Set LibYang variables set(libyang_location ${CMAKE_CURRENT_BINARY_DIR}/project_libyang/src/project_libyang) +set(libyang_build_location ${CMAKE_CURRENT_BINARY_DIR}/project_libyang/src/project_libyang-build) set(libyang_headers ${libyang_location}/src/common.h ${libyang_location}/src/context.h ${libyang_location}/src/dict.h ${libyang_location}/src/dict_private.h - ${libyang_location}/src/libyang.h + ${libyang_location}/src/extensions.h + ${libyang_build_location}/src/extensions_config.h + ${libyang_build_location}/src/libyang.h ${libyang_location}/src/parser.h ${libyang_location}/src/parser_yang.h ${libyang_location}/src/parser_yang_bis.h @@ -336,6 +339,7 @@ find_library(xslt_location xslt) find_library(pcre_location pcre) find_library(pthread_location pthread) find_library(dl_location dl) +find_library(m_location m) find_package(LibXml2 REQUIRED) find_package(LibSSH REQUIRED) @@ -383,7 +387,7 @@ set(libyang_include_location include/libyang) set(libyang_headers_location ${CMAKE_CURRENT_BINARY_DIR}/project_libyang/headers) ExternalProject_Add(project_libyang PREFIX "${CMAKE_CURRENT_BINARY_DIR}/project_libyang" - URL "https://github.com/manradhaCisco/libyang/archive/master.zip" + URL "https://github.com/ygorelik/libyang/archive/master.zip" CMAKE_ARGS -DSTATIC=true -DCMAKE_BUILD_TYPE=Debug INSTALL_DIR "${libyang_location}" INSTALL_COMMAND mkdir -p ${libyang_headers_location}/libyang && cp ${libyang_headers} ${libyang_headers_location}/libyang @@ -437,13 +441,24 @@ target_link_libraries(ydk ${pcre_location} ${xslt_location} ${pthread_location} - ${dl_location} libnetconf libyang + ${dl_location} ) set_property(TARGET ydk PROPERTY CXX_STANDARD 11) set_property(TARGET ydk PROPERTY CXX_STANDARD_REQUIRED ON) +set(libyang_extension_lib + ${libyang_build_location}/src/extensions/libyang_ext_test.so + ${libyang_build_location}/src/extensions/metadata.so + ${libyang_build_location}/src/extensions/nacm.so +) + +if(PLUGINS_DIR) + set(LIBYANG_EXT_PLUGINS_DIR ${PLUGINS_DIR}) +else() + set(LIBYANG_EXT_PLUGINS_DIR ${LIB_INSTALL_DIR}/libyang) +endif() install(TARGETS ydk DESTINATION ${LIB_INSTALL_DIR}) install(FILES ${libydk_install_headers} DESTINATION ${INCLUDE_INSTALL_DIR}) @@ -452,6 +467,7 @@ install(FILES ${SPDLOG_DETAILS_HEADERS} DESTINATION ${spdlog_details_include_loc install(FILES ${SPDLOG_FMT_HEADERS} DESTINATION ${spdlog_fmt_include_location}) install(FILES ${SPDLOG_FMT_BUNDLED_HEADERS} DESTINATION ${spdlog_fmt_bundled_include_location}) install(FILES ${SPDLOG_SINKS_HEADERS} DESTINATION ${spdlog_sinks_include_location}) +install(FILES ${libyang_extension_lib} DESTINATION ${LIBYANG_EXT_PLUGINS_DIR}) # generate doxygen documentation for ydk_core API find_package(Doxygen) diff --git a/sdk/cpp/core/src/path/data_node.cpp b/sdk/cpp/core/src/path/data_node.cpp index ca53012c8..cffba064b 100644 --- a/sdk/cpp/core/src/path/data_node.cpp +++ b/sdk/cpp/core/src/path/data_node.cpp @@ -316,12 +316,12 @@ ydk::path::DataNodeImpl::find(const std::string& path) } YLOG_DEBUG("Getting child schema with path '{}' in {}", spath, m_node->schema->name); const lys_node* found_snode = - ly_ctx_get_node(m_node->schema->module->ctx, m_node->schema, spath.c_str()); + ly_ctx_get_node(m_node->schema->module->ctx, m_node->schema, spath.c_str(), 1); if(found_snode) { YLOG_DEBUG("Getting data nodes with path '{}'", path); - ly_set* result_set = lyd_find_xpath(m_node, path.c_str()); + ly_set* result_set = lyd_find_path(m_node, path.c_str()); if( result_set ) { if (result_set->number > 0) @@ -484,13 +484,16 @@ ydk::path::DataNodeImpl::remove_annotation(const ydk::path::Annotation& an) lyd_attr* attr = m_node->attr; while(attr){ - lys_module *module = attr->module; - if(module){ - Annotation an1{module->ns, attr->name, attr->value}; - if (an == an1){ - lyd_free_attr(m_node->schema->module->ctx, m_node, attr, 0); - return true; - } + lyd_node* node = attr->parent; + if (node && node->schema) { + lys_module* module = node->schema->module; + if(module){ + Annotation an1{module->ns, attr->name, attr->value_str}; + if (an == an1){ + lyd_free_attr(m_node->schema->module->ctx, m_node, attr, 0); + return true; + } + } } } @@ -505,15 +508,16 @@ ydk::path::DataNodeImpl::annotations() if(m_node) { lyd_attr* attr = m_node->attr; while(attr) { - lys_module *module = attr->module; - if(module) { - ann.emplace_back(module->ns, attr->name, attr->value); - + lyd_node* node = attr->parent; + if (node && node->schema) { + lys_module* module = node->schema->module; + if(module) { + ann.emplace_back(module->ns, attr->name, attr->value_str); + } } attr = attr->next; } } - return ann; } diff --git a/sdk/cpp/core/src/path/path.cpp b/sdk/cpp/core/src/path/path.cpp index 0994b77ce..7f1c1ffa3 100644 --- a/sdk/cpp/core/src/path/path.cpp +++ b/sdk/cpp/core/src/path/path.cpp @@ -165,11 +165,9 @@ ydk::path::ValidationService::validate(const ydk::path::DataNode & dn, ydk::Vali break; case ydk::ValidationService::Option::GET_CONFIG: option_str="GET-CONFIG"; - ly_option = LYD_OPT_GETCONFIG; + ly_option = LYD_OPT_GETCONFIG | LYD_OPT_NOAUTODEL; break; - } - ly_option = ly_option | LYD_OPT_NOAUTODEL; YLOG_INFO("Validation called on {} with option {}", dn.get_path(), option_str); diff --git a/sdk/cpp/core/src/path/repository.cpp b/sdk/cpp/core/src/path/repository.cpp index 3960533b0..8392c355a 100644 --- a/sdk/cpp/core/src/path/repository.cpp +++ b/sdk/cpp/core/src/path/repository.cpp @@ -41,8 +41,9 @@ namespace ydk { static bool file_exists(const std::string & path) { - struct stat st = {0}; + struct stat st; + memset( &st, 0, sizeof(struct stat)); return stat(path.c_str(), &st) == 0; } @@ -279,7 +280,7 @@ ly_ctx* ydk::path::RepositoryPtr::create_ly_context() YLOG_INFO("Path where models are to be downloaded: {}", path); } YLOG_DEBUG("Creating libyang context in path: {}", path); - struct ly_ctx* ctx = ly_ctx_new(path.c_str()); + struct ly_ctx* ctx = ly_ctx_new(path.c_str(), 0); if(!ctx) { YLOG_ERROR("Could not create repository in: {}", path); @@ -289,7 +290,7 @@ ly_ctx* ydk::path::RepositoryPtr::create_ly_context() //set module callback (only if there is a model provider) if(!model_providers.empty()) { - ly_ctx_set_module_clb(ctx, get_module_callback, this); + ly_ctx_set_module_imp_clb(ctx, get_module_callback, this); } return ctx; @@ -462,11 +463,11 @@ ydk::path::RepositoryPtr::load_module(ly_ctx* ctx, const std::string& module, co YLOG_DEBUG("Module '{}' Revision '{}'", module.c_str(), revision.c_str()); - auto p = ly_ctx_get_module(ctx, module.c_str(), revision.empty() ? 0 : revision.c_str()); + auto p = ly_ctx_get_module(ctx, module.c_str(), revision.empty() ? NULL : revision.c_str(), 1); if(!p) { - p = ly_ctx_load_module(ctx, module.c_str(), revision.empty() ? 0 : revision.c_str()); + p = ly_ctx_load_module(ctx, module.c_str(), revision.empty() ? NULL : revision.c_str()); } else { YLOG_DEBUG("Cache hit Module '{}' Revision '{}'", module, revision); new_module = false; diff --git a/sdk/cpp/core/src/path/root_data_node.cpp b/sdk/cpp/core/src/path/root_data_node.cpp index 04fd8a4d7..8dbb86b2b 100644 --- a/sdk/cpp/core/src/path/root_data_node.cpp +++ b/sdk/cpp/core/src/path/root_data_node.cpp @@ -220,7 +220,7 @@ ydk::path::RootDataImpl::find(const std::string& path) schema_path+=path; YLOG_DEBUG("Looking for schema nodes path in root: '{}'", schema_path); - const struct lys_node* found_snode = ly_ctx_get_node(m_node->schema->module->ctx, nullptr, schema_path.c_str()); + const struct lys_node* found_snode = ly_ctx_get_node(m_node->schema->module->ctx, nullptr, schema_path.c_str(), 1); if(found_snode) { diff --git a/sdk/cpp/core/src/path/root_schema_node.cpp b/sdk/cpp/core/src/path/root_schema_node.cpp index ea88c5870..28eaf254d 100644 --- a/sdk/cpp/core/src/path/root_schema_node.cpp +++ b/sdk/cpp/core/src/path/root_schema_node.cpp @@ -316,7 +316,7 @@ ydk::path::RootSchemaNodeImpl::find(const std::string& path) std::string full_path{"/"}; full_path+=path; - const struct lys_node* found_node = ly_ctx_get_node(m_ctx, nullptr, full_path.c_str()); + const struct lys_node* found_node = ly_ctx_get_node(m_ctx, nullptr, full_path.c_str(), 1); if (found_node){ auto p = reinterpret_cast(found_node->priv); diff --git a/sdk/cpp/core/src/path/rpc.cpp b/sdk/cpp/core/src/path/rpc.cpp index 3a03e9884..b70440f7e 100644 --- a/sdk/cpp/core/src/path/rpc.cpp +++ b/sdk/cpp/core/src/path/rpc.cpp @@ -104,17 +104,24 @@ static bool is_part_of_output(lys_node* node_result) bool ydk::path::RpcImpl::has_output_node() const { + std::string node_path = lys_path( data_node->m_node->schema); + std::string search_path = node_path + "//*"; // Patterns includes only descendants of the node + ly_verb(LY_LLSILENT); //turn off libyang logging at the beginning - ly_set* result_set = lys_find_xpath(data_node->m_node->schema, "*", LYS_FIND_OUTPUT); + ly_set* result_set = lys_find_path(data_node->m_node->schema->module, data_node->m_node->schema, search_path.c_str()); ly_verb(LY_LLVRB); // enable libyang logging after find has completed + + auto result = false; if(result_set && result_set->number > 0) { for(size_t i=0; i < result_set->number; i++) { lys_node* node_result = result_set->set.s[i]; - if(is_part_of_output(node_result)) - return true; + if (is_part_of_output(node_result)) { + result = true; + break; + } } } - return false; + return result; } diff --git a/sdk/cpp/core/src/path/schema_node.cpp b/sdk/cpp/core/src/path/schema_node.cpp index 97eecf7a2..eba1820fa 100644 --- a/sdk/cpp/core/src/path/schema_node.cpp +++ b/sdk/cpp/core/src/path/schema_node.cpp @@ -139,7 +139,7 @@ ydk::path::SchemaNodeImpl::find(const string& path) vector ret; struct ly_ctx* ctx = m_node->module->ctx; - const struct lys_node* found_node = ly_ctx_get_node(ctx, m_node, path.c_str()); + const struct lys_node* found_node = ly_ctx_get_node(ctx, m_node, path.c_str(), 0); if (found_node) { @@ -261,6 +261,9 @@ ydk::path::SchemaNodeImpl::get_statement() const case LYS_ACTION: s.keyword = "action"; break; + case LYS_EXT: + s.keyword = "extension"; + break; case LYS_ANYDATA: case LYS_UNKNOWN: break; diff --git a/sdk/cpp/core/tests/CMakeLists.txt b/sdk/cpp/core/tests/CMakeLists.txt index 6448670af..5f5a32044 100644 --- a/sdk/cpp/core/tests/CMakeLists.txt +++ b/sdk/cpp/core/tests/CMakeLists.txt @@ -25,7 +25,8 @@ foreach(test_name IN LISTS core_tests) pcre ssh_threads xml2 - ssh) + ssh + dl) add_test(NAME ${test_name} COMMAND $) endforeach(test_name) diff --git a/sdk/cpp/core/tests/models/ydktest-sanity@2015-11-17.yang b/sdk/cpp/core/tests/models/ydktest-sanity@2015-11-17.yang index 26a61e612..f2b3e3476 100644 --- a/sdk/cpp/core/tests/models/ydktest-sanity@2015-11-17.yang +++ b/sdk/cpp/core/tests/models/ydktest-sanity@2015-11-17.yang @@ -120,7 +120,7 @@ module ydktest-sanity { container one { leaf name-of-one { type string { - pattern "(([0\-9]\|[1\-9][0\-9]\|1[0\-9][0\-9]\|2[0\-4][0\-9]\|25[0\-5])\\.){3}([0\-9]\|[1\-9][0\-9]\|1[0\-9][0\-9]\|2[0\-4][0\-9]\|25[0\-5])(%[\\p{N}\\p{L}]+)?"; + pattern '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\p{N}\p{L}]+)?'; } } diff --git a/yang/ydktest/ydktest-sanity@2015-11-17.yang b/yang/ydktest/ydktest-sanity@2015-11-17.yang index a02aee3c9..28af20d1a 100644 --- a/yang/ydktest/ydktest-sanity@2015-11-17.yang +++ b/yang/ydktest/ydktest-sanity@2015-11-17.yang @@ -120,7 +120,7 @@ module ydktest-sanity { container one { leaf name-of-one { type string { - pattern "(([0\-9]\|[1\-9][0\-9]\|1[0\-9][0\-9]\|2[0\-4][0\-9]\|25[0\-5])\\.){3}([0\-9]\|[1\-9][0\-9]\|1[0\-9][0\-9]\|2[0\-4][0\-9]\|25[0\-5])(%[\\p{N}\\p{L}]+)?"; + pattern '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\p{N}\p{L}]+)?'; } } From 7009c053fce251bdf2d5b1fb93e8930ce7ca6566 Mon Sep 17 00:00:00 2001 From: Yan Gorelik Date: Thu, 11 Jan 2018 10:20:57 -0800 Subject: [PATCH 02/24] Fixed C++ tests after libyang upgrade --- sdk/cpp/core/CMakeLists.txt | 1 + sdk/cpp/core/src/netconf_ssh_client.cpp | 2 +- sdk/cpp/core/src/netconf_tcp_client.cpp | 2 +- sdk/cpp/core/src/path/data_node.cpp | 10 ++-------- sdk/cpp/core/src/path/root_schema_node.cpp | 5 ++++- sdk/cpp/core/tests/models/ydktest-aug-ietf-5.yang | 5 +++++ sdk/cpp/tests/test_on_demand_loading.cpp | 4 ++-- sdk/cpp/tests/test_sanity_levels.cpp | 13 +++++-------- .../ydktest-aug-ietf-5@2017-07-26.yang | 5 +++++ 9 files changed, 26 insertions(+), 21 deletions(-) diff --git a/sdk/cpp/core/CMakeLists.txt b/sdk/cpp/core/CMakeLists.txt index 98c08b948..0e9b8bcc5 100644 --- a/sdk/cpp/core/CMakeLists.txt +++ b/sdk/cpp/core/CMakeLists.txt @@ -308,6 +308,7 @@ set(yang_objs common.c.o context.c.o dict.c.o + extensions.c.o log.c.o parser.c.o parser_json.c.o diff --git a/sdk/cpp/core/src/netconf_ssh_client.cpp b/sdk/cpp/core/src/netconf_ssh_client.cpp index 6c1da5082..da53128a4 100644 --- a/sdk/cpp/core/src/netconf_ssh_client.cpp +++ b/sdk/cpp/core/src/netconf_ssh_client.cpp @@ -110,7 +110,7 @@ int NetconfSSHClient::connect() std::string NetconfSSHClient::get_hostname_port() { ostringstream os; - os< NetconfTCPClient::get_capabilities() std::string NetconfTCPClient::get_hostname_port() { std::ostringstream os; - os << hostname << ":" << port; + os << hostname << "_" << port; return os.str(); } diff --git a/sdk/cpp/core/src/path/data_node.cpp b/sdk/cpp/core/src/path/data_node.cpp index cffba064b..1d54b06cd 100644 --- a/sdk/cpp/core/src/path/data_node.cpp +++ b/sdk/cpp/core/src/path/data_node.cpp @@ -308,15 +308,10 @@ ydk::path::DataNodeImpl::find(const std::string& path) if(m_node == nullptr) { return results; } - std::string spath{path}; - auto s = get_schema_node().get_statement(); - if(s.keyword == "rpc"){ - spath="input/" + spath; - } - YLOG_DEBUG("Getting child schema with path '{}' in {}", spath, m_node->schema->name); + YLOG_DEBUG("Getting child schema with path '{}' in {}", path, m_node->schema->name); const lys_node* found_snode = - ly_ctx_get_node(m_node->schema->module->ctx, m_node->schema, spath.c_str(), 1); + ly_ctx_get_node(m_node->schema->module->ctx, m_node->schema, path.c_str(), 0); if(found_snode) { @@ -334,7 +329,6 @@ ydk::path::DataNodeImpl::find(const std::string& path) } ly_set_free(result_set); } - } return results; diff --git a/sdk/cpp/core/src/path/root_schema_node.cpp b/sdk/cpp/core/src/path/root_schema_node.cpp index 28eaf254d..865336a22 100644 --- a/sdk/cpp/core/src/path/root_schema_node.cpp +++ b/sdk/cpp/core/src/path/root_schema_node.cpp @@ -39,6 +39,9 @@ static void get_namespaces_from_xml_doc(xmlNodePtr root, std::unordered_settype == XML_ELEMENT_NODE && curr->ns && curr->ns->href) { namespaces.insert(std::string{reinterpret_cast(curr->ns->href)}); + if (curr->nsDef && curr->nsDef->href) { + namespaces.insert(std::string{reinterpret_cast(curr->nsDef->href)}); + } } get_namespaces_from_xml_doc(curr->children, namespaces); } @@ -316,7 +319,7 @@ ydk::path::RootSchemaNodeImpl::find(const std::string& path) std::string full_path{"/"}; full_path+=path; - const struct lys_node* found_node = ly_ctx_get_node(m_ctx, nullptr, full_path.c_str(), 1); + const struct lys_node* found_node = ly_ctx_get_node(m_ctx, nullptr, full_path.c_str(), 0); if (found_node){ auto p = reinterpret_cast(found_node->priv); diff --git a/sdk/cpp/core/tests/models/ydktest-aug-ietf-5.yang b/sdk/cpp/core/tests/models/ydktest-aug-ietf-5.yang index 0a5e639bc..e2527be10 100644 --- a/sdk/cpp/core/tests/models/ydktest-aug-ietf-5.yang +++ b/sdk/cpp/core/tests/models/ydktest-aug-ietf-5.yang @@ -35,6 +35,11 @@ module ydktest-aug-ietf-5 { description "aug-identity"; } + identity derived-aug-identity { + description "derived aug-identity"; + base aug-identity; + } + augment /base-one:cpython/base-one:doc { leaf aug-5-identityref { type identityref { diff --git a/sdk/cpp/tests/test_on_demand_loading.cpp b/sdk/cpp/tests/test_on_demand_loading.cpp index b52248d94..400207a8d 100644 --- a/sdk/cpp/tests/test_on_demand_loading.cpp +++ b/sdk/cpp/tests/test_on_demand_loading.cpp @@ -33,7 +33,7 @@ using namespace ydk; std::string AUGMENTED_XML_PAYLOAD = R"( - aug-identity + yaug-five:derived-aug-identity true @@ -85,7 +85,7 @@ std::string AUGMENTED_JSON_PAYLOAD = R"({ "ydktest-aug-ietf-2:ydktest-aug-2": { "aug-two": "aug two" }, - "aug-5-identityref": "ydktest-aug-ietf-5:aug-identity" + "ydktest-aug-ietf-5:aug-5-identityref": "ydktest-aug-ietf-5:derived-aug-identity" }, "lib": { "ydktest-aug-ietf-4:ydktest-aug-4": { diff --git a/sdk/cpp/tests/test_sanity_levels.cpp b/sdk/cpp/tests/test_sanity_levels.cpp index a8d2e4ff1..2e8c3a7f8 100644 --- a/sdk/cpp/tests/test_sanity_levels.cpp +++ b/sdk/cpp/tests/test_sanity_levels.cpp @@ -535,7 +535,7 @@ TEST_CASE("test_leafref_pos") REQUIRE(reply); //CREATE - r_1->ydktest_sanity_one->name = "-|90|1-0|240|25-.-|90|199|200|25-.9|1-|1-9|240|250.-|99|199|2-9|25-"; + r_1->ydktest_sanity_one->name = "1.2.3.4"; r_1->two->sub1->number = 21; r_1->three->sub1->sub2->number = 311; auto e_1 = make_unique(); @@ -573,11 +573,11 @@ TEST_CASE("test_leafref_pos") r_1->inbtw_list->ldata.push_back(move(e_1)); r_1->inbtw_list->ldata.push_back(move(e_2)); - r_1->leaf_ref->ref_one_name = "-|90|1-0|240|25-.-|90|199|200|25-.9|1-|1-9|240|250.-|99|199|2-9|25-"; + r_1->leaf_ref->ref_one_name = "1.2.3.4"; r_1->leaf_ref->ref_two_sub1_number = 21; r_1->leaf_ref->ref_three_sub1_sub2_number = r_1->three->sub1->sub2->number.get(); - r_1->leaf_ref->one->name_of_one = "-|90|1-0|240|25-.-|90|199|200|25-.9|1-|1-9|240|250.-|99|199|2-9|25-"; - r_1->leaf_ref->one->two->self_ref_one_name = "-|90|1-0|240|25-.-|90|199|200|25-.9|1-|1-9|240|250.-|99|199|2-9|25-"; + r_1->leaf_ref->one->name_of_one = "1.2.3.4"; + r_1->leaf_ref->one->two->self_ref_one_name = "1.2.3.4"; reply = crud.create(provider, *r_1); REQUIRE(reply); @@ -592,7 +592,7 @@ TEST_CASE("test_leafref_pos") REQUIRE(r_1->inbtw_list->ldata[1]->name == r_2->inbtw_list->ldata[1]->name); REQUIRE(r_1->inbtw_list->ldata[0]->subc->subc_subl1[0]->number == r_1->inbtw_list->ldata[0]->subc->subc_subl1[0]->number); REQUIRE(r_1->inbtw_list->ldata[0]->subc->subc_subl1[0]->name == r_1->inbtw_list->ldata[0]->subc->subc_subl1[0]->name); - REQUIRE(*r_1 == *r_2); + REQUIRE(*r_1 == *r_2); } TEST_CASE("aug_one_pos") @@ -707,6 +707,3 @@ TEST_CASE("aug_leaf") ydktest_sanity::Runner* r_2 = dynamic_cast(r_read.get()); REQUIRE(r_2->ydktest_sanity_one->augmented_leaf==r_1->ydktest_sanity_one->augmented_leaf); } - - - diff --git a/yang/ydktest-augmentation/ydktest-aug-ietf-5@2017-07-26.yang b/yang/ydktest-augmentation/ydktest-aug-ietf-5@2017-07-26.yang index 0a5e639bc..e2527be10 100644 --- a/yang/ydktest-augmentation/ydktest-aug-ietf-5@2017-07-26.yang +++ b/yang/ydktest-augmentation/ydktest-aug-ietf-5@2017-07-26.yang @@ -35,6 +35,11 @@ module ydktest-aug-ietf-5 { description "aug-identity"; } + identity derived-aug-identity { + description "derived aug-identity"; + base aug-identity; + } + augment /base-one:cpython/base-one:doc { leaf aug-5-identityref { type identityref { From 6c2601beea0cefe2422019c10e190d28ceffc71f Mon Sep 17 00:00:00 2001 From: Yan Gorelik Date: Mon, 22 Jan 2018 16:53:20 -0800 Subject: [PATCH 03/24] fixed go tests after libyang upgrade --- sdk/cpp/core/src/path/repository.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdk/cpp/core/src/path/repository.cpp b/sdk/cpp/core/src/path/repository.cpp index 8392c355a..24d3b3542 100644 --- a/sdk/cpp/core/src/path/repository.cpp +++ b/sdk/cpp/core/src/path/repository.cpp @@ -280,7 +280,7 @@ ly_ctx* ydk::path::RepositoryPtr::create_ly_context() YLOG_INFO("Path where models are to be downloaded: {}", path); } YLOG_DEBUG("Creating libyang context in path: {}", path); - struct ly_ctx* ctx = ly_ctx_new(path.c_str(), 0); + struct ly_ctx* ctx = ly_ctx_new(path.c_str(), LY_CTX_ALLIMPLEMENTED); if(!ctx) { YLOG_ERROR("Could not create repository in: {}", path); From 7bb99e812fbba8b3526e45e811850ebb6640befe Mon Sep 17 00:00:00 2001 From: Yan Gorelik Date: Tue, 23 Jan 2018 15:54:30 -0800 Subject: [PATCH 04/24] Fixing Python tests after linyang upgrade --- sdk/python/core/tests/test_on_demand.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sdk/python/core/tests/test_on_demand.py b/sdk/python/core/tests/test_on_demand.py index 3131819e1..d02cf8967 100644 --- a/sdk/python/core/tests/test_on_demand.py +++ b/sdk/python/core/tests/test_on_demand.py @@ -40,7 +40,7 @@ AUGMENTED_XML_PAYLOAD = """ - aug-identity + yaug-five:derived-aug-identity true @@ -92,7 +92,7 @@ "ydktest-aug-ietf-2:ydktest-aug-2": { "aug-two": "aug two" }, - "aug-5-identityref": "ydktest-aug-ietf-5:aug-identity" + "ydktest-aug-ietf-5:aug-5-identityref": "ydktest-aug-ietf-5:derived-aug-identity" }, "lib": { "ydktest-aug-ietf-4:ydktest-aug-4": { From 928d268775be104d3ea4f4d63ed45cd1f7869a4e Mon Sep 17 00:00:00 2001 From: Yan Gorelik Date: Tue, 23 Jan 2018 17:24:09 -0800 Subject: [PATCH 05/24] Fixing Python augmentation tests after linyang upgrade --- sdk/python/core/tests/test_on_demand.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdk/python/core/tests/test_on_demand.py b/sdk/python/core/tests/test_on_demand.py index d02cf8967..ab83c7630 100644 --- a/sdk/python/core/tests/test_on_demand.py +++ b/sdk/python/core/tests/test_on_demand.py @@ -174,7 +174,7 @@ def test_on_demand_loading_xml(self): def test_on_demand_loading_json(self): self.codec_provider.encoding = EncodingFormat.JSON entity1 = self.codec.decode(self.codec_provider, AUGMENTED_JSON_PAYLOAD) - self.assertEqual(entity1.doc.aug_5_identityref.get(), "ydktest-aug-ietf-5:aug-identity") + self.assertEqual(entity1.doc.aug_5_identityref.get(), "ydktest-aug-ietf-5:derived-aug-identity") From 93798bed5c6806876f2ac3a8d28b50f19aa53892 Mon Sep 17 00:00:00 2001 From: Yan Date: Thu, 25 Jan 2018 01:14:12 -0500 Subject: [PATCH 06/24] fixing CentOS build after libyang upgrade --- sdk/cpp/core/CMakeLists.txt | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/sdk/cpp/core/CMakeLists.txt b/sdk/cpp/core/CMakeLists.txt index 0e9b8bcc5..0cf90bf8b 100644 --- a/sdk/cpp/core/CMakeLists.txt +++ b/sdk/cpp/core/CMakeLists.txt @@ -383,13 +383,21 @@ add_library(libnetconf STATIC IMPORTED) set_property(TARGET libnetconf PROPERTY IMPORTED_LOCATION ${libnetconf_archive}) add_dependencies(libnetconf project_libnetconf) +if(LIBYANG_PLUGINS_DIR) + set(LIBYANG_EXT_PLUGINS_DIR ${LIBYANG_PLUGINS_DIR}) +else() + set(LIBYANG_EXT_PLUGINS_DIR ${LIB_INSTALL_DIR}/libyang) +endif() +set(LIBYANG_PLUGINS_INSTALL_DIR ${CPACK_PACKAGE_INSTALL_DIRECTORY}/${LIBYANG_EXT_PLUGINS_DIR}) +message("Set libyang plugin installation directory to: ${LIBYANG_PLUGINS_INSTALL_DIR}") + # Add LibYang set(libyang_include_location include/libyang) set(libyang_headers_location ${CMAKE_CURRENT_BINARY_DIR}/project_libyang/headers) ExternalProject_Add(project_libyang PREFIX "${CMAKE_CURRENT_BINARY_DIR}/project_libyang" URL "https://github.com/ygorelik/libyang/archive/master.zip" - CMAKE_ARGS -DSTATIC=true -DCMAKE_BUILD_TYPE=Debug + CMAKE_ARGS -DSTATIC=true -DCMAKE_BUILD_TYPE=Debug -DPLUGINS_DIR=${LIBYANG_PLUGINS_INSTALL_DIR} INSTALL_DIR "${libyang_location}" INSTALL_COMMAND mkdir -p ${libyang_headers_location}/libyang && cp ${libyang_headers} ${libyang_headers_location}/libyang ) @@ -455,12 +463,6 @@ set(libyang_extension_lib ${libyang_build_location}/src/extensions/nacm.so ) -if(PLUGINS_DIR) - set(LIBYANG_EXT_PLUGINS_DIR ${PLUGINS_DIR}) -else() - set(LIBYANG_EXT_PLUGINS_DIR ${LIB_INSTALL_DIR}/libyang) -endif() - install(TARGETS ydk DESTINATION ${LIB_INSTALL_DIR}) install(FILES ${libydk_install_headers} DESTINATION ${INCLUDE_INSTALL_DIR}) install(FILES ${SPDLOG_HEADERS} DESTINATION ${spdlog_include_location}) From e1c9790e26819ad4d06d4fea1dbea35421731041 Mon Sep 17 00:00:00 2001 From: Yan Gorelik Date: Thu, 25 Jan 2018 18:00:55 -0800 Subject: [PATCH 07/24] Fixing MacOS build after libyang upgrade --- sdk/cpp/core/CMakeLists.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sdk/cpp/core/CMakeLists.txt b/sdk/cpp/core/CMakeLists.txt index 0cf90bf8b..1b3c13cd4 100644 --- a/sdk/cpp/core/CMakeLists.txt +++ b/sdk/cpp/core/CMakeLists.txt @@ -458,9 +458,9 @@ target_link_libraries(ydk set_property(TARGET ydk PROPERTY CXX_STANDARD 11) set_property(TARGET ydk PROPERTY CXX_STANDARD_REQUIRED ON) set(libyang_extension_lib - ${libyang_build_location}/src/extensions/libyang_ext_test.so - ${libyang_build_location}/src/extensions/metadata.so - ${libyang_build_location}/src/extensions/nacm.so + ${libyang_build_location}/src/extensions/libyang_ext_test${CMAKE_SHARED_LIBRARY_SUFFIX} + ${libyang_build_location}/src/extensions/metadata${CMAKE_SHARED_LIBRARY_SUFFIX} + ${libyang_build_location}/src/extensions/nacm${CMAKE_SHARED_LIBRARY_SUFFIX} ) install(TARGETS ydk DESTINATION ${LIB_INSTALL_DIR}) From a2407cff698bd5298e4af03b306390525ef03221 Mon Sep 17 00:00:00 2001 From: Yan Gorelik Date: Mon, 29 Jan 2018 14:34:02 -0800 Subject: [PATCH 08/24] Excluded MacOS from coverage tests --- test/tests.sh | 103 +++++++++++++++++++++++++++++--------------------- 1 file changed, 59 insertions(+), 44 deletions(-) diff --git a/test/tests.sh b/test/tests.sh index f8485016a..4c428a8aa 100755 --- a/test/tests.sh +++ b/test/tests.sh @@ -31,7 +31,7 @@ PY_TEST="python3" ###################################################################### function print_msg { - echo -e "${RED}*** $(date) *** tests.sh | $1${NOCOLOR}" + echo -e "${RED}*** $(date): tests.sh | $1${NOCOLOR}" } function run_exec_test { @@ -44,7 +44,7 @@ function run_exec_test { } function run_test_no_coverage { - print_msg "executing no coverage: $@" + print_msg "Executing: $@" python $@ local status=$? if [ $status -ne 0 ]; then @@ -54,11 +54,11 @@ function run_test_no_coverage { } function run_test { - if [[ $(command -v coverage) ]]; then - print_msg "executing with coverage: $@" + if [[ $(command -v coverage) && ${os_type} == "Linux" ]]; then + print_msg "Executing with coverage: $@" coverage run --omit=/usr/* --branch --parallel-mode $@ > /dev/null local status=$? - print_msg "status is ${status}" + print_msg "Returned status is ${status}" if [ $status -ne 0 ]; then exit $status fi @@ -73,7 +73,7 @@ function pip_check_install { if [[ $(uname) == "Linux" ]] ; then os_info=$(cat /etc/*-release) if [[ ${os_info} == *"fedora"* ]]; then - print_msg "custom pip install of $@ for centos" + print_msg "Custom pip install of $@ for CentOS" pip install --install-option="--install-purelib=/usr/lib64/python2.7/site-packages" --no-deps $@ return fi @@ -88,7 +88,12 @@ function pip_check_install { function init_confd { cd $1 print_msg "Initializing confd in $(pwd)" - source $YDKGEN_HOME/../confd/confdrc + confd_rc=$(find ~ -name confdrc) + if [[ -z $confd_rc ]]; then + print_msg "Cannot find confdrc resource file in user file system. Exiting" + exit 1 + fi + source $confd_rc run_exec_test make stop > /dev/null run_exec_test make clean > /dev/null run_exec_test make all > /dev/null @@ -101,28 +106,24 @@ function init_confd_ydktest { } function init_rest_server { - print_msg "starting rest server" + print_msg "Starting REST server" ./test/start_rest_server.sh - print_msg "Rest server started" } function init_tcp_server { - print_msg "starting TCP server" + print_msg "Starting TCP server" ./test/start_tcp_server.sh - print_msg "TCP server started" export TCP_SERVER_PID=$tcp_pid - echo $TCP_SERVER_PID + print_msg "TCP server started with PID: $TCP_SERVER_PID" } function stop_tcp_server { - print_msg "stopping TCP server process id: $TCP_SERVER_PID" + print_msg "Stopping TCP server with PID: $TCP_SERVER_PID" kill $TCP_SERVER_PID } function init_py_env { - print_msg "Initializing python env" - os_type=$(uname) - print_msg "OS: $os_type" + print_msg "Initializing Python environment" if [[ ${os_type} == "Darwin" ]] ; then virtualenv macos_pyenv -p python3.6 source macos_pyenv/bin/activate @@ -131,10 +132,10 @@ function init_py_env { } function init_go_env { - print_msg "Initializing Go env" + print_msg "Initializing Go environment" - print_msg "${GOPATH}" - print_msg "${GOROOT}" + print_msg "GOPATH is set to: ${GOPATH}" + print_msg "GOROOT is set to: ${GOROOT}" export PATH=$PATH:$GOPATH/bin export PATH=$PATH:$GOROOT/bin @@ -146,7 +147,7 @@ function init_go_env { export GOPATH="$(pwd)/golang":$GOPATH fi - print_msg "new: ${GOPATH}" + print_msg "Changed GOPATH setting to: ${GOPATH}" go get github.com/stretchr/testify } @@ -392,19 +393,24 @@ function py_sanity_ydktest_install { function py_sanity_ydktest_test { print_msg "py_sanity_ydktest_test" - cd $YDKGEN_HOME && cp -r gen-api/python/ydktest-bundle/ydk/models/* sdk/python/core/ydk/models - - print_msg "Uninstall ydk py core from pip for testing with coverage" - pip uninstall ydk -y - export OLDPYTHONPATH=$PYTHONPATH - - print_msg "Build & copy cpp-wrapper to sdk directory to gather coverage" cd $YDKGEN_HOME - cd sdk/python/core/ && python setup.py build - print_msg "Set new python path to gather coverage" - export PYTHONPATH=$PYTHONPATH:$(pwd) - cp build/lib*/*.so . - cd - + cp -r gen-api/python/ydktest-bundle/ydk/models/* sdk/python/core/ydk/models + + # Skip coverage tests on MacOS + # + if [[ ${os_type} == "Linux" ]] ; then + print_msg "Uninstall ydk py core from pip for testing with coverage" + pip uninstall ydk -y + export OLDPYTHONPATH=$PYTHONPATH + + print_msg "Build & copy cpp-wrapper to sdk directory to gather coverage" + cd $YDKGEN_HOME + cd sdk/python/core/ && python setup.py build + print_msg "Set new python path to gather coverage" + export PYTHONPATH=$PYTHONPATH:$(pwd) + cp build/lib*/*.so . + cd - + fi run_test sdk/python/core/tests/test_sanity_codec.py @@ -413,15 +419,19 @@ function py_sanity_ydktest_test { stop_tcp_server - print_msg "Restore old python path" - export PYTHONPATH=$OLDPYTHONPATH + # Skip coverage tests on MacOS + # + if [[ ${os_type} == "Linux" ]] ; then + print_msg "Restore old python path" + export PYTHONPATH=$OLDPYTHONPATH - cd sdk/python/core/ - rm -f *.so - print_msg "Restore ydk py core to pip" - pip install dist/ydk*.tar.gz + cd sdk/python/core/ + rm -f *.so + print_msg "Restore ydk py core to pip" + pip install dist/ydk*.tar.gz - cd $YDKGEN_HOME + cd $YDKGEN_HOME + fi } function py_sanity_ydktest_test_netconf_ssh { @@ -630,9 +640,11 @@ function py_test_gen { ###################################### export YDKGEN_HOME="$(pwd)" -print_msg "YDKGEN_HOME is ${YDKGEN_HOME}" -print_msg "python location: $(which python)" -print_msg "$(python -V)" +os_type=$(uname) +print_msg "Running OS type: $os_type" +print_msg "YDKGEN_HOME is set to: ${YDKGEN_HOME}" +print_msg "Python location: $(which python)" +$(python -V) CMAKE_BIN=cmake which cmake3 @@ -666,5 +678,8 @@ cd $YDKGEN_HOME find . -name '*gcda*'|xargs rm -f find . -name '*gcno*'|xargs rm -f find . -name '*gcov*'|xargs rm -f -print_msg "combining python coverage for Linux" -coverage combine > /dev/null || echo "Coverage not combined" + +if [[ ${os_type} == "Linux" ]] ; then + print_msg "Combining Python coverage for Linux" + coverage combine > /dev/null || echo "Coverage not combined" +fi From 358cc97f8a48e12f97fd0cffff73ad392fa4cca0 Mon Sep 17 00:00:00 2001 From: Yan Gorelik Date: Mon, 29 Jan 2018 15:00:35 -0800 Subject: [PATCH 09/24] Reverted code changes related to search of confdrc path --- test/tests.sh | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/test/tests.sh b/test/tests.sh index 4c428a8aa..f2002db7f 100755 --- a/test/tests.sh +++ b/test/tests.sh @@ -88,12 +88,7 @@ function pip_check_install { function init_confd { cd $1 print_msg "Initializing confd in $(pwd)" - confd_rc=$(find ~ -name confdrc) - if [[ -z $confd_rc ]]; then - print_msg "Cannot find confdrc resource file in user file system. Exiting" - exit 1 - fi - source $confd_rc + source $YDKGEN_HOME/../confd/confdrc run_exec_test make stop > /dev/null run_exec_test make clean > /dev/null run_exec_test make all > /dev/null From 950c56b1e890faff01f05d4904b5a8261b6a5e73 Mon Sep 17 00:00:00 2001 From: Yan Gorelik Date: Mon, 29 Jan 2018 16:00:56 -0800 Subject: [PATCH 10/24] Reverting function py_sanity_ydktest_test in tests.sh --- test/tests.sh | 44 ++++++++++++++++++-------------------------- 1 file changed, 18 insertions(+), 26 deletions(-) diff --git a/test/tests.sh b/test/tests.sh index f2002db7f..a8daa0baa 100755 --- a/test/tests.sh +++ b/test/tests.sh @@ -391,21 +391,17 @@ function py_sanity_ydktest_test { cd $YDKGEN_HOME cp -r gen-api/python/ydktest-bundle/ydk/models/* sdk/python/core/ydk/models - # Skip coverage tests on MacOS - # - if [[ ${os_type} == "Linux" ]] ; then - print_msg "Uninstall ydk py core from pip for testing with coverage" - pip uninstall ydk -y - export OLDPYTHONPATH=$PYTHONPATH - - print_msg "Build & copy cpp-wrapper to sdk directory to gather coverage" - cd $YDKGEN_HOME - cd sdk/python/core/ && python setup.py build - print_msg "Set new python path to gather coverage" - export PYTHONPATH=$PYTHONPATH:$(pwd) - cp build/lib*/*.so . - cd - - fi + print_msg "Uninstall ydk py core from pip for testing with coverage" + pip uninstall ydk -y + export OLDPYTHONPATH=$PYTHONPATH + + print_msg "Build & copy cpp-wrapper to sdk directory to gather coverage" + cd $YDKGEN_HOME + cd sdk/python/core/ && python setup.py build + print_msg "Set new python path to gather coverage" + export PYTHONPATH=$PYTHONPATH:$(pwd) + cp build/lib*/*.so . + cd - run_test sdk/python/core/tests/test_sanity_codec.py @@ -414,19 +410,15 @@ function py_sanity_ydktest_test { stop_tcp_server - # Skip coverage tests on MacOS - # - if [[ ${os_type} == "Linux" ]] ; then - print_msg "Restore old python path" - export PYTHONPATH=$OLDPYTHONPATH + print_msg "Restore old python path" + export PYTHONPATH=$OLDPYTHONPATH - cd sdk/python/core/ - rm -f *.so - print_msg "Restore ydk py core to pip" - pip install dist/ydk*.tar.gz + cd sdk/python/core/ + rm -f *.so + print_msg "Restore ydk py core to pip" + pip install dist/ydk*.tar.gz - cd $YDKGEN_HOME - fi + cd $YDKGEN_HOME } function py_sanity_ydktest_test_netconf_ssh { From 3d9b034470fbb17737dc0d5adb4860ebc41d5eb3 Mon Sep 17 00:00:00 2001 From: Yan Gorelik Date: Wed, 31 Jan 2018 11:25:22 -0800 Subject: [PATCH 11/24] Added tests when number of typedef statements in Yang model is more than 255 --- .travis.yml | 8 +- profiles/test/ydktest-cpp.json | 1 + .../ydktest-sanity-typedefs@2018-01-30.yang | 6233 +++++++++++++++++ sdk/cpp/tests/test_sanity_codec.cpp | 20 +- sdk/go/core/tests/service_codec_test.go | 16 + sdk/python/core/tests/test_sanity_codec.py | 12 + .../ydktest-sanity-typedefs@2018-01-30.yang | 6233 +++++++++++++++++ 7 files changed, 12518 insertions(+), 5 deletions(-) create mode 100644 sdk/cpp/core/tests/models/ydktest-sanity-typedefs@2018-01-30.yang create mode 100644 yang/ydktest/ydktest-sanity-typedefs@2018-01-30.yang diff --git a/.travis.yml b/.travis.yml index f53ac4e4a..7f1e45612 100644 --- a/.travis.yml +++ b/.travis.yml @@ -8,10 +8,10 @@ matrix: dist: trusty go: 1.8 group: edge - - os: osx - osx_image: xcode7.3 - language: generic - go: 1.8 + #- os: osx + # osx_image: xcode7.3 + # language: generic + # go: 1.8 - env: DOCKER=true OS_TYPE=centos OS_VERSION=centos7 - env: DOCKER=true OS_TYPE=ubuntu OS_VERSION=xenial #- env: DOCKER=true OS_TYPE=centos OS_VERSION=centos6.9 #TODO needs more work diff --git a/profiles/test/ydktest-cpp.json b/profiles/test/ydktest-cpp.json index 6479d12be..a33ba6d50 100644 --- a/profiles/test/ydktest-cpp.json +++ b/profiles/test/ydktest-cpp.json @@ -33,6 +33,7 @@ "sdk/cpp/core/tests/models/ydktest-filterread@2015-11-17.yang", "sdk/cpp/core/tests/models/ydktest-sanity-augm@2015-11-17.yang", "sdk/cpp/core/tests/models/ydktest-sanity-submodule@2016-04-25.yang", + "sdk/cpp/core/tests/models/ydktest-sanity-typedefs@2018-01-30.yang", "sdk/cpp/core/tests/models/ydktest-sanity-types@2016-04-11.yang", "sdk/cpp/core/tests/models/ydktest-sanity@2015-11-17.yang", "sdk/cpp/core/tests/models/ydktest-types@2016-05-23.yang", diff --git a/sdk/cpp/core/tests/models/ydktest-sanity-typedefs@2018-01-30.yang b/sdk/cpp/core/tests/models/ydktest-sanity-typedefs@2018-01-30.yang new file mode 100644 index 000000000..f3de84b44 --- /dev/null +++ b/sdk/cpp/core/tests/models/ydktest-sanity-typedefs@2018-01-30.yang @@ -0,0 +1,6233 @@ +module ydktest-sanity-typedefs { + + yang-version 1; + + namespace "http://cisco.com/ns/yang/ydktest-sanity-typedefs"; + + prefix top; + + organization + "Cisco Systems, Inc."; + + contact + "Cisco Systems, Inc. + Customer Service + + Postal: 170 West Tasman Drive + San Jose, CA 95134 + + Tel: +1 800 553-NETS + + E-mail: ydk-admin@cisco.com"; + + description + "This module contains 461 typedef statements copied from NXOS Device YANG Model + The module created to test YDK with newer version of libyang library, + which supports more than 255 typedef statements"; + + revision 2018-01-30 { + description + "Initial Revision. + Generated by ygorelik"; + } + + typedef address_Ipv4 { + type string { + } + } + + typedef address_Ipv6 { + type string { + } + } + + typedef address_Ip { + type union { + type address_Ipv4; + type address_Ipv6; + } + } + + typedef address_Mac { + type string { + } + } + + typedef mtx_array_ifindex { + type string { + } + } + + typedef mtx_array_uint8 { + type string { + } + } + + typedef mtx_array_uint16 { + type string { + } + } + + typedef mtx_array_uint32 { + type string { + } + } + + typedef mtx_array_uint64 { + type string { + } + } + + typedef mtx_array_bit { + type string { + } + } + + typedef mtx_array_community { + type string { + } + } + + typedef aaa_AccountStatus { + type enumeration { + + // Active + enum active { + value 0; + } + + // Inactive + enum inactive { + value 1; + } + } + default "active"; + } + + typedef aaa_BannerMsg { + type string; + } + + typedef aaa_Boolean { + type enumeration { + + // No + enum no { + value 0; + } + + // Yes + enum yes { + value 1; + } + } + default "yes"; + } + + typedef aaa_Clear { + type enumeration { + + // No + enum no { + value 0; + } + + // Yes + enum yes { + value 1; + } + } + default "no"; + } + + typedef aaa_CmdType { + type enumeration { + + // Config + enum config { + value 0; + } + + // Exec + enum exec { + value 1; + } + } + default "config"; + } + + typedef aaa_Date { + type string; + } + + typedef aaa_Delimiter { + type string; + } + + typedef aaa_Email { + type address_Email { + } + } + + typedef aaa_EncKey { + type string { + length "0..240"; + } + } + + typedef aaa_EncryptedArray { + type mtx_array_uint8; + } + + typedef aaa_ExternalUnixUID { + type uint16 { + range "16000..23999"; + } + } + + typedef aaa_HistoryDepth { + type uint8 { + range "0..15"; + } + default "5"; + } + + typedef aaa_IdleTimer { + type uint16 { + range "0..1440"; + } + } + + typedef aaa_KeyEnc { + type enumeration { + + // Clear Text + enum 0 { + value 0; + } + + // Type-6 Encrypted + enum 6 { + value 6; + } + + // Encrypted + enum 7 { + value 7; + } + } + default "0"; + } + + typedef aaa_KeyEncUserPass { + type enumeration { + + // Unspecified + enum unspecified { + value 255; + } + + // Clear Text + enum clear { + value 0; + } + + // Encrypted + enum Encrypt { + value 5; + } + } + } + + typedef aaa_LdapAttribute { + type string { + length "0..63"; + } + } + + // NXOS supports maximum limits in the type definitions + typedef aaa_LdapDn { + type string { + length "0..127"; + } + } + + typedef aaa_LdapFilter { + type string { + length "0..63"; + } + } + + typedef aaa_LdapSSLStrictnessLevel { + type enumeration { + + // Strict + enum strict { + value 0; + } + + // Permissive + enum permissive { + value 1; + } + } + default "strict"; + } + + typedef aaa_LoggingLevel { + type enumeration { + + // Emergency + enum Emergency { + value 0; + } + + // Alert + enum Alert { + value 1; + } + + // Critical + enum Critical { + value 2; + } + + // Error + enum Error { + value 3; + } + + // Warning + enum Warning { + value 4; + } + + // Notifications + enum Notif { + value 5; + } + + // Informational + enum Inform { + value 6; + } + + // Debug + enum Debug { + value 7; + } + } + default "Error"; + } + + typedef aaa_MonitorServerType { + type enumeration { + + // Disabled + enum disabled { + value 0; + } + + // Enabled + enum enabled { + value 1; + } + } + default "disabled"; + } + + typedef aaa_MonitoringPasswordType { + type string; + } + + typedef aaa_MonitoringUserType { + type string { + } + default "test"; + } + + typedef aaa_NoRolePolicy { + type enumeration { + + // No Login + enum no-login { + value 0; + } + + // Assign Default Role + enum assign-default-role { + value 1; + } + } + } + + typedef aaa_Order { + type uint16 { + range "0..16"; + } + } + + typedef aaa_Passwd { + type string { + length "1..127"; + } + } + + typedef aaa_Phone { + type address_Phone; + } + + typedef aaa_Port { + type uint32 { + range "1..65535"; + } + } + + typedef aaa_ProviderGroupDeadtime { + type uint32 { + range "0..1440"; + } + default "0"; + } + + // Limited by NXOS maximum size for server group + typedef aaa_ProviderGroupName { + type string { + length "0..127"; + } + } + + typedef aaa_ProviderGroupProtocol { + type enumeration { + + // TACACS + enum tacacs { + value 0; + } + + // RADIUS + enum radius { + value 1; + } + + // LDAP + enum ldap { + value 2; + } + } + } + + typedef aaa_ProviderGroupSnmpIndex { + type uint32; + } + + typedef aaa_ProviderSnmpIndex { + type uint32; + } + + typedef aaa_ProviderState { + type enumeration { + + // Unknown + enum unknown { + value 0; + } + + // Operable + enum operable { + value 1; + } + + // Inoperable + enum inoperable { + value 2; + } + } + default "unknown"; + } + + typedef aaa_PwdChangeCount { + type uint8 { + range "0..10"; + } + } + + typedef aaa_PwdChangeInterval { + type uint16 { + range "1..745"; + } + } + + typedef aaa_PwdExpWarnTime { + type uint8 { + range "0..30"; + } + } + + typedef aaa_PwdHistory { + type string; + } + + typedef aaa_PwdLen { + type uint32; + } + + typedef aaa_PwdLifeTime { + type uint16 { + range "0..3650"; + } + } + + typedef aaa_PwdPolicy { + type enumeration { + + // Enable + enum enable { + value 0; + } + + // Disable + enum disable { + value 1; + } + } + default "enable"; + } + + typedef aaa_RadPort { + type uint32 { + range "0..65535"; + } + } + + typedef aaa_RadSrvUseType { + type enumeration { + + // Authentication + enum Auth { + value 0; + } + + // Authorization + enum Author { + value 1; + } + + // Accounting + enum Acc { + value 2; + } + + // All + enum All { + value 3; + } + } + default "All"; + } + + typedef aaa_Realm { + type enumeration { + + // Local + enum local { + value 0; + } + + // RADIUS + enum radius { + value 1; + } + + // TACACS+ + enum tacacs { + value 2; + } + + // LDAP + enum ldap { + value 3; + } + } + default "local"; + } + + typedef aaa_Retries { + type uint32 { + range "0..5"; + } + default "1"; + } + + typedef aaa_RuleAccessType { + type enumeration { + + // none + enum none { + value 0; + } + + // Read + enum read { + value 1; + } + + // Read Write + enum read-write { + value 2; + } + + // Command + enum command { + value 3; + } + } + } + + typedef aaa_RuleCmdStrType { + type string { + length "0..128"; + } + } + + typedef aaa_RuleEntityType { + type string { + length "0..512"; + } + } + + typedef aaa_RuleNumberType { + type uint32 { + range "1..256"; + } + } + + typedef aaa_RulePermissionType { + type enumeration { + + // none + enum none { + value 0; + } + + // Permit + enum permit { + value 1; + } + + // Deny + enum deny { + value 2; + } + } + } + + typedef aaa_RuleScopeType { + type enumeration { + + // none + enum none { + value 0; + } + + // Feature + enum feature { + value 2; + } + + // Feature Group + enum feature-group { + value 3; + } + + // OID + enum oid { + value 21; + } + } + } + + typedef aaa_SshData { + type string { + length "0..16384"; + } + } + + typedef aaa_TimeMin { + type uint32 { + range "0..1440"; + } + default "0"; + } + + typedef aaa_TimeSec { + type uint32 { + range "1..60"; + } + default "5"; + } + + typedef aaa_UnixUID { + type uint16 { + range "99..15999"; + } + } + + typedef aaa_UserCertDataType { + type string; + } + + typedef aaa_UserRolePrivType { + type enumeration { + + // No Privilege + enum noDataPriv { + value 0; + } + + // Read Privilege + enum readPriv { + value 1; + } + + // Write Privilege + enum writePriv { + value 2; + } + } + default "noDataPriv"; + } + + typedef aaa_authenticationProtocol { + type enumeration { + + // PAP + enum pap { + value 0; + } + + // CHAP + enum chap { + value 1; + } + + // MS-CHAP + enum mschap { + value 2; + } + + // MS-CHAPv2 + enum mschapv2 { + value 3; + } + + // ASCII + enum ascii { + value 4; + } + } + } + + // Bank type + typedef ac_BankT { + type enumeration { + + // Even + enum even { + value 1; + } + + // Odd + enum Odd { + value 2; + } + } + default "even"; + } + + // Control + typedef ac_Control { + + // bits- Using string + type string; + } + + // ECN + typedef ac_Ecn { + type uint8 { + range "0..2"; + } + default "0"; + } + + // Ether type + typedef ac_EtherT { + type uint16; + } + + // Ip options + typedef ac_IpOpt { + + // bits- Using string + type string; + } + + // MAC + typedef ac_Mac { + type address_Mac; + } + + // Order + typedef ac_Order { + type uint16 { + range "1..1024"; + } + } + + // Payload size + typedef ac_PayloadSz { + type uint8; + } + + // Interface identifier + typedef nw_IfId { + type string; + } + + // Port id + typedef ac_PortId { + type nw_IfId; + } + + // Operational state of HW rules + typedef ac_RuleOperSt { + type enumeration { + + // Pending + enum pending { + value 1; + } + + // Installed + enum installed { + value 2; + } + + // Failed + enum failed { + value 3; + } + } + default "pending"; + } + + typedef acl_ACEStats { + type uint8; + default "0"; + } + + // ACE action type + typedef acl_ActionType { + type enumeration { + + // Invalid + enum invalid { + value 0; + } + + // Permit + enum permit { + value 1; + } + + // Deny + enum deny { + value 2; + } + + // Copy + enum copy { + value 3; + } + + // Divert + enum divert { + value 4; + } + + // Redirect + enum redirect { + value 5; + } + } + default "invalid"; + } + + // Capture Session + typedef acl_CaptureSes { + type uint16 { + range "0..48"; + } + } + + // config State + typedef acl_ConfigState { + type uint8; + default "0"; + } + + // http option (http-method) value enum + typedef acl_HttpOptionType { + type enumeration { + + // get + enum get { + value 1; + } + + // put + enum put { + value 2; + } + + // head + enum head { + value 3; + } + + // post + enum post { + value 4; + } + + // delete + enum delete { + value 5; + } + + // trace + enum trace { + value 6; + } + + // connect + enum connect { + value 7; + } + + // invalid + enum invalid { + value 0; + } + } + } + + // Name of interface, e.g. "Eth1/2" + typedef acl_IfName { + type nw_IfId; + } + + // MAC Protocol + typedef acl_MACProtocol { + + // MAX Converted to int from 0x10000 + type uint32 { + range "0..65536"; + } + default "65536"; + } + + // ACL name + typedef acl_Name { + type string { + length "1..64"; + } + } + + // L4 port relationship operator + typedef acl_Operator { + type uint8; + default "0"; + } + + // Packet Length + typedef acl_PktLen { + type uint16 { + range "19..9210"; + } + } + + // L4 port number + typedef acl_PortNumber { + type uint16; + default "0"; + } + + // ACL name + typedef acl_RemarkStr { + type string { + length "1..100"; + } + } + + // ACE sequence number + typedef acl_SequenceNumber { + type uint32 { + range "0..4294967295"; + } + } + + // TCP Flags Mask + typedef acl_TcpFlagsMask { + type uint8 { + range "0..64"; + } + } + + // TCP option length + typedef acl_TcpOptionLengthType { + type uint32 { + range "0..41"; + } + } + + // time-range name + typedef acl_TimeRangeName { + type string { + length "0..64"; + } + } + + // UDF mask + typedef acl_UdfMask { + type uint16 { + range "0..65535"; + } + } + + // UDF name + typedef acl_UdfName { + type string { + length "1..16"; + } + } + + // UDF value + typedef acl_UdfVal { + type uint16 { + range "0..65535"; + } + } + + // VLAN Acl action type + typedef acl_VAclActionType { + type enumeration { + + // invalid + enum invalid { + value 0; + } + + // forward + enum forward { + value 1; + } + + // drop + enum drop { + value 2; + } + + // redirect + enum redirect { + value 3; + } + } + default "invalid"; + } + + // VLAN Acl action log enable/disable + typedef acl_VAclLog { + type uint8; + default "0"; + } + + // VLAN Acl match acl type + // Refer to CLI_ACL_IP/CLI_ACL_IPV6/CLI_ACL_MAC for values + typedef acl_VAclMatchType { + type uint16; + default "0"; + } + + // Vlan List String for VLAN Acl Policy + typedef acl_VlanListStr { + type string { + length "0..512"; + } + } + + // VLAN + typedef acl_VlanType { + type uint32 { + range "0..4095"; + } + default "4095"; + } + + // nve vni ID + typedef acl_VniType { + type uint32 { + range "0..16777216"; + } + } + + // cos type + typedef acl_cosType { + type uint8 { + range "0..8"; + } + default "8"; + } + + // erspan DSCP + typedef acl_erspanDscpType { + type uint8 { + range "0..64"; + } + default "64"; + } + + // erspan gre protocol + typedef acl_erspanGreType { + type uint32 { + range "0..65536"; + } + default "65536"; + } + + // VLAN Acl policy operation apply/remove + typedef acl_operation { + type uint8; + default "1"; + } + + typedef action_AdminSt { + type enumeration { + + // Unknown + enum unknown { + value 0; + } + + // Start + enum start { + value 1; + } + + // Stop + enum stop { + value 2; + } + + // Suspend + enum suspend { + value 3; + } + } + default "unknown"; + } + + typedef action_Descr { + type string; + } + + // Frequency of the task + typedef action_Freq { + type string; + } + + typedef action_OperSt { + type enumeration { + + // Scheduled + enum scheduled { + value 0; + } + + // Processing + enum processing { + value 1; + } + + // Completed + enum completed { + value 2; + } + + // Cancelled + enum cancelled { + value 3; + } + + // Failed + enum failed { + value 4; + } + + // Indeterminate + enum indeterminate { + value 5; + } + + // Suspended + enum suspended { + value 6; + } + + // Crash-Suspect + enum crashsuspect { + value 7; + } + } + default "scheduled"; + } + + // Task status qualifier + typedef action_Qual { + type string; + } + + // Result history retention size: how many records + // to keep per rule + typedef action_RetentionSize { + type uint16 { + range "1..1024"; + } + default "100"; + } + + // Resuilt history retention time: how long records are + // to be kept per rule + typedef action_RetentionTime { + type string; + } + + // Type of the task + typedef action_Type { + type enumeration { + + // Clear + enum clear { + value 1; + } + + // Reset + enum reset { + value 2; + } + + // Reload + enum reload { + value 3; + } + + // Locate + enum locate { + value 4; + } + + // Install + enum install { + value 5; + } + + // Test + enum test { + value 6; + } + + // Collect + enum collect { + value 7; + } + + // Set Interface In-Service + enum interface-in-service { + value 8; + } + } + default "clear"; + } + + // Global access controls + typedef actrl_AccControl { + + // bits- Using string + type string; + } + + // Rule direction + typedef actrl_Direction { + type enumeration { + + // Uni-directional + enum uni-dir { + value 1; + } + + // Bi-directional + enum bi-dir { + value 2; + } + } + default "uni-dir"; + } + + // Entry priority, this is the priority for entry + typedef actrl_EntryPrio { + type uint8 { + range "1..7"; + } + default "7"; + } + + // Filter id + // @@@ Keep this in sync with vzFltId. + // @@@ Only way to moving FltId from 16 to 32 bits without dropping traffic + // @@@ during upgrade, was to introduce vzFiltId (16 bits) + typedef actrl_FltId { + + // MAX Converted to int from 0xffffffff + type uint32 { + range "1..4294967295"; + } + } + + // Log clear interval + typedef actrl_LogClrIntvl { + type uint16 { + range "1000..2800"; + } + default "2800"; + } + + // Operational state of Rule + typedef actrl_OperSt { + type enumeration { + + // enabled + enum enabled { + value 1; + } + + // disabled + enum disabled { + value 2; + } + } + default "disabled"; + } + + // Reasons for rule being disabled. + typedef actrl_OperStQual { + + // bits- Using string + type string; + } + + // PPF Node id + typedef actrl_PpfNodeId { + + // MAX Converted to int from 0xffffffff + type uint32 { + range "1..4294967295"; + } + } + + // Array PPF Node id + typedef actrl_PpfNodeIdArray { + type mtx_array_uint32; + } + + // Rule id + typedef actrl_RuleId { + + // MAX Converted to int from 0xffffffff + type uint32 { + range "1..4294967295"; + } + } + + // Filter to Rule ID mapping array + typedef actrl_RuleIdArray { + type mtx_array_uint32; + } + + // Rule ID array index + typedef actrl_RuleIndex { + type uint16 { + range "1..1024"; + } + } + + // Rule priority, this is the priority for a set of rules + typedef actrl_RulePrio { + type uint8 { + range "1..11"; + } + } + + // Rule type + typedef actrl_RuleT { + type enumeration { + + // Tenant + enum tenant { + value 1; + } + + // Management + enum mgmt { + value 2; + } + + // SNMP + enum snmp { + value 3; + } + + // Flood + enum bd_flood { + value 4; + } + + // Vrf + enum vrf_default { + value 5; + } + + // Infra + enum infra { + value 6; + } + } + default "tenant"; + } + + // Scope id (24-bit) + typedef actrl_ScopeId { + + // MAX Converted to int from 0xffffff + type uint32 { + range "1..16777215"; + } + default "1"; + } + + // Security Label (12-bit) + typedef actrl_SecLbl { + + // MAX Converted to int from 0xfff + type uint16 { + range "1..4095"; + } + } + + // Subject represents the entitiy to which the capability constraint gets applied + typedef actrlcap_Subj { + type enumeration { + + // Unknown + enum unknown { + value 0; + } + + // Actrl Rules + enum rule-namespace { + value 1; + } + + // Actrl Scopes + enum scope-namespace { + value 2; + } + } + default "unknown"; + } + + typedef address_Email { + type string; + } + + typedef address_HostNameOrDottedQuad { + type string { + length "1..256"; + } + } + + typedef address_Phone { + type string; + } + + // Adjacency Flags + typedef adjacency_AdjFlags { + + // bits- Using string + type string; + } + + // Adjacency operational state + typedef adjacency_AdjOperSt { + type enumeration { + + // Unknown + enum unspecified { + value 0; + } + + // Incomplete + enum incomplete { + value 1; + } + + // Resolved + enum normal { + value 2; + } + } + } + + // Database type + typedef adjacency_DbT { + type enumeration { + + // IP database + enum ip { + value 1; + } + + // IPv6 database + enum ipv6 { + value 2; + } + } + default "ip"; + } + + typedef aggregate_AdminState { + type enumeration { + + // Unknown + enum unknown { + value 0; + } + + // Up + enum up { + value 1; + } + + // Down + enum down { + value 2; + } + } + default "down"; + } + + // Address Family Type + typedef aggregate_AfT { + type enumeration { + + // Ipv4 unicast address family + enum ipv4-ucast { + value 0; + } + + // Vpnv4 unicast address family + enum vpnv4-ucast { + value 1; + } + + // Ipv6 unicast address family + enum ipv6-ucast { + value 2; + } + + // Vpnv6 unicast address family + enum vpnv6-ucast { + value 3; + } + + // L2-Evpn unicast address family + enum l2-evpn { + value 4; + } + } + default "l2-evpn"; + } + + typedef aggregate_BfdStatus { + type enumeration { + + // Unknown + enum unknown { + value 0; + } + + // Admin Down + enum admin_down { + value 1; + } + + // Oper Down + enum down { + value 2; + } + + // Intialization + enum init { + value 3; + } + + // Up + enum up { + value 4; + } + } + default "admin_down"; + } + + typedef aggregate_BooleanFlag { + type enumeration { + + // No + enum no { + value 0; + } + + // Yes + enum yes { + value 1; + } + } + default "no"; + } + + // + // + // + // + // + // + // + // + // + // + // + // + // Bandwidth metric of the SVI in kilobits per second. + typedef aggregate_Bw { + type uint32 { + range "1..400000000"; + } + default "10000000"; + } + + typedef aggregate_ConfTmplStatus { + type enumeration { + + // ConfigTmplInactive + enum inactive { + value 0; + } + + // ConfigTmplOperational + enum active { + value 1; + } + + // ConfigTmplFailed + enum failed { + value 2; + } + } + default "inactive"; + } + + typedef aggregate_ConfigMgmtStatus { + type enumeration { + + // Unknown + enum unknown { + value 0; + } + + // ConfigMgmtReady + enum configMgmtReady { + value 1; + } + + // ConfigMgmtNotReady + enum configMgmtNotReady { + value 2; + } + + // ConfigMgmtPurgeStart + enum configMgmtPurgeStart { + value 4; + } + } + default "configMgmtNotReady"; + } + + typedef aggregate_ConfigSourceType { + type enumeration { + + // Unknown + enum unknown { + value 0; + } + + // Cli + enum cli { + value 1; + } + + // Controller + enum controller { + value 2; + } + } + default "cli"; + } + + typedef aggregate_ConfigStatus { + type enumeration { + + // Unknown + enum unknown { + value 0; + } + + // ConfigReady + enum configReady { + value 1; + } + + // ConfigNotReady + enum configNotReady { + value 2; + } + + // ConfigPurgeInProgress + enum configPurgeInProgress { + value 4; + } + } + default "configNotReady"; + } + + typedef aggregate_ControllerID { + type uint32 { + range "0..16"; + } + default "0"; + } + + typedef aggregate_ControllerIdBitmap { + type mtx_array_bit; + } + + typedef aggregate_CpuType { + type string; + } + + typedef aggregate_CtrlrType { + type enumeration { + + // Unknown + enum unknown { + value 0; + } + + // L2Vxlan + enum l2-vxlan { + value 1; + } + + // Vxlan + enum vxlan { + value 2; + } + } + default "l2-vxlan"; + } + + // Default Value computed from unicast + typedef aggregate_EpType { + + // bits- Using string + type string; + default "unicast"; + } + + typedef aggregate_GroupAddr { + type string; + } + + typedef aggregate_HostReachabilityMode { + type enumeration { + + // Unknown + enum unknown { + value 0; + } + + // FloodAndLearn + enum floodAndLearn { + value 1; + } + + // Controller + enum controller { + value 2; + } + + // Bgp + enum bgp { + value 3; + } + } + default "floodAndLearn"; + } + + typedef aggregate_IngressRepProtocolType { + type enumeration { + + // Unknown + enum unknown { + value 0; + } + + // Static + enum static { + value 1; + } + + // Bgp + enum bgp { + value 2; + } + } + default "unknown"; + } + + typedef aggregate_IntfAssignMode { + type enumeration { + + // Dedicated + enum dedicated { + value 0; + } + + // Shared + enum shared { + value 1; + } + } + } + + typedef aggregate_IntfType { + type enumeration { + + // Unknown + enum unknown { + value 0; + } + + // Port + enum port { + value 1; + } + + // Port Channel + enum port-channel { + value 2; + } + + // Tunnel + enum tunnel { + value 3; + } + + // Loopback + enum loopback { + value 4; + } + + // SVI + enum svi { + value 5; + } + } + } + + typedef aggregate_MTU { + type uint32 { + range "1..9216"; + } + default "9216"; + } + + // Mac type + typedef aggregate_MacType { + type enumeration { + + // Unknown + enum unknown { + value 0; + } + + // Unicast + enum unicast { + value 1; + } + + // Multicast + enum multicast { + value 2; + } + } + default "unicast"; + } + + // Minimum rx interval (in ms) + typedef aggregate_MinRxIntvl { + type uint16 { + range "0..999"; + } + default "50"; + } + + // Minimum tx interval (in ms) + typedef aggregate_MinTxIntvl { + type uint16 { + range "0..999"; + } + default "50"; + } + + typedef aggregate_ModuleType { + type string; + } + + typedef aggregate_OperState { + type enumeration { + + // Unknown + enum unknown { + value 0; + } + + // Up + enum up { + value 1; + } + + // Down + enum down { + value 2; + } + } + default "down"; + } + + typedef aggregate_ReplicationModeType { + type enumeration { + + // Unknown + enum unknown { + value 0; + } + + // ReplicationServer + enum replicationServer { + value 1; + } + + // IngressReplication + enum ingressReplication { + value 2; + } + + // IpMulticast + enum ipMulticast { + value 3; + } + } + default "unknown"; + } + + typedef aggregate_ResourceStatus { + type enumeration { + + // Unknown + enum unknown { + value 0; + } + + // VlanCreated + enum vlanCreated { + value 1; + } + + // VlanFailed + enum vlanFailed { + value 2; + } + + // VnidCreated + enum vnidCreated { + value 3; + } + + // VnidFailed + enum vnidFailed { + value 4; + } + + // VlansCarved + enum vlansCarved { + value 5; + } + + // VlansNotCarved + enum vlansNotCarved { + value 6; + } + + // VnidCreationReceived + enum vnidCreationReceived { + value 7; + } + + // MyTEPIPPublished + enum myTEPIPPublished { + value 101; + } + + // ControllerIntfNotCarved + enum controllerIntfNotCarved { + value 201; + } + + // ControllerIntfCarved + enum controllerIntfCarved { + value 202; + } + } + default "unknown"; + } + + // Route target policy type + typedef aggregate_RttPType { + type enumeration { + + // Import + enum import { + value 1; + } + + // Export + enum export { + value 2; + } + } + default "import"; + } + + typedef aggregate_TunnelType { + type enumeration { + + // Unknown + enum unknown { + value 0; + } + + // VxLanOverIPV4 + enum vxlanipv4 { + value 1; + } + + // VxLanOverIPV6 + enum vxlanipv6 { + value 2; + } + + // NVGRE + enum nvgre { + value 3; + } + } + } + + typedef aggregate_VpcKeepaliveStatus { + type enumeration { + + // VpcOobUnknown + enum VpcOobUnknown { + value 0; + } + + // VpcOobDisabled + enum VpcOobDisabled { + value 1; + } + + // VpcOobPeerAlive + enum VpcOobPeerAlive { + value 2; + } + + // VpcOobPeerNotAlive + enum VpcOobPeerNotAlive { + value 3; + } + + // VpcOobPeerAliveDomainMismatch + enum VpcOobPeerAliveDomainMismatch { + value 4; + } + + // VpcOobSuspended + enum VpcOobSuspended { + value 5; + } + + // VpcOobNotOperational + enum VpcOobNotOperational { + value 6; + } + + // VpcOobSuspendedVrf + enum VpcOobSuspendedVrf { + value 7; + } + + // VpcOobMisconfig + enum VpcOobMisconfig { + value 8; + } + } + default "VpcOobUnknown"; + } + + typedef aggregate_VpcOperStatus { + type enumeration { + + // down + enum down { + value 0; + } + + // up + enum up { + value 1; + } + } + default "down"; + } + + typedef aggregate_VpcPeerLinkStatus { + type enumeration { + + // VpcPeerNolink + enum VpcPeerNolink { + value 0; + } + + // VpcPeerLinkDown + enum VpcPeerLinkDown { + value 1; + } + + // VpcPeerOk + enum VpcPeerOk { + value 2; + } + + // VpcPeerNotfound + enum VpcPeerNotfound { + value 3; + } + } + default "VpcPeerNolink"; + } + + // Fabric Forwarding Mode + typedef aggregate_fabFwdMode { + type enumeration { + + // Standard + enum standard { + value 0; + } + + // Anycast Gateway + enum anycastgw { + value 1; + } + + // ProxyGw + enum proxygw { + value 2; + } + } + default "standard"; + } + + // Database type + typedef aib_DbT { + type enumeration { + + // Adjacency Database + enum adj { + value 1; + } + } + default "adj"; + } + + // Owner type + typedef aib_Owner { + type string; + } + + // Preference type + typedef aib_Pref { + + // MAX Converted to int from 0xffff + type uint16 { + range "1..65535"; + } + default "1"; + } + + // Update time stamp type + typedef aib_UpdateTs { + type string; + } + + // Burst interval shift + typedef analytics_BurstIntvlShift { + type uint8 { + range "0..255"; + } + default "0"; + } + + // Mode + typedef analytics_CModeT { + type enumeration { + + // ACI mode + enum aci { + value 0; + } + + // Standalone mode + enum standalone { + value 1; + } + } + default "aci"; + } + + // Collector buket identifier + typedef analytics_CollBucketId { + type uint8 { + range "1..255"; + } + } + + // Collect Interval + typedef analytics_CollIntvl { + type uint32 { + range "100..64000"; + } + default "100"; + } + + // Collector version + typedef analytics_CollVersion { + type enumeration { + + // Version 5 + enum v5 { + value 1; + } + + // Version 9 + enum v9 { + value 2; + } + + // Cisco proprietary version 1 + enum cisco-v1 { + value 3; + } + } + default "cisco-v1"; + } + + // Collect params + // Default Value computed from src-intf + typedef analytics_CollectParams { + + // bits- Using string + type string; + default "src-intf"; + } + + // Collector identifier + typedef analytics_CollectorId { + type uint32 { + range "0..65535"; + } + } + + // Default filtering policy type + typedef analytics_DefPolicyT { + type enumeration { + + // Permit + enum permit { + value 0; + } + + // Deny + enum deny { + value 1; + } + } + default "permit"; + } + + // Direction type + typedef analytics_DirectionT { + type enumeration { + + // Ingress + enum in { + value 1; + } + + // Egress + enum out { + value 2; + } + + // Both + enum both { + value 3; + } + } + default "in"; + } + + // IP filter type + typedef analytics_FltType { + type enumeration { + + // Ipv4 type + enum ipv4 { + value 1; + } + + // Ipv6 type + enum ipv6 { + value 2; + } + + // CE type + enum ce { + value 3; + } + } + default "ipv4"; + } + + // Forwarding instance target identifier + typedef analytics_FwdInstTargetId { + type uint32 { + range "0..16777215"; + } + } + + // Hash value + typedef analytics_HashT { + type uint32 { + range "0..4294967295"; + } + default "0"; + } + + // Hash width type + typedef analytics_HashWidthT { + type uint16 { + range "1..255"; + } + default "12"; + } + + // IP packet identifier shift + typedef analytics_IpPktIdShift { + type uint8 { + range "0..255"; + } + default "0"; + } + + // Layer4 port + typedef analytics_L4Port { + type uint32 { + range "1..65535"; + } + } + + // Match params + // Default Value computed from src-ipv4 + typedef analytics_MatchParams { + + // bits- Using string + type string; + default "src-ipv4"; + } + + // Mode + typedef analytics_ModeT { + type enumeration { + + // Analytics mode + enum analytics { + value 0; + } + + // Netflow mode + enum netflow { + value 1; + } + } + default "netflow"; + } + + // MTU + typedef analytics_Mtu { + type uint16 { + range "576..9216"; + } + default "1500"; + } + + // Operational state of Rule + typedef analytics_OperSt { + type enumeration { + + // enabled + enum enabled { + value 1; + } + + // disabled + enum disabled { + value 2; + } + } + default "disabled"; + } + + // Reasons for rule being disabled. + typedef analytics_OperStQual { + + // bits- Using string + type string; + } + + // Payload length identifier + typedef analytics_PayloadLenIdT { + type uint8 { + range "0..10"; + } + } + + // Payload length + typedef analytics_PayloadLenT { + + // MAX Converted to int from 0x3fff + type uint32 { + range "0..16383"; + } + default "0"; + } + + // Receive window size identifier + typedef analytics_RcvWindowSzIdT { + type uint8 { + range "0..4"; + } + } + + // Receive window size + typedef analytics_RcvWindowSzT { + type uint32 { + range "0..65535"; + } + default "0"; + } + + // Sample size + typedef analytics_SampleSzT { + type uint32 { + range "1..65535"; + } + default "1"; + } + + // Sampler mode + typedef analytics_SamplerMode { + type enumeration { + + // M out of N flows + enum flow { + value 1; + } + + // M out of N pkts + enum pkts { + value 2; + } + } + default "flow"; + } + + // TCP options header length identifier + typedef analytics_TCPOptHdrLenIdT { + type uint8 { + range "0..6"; + } + } + + // TCP options header length + typedef analytics_TCPOptHdrLenT { + type uint32 { + range "0..15"; + } + default "0"; + } + + // Sequence number guess threshold + typedef analytics_ThresholdT { + type uint32 { + range "0..4294967295"; + } + default "0"; + } + + // Create Count + typedef analytics_createCount { + type uint32 { + range "0..16777215"; + } + default "0"; + } + + // Hit Count + typedef analytics_hitCount { + type uint32 { + range "0..16777215"; + } + default "0"; + } + + // Num tcam entries type + typedef analytics_numTcamEntT { + type uint32 { + range "1..65535"; + } + default "1024"; + } + + // Num tcam entries per V4 type + typedef analytics_numTcamEntV4T { + type uint16 { + range "1..256"; + } + default "1"; + } + + // Num tcam entries per V6 type + typedef analytics_numTcamEntV6T { + type uint16 { + range "1..256"; + } + default "4"; + } + + // Adjacency Flags + typedef arp_AdjFlags { + + // bits- Using string + type string; + } + + // Adjacency operational state + typedef arp_AdjOperSt { + type enumeration { + + // Unknown + enum unspecified { + value 0; + } + + // Incomplete + enum incomplete { + value 1; + } + + // Resolved + enum normal { + value 2; + } + } + } + + typedef arp_AdjRouteDist { + type uint32 { + range "2..250"; + } + default "250"; + } + + // ARP Cache Limit + typedef arp_ArpCacheLimit { + type uint32 { + range "1..614400"; + } + default "174080"; + } + + // ARP Cache Syslog Rate + typedef arp_ArpCacheSyslogRate { + type uint32 { + range "1..1000"; + } + default "1"; + } + + // Config Error + typedef arp_ConfigErr { + + // bits- Using string + type string; + } + + // Config Error Inst MO + typedef arp_ConfigErrInst { + + // bits- Using string + type string; + } + + // Database type + typedef arp_DbT { + type enumeration { + + // IP database + enum ip { + value 1; + } + + // SupCache database + enum supcache { + value 2; + } + } + default "ip"; + } + + // Event History Size + typedef arp_EventLogSize { + type enumeration { + + // Disable + enum disabled { + value 0; + } + + // Small + enum small { + value 1; + } + + // Medium + enum medium { + value 2; + } + + // Large + enum large { + value 3; + } + } + default "small"; + } + + // Event Log Type + typedef arp_EventType { + type enumeration { + + // CLI Events + enum cli { + value 0; + } + + // Client Events + enum client-events { + value 1; + } + + // Client Errors + enum client-errors { + value 2; + } + + // Control Events + enum control-events { + value 3; + } + + // Internal Events + enum internal-events { + value 4; + } + + // Internal Errors + enum internal-errors { + value 5; + } + + // High Availability Events + enum high-availability { + value 6; + } + + // IP Sync Events + enum ip-sync { + value 7; + } + + // ARP Local Cache Events + enum local-cache-events { + value 8; + } + + // ARP Local Cache Errors + enum local-cache-errors { + value 9; + } + + // Packet Messages Logs + enum pkt-messages { + value 10; + } + + // SNMP Events + enum snmp { + value 11; + } + + // ARP Suppression Events + enum suppress-events { + value 12; + } + + // ARP Suppression Errors + enum suppress-errors { + value 13; + } + + // Sync Event Logs + enum sync { + value 14; + } + + // Controller MAC-IP route error logs + enum arp-controller-errors { + value 15; + } + + // DME debug event + enum arp-dme-event { + value 16; + } + + // Adjacency Control Logs + enum adjacency-control { + value 101; + } + + // Adjacency Error Logs + enum adjacency-errors { + value 102; + } + + // Adjacency IPC Logs + enum adjacency-ipc-events { + value 103; + } + + // Adjacency Stats Logs + enum adjacency-stats { + value 104; + } + + // Adjacency High Availability Logs + enum adjacency-high-availability { + value 105; + } + + // Adjacency CLI Logs + enum adjacency-cli { + value 106; + } + + // Adjacency SDB Logs + enum adjacency-sdb { + value 107; + } + + // Adjacency SNMP Logs + enum adjacency-snmp { + value 108; + } + + // Adjacency Net Broker Logs + enum adjacency-netbroker { + value 109; + } + + // Adjacency DME event debugs + enum am-dme-event { + value 110; + } + + // Adjacency event debugs + enum am-event { + value 111; + } + } + } + + // Logging Level + typedef arp_LoggingLevel { + type enumeration { + + // Emergency + enum emergency { + value 0; + } + + // Alert + enum alert { + value 1; + } + + // Critical + enum critical { + value 2; + } + + // Error + enum error { + value 3; + } + + // Warning + enum warning { + value 4; + } + + // Notification + enum notification { + value 5; + } + + // Informational + enum informational { + value 6; + } + + // Debug + enum debug { + value 7; + } + } + default "error"; + } + + // MAC Delete adjaceny refresh timeout + typedef arp_MacDelTimeout { + type uint16; + } + + // Max packet count + typedef arp_MaxPacket { + type uint32 { + range "0..32767"; + } + default "1000"; + } + + // ARP off list timeout + typedef arp_OffListTimeout { + type uint16 { + range "180..1800"; + } + default "180"; + } + + // Opcode + typedef arp_Opcode { + type enumeration { + + // Unspecified + enum unspecified { + value 0; + } + + // ARP request + enum req { + value 1; + } + + // ARP reply + enum reply { + value 2; + } + } + default "unspecified"; + } + + // RARP Fabric Forwarding Rate Limit + typedef arp_RarpForwadingRate { + type uint16 { + range "200..400"; + } + default "200"; + } + + // Static Adjacency operational state + typedef arp_StAdjOperSt { + type enumeration { + + // Down + enum down { + value 0; + } + + // Incomplete + enum up { + value 1; + } + + // Unspecified + enum unspecified { + value 10; + } + } + default "unspecified"; + } + + // Static Adjacency operational state qualifier + typedef arp_StAdjOperStQual { + type enumeration { + + // Unspecified + enum unspecified { + value 0; + } + + // Subnet mismatch + enum subnet-mismatch { + value 1; + } + + // Invalid MAC + enum invalid-mac { + value 2; + } + + // Invalid IP + enum invalid-ip { + value 3; + } + + // Invalid VRF + enum invalid-vrf { + value 4; + } + + // Own MAC + enum own-mac { + value 5; + } + + // Interface down + enum if-down { + value 6; + } + + // Up + enum up { + value 7; + } + + // Invalid Interface + enum invalid-if { + value 8; + } + + // Invalid CLI Data + enum invalid-clidata { + value 9; + } + + // No Memory + enum no-memory { + value 10; + } + } + default "unspecified"; + } + + // Suppression Cache flag + typedef arp_SupCacheFlag { + + // bits- Using string + type string; + } + + // Suppression ARP Mode + typedef arp_SuppressArpMode { + type enumeration { + + // Disabled + enum disabled { + value 0; + } + + // L2SuppressARP + enum l2suppressarp { + value 1; + } + + // L2L3SuppressARP + enum l2l3suppressarp { + value 2; + } + + // Invalid + enum invalid { + value 3; + } + } + } + + // ARP suppress timeout + typedef arp_SuppressionTimeout { + type uint16 { + range "0..28800"; + } + default "0"; + } + + // Syslog threshold + typedef arp_SyslogCnt { + type uint32 { + range "0..65535"; + } + default "10000"; + } + + // throttle timeout + typedef arp_ThrottleTimeout { + type uint16 { + range "300..1800"; + } + default "300"; + } + + // ARP timeout + typedef arp_Timeout { + type uint16 { + range "60..28800"; + } + default "1500"; + } + + // Default SVI autoState + typedef bd_DefaultSVIAutoState { + type enumeration { + enum disable { + value 0; + } + enum enable { + value 1; + } + } + default "enable"; + } + + // Address family type + typedef bfd_AfT { + type enumeration { + + // IPv4 address family + enum ipv4 { + value 1; + } + + // IPv6 address family + enum ipv6 { + value 2; + } + } + default "ipv4"; + } + + // Application private data + typedef bfd_AppData { + type mtx_array_uint8; + } + + // Application session flags + typedef bfd_AppFlags { + + // bits- Using string + type string; + } + + // Application ID + typedef bfd_AppId { + type uint32; + } + + // Authentication hex key + typedef bfd_AuthHexKey { + type mtx_array_uint8; + } + + // Authentication hex key size + typedef bfd_AuthHexKeySize { + type uint8 { + range "0..40"; + } + } + + // Authentication key + typedef bfd_AuthKey { + type string { + length "min..20"; + } + } + + // Authentication key id + typedef bfd_AuthKeyId { + type uint8 { + range "1..255"; + } + } + + // Authentication Sequence Number + typedef bfd_AuthSeqno { + type uint32; + } + + // Authentication type + typedef bfd_AuthT { + type enumeration { + + // No authentication + enum none { + value 0; + } + + // Keyed SHA1 + enum sha1 { + value 4; + } + + // Met Keyed SHA1 + enum met-sha1 { + value 5; + } + } + default "none"; + } + + // Current session index + typedef bfd_CurSessIndex { + type uint32; + } + + // Detection multiplier + typedef bfd_DetectMult { + type uint8 { + range "1..50"; + } + default "3"; + } + + // Diag Code + typedef bfd_DiagCode { + type enumeration { + + // No Diagnostic + enum none { + value 0; + } + + // Control Detection Time Expired + enum detect-timeout { + value 1; + } + + // Echo Function Failed + enum echo-fail { + value 2; + } + + // Neighbor Signaled Session Down + enum nbr-signal-down { + value 3; + } + + // Forwarding Plane Reset + enum fwd-plane-reset { + value 4; + } + + // Path Down + enum path-down { + value 5; + } + + // Concatenated Path Down + enum concat-path-down { + value 6; + } + + // Administratively Down + enum admin-down { + value 7; + } + + // Reverse Concatenated Path Down + enum rev-concat-path-down { + value 8; + } + } + } + + // Session discriminator + typedef bfd_Discr { + type uint32; + } + + // echo rx interval (in ms) + typedef bfd_EchoRxIntvl { + type uint16 { + range "0..999"; + } + default "0"; + } + + typedef bfd_IfControl { + + // bits- Using string + type string; + } + + // Interface Detection multiplier + typedef bfd_IfDetectMult { + type uint8 { + range "0..50"; + } + default "0"; + } + + // Interface Minimum rx interval (in ms) + typedef bfd_IfMinRxIntvl { + type uint16 { + range "0..999"; + } + default "0"; + } + + // Interface Minimum tx interval (in ms) + typedef bfd_IfMinTxIntvl { + type uint16 { + range "0..999"; + } + default "0"; + } + + // Global flags + typedef bfd_InstFlags { + + // bits- Using string + type string; + } + + // Minimum rx interval (in ms) + typedef bfd_MinRxIntvl { + type uint16 { + range "50..999"; + } + default "50"; + } + + // Minimum tx interval (in ms) + typedef bfd_MinTxIntvl { + type uint16 { + range "50..999"; + } + default "50"; + } + + // Oper State + typedef bfd_OperSt { + type enumeration { + + // AdminDown + enum admin-down { + value 0; + } + + // Down + enum down { + value 1; + } + + // Init + enum init { + value 2; + } + + // Up + enum up { + value 3; + } + } + } + + // Packet flags + typedef bfd_PktFlags { + + // bits- Using string + type string; + } + + // Packet Interval (in ms) + typedef bfd_PktInterval { + type uint32; + } + + // Application sap ID + typedef bfd_SapId { + type uint32; + } + + // Slow interval (in ms) + typedef bfd_SlowIntvl { + type uint16 { + range "1000..30000"; + } + default "2000"; + } + + // BFD Start timeout + // Default Value "0" Removed - out of range 60..3600 + typedef bfd_StTm { + type uint32 { + range "60..3600"; + } + } + + // Startup interval (in second) + typedef bfd_StartupIntvl { + type uint16 { + range "0..30"; + } + default "5"; + } + + // BFD Cfg State + typedef bfd_TrkMbrLnk { + type enumeration { + + // Enabled + enum enable { + value 1; + } + + // Disabled + enum disable { + value 0; + } + } + default "disable"; + } + + // Additional Paths capability in DomAf + typedef bgp_AddlPathCapT { + + // bits- Using string + type string; + } + + // Administrative state + typedef bgp_AdminSt { + type enumeration { + + // Enabled + enum enabled { + value 1; + } + + // Disabled + enum disabled { + value 2; + } + } + default "disabled"; + } + + // Advertisement Interval + typedef bgp_AdvInterval { + type uint16 { + range "0..600"; + } + } + + // Advertise l2vpn evpn + typedef bgp_AdvertL2vpnEvpn { + type enumeration { + + // Enabled + enum enabled { + value 1; + } + + // Disabled + enum disabled { + value 0; + } + } + default "disabled"; + } + + typedef bgp_AdvtMapCondition { + type enumeration { + + // no options + enum none { + value 0; + } + + // Exist Route Map + enum exist { + value 1; + } + + // Non-Exist Route Map + enum non-exist { + value 2; + } + } + default "none"; + } + + // Address family type + typedef bgp_AfT { + type enumeration { + + // IPv4 unicast address family + enum ipv4-ucast { + value 1; + } + + // IPv4 multicast address family + enum ipv4-mcast { + value 2; + } + + // Vpnv4 unicast address family + enum vpnv4-ucast { + value 3; + } + + // IPv6 unicast address family + enum ipv6-ucast { + value 5; + } + + // IPv6 multicast address family + enum ipv6-mcast { + value 6; + } + + // Vpnv6 unicast address family + enum vpnv6-ucast { + value 7; + } + + // L2Vpn EVpn address family + enum l2vpn-evpn { + value 9; + } + + // IPv4 labeled unicast address family + enum ipv4-lucast { + value 10; + } + + // IPv6 labeled unicast address family + enum ipv6-lucast { + value 11; + } + + // Link state address family + enum lnkstate { + value 12; + } + + // IPv4 mvpn address family + enum ipv4-mvpn { + value 13; + } + + // IPv6 mvpn address family + enum ipv6-mvpn { + value 14; + } + + // L2Vpn vpls address family + enum l2vpn-vpls { + value 15; + } + + // IPv4 mdt address family + enum ipv4-mdt { + value 16; + } + } + default "ipv4-ucast"; + } + + // Activate the affinity group + typedef bgp_AffGrpActv { + type uint16 { + range "0..65535"; + } + } + + // AS path database size + typedef bgp_AsPathDbSz { + type uint32; + } + + // AS segment type + typedef bgp_AsSegT { + type enumeration { + + // Sequence + enum sequence { + value 1; + } + + // Set + enum set { + value 2; + } + } + default "set"; + } + + // AS Set + typedef bgp_AsSet { + type enumeration { + + // Enabled + enum enabled { + value 1; + } + + // Disabled + enum disabled { + value 0; + } + } + default "disabled"; + } + + // Asn number + typedef bgp_AsnNum { + type string; + } + + // Customizes AS_PATH attribute for routes received from eBGP neighbor + typedef bgp_AsnPropagation { + type enumeration { + + // no options + enum none { + value 0; + } + + // no-prepend + enum no-prepend { + value 1; + } + + // no-prepend+replace-as + enum replace-as { + value 2; + } + + // noPrepend+replace-as+dual-as + enum dual-as { + value 3; + } + } + default "none"; + } + + // Attribute database size + typedef bgp_AttribDbSz { + type uint32; + } + + // BestPath Timeout Limit + typedef bgp_BestPathIntvl { + type uint16 { + range "1..3600"; + } + default "300"; + } + + // BMP server state + typedef bgp_BmpSt { + type enumeration { + + // Enabled + enum enabled { + value 0; + } + + // Disabled + enum disabled { + value 1; + } + } + default "enabled"; + } + + // Additional Paths capability in Neighbor Af + typedef bgp_CapAddlPathCapT { + + // bits- Using string + type string; + } + + // Capability type + typedef bgp_CapT { + + // bits- Using string + type string; + } + + // Cluster ID + typedef bgp_ClusterId { + type string; + } + + // Connection Attempts + typedef bgp_ConnAttempts { + type uint32; + default "0"; + } + + // Connection info + typedef bgp_ConnMode { + + // bits- Using string + type string; + } + + // BGP Distance + typedef bgp_Distance { + type uint16 { + range "1..255"; + } + } + + // VRF Id + typedef bgp_DomId { + type uint32; + } + + // Domain operational state + typedef bgp_DomOperSt { + type enumeration { + + // Unknown + enum unknown { + value 0; + } + + // Up + enum up { + value 1; + } + + // Down + enum down { + value 2; + } + } + default "unknown"; + } + + // Egress Peer Engineering EPE for neighbor status + typedef bgp_EgressPeerEng { + type enumeration { + + // Disabled + enum none { + value 0; + } + + // Egress Peer Engineering Enabled + enum enabled { + value 1; + } + + // Advertise Adjacency-SIDs for multi-hop neighbor paths + enum enabled-adj-sid { + value 2; + } + } + default "none"; + } + + // Event History Buffer Type + typedef bgp_EhType { + type enumeration { + enum none { + value 0; + } + + // Cli buffer + enum cli { + value 1; + } + + // Events buffer + enum events { + value 2; + } + + // Periodic buffer + enum periodic { + value 3; + } + + // Detailed buffer + enum detail { + value 4; + } + + // Errors buffer + enum errors { + value 5; + } + + // Objstore buffer + enum objstore { + value 6; + } + } + default "none"; + } + + // EVPN route-type + typedef bgp_EvpnRtType { + type enumeration { + + // Unspecified + enum none { + value 0; + } + + // Ethernet Auto-Discovery route + enum a-d { + value 1; + } + + // MAC/IP Advertisement route + enum mac-ip { + value 2; + } + + // Inclusive Multicast Ethernet Tag route + enum imet { + value 3; + } + + // Ethernet Segment route + enum eth-seg { + value 4; + } + + // IP Prefix route + enum ip-pfx { + value 5; + } + } + default "none"; + } + + // Graceful restart controls + // Default Value computed from complete + typedef bgp_GrCtrl { + + // bits- Using string + type string; + default "complete"; + } + + // Graceful restart interval + typedef bgp_GrIntvl { + type uint16 { + range "1..3600"; + } + default "120"; + } + + // Graceful stale interval + typedef bgp_GrStaleIntvl { + type uint16 { + range "1..3600"; + } + default "300"; + } + + // Hold Interval + typedef bgp_HoldIntvl { + type uint16 { + range "3..3600"; + } + default "180"; + } + + // IGP Preference + typedef bgp_IgpPref { + type uint8; + } + + // IGP Route Type + typedef bgp_IgpRtType { + type uint8; + } + + // Inherit template peer control bits. This contains common fields of peer and peer-session templates (please refer to + // MOs PeerCont and SessionCont). + typedef bgp_InheritContPeerCtrlType { + + // bits- Using string + type string; + } + + // Inherit template peer-policy control bits. (Please refer + // to MO PolicyCont). + typedef bgp_InheritContPeerPolicyCtrlType { + + // bits- Using string + type string; + } + + // Keepalive Interval + typedef bgp_KaIntvl { + type uint16 { + range "0..3600"; + } + default "60"; + } + + // Last error len + typedef bgp_LastErrLen { + type uint8; + } + + // Last error value + typedef bgp_LastErrVal { + type uint32; + } + + // NH iLast Resolved Timestamp + typedef bgp_LastResolvTs { + type string; + default "0"; + } + + // Label + typedef bgp_Lbl { + type uint32; + default "0"; + } + + // Link Attribute TLV flags for Link-state + // Default Value computed from none + typedef bgp_LnkLsAttrFlags { + + // bits- Using string + type string; + default "none"; + } + + // Log Neighbor changes + typedef bgp_LogNbrSt { + type enumeration { + + // none + enum none { + value 0; + } + + // Enable + enum enable { + value 1; + } + + // Disable + enum disable { + value 2; + } + } + default "none"; + } + + // Link-State status + typedef bgp_LsAdminSt { + type enumeration { + + // Inactive + enum inactive { + value 0; + } + + // Active + enum active { + value 1; + } + } + default "inactive"; + } + + // Link-State attribute entry type + typedef bgp_LsAttrEntryType { + type enumeration { + + // Unspecified + enum none { + value 0; + } + + // Peer Node Segment Identifier + enum peer-node-sid { + value 1101; + } + + // Peer Adjacency Segment Identifier + enum peer-adj-sid { + value 1102; + } + + // Peer Set Segment Identifier + enum peer-set-sid { + value 1103; + } + } + default "none"; + } + + // Link-State NLRI Type + typedef bgp_LsNlriType { + type enumeration { + + // Unspecified + enum none { + value 0; + } + + // Node NLRI + enum node { + value 1; + } + + // Link NLRI + enum link { + value 2; + } + + // IPv4 Topology Prefix NLRI + enum ipv4-topo { + value 3; + } + + // IPv6 Topology Prefix NLRI + enum ipv6-topo { + value 4; + } + } + default "none"; + } + + // Link-State Protocol Identifier + typedef bgp_LsProtoId { + type enumeration { + + // Unspecified + enum none { + value 0; + } + + // IS-IS Level 1 + enum isis-l1 { + value 1; + } + + // IS-IS Level 2 + enum isis-l2 { + value 2; + } + + // OSPFv2 + enum ospf-v2 { + value 3; + } + + // Direct + enum direct { + value 4; + } + + // Static configuration + enum static { + value 5; + } + + // OSPFv3 + enum ospf-v3 { + value 6; + } + + // Egress Peer Engineering + enum epe { + value 7; + } + } + default "none"; + } + + // Major notify error + typedef bgp_MajNotifErr { + type enumeration { + + // None + enum none { + value 0; + } + + // Header Error + enum hdr-err { + value 1; + } + + // Open Message Error + enum open-msg-err { + value 2; + } + + // Update Message Error + enum upd-msg-err { + value 3; + } + + // Holdtimer Expired + enum hold-timer-exp { + value 4; + } + + // FSM Error + enum fsm-err { + value 5; + } + + // Cease Error + enum cease-err { + value 6; + } + + // Capability Message Error + enum cap-msg-err { + value 7; + } + + // Process Restart Error + enum process-restart-err { + value 101; + } + + // FD Read Error + enum fd-read-err { + value 102; + } + + // FD Ioctl Error + enum fd-ioctl-err { + value 103; + } + + // Peer Closed Session Error + enum peer-close-sess-err { + value 104; + } + + // Peer Received Notification Error + enum rcvd-notif-err { + value 105; + } + + // Received Duplicate Connection Request + enum rcvd-dup-conn-req { + value 106; + } + + // Dynamic Capability no Buffer + enum dyn-cap-no-buf { + value 107; + } + } + } + + // Maximum AS Limit + typedef bgp_MaxAsLimit { + type uint16 { + range "0..512"; + } + } + + // Maximum Ecmp + typedef bgp_MaxEcmp { + type uint8 { + range "1..64"; + } + default "1"; + } + + // Maximum Peers + typedef bgp_MaxPeerCnt { + type uint32 { + range "0..1000"; + } + } + + // Maximum Prefix + typedef bgp_MaxPfx { + type uint32; + } + + // Action when the prefixes crosses the maximum limit + typedef bgp_MaxPfxAct { + type enumeration { + + // Log + enum log { + value 1; + } + + // Shutdown + enum shut { + value 2; + } + + // Restart + enum restart { + value 3; + } + } + default "shut"; + } + + // Duration before we restart the peer when the maximum + // prefix limit is reached + typedef bgp_MaxPfxDuration { + + // MAX Converted to int from 0xffff + type uint16 { + range "0..65535"; + } + } + + // Threshold at which warning is issued when number of prefixes + // crosses the threshold, units in percentage + typedef bgp_MaxPfxThresh { + type uint8 { + range "0..100"; + } + } + + // MED dampening interval + typedef bgp_MedIntvl { + type uint32 { + range "0..4294967295"; + } + } + + // Memory consumed (in bytes) + typedef bgp_MemConsumed { + type uint32; + } + + // Metric + typedef bgp_Metric { + type uint32; + } + + // Minor notify error + typedef bgp_MinNotifErr { + type enumeration { + + // None + enum none { + value 0; + } + + // Unspecified Msg Header Error + enum unspecified-msg-hdr-err { + value 1; + } + + // Connection not Synchronized + enum conn-not-synced { + value 2; + } + + // Bad Message Length + enum bad-msg-len { + value 3; + } + + // Bad Message Type + enum bad-msg-type { + value 4; + } + + // Unknown Message Header Error + enum unknown-msg-hdr-err { + value 5; + } + + // Unspecified Open Error + enum unspecified-open-err { + value 6; + } + + // Unsupported Version + enum unsupp-version { + value 7; + } + + // Bad Peer AS + enum bad-peer-as { + value 8; + } + + // Bad Peer Router ID + enum bad-peer-rtrid { + value 9; + } + + // Unsupported Optional Parameter + enum unsupp-opt-param { + value 10; + } + + // Authentication Error + enum auth-err { + value 11; + } + + // Unacceptable Holdtime + enum bad-holdtime { + value 12; + } + + // Unsupported Capability + enum unsupp-cap { + value 13; + } + + // Unknown Open Header Error + enum unknown-open-hdr-err { + value 14; + } + + // Unspecified Update Error + enum unspecified-update-err { + value 15; + } + + // Malformed Attribute List + enum malformed-attr-list { + value 16; + } + + // Unrecognized Wellknown Attr + enum unrecognized-wellknown-attr { + value 17; + } + + // Missing Well-known Attribute + enum missing-wellknown-attr { + value 18; + } + + // Attribute Flags Error + enum attr-flags-err { + value 19; + } + + // Attribute Length Error + enum attr-len-err { + value 20; + } + + // Invalid Origin Attribute + enum invalid-origin-attr { + value 21; + } + + // Bgp AS Routing Loop Error + enum as-loop-err { + value 22; + } + + // Invalid Next-hop Attribute + enum invalid-nh-attr { + value 23; + } + + // Optional Attribute Error + enum opt-attr-err { + value 24; + } + + // Invalid Network Field + enum invalid-nw-field { + value 25; + } + + // Malformed AS Path + enum bad-as-path { + value 26; + } + + // Unknown Update Header Error + enum unknown-update-hdr-err { + value 27; + } + + // Unspecified Cease Error + enum unspecified-cease-err { + value 28; + } + + // Maximum Prefix Count + enum max-pfx-count-err { + value 29; + } + + // Administratively Shutdown + enum admin-shut { + value 30; + } + + // Peer Deconfigured + enum peer-decfg { + value 31; + } + + // Session Cleared + enum session-cleared { + value 32; + } + + // Connection Rejected + enum conn-rej { + value 33; + } + + // Other Configuration Change Error + enum other-cfg-chg { + value 34; + } + + // Connection Collision Resolution + enum conn-coll-resolution { + value 35; + } + + // Out of Resource + enum out-of-rsrc { + value 36; + } + + // Dynamic Capability Configuration Change + enum dyn-cap-cfg-chg { + value 37; + } + + // TTL Configuration Change + enum ttl-cfg-chg { + value 38; + } + + // TTL Security Configuration Change + enum ttl-security-cfg-chg { + value 39; + } + + // Passive Neighbor Configuration Change + enum passive-neighbor-cfg-chg { + value 40; + } + + // Address-family Configuration Change + enum af-cfg-chg { + value 41; + } + + // Route-reflector Configuration Change + enum rr-cfg-chg { + value 42; + } + + // Router-id Configuration Change + enum rtrid-cfg-chg { + value 43; + } + + // Confederation Id Change + enum confed-id-chg { + value 44; + } + + // Confederation Membership Change + enum confed-membership-change { + value 45; + } + + // Graceful-restart Configuration Change + enum gr-cfg-chg { + value 46; + } + + // Soft-reconfiguration Change + enum soft-recfg-chg { + value 47; + } + + // Update-source Interface Change + enum updatesrc-if-chg { + value 48; + } + + // Local-as Change + enum localas-chg { + value 49; + } + + // Unknown Cease Error + enum unknown-cease-err { + value 50; + } + + // Unspecified Cappability Message Error + enum unspecified-cap-msg-err { + value 51; + } + + // Unknown Sequence Number + enum unknown-seq-num { + value 52; + } + + // Invalid Capability Length + enum invalid-cap-len { + value 53; + } + + // Malformed Capability Value + enum bad-cap-val { + value 54; + } + + // Unsupported Capability Code + enum unsupp-cap-code { + value 55; + } + + // Unknown Capability Error + enum unknown-cap-err { + value 56; + } + } + } + + // Mode + typedef bgp_Mode { + type enumeration { + + // Fabric + enum fabric { + value 1; + } + + // External + enum external { + value 2; + } + } + default "fabric"; + } + + // MCAST-VPN NLRI route-type + typedef bgp_MvpnRtType { + type enumeration { + + // Unspecified + enum none { + value 0; + } + + // Multicast Inter-AS PMSI Auto Discovery route + enum interas-ipmsi-ad { + value 1; + } + + // Multicast Intra-AS PMSI Auto Discovery route + enum intraas-ipmsi-ad { + value 2; + } + + // Multicast S-PMSI Auto Discovery route + enum spmsi-ad { + value 3; + } + + // Multicast Leaf Auto Discovery route + enum leaf-ad { + value 4; + } + + // Multicast Source-Active Auto Discovery route + enum sa-ad { + value 5; + } + + // Shared C-Multicast route + enum shared-c-mcast { + value 6; + } + + // Source C-Multicast route + enum source-c-mcast { + value 7; + } + } + default "none"; + } + + // NH Next Advertised Timestamp + typedef bgp_NextAdvTs { + type string; + default "0"; + } + + // Nexthop flags + typedef bgp_NhFlags { + + // bits- Using string + type string; + } + + // Link Attribute TLV flags for Link-state + // Default Value computed from none + typedef bgp_NodeLsAttrFlags { + + // bits- Using string + type string; + default "none"; + } + + // Number of paths + typedef bgp_NumPaths { + type uint32; + } + + // Number of Peers + typedef bgp_NumPeers { + type uint32; + } + + // Order (for AS path segments and AS path items) + typedef bgp_Order { + type uint16; + } + + // Origin + typedef bgp_Origin { + type enumeration { + + // Learned Via IGP + enum igp { + value 1; + } + + // Learned Via EGP + enum egp { + value 2; + } + + // Learned by some other Means + enum incomplete { + value 3; + } + } + default "igp"; + } + + // Authentication status + typedef bgp_PasswdSet { + type enumeration { + + // Enabled + enum enabled { + value 1; + } + enum disabled { + value 0; + } + } + default "disabled"; + } + + // Path flags + typedef bgp_PathFlags { + + // bits- Using string + type string; + } + + // Path id + typedef bgp_PathId { + type uint32; + } + + // Path status + typedef bgp_PathSt { + type enumeration { + + // Deleted + enum deleted { + value 0; + } + + // Staled + enum staled { + value 1; + } + + // Valid + enum valid { + value 2; + } + + // InValid + enum invalid { + value 3; + } + + // history + enum history { + value 4; + } + + // suppressed + enum suppressed { + value 5; + } + + // dampened + enum dampened { + value 6; + } + } + } + + // Path type + typedef bgp_PathT { + type enumeration { + + // Internal + enum internal { + value 1; + } + + // External + enum external { + value 2; + } + + // Confederation + enum confederation { + value 3; + } + + // Local + enum local { + value 4; + } + + // Aggregate + enum aggregate { + value 5; + } + + // Redistribute + enum redistribute { + value 6; + } + + // Injected + enum injected { + value 7; + } + } + default "internal"; + } + + // Peer Address Family Control + typedef bgp_PeerAfControl { + + // bits- Using string + type string; + } + + // Peer AF flags + typedef bgp_PeerAfFlags { + + // bits- Using string + type string; + } + + // Peer Control + typedef bgp_PeerControl { + + // bits- Using string + type string; + } + + // TODO: Change this to nw:Cnt64 Count of BGP Messages + typedef bgp_PeerCount { + type uint64; + } + + // Peer Fabric Type + typedef bgp_PeerFabType { + type enumeration { + + // Fabric internal + enum fabric-internal { + value 0; + } + + // Fabric external + enum fabric-external { + value 1; + } + + // Fabric Border Leaf + enum fabric-border-leaf { + value 2; + } + } + default "fabric-internal"; + } + + // Peer flags + typedef bgp_PeerFlags { + + // bits- Using string + type string; + } + + // Peer graceful restart state + typedef bgp_PeerGrSt { + type enumeration { + + // Not applicable + enum na { + value 1; + } + + // Reset + enum reset { + value 2; + } + + // Up + enum up { + value 3; + } + } + default "na"; + } + + // Peer Index + typedef bgp_PeerIdx { + type uint16; + } + + // Peer operational state + typedef bgp_PeerOperSt { + type enumeration { + + // Unspecified + enum unspecified { + value 0; + } + + // Illegal + enum illegal { + value 1; + } + + // Shut + enum shut { + value 2; + } + + // Idle + enum idle { + value 3; + } + + // Connect + enum connect { + value 4; + } + + // Active + enum active { + value 5; + } + + // Open sent + enum open-sent { + value 6; + } + + // Open confirm + enum open-confirm { + value 7; + } + + // Established + enum established { + value 8; + } + + // Closing + enum closing { + value 9; + } + + // Error + enum error { + value 10; + } + + // Unknown + enum unknown { + value 11; + } + } + default "unspecified"; + } + + // Peer Type + typedef bgp_PeerType { + type enumeration { + + // ibgp + enum ibgp { + value 1; + } + + // ebgp + enum ebgp { + value 2; + } + } + default "ibgp"; + } + + // Pfx Flushed + typedef bgp_PfxFlushed { + type uint64; + } + + // Prefix Attributes TLV flags for Link-state + // Default Value computed from none + typedef bgp_PfxLsAttrFlags { + + // bits- Using string + type string; + default "none"; + } + + // TODO: Change this to nw:Cnt64 Counts for Prefix Peers + typedef bgp_PfxPeerCounts { + type uint64; + } + + // Prefix Peer Timeout + typedef bgp_PfxPeerTimeout { + type uint16 { + range "0..1200"; + } + } + + // Prefix Peer Wait + typedef bgp_PfxPeerWaitTime { + type uint16 { + range "0..1200"; + } + } + + // TODO: Change this to nw:Cnt64 Pfx Saved + typedef bgp_PfxSaved { + type uint64; + } + + // Pfx Sent + typedef bgp_PfxSent { + type uint64; + } + + // Prefix-Sid attribute entry type + typedef bgp_PfxSidAttrEntryType { + type enumeration { + + // Unspecified + enum none { + value 0; + } + + // Label Index + enum label-index { + value 1; + } + + // IPv6-SID + enum ipv6-sid { + value 2; + } + + // Originator SRGB + enum origin-srgb { + value 3; + } + } + default "none"; + } + + // PMSI Tunnel Type + typedef bgp_PmsiTunType { + type enumeration { + + // Unspecified + enum none { + value 0; + } + + // Ingress Replication + enum ingress-repl { + value 1; + } + } + default "none"; + } + + // private-as Control + typedef bgp_PrivateASControl { + type enumeration { + enum none { + value 0; + } + + // Remove private AS + enum remove-exclusive { + value 1; + } + + // Remove all private AS + enum remove-all { + value 2; + } + + // Replace private AS with local AS + enum replace-as { + value 3; + } + } + default "none"; + } + + // Reconnect Interval Value + typedef bgp_ReConnectIntvl { + type uint16 { + range "1..60"; + } + default "60"; + } + + // RNH Epoch + typedef bgp_RnhEpoch { + type uint8; + } + + // Route control direction + typedef bgp_RtCtrlDir { + type enumeration { + + // Incoming + enum in { + value 1; + } + + // Outgoing + enum out { + value 2; + } + } + default "in"; + } + + // Route control operational state + typedef bgp_RtCtrlOperSt { + type enumeration { + + // Unresolved + enum unresolved { + value 1; + } + + // Resolved + enum resolved { + value 2; + } + } + default "unresolved"; + } + + // Route flags + typedef bgp_RtFlags { + + // bits- Using string + type string; + } + + // Labeled address-family route flags + typedef bgp_RtLblAfFlags { + + // bits- Using string + type string; + } + + // Route version + typedef bgp_RtVer { + type uint32; + } + + // Route target policy type + typedef bgp_RttPType { + type enumeration { + + // Import + enum import { + value 1; + } + + // Export + enum export { + value 2; + } + } + default "import"; + } + + // Segment Routing Global Block + // Default Value "0" Removed - out of range 16..471804 + typedef bgp_SRGBRange { + type uint32 { + range "16..471804"; + } + } + + // Peer shut state qualifier + typedef bgp_ShutStQual { + type enumeration { + + // Unspecified + enum unspecified { + value 0; + } + + // Administratively down + enum admin { + value 1; + } + + // No memory + enum no-mem { + value 2; + } + + // Exceeded prefix limit + enum exceeded-pfxlimit { + value 3; + } + + // Administratively up + enum admin-up { + value 4; + } + + // No Affinity + enum no-affinity { + value 5; + } + } + default "unspecified"; + } + + // Event History Buffer Size + typedef bgp_Size { + type uint32 { + range "0..4 | 8192..1048576"; + } + default "0"; + } + + // FD to connect to the peer + typedef bgp_SockFD { + type uint32; + } + + // Soft Reconfiguration + typedef bgp_SoftReconfigBackup { + type enumeration { + enum none { + value 0; + } + + // Inbound Only + enum inbound { + value 1; + } + + // Inbound Always + enum inbound-always { + value 2; + } + } + } + + // BMP Server ID + typedef bgp_SrvId { + type uint8 { + range "1..2"; + } + } + + // Peer Idle State Reason + typedef bgp_StReason { + type enumeration { + enum none { + value 0; + } + + // NoMem + enum no-mem { + value 1; + } + } + default "none"; + } + + // Aggregate Address Summary-Only + typedef bgp_SummaryOnly { + type enumeration { + + // Enabled + enum enabled { + value 1; + } + + // Disabled + enum disabled { + value 0; + } + } + default "disabled"; + } + + // Table state + typedef bgp_TblSt { + type enumeration { + + // Unknown + enum unknown { + value 0; + } + + // Up + enum up { + value 1; + } + + // Down + enum down { + value 2; + } + } + } + + // Table version + typedef bgp_TblVer { + type uint32; + } + + // eBGP Multihop TTL value + typedef bgp_TtlVal { + type uint16 { + range "0..255"; + } + } + + // Unknown Attribute Length + typedef bgp_UnknownAttrLen { + + // MAX Converted to int from 0xffffffff + type uint32 { + range "0..4294967295"; + } + } + + // Version + typedef bgp_Ver { + type enumeration { + + // BGP Version 4 + enum v4 { + value 4; + } + } + default "v4"; + } + + // VNID + // Default Value "0" Removed - out of range 4096..16777215 + typedef bgp_Vnid { + + // MAX Converted to int from 0xffffff + type uint32 { + range "4096..16777215"; + } + } + + // Dampen Igp Metric + typedef bgp_igpMetric { + type uint16 { + range "0..3600"; + } + default "600"; + } + + typedef cap_Constraint { + type uint32; + } + + typedef cap_Counter { + type uint32; + } + + typedef cap_Model { + type string; + } + + // Quantitative + typedef cap_Quant { + + // MAX Converted to int from 0xFFFF + type uint16 { + range "0..65535"; + } + default "0"; + } + + typedef cap_RaiseFaultState { + type enumeration { + enum nominal { + value 0; + } + enum ruleHasLess { + value 1; + } + enum ruleHasMore { + value 2; + } + } + default "nominal"; + } + + typedef cap_RuleT { + type enumeration { + enum limit { + value 1; + } + } + default "limit"; + } + + typedef cap_Scope { + type enumeration { + enum node { + value 0; + } + enum policy-domain { + value 1; + } + enum fabric { + value 2; + } + } + default "node"; + } + + typedef cap_StorageHint { + type uint8; + } + + typedef cap_Vendor { + type string; + } + + typedef cap_Version { + type string; + } + + // Adjacency state qualifier + typedef cdp_AdjStQual { + + // bits- Using string + type string; + } + + // Capability type + typedef cdp_CapT { + + // bits- Using string + type string; + } + + // Neighbor device id + typedef cdp_DevId { + type string; + } + + // Device identifier type + typedef cdp_DevIdT { + type enumeration { + + // MAC address + enum mac { + value 1; + } + + // Serial number + enum serialNum { + value 2; + } + + // System name + enum sysName { + value 3; + } + + // System name and serial number + enum sysNameAndSerialNum { + value 4; + } + } + default "sysNameAndSerialNum"; + } + + // Neighbor device index + typedef cdp_DevIndex { + type uint32; + } + + // Duplex + typedef cdp_Duplex { + type enumeration { + + // Unknown + enum unknown { + value 0; + } + + // Half duplex + enum half { + value 1; + } + + // Full duplex + enum full { + value 2; + } + } + } + + // Hold interval + // No Enums - transformed from scalar:Enum8 to scalar:UByte, YANG integer equivalent uint8 + typedef cdp_HoldIntvl { + type uint8 { + range "10..255"; + } + default "180"; + } + + // MTU + typedef cdp_MTU { + type uint32; + } + + // Neighbor version + typedef cdp_NbrVer { + type string; + } + + // Operational state + typedef cdp_OperSt { + type enumeration { + + // Up + enum up { + value 1; + } + + // Down + enum down { + value 2; + } + } + default "down"; + } + + // Operational state qualifier + typedef cdp_OperStQual { + type enumeration { + + // Up + enum up { + value 1; + } + + // Administratively down + enum admin-down { + value 2; + } + + // Interface down + enum if-down { + value 3; + } + + // Unsupported + enum unsupported { + value 4; + } + } + default "unsupported"; + } + + // Neighbor platform id + typedef cdp_PlatId { + type string; + } + + // Neighbor port id + typedef cdp_PortId { + type string; + } + + // System Location + typedef cdp_SysLoc { + type string; + } + + // System name + typedef cdp_SysName { + type string; + } + + // System OID Length + typedef cdp_SysObjIdL { + type uint8; + } + + // System OID Value + typedef cdp_SysObjIdV { + type mtx_array_uint32; + } + + // Transmission frequency + // No Enums - transformed from scalar:Enum8 to scalar:UByte, YANG integer equivalent uint8 + typedef cdp_TxFreq { + type uint8 { + range "5..254"; + } + default "60"; + } + + // Version + typedef cdp_Ver { + type enumeration { + + // Version 1 + enum v1 { + value 1; + } + + // Version 2 + enum v2 { + value 2; + } + } + default "v2"; + } + + // Vlan id + typedef cdp_VlanId { + type uint16; + default "0"; + } + + typedef comm_Port { + type uint32 { + range "1024..65000"; + } + } + + typedef comp_DelimitedString { + type string; + } + + typedef comp_HostState { + type enumeration { + + // Maintenance Mode + enum maintenance { + value 0; + } + + // Connected + enum connected { + value 1; + } + + // Not Responding + enum noresponse { + value 2; + } + + // Disconnected + enum disconnected { + value 3; + } + + // Powered On + enum poweredOn { + value 4; + } + + // Powered Off + enum poweredOff { + value 5; + } + + // StandBy + enum standBy { + value 6; + } + + // Suspended + enum suspended { + value 7; + } + + // Unknown + enum unknown { + value 8; + } + } + default "disconnected"; + } + + typedef comp_NicInstType { + type enumeration { + + // Unknown + enum unknown { + value 0; + } + + // Baremetal Host + enum phys { + value 1; + } + + // Virtual Machine + enum virt { + value 2; + } + + // Hypervisor Host + enum hv { + value 3; + } + } + default "unknown"; + } + + typedef comp_NicState { + type enumeration { + + // Down + enum down { + value 0; + } + + // Up + enum up { + value 1; + } + } + default "down"; + } + + typedef comp_Vendor { + type enumeration { + enum VMware { + value 1; + } + enum Microsoft { + value 2; + } + } + default "VMware"; + } + + // Result of filter check + typedef compat_FilterStatus { + type enumeration { + + // failed + enum failed { + value 0; + } + + // passed + enum passed { + value 1; + } + } + default "failed"; + } + + // Operation type + typedef conftmpl_OperationType { + type enumeration { + + // Create + enum create { + value 1; + } + + // Delete + enum delete { + value 2; + } + } + default "create"; + } + + // Template type + typedef conftmpl_TemplateType { + type enumeration { + + // Unknown + enum unknown { + value 0; + } + + // Vrf + enum vrf { + value 1; + } + + // Vlan + enum vlan { + value 2; + } + + // Intf + enum intf { + value 3; + } + } + default "unknown"; + } + + // Adj addr + typedef coop_AdjAddr { + type address_Ipv4; + } + + // Adjacency flags + typedef coop_AdjFlags { + + // bits- Using string + type string; + } + + // Adjacency operational state + typedef coop_AdjOperSt { + type enumeration { + + // Down + enum down { + value 1; + } + + // Up + enum up { + value 2; + } + } + default "down"; + } + + // Adjacency operational state qualifier + typedef coop_AdjOperStQual { + type enumeration { + + // Unspecified + enum unspecified { + value 0; + } + + // Route not reachable + enum route-unreachable { + value 1; + } + + // TCP Connection Down + enum tcp-down { + value 2; + } + + // Peer inactive + enum peer-inactive { + value 3; + } + + // Peer congested + enum peer-congested { + value 4; + } + + // Up + enum up { + value 5; + } + } + default "unspecified"; + } + + // Collisions load factor + typedef coop_CollLdFactor { + + // MAX Converted to int from 0xffff + type uint16 { + range "1..65535"; + } + default "1"; + } + + // Ctx flags + typedef coop_CtxFlags { + + // bits- Using string + type string; + } + + // Dampen action + typedef coop_DampAction { + type enumeration { + + // Freeze + enum freeze { + value 1; + } + + // Withdraw + enum withdraw { + value 2; + } + } + default "freeze"; + } + + // Half life + typedef coop_DampHalfLife { + + // MAX Converted to int from 0xffff + type uint16 { + range "1..65535"; + } + default "10"; + } + + // Dampen Penalty + typedef coop_DampPenalty { + + // MAX Converted to int from 0xffff + type uint16 { + range "100..65535"; + } + default "1000"; + } + + // Dampen reuse threshold + typedef coop_DampReuseThresh { + + // MAX Converted to int from 0xffff + type uint16 { + range "100..65535"; + } + default "2500"; + } + + // Dampen saturation threshold + typedef coop_DampSatThresh { + + // MAX Converted to int from 0xffff + type uint16 { + range "100..65535"; + } + default "10000"; + } + + // Dampen threshold + typedef coop_DampThresh { + + // MAX Converted to int from 0xffff + type uint16 { + range "100..65535"; + } + default "4000"; + } + + // Domain operational state + typedef coop_DomOperSt { + type enumeration { + + // Down + enum down { + value 0; + } + + // Initializing + enum init { + value 1; + } + + // Up + enum up { + value 2; + } + } + default "down"; + } + + // Domain operational state qualifier + typedef coop_DomOperStQual { + type enumeration { + + // Unspecified + enum unspecified { + value 0; + } + + // Configuration not resolved + enum config-unresolved { + value 1; + } + + // Time not synced + enum time-not-synced { + value 2; + } + + // Infra domain down + enum infra-dom-down { + value 3; + } + + // Council pending + enum council-pending { + value 4; + } + + // Inconsistent configuration + enum inconsistent-config { + value 5; + } + + // Admin down + enum admin-down { + value 6; + } + + // Up + enum up { + value 7; + } + } + default "unspecified"; + } + + // Ep controls + // Default Value computed from notify-citizen + typedef coop_EpControl { + + // bits- Using string + type string; + default "notify-citizen"; + } + + // Ep flags + typedef coop_EpFlags { + + // bits- Using string + type string; + } + + // Graceful restart time (in seconds) + typedef coop_GRTime { + + // MAX Converted to int from 0xffff + type uint32 { + range "1..65535"; + } + default "600"; + } + + // Hello Interval (in seconds) + typedef coop_HelloIntvl { + + // MAX Converted to int from 0xffff + type uint16 { + range "1..65535"; + } + default "60"; + } + + // IGMP version + typedef coop_IGMPVersion { + type uint8 { + range "1..3"; + } + default "2"; + } + + // McastGrp flags + typedef coop_McGrpFlags { + + // bits- Using string + type string; + } + + // Mrtr flags + typedef coop_MrtrFlags { + + // bits- Using string + type string; + } + + // Peer controls + typedef coop_PeerControl { + + // bits- Using string + type string; + } + + // Port id + typedef coop_PortId { + + // MAX Converted to int from 0xffffffff + type uint32 { + range "0..4294967295"; + } + default "0"; + } + + // Publisher id + typedef coop_PubId { + type address_Ipv4; + } + + // Refresh interval (in seconds) + typedef coop_RefreshIntvl { + + // MAX Converted to int from 0x2aaaaaaa + type uint32 { + range "1..715827882"; + } + default "3600"; + } + + // Repository size + typedef coop_RepSz { + + // MAX Converted to int from 0xffffffff + type uint32 { + range "1..4294967295"; + } + default "1000000"; + } + + // Repository type + typedef coop_RepT { + type enumeration { + + // Endpoint reachability repository + enum ep { + value 1; + } + + // Oracle repository + enum oracle { + value 2; + } + + // Leaf repository + enum leaf { + value 3; + } + + // Multicast group membership repository + enum mgrpmbr { + value 4; + } + + // Multicast router repository + enum mrouter { + value 5; + } + + // Service node repository + enum svcnode { + value 6; + } + + // Anycast repository + enum anycast { + value 7; + } + + // External router repository + enum extrtr { + value 8; + } + + // VPC repository + enum vpc { + value 9; + } + + // VTEP repository + enum vtep { + value 10; + } + + // Context repository + enum ctx { + value 11; + } + } + default "ep"; + } + + // Role + typedef coop_Role { + type enumeration { + + // Citizen + enum citizen { + value 1; + } + + // Oracle + enum oracle { + value 2; + } + } + default "citizen"; + } + + // Shard Interval + typedef coop_ShardIntvl { + + // MAX Converted to int from 0xffffffff + type uint32 { + range "1..4294967295"; + } + } + + // Switch id + typedef coop_SwId { + type address_Ipv4; + } + + // Synthetic flags + typedef coop_SynthFlags { + + // bits- Using string + type string; + } + + // Synthetic Generator algorithm + typedef coop_SynthGen { + type enumeration { + enum xxx { + value 1; + } + } + default "xxx"; + } + + // Synthetic ip + typedef coop_SynthIp { + type address_Ipv4; + } + + // Synthetic vrf + typedef coop_SynthVrf { + type uint32; + } + + // Timestamp (NTP raw format) + typedef coop_Timestamp { + type string; + } + + // VNID + typedef coop_Vnid { + + // MAX Converted to int from 0xffffff + type uint32 { + range "1..16777215"; + } + default "1"; + } + + // Specifies the HA mode in which this system is configured + typedef top_Mode { + type enumeration { + enum unspecified { + value 0; + } + enum stand-alone { + value 1; + } + enum cluster { + value 2; + } + } + default "unspecified"; + } + + grouping System-group { + leaf id { + type uint32; + } + + // Specifies if this system is configured in standalone mode or HA pair + // Type is an MO-Defined-Type + leaf mode { + description "System mode"; + + // Type is an MO-Defined-Type + type top_Mode; + } + } + + container System { + description "System"; + + uses System-group; + } +} diff --git a/sdk/cpp/tests/test_sanity_codec.cpp b/sdk/cpp/tests/test_sanity_codec.cpp index 2cc078505..2325a7ec2 100644 --- a/sdk/cpp/tests/test_sanity_codec.cpp +++ b/sdk/cpp/tests/test_sanity_codec.cpp @@ -22,6 +22,7 @@ #include #include #include +#include #include #include @@ -263,6 +264,23 @@ config_runner_1(ydktest_sanity::Runner *runner) runner->two_list->ldata.push_back(std::move(l_2)); } +TEST_CASE("typedef_encode") +{ + CodecServiceProvider codec_provider{EncodingFormat::XML}; + CodecService codec_service{}; + + // Create class System and set values for its members + auto system = std::make_unique(); + system->id = 22; + system->mode = ydktest_sanity_typedefs::TopMode::stand_alone; + + std::string xml = codec_service.encode(codec_provider, *system, true); + + auto system_decoded = codec_service.decode(codec_provider, xml, std::make_unique()); + + CHECK(*system_decoded == *system); +} + TEST_CASE("single_encode") { CodecServiceProvider codec_provider{EncodingFormat::XML}; @@ -458,4 +476,4 @@ TEST_CASE("embedded_quote_codec") auto rp_decode = codec_service.decode(codec_provider, xml, make_unique()); CHECK(*rp == *rp_decode); -} \ No newline at end of file +} diff --git a/sdk/go/core/tests/service_codec_test.go b/sdk/go/core/tests/service_codec_test.go index 538c716fe..19ebdf12c 100644 --- a/sdk/go/core/tests/service_codec_test.go +++ b/sdk/go/core/tests/service_codec_test.go @@ -9,6 +9,7 @@ import ( ysanity_bgp "github.com/CiscoDevNet/ydk-go/ydk/models/ydktest/openconfig_bgp" ysanity_bgp_types "github.com/CiscoDevNet/ydk-go/ydk/models/ydktest/openconfig_bgp_types" ysanity "github.com/CiscoDevNet/ydk-go/ydk/models/ydktest/sanity" + ysanity_typedefs "github.com/CiscoDevNet/ydk-go/ydk/models/ydktest/sanity_typedefs" "github.com/CiscoDevNet/ydk-go/ydk/providers" "github.com/CiscoDevNet/ydk-go/ydk/services" "github.com/CiscoDevNet/ydk-go/ydk/types" @@ -415,6 +416,21 @@ func (suite *CodecTestSuite) TestXMLDecodeOCPattern() { suite.Equal(types.EntityEqual(entity, ocA), true) } +func (suite *CodecTestSuite) TestTypedefsXMLEncodeDecode() { + systemEncode := ysanity_typedefs.System{} + systemEncode.Id = 22 + systemEncode.Mode = ysanity_typedefs.TopMode_stand_alone + + suite.Provider.Encoding = encoding.XML + + payload := suite.Codec.Encode(&suite.Provider, &systemEncode) + + entity := suite.Codec.Decode(&suite.Provider, payload) + systemDecode := entity.(*ysanity_typedefs.System) + + suite.Equal(types.EntityEqual(&systemEncode, systemDecode), true) +} + func TestCodecTestSuite(t *testing.T) { if testing.Verbose() { ydk.EnableLogging(ydk.Debug) diff --git a/sdk/python/core/tests/test_sanity_codec.py b/sdk/python/core/tests/test_sanity_codec.py index 4efcf7463..ca4afc996 100644 --- a/sdk/python/core/tests/test_sanity_codec.py +++ b/sdk/python/core/tests/test_sanity_codec.py @@ -357,6 +357,18 @@ def test_decode_invalid_subtree_2(self): self.provider.encoding = EncodingFormat.JSON self.codec.encode(self.provider, ysanity.Runner(), subtree=True) + def test_encode_decode_typedefs(self): + from ydk.models.ydktest import ydktest_sanity_typedefs as ysanity_typedefs + system_encode = ysanity_typedefs.System() + system_encode.mode = ysanity_typedefs.TopMode.stand_alone + system_encode.id = 22; + + self.provider.encoding = EncodingFormat.XML + payload = self.codec.encode(self.provider, system_encode) + + system_decode = self.codec.decode(self.provider, payload) + self.assertEqual(system_encode, system_decode) + if __name__ == '__main__': import sys suite = unittest.TestLoader().loadTestsFromTestCase(SanityYang) diff --git a/yang/ydktest/ydktest-sanity-typedefs@2018-01-30.yang b/yang/ydktest/ydktest-sanity-typedefs@2018-01-30.yang new file mode 100644 index 000000000..f3de84b44 --- /dev/null +++ b/yang/ydktest/ydktest-sanity-typedefs@2018-01-30.yang @@ -0,0 +1,6233 @@ +module ydktest-sanity-typedefs { + + yang-version 1; + + namespace "http://cisco.com/ns/yang/ydktest-sanity-typedefs"; + + prefix top; + + organization + "Cisco Systems, Inc."; + + contact + "Cisco Systems, Inc. + Customer Service + + Postal: 170 West Tasman Drive + San Jose, CA 95134 + + Tel: +1 800 553-NETS + + E-mail: ydk-admin@cisco.com"; + + description + "This module contains 461 typedef statements copied from NXOS Device YANG Model + The module created to test YDK with newer version of libyang library, + which supports more than 255 typedef statements"; + + revision 2018-01-30 { + description + "Initial Revision. + Generated by ygorelik"; + } + + typedef address_Ipv4 { + type string { + } + } + + typedef address_Ipv6 { + type string { + } + } + + typedef address_Ip { + type union { + type address_Ipv4; + type address_Ipv6; + } + } + + typedef address_Mac { + type string { + } + } + + typedef mtx_array_ifindex { + type string { + } + } + + typedef mtx_array_uint8 { + type string { + } + } + + typedef mtx_array_uint16 { + type string { + } + } + + typedef mtx_array_uint32 { + type string { + } + } + + typedef mtx_array_uint64 { + type string { + } + } + + typedef mtx_array_bit { + type string { + } + } + + typedef mtx_array_community { + type string { + } + } + + typedef aaa_AccountStatus { + type enumeration { + + // Active + enum active { + value 0; + } + + // Inactive + enum inactive { + value 1; + } + } + default "active"; + } + + typedef aaa_BannerMsg { + type string; + } + + typedef aaa_Boolean { + type enumeration { + + // No + enum no { + value 0; + } + + // Yes + enum yes { + value 1; + } + } + default "yes"; + } + + typedef aaa_Clear { + type enumeration { + + // No + enum no { + value 0; + } + + // Yes + enum yes { + value 1; + } + } + default "no"; + } + + typedef aaa_CmdType { + type enumeration { + + // Config + enum config { + value 0; + } + + // Exec + enum exec { + value 1; + } + } + default "config"; + } + + typedef aaa_Date { + type string; + } + + typedef aaa_Delimiter { + type string; + } + + typedef aaa_Email { + type address_Email { + } + } + + typedef aaa_EncKey { + type string { + length "0..240"; + } + } + + typedef aaa_EncryptedArray { + type mtx_array_uint8; + } + + typedef aaa_ExternalUnixUID { + type uint16 { + range "16000..23999"; + } + } + + typedef aaa_HistoryDepth { + type uint8 { + range "0..15"; + } + default "5"; + } + + typedef aaa_IdleTimer { + type uint16 { + range "0..1440"; + } + } + + typedef aaa_KeyEnc { + type enumeration { + + // Clear Text + enum 0 { + value 0; + } + + // Type-6 Encrypted + enum 6 { + value 6; + } + + // Encrypted + enum 7 { + value 7; + } + } + default "0"; + } + + typedef aaa_KeyEncUserPass { + type enumeration { + + // Unspecified + enum unspecified { + value 255; + } + + // Clear Text + enum clear { + value 0; + } + + // Encrypted + enum Encrypt { + value 5; + } + } + } + + typedef aaa_LdapAttribute { + type string { + length "0..63"; + } + } + + // NXOS supports maximum limits in the type definitions + typedef aaa_LdapDn { + type string { + length "0..127"; + } + } + + typedef aaa_LdapFilter { + type string { + length "0..63"; + } + } + + typedef aaa_LdapSSLStrictnessLevel { + type enumeration { + + // Strict + enum strict { + value 0; + } + + // Permissive + enum permissive { + value 1; + } + } + default "strict"; + } + + typedef aaa_LoggingLevel { + type enumeration { + + // Emergency + enum Emergency { + value 0; + } + + // Alert + enum Alert { + value 1; + } + + // Critical + enum Critical { + value 2; + } + + // Error + enum Error { + value 3; + } + + // Warning + enum Warning { + value 4; + } + + // Notifications + enum Notif { + value 5; + } + + // Informational + enum Inform { + value 6; + } + + // Debug + enum Debug { + value 7; + } + } + default "Error"; + } + + typedef aaa_MonitorServerType { + type enumeration { + + // Disabled + enum disabled { + value 0; + } + + // Enabled + enum enabled { + value 1; + } + } + default "disabled"; + } + + typedef aaa_MonitoringPasswordType { + type string; + } + + typedef aaa_MonitoringUserType { + type string { + } + default "test"; + } + + typedef aaa_NoRolePolicy { + type enumeration { + + // No Login + enum no-login { + value 0; + } + + // Assign Default Role + enum assign-default-role { + value 1; + } + } + } + + typedef aaa_Order { + type uint16 { + range "0..16"; + } + } + + typedef aaa_Passwd { + type string { + length "1..127"; + } + } + + typedef aaa_Phone { + type address_Phone; + } + + typedef aaa_Port { + type uint32 { + range "1..65535"; + } + } + + typedef aaa_ProviderGroupDeadtime { + type uint32 { + range "0..1440"; + } + default "0"; + } + + // Limited by NXOS maximum size for server group + typedef aaa_ProviderGroupName { + type string { + length "0..127"; + } + } + + typedef aaa_ProviderGroupProtocol { + type enumeration { + + // TACACS + enum tacacs { + value 0; + } + + // RADIUS + enum radius { + value 1; + } + + // LDAP + enum ldap { + value 2; + } + } + } + + typedef aaa_ProviderGroupSnmpIndex { + type uint32; + } + + typedef aaa_ProviderSnmpIndex { + type uint32; + } + + typedef aaa_ProviderState { + type enumeration { + + // Unknown + enum unknown { + value 0; + } + + // Operable + enum operable { + value 1; + } + + // Inoperable + enum inoperable { + value 2; + } + } + default "unknown"; + } + + typedef aaa_PwdChangeCount { + type uint8 { + range "0..10"; + } + } + + typedef aaa_PwdChangeInterval { + type uint16 { + range "1..745"; + } + } + + typedef aaa_PwdExpWarnTime { + type uint8 { + range "0..30"; + } + } + + typedef aaa_PwdHistory { + type string; + } + + typedef aaa_PwdLen { + type uint32; + } + + typedef aaa_PwdLifeTime { + type uint16 { + range "0..3650"; + } + } + + typedef aaa_PwdPolicy { + type enumeration { + + // Enable + enum enable { + value 0; + } + + // Disable + enum disable { + value 1; + } + } + default "enable"; + } + + typedef aaa_RadPort { + type uint32 { + range "0..65535"; + } + } + + typedef aaa_RadSrvUseType { + type enumeration { + + // Authentication + enum Auth { + value 0; + } + + // Authorization + enum Author { + value 1; + } + + // Accounting + enum Acc { + value 2; + } + + // All + enum All { + value 3; + } + } + default "All"; + } + + typedef aaa_Realm { + type enumeration { + + // Local + enum local { + value 0; + } + + // RADIUS + enum radius { + value 1; + } + + // TACACS+ + enum tacacs { + value 2; + } + + // LDAP + enum ldap { + value 3; + } + } + default "local"; + } + + typedef aaa_Retries { + type uint32 { + range "0..5"; + } + default "1"; + } + + typedef aaa_RuleAccessType { + type enumeration { + + // none + enum none { + value 0; + } + + // Read + enum read { + value 1; + } + + // Read Write + enum read-write { + value 2; + } + + // Command + enum command { + value 3; + } + } + } + + typedef aaa_RuleCmdStrType { + type string { + length "0..128"; + } + } + + typedef aaa_RuleEntityType { + type string { + length "0..512"; + } + } + + typedef aaa_RuleNumberType { + type uint32 { + range "1..256"; + } + } + + typedef aaa_RulePermissionType { + type enumeration { + + // none + enum none { + value 0; + } + + // Permit + enum permit { + value 1; + } + + // Deny + enum deny { + value 2; + } + } + } + + typedef aaa_RuleScopeType { + type enumeration { + + // none + enum none { + value 0; + } + + // Feature + enum feature { + value 2; + } + + // Feature Group + enum feature-group { + value 3; + } + + // OID + enum oid { + value 21; + } + } + } + + typedef aaa_SshData { + type string { + length "0..16384"; + } + } + + typedef aaa_TimeMin { + type uint32 { + range "0..1440"; + } + default "0"; + } + + typedef aaa_TimeSec { + type uint32 { + range "1..60"; + } + default "5"; + } + + typedef aaa_UnixUID { + type uint16 { + range "99..15999"; + } + } + + typedef aaa_UserCertDataType { + type string; + } + + typedef aaa_UserRolePrivType { + type enumeration { + + // No Privilege + enum noDataPriv { + value 0; + } + + // Read Privilege + enum readPriv { + value 1; + } + + // Write Privilege + enum writePriv { + value 2; + } + } + default "noDataPriv"; + } + + typedef aaa_authenticationProtocol { + type enumeration { + + // PAP + enum pap { + value 0; + } + + // CHAP + enum chap { + value 1; + } + + // MS-CHAP + enum mschap { + value 2; + } + + // MS-CHAPv2 + enum mschapv2 { + value 3; + } + + // ASCII + enum ascii { + value 4; + } + } + } + + // Bank type + typedef ac_BankT { + type enumeration { + + // Even + enum even { + value 1; + } + + // Odd + enum Odd { + value 2; + } + } + default "even"; + } + + // Control + typedef ac_Control { + + // bits- Using string + type string; + } + + // ECN + typedef ac_Ecn { + type uint8 { + range "0..2"; + } + default "0"; + } + + // Ether type + typedef ac_EtherT { + type uint16; + } + + // Ip options + typedef ac_IpOpt { + + // bits- Using string + type string; + } + + // MAC + typedef ac_Mac { + type address_Mac; + } + + // Order + typedef ac_Order { + type uint16 { + range "1..1024"; + } + } + + // Payload size + typedef ac_PayloadSz { + type uint8; + } + + // Interface identifier + typedef nw_IfId { + type string; + } + + // Port id + typedef ac_PortId { + type nw_IfId; + } + + // Operational state of HW rules + typedef ac_RuleOperSt { + type enumeration { + + // Pending + enum pending { + value 1; + } + + // Installed + enum installed { + value 2; + } + + // Failed + enum failed { + value 3; + } + } + default "pending"; + } + + typedef acl_ACEStats { + type uint8; + default "0"; + } + + // ACE action type + typedef acl_ActionType { + type enumeration { + + // Invalid + enum invalid { + value 0; + } + + // Permit + enum permit { + value 1; + } + + // Deny + enum deny { + value 2; + } + + // Copy + enum copy { + value 3; + } + + // Divert + enum divert { + value 4; + } + + // Redirect + enum redirect { + value 5; + } + } + default "invalid"; + } + + // Capture Session + typedef acl_CaptureSes { + type uint16 { + range "0..48"; + } + } + + // config State + typedef acl_ConfigState { + type uint8; + default "0"; + } + + // http option (http-method) value enum + typedef acl_HttpOptionType { + type enumeration { + + // get + enum get { + value 1; + } + + // put + enum put { + value 2; + } + + // head + enum head { + value 3; + } + + // post + enum post { + value 4; + } + + // delete + enum delete { + value 5; + } + + // trace + enum trace { + value 6; + } + + // connect + enum connect { + value 7; + } + + // invalid + enum invalid { + value 0; + } + } + } + + // Name of interface, e.g. "Eth1/2" + typedef acl_IfName { + type nw_IfId; + } + + // MAC Protocol + typedef acl_MACProtocol { + + // MAX Converted to int from 0x10000 + type uint32 { + range "0..65536"; + } + default "65536"; + } + + // ACL name + typedef acl_Name { + type string { + length "1..64"; + } + } + + // L4 port relationship operator + typedef acl_Operator { + type uint8; + default "0"; + } + + // Packet Length + typedef acl_PktLen { + type uint16 { + range "19..9210"; + } + } + + // L4 port number + typedef acl_PortNumber { + type uint16; + default "0"; + } + + // ACL name + typedef acl_RemarkStr { + type string { + length "1..100"; + } + } + + // ACE sequence number + typedef acl_SequenceNumber { + type uint32 { + range "0..4294967295"; + } + } + + // TCP Flags Mask + typedef acl_TcpFlagsMask { + type uint8 { + range "0..64"; + } + } + + // TCP option length + typedef acl_TcpOptionLengthType { + type uint32 { + range "0..41"; + } + } + + // time-range name + typedef acl_TimeRangeName { + type string { + length "0..64"; + } + } + + // UDF mask + typedef acl_UdfMask { + type uint16 { + range "0..65535"; + } + } + + // UDF name + typedef acl_UdfName { + type string { + length "1..16"; + } + } + + // UDF value + typedef acl_UdfVal { + type uint16 { + range "0..65535"; + } + } + + // VLAN Acl action type + typedef acl_VAclActionType { + type enumeration { + + // invalid + enum invalid { + value 0; + } + + // forward + enum forward { + value 1; + } + + // drop + enum drop { + value 2; + } + + // redirect + enum redirect { + value 3; + } + } + default "invalid"; + } + + // VLAN Acl action log enable/disable + typedef acl_VAclLog { + type uint8; + default "0"; + } + + // VLAN Acl match acl type + // Refer to CLI_ACL_IP/CLI_ACL_IPV6/CLI_ACL_MAC for values + typedef acl_VAclMatchType { + type uint16; + default "0"; + } + + // Vlan List String for VLAN Acl Policy + typedef acl_VlanListStr { + type string { + length "0..512"; + } + } + + // VLAN + typedef acl_VlanType { + type uint32 { + range "0..4095"; + } + default "4095"; + } + + // nve vni ID + typedef acl_VniType { + type uint32 { + range "0..16777216"; + } + } + + // cos type + typedef acl_cosType { + type uint8 { + range "0..8"; + } + default "8"; + } + + // erspan DSCP + typedef acl_erspanDscpType { + type uint8 { + range "0..64"; + } + default "64"; + } + + // erspan gre protocol + typedef acl_erspanGreType { + type uint32 { + range "0..65536"; + } + default "65536"; + } + + // VLAN Acl policy operation apply/remove + typedef acl_operation { + type uint8; + default "1"; + } + + typedef action_AdminSt { + type enumeration { + + // Unknown + enum unknown { + value 0; + } + + // Start + enum start { + value 1; + } + + // Stop + enum stop { + value 2; + } + + // Suspend + enum suspend { + value 3; + } + } + default "unknown"; + } + + typedef action_Descr { + type string; + } + + // Frequency of the task + typedef action_Freq { + type string; + } + + typedef action_OperSt { + type enumeration { + + // Scheduled + enum scheduled { + value 0; + } + + // Processing + enum processing { + value 1; + } + + // Completed + enum completed { + value 2; + } + + // Cancelled + enum cancelled { + value 3; + } + + // Failed + enum failed { + value 4; + } + + // Indeterminate + enum indeterminate { + value 5; + } + + // Suspended + enum suspended { + value 6; + } + + // Crash-Suspect + enum crashsuspect { + value 7; + } + } + default "scheduled"; + } + + // Task status qualifier + typedef action_Qual { + type string; + } + + // Result history retention size: how many records + // to keep per rule + typedef action_RetentionSize { + type uint16 { + range "1..1024"; + } + default "100"; + } + + // Resuilt history retention time: how long records are + // to be kept per rule + typedef action_RetentionTime { + type string; + } + + // Type of the task + typedef action_Type { + type enumeration { + + // Clear + enum clear { + value 1; + } + + // Reset + enum reset { + value 2; + } + + // Reload + enum reload { + value 3; + } + + // Locate + enum locate { + value 4; + } + + // Install + enum install { + value 5; + } + + // Test + enum test { + value 6; + } + + // Collect + enum collect { + value 7; + } + + // Set Interface In-Service + enum interface-in-service { + value 8; + } + } + default "clear"; + } + + // Global access controls + typedef actrl_AccControl { + + // bits- Using string + type string; + } + + // Rule direction + typedef actrl_Direction { + type enumeration { + + // Uni-directional + enum uni-dir { + value 1; + } + + // Bi-directional + enum bi-dir { + value 2; + } + } + default "uni-dir"; + } + + // Entry priority, this is the priority for entry + typedef actrl_EntryPrio { + type uint8 { + range "1..7"; + } + default "7"; + } + + // Filter id + // @@@ Keep this in sync with vzFltId. + // @@@ Only way to moving FltId from 16 to 32 bits without dropping traffic + // @@@ during upgrade, was to introduce vzFiltId (16 bits) + typedef actrl_FltId { + + // MAX Converted to int from 0xffffffff + type uint32 { + range "1..4294967295"; + } + } + + // Log clear interval + typedef actrl_LogClrIntvl { + type uint16 { + range "1000..2800"; + } + default "2800"; + } + + // Operational state of Rule + typedef actrl_OperSt { + type enumeration { + + // enabled + enum enabled { + value 1; + } + + // disabled + enum disabled { + value 2; + } + } + default "disabled"; + } + + // Reasons for rule being disabled. + typedef actrl_OperStQual { + + // bits- Using string + type string; + } + + // PPF Node id + typedef actrl_PpfNodeId { + + // MAX Converted to int from 0xffffffff + type uint32 { + range "1..4294967295"; + } + } + + // Array PPF Node id + typedef actrl_PpfNodeIdArray { + type mtx_array_uint32; + } + + // Rule id + typedef actrl_RuleId { + + // MAX Converted to int from 0xffffffff + type uint32 { + range "1..4294967295"; + } + } + + // Filter to Rule ID mapping array + typedef actrl_RuleIdArray { + type mtx_array_uint32; + } + + // Rule ID array index + typedef actrl_RuleIndex { + type uint16 { + range "1..1024"; + } + } + + // Rule priority, this is the priority for a set of rules + typedef actrl_RulePrio { + type uint8 { + range "1..11"; + } + } + + // Rule type + typedef actrl_RuleT { + type enumeration { + + // Tenant + enum tenant { + value 1; + } + + // Management + enum mgmt { + value 2; + } + + // SNMP + enum snmp { + value 3; + } + + // Flood + enum bd_flood { + value 4; + } + + // Vrf + enum vrf_default { + value 5; + } + + // Infra + enum infra { + value 6; + } + } + default "tenant"; + } + + // Scope id (24-bit) + typedef actrl_ScopeId { + + // MAX Converted to int from 0xffffff + type uint32 { + range "1..16777215"; + } + default "1"; + } + + // Security Label (12-bit) + typedef actrl_SecLbl { + + // MAX Converted to int from 0xfff + type uint16 { + range "1..4095"; + } + } + + // Subject represents the entitiy to which the capability constraint gets applied + typedef actrlcap_Subj { + type enumeration { + + // Unknown + enum unknown { + value 0; + } + + // Actrl Rules + enum rule-namespace { + value 1; + } + + // Actrl Scopes + enum scope-namespace { + value 2; + } + } + default "unknown"; + } + + typedef address_Email { + type string; + } + + typedef address_HostNameOrDottedQuad { + type string { + length "1..256"; + } + } + + typedef address_Phone { + type string; + } + + // Adjacency Flags + typedef adjacency_AdjFlags { + + // bits- Using string + type string; + } + + // Adjacency operational state + typedef adjacency_AdjOperSt { + type enumeration { + + // Unknown + enum unspecified { + value 0; + } + + // Incomplete + enum incomplete { + value 1; + } + + // Resolved + enum normal { + value 2; + } + } + } + + // Database type + typedef adjacency_DbT { + type enumeration { + + // IP database + enum ip { + value 1; + } + + // IPv6 database + enum ipv6 { + value 2; + } + } + default "ip"; + } + + typedef aggregate_AdminState { + type enumeration { + + // Unknown + enum unknown { + value 0; + } + + // Up + enum up { + value 1; + } + + // Down + enum down { + value 2; + } + } + default "down"; + } + + // Address Family Type + typedef aggregate_AfT { + type enumeration { + + // Ipv4 unicast address family + enum ipv4-ucast { + value 0; + } + + // Vpnv4 unicast address family + enum vpnv4-ucast { + value 1; + } + + // Ipv6 unicast address family + enum ipv6-ucast { + value 2; + } + + // Vpnv6 unicast address family + enum vpnv6-ucast { + value 3; + } + + // L2-Evpn unicast address family + enum l2-evpn { + value 4; + } + } + default "l2-evpn"; + } + + typedef aggregate_BfdStatus { + type enumeration { + + // Unknown + enum unknown { + value 0; + } + + // Admin Down + enum admin_down { + value 1; + } + + // Oper Down + enum down { + value 2; + } + + // Intialization + enum init { + value 3; + } + + // Up + enum up { + value 4; + } + } + default "admin_down"; + } + + typedef aggregate_BooleanFlag { + type enumeration { + + // No + enum no { + value 0; + } + + // Yes + enum yes { + value 1; + } + } + default "no"; + } + + // + // + // + // + // + // + // + // + // + // + // + // + // Bandwidth metric of the SVI in kilobits per second. + typedef aggregate_Bw { + type uint32 { + range "1..400000000"; + } + default "10000000"; + } + + typedef aggregate_ConfTmplStatus { + type enumeration { + + // ConfigTmplInactive + enum inactive { + value 0; + } + + // ConfigTmplOperational + enum active { + value 1; + } + + // ConfigTmplFailed + enum failed { + value 2; + } + } + default "inactive"; + } + + typedef aggregate_ConfigMgmtStatus { + type enumeration { + + // Unknown + enum unknown { + value 0; + } + + // ConfigMgmtReady + enum configMgmtReady { + value 1; + } + + // ConfigMgmtNotReady + enum configMgmtNotReady { + value 2; + } + + // ConfigMgmtPurgeStart + enum configMgmtPurgeStart { + value 4; + } + } + default "configMgmtNotReady"; + } + + typedef aggregate_ConfigSourceType { + type enumeration { + + // Unknown + enum unknown { + value 0; + } + + // Cli + enum cli { + value 1; + } + + // Controller + enum controller { + value 2; + } + } + default "cli"; + } + + typedef aggregate_ConfigStatus { + type enumeration { + + // Unknown + enum unknown { + value 0; + } + + // ConfigReady + enum configReady { + value 1; + } + + // ConfigNotReady + enum configNotReady { + value 2; + } + + // ConfigPurgeInProgress + enum configPurgeInProgress { + value 4; + } + } + default "configNotReady"; + } + + typedef aggregate_ControllerID { + type uint32 { + range "0..16"; + } + default "0"; + } + + typedef aggregate_ControllerIdBitmap { + type mtx_array_bit; + } + + typedef aggregate_CpuType { + type string; + } + + typedef aggregate_CtrlrType { + type enumeration { + + // Unknown + enum unknown { + value 0; + } + + // L2Vxlan + enum l2-vxlan { + value 1; + } + + // Vxlan + enum vxlan { + value 2; + } + } + default "l2-vxlan"; + } + + // Default Value computed from unicast + typedef aggregate_EpType { + + // bits- Using string + type string; + default "unicast"; + } + + typedef aggregate_GroupAddr { + type string; + } + + typedef aggregate_HostReachabilityMode { + type enumeration { + + // Unknown + enum unknown { + value 0; + } + + // FloodAndLearn + enum floodAndLearn { + value 1; + } + + // Controller + enum controller { + value 2; + } + + // Bgp + enum bgp { + value 3; + } + } + default "floodAndLearn"; + } + + typedef aggregate_IngressRepProtocolType { + type enumeration { + + // Unknown + enum unknown { + value 0; + } + + // Static + enum static { + value 1; + } + + // Bgp + enum bgp { + value 2; + } + } + default "unknown"; + } + + typedef aggregate_IntfAssignMode { + type enumeration { + + // Dedicated + enum dedicated { + value 0; + } + + // Shared + enum shared { + value 1; + } + } + } + + typedef aggregate_IntfType { + type enumeration { + + // Unknown + enum unknown { + value 0; + } + + // Port + enum port { + value 1; + } + + // Port Channel + enum port-channel { + value 2; + } + + // Tunnel + enum tunnel { + value 3; + } + + // Loopback + enum loopback { + value 4; + } + + // SVI + enum svi { + value 5; + } + } + } + + typedef aggregate_MTU { + type uint32 { + range "1..9216"; + } + default "9216"; + } + + // Mac type + typedef aggregate_MacType { + type enumeration { + + // Unknown + enum unknown { + value 0; + } + + // Unicast + enum unicast { + value 1; + } + + // Multicast + enum multicast { + value 2; + } + } + default "unicast"; + } + + // Minimum rx interval (in ms) + typedef aggregate_MinRxIntvl { + type uint16 { + range "0..999"; + } + default "50"; + } + + // Minimum tx interval (in ms) + typedef aggregate_MinTxIntvl { + type uint16 { + range "0..999"; + } + default "50"; + } + + typedef aggregate_ModuleType { + type string; + } + + typedef aggregate_OperState { + type enumeration { + + // Unknown + enum unknown { + value 0; + } + + // Up + enum up { + value 1; + } + + // Down + enum down { + value 2; + } + } + default "down"; + } + + typedef aggregate_ReplicationModeType { + type enumeration { + + // Unknown + enum unknown { + value 0; + } + + // ReplicationServer + enum replicationServer { + value 1; + } + + // IngressReplication + enum ingressReplication { + value 2; + } + + // IpMulticast + enum ipMulticast { + value 3; + } + } + default "unknown"; + } + + typedef aggregate_ResourceStatus { + type enumeration { + + // Unknown + enum unknown { + value 0; + } + + // VlanCreated + enum vlanCreated { + value 1; + } + + // VlanFailed + enum vlanFailed { + value 2; + } + + // VnidCreated + enum vnidCreated { + value 3; + } + + // VnidFailed + enum vnidFailed { + value 4; + } + + // VlansCarved + enum vlansCarved { + value 5; + } + + // VlansNotCarved + enum vlansNotCarved { + value 6; + } + + // VnidCreationReceived + enum vnidCreationReceived { + value 7; + } + + // MyTEPIPPublished + enum myTEPIPPublished { + value 101; + } + + // ControllerIntfNotCarved + enum controllerIntfNotCarved { + value 201; + } + + // ControllerIntfCarved + enum controllerIntfCarved { + value 202; + } + } + default "unknown"; + } + + // Route target policy type + typedef aggregate_RttPType { + type enumeration { + + // Import + enum import { + value 1; + } + + // Export + enum export { + value 2; + } + } + default "import"; + } + + typedef aggregate_TunnelType { + type enumeration { + + // Unknown + enum unknown { + value 0; + } + + // VxLanOverIPV4 + enum vxlanipv4 { + value 1; + } + + // VxLanOverIPV6 + enum vxlanipv6 { + value 2; + } + + // NVGRE + enum nvgre { + value 3; + } + } + } + + typedef aggregate_VpcKeepaliveStatus { + type enumeration { + + // VpcOobUnknown + enum VpcOobUnknown { + value 0; + } + + // VpcOobDisabled + enum VpcOobDisabled { + value 1; + } + + // VpcOobPeerAlive + enum VpcOobPeerAlive { + value 2; + } + + // VpcOobPeerNotAlive + enum VpcOobPeerNotAlive { + value 3; + } + + // VpcOobPeerAliveDomainMismatch + enum VpcOobPeerAliveDomainMismatch { + value 4; + } + + // VpcOobSuspended + enum VpcOobSuspended { + value 5; + } + + // VpcOobNotOperational + enum VpcOobNotOperational { + value 6; + } + + // VpcOobSuspendedVrf + enum VpcOobSuspendedVrf { + value 7; + } + + // VpcOobMisconfig + enum VpcOobMisconfig { + value 8; + } + } + default "VpcOobUnknown"; + } + + typedef aggregate_VpcOperStatus { + type enumeration { + + // down + enum down { + value 0; + } + + // up + enum up { + value 1; + } + } + default "down"; + } + + typedef aggregate_VpcPeerLinkStatus { + type enumeration { + + // VpcPeerNolink + enum VpcPeerNolink { + value 0; + } + + // VpcPeerLinkDown + enum VpcPeerLinkDown { + value 1; + } + + // VpcPeerOk + enum VpcPeerOk { + value 2; + } + + // VpcPeerNotfound + enum VpcPeerNotfound { + value 3; + } + } + default "VpcPeerNolink"; + } + + // Fabric Forwarding Mode + typedef aggregate_fabFwdMode { + type enumeration { + + // Standard + enum standard { + value 0; + } + + // Anycast Gateway + enum anycastgw { + value 1; + } + + // ProxyGw + enum proxygw { + value 2; + } + } + default "standard"; + } + + // Database type + typedef aib_DbT { + type enumeration { + + // Adjacency Database + enum adj { + value 1; + } + } + default "adj"; + } + + // Owner type + typedef aib_Owner { + type string; + } + + // Preference type + typedef aib_Pref { + + // MAX Converted to int from 0xffff + type uint16 { + range "1..65535"; + } + default "1"; + } + + // Update time stamp type + typedef aib_UpdateTs { + type string; + } + + // Burst interval shift + typedef analytics_BurstIntvlShift { + type uint8 { + range "0..255"; + } + default "0"; + } + + // Mode + typedef analytics_CModeT { + type enumeration { + + // ACI mode + enum aci { + value 0; + } + + // Standalone mode + enum standalone { + value 1; + } + } + default "aci"; + } + + // Collector buket identifier + typedef analytics_CollBucketId { + type uint8 { + range "1..255"; + } + } + + // Collect Interval + typedef analytics_CollIntvl { + type uint32 { + range "100..64000"; + } + default "100"; + } + + // Collector version + typedef analytics_CollVersion { + type enumeration { + + // Version 5 + enum v5 { + value 1; + } + + // Version 9 + enum v9 { + value 2; + } + + // Cisco proprietary version 1 + enum cisco-v1 { + value 3; + } + } + default "cisco-v1"; + } + + // Collect params + // Default Value computed from src-intf + typedef analytics_CollectParams { + + // bits- Using string + type string; + default "src-intf"; + } + + // Collector identifier + typedef analytics_CollectorId { + type uint32 { + range "0..65535"; + } + } + + // Default filtering policy type + typedef analytics_DefPolicyT { + type enumeration { + + // Permit + enum permit { + value 0; + } + + // Deny + enum deny { + value 1; + } + } + default "permit"; + } + + // Direction type + typedef analytics_DirectionT { + type enumeration { + + // Ingress + enum in { + value 1; + } + + // Egress + enum out { + value 2; + } + + // Both + enum both { + value 3; + } + } + default "in"; + } + + // IP filter type + typedef analytics_FltType { + type enumeration { + + // Ipv4 type + enum ipv4 { + value 1; + } + + // Ipv6 type + enum ipv6 { + value 2; + } + + // CE type + enum ce { + value 3; + } + } + default "ipv4"; + } + + // Forwarding instance target identifier + typedef analytics_FwdInstTargetId { + type uint32 { + range "0..16777215"; + } + } + + // Hash value + typedef analytics_HashT { + type uint32 { + range "0..4294967295"; + } + default "0"; + } + + // Hash width type + typedef analytics_HashWidthT { + type uint16 { + range "1..255"; + } + default "12"; + } + + // IP packet identifier shift + typedef analytics_IpPktIdShift { + type uint8 { + range "0..255"; + } + default "0"; + } + + // Layer4 port + typedef analytics_L4Port { + type uint32 { + range "1..65535"; + } + } + + // Match params + // Default Value computed from src-ipv4 + typedef analytics_MatchParams { + + // bits- Using string + type string; + default "src-ipv4"; + } + + // Mode + typedef analytics_ModeT { + type enumeration { + + // Analytics mode + enum analytics { + value 0; + } + + // Netflow mode + enum netflow { + value 1; + } + } + default "netflow"; + } + + // MTU + typedef analytics_Mtu { + type uint16 { + range "576..9216"; + } + default "1500"; + } + + // Operational state of Rule + typedef analytics_OperSt { + type enumeration { + + // enabled + enum enabled { + value 1; + } + + // disabled + enum disabled { + value 2; + } + } + default "disabled"; + } + + // Reasons for rule being disabled. + typedef analytics_OperStQual { + + // bits- Using string + type string; + } + + // Payload length identifier + typedef analytics_PayloadLenIdT { + type uint8 { + range "0..10"; + } + } + + // Payload length + typedef analytics_PayloadLenT { + + // MAX Converted to int from 0x3fff + type uint32 { + range "0..16383"; + } + default "0"; + } + + // Receive window size identifier + typedef analytics_RcvWindowSzIdT { + type uint8 { + range "0..4"; + } + } + + // Receive window size + typedef analytics_RcvWindowSzT { + type uint32 { + range "0..65535"; + } + default "0"; + } + + // Sample size + typedef analytics_SampleSzT { + type uint32 { + range "1..65535"; + } + default "1"; + } + + // Sampler mode + typedef analytics_SamplerMode { + type enumeration { + + // M out of N flows + enum flow { + value 1; + } + + // M out of N pkts + enum pkts { + value 2; + } + } + default "flow"; + } + + // TCP options header length identifier + typedef analytics_TCPOptHdrLenIdT { + type uint8 { + range "0..6"; + } + } + + // TCP options header length + typedef analytics_TCPOptHdrLenT { + type uint32 { + range "0..15"; + } + default "0"; + } + + // Sequence number guess threshold + typedef analytics_ThresholdT { + type uint32 { + range "0..4294967295"; + } + default "0"; + } + + // Create Count + typedef analytics_createCount { + type uint32 { + range "0..16777215"; + } + default "0"; + } + + // Hit Count + typedef analytics_hitCount { + type uint32 { + range "0..16777215"; + } + default "0"; + } + + // Num tcam entries type + typedef analytics_numTcamEntT { + type uint32 { + range "1..65535"; + } + default "1024"; + } + + // Num tcam entries per V4 type + typedef analytics_numTcamEntV4T { + type uint16 { + range "1..256"; + } + default "1"; + } + + // Num tcam entries per V6 type + typedef analytics_numTcamEntV6T { + type uint16 { + range "1..256"; + } + default "4"; + } + + // Adjacency Flags + typedef arp_AdjFlags { + + // bits- Using string + type string; + } + + // Adjacency operational state + typedef arp_AdjOperSt { + type enumeration { + + // Unknown + enum unspecified { + value 0; + } + + // Incomplete + enum incomplete { + value 1; + } + + // Resolved + enum normal { + value 2; + } + } + } + + typedef arp_AdjRouteDist { + type uint32 { + range "2..250"; + } + default "250"; + } + + // ARP Cache Limit + typedef arp_ArpCacheLimit { + type uint32 { + range "1..614400"; + } + default "174080"; + } + + // ARP Cache Syslog Rate + typedef arp_ArpCacheSyslogRate { + type uint32 { + range "1..1000"; + } + default "1"; + } + + // Config Error + typedef arp_ConfigErr { + + // bits- Using string + type string; + } + + // Config Error Inst MO + typedef arp_ConfigErrInst { + + // bits- Using string + type string; + } + + // Database type + typedef arp_DbT { + type enumeration { + + // IP database + enum ip { + value 1; + } + + // SupCache database + enum supcache { + value 2; + } + } + default "ip"; + } + + // Event History Size + typedef arp_EventLogSize { + type enumeration { + + // Disable + enum disabled { + value 0; + } + + // Small + enum small { + value 1; + } + + // Medium + enum medium { + value 2; + } + + // Large + enum large { + value 3; + } + } + default "small"; + } + + // Event Log Type + typedef arp_EventType { + type enumeration { + + // CLI Events + enum cli { + value 0; + } + + // Client Events + enum client-events { + value 1; + } + + // Client Errors + enum client-errors { + value 2; + } + + // Control Events + enum control-events { + value 3; + } + + // Internal Events + enum internal-events { + value 4; + } + + // Internal Errors + enum internal-errors { + value 5; + } + + // High Availability Events + enum high-availability { + value 6; + } + + // IP Sync Events + enum ip-sync { + value 7; + } + + // ARP Local Cache Events + enum local-cache-events { + value 8; + } + + // ARP Local Cache Errors + enum local-cache-errors { + value 9; + } + + // Packet Messages Logs + enum pkt-messages { + value 10; + } + + // SNMP Events + enum snmp { + value 11; + } + + // ARP Suppression Events + enum suppress-events { + value 12; + } + + // ARP Suppression Errors + enum suppress-errors { + value 13; + } + + // Sync Event Logs + enum sync { + value 14; + } + + // Controller MAC-IP route error logs + enum arp-controller-errors { + value 15; + } + + // DME debug event + enum arp-dme-event { + value 16; + } + + // Adjacency Control Logs + enum adjacency-control { + value 101; + } + + // Adjacency Error Logs + enum adjacency-errors { + value 102; + } + + // Adjacency IPC Logs + enum adjacency-ipc-events { + value 103; + } + + // Adjacency Stats Logs + enum adjacency-stats { + value 104; + } + + // Adjacency High Availability Logs + enum adjacency-high-availability { + value 105; + } + + // Adjacency CLI Logs + enum adjacency-cli { + value 106; + } + + // Adjacency SDB Logs + enum adjacency-sdb { + value 107; + } + + // Adjacency SNMP Logs + enum adjacency-snmp { + value 108; + } + + // Adjacency Net Broker Logs + enum adjacency-netbroker { + value 109; + } + + // Adjacency DME event debugs + enum am-dme-event { + value 110; + } + + // Adjacency event debugs + enum am-event { + value 111; + } + } + } + + // Logging Level + typedef arp_LoggingLevel { + type enumeration { + + // Emergency + enum emergency { + value 0; + } + + // Alert + enum alert { + value 1; + } + + // Critical + enum critical { + value 2; + } + + // Error + enum error { + value 3; + } + + // Warning + enum warning { + value 4; + } + + // Notification + enum notification { + value 5; + } + + // Informational + enum informational { + value 6; + } + + // Debug + enum debug { + value 7; + } + } + default "error"; + } + + // MAC Delete adjaceny refresh timeout + typedef arp_MacDelTimeout { + type uint16; + } + + // Max packet count + typedef arp_MaxPacket { + type uint32 { + range "0..32767"; + } + default "1000"; + } + + // ARP off list timeout + typedef arp_OffListTimeout { + type uint16 { + range "180..1800"; + } + default "180"; + } + + // Opcode + typedef arp_Opcode { + type enumeration { + + // Unspecified + enum unspecified { + value 0; + } + + // ARP request + enum req { + value 1; + } + + // ARP reply + enum reply { + value 2; + } + } + default "unspecified"; + } + + // RARP Fabric Forwarding Rate Limit + typedef arp_RarpForwadingRate { + type uint16 { + range "200..400"; + } + default "200"; + } + + // Static Adjacency operational state + typedef arp_StAdjOperSt { + type enumeration { + + // Down + enum down { + value 0; + } + + // Incomplete + enum up { + value 1; + } + + // Unspecified + enum unspecified { + value 10; + } + } + default "unspecified"; + } + + // Static Adjacency operational state qualifier + typedef arp_StAdjOperStQual { + type enumeration { + + // Unspecified + enum unspecified { + value 0; + } + + // Subnet mismatch + enum subnet-mismatch { + value 1; + } + + // Invalid MAC + enum invalid-mac { + value 2; + } + + // Invalid IP + enum invalid-ip { + value 3; + } + + // Invalid VRF + enum invalid-vrf { + value 4; + } + + // Own MAC + enum own-mac { + value 5; + } + + // Interface down + enum if-down { + value 6; + } + + // Up + enum up { + value 7; + } + + // Invalid Interface + enum invalid-if { + value 8; + } + + // Invalid CLI Data + enum invalid-clidata { + value 9; + } + + // No Memory + enum no-memory { + value 10; + } + } + default "unspecified"; + } + + // Suppression Cache flag + typedef arp_SupCacheFlag { + + // bits- Using string + type string; + } + + // Suppression ARP Mode + typedef arp_SuppressArpMode { + type enumeration { + + // Disabled + enum disabled { + value 0; + } + + // L2SuppressARP + enum l2suppressarp { + value 1; + } + + // L2L3SuppressARP + enum l2l3suppressarp { + value 2; + } + + // Invalid + enum invalid { + value 3; + } + } + } + + // ARP suppress timeout + typedef arp_SuppressionTimeout { + type uint16 { + range "0..28800"; + } + default "0"; + } + + // Syslog threshold + typedef arp_SyslogCnt { + type uint32 { + range "0..65535"; + } + default "10000"; + } + + // throttle timeout + typedef arp_ThrottleTimeout { + type uint16 { + range "300..1800"; + } + default "300"; + } + + // ARP timeout + typedef arp_Timeout { + type uint16 { + range "60..28800"; + } + default "1500"; + } + + // Default SVI autoState + typedef bd_DefaultSVIAutoState { + type enumeration { + enum disable { + value 0; + } + enum enable { + value 1; + } + } + default "enable"; + } + + // Address family type + typedef bfd_AfT { + type enumeration { + + // IPv4 address family + enum ipv4 { + value 1; + } + + // IPv6 address family + enum ipv6 { + value 2; + } + } + default "ipv4"; + } + + // Application private data + typedef bfd_AppData { + type mtx_array_uint8; + } + + // Application session flags + typedef bfd_AppFlags { + + // bits- Using string + type string; + } + + // Application ID + typedef bfd_AppId { + type uint32; + } + + // Authentication hex key + typedef bfd_AuthHexKey { + type mtx_array_uint8; + } + + // Authentication hex key size + typedef bfd_AuthHexKeySize { + type uint8 { + range "0..40"; + } + } + + // Authentication key + typedef bfd_AuthKey { + type string { + length "min..20"; + } + } + + // Authentication key id + typedef bfd_AuthKeyId { + type uint8 { + range "1..255"; + } + } + + // Authentication Sequence Number + typedef bfd_AuthSeqno { + type uint32; + } + + // Authentication type + typedef bfd_AuthT { + type enumeration { + + // No authentication + enum none { + value 0; + } + + // Keyed SHA1 + enum sha1 { + value 4; + } + + // Met Keyed SHA1 + enum met-sha1 { + value 5; + } + } + default "none"; + } + + // Current session index + typedef bfd_CurSessIndex { + type uint32; + } + + // Detection multiplier + typedef bfd_DetectMult { + type uint8 { + range "1..50"; + } + default "3"; + } + + // Diag Code + typedef bfd_DiagCode { + type enumeration { + + // No Diagnostic + enum none { + value 0; + } + + // Control Detection Time Expired + enum detect-timeout { + value 1; + } + + // Echo Function Failed + enum echo-fail { + value 2; + } + + // Neighbor Signaled Session Down + enum nbr-signal-down { + value 3; + } + + // Forwarding Plane Reset + enum fwd-plane-reset { + value 4; + } + + // Path Down + enum path-down { + value 5; + } + + // Concatenated Path Down + enum concat-path-down { + value 6; + } + + // Administratively Down + enum admin-down { + value 7; + } + + // Reverse Concatenated Path Down + enum rev-concat-path-down { + value 8; + } + } + } + + // Session discriminator + typedef bfd_Discr { + type uint32; + } + + // echo rx interval (in ms) + typedef bfd_EchoRxIntvl { + type uint16 { + range "0..999"; + } + default "0"; + } + + typedef bfd_IfControl { + + // bits- Using string + type string; + } + + // Interface Detection multiplier + typedef bfd_IfDetectMult { + type uint8 { + range "0..50"; + } + default "0"; + } + + // Interface Minimum rx interval (in ms) + typedef bfd_IfMinRxIntvl { + type uint16 { + range "0..999"; + } + default "0"; + } + + // Interface Minimum tx interval (in ms) + typedef bfd_IfMinTxIntvl { + type uint16 { + range "0..999"; + } + default "0"; + } + + // Global flags + typedef bfd_InstFlags { + + // bits- Using string + type string; + } + + // Minimum rx interval (in ms) + typedef bfd_MinRxIntvl { + type uint16 { + range "50..999"; + } + default "50"; + } + + // Minimum tx interval (in ms) + typedef bfd_MinTxIntvl { + type uint16 { + range "50..999"; + } + default "50"; + } + + // Oper State + typedef bfd_OperSt { + type enumeration { + + // AdminDown + enum admin-down { + value 0; + } + + // Down + enum down { + value 1; + } + + // Init + enum init { + value 2; + } + + // Up + enum up { + value 3; + } + } + } + + // Packet flags + typedef bfd_PktFlags { + + // bits- Using string + type string; + } + + // Packet Interval (in ms) + typedef bfd_PktInterval { + type uint32; + } + + // Application sap ID + typedef bfd_SapId { + type uint32; + } + + // Slow interval (in ms) + typedef bfd_SlowIntvl { + type uint16 { + range "1000..30000"; + } + default "2000"; + } + + // BFD Start timeout + // Default Value "0" Removed - out of range 60..3600 + typedef bfd_StTm { + type uint32 { + range "60..3600"; + } + } + + // Startup interval (in second) + typedef bfd_StartupIntvl { + type uint16 { + range "0..30"; + } + default "5"; + } + + // BFD Cfg State + typedef bfd_TrkMbrLnk { + type enumeration { + + // Enabled + enum enable { + value 1; + } + + // Disabled + enum disable { + value 0; + } + } + default "disable"; + } + + // Additional Paths capability in DomAf + typedef bgp_AddlPathCapT { + + // bits- Using string + type string; + } + + // Administrative state + typedef bgp_AdminSt { + type enumeration { + + // Enabled + enum enabled { + value 1; + } + + // Disabled + enum disabled { + value 2; + } + } + default "disabled"; + } + + // Advertisement Interval + typedef bgp_AdvInterval { + type uint16 { + range "0..600"; + } + } + + // Advertise l2vpn evpn + typedef bgp_AdvertL2vpnEvpn { + type enumeration { + + // Enabled + enum enabled { + value 1; + } + + // Disabled + enum disabled { + value 0; + } + } + default "disabled"; + } + + typedef bgp_AdvtMapCondition { + type enumeration { + + // no options + enum none { + value 0; + } + + // Exist Route Map + enum exist { + value 1; + } + + // Non-Exist Route Map + enum non-exist { + value 2; + } + } + default "none"; + } + + // Address family type + typedef bgp_AfT { + type enumeration { + + // IPv4 unicast address family + enum ipv4-ucast { + value 1; + } + + // IPv4 multicast address family + enum ipv4-mcast { + value 2; + } + + // Vpnv4 unicast address family + enum vpnv4-ucast { + value 3; + } + + // IPv6 unicast address family + enum ipv6-ucast { + value 5; + } + + // IPv6 multicast address family + enum ipv6-mcast { + value 6; + } + + // Vpnv6 unicast address family + enum vpnv6-ucast { + value 7; + } + + // L2Vpn EVpn address family + enum l2vpn-evpn { + value 9; + } + + // IPv4 labeled unicast address family + enum ipv4-lucast { + value 10; + } + + // IPv6 labeled unicast address family + enum ipv6-lucast { + value 11; + } + + // Link state address family + enum lnkstate { + value 12; + } + + // IPv4 mvpn address family + enum ipv4-mvpn { + value 13; + } + + // IPv6 mvpn address family + enum ipv6-mvpn { + value 14; + } + + // L2Vpn vpls address family + enum l2vpn-vpls { + value 15; + } + + // IPv4 mdt address family + enum ipv4-mdt { + value 16; + } + } + default "ipv4-ucast"; + } + + // Activate the affinity group + typedef bgp_AffGrpActv { + type uint16 { + range "0..65535"; + } + } + + // AS path database size + typedef bgp_AsPathDbSz { + type uint32; + } + + // AS segment type + typedef bgp_AsSegT { + type enumeration { + + // Sequence + enum sequence { + value 1; + } + + // Set + enum set { + value 2; + } + } + default "set"; + } + + // AS Set + typedef bgp_AsSet { + type enumeration { + + // Enabled + enum enabled { + value 1; + } + + // Disabled + enum disabled { + value 0; + } + } + default "disabled"; + } + + // Asn number + typedef bgp_AsnNum { + type string; + } + + // Customizes AS_PATH attribute for routes received from eBGP neighbor + typedef bgp_AsnPropagation { + type enumeration { + + // no options + enum none { + value 0; + } + + // no-prepend + enum no-prepend { + value 1; + } + + // no-prepend+replace-as + enum replace-as { + value 2; + } + + // noPrepend+replace-as+dual-as + enum dual-as { + value 3; + } + } + default "none"; + } + + // Attribute database size + typedef bgp_AttribDbSz { + type uint32; + } + + // BestPath Timeout Limit + typedef bgp_BestPathIntvl { + type uint16 { + range "1..3600"; + } + default "300"; + } + + // BMP server state + typedef bgp_BmpSt { + type enumeration { + + // Enabled + enum enabled { + value 0; + } + + // Disabled + enum disabled { + value 1; + } + } + default "enabled"; + } + + // Additional Paths capability in Neighbor Af + typedef bgp_CapAddlPathCapT { + + // bits- Using string + type string; + } + + // Capability type + typedef bgp_CapT { + + // bits- Using string + type string; + } + + // Cluster ID + typedef bgp_ClusterId { + type string; + } + + // Connection Attempts + typedef bgp_ConnAttempts { + type uint32; + default "0"; + } + + // Connection info + typedef bgp_ConnMode { + + // bits- Using string + type string; + } + + // BGP Distance + typedef bgp_Distance { + type uint16 { + range "1..255"; + } + } + + // VRF Id + typedef bgp_DomId { + type uint32; + } + + // Domain operational state + typedef bgp_DomOperSt { + type enumeration { + + // Unknown + enum unknown { + value 0; + } + + // Up + enum up { + value 1; + } + + // Down + enum down { + value 2; + } + } + default "unknown"; + } + + // Egress Peer Engineering EPE for neighbor status + typedef bgp_EgressPeerEng { + type enumeration { + + // Disabled + enum none { + value 0; + } + + // Egress Peer Engineering Enabled + enum enabled { + value 1; + } + + // Advertise Adjacency-SIDs for multi-hop neighbor paths + enum enabled-adj-sid { + value 2; + } + } + default "none"; + } + + // Event History Buffer Type + typedef bgp_EhType { + type enumeration { + enum none { + value 0; + } + + // Cli buffer + enum cli { + value 1; + } + + // Events buffer + enum events { + value 2; + } + + // Periodic buffer + enum periodic { + value 3; + } + + // Detailed buffer + enum detail { + value 4; + } + + // Errors buffer + enum errors { + value 5; + } + + // Objstore buffer + enum objstore { + value 6; + } + } + default "none"; + } + + // EVPN route-type + typedef bgp_EvpnRtType { + type enumeration { + + // Unspecified + enum none { + value 0; + } + + // Ethernet Auto-Discovery route + enum a-d { + value 1; + } + + // MAC/IP Advertisement route + enum mac-ip { + value 2; + } + + // Inclusive Multicast Ethernet Tag route + enum imet { + value 3; + } + + // Ethernet Segment route + enum eth-seg { + value 4; + } + + // IP Prefix route + enum ip-pfx { + value 5; + } + } + default "none"; + } + + // Graceful restart controls + // Default Value computed from complete + typedef bgp_GrCtrl { + + // bits- Using string + type string; + default "complete"; + } + + // Graceful restart interval + typedef bgp_GrIntvl { + type uint16 { + range "1..3600"; + } + default "120"; + } + + // Graceful stale interval + typedef bgp_GrStaleIntvl { + type uint16 { + range "1..3600"; + } + default "300"; + } + + // Hold Interval + typedef bgp_HoldIntvl { + type uint16 { + range "3..3600"; + } + default "180"; + } + + // IGP Preference + typedef bgp_IgpPref { + type uint8; + } + + // IGP Route Type + typedef bgp_IgpRtType { + type uint8; + } + + // Inherit template peer control bits. This contains common fields of peer and peer-session templates (please refer to + // MOs PeerCont and SessionCont). + typedef bgp_InheritContPeerCtrlType { + + // bits- Using string + type string; + } + + // Inherit template peer-policy control bits. (Please refer + // to MO PolicyCont). + typedef bgp_InheritContPeerPolicyCtrlType { + + // bits- Using string + type string; + } + + // Keepalive Interval + typedef bgp_KaIntvl { + type uint16 { + range "0..3600"; + } + default "60"; + } + + // Last error len + typedef bgp_LastErrLen { + type uint8; + } + + // Last error value + typedef bgp_LastErrVal { + type uint32; + } + + // NH iLast Resolved Timestamp + typedef bgp_LastResolvTs { + type string; + default "0"; + } + + // Label + typedef bgp_Lbl { + type uint32; + default "0"; + } + + // Link Attribute TLV flags for Link-state + // Default Value computed from none + typedef bgp_LnkLsAttrFlags { + + // bits- Using string + type string; + default "none"; + } + + // Log Neighbor changes + typedef bgp_LogNbrSt { + type enumeration { + + // none + enum none { + value 0; + } + + // Enable + enum enable { + value 1; + } + + // Disable + enum disable { + value 2; + } + } + default "none"; + } + + // Link-State status + typedef bgp_LsAdminSt { + type enumeration { + + // Inactive + enum inactive { + value 0; + } + + // Active + enum active { + value 1; + } + } + default "inactive"; + } + + // Link-State attribute entry type + typedef bgp_LsAttrEntryType { + type enumeration { + + // Unspecified + enum none { + value 0; + } + + // Peer Node Segment Identifier + enum peer-node-sid { + value 1101; + } + + // Peer Adjacency Segment Identifier + enum peer-adj-sid { + value 1102; + } + + // Peer Set Segment Identifier + enum peer-set-sid { + value 1103; + } + } + default "none"; + } + + // Link-State NLRI Type + typedef bgp_LsNlriType { + type enumeration { + + // Unspecified + enum none { + value 0; + } + + // Node NLRI + enum node { + value 1; + } + + // Link NLRI + enum link { + value 2; + } + + // IPv4 Topology Prefix NLRI + enum ipv4-topo { + value 3; + } + + // IPv6 Topology Prefix NLRI + enum ipv6-topo { + value 4; + } + } + default "none"; + } + + // Link-State Protocol Identifier + typedef bgp_LsProtoId { + type enumeration { + + // Unspecified + enum none { + value 0; + } + + // IS-IS Level 1 + enum isis-l1 { + value 1; + } + + // IS-IS Level 2 + enum isis-l2 { + value 2; + } + + // OSPFv2 + enum ospf-v2 { + value 3; + } + + // Direct + enum direct { + value 4; + } + + // Static configuration + enum static { + value 5; + } + + // OSPFv3 + enum ospf-v3 { + value 6; + } + + // Egress Peer Engineering + enum epe { + value 7; + } + } + default "none"; + } + + // Major notify error + typedef bgp_MajNotifErr { + type enumeration { + + // None + enum none { + value 0; + } + + // Header Error + enum hdr-err { + value 1; + } + + // Open Message Error + enum open-msg-err { + value 2; + } + + // Update Message Error + enum upd-msg-err { + value 3; + } + + // Holdtimer Expired + enum hold-timer-exp { + value 4; + } + + // FSM Error + enum fsm-err { + value 5; + } + + // Cease Error + enum cease-err { + value 6; + } + + // Capability Message Error + enum cap-msg-err { + value 7; + } + + // Process Restart Error + enum process-restart-err { + value 101; + } + + // FD Read Error + enum fd-read-err { + value 102; + } + + // FD Ioctl Error + enum fd-ioctl-err { + value 103; + } + + // Peer Closed Session Error + enum peer-close-sess-err { + value 104; + } + + // Peer Received Notification Error + enum rcvd-notif-err { + value 105; + } + + // Received Duplicate Connection Request + enum rcvd-dup-conn-req { + value 106; + } + + // Dynamic Capability no Buffer + enum dyn-cap-no-buf { + value 107; + } + } + } + + // Maximum AS Limit + typedef bgp_MaxAsLimit { + type uint16 { + range "0..512"; + } + } + + // Maximum Ecmp + typedef bgp_MaxEcmp { + type uint8 { + range "1..64"; + } + default "1"; + } + + // Maximum Peers + typedef bgp_MaxPeerCnt { + type uint32 { + range "0..1000"; + } + } + + // Maximum Prefix + typedef bgp_MaxPfx { + type uint32; + } + + // Action when the prefixes crosses the maximum limit + typedef bgp_MaxPfxAct { + type enumeration { + + // Log + enum log { + value 1; + } + + // Shutdown + enum shut { + value 2; + } + + // Restart + enum restart { + value 3; + } + } + default "shut"; + } + + // Duration before we restart the peer when the maximum + // prefix limit is reached + typedef bgp_MaxPfxDuration { + + // MAX Converted to int from 0xffff + type uint16 { + range "0..65535"; + } + } + + // Threshold at which warning is issued when number of prefixes + // crosses the threshold, units in percentage + typedef bgp_MaxPfxThresh { + type uint8 { + range "0..100"; + } + } + + // MED dampening interval + typedef bgp_MedIntvl { + type uint32 { + range "0..4294967295"; + } + } + + // Memory consumed (in bytes) + typedef bgp_MemConsumed { + type uint32; + } + + // Metric + typedef bgp_Metric { + type uint32; + } + + // Minor notify error + typedef bgp_MinNotifErr { + type enumeration { + + // None + enum none { + value 0; + } + + // Unspecified Msg Header Error + enum unspecified-msg-hdr-err { + value 1; + } + + // Connection not Synchronized + enum conn-not-synced { + value 2; + } + + // Bad Message Length + enum bad-msg-len { + value 3; + } + + // Bad Message Type + enum bad-msg-type { + value 4; + } + + // Unknown Message Header Error + enum unknown-msg-hdr-err { + value 5; + } + + // Unspecified Open Error + enum unspecified-open-err { + value 6; + } + + // Unsupported Version + enum unsupp-version { + value 7; + } + + // Bad Peer AS + enum bad-peer-as { + value 8; + } + + // Bad Peer Router ID + enum bad-peer-rtrid { + value 9; + } + + // Unsupported Optional Parameter + enum unsupp-opt-param { + value 10; + } + + // Authentication Error + enum auth-err { + value 11; + } + + // Unacceptable Holdtime + enum bad-holdtime { + value 12; + } + + // Unsupported Capability + enum unsupp-cap { + value 13; + } + + // Unknown Open Header Error + enum unknown-open-hdr-err { + value 14; + } + + // Unspecified Update Error + enum unspecified-update-err { + value 15; + } + + // Malformed Attribute List + enum malformed-attr-list { + value 16; + } + + // Unrecognized Wellknown Attr + enum unrecognized-wellknown-attr { + value 17; + } + + // Missing Well-known Attribute + enum missing-wellknown-attr { + value 18; + } + + // Attribute Flags Error + enum attr-flags-err { + value 19; + } + + // Attribute Length Error + enum attr-len-err { + value 20; + } + + // Invalid Origin Attribute + enum invalid-origin-attr { + value 21; + } + + // Bgp AS Routing Loop Error + enum as-loop-err { + value 22; + } + + // Invalid Next-hop Attribute + enum invalid-nh-attr { + value 23; + } + + // Optional Attribute Error + enum opt-attr-err { + value 24; + } + + // Invalid Network Field + enum invalid-nw-field { + value 25; + } + + // Malformed AS Path + enum bad-as-path { + value 26; + } + + // Unknown Update Header Error + enum unknown-update-hdr-err { + value 27; + } + + // Unspecified Cease Error + enum unspecified-cease-err { + value 28; + } + + // Maximum Prefix Count + enum max-pfx-count-err { + value 29; + } + + // Administratively Shutdown + enum admin-shut { + value 30; + } + + // Peer Deconfigured + enum peer-decfg { + value 31; + } + + // Session Cleared + enum session-cleared { + value 32; + } + + // Connection Rejected + enum conn-rej { + value 33; + } + + // Other Configuration Change Error + enum other-cfg-chg { + value 34; + } + + // Connection Collision Resolution + enum conn-coll-resolution { + value 35; + } + + // Out of Resource + enum out-of-rsrc { + value 36; + } + + // Dynamic Capability Configuration Change + enum dyn-cap-cfg-chg { + value 37; + } + + // TTL Configuration Change + enum ttl-cfg-chg { + value 38; + } + + // TTL Security Configuration Change + enum ttl-security-cfg-chg { + value 39; + } + + // Passive Neighbor Configuration Change + enum passive-neighbor-cfg-chg { + value 40; + } + + // Address-family Configuration Change + enum af-cfg-chg { + value 41; + } + + // Route-reflector Configuration Change + enum rr-cfg-chg { + value 42; + } + + // Router-id Configuration Change + enum rtrid-cfg-chg { + value 43; + } + + // Confederation Id Change + enum confed-id-chg { + value 44; + } + + // Confederation Membership Change + enum confed-membership-change { + value 45; + } + + // Graceful-restart Configuration Change + enum gr-cfg-chg { + value 46; + } + + // Soft-reconfiguration Change + enum soft-recfg-chg { + value 47; + } + + // Update-source Interface Change + enum updatesrc-if-chg { + value 48; + } + + // Local-as Change + enum localas-chg { + value 49; + } + + // Unknown Cease Error + enum unknown-cease-err { + value 50; + } + + // Unspecified Cappability Message Error + enum unspecified-cap-msg-err { + value 51; + } + + // Unknown Sequence Number + enum unknown-seq-num { + value 52; + } + + // Invalid Capability Length + enum invalid-cap-len { + value 53; + } + + // Malformed Capability Value + enum bad-cap-val { + value 54; + } + + // Unsupported Capability Code + enum unsupp-cap-code { + value 55; + } + + // Unknown Capability Error + enum unknown-cap-err { + value 56; + } + } + } + + // Mode + typedef bgp_Mode { + type enumeration { + + // Fabric + enum fabric { + value 1; + } + + // External + enum external { + value 2; + } + } + default "fabric"; + } + + // MCAST-VPN NLRI route-type + typedef bgp_MvpnRtType { + type enumeration { + + // Unspecified + enum none { + value 0; + } + + // Multicast Inter-AS PMSI Auto Discovery route + enum interas-ipmsi-ad { + value 1; + } + + // Multicast Intra-AS PMSI Auto Discovery route + enum intraas-ipmsi-ad { + value 2; + } + + // Multicast S-PMSI Auto Discovery route + enum spmsi-ad { + value 3; + } + + // Multicast Leaf Auto Discovery route + enum leaf-ad { + value 4; + } + + // Multicast Source-Active Auto Discovery route + enum sa-ad { + value 5; + } + + // Shared C-Multicast route + enum shared-c-mcast { + value 6; + } + + // Source C-Multicast route + enum source-c-mcast { + value 7; + } + } + default "none"; + } + + // NH Next Advertised Timestamp + typedef bgp_NextAdvTs { + type string; + default "0"; + } + + // Nexthop flags + typedef bgp_NhFlags { + + // bits- Using string + type string; + } + + // Link Attribute TLV flags for Link-state + // Default Value computed from none + typedef bgp_NodeLsAttrFlags { + + // bits- Using string + type string; + default "none"; + } + + // Number of paths + typedef bgp_NumPaths { + type uint32; + } + + // Number of Peers + typedef bgp_NumPeers { + type uint32; + } + + // Order (for AS path segments and AS path items) + typedef bgp_Order { + type uint16; + } + + // Origin + typedef bgp_Origin { + type enumeration { + + // Learned Via IGP + enum igp { + value 1; + } + + // Learned Via EGP + enum egp { + value 2; + } + + // Learned by some other Means + enum incomplete { + value 3; + } + } + default "igp"; + } + + // Authentication status + typedef bgp_PasswdSet { + type enumeration { + + // Enabled + enum enabled { + value 1; + } + enum disabled { + value 0; + } + } + default "disabled"; + } + + // Path flags + typedef bgp_PathFlags { + + // bits- Using string + type string; + } + + // Path id + typedef bgp_PathId { + type uint32; + } + + // Path status + typedef bgp_PathSt { + type enumeration { + + // Deleted + enum deleted { + value 0; + } + + // Staled + enum staled { + value 1; + } + + // Valid + enum valid { + value 2; + } + + // InValid + enum invalid { + value 3; + } + + // history + enum history { + value 4; + } + + // suppressed + enum suppressed { + value 5; + } + + // dampened + enum dampened { + value 6; + } + } + } + + // Path type + typedef bgp_PathT { + type enumeration { + + // Internal + enum internal { + value 1; + } + + // External + enum external { + value 2; + } + + // Confederation + enum confederation { + value 3; + } + + // Local + enum local { + value 4; + } + + // Aggregate + enum aggregate { + value 5; + } + + // Redistribute + enum redistribute { + value 6; + } + + // Injected + enum injected { + value 7; + } + } + default "internal"; + } + + // Peer Address Family Control + typedef bgp_PeerAfControl { + + // bits- Using string + type string; + } + + // Peer AF flags + typedef bgp_PeerAfFlags { + + // bits- Using string + type string; + } + + // Peer Control + typedef bgp_PeerControl { + + // bits- Using string + type string; + } + + // TODO: Change this to nw:Cnt64 Count of BGP Messages + typedef bgp_PeerCount { + type uint64; + } + + // Peer Fabric Type + typedef bgp_PeerFabType { + type enumeration { + + // Fabric internal + enum fabric-internal { + value 0; + } + + // Fabric external + enum fabric-external { + value 1; + } + + // Fabric Border Leaf + enum fabric-border-leaf { + value 2; + } + } + default "fabric-internal"; + } + + // Peer flags + typedef bgp_PeerFlags { + + // bits- Using string + type string; + } + + // Peer graceful restart state + typedef bgp_PeerGrSt { + type enumeration { + + // Not applicable + enum na { + value 1; + } + + // Reset + enum reset { + value 2; + } + + // Up + enum up { + value 3; + } + } + default "na"; + } + + // Peer Index + typedef bgp_PeerIdx { + type uint16; + } + + // Peer operational state + typedef bgp_PeerOperSt { + type enumeration { + + // Unspecified + enum unspecified { + value 0; + } + + // Illegal + enum illegal { + value 1; + } + + // Shut + enum shut { + value 2; + } + + // Idle + enum idle { + value 3; + } + + // Connect + enum connect { + value 4; + } + + // Active + enum active { + value 5; + } + + // Open sent + enum open-sent { + value 6; + } + + // Open confirm + enum open-confirm { + value 7; + } + + // Established + enum established { + value 8; + } + + // Closing + enum closing { + value 9; + } + + // Error + enum error { + value 10; + } + + // Unknown + enum unknown { + value 11; + } + } + default "unspecified"; + } + + // Peer Type + typedef bgp_PeerType { + type enumeration { + + // ibgp + enum ibgp { + value 1; + } + + // ebgp + enum ebgp { + value 2; + } + } + default "ibgp"; + } + + // Pfx Flushed + typedef bgp_PfxFlushed { + type uint64; + } + + // Prefix Attributes TLV flags for Link-state + // Default Value computed from none + typedef bgp_PfxLsAttrFlags { + + // bits- Using string + type string; + default "none"; + } + + // TODO: Change this to nw:Cnt64 Counts for Prefix Peers + typedef bgp_PfxPeerCounts { + type uint64; + } + + // Prefix Peer Timeout + typedef bgp_PfxPeerTimeout { + type uint16 { + range "0..1200"; + } + } + + // Prefix Peer Wait + typedef bgp_PfxPeerWaitTime { + type uint16 { + range "0..1200"; + } + } + + // TODO: Change this to nw:Cnt64 Pfx Saved + typedef bgp_PfxSaved { + type uint64; + } + + // Pfx Sent + typedef bgp_PfxSent { + type uint64; + } + + // Prefix-Sid attribute entry type + typedef bgp_PfxSidAttrEntryType { + type enumeration { + + // Unspecified + enum none { + value 0; + } + + // Label Index + enum label-index { + value 1; + } + + // IPv6-SID + enum ipv6-sid { + value 2; + } + + // Originator SRGB + enum origin-srgb { + value 3; + } + } + default "none"; + } + + // PMSI Tunnel Type + typedef bgp_PmsiTunType { + type enumeration { + + // Unspecified + enum none { + value 0; + } + + // Ingress Replication + enum ingress-repl { + value 1; + } + } + default "none"; + } + + // private-as Control + typedef bgp_PrivateASControl { + type enumeration { + enum none { + value 0; + } + + // Remove private AS + enum remove-exclusive { + value 1; + } + + // Remove all private AS + enum remove-all { + value 2; + } + + // Replace private AS with local AS + enum replace-as { + value 3; + } + } + default "none"; + } + + // Reconnect Interval Value + typedef bgp_ReConnectIntvl { + type uint16 { + range "1..60"; + } + default "60"; + } + + // RNH Epoch + typedef bgp_RnhEpoch { + type uint8; + } + + // Route control direction + typedef bgp_RtCtrlDir { + type enumeration { + + // Incoming + enum in { + value 1; + } + + // Outgoing + enum out { + value 2; + } + } + default "in"; + } + + // Route control operational state + typedef bgp_RtCtrlOperSt { + type enumeration { + + // Unresolved + enum unresolved { + value 1; + } + + // Resolved + enum resolved { + value 2; + } + } + default "unresolved"; + } + + // Route flags + typedef bgp_RtFlags { + + // bits- Using string + type string; + } + + // Labeled address-family route flags + typedef bgp_RtLblAfFlags { + + // bits- Using string + type string; + } + + // Route version + typedef bgp_RtVer { + type uint32; + } + + // Route target policy type + typedef bgp_RttPType { + type enumeration { + + // Import + enum import { + value 1; + } + + // Export + enum export { + value 2; + } + } + default "import"; + } + + // Segment Routing Global Block + // Default Value "0" Removed - out of range 16..471804 + typedef bgp_SRGBRange { + type uint32 { + range "16..471804"; + } + } + + // Peer shut state qualifier + typedef bgp_ShutStQual { + type enumeration { + + // Unspecified + enum unspecified { + value 0; + } + + // Administratively down + enum admin { + value 1; + } + + // No memory + enum no-mem { + value 2; + } + + // Exceeded prefix limit + enum exceeded-pfxlimit { + value 3; + } + + // Administratively up + enum admin-up { + value 4; + } + + // No Affinity + enum no-affinity { + value 5; + } + } + default "unspecified"; + } + + // Event History Buffer Size + typedef bgp_Size { + type uint32 { + range "0..4 | 8192..1048576"; + } + default "0"; + } + + // FD to connect to the peer + typedef bgp_SockFD { + type uint32; + } + + // Soft Reconfiguration + typedef bgp_SoftReconfigBackup { + type enumeration { + enum none { + value 0; + } + + // Inbound Only + enum inbound { + value 1; + } + + // Inbound Always + enum inbound-always { + value 2; + } + } + } + + // BMP Server ID + typedef bgp_SrvId { + type uint8 { + range "1..2"; + } + } + + // Peer Idle State Reason + typedef bgp_StReason { + type enumeration { + enum none { + value 0; + } + + // NoMem + enum no-mem { + value 1; + } + } + default "none"; + } + + // Aggregate Address Summary-Only + typedef bgp_SummaryOnly { + type enumeration { + + // Enabled + enum enabled { + value 1; + } + + // Disabled + enum disabled { + value 0; + } + } + default "disabled"; + } + + // Table state + typedef bgp_TblSt { + type enumeration { + + // Unknown + enum unknown { + value 0; + } + + // Up + enum up { + value 1; + } + + // Down + enum down { + value 2; + } + } + } + + // Table version + typedef bgp_TblVer { + type uint32; + } + + // eBGP Multihop TTL value + typedef bgp_TtlVal { + type uint16 { + range "0..255"; + } + } + + // Unknown Attribute Length + typedef bgp_UnknownAttrLen { + + // MAX Converted to int from 0xffffffff + type uint32 { + range "0..4294967295"; + } + } + + // Version + typedef bgp_Ver { + type enumeration { + + // BGP Version 4 + enum v4 { + value 4; + } + } + default "v4"; + } + + // VNID + // Default Value "0" Removed - out of range 4096..16777215 + typedef bgp_Vnid { + + // MAX Converted to int from 0xffffff + type uint32 { + range "4096..16777215"; + } + } + + // Dampen Igp Metric + typedef bgp_igpMetric { + type uint16 { + range "0..3600"; + } + default "600"; + } + + typedef cap_Constraint { + type uint32; + } + + typedef cap_Counter { + type uint32; + } + + typedef cap_Model { + type string; + } + + // Quantitative + typedef cap_Quant { + + // MAX Converted to int from 0xFFFF + type uint16 { + range "0..65535"; + } + default "0"; + } + + typedef cap_RaiseFaultState { + type enumeration { + enum nominal { + value 0; + } + enum ruleHasLess { + value 1; + } + enum ruleHasMore { + value 2; + } + } + default "nominal"; + } + + typedef cap_RuleT { + type enumeration { + enum limit { + value 1; + } + } + default "limit"; + } + + typedef cap_Scope { + type enumeration { + enum node { + value 0; + } + enum policy-domain { + value 1; + } + enum fabric { + value 2; + } + } + default "node"; + } + + typedef cap_StorageHint { + type uint8; + } + + typedef cap_Vendor { + type string; + } + + typedef cap_Version { + type string; + } + + // Adjacency state qualifier + typedef cdp_AdjStQual { + + // bits- Using string + type string; + } + + // Capability type + typedef cdp_CapT { + + // bits- Using string + type string; + } + + // Neighbor device id + typedef cdp_DevId { + type string; + } + + // Device identifier type + typedef cdp_DevIdT { + type enumeration { + + // MAC address + enum mac { + value 1; + } + + // Serial number + enum serialNum { + value 2; + } + + // System name + enum sysName { + value 3; + } + + // System name and serial number + enum sysNameAndSerialNum { + value 4; + } + } + default "sysNameAndSerialNum"; + } + + // Neighbor device index + typedef cdp_DevIndex { + type uint32; + } + + // Duplex + typedef cdp_Duplex { + type enumeration { + + // Unknown + enum unknown { + value 0; + } + + // Half duplex + enum half { + value 1; + } + + // Full duplex + enum full { + value 2; + } + } + } + + // Hold interval + // No Enums - transformed from scalar:Enum8 to scalar:UByte, YANG integer equivalent uint8 + typedef cdp_HoldIntvl { + type uint8 { + range "10..255"; + } + default "180"; + } + + // MTU + typedef cdp_MTU { + type uint32; + } + + // Neighbor version + typedef cdp_NbrVer { + type string; + } + + // Operational state + typedef cdp_OperSt { + type enumeration { + + // Up + enum up { + value 1; + } + + // Down + enum down { + value 2; + } + } + default "down"; + } + + // Operational state qualifier + typedef cdp_OperStQual { + type enumeration { + + // Up + enum up { + value 1; + } + + // Administratively down + enum admin-down { + value 2; + } + + // Interface down + enum if-down { + value 3; + } + + // Unsupported + enum unsupported { + value 4; + } + } + default "unsupported"; + } + + // Neighbor platform id + typedef cdp_PlatId { + type string; + } + + // Neighbor port id + typedef cdp_PortId { + type string; + } + + // System Location + typedef cdp_SysLoc { + type string; + } + + // System name + typedef cdp_SysName { + type string; + } + + // System OID Length + typedef cdp_SysObjIdL { + type uint8; + } + + // System OID Value + typedef cdp_SysObjIdV { + type mtx_array_uint32; + } + + // Transmission frequency + // No Enums - transformed from scalar:Enum8 to scalar:UByte, YANG integer equivalent uint8 + typedef cdp_TxFreq { + type uint8 { + range "5..254"; + } + default "60"; + } + + // Version + typedef cdp_Ver { + type enumeration { + + // Version 1 + enum v1 { + value 1; + } + + // Version 2 + enum v2 { + value 2; + } + } + default "v2"; + } + + // Vlan id + typedef cdp_VlanId { + type uint16; + default "0"; + } + + typedef comm_Port { + type uint32 { + range "1024..65000"; + } + } + + typedef comp_DelimitedString { + type string; + } + + typedef comp_HostState { + type enumeration { + + // Maintenance Mode + enum maintenance { + value 0; + } + + // Connected + enum connected { + value 1; + } + + // Not Responding + enum noresponse { + value 2; + } + + // Disconnected + enum disconnected { + value 3; + } + + // Powered On + enum poweredOn { + value 4; + } + + // Powered Off + enum poweredOff { + value 5; + } + + // StandBy + enum standBy { + value 6; + } + + // Suspended + enum suspended { + value 7; + } + + // Unknown + enum unknown { + value 8; + } + } + default "disconnected"; + } + + typedef comp_NicInstType { + type enumeration { + + // Unknown + enum unknown { + value 0; + } + + // Baremetal Host + enum phys { + value 1; + } + + // Virtual Machine + enum virt { + value 2; + } + + // Hypervisor Host + enum hv { + value 3; + } + } + default "unknown"; + } + + typedef comp_NicState { + type enumeration { + + // Down + enum down { + value 0; + } + + // Up + enum up { + value 1; + } + } + default "down"; + } + + typedef comp_Vendor { + type enumeration { + enum VMware { + value 1; + } + enum Microsoft { + value 2; + } + } + default "VMware"; + } + + // Result of filter check + typedef compat_FilterStatus { + type enumeration { + + // failed + enum failed { + value 0; + } + + // passed + enum passed { + value 1; + } + } + default "failed"; + } + + // Operation type + typedef conftmpl_OperationType { + type enumeration { + + // Create + enum create { + value 1; + } + + // Delete + enum delete { + value 2; + } + } + default "create"; + } + + // Template type + typedef conftmpl_TemplateType { + type enumeration { + + // Unknown + enum unknown { + value 0; + } + + // Vrf + enum vrf { + value 1; + } + + // Vlan + enum vlan { + value 2; + } + + // Intf + enum intf { + value 3; + } + } + default "unknown"; + } + + // Adj addr + typedef coop_AdjAddr { + type address_Ipv4; + } + + // Adjacency flags + typedef coop_AdjFlags { + + // bits- Using string + type string; + } + + // Adjacency operational state + typedef coop_AdjOperSt { + type enumeration { + + // Down + enum down { + value 1; + } + + // Up + enum up { + value 2; + } + } + default "down"; + } + + // Adjacency operational state qualifier + typedef coop_AdjOperStQual { + type enumeration { + + // Unspecified + enum unspecified { + value 0; + } + + // Route not reachable + enum route-unreachable { + value 1; + } + + // TCP Connection Down + enum tcp-down { + value 2; + } + + // Peer inactive + enum peer-inactive { + value 3; + } + + // Peer congested + enum peer-congested { + value 4; + } + + // Up + enum up { + value 5; + } + } + default "unspecified"; + } + + // Collisions load factor + typedef coop_CollLdFactor { + + // MAX Converted to int from 0xffff + type uint16 { + range "1..65535"; + } + default "1"; + } + + // Ctx flags + typedef coop_CtxFlags { + + // bits- Using string + type string; + } + + // Dampen action + typedef coop_DampAction { + type enumeration { + + // Freeze + enum freeze { + value 1; + } + + // Withdraw + enum withdraw { + value 2; + } + } + default "freeze"; + } + + // Half life + typedef coop_DampHalfLife { + + // MAX Converted to int from 0xffff + type uint16 { + range "1..65535"; + } + default "10"; + } + + // Dampen Penalty + typedef coop_DampPenalty { + + // MAX Converted to int from 0xffff + type uint16 { + range "100..65535"; + } + default "1000"; + } + + // Dampen reuse threshold + typedef coop_DampReuseThresh { + + // MAX Converted to int from 0xffff + type uint16 { + range "100..65535"; + } + default "2500"; + } + + // Dampen saturation threshold + typedef coop_DampSatThresh { + + // MAX Converted to int from 0xffff + type uint16 { + range "100..65535"; + } + default "10000"; + } + + // Dampen threshold + typedef coop_DampThresh { + + // MAX Converted to int from 0xffff + type uint16 { + range "100..65535"; + } + default "4000"; + } + + // Domain operational state + typedef coop_DomOperSt { + type enumeration { + + // Down + enum down { + value 0; + } + + // Initializing + enum init { + value 1; + } + + // Up + enum up { + value 2; + } + } + default "down"; + } + + // Domain operational state qualifier + typedef coop_DomOperStQual { + type enumeration { + + // Unspecified + enum unspecified { + value 0; + } + + // Configuration not resolved + enum config-unresolved { + value 1; + } + + // Time not synced + enum time-not-synced { + value 2; + } + + // Infra domain down + enum infra-dom-down { + value 3; + } + + // Council pending + enum council-pending { + value 4; + } + + // Inconsistent configuration + enum inconsistent-config { + value 5; + } + + // Admin down + enum admin-down { + value 6; + } + + // Up + enum up { + value 7; + } + } + default "unspecified"; + } + + // Ep controls + // Default Value computed from notify-citizen + typedef coop_EpControl { + + // bits- Using string + type string; + default "notify-citizen"; + } + + // Ep flags + typedef coop_EpFlags { + + // bits- Using string + type string; + } + + // Graceful restart time (in seconds) + typedef coop_GRTime { + + // MAX Converted to int from 0xffff + type uint32 { + range "1..65535"; + } + default "600"; + } + + // Hello Interval (in seconds) + typedef coop_HelloIntvl { + + // MAX Converted to int from 0xffff + type uint16 { + range "1..65535"; + } + default "60"; + } + + // IGMP version + typedef coop_IGMPVersion { + type uint8 { + range "1..3"; + } + default "2"; + } + + // McastGrp flags + typedef coop_McGrpFlags { + + // bits- Using string + type string; + } + + // Mrtr flags + typedef coop_MrtrFlags { + + // bits- Using string + type string; + } + + // Peer controls + typedef coop_PeerControl { + + // bits- Using string + type string; + } + + // Port id + typedef coop_PortId { + + // MAX Converted to int from 0xffffffff + type uint32 { + range "0..4294967295"; + } + default "0"; + } + + // Publisher id + typedef coop_PubId { + type address_Ipv4; + } + + // Refresh interval (in seconds) + typedef coop_RefreshIntvl { + + // MAX Converted to int from 0x2aaaaaaa + type uint32 { + range "1..715827882"; + } + default "3600"; + } + + // Repository size + typedef coop_RepSz { + + // MAX Converted to int from 0xffffffff + type uint32 { + range "1..4294967295"; + } + default "1000000"; + } + + // Repository type + typedef coop_RepT { + type enumeration { + + // Endpoint reachability repository + enum ep { + value 1; + } + + // Oracle repository + enum oracle { + value 2; + } + + // Leaf repository + enum leaf { + value 3; + } + + // Multicast group membership repository + enum mgrpmbr { + value 4; + } + + // Multicast router repository + enum mrouter { + value 5; + } + + // Service node repository + enum svcnode { + value 6; + } + + // Anycast repository + enum anycast { + value 7; + } + + // External router repository + enum extrtr { + value 8; + } + + // VPC repository + enum vpc { + value 9; + } + + // VTEP repository + enum vtep { + value 10; + } + + // Context repository + enum ctx { + value 11; + } + } + default "ep"; + } + + // Role + typedef coop_Role { + type enumeration { + + // Citizen + enum citizen { + value 1; + } + + // Oracle + enum oracle { + value 2; + } + } + default "citizen"; + } + + // Shard Interval + typedef coop_ShardIntvl { + + // MAX Converted to int from 0xffffffff + type uint32 { + range "1..4294967295"; + } + } + + // Switch id + typedef coop_SwId { + type address_Ipv4; + } + + // Synthetic flags + typedef coop_SynthFlags { + + // bits- Using string + type string; + } + + // Synthetic Generator algorithm + typedef coop_SynthGen { + type enumeration { + enum xxx { + value 1; + } + } + default "xxx"; + } + + // Synthetic ip + typedef coop_SynthIp { + type address_Ipv4; + } + + // Synthetic vrf + typedef coop_SynthVrf { + type uint32; + } + + // Timestamp (NTP raw format) + typedef coop_Timestamp { + type string; + } + + // VNID + typedef coop_Vnid { + + // MAX Converted to int from 0xffffff + type uint32 { + range "1..16777215"; + } + default "1"; + } + + // Specifies the HA mode in which this system is configured + typedef top_Mode { + type enumeration { + enum unspecified { + value 0; + } + enum stand-alone { + value 1; + } + enum cluster { + value 2; + } + } + default "unspecified"; + } + + grouping System-group { + leaf id { + type uint32; + } + + // Specifies if this system is configured in standalone mode or HA pair + // Type is an MO-Defined-Type + leaf mode { + description "System mode"; + + // Type is an MO-Defined-Type + type top_Mode; + } + } + + container System { + description "System"; + + uses System-group; + } +} From 708ab9c95449ab812f0e740f0b4a583667513f52 Mon Sep 17 00:00:00 2001 From: Yan Gorelik Date: Fri, 5 Jan 2018 17:52:42 -0800 Subject: [PATCH 12/24] Updated libyang library to support more than 255 typedef statements --- sdk/cpp/core/CMakeLists.txt | 22 +++++++++++-- sdk/cpp/core/src/path/data_node.cpp | 32 +++++++++++-------- sdk/cpp/core/src/path/path.cpp | 4 +-- sdk/cpp/core/src/path/repository.cpp | 11 ++++--- sdk/cpp/core/src/path/root_data_node.cpp | 2 +- sdk/cpp/core/src/path/root_schema_node.cpp | 2 +- sdk/cpp/core/src/path/rpc.cpp | 15 ++++++--- sdk/cpp/core/src/path/schema_node.cpp | 5 ++- sdk/cpp/core/tests/CMakeLists.txt | 3 +- .../models/ydktest-sanity@2015-11-17.yang | 2 +- yang/ydktest/ydktest-sanity@2015-11-17.yang | 2 +- 11 files changed, 65 insertions(+), 35 deletions(-) diff --git a/sdk/cpp/core/CMakeLists.txt b/sdk/cpp/core/CMakeLists.txt index 2ed9d9b1b..a49a62aab 100644 --- a/sdk/cpp/core/CMakeLists.txt +++ b/sdk/cpp/core/CMakeLists.txt @@ -279,13 +279,16 @@ set(netconf_objs # Set LibYang variables set(libyang_location ${CMAKE_CURRENT_BINARY_DIR}/project_libyang/src/project_libyang) +set(libyang_build_location ${CMAKE_CURRENT_BINARY_DIR}/project_libyang/src/project_libyang-build) set(libyang_headers ${libyang_location}/src/common.h ${libyang_location}/src/context.h ${libyang_location}/src/dict.h ${libyang_location}/src/dict_private.h - ${libyang_location}/src/libyang.h + ${libyang_location}/src/extensions.h + ${libyang_build_location}/src/extensions_config.h + ${libyang_build_location}/src/libyang.h ${libyang_location}/src/parser.h ${libyang_location}/src/parser_yang.h ${libyang_location}/src/parser_yang_bis.h @@ -336,6 +339,7 @@ find_library(xslt_location xslt) find_library(pcre_location pcre) find_library(pthread_location pthread) find_library(dl_location dl) +find_library(m_location m) find_package(LibXml2 REQUIRED) find_package(LibSSH REQUIRED) @@ -383,7 +387,7 @@ set(libyang_include_location include/libyang) set(libyang_headers_location ${CMAKE_CURRENT_BINARY_DIR}/project_libyang/headers) ExternalProject_Add(project_libyang PREFIX "${CMAKE_CURRENT_BINARY_DIR}/project_libyang" - URL "https://github.com/manradhaCisco/libyang/archive/master.zip" + URL "https://github.com/ygorelik/libyang/archive/master.zip" CMAKE_ARGS -DSTATIC=true -DCMAKE_BUILD_TYPE=Debug INSTALL_DIR "${libyang_location}" INSTALL_COMMAND mkdir -p ${libyang_headers_location}/libyang && cp ${libyang_headers} ${libyang_headers_location}/libyang @@ -437,13 +441,24 @@ target_link_libraries(ydk ${pcre_location} ${xslt_location} ${pthread_location} - ${dl_location} libnetconf libyang + ${dl_location} ) set_property(TARGET ydk PROPERTY CXX_STANDARD 11) set_property(TARGET ydk PROPERTY CXX_STANDARD_REQUIRED ON) +set(libyang_extension_lib + ${libyang_build_location}/src/extensions/libyang_ext_test.so + ${libyang_build_location}/src/extensions/metadata.so + ${libyang_build_location}/src/extensions/nacm.so +) + +if(PLUGINS_DIR) + set(LIBYANG_EXT_PLUGINS_DIR ${PLUGINS_DIR}) +else() + set(LIBYANG_EXT_PLUGINS_DIR ${LIB_INSTALL_DIR}/libyang) +endif() install(TARGETS ydk DESTINATION ${LIB_INSTALL_DIR}) install(FILES ${libydk_install_headers} DESTINATION ${INCLUDE_INSTALL_DIR}) @@ -452,6 +467,7 @@ install(FILES ${SPDLOG_DETAILS_HEADERS} DESTINATION ${spdlog_details_include_loc install(FILES ${SPDLOG_FMT_HEADERS} DESTINATION ${spdlog_fmt_include_location}) install(FILES ${SPDLOG_FMT_BUNDLED_HEADERS} DESTINATION ${spdlog_fmt_bundled_include_location}) install(FILES ${SPDLOG_SINKS_HEADERS} DESTINATION ${spdlog_sinks_include_location}) +install(FILES ${libyang_extension_lib} DESTINATION ${LIBYANG_EXT_PLUGINS_DIR}) # generate doxygen documentation for ydk_core API find_package(Doxygen) diff --git a/sdk/cpp/core/src/path/data_node.cpp b/sdk/cpp/core/src/path/data_node.cpp index 2cb76b8fc..cdc35785a 100644 --- a/sdk/cpp/core/src/path/data_node.cpp +++ b/sdk/cpp/core/src/path/data_node.cpp @@ -316,12 +316,12 @@ ydk::path::DataNodeImpl::find(const std::string& path) } YLOG_DEBUG("Getting child schema with path '{}' in {}", spath, m_node->schema->name); const lys_node* found_snode = - ly_ctx_get_node(m_node->schema->module->ctx, m_node->schema, spath.c_str()); + ly_ctx_get_node(m_node->schema->module->ctx, m_node->schema, spath.c_str(), 1); if(found_snode) { YLOG_DEBUG("Getting data nodes with path '{}'", path); - ly_set* result_set = lyd_find_xpath(m_node, path.c_str()); + ly_set* result_set = lyd_find_path(m_node, path.c_str()); if( result_set ) { if (result_set->number > 0) @@ -484,13 +484,16 @@ ydk::path::DataNodeImpl::remove_annotation(const ydk::path::Annotation& an) lyd_attr* attr = m_node->attr; while(attr){ - lys_module *module = attr->module; - if(module){ - Annotation an1{module->ns, attr->name, attr->value}; - if (an == an1){ - lyd_free_attr(m_node->schema->module->ctx, m_node, attr, 0); - return true; - } + lyd_node* node = attr->parent; + if (node && node->schema) { + lys_module* module = node->schema->module; + if(module){ + Annotation an1{module->ns, attr->name, attr->value_str}; + if (an == an1){ + lyd_free_attr(m_node->schema->module->ctx, m_node, attr, 0); + return true; + } + } } } @@ -505,15 +508,16 @@ ydk::path::DataNodeImpl::annotations() if(m_node) { lyd_attr* attr = m_node->attr; while(attr) { - lys_module *module = attr->module; - if(module) { - ann.emplace_back(module->ns, attr->name, attr->value); - + lyd_node* node = attr->parent; + if (node && node->schema) { + lys_module* module = node->schema->module; + if(module) { + ann.emplace_back(module->ns, attr->name, attr->value_str); + } } attr = attr->next; } } - return ann; } diff --git a/sdk/cpp/core/src/path/path.cpp b/sdk/cpp/core/src/path/path.cpp index 6cbf10b15..febc20bb3 100644 --- a/sdk/cpp/core/src/path/path.cpp +++ b/sdk/cpp/core/src/path/path.cpp @@ -165,11 +165,9 @@ ydk::path::ValidationService::validate(const ydk::path::DataNode & dn, ydk::Vali break; case ydk::ValidationService::Option::GET_CONFIG: option_str="GET-CONFIG"; - ly_option = LYD_OPT_GETCONFIG; + ly_option = LYD_OPT_GETCONFIG | LYD_OPT_NOAUTODEL; break; - } - ly_option = ly_option | LYD_OPT_NOAUTODEL; YLOG_INFO("Validation called on {} with option {}", dn.get_path(), option_str); diff --git a/sdk/cpp/core/src/path/repository.cpp b/sdk/cpp/core/src/path/repository.cpp index 87d061a8b..d94b46631 100644 --- a/sdk/cpp/core/src/path/repository.cpp +++ b/sdk/cpp/core/src/path/repository.cpp @@ -41,8 +41,9 @@ namespace ydk { static bool file_exists(const std::string & path) { - struct stat st = {0}; + struct stat st; + memset( &st, 0, sizeof(struct stat)); return stat(path.c_str(), &st) == 0; } @@ -279,7 +280,7 @@ ly_ctx* ydk::path::RepositoryPtr::create_ly_context() YLOG_INFO("Path where models are to be downloaded: {}", path); } YLOG_DEBUG("Creating libyang context in path: {}", path); - struct ly_ctx* ctx = ly_ctx_new(path.c_str()); + struct ly_ctx* ctx = ly_ctx_new(path.c_str(), 0); if(!ctx) { YLOG_ERROR("Could not create repository in: {}", path); @@ -289,7 +290,7 @@ ly_ctx* ydk::path::RepositoryPtr::create_ly_context() //set module callback (only if there is a model provider) if(!model_providers.empty()) { - ly_ctx_set_module_clb(ctx, get_module_callback, this); + ly_ctx_set_module_imp_clb(ctx, get_module_callback, this); } return ctx; @@ -462,11 +463,11 @@ ydk::path::RepositoryPtr::load_module(ly_ctx* ctx, const std::string& module, co YLOG_DEBUG("Module '{}' Revision '{}'", module.c_str(), revision.c_str()); - auto p = ly_ctx_get_module(ctx, module.c_str(), revision.empty() ? 0 : revision.c_str()); + auto p = ly_ctx_get_module(ctx, module.c_str(), revision.empty() ? NULL : revision.c_str(), 1); if(!p) { - p = ly_ctx_load_module(ctx, module.c_str(), revision.empty() ? 0 : revision.c_str()); + p = ly_ctx_load_module(ctx, module.c_str(), revision.empty() ? NULL : revision.c_str()); } else { YLOG_DEBUG("Cache hit Module '{}' Revision '{}'", module, revision); new_module = false; diff --git a/sdk/cpp/core/src/path/root_data_node.cpp b/sdk/cpp/core/src/path/root_data_node.cpp index f69405e38..22bc33eff 100644 --- a/sdk/cpp/core/src/path/root_data_node.cpp +++ b/sdk/cpp/core/src/path/root_data_node.cpp @@ -220,7 +220,7 @@ ydk::path::RootDataImpl::find(const std::string& path) schema_path+=path; YLOG_DEBUG("Looking for schema nodes path in root: '{}'", schema_path); - const struct lys_node* found_snode = ly_ctx_get_node(m_node->schema->module->ctx, nullptr, schema_path.c_str()); + const struct lys_node* found_snode = ly_ctx_get_node(m_node->schema->module->ctx, nullptr, schema_path.c_str(), 1); if(found_snode) { diff --git a/sdk/cpp/core/src/path/root_schema_node.cpp b/sdk/cpp/core/src/path/root_schema_node.cpp index 459938753..e5a9809cf 100644 --- a/sdk/cpp/core/src/path/root_schema_node.cpp +++ b/sdk/cpp/core/src/path/root_schema_node.cpp @@ -316,7 +316,7 @@ ydk::path::RootSchemaNodeImpl::find(const std::string& path) std::string full_path{"/"}; full_path+=path; - const struct lys_node* found_node = ly_ctx_get_node(m_ctx, nullptr, full_path.c_str()); + const struct lys_node* found_node = ly_ctx_get_node(m_ctx, nullptr, full_path.c_str(), 1); if (found_node){ auto p = reinterpret_cast(found_node->priv); diff --git a/sdk/cpp/core/src/path/rpc.cpp b/sdk/cpp/core/src/path/rpc.cpp index 1da45aaae..75ec1d3ec 100644 --- a/sdk/cpp/core/src/path/rpc.cpp +++ b/sdk/cpp/core/src/path/rpc.cpp @@ -104,17 +104,24 @@ static bool is_part_of_output(lys_node* node_result) bool ydk::path::RpcImpl::has_output_node() const { + std::string node_path = lys_path( data_node->m_node->schema); + std::string search_path = node_path + "//*"; // Patterns includes only descendants of the node + ly_verb(LY_LLSILENT); //turn off libyang logging at the beginning - ly_set* result_set = lys_find_xpath(data_node->m_node->schema, "*", LYS_FIND_OUTPUT); + ly_set* result_set = lys_find_path(data_node->m_node->schema->module, data_node->m_node->schema, search_path.c_str()); ly_verb(LY_LLVRB); // enable libyang logging after find has completed + + auto result = false; if(result_set && result_set->number > 0) { for(size_t i=0; i < result_set->number; i++) { lys_node* node_result = result_set->set.s[i]; - if(is_part_of_output(node_result)) - return true; + if (is_part_of_output(node_result)) { + result = true; + break; + } } } - return false; + return result; } diff --git a/sdk/cpp/core/src/path/schema_node.cpp b/sdk/cpp/core/src/path/schema_node.cpp index ce0a73f5f..23e07b86f 100644 --- a/sdk/cpp/core/src/path/schema_node.cpp +++ b/sdk/cpp/core/src/path/schema_node.cpp @@ -139,7 +139,7 @@ ydk::path::SchemaNodeImpl::find(const string& path) vector ret; struct ly_ctx* ctx = m_node->module->ctx; - const struct lys_node* found_node = ly_ctx_get_node(ctx, m_node, path.c_str()); + const struct lys_node* found_node = ly_ctx_get_node(ctx, m_node, path.c_str(), 0); if (found_node) { @@ -261,6 +261,9 @@ ydk::path::SchemaNodeImpl::get_statement() const case LYS_ACTION: s.keyword = "action"; break; + case LYS_EXT: + s.keyword = "extension"; + break; case LYS_ANYDATA: case LYS_UNKNOWN: break; diff --git a/sdk/cpp/core/tests/CMakeLists.txt b/sdk/cpp/core/tests/CMakeLists.txt index 8c7d35fa4..bce0f43be 100644 --- a/sdk/cpp/core/tests/CMakeLists.txt +++ b/sdk/cpp/core/tests/CMakeLists.txt @@ -25,7 +25,8 @@ foreach(test_name IN LISTS core_tests) pcre ssh_threads xml2 - ssh) + ssh + dl) add_test(NAME ${test_name} COMMAND $) endforeach(test_name) diff --git a/sdk/cpp/core/tests/models/ydktest-sanity@2015-11-17.yang b/sdk/cpp/core/tests/models/ydktest-sanity@2015-11-17.yang index 8df2e4fd9..e24d92f98 100644 --- a/sdk/cpp/core/tests/models/ydktest-sanity@2015-11-17.yang +++ b/sdk/cpp/core/tests/models/ydktest-sanity@2015-11-17.yang @@ -120,7 +120,7 @@ module ydktest-sanity { container one { leaf name-of-one { type string { - pattern "(([0\-9]\|[1\-9][0\-9]\|1[0\-9][0\-9]\|2[0\-4][0\-9]\|25[0\-5])\\.){3}([0\-9]\|[1\-9][0\-9]\|1[0\-9][0\-9]\|2[0\-4][0\-9]\|25[0\-5])(%[\\p{N}\\p{L}]+)?"; + pattern '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\p{N}\p{L}]+)?'; } } diff --git a/yang/ydktest/ydktest-sanity@2015-11-17.yang b/yang/ydktest/ydktest-sanity@2015-11-17.yang index 858942a25..eed658f98 100644 --- a/yang/ydktest/ydktest-sanity@2015-11-17.yang +++ b/yang/ydktest/ydktest-sanity@2015-11-17.yang @@ -120,7 +120,7 @@ module ydktest-sanity { container one { leaf name-of-one { type string { - pattern "(([0\-9]\|[1\-9][0\-9]\|1[0\-9][0\-9]\|2[0\-4][0\-9]\|25[0\-5])\\.){3}([0\-9]\|[1\-9][0\-9]\|1[0\-9][0\-9]\|2[0\-4][0\-9]\|25[0\-5])(%[\\p{N}\\p{L}]+)?"; + pattern '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\p{N}\p{L}]+)?'; } } From 8ec022723afc3b5b5b9d1da5eeb95a27ce1501ef Mon Sep 17 00:00:00 2001 From: Yan Gorelik Date: Thu, 11 Jan 2018 10:20:57 -0800 Subject: [PATCH 13/24] Fixed C++ tests after libyang upgrade --- sdk/cpp/core/CMakeLists.txt | 1 + sdk/cpp/core/src/netconf_ssh_client.cpp | 2 +- sdk/cpp/core/src/netconf_tcp_client.cpp | 2 +- sdk/cpp/core/src/path/data_node.cpp | 10 ++-------- sdk/cpp/core/src/path/root_schema_node.cpp | 5 ++++- sdk/cpp/core/tests/models/ydktest-aug-ietf-5.yang | 5 +++++ sdk/cpp/tests/test_on_demand_loading.cpp | 4 ++-- sdk/cpp/tests/test_sanity_levels.cpp | 13 +++++-------- .../ydktest-aug-ietf-5@2017-07-26.yang | 5 +++++ 9 files changed, 26 insertions(+), 21 deletions(-) diff --git a/sdk/cpp/core/CMakeLists.txt b/sdk/cpp/core/CMakeLists.txt index a49a62aab..a5863ec92 100644 --- a/sdk/cpp/core/CMakeLists.txt +++ b/sdk/cpp/core/CMakeLists.txt @@ -308,6 +308,7 @@ set(yang_objs common.c.o context.c.o dict.c.o + extensions.c.o log.c.o parser.c.o parser_json.c.o diff --git a/sdk/cpp/core/src/netconf_ssh_client.cpp b/sdk/cpp/core/src/netconf_ssh_client.cpp index 6dbc1a573..fc4107934 100644 --- a/sdk/cpp/core/src/netconf_ssh_client.cpp +++ b/sdk/cpp/core/src/netconf_ssh_client.cpp @@ -110,7 +110,7 @@ int NetconfSSHClient::connect() std::string NetconfSSHClient::get_hostname_port() { ostringstream os; - os< NetconfTCPClient::get_capabilities() std::string NetconfTCPClient::get_hostname_port() { std::ostringstream os; - os << hostname << ":" << port; + os << hostname << "_" << port; return os.str(); } diff --git a/sdk/cpp/core/src/path/data_node.cpp b/sdk/cpp/core/src/path/data_node.cpp index cdc35785a..8eaf36274 100644 --- a/sdk/cpp/core/src/path/data_node.cpp +++ b/sdk/cpp/core/src/path/data_node.cpp @@ -308,15 +308,10 @@ ydk::path::DataNodeImpl::find(const std::string& path) if(m_node == nullptr) { return results; } - std::string spath{path}; - auto s = get_schema_node().get_statement(); - if(s.keyword == "rpc"){ - spath="input/" + spath; - } - YLOG_DEBUG("Getting child schema with path '{}' in {}", spath, m_node->schema->name); + YLOG_DEBUG("Getting child schema with path '{}' in {}", path, m_node->schema->name); const lys_node* found_snode = - ly_ctx_get_node(m_node->schema->module->ctx, m_node->schema, spath.c_str(), 1); + ly_ctx_get_node(m_node->schema->module->ctx, m_node->schema, path.c_str(), 0); if(found_snode) { @@ -334,7 +329,6 @@ ydk::path::DataNodeImpl::find(const std::string& path) } ly_set_free(result_set); } - } return results; diff --git a/sdk/cpp/core/src/path/root_schema_node.cpp b/sdk/cpp/core/src/path/root_schema_node.cpp index e5a9809cf..2ec370c2a 100644 --- a/sdk/cpp/core/src/path/root_schema_node.cpp +++ b/sdk/cpp/core/src/path/root_schema_node.cpp @@ -39,6 +39,9 @@ static void get_namespaces_from_xml_doc(xmlNodePtr root, std::unordered_settype == XML_ELEMENT_NODE && curr->ns && curr->ns->href) { namespaces.insert(std::string{reinterpret_cast(curr->ns->href)}); + if (curr->nsDef && curr->nsDef->href) { + namespaces.insert(std::string{reinterpret_cast(curr->nsDef->href)}); + } } get_namespaces_from_xml_doc(curr->children, namespaces); } @@ -316,7 +319,7 @@ ydk::path::RootSchemaNodeImpl::find(const std::string& path) std::string full_path{"/"}; full_path+=path; - const struct lys_node* found_node = ly_ctx_get_node(m_ctx, nullptr, full_path.c_str(), 1); + const struct lys_node* found_node = ly_ctx_get_node(m_ctx, nullptr, full_path.c_str(), 0); if (found_node){ auto p = reinterpret_cast(found_node->priv); diff --git a/sdk/cpp/core/tests/models/ydktest-aug-ietf-5.yang b/sdk/cpp/core/tests/models/ydktest-aug-ietf-5.yang index 0a5e639bc..e2527be10 100644 --- a/sdk/cpp/core/tests/models/ydktest-aug-ietf-5.yang +++ b/sdk/cpp/core/tests/models/ydktest-aug-ietf-5.yang @@ -35,6 +35,11 @@ module ydktest-aug-ietf-5 { description "aug-identity"; } + identity derived-aug-identity { + description "derived aug-identity"; + base aug-identity; + } + augment /base-one:cpython/base-one:doc { leaf aug-5-identityref { type identityref { diff --git a/sdk/cpp/tests/test_on_demand_loading.cpp b/sdk/cpp/tests/test_on_demand_loading.cpp index b52248d94..400207a8d 100644 --- a/sdk/cpp/tests/test_on_demand_loading.cpp +++ b/sdk/cpp/tests/test_on_demand_loading.cpp @@ -33,7 +33,7 @@ using namespace ydk; std::string AUGMENTED_XML_PAYLOAD = R"( - aug-identity + yaug-five:derived-aug-identity true @@ -85,7 +85,7 @@ std::string AUGMENTED_JSON_PAYLOAD = R"({ "ydktest-aug-ietf-2:ydktest-aug-2": { "aug-two": "aug two" }, - "aug-5-identityref": "ydktest-aug-ietf-5:aug-identity" + "ydktest-aug-ietf-5:aug-5-identityref": "ydktest-aug-ietf-5:derived-aug-identity" }, "lib": { "ydktest-aug-ietf-4:ydktest-aug-4": { diff --git a/sdk/cpp/tests/test_sanity_levels.cpp b/sdk/cpp/tests/test_sanity_levels.cpp index a8d2e4ff1..2e8c3a7f8 100644 --- a/sdk/cpp/tests/test_sanity_levels.cpp +++ b/sdk/cpp/tests/test_sanity_levels.cpp @@ -535,7 +535,7 @@ TEST_CASE("test_leafref_pos") REQUIRE(reply); //CREATE - r_1->ydktest_sanity_one->name = "-|90|1-0|240|25-.-|90|199|200|25-.9|1-|1-9|240|250.-|99|199|2-9|25-"; + r_1->ydktest_sanity_one->name = "1.2.3.4"; r_1->two->sub1->number = 21; r_1->three->sub1->sub2->number = 311; auto e_1 = make_unique(); @@ -573,11 +573,11 @@ TEST_CASE("test_leafref_pos") r_1->inbtw_list->ldata.push_back(move(e_1)); r_1->inbtw_list->ldata.push_back(move(e_2)); - r_1->leaf_ref->ref_one_name = "-|90|1-0|240|25-.-|90|199|200|25-.9|1-|1-9|240|250.-|99|199|2-9|25-"; + r_1->leaf_ref->ref_one_name = "1.2.3.4"; r_1->leaf_ref->ref_two_sub1_number = 21; r_1->leaf_ref->ref_three_sub1_sub2_number = r_1->three->sub1->sub2->number.get(); - r_1->leaf_ref->one->name_of_one = "-|90|1-0|240|25-.-|90|199|200|25-.9|1-|1-9|240|250.-|99|199|2-9|25-"; - r_1->leaf_ref->one->two->self_ref_one_name = "-|90|1-0|240|25-.-|90|199|200|25-.9|1-|1-9|240|250.-|99|199|2-9|25-"; + r_1->leaf_ref->one->name_of_one = "1.2.3.4"; + r_1->leaf_ref->one->two->self_ref_one_name = "1.2.3.4"; reply = crud.create(provider, *r_1); REQUIRE(reply); @@ -592,7 +592,7 @@ TEST_CASE("test_leafref_pos") REQUIRE(r_1->inbtw_list->ldata[1]->name == r_2->inbtw_list->ldata[1]->name); REQUIRE(r_1->inbtw_list->ldata[0]->subc->subc_subl1[0]->number == r_1->inbtw_list->ldata[0]->subc->subc_subl1[0]->number); REQUIRE(r_1->inbtw_list->ldata[0]->subc->subc_subl1[0]->name == r_1->inbtw_list->ldata[0]->subc->subc_subl1[0]->name); - REQUIRE(*r_1 == *r_2); + REQUIRE(*r_1 == *r_2); } TEST_CASE("aug_one_pos") @@ -707,6 +707,3 @@ TEST_CASE("aug_leaf") ydktest_sanity::Runner* r_2 = dynamic_cast(r_read.get()); REQUIRE(r_2->ydktest_sanity_one->augmented_leaf==r_1->ydktest_sanity_one->augmented_leaf); } - - - diff --git a/yang/ydktest-augmentation/ydktest-aug-ietf-5@2017-07-26.yang b/yang/ydktest-augmentation/ydktest-aug-ietf-5@2017-07-26.yang index 0a5e639bc..e2527be10 100644 --- a/yang/ydktest-augmentation/ydktest-aug-ietf-5@2017-07-26.yang +++ b/yang/ydktest-augmentation/ydktest-aug-ietf-5@2017-07-26.yang @@ -35,6 +35,11 @@ module ydktest-aug-ietf-5 { description "aug-identity"; } + identity derived-aug-identity { + description "derived aug-identity"; + base aug-identity; + } + augment /base-one:cpython/base-one:doc { leaf aug-5-identityref { type identityref { From 4378043dee736911c6fba63be99563c07585eab2 Mon Sep 17 00:00:00 2001 From: Yan Gorelik Date: Mon, 22 Jan 2018 16:53:20 -0800 Subject: [PATCH 14/24] fixed go tests after libyang upgrade --- sdk/cpp/core/src/path/repository.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdk/cpp/core/src/path/repository.cpp b/sdk/cpp/core/src/path/repository.cpp index d94b46631..0c0d75e90 100644 --- a/sdk/cpp/core/src/path/repository.cpp +++ b/sdk/cpp/core/src/path/repository.cpp @@ -280,7 +280,7 @@ ly_ctx* ydk::path::RepositoryPtr::create_ly_context() YLOG_INFO("Path where models are to be downloaded: {}", path); } YLOG_DEBUG("Creating libyang context in path: {}", path); - struct ly_ctx* ctx = ly_ctx_new(path.c_str(), 0); + struct ly_ctx* ctx = ly_ctx_new(path.c_str(), LY_CTX_ALLIMPLEMENTED); if(!ctx) { YLOG_ERROR("Could not create repository in: {}", path); From 05a07db51313171f3212244f90e3799db20ce648 Mon Sep 17 00:00:00 2001 From: Yan Gorelik Date: Tue, 23 Jan 2018 15:54:30 -0800 Subject: [PATCH 15/24] Fixing Python tests after linyang upgrade --- sdk/python/core/tests/test_on_demand.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sdk/python/core/tests/test_on_demand.py b/sdk/python/core/tests/test_on_demand.py index 3131819e1..d02cf8967 100644 --- a/sdk/python/core/tests/test_on_demand.py +++ b/sdk/python/core/tests/test_on_demand.py @@ -40,7 +40,7 @@ AUGMENTED_XML_PAYLOAD = """ - aug-identity + yaug-five:derived-aug-identity true @@ -92,7 +92,7 @@ "ydktest-aug-ietf-2:ydktest-aug-2": { "aug-two": "aug two" }, - "aug-5-identityref": "ydktest-aug-ietf-5:aug-identity" + "ydktest-aug-ietf-5:aug-5-identityref": "ydktest-aug-ietf-5:derived-aug-identity" }, "lib": { "ydktest-aug-ietf-4:ydktest-aug-4": { From d93c3588554632464731fa32d300fe26d226e3ba Mon Sep 17 00:00:00 2001 From: Yan Gorelik Date: Tue, 23 Jan 2018 17:24:09 -0800 Subject: [PATCH 16/24] Fixing Python augmentation tests after linyang upgrade --- sdk/python/core/tests/test_on_demand.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdk/python/core/tests/test_on_demand.py b/sdk/python/core/tests/test_on_demand.py index d02cf8967..ab83c7630 100644 --- a/sdk/python/core/tests/test_on_demand.py +++ b/sdk/python/core/tests/test_on_demand.py @@ -174,7 +174,7 @@ def test_on_demand_loading_xml(self): def test_on_demand_loading_json(self): self.codec_provider.encoding = EncodingFormat.JSON entity1 = self.codec.decode(self.codec_provider, AUGMENTED_JSON_PAYLOAD) - self.assertEqual(entity1.doc.aug_5_identityref.get(), "ydktest-aug-ietf-5:aug-identity") + self.assertEqual(entity1.doc.aug_5_identityref.get(), "ydktest-aug-ietf-5:derived-aug-identity") From d6df7f97bb6027c6369be0474fad6b39f3cb31b7 Mon Sep 17 00:00:00 2001 From: Yan Date: Thu, 25 Jan 2018 01:14:12 -0500 Subject: [PATCH 17/24] fixing CentOS build after libyang upgrade --- sdk/cpp/core/CMakeLists.txt | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/sdk/cpp/core/CMakeLists.txt b/sdk/cpp/core/CMakeLists.txt index a5863ec92..d7d053bbc 100644 --- a/sdk/cpp/core/CMakeLists.txt +++ b/sdk/cpp/core/CMakeLists.txt @@ -383,13 +383,21 @@ add_library(libnetconf STATIC IMPORTED) set_property(TARGET libnetconf PROPERTY IMPORTED_LOCATION ${libnetconf_archive}) add_dependencies(libnetconf project_libnetconf) +if(LIBYANG_PLUGINS_DIR) + set(LIBYANG_EXT_PLUGINS_DIR ${LIBYANG_PLUGINS_DIR}) +else() + set(LIBYANG_EXT_PLUGINS_DIR ${LIB_INSTALL_DIR}/libyang) +endif() +set(LIBYANG_PLUGINS_INSTALL_DIR ${CPACK_PACKAGE_INSTALL_DIRECTORY}/${LIBYANG_EXT_PLUGINS_DIR}) +message("Set libyang plugin installation directory to: ${LIBYANG_PLUGINS_INSTALL_DIR}") + # Add LibYang set(libyang_include_location include/libyang) set(libyang_headers_location ${CMAKE_CURRENT_BINARY_DIR}/project_libyang/headers) ExternalProject_Add(project_libyang PREFIX "${CMAKE_CURRENT_BINARY_DIR}/project_libyang" URL "https://github.com/ygorelik/libyang/archive/master.zip" - CMAKE_ARGS -DSTATIC=true -DCMAKE_BUILD_TYPE=Debug + CMAKE_ARGS -DSTATIC=true -DCMAKE_BUILD_TYPE=Debug -DPLUGINS_DIR=${LIBYANG_PLUGINS_INSTALL_DIR} INSTALL_DIR "${libyang_location}" INSTALL_COMMAND mkdir -p ${libyang_headers_location}/libyang && cp ${libyang_headers} ${libyang_headers_location}/libyang ) @@ -455,12 +463,6 @@ set(libyang_extension_lib ${libyang_build_location}/src/extensions/nacm.so ) -if(PLUGINS_DIR) - set(LIBYANG_EXT_PLUGINS_DIR ${PLUGINS_DIR}) -else() - set(LIBYANG_EXT_PLUGINS_DIR ${LIB_INSTALL_DIR}/libyang) -endif() - install(TARGETS ydk DESTINATION ${LIB_INSTALL_DIR}) install(FILES ${libydk_install_headers} DESTINATION ${INCLUDE_INSTALL_DIR}) install(FILES ${SPDLOG_HEADERS} DESTINATION ${spdlog_include_location}) From 23ea03dcafa24b77ff17cd5e5d7b332cdbaf704f Mon Sep 17 00:00:00 2001 From: Yan Gorelik Date: Thu, 25 Jan 2018 18:00:55 -0800 Subject: [PATCH 18/24] Fixing MacOS build after libyang upgrade --- sdk/cpp/core/CMakeLists.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sdk/cpp/core/CMakeLists.txt b/sdk/cpp/core/CMakeLists.txt index d7d053bbc..1b00e4277 100644 --- a/sdk/cpp/core/CMakeLists.txt +++ b/sdk/cpp/core/CMakeLists.txt @@ -458,9 +458,9 @@ target_link_libraries(ydk set_property(TARGET ydk PROPERTY CXX_STANDARD 11) set_property(TARGET ydk PROPERTY CXX_STANDARD_REQUIRED ON) set(libyang_extension_lib - ${libyang_build_location}/src/extensions/libyang_ext_test.so - ${libyang_build_location}/src/extensions/metadata.so - ${libyang_build_location}/src/extensions/nacm.so + ${libyang_build_location}/src/extensions/libyang_ext_test${CMAKE_SHARED_LIBRARY_SUFFIX} + ${libyang_build_location}/src/extensions/metadata${CMAKE_SHARED_LIBRARY_SUFFIX} + ${libyang_build_location}/src/extensions/nacm${CMAKE_SHARED_LIBRARY_SUFFIX} ) install(TARGETS ydk DESTINATION ${LIB_INSTALL_DIR}) From 9d971c7da2a12613d4721a9638fa2ce03f02d7b8 Mon Sep 17 00:00:00 2001 From: Yan Gorelik Date: Mon, 29 Jan 2018 14:34:02 -0800 Subject: [PATCH 19/24] Excluded MacOS from coverage tests --- test/tests.sh | 103 +++++++++++++++++++++++++++++--------------------- 1 file changed, 59 insertions(+), 44 deletions(-) diff --git a/test/tests.sh b/test/tests.sh index f8485016a..4c428a8aa 100755 --- a/test/tests.sh +++ b/test/tests.sh @@ -31,7 +31,7 @@ PY_TEST="python3" ###################################################################### function print_msg { - echo -e "${RED}*** $(date) *** tests.sh | $1${NOCOLOR}" + echo -e "${RED}*** $(date): tests.sh | $1${NOCOLOR}" } function run_exec_test { @@ -44,7 +44,7 @@ function run_exec_test { } function run_test_no_coverage { - print_msg "executing no coverage: $@" + print_msg "Executing: $@" python $@ local status=$? if [ $status -ne 0 ]; then @@ -54,11 +54,11 @@ function run_test_no_coverage { } function run_test { - if [[ $(command -v coverage) ]]; then - print_msg "executing with coverage: $@" + if [[ $(command -v coverage) && ${os_type} == "Linux" ]]; then + print_msg "Executing with coverage: $@" coverage run --omit=/usr/* --branch --parallel-mode $@ > /dev/null local status=$? - print_msg "status is ${status}" + print_msg "Returned status is ${status}" if [ $status -ne 0 ]; then exit $status fi @@ -73,7 +73,7 @@ function pip_check_install { if [[ $(uname) == "Linux" ]] ; then os_info=$(cat /etc/*-release) if [[ ${os_info} == *"fedora"* ]]; then - print_msg "custom pip install of $@ for centos" + print_msg "Custom pip install of $@ for CentOS" pip install --install-option="--install-purelib=/usr/lib64/python2.7/site-packages" --no-deps $@ return fi @@ -88,7 +88,12 @@ function pip_check_install { function init_confd { cd $1 print_msg "Initializing confd in $(pwd)" - source $YDKGEN_HOME/../confd/confdrc + confd_rc=$(find ~ -name confdrc) + if [[ -z $confd_rc ]]; then + print_msg "Cannot find confdrc resource file in user file system. Exiting" + exit 1 + fi + source $confd_rc run_exec_test make stop > /dev/null run_exec_test make clean > /dev/null run_exec_test make all > /dev/null @@ -101,28 +106,24 @@ function init_confd_ydktest { } function init_rest_server { - print_msg "starting rest server" + print_msg "Starting REST server" ./test/start_rest_server.sh - print_msg "Rest server started" } function init_tcp_server { - print_msg "starting TCP server" + print_msg "Starting TCP server" ./test/start_tcp_server.sh - print_msg "TCP server started" export TCP_SERVER_PID=$tcp_pid - echo $TCP_SERVER_PID + print_msg "TCP server started with PID: $TCP_SERVER_PID" } function stop_tcp_server { - print_msg "stopping TCP server process id: $TCP_SERVER_PID" + print_msg "Stopping TCP server with PID: $TCP_SERVER_PID" kill $TCP_SERVER_PID } function init_py_env { - print_msg "Initializing python env" - os_type=$(uname) - print_msg "OS: $os_type" + print_msg "Initializing Python environment" if [[ ${os_type} == "Darwin" ]] ; then virtualenv macos_pyenv -p python3.6 source macos_pyenv/bin/activate @@ -131,10 +132,10 @@ function init_py_env { } function init_go_env { - print_msg "Initializing Go env" + print_msg "Initializing Go environment" - print_msg "${GOPATH}" - print_msg "${GOROOT}" + print_msg "GOPATH is set to: ${GOPATH}" + print_msg "GOROOT is set to: ${GOROOT}" export PATH=$PATH:$GOPATH/bin export PATH=$PATH:$GOROOT/bin @@ -146,7 +147,7 @@ function init_go_env { export GOPATH="$(pwd)/golang":$GOPATH fi - print_msg "new: ${GOPATH}" + print_msg "Changed GOPATH setting to: ${GOPATH}" go get github.com/stretchr/testify } @@ -392,19 +393,24 @@ function py_sanity_ydktest_install { function py_sanity_ydktest_test { print_msg "py_sanity_ydktest_test" - cd $YDKGEN_HOME && cp -r gen-api/python/ydktest-bundle/ydk/models/* sdk/python/core/ydk/models - - print_msg "Uninstall ydk py core from pip for testing with coverage" - pip uninstall ydk -y - export OLDPYTHONPATH=$PYTHONPATH - - print_msg "Build & copy cpp-wrapper to sdk directory to gather coverage" cd $YDKGEN_HOME - cd sdk/python/core/ && python setup.py build - print_msg "Set new python path to gather coverage" - export PYTHONPATH=$PYTHONPATH:$(pwd) - cp build/lib*/*.so . - cd - + cp -r gen-api/python/ydktest-bundle/ydk/models/* sdk/python/core/ydk/models + + # Skip coverage tests on MacOS + # + if [[ ${os_type} == "Linux" ]] ; then + print_msg "Uninstall ydk py core from pip for testing with coverage" + pip uninstall ydk -y + export OLDPYTHONPATH=$PYTHONPATH + + print_msg "Build & copy cpp-wrapper to sdk directory to gather coverage" + cd $YDKGEN_HOME + cd sdk/python/core/ && python setup.py build + print_msg "Set new python path to gather coverage" + export PYTHONPATH=$PYTHONPATH:$(pwd) + cp build/lib*/*.so . + cd - + fi run_test sdk/python/core/tests/test_sanity_codec.py @@ -413,15 +419,19 @@ function py_sanity_ydktest_test { stop_tcp_server - print_msg "Restore old python path" - export PYTHONPATH=$OLDPYTHONPATH + # Skip coverage tests on MacOS + # + if [[ ${os_type} == "Linux" ]] ; then + print_msg "Restore old python path" + export PYTHONPATH=$OLDPYTHONPATH - cd sdk/python/core/ - rm -f *.so - print_msg "Restore ydk py core to pip" - pip install dist/ydk*.tar.gz + cd sdk/python/core/ + rm -f *.so + print_msg "Restore ydk py core to pip" + pip install dist/ydk*.tar.gz - cd $YDKGEN_HOME + cd $YDKGEN_HOME + fi } function py_sanity_ydktest_test_netconf_ssh { @@ -630,9 +640,11 @@ function py_test_gen { ###################################### export YDKGEN_HOME="$(pwd)" -print_msg "YDKGEN_HOME is ${YDKGEN_HOME}" -print_msg "python location: $(which python)" -print_msg "$(python -V)" +os_type=$(uname) +print_msg "Running OS type: $os_type" +print_msg "YDKGEN_HOME is set to: ${YDKGEN_HOME}" +print_msg "Python location: $(which python)" +$(python -V) CMAKE_BIN=cmake which cmake3 @@ -666,5 +678,8 @@ cd $YDKGEN_HOME find . -name '*gcda*'|xargs rm -f find . -name '*gcno*'|xargs rm -f find . -name '*gcov*'|xargs rm -f -print_msg "combining python coverage for Linux" -coverage combine > /dev/null || echo "Coverage not combined" + +if [[ ${os_type} == "Linux" ]] ; then + print_msg "Combining Python coverage for Linux" + coverage combine > /dev/null || echo "Coverage not combined" +fi From 5305096bfdac0e02cc9d92b0dfc4a732d338c1af Mon Sep 17 00:00:00 2001 From: Yan Gorelik Date: Mon, 29 Jan 2018 15:00:35 -0800 Subject: [PATCH 20/24] Reverted code changes related to search of confdrc path --- test/tests.sh | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/test/tests.sh b/test/tests.sh index 4c428a8aa..f2002db7f 100755 --- a/test/tests.sh +++ b/test/tests.sh @@ -88,12 +88,7 @@ function pip_check_install { function init_confd { cd $1 print_msg "Initializing confd in $(pwd)" - confd_rc=$(find ~ -name confdrc) - if [[ -z $confd_rc ]]; then - print_msg "Cannot find confdrc resource file in user file system. Exiting" - exit 1 - fi - source $confd_rc + source $YDKGEN_HOME/../confd/confdrc run_exec_test make stop > /dev/null run_exec_test make clean > /dev/null run_exec_test make all > /dev/null From be07e5582fcc71a6ccfa9145c292baadcfa84c41 Mon Sep 17 00:00:00 2001 From: Yan Gorelik Date: Mon, 29 Jan 2018 16:00:56 -0800 Subject: [PATCH 21/24] Reverting function py_sanity_ydktest_test in tests.sh --- test/tests.sh | 44 ++++++++++++++++++-------------------------- 1 file changed, 18 insertions(+), 26 deletions(-) diff --git a/test/tests.sh b/test/tests.sh index f2002db7f..a8daa0baa 100755 --- a/test/tests.sh +++ b/test/tests.sh @@ -391,21 +391,17 @@ function py_sanity_ydktest_test { cd $YDKGEN_HOME cp -r gen-api/python/ydktest-bundle/ydk/models/* sdk/python/core/ydk/models - # Skip coverage tests on MacOS - # - if [[ ${os_type} == "Linux" ]] ; then - print_msg "Uninstall ydk py core from pip for testing with coverage" - pip uninstall ydk -y - export OLDPYTHONPATH=$PYTHONPATH - - print_msg "Build & copy cpp-wrapper to sdk directory to gather coverage" - cd $YDKGEN_HOME - cd sdk/python/core/ && python setup.py build - print_msg "Set new python path to gather coverage" - export PYTHONPATH=$PYTHONPATH:$(pwd) - cp build/lib*/*.so . - cd - - fi + print_msg "Uninstall ydk py core from pip for testing with coverage" + pip uninstall ydk -y + export OLDPYTHONPATH=$PYTHONPATH + + print_msg "Build & copy cpp-wrapper to sdk directory to gather coverage" + cd $YDKGEN_HOME + cd sdk/python/core/ && python setup.py build + print_msg "Set new python path to gather coverage" + export PYTHONPATH=$PYTHONPATH:$(pwd) + cp build/lib*/*.so . + cd - run_test sdk/python/core/tests/test_sanity_codec.py @@ -414,19 +410,15 @@ function py_sanity_ydktest_test { stop_tcp_server - # Skip coverage tests on MacOS - # - if [[ ${os_type} == "Linux" ]] ; then - print_msg "Restore old python path" - export PYTHONPATH=$OLDPYTHONPATH + print_msg "Restore old python path" + export PYTHONPATH=$OLDPYTHONPATH - cd sdk/python/core/ - rm -f *.so - print_msg "Restore ydk py core to pip" - pip install dist/ydk*.tar.gz + cd sdk/python/core/ + rm -f *.so + print_msg "Restore ydk py core to pip" + pip install dist/ydk*.tar.gz - cd $YDKGEN_HOME - fi + cd $YDKGEN_HOME } function py_sanity_ydktest_test_netconf_ssh { From b0ce3b69d75cc68d047838e0e506037819352d25 Mon Sep 17 00:00:00 2001 From: Yan Gorelik Date: Wed, 31 Jan 2018 11:25:22 -0800 Subject: [PATCH 22/24] Added tests when number of typedef statements in Yang model is more than 255 --- .travis.yml | 8 +- profiles/test/ydktest-cpp.json | 1 + .../ydktest-sanity-typedefs@2018-01-30.yang | 6233 +++++++++++++++++ sdk/cpp/tests/test_sanity_codec.cpp | 18 + sdk/go/core/tests/service_codec_test.go | 16 + sdk/python/core/tests/test_sanity_codec.py | 12 + .../ydktest-sanity-typedefs@2018-01-30.yang | 6233 +++++++++++++++++ 7 files changed, 12517 insertions(+), 4 deletions(-) create mode 100644 sdk/cpp/core/tests/models/ydktest-sanity-typedefs@2018-01-30.yang create mode 100644 yang/ydktest/ydktest-sanity-typedefs@2018-01-30.yang diff --git a/.travis.yml b/.travis.yml index f53ac4e4a..7f1e45612 100644 --- a/.travis.yml +++ b/.travis.yml @@ -8,10 +8,10 @@ matrix: dist: trusty go: 1.8 group: edge - - os: osx - osx_image: xcode7.3 - language: generic - go: 1.8 + #- os: osx + # osx_image: xcode7.3 + # language: generic + # go: 1.8 - env: DOCKER=true OS_TYPE=centos OS_VERSION=centos7 - env: DOCKER=true OS_TYPE=ubuntu OS_VERSION=xenial #- env: DOCKER=true OS_TYPE=centos OS_VERSION=centos6.9 #TODO needs more work diff --git a/profiles/test/ydktest-cpp.json b/profiles/test/ydktest-cpp.json index 6479d12be..a33ba6d50 100644 --- a/profiles/test/ydktest-cpp.json +++ b/profiles/test/ydktest-cpp.json @@ -33,6 +33,7 @@ "sdk/cpp/core/tests/models/ydktest-filterread@2015-11-17.yang", "sdk/cpp/core/tests/models/ydktest-sanity-augm@2015-11-17.yang", "sdk/cpp/core/tests/models/ydktest-sanity-submodule@2016-04-25.yang", + "sdk/cpp/core/tests/models/ydktest-sanity-typedefs@2018-01-30.yang", "sdk/cpp/core/tests/models/ydktest-sanity-types@2016-04-11.yang", "sdk/cpp/core/tests/models/ydktest-sanity@2015-11-17.yang", "sdk/cpp/core/tests/models/ydktest-types@2016-05-23.yang", diff --git a/sdk/cpp/core/tests/models/ydktest-sanity-typedefs@2018-01-30.yang b/sdk/cpp/core/tests/models/ydktest-sanity-typedefs@2018-01-30.yang new file mode 100644 index 000000000..f3de84b44 --- /dev/null +++ b/sdk/cpp/core/tests/models/ydktest-sanity-typedefs@2018-01-30.yang @@ -0,0 +1,6233 @@ +module ydktest-sanity-typedefs { + + yang-version 1; + + namespace "http://cisco.com/ns/yang/ydktest-sanity-typedefs"; + + prefix top; + + organization + "Cisco Systems, Inc."; + + contact + "Cisco Systems, Inc. + Customer Service + + Postal: 170 West Tasman Drive + San Jose, CA 95134 + + Tel: +1 800 553-NETS + + E-mail: ydk-admin@cisco.com"; + + description + "This module contains 461 typedef statements copied from NXOS Device YANG Model + The module created to test YDK with newer version of libyang library, + which supports more than 255 typedef statements"; + + revision 2018-01-30 { + description + "Initial Revision. + Generated by ygorelik"; + } + + typedef address_Ipv4 { + type string { + } + } + + typedef address_Ipv6 { + type string { + } + } + + typedef address_Ip { + type union { + type address_Ipv4; + type address_Ipv6; + } + } + + typedef address_Mac { + type string { + } + } + + typedef mtx_array_ifindex { + type string { + } + } + + typedef mtx_array_uint8 { + type string { + } + } + + typedef mtx_array_uint16 { + type string { + } + } + + typedef mtx_array_uint32 { + type string { + } + } + + typedef mtx_array_uint64 { + type string { + } + } + + typedef mtx_array_bit { + type string { + } + } + + typedef mtx_array_community { + type string { + } + } + + typedef aaa_AccountStatus { + type enumeration { + + // Active + enum active { + value 0; + } + + // Inactive + enum inactive { + value 1; + } + } + default "active"; + } + + typedef aaa_BannerMsg { + type string; + } + + typedef aaa_Boolean { + type enumeration { + + // No + enum no { + value 0; + } + + // Yes + enum yes { + value 1; + } + } + default "yes"; + } + + typedef aaa_Clear { + type enumeration { + + // No + enum no { + value 0; + } + + // Yes + enum yes { + value 1; + } + } + default "no"; + } + + typedef aaa_CmdType { + type enumeration { + + // Config + enum config { + value 0; + } + + // Exec + enum exec { + value 1; + } + } + default "config"; + } + + typedef aaa_Date { + type string; + } + + typedef aaa_Delimiter { + type string; + } + + typedef aaa_Email { + type address_Email { + } + } + + typedef aaa_EncKey { + type string { + length "0..240"; + } + } + + typedef aaa_EncryptedArray { + type mtx_array_uint8; + } + + typedef aaa_ExternalUnixUID { + type uint16 { + range "16000..23999"; + } + } + + typedef aaa_HistoryDepth { + type uint8 { + range "0..15"; + } + default "5"; + } + + typedef aaa_IdleTimer { + type uint16 { + range "0..1440"; + } + } + + typedef aaa_KeyEnc { + type enumeration { + + // Clear Text + enum 0 { + value 0; + } + + // Type-6 Encrypted + enum 6 { + value 6; + } + + // Encrypted + enum 7 { + value 7; + } + } + default "0"; + } + + typedef aaa_KeyEncUserPass { + type enumeration { + + // Unspecified + enum unspecified { + value 255; + } + + // Clear Text + enum clear { + value 0; + } + + // Encrypted + enum Encrypt { + value 5; + } + } + } + + typedef aaa_LdapAttribute { + type string { + length "0..63"; + } + } + + // NXOS supports maximum limits in the type definitions + typedef aaa_LdapDn { + type string { + length "0..127"; + } + } + + typedef aaa_LdapFilter { + type string { + length "0..63"; + } + } + + typedef aaa_LdapSSLStrictnessLevel { + type enumeration { + + // Strict + enum strict { + value 0; + } + + // Permissive + enum permissive { + value 1; + } + } + default "strict"; + } + + typedef aaa_LoggingLevel { + type enumeration { + + // Emergency + enum Emergency { + value 0; + } + + // Alert + enum Alert { + value 1; + } + + // Critical + enum Critical { + value 2; + } + + // Error + enum Error { + value 3; + } + + // Warning + enum Warning { + value 4; + } + + // Notifications + enum Notif { + value 5; + } + + // Informational + enum Inform { + value 6; + } + + // Debug + enum Debug { + value 7; + } + } + default "Error"; + } + + typedef aaa_MonitorServerType { + type enumeration { + + // Disabled + enum disabled { + value 0; + } + + // Enabled + enum enabled { + value 1; + } + } + default "disabled"; + } + + typedef aaa_MonitoringPasswordType { + type string; + } + + typedef aaa_MonitoringUserType { + type string { + } + default "test"; + } + + typedef aaa_NoRolePolicy { + type enumeration { + + // No Login + enum no-login { + value 0; + } + + // Assign Default Role + enum assign-default-role { + value 1; + } + } + } + + typedef aaa_Order { + type uint16 { + range "0..16"; + } + } + + typedef aaa_Passwd { + type string { + length "1..127"; + } + } + + typedef aaa_Phone { + type address_Phone; + } + + typedef aaa_Port { + type uint32 { + range "1..65535"; + } + } + + typedef aaa_ProviderGroupDeadtime { + type uint32 { + range "0..1440"; + } + default "0"; + } + + // Limited by NXOS maximum size for server group + typedef aaa_ProviderGroupName { + type string { + length "0..127"; + } + } + + typedef aaa_ProviderGroupProtocol { + type enumeration { + + // TACACS + enum tacacs { + value 0; + } + + // RADIUS + enum radius { + value 1; + } + + // LDAP + enum ldap { + value 2; + } + } + } + + typedef aaa_ProviderGroupSnmpIndex { + type uint32; + } + + typedef aaa_ProviderSnmpIndex { + type uint32; + } + + typedef aaa_ProviderState { + type enumeration { + + // Unknown + enum unknown { + value 0; + } + + // Operable + enum operable { + value 1; + } + + // Inoperable + enum inoperable { + value 2; + } + } + default "unknown"; + } + + typedef aaa_PwdChangeCount { + type uint8 { + range "0..10"; + } + } + + typedef aaa_PwdChangeInterval { + type uint16 { + range "1..745"; + } + } + + typedef aaa_PwdExpWarnTime { + type uint8 { + range "0..30"; + } + } + + typedef aaa_PwdHistory { + type string; + } + + typedef aaa_PwdLen { + type uint32; + } + + typedef aaa_PwdLifeTime { + type uint16 { + range "0..3650"; + } + } + + typedef aaa_PwdPolicy { + type enumeration { + + // Enable + enum enable { + value 0; + } + + // Disable + enum disable { + value 1; + } + } + default "enable"; + } + + typedef aaa_RadPort { + type uint32 { + range "0..65535"; + } + } + + typedef aaa_RadSrvUseType { + type enumeration { + + // Authentication + enum Auth { + value 0; + } + + // Authorization + enum Author { + value 1; + } + + // Accounting + enum Acc { + value 2; + } + + // All + enum All { + value 3; + } + } + default "All"; + } + + typedef aaa_Realm { + type enumeration { + + // Local + enum local { + value 0; + } + + // RADIUS + enum radius { + value 1; + } + + // TACACS+ + enum tacacs { + value 2; + } + + // LDAP + enum ldap { + value 3; + } + } + default "local"; + } + + typedef aaa_Retries { + type uint32 { + range "0..5"; + } + default "1"; + } + + typedef aaa_RuleAccessType { + type enumeration { + + // none + enum none { + value 0; + } + + // Read + enum read { + value 1; + } + + // Read Write + enum read-write { + value 2; + } + + // Command + enum command { + value 3; + } + } + } + + typedef aaa_RuleCmdStrType { + type string { + length "0..128"; + } + } + + typedef aaa_RuleEntityType { + type string { + length "0..512"; + } + } + + typedef aaa_RuleNumberType { + type uint32 { + range "1..256"; + } + } + + typedef aaa_RulePermissionType { + type enumeration { + + // none + enum none { + value 0; + } + + // Permit + enum permit { + value 1; + } + + // Deny + enum deny { + value 2; + } + } + } + + typedef aaa_RuleScopeType { + type enumeration { + + // none + enum none { + value 0; + } + + // Feature + enum feature { + value 2; + } + + // Feature Group + enum feature-group { + value 3; + } + + // OID + enum oid { + value 21; + } + } + } + + typedef aaa_SshData { + type string { + length "0..16384"; + } + } + + typedef aaa_TimeMin { + type uint32 { + range "0..1440"; + } + default "0"; + } + + typedef aaa_TimeSec { + type uint32 { + range "1..60"; + } + default "5"; + } + + typedef aaa_UnixUID { + type uint16 { + range "99..15999"; + } + } + + typedef aaa_UserCertDataType { + type string; + } + + typedef aaa_UserRolePrivType { + type enumeration { + + // No Privilege + enum noDataPriv { + value 0; + } + + // Read Privilege + enum readPriv { + value 1; + } + + // Write Privilege + enum writePriv { + value 2; + } + } + default "noDataPriv"; + } + + typedef aaa_authenticationProtocol { + type enumeration { + + // PAP + enum pap { + value 0; + } + + // CHAP + enum chap { + value 1; + } + + // MS-CHAP + enum mschap { + value 2; + } + + // MS-CHAPv2 + enum mschapv2 { + value 3; + } + + // ASCII + enum ascii { + value 4; + } + } + } + + // Bank type + typedef ac_BankT { + type enumeration { + + // Even + enum even { + value 1; + } + + // Odd + enum Odd { + value 2; + } + } + default "even"; + } + + // Control + typedef ac_Control { + + // bits- Using string + type string; + } + + // ECN + typedef ac_Ecn { + type uint8 { + range "0..2"; + } + default "0"; + } + + // Ether type + typedef ac_EtherT { + type uint16; + } + + // Ip options + typedef ac_IpOpt { + + // bits- Using string + type string; + } + + // MAC + typedef ac_Mac { + type address_Mac; + } + + // Order + typedef ac_Order { + type uint16 { + range "1..1024"; + } + } + + // Payload size + typedef ac_PayloadSz { + type uint8; + } + + // Interface identifier + typedef nw_IfId { + type string; + } + + // Port id + typedef ac_PortId { + type nw_IfId; + } + + // Operational state of HW rules + typedef ac_RuleOperSt { + type enumeration { + + // Pending + enum pending { + value 1; + } + + // Installed + enum installed { + value 2; + } + + // Failed + enum failed { + value 3; + } + } + default "pending"; + } + + typedef acl_ACEStats { + type uint8; + default "0"; + } + + // ACE action type + typedef acl_ActionType { + type enumeration { + + // Invalid + enum invalid { + value 0; + } + + // Permit + enum permit { + value 1; + } + + // Deny + enum deny { + value 2; + } + + // Copy + enum copy { + value 3; + } + + // Divert + enum divert { + value 4; + } + + // Redirect + enum redirect { + value 5; + } + } + default "invalid"; + } + + // Capture Session + typedef acl_CaptureSes { + type uint16 { + range "0..48"; + } + } + + // config State + typedef acl_ConfigState { + type uint8; + default "0"; + } + + // http option (http-method) value enum + typedef acl_HttpOptionType { + type enumeration { + + // get + enum get { + value 1; + } + + // put + enum put { + value 2; + } + + // head + enum head { + value 3; + } + + // post + enum post { + value 4; + } + + // delete + enum delete { + value 5; + } + + // trace + enum trace { + value 6; + } + + // connect + enum connect { + value 7; + } + + // invalid + enum invalid { + value 0; + } + } + } + + // Name of interface, e.g. "Eth1/2" + typedef acl_IfName { + type nw_IfId; + } + + // MAC Protocol + typedef acl_MACProtocol { + + // MAX Converted to int from 0x10000 + type uint32 { + range "0..65536"; + } + default "65536"; + } + + // ACL name + typedef acl_Name { + type string { + length "1..64"; + } + } + + // L4 port relationship operator + typedef acl_Operator { + type uint8; + default "0"; + } + + // Packet Length + typedef acl_PktLen { + type uint16 { + range "19..9210"; + } + } + + // L4 port number + typedef acl_PortNumber { + type uint16; + default "0"; + } + + // ACL name + typedef acl_RemarkStr { + type string { + length "1..100"; + } + } + + // ACE sequence number + typedef acl_SequenceNumber { + type uint32 { + range "0..4294967295"; + } + } + + // TCP Flags Mask + typedef acl_TcpFlagsMask { + type uint8 { + range "0..64"; + } + } + + // TCP option length + typedef acl_TcpOptionLengthType { + type uint32 { + range "0..41"; + } + } + + // time-range name + typedef acl_TimeRangeName { + type string { + length "0..64"; + } + } + + // UDF mask + typedef acl_UdfMask { + type uint16 { + range "0..65535"; + } + } + + // UDF name + typedef acl_UdfName { + type string { + length "1..16"; + } + } + + // UDF value + typedef acl_UdfVal { + type uint16 { + range "0..65535"; + } + } + + // VLAN Acl action type + typedef acl_VAclActionType { + type enumeration { + + // invalid + enum invalid { + value 0; + } + + // forward + enum forward { + value 1; + } + + // drop + enum drop { + value 2; + } + + // redirect + enum redirect { + value 3; + } + } + default "invalid"; + } + + // VLAN Acl action log enable/disable + typedef acl_VAclLog { + type uint8; + default "0"; + } + + // VLAN Acl match acl type + // Refer to CLI_ACL_IP/CLI_ACL_IPV6/CLI_ACL_MAC for values + typedef acl_VAclMatchType { + type uint16; + default "0"; + } + + // Vlan List String for VLAN Acl Policy + typedef acl_VlanListStr { + type string { + length "0..512"; + } + } + + // VLAN + typedef acl_VlanType { + type uint32 { + range "0..4095"; + } + default "4095"; + } + + // nve vni ID + typedef acl_VniType { + type uint32 { + range "0..16777216"; + } + } + + // cos type + typedef acl_cosType { + type uint8 { + range "0..8"; + } + default "8"; + } + + // erspan DSCP + typedef acl_erspanDscpType { + type uint8 { + range "0..64"; + } + default "64"; + } + + // erspan gre protocol + typedef acl_erspanGreType { + type uint32 { + range "0..65536"; + } + default "65536"; + } + + // VLAN Acl policy operation apply/remove + typedef acl_operation { + type uint8; + default "1"; + } + + typedef action_AdminSt { + type enumeration { + + // Unknown + enum unknown { + value 0; + } + + // Start + enum start { + value 1; + } + + // Stop + enum stop { + value 2; + } + + // Suspend + enum suspend { + value 3; + } + } + default "unknown"; + } + + typedef action_Descr { + type string; + } + + // Frequency of the task + typedef action_Freq { + type string; + } + + typedef action_OperSt { + type enumeration { + + // Scheduled + enum scheduled { + value 0; + } + + // Processing + enum processing { + value 1; + } + + // Completed + enum completed { + value 2; + } + + // Cancelled + enum cancelled { + value 3; + } + + // Failed + enum failed { + value 4; + } + + // Indeterminate + enum indeterminate { + value 5; + } + + // Suspended + enum suspended { + value 6; + } + + // Crash-Suspect + enum crashsuspect { + value 7; + } + } + default "scheduled"; + } + + // Task status qualifier + typedef action_Qual { + type string; + } + + // Result history retention size: how many records + // to keep per rule + typedef action_RetentionSize { + type uint16 { + range "1..1024"; + } + default "100"; + } + + // Resuilt history retention time: how long records are + // to be kept per rule + typedef action_RetentionTime { + type string; + } + + // Type of the task + typedef action_Type { + type enumeration { + + // Clear + enum clear { + value 1; + } + + // Reset + enum reset { + value 2; + } + + // Reload + enum reload { + value 3; + } + + // Locate + enum locate { + value 4; + } + + // Install + enum install { + value 5; + } + + // Test + enum test { + value 6; + } + + // Collect + enum collect { + value 7; + } + + // Set Interface In-Service + enum interface-in-service { + value 8; + } + } + default "clear"; + } + + // Global access controls + typedef actrl_AccControl { + + // bits- Using string + type string; + } + + // Rule direction + typedef actrl_Direction { + type enumeration { + + // Uni-directional + enum uni-dir { + value 1; + } + + // Bi-directional + enum bi-dir { + value 2; + } + } + default "uni-dir"; + } + + // Entry priority, this is the priority for entry + typedef actrl_EntryPrio { + type uint8 { + range "1..7"; + } + default "7"; + } + + // Filter id + // @@@ Keep this in sync with vzFltId. + // @@@ Only way to moving FltId from 16 to 32 bits without dropping traffic + // @@@ during upgrade, was to introduce vzFiltId (16 bits) + typedef actrl_FltId { + + // MAX Converted to int from 0xffffffff + type uint32 { + range "1..4294967295"; + } + } + + // Log clear interval + typedef actrl_LogClrIntvl { + type uint16 { + range "1000..2800"; + } + default "2800"; + } + + // Operational state of Rule + typedef actrl_OperSt { + type enumeration { + + // enabled + enum enabled { + value 1; + } + + // disabled + enum disabled { + value 2; + } + } + default "disabled"; + } + + // Reasons for rule being disabled. + typedef actrl_OperStQual { + + // bits- Using string + type string; + } + + // PPF Node id + typedef actrl_PpfNodeId { + + // MAX Converted to int from 0xffffffff + type uint32 { + range "1..4294967295"; + } + } + + // Array PPF Node id + typedef actrl_PpfNodeIdArray { + type mtx_array_uint32; + } + + // Rule id + typedef actrl_RuleId { + + // MAX Converted to int from 0xffffffff + type uint32 { + range "1..4294967295"; + } + } + + // Filter to Rule ID mapping array + typedef actrl_RuleIdArray { + type mtx_array_uint32; + } + + // Rule ID array index + typedef actrl_RuleIndex { + type uint16 { + range "1..1024"; + } + } + + // Rule priority, this is the priority for a set of rules + typedef actrl_RulePrio { + type uint8 { + range "1..11"; + } + } + + // Rule type + typedef actrl_RuleT { + type enumeration { + + // Tenant + enum tenant { + value 1; + } + + // Management + enum mgmt { + value 2; + } + + // SNMP + enum snmp { + value 3; + } + + // Flood + enum bd_flood { + value 4; + } + + // Vrf + enum vrf_default { + value 5; + } + + // Infra + enum infra { + value 6; + } + } + default "tenant"; + } + + // Scope id (24-bit) + typedef actrl_ScopeId { + + // MAX Converted to int from 0xffffff + type uint32 { + range "1..16777215"; + } + default "1"; + } + + // Security Label (12-bit) + typedef actrl_SecLbl { + + // MAX Converted to int from 0xfff + type uint16 { + range "1..4095"; + } + } + + // Subject represents the entitiy to which the capability constraint gets applied + typedef actrlcap_Subj { + type enumeration { + + // Unknown + enum unknown { + value 0; + } + + // Actrl Rules + enum rule-namespace { + value 1; + } + + // Actrl Scopes + enum scope-namespace { + value 2; + } + } + default "unknown"; + } + + typedef address_Email { + type string; + } + + typedef address_HostNameOrDottedQuad { + type string { + length "1..256"; + } + } + + typedef address_Phone { + type string; + } + + // Adjacency Flags + typedef adjacency_AdjFlags { + + // bits- Using string + type string; + } + + // Adjacency operational state + typedef adjacency_AdjOperSt { + type enumeration { + + // Unknown + enum unspecified { + value 0; + } + + // Incomplete + enum incomplete { + value 1; + } + + // Resolved + enum normal { + value 2; + } + } + } + + // Database type + typedef adjacency_DbT { + type enumeration { + + // IP database + enum ip { + value 1; + } + + // IPv6 database + enum ipv6 { + value 2; + } + } + default "ip"; + } + + typedef aggregate_AdminState { + type enumeration { + + // Unknown + enum unknown { + value 0; + } + + // Up + enum up { + value 1; + } + + // Down + enum down { + value 2; + } + } + default "down"; + } + + // Address Family Type + typedef aggregate_AfT { + type enumeration { + + // Ipv4 unicast address family + enum ipv4-ucast { + value 0; + } + + // Vpnv4 unicast address family + enum vpnv4-ucast { + value 1; + } + + // Ipv6 unicast address family + enum ipv6-ucast { + value 2; + } + + // Vpnv6 unicast address family + enum vpnv6-ucast { + value 3; + } + + // L2-Evpn unicast address family + enum l2-evpn { + value 4; + } + } + default "l2-evpn"; + } + + typedef aggregate_BfdStatus { + type enumeration { + + // Unknown + enum unknown { + value 0; + } + + // Admin Down + enum admin_down { + value 1; + } + + // Oper Down + enum down { + value 2; + } + + // Intialization + enum init { + value 3; + } + + // Up + enum up { + value 4; + } + } + default "admin_down"; + } + + typedef aggregate_BooleanFlag { + type enumeration { + + // No + enum no { + value 0; + } + + // Yes + enum yes { + value 1; + } + } + default "no"; + } + + // + // + // + // + // + // + // + // + // + // + // + // + // Bandwidth metric of the SVI in kilobits per second. + typedef aggregate_Bw { + type uint32 { + range "1..400000000"; + } + default "10000000"; + } + + typedef aggregate_ConfTmplStatus { + type enumeration { + + // ConfigTmplInactive + enum inactive { + value 0; + } + + // ConfigTmplOperational + enum active { + value 1; + } + + // ConfigTmplFailed + enum failed { + value 2; + } + } + default "inactive"; + } + + typedef aggregate_ConfigMgmtStatus { + type enumeration { + + // Unknown + enum unknown { + value 0; + } + + // ConfigMgmtReady + enum configMgmtReady { + value 1; + } + + // ConfigMgmtNotReady + enum configMgmtNotReady { + value 2; + } + + // ConfigMgmtPurgeStart + enum configMgmtPurgeStart { + value 4; + } + } + default "configMgmtNotReady"; + } + + typedef aggregate_ConfigSourceType { + type enumeration { + + // Unknown + enum unknown { + value 0; + } + + // Cli + enum cli { + value 1; + } + + // Controller + enum controller { + value 2; + } + } + default "cli"; + } + + typedef aggregate_ConfigStatus { + type enumeration { + + // Unknown + enum unknown { + value 0; + } + + // ConfigReady + enum configReady { + value 1; + } + + // ConfigNotReady + enum configNotReady { + value 2; + } + + // ConfigPurgeInProgress + enum configPurgeInProgress { + value 4; + } + } + default "configNotReady"; + } + + typedef aggregate_ControllerID { + type uint32 { + range "0..16"; + } + default "0"; + } + + typedef aggregate_ControllerIdBitmap { + type mtx_array_bit; + } + + typedef aggregate_CpuType { + type string; + } + + typedef aggregate_CtrlrType { + type enumeration { + + // Unknown + enum unknown { + value 0; + } + + // L2Vxlan + enum l2-vxlan { + value 1; + } + + // Vxlan + enum vxlan { + value 2; + } + } + default "l2-vxlan"; + } + + // Default Value computed from unicast + typedef aggregate_EpType { + + // bits- Using string + type string; + default "unicast"; + } + + typedef aggregate_GroupAddr { + type string; + } + + typedef aggregate_HostReachabilityMode { + type enumeration { + + // Unknown + enum unknown { + value 0; + } + + // FloodAndLearn + enum floodAndLearn { + value 1; + } + + // Controller + enum controller { + value 2; + } + + // Bgp + enum bgp { + value 3; + } + } + default "floodAndLearn"; + } + + typedef aggregate_IngressRepProtocolType { + type enumeration { + + // Unknown + enum unknown { + value 0; + } + + // Static + enum static { + value 1; + } + + // Bgp + enum bgp { + value 2; + } + } + default "unknown"; + } + + typedef aggregate_IntfAssignMode { + type enumeration { + + // Dedicated + enum dedicated { + value 0; + } + + // Shared + enum shared { + value 1; + } + } + } + + typedef aggregate_IntfType { + type enumeration { + + // Unknown + enum unknown { + value 0; + } + + // Port + enum port { + value 1; + } + + // Port Channel + enum port-channel { + value 2; + } + + // Tunnel + enum tunnel { + value 3; + } + + // Loopback + enum loopback { + value 4; + } + + // SVI + enum svi { + value 5; + } + } + } + + typedef aggregate_MTU { + type uint32 { + range "1..9216"; + } + default "9216"; + } + + // Mac type + typedef aggregate_MacType { + type enumeration { + + // Unknown + enum unknown { + value 0; + } + + // Unicast + enum unicast { + value 1; + } + + // Multicast + enum multicast { + value 2; + } + } + default "unicast"; + } + + // Minimum rx interval (in ms) + typedef aggregate_MinRxIntvl { + type uint16 { + range "0..999"; + } + default "50"; + } + + // Minimum tx interval (in ms) + typedef aggregate_MinTxIntvl { + type uint16 { + range "0..999"; + } + default "50"; + } + + typedef aggregate_ModuleType { + type string; + } + + typedef aggregate_OperState { + type enumeration { + + // Unknown + enum unknown { + value 0; + } + + // Up + enum up { + value 1; + } + + // Down + enum down { + value 2; + } + } + default "down"; + } + + typedef aggregate_ReplicationModeType { + type enumeration { + + // Unknown + enum unknown { + value 0; + } + + // ReplicationServer + enum replicationServer { + value 1; + } + + // IngressReplication + enum ingressReplication { + value 2; + } + + // IpMulticast + enum ipMulticast { + value 3; + } + } + default "unknown"; + } + + typedef aggregate_ResourceStatus { + type enumeration { + + // Unknown + enum unknown { + value 0; + } + + // VlanCreated + enum vlanCreated { + value 1; + } + + // VlanFailed + enum vlanFailed { + value 2; + } + + // VnidCreated + enum vnidCreated { + value 3; + } + + // VnidFailed + enum vnidFailed { + value 4; + } + + // VlansCarved + enum vlansCarved { + value 5; + } + + // VlansNotCarved + enum vlansNotCarved { + value 6; + } + + // VnidCreationReceived + enum vnidCreationReceived { + value 7; + } + + // MyTEPIPPublished + enum myTEPIPPublished { + value 101; + } + + // ControllerIntfNotCarved + enum controllerIntfNotCarved { + value 201; + } + + // ControllerIntfCarved + enum controllerIntfCarved { + value 202; + } + } + default "unknown"; + } + + // Route target policy type + typedef aggregate_RttPType { + type enumeration { + + // Import + enum import { + value 1; + } + + // Export + enum export { + value 2; + } + } + default "import"; + } + + typedef aggregate_TunnelType { + type enumeration { + + // Unknown + enum unknown { + value 0; + } + + // VxLanOverIPV4 + enum vxlanipv4 { + value 1; + } + + // VxLanOverIPV6 + enum vxlanipv6 { + value 2; + } + + // NVGRE + enum nvgre { + value 3; + } + } + } + + typedef aggregate_VpcKeepaliveStatus { + type enumeration { + + // VpcOobUnknown + enum VpcOobUnknown { + value 0; + } + + // VpcOobDisabled + enum VpcOobDisabled { + value 1; + } + + // VpcOobPeerAlive + enum VpcOobPeerAlive { + value 2; + } + + // VpcOobPeerNotAlive + enum VpcOobPeerNotAlive { + value 3; + } + + // VpcOobPeerAliveDomainMismatch + enum VpcOobPeerAliveDomainMismatch { + value 4; + } + + // VpcOobSuspended + enum VpcOobSuspended { + value 5; + } + + // VpcOobNotOperational + enum VpcOobNotOperational { + value 6; + } + + // VpcOobSuspendedVrf + enum VpcOobSuspendedVrf { + value 7; + } + + // VpcOobMisconfig + enum VpcOobMisconfig { + value 8; + } + } + default "VpcOobUnknown"; + } + + typedef aggregate_VpcOperStatus { + type enumeration { + + // down + enum down { + value 0; + } + + // up + enum up { + value 1; + } + } + default "down"; + } + + typedef aggregate_VpcPeerLinkStatus { + type enumeration { + + // VpcPeerNolink + enum VpcPeerNolink { + value 0; + } + + // VpcPeerLinkDown + enum VpcPeerLinkDown { + value 1; + } + + // VpcPeerOk + enum VpcPeerOk { + value 2; + } + + // VpcPeerNotfound + enum VpcPeerNotfound { + value 3; + } + } + default "VpcPeerNolink"; + } + + // Fabric Forwarding Mode + typedef aggregate_fabFwdMode { + type enumeration { + + // Standard + enum standard { + value 0; + } + + // Anycast Gateway + enum anycastgw { + value 1; + } + + // ProxyGw + enum proxygw { + value 2; + } + } + default "standard"; + } + + // Database type + typedef aib_DbT { + type enumeration { + + // Adjacency Database + enum adj { + value 1; + } + } + default "adj"; + } + + // Owner type + typedef aib_Owner { + type string; + } + + // Preference type + typedef aib_Pref { + + // MAX Converted to int from 0xffff + type uint16 { + range "1..65535"; + } + default "1"; + } + + // Update time stamp type + typedef aib_UpdateTs { + type string; + } + + // Burst interval shift + typedef analytics_BurstIntvlShift { + type uint8 { + range "0..255"; + } + default "0"; + } + + // Mode + typedef analytics_CModeT { + type enumeration { + + // ACI mode + enum aci { + value 0; + } + + // Standalone mode + enum standalone { + value 1; + } + } + default "aci"; + } + + // Collector buket identifier + typedef analytics_CollBucketId { + type uint8 { + range "1..255"; + } + } + + // Collect Interval + typedef analytics_CollIntvl { + type uint32 { + range "100..64000"; + } + default "100"; + } + + // Collector version + typedef analytics_CollVersion { + type enumeration { + + // Version 5 + enum v5 { + value 1; + } + + // Version 9 + enum v9 { + value 2; + } + + // Cisco proprietary version 1 + enum cisco-v1 { + value 3; + } + } + default "cisco-v1"; + } + + // Collect params + // Default Value computed from src-intf + typedef analytics_CollectParams { + + // bits- Using string + type string; + default "src-intf"; + } + + // Collector identifier + typedef analytics_CollectorId { + type uint32 { + range "0..65535"; + } + } + + // Default filtering policy type + typedef analytics_DefPolicyT { + type enumeration { + + // Permit + enum permit { + value 0; + } + + // Deny + enum deny { + value 1; + } + } + default "permit"; + } + + // Direction type + typedef analytics_DirectionT { + type enumeration { + + // Ingress + enum in { + value 1; + } + + // Egress + enum out { + value 2; + } + + // Both + enum both { + value 3; + } + } + default "in"; + } + + // IP filter type + typedef analytics_FltType { + type enumeration { + + // Ipv4 type + enum ipv4 { + value 1; + } + + // Ipv6 type + enum ipv6 { + value 2; + } + + // CE type + enum ce { + value 3; + } + } + default "ipv4"; + } + + // Forwarding instance target identifier + typedef analytics_FwdInstTargetId { + type uint32 { + range "0..16777215"; + } + } + + // Hash value + typedef analytics_HashT { + type uint32 { + range "0..4294967295"; + } + default "0"; + } + + // Hash width type + typedef analytics_HashWidthT { + type uint16 { + range "1..255"; + } + default "12"; + } + + // IP packet identifier shift + typedef analytics_IpPktIdShift { + type uint8 { + range "0..255"; + } + default "0"; + } + + // Layer4 port + typedef analytics_L4Port { + type uint32 { + range "1..65535"; + } + } + + // Match params + // Default Value computed from src-ipv4 + typedef analytics_MatchParams { + + // bits- Using string + type string; + default "src-ipv4"; + } + + // Mode + typedef analytics_ModeT { + type enumeration { + + // Analytics mode + enum analytics { + value 0; + } + + // Netflow mode + enum netflow { + value 1; + } + } + default "netflow"; + } + + // MTU + typedef analytics_Mtu { + type uint16 { + range "576..9216"; + } + default "1500"; + } + + // Operational state of Rule + typedef analytics_OperSt { + type enumeration { + + // enabled + enum enabled { + value 1; + } + + // disabled + enum disabled { + value 2; + } + } + default "disabled"; + } + + // Reasons for rule being disabled. + typedef analytics_OperStQual { + + // bits- Using string + type string; + } + + // Payload length identifier + typedef analytics_PayloadLenIdT { + type uint8 { + range "0..10"; + } + } + + // Payload length + typedef analytics_PayloadLenT { + + // MAX Converted to int from 0x3fff + type uint32 { + range "0..16383"; + } + default "0"; + } + + // Receive window size identifier + typedef analytics_RcvWindowSzIdT { + type uint8 { + range "0..4"; + } + } + + // Receive window size + typedef analytics_RcvWindowSzT { + type uint32 { + range "0..65535"; + } + default "0"; + } + + // Sample size + typedef analytics_SampleSzT { + type uint32 { + range "1..65535"; + } + default "1"; + } + + // Sampler mode + typedef analytics_SamplerMode { + type enumeration { + + // M out of N flows + enum flow { + value 1; + } + + // M out of N pkts + enum pkts { + value 2; + } + } + default "flow"; + } + + // TCP options header length identifier + typedef analytics_TCPOptHdrLenIdT { + type uint8 { + range "0..6"; + } + } + + // TCP options header length + typedef analytics_TCPOptHdrLenT { + type uint32 { + range "0..15"; + } + default "0"; + } + + // Sequence number guess threshold + typedef analytics_ThresholdT { + type uint32 { + range "0..4294967295"; + } + default "0"; + } + + // Create Count + typedef analytics_createCount { + type uint32 { + range "0..16777215"; + } + default "0"; + } + + // Hit Count + typedef analytics_hitCount { + type uint32 { + range "0..16777215"; + } + default "0"; + } + + // Num tcam entries type + typedef analytics_numTcamEntT { + type uint32 { + range "1..65535"; + } + default "1024"; + } + + // Num tcam entries per V4 type + typedef analytics_numTcamEntV4T { + type uint16 { + range "1..256"; + } + default "1"; + } + + // Num tcam entries per V6 type + typedef analytics_numTcamEntV6T { + type uint16 { + range "1..256"; + } + default "4"; + } + + // Adjacency Flags + typedef arp_AdjFlags { + + // bits- Using string + type string; + } + + // Adjacency operational state + typedef arp_AdjOperSt { + type enumeration { + + // Unknown + enum unspecified { + value 0; + } + + // Incomplete + enum incomplete { + value 1; + } + + // Resolved + enum normal { + value 2; + } + } + } + + typedef arp_AdjRouteDist { + type uint32 { + range "2..250"; + } + default "250"; + } + + // ARP Cache Limit + typedef arp_ArpCacheLimit { + type uint32 { + range "1..614400"; + } + default "174080"; + } + + // ARP Cache Syslog Rate + typedef arp_ArpCacheSyslogRate { + type uint32 { + range "1..1000"; + } + default "1"; + } + + // Config Error + typedef arp_ConfigErr { + + // bits- Using string + type string; + } + + // Config Error Inst MO + typedef arp_ConfigErrInst { + + // bits- Using string + type string; + } + + // Database type + typedef arp_DbT { + type enumeration { + + // IP database + enum ip { + value 1; + } + + // SupCache database + enum supcache { + value 2; + } + } + default "ip"; + } + + // Event History Size + typedef arp_EventLogSize { + type enumeration { + + // Disable + enum disabled { + value 0; + } + + // Small + enum small { + value 1; + } + + // Medium + enum medium { + value 2; + } + + // Large + enum large { + value 3; + } + } + default "small"; + } + + // Event Log Type + typedef arp_EventType { + type enumeration { + + // CLI Events + enum cli { + value 0; + } + + // Client Events + enum client-events { + value 1; + } + + // Client Errors + enum client-errors { + value 2; + } + + // Control Events + enum control-events { + value 3; + } + + // Internal Events + enum internal-events { + value 4; + } + + // Internal Errors + enum internal-errors { + value 5; + } + + // High Availability Events + enum high-availability { + value 6; + } + + // IP Sync Events + enum ip-sync { + value 7; + } + + // ARP Local Cache Events + enum local-cache-events { + value 8; + } + + // ARP Local Cache Errors + enum local-cache-errors { + value 9; + } + + // Packet Messages Logs + enum pkt-messages { + value 10; + } + + // SNMP Events + enum snmp { + value 11; + } + + // ARP Suppression Events + enum suppress-events { + value 12; + } + + // ARP Suppression Errors + enum suppress-errors { + value 13; + } + + // Sync Event Logs + enum sync { + value 14; + } + + // Controller MAC-IP route error logs + enum arp-controller-errors { + value 15; + } + + // DME debug event + enum arp-dme-event { + value 16; + } + + // Adjacency Control Logs + enum adjacency-control { + value 101; + } + + // Adjacency Error Logs + enum adjacency-errors { + value 102; + } + + // Adjacency IPC Logs + enum adjacency-ipc-events { + value 103; + } + + // Adjacency Stats Logs + enum adjacency-stats { + value 104; + } + + // Adjacency High Availability Logs + enum adjacency-high-availability { + value 105; + } + + // Adjacency CLI Logs + enum adjacency-cli { + value 106; + } + + // Adjacency SDB Logs + enum adjacency-sdb { + value 107; + } + + // Adjacency SNMP Logs + enum adjacency-snmp { + value 108; + } + + // Adjacency Net Broker Logs + enum adjacency-netbroker { + value 109; + } + + // Adjacency DME event debugs + enum am-dme-event { + value 110; + } + + // Adjacency event debugs + enum am-event { + value 111; + } + } + } + + // Logging Level + typedef arp_LoggingLevel { + type enumeration { + + // Emergency + enum emergency { + value 0; + } + + // Alert + enum alert { + value 1; + } + + // Critical + enum critical { + value 2; + } + + // Error + enum error { + value 3; + } + + // Warning + enum warning { + value 4; + } + + // Notification + enum notification { + value 5; + } + + // Informational + enum informational { + value 6; + } + + // Debug + enum debug { + value 7; + } + } + default "error"; + } + + // MAC Delete adjaceny refresh timeout + typedef arp_MacDelTimeout { + type uint16; + } + + // Max packet count + typedef arp_MaxPacket { + type uint32 { + range "0..32767"; + } + default "1000"; + } + + // ARP off list timeout + typedef arp_OffListTimeout { + type uint16 { + range "180..1800"; + } + default "180"; + } + + // Opcode + typedef arp_Opcode { + type enumeration { + + // Unspecified + enum unspecified { + value 0; + } + + // ARP request + enum req { + value 1; + } + + // ARP reply + enum reply { + value 2; + } + } + default "unspecified"; + } + + // RARP Fabric Forwarding Rate Limit + typedef arp_RarpForwadingRate { + type uint16 { + range "200..400"; + } + default "200"; + } + + // Static Adjacency operational state + typedef arp_StAdjOperSt { + type enumeration { + + // Down + enum down { + value 0; + } + + // Incomplete + enum up { + value 1; + } + + // Unspecified + enum unspecified { + value 10; + } + } + default "unspecified"; + } + + // Static Adjacency operational state qualifier + typedef arp_StAdjOperStQual { + type enumeration { + + // Unspecified + enum unspecified { + value 0; + } + + // Subnet mismatch + enum subnet-mismatch { + value 1; + } + + // Invalid MAC + enum invalid-mac { + value 2; + } + + // Invalid IP + enum invalid-ip { + value 3; + } + + // Invalid VRF + enum invalid-vrf { + value 4; + } + + // Own MAC + enum own-mac { + value 5; + } + + // Interface down + enum if-down { + value 6; + } + + // Up + enum up { + value 7; + } + + // Invalid Interface + enum invalid-if { + value 8; + } + + // Invalid CLI Data + enum invalid-clidata { + value 9; + } + + // No Memory + enum no-memory { + value 10; + } + } + default "unspecified"; + } + + // Suppression Cache flag + typedef arp_SupCacheFlag { + + // bits- Using string + type string; + } + + // Suppression ARP Mode + typedef arp_SuppressArpMode { + type enumeration { + + // Disabled + enum disabled { + value 0; + } + + // L2SuppressARP + enum l2suppressarp { + value 1; + } + + // L2L3SuppressARP + enum l2l3suppressarp { + value 2; + } + + // Invalid + enum invalid { + value 3; + } + } + } + + // ARP suppress timeout + typedef arp_SuppressionTimeout { + type uint16 { + range "0..28800"; + } + default "0"; + } + + // Syslog threshold + typedef arp_SyslogCnt { + type uint32 { + range "0..65535"; + } + default "10000"; + } + + // throttle timeout + typedef arp_ThrottleTimeout { + type uint16 { + range "300..1800"; + } + default "300"; + } + + // ARP timeout + typedef arp_Timeout { + type uint16 { + range "60..28800"; + } + default "1500"; + } + + // Default SVI autoState + typedef bd_DefaultSVIAutoState { + type enumeration { + enum disable { + value 0; + } + enum enable { + value 1; + } + } + default "enable"; + } + + // Address family type + typedef bfd_AfT { + type enumeration { + + // IPv4 address family + enum ipv4 { + value 1; + } + + // IPv6 address family + enum ipv6 { + value 2; + } + } + default "ipv4"; + } + + // Application private data + typedef bfd_AppData { + type mtx_array_uint8; + } + + // Application session flags + typedef bfd_AppFlags { + + // bits- Using string + type string; + } + + // Application ID + typedef bfd_AppId { + type uint32; + } + + // Authentication hex key + typedef bfd_AuthHexKey { + type mtx_array_uint8; + } + + // Authentication hex key size + typedef bfd_AuthHexKeySize { + type uint8 { + range "0..40"; + } + } + + // Authentication key + typedef bfd_AuthKey { + type string { + length "min..20"; + } + } + + // Authentication key id + typedef bfd_AuthKeyId { + type uint8 { + range "1..255"; + } + } + + // Authentication Sequence Number + typedef bfd_AuthSeqno { + type uint32; + } + + // Authentication type + typedef bfd_AuthT { + type enumeration { + + // No authentication + enum none { + value 0; + } + + // Keyed SHA1 + enum sha1 { + value 4; + } + + // Met Keyed SHA1 + enum met-sha1 { + value 5; + } + } + default "none"; + } + + // Current session index + typedef bfd_CurSessIndex { + type uint32; + } + + // Detection multiplier + typedef bfd_DetectMult { + type uint8 { + range "1..50"; + } + default "3"; + } + + // Diag Code + typedef bfd_DiagCode { + type enumeration { + + // No Diagnostic + enum none { + value 0; + } + + // Control Detection Time Expired + enum detect-timeout { + value 1; + } + + // Echo Function Failed + enum echo-fail { + value 2; + } + + // Neighbor Signaled Session Down + enum nbr-signal-down { + value 3; + } + + // Forwarding Plane Reset + enum fwd-plane-reset { + value 4; + } + + // Path Down + enum path-down { + value 5; + } + + // Concatenated Path Down + enum concat-path-down { + value 6; + } + + // Administratively Down + enum admin-down { + value 7; + } + + // Reverse Concatenated Path Down + enum rev-concat-path-down { + value 8; + } + } + } + + // Session discriminator + typedef bfd_Discr { + type uint32; + } + + // echo rx interval (in ms) + typedef bfd_EchoRxIntvl { + type uint16 { + range "0..999"; + } + default "0"; + } + + typedef bfd_IfControl { + + // bits- Using string + type string; + } + + // Interface Detection multiplier + typedef bfd_IfDetectMult { + type uint8 { + range "0..50"; + } + default "0"; + } + + // Interface Minimum rx interval (in ms) + typedef bfd_IfMinRxIntvl { + type uint16 { + range "0..999"; + } + default "0"; + } + + // Interface Minimum tx interval (in ms) + typedef bfd_IfMinTxIntvl { + type uint16 { + range "0..999"; + } + default "0"; + } + + // Global flags + typedef bfd_InstFlags { + + // bits- Using string + type string; + } + + // Minimum rx interval (in ms) + typedef bfd_MinRxIntvl { + type uint16 { + range "50..999"; + } + default "50"; + } + + // Minimum tx interval (in ms) + typedef bfd_MinTxIntvl { + type uint16 { + range "50..999"; + } + default "50"; + } + + // Oper State + typedef bfd_OperSt { + type enumeration { + + // AdminDown + enum admin-down { + value 0; + } + + // Down + enum down { + value 1; + } + + // Init + enum init { + value 2; + } + + // Up + enum up { + value 3; + } + } + } + + // Packet flags + typedef bfd_PktFlags { + + // bits- Using string + type string; + } + + // Packet Interval (in ms) + typedef bfd_PktInterval { + type uint32; + } + + // Application sap ID + typedef bfd_SapId { + type uint32; + } + + // Slow interval (in ms) + typedef bfd_SlowIntvl { + type uint16 { + range "1000..30000"; + } + default "2000"; + } + + // BFD Start timeout + // Default Value "0" Removed - out of range 60..3600 + typedef bfd_StTm { + type uint32 { + range "60..3600"; + } + } + + // Startup interval (in second) + typedef bfd_StartupIntvl { + type uint16 { + range "0..30"; + } + default "5"; + } + + // BFD Cfg State + typedef bfd_TrkMbrLnk { + type enumeration { + + // Enabled + enum enable { + value 1; + } + + // Disabled + enum disable { + value 0; + } + } + default "disable"; + } + + // Additional Paths capability in DomAf + typedef bgp_AddlPathCapT { + + // bits- Using string + type string; + } + + // Administrative state + typedef bgp_AdminSt { + type enumeration { + + // Enabled + enum enabled { + value 1; + } + + // Disabled + enum disabled { + value 2; + } + } + default "disabled"; + } + + // Advertisement Interval + typedef bgp_AdvInterval { + type uint16 { + range "0..600"; + } + } + + // Advertise l2vpn evpn + typedef bgp_AdvertL2vpnEvpn { + type enumeration { + + // Enabled + enum enabled { + value 1; + } + + // Disabled + enum disabled { + value 0; + } + } + default "disabled"; + } + + typedef bgp_AdvtMapCondition { + type enumeration { + + // no options + enum none { + value 0; + } + + // Exist Route Map + enum exist { + value 1; + } + + // Non-Exist Route Map + enum non-exist { + value 2; + } + } + default "none"; + } + + // Address family type + typedef bgp_AfT { + type enumeration { + + // IPv4 unicast address family + enum ipv4-ucast { + value 1; + } + + // IPv4 multicast address family + enum ipv4-mcast { + value 2; + } + + // Vpnv4 unicast address family + enum vpnv4-ucast { + value 3; + } + + // IPv6 unicast address family + enum ipv6-ucast { + value 5; + } + + // IPv6 multicast address family + enum ipv6-mcast { + value 6; + } + + // Vpnv6 unicast address family + enum vpnv6-ucast { + value 7; + } + + // L2Vpn EVpn address family + enum l2vpn-evpn { + value 9; + } + + // IPv4 labeled unicast address family + enum ipv4-lucast { + value 10; + } + + // IPv6 labeled unicast address family + enum ipv6-lucast { + value 11; + } + + // Link state address family + enum lnkstate { + value 12; + } + + // IPv4 mvpn address family + enum ipv4-mvpn { + value 13; + } + + // IPv6 mvpn address family + enum ipv6-mvpn { + value 14; + } + + // L2Vpn vpls address family + enum l2vpn-vpls { + value 15; + } + + // IPv4 mdt address family + enum ipv4-mdt { + value 16; + } + } + default "ipv4-ucast"; + } + + // Activate the affinity group + typedef bgp_AffGrpActv { + type uint16 { + range "0..65535"; + } + } + + // AS path database size + typedef bgp_AsPathDbSz { + type uint32; + } + + // AS segment type + typedef bgp_AsSegT { + type enumeration { + + // Sequence + enum sequence { + value 1; + } + + // Set + enum set { + value 2; + } + } + default "set"; + } + + // AS Set + typedef bgp_AsSet { + type enumeration { + + // Enabled + enum enabled { + value 1; + } + + // Disabled + enum disabled { + value 0; + } + } + default "disabled"; + } + + // Asn number + typedef bgp_AsnNum { + type string; + } + + // Customizes AS_PATH attribute for routes received from eBGP neighbor + typedef bgp_AsnPropagation { + type enumeration { + + // no options + enum none { + value 0; + } + + // no-prepend + enum no-prepend { + value 1; + } + + // no-prepend+replace-as + enum replace-as { + value 2; + } + + // noPrepend+replace-as+dual-as + enum dual-as { + value 3; + } + } + default "none"; + } + + // Attribute database size + typedef bgp_AttribDbSz { + type uint32; + } + + // BestPath Timeout Limit + typedef bgp_BestPathIntvl { + type uint16 { + range "1..3600"; + } + default "300"; + } + + // BMP server state + typedef bgp_BmpSt { + type enumeration { + + // Enabled + enum enabled { + value 0; + } + + // Disabled + enum disabled { + value 1; + } + } + default "enabled"; + } + + // Additional Paths capability in Neighbor Af + typedef bgp_CapAddlPathCapT { + + // bits- Using string + type string; + } + + // Capability type + typedef bgp_CapT { + + // bits- Using string + type string; + } + + // Cluster ID + typedef bgp_ClusterId { + type string; + } + + // Connection Attempts + typedef bgp_ConnAttempts { + type uint32; + default "0"; + } + + // Connection info + typedef bgp_ConnMode { + + // bits- Using string + type string; + } + + // BGP Distance + typedef bgp_Distance { + type uint16 { + range "1..255"; + } + } + + // VRF Id + typedef bgp_DomId { + type uint32; + } + + // Domain operational state + typedef bgp_DomOperSt { + type enumeration { + + // Unknown + enum unknown { + value 0; + } + + // Up + enum up { + value 1; + } + + // Down + enum down { + value 2; + } + } + default "unknown"; + } + + // Egress Peer Engineering EPE for neighbor status + typedef bgp_EgressPeerEng { + type enumeration { + + // Disabled + enum none { + value 0; + } + + // Egress Peer Engineering Enabled + enum enabled { + value 1; + } + + // Advertise Adjacency-SIDs for multi-hop neighbor paths + enum enabled-adj-sid { + value 2; + } + } + default "none"; + } + + // Event History Buffer Type + typedef bgp_EhType { + type enumeration { + enum none { + value 0; + } + + // Cli buffer + enum cli { + value 1; + } + + // Events buffer + enum events { + value 2; + } + + // Periodic buffer + enum periodic { + value 3; + } + + // Detailed buffer + enum detail { + value 4; + } + + // Errors buffer + enum errors { + value 5; + } + + // Objstore buffer + enum objstore { + value 6; + } + } + default "none"; + } + + // EVPN route-type + typedef bgp_EvpnRtType { + type enumeration { + + // Unspecified + enum none { + value 0; + } + + // Ethernet Auto-Discovery route + enum a-d { + value 1; + } + + // MAC/IP Advertisement route + enum mac-ip { + value 2; + } + + // Inclusive Multicast Ethernet Tag route + enum imet { + value 3; + } + + // Ethernet Segment route + enum eth-seg { + value 4; + } + + // IP Prefix route + enum ip-pfx { + value 5; + } + } + default "none"; + } + + // Graceful restart controls + // Default Value computed from complete + typedef bgp_GrCtrl { + + // bits- Using string + type string; + default "complete"; + } + + // Graceful restart interval + typedef bgp_GrIntvl { + type uint16 { + range "1..3600"; + } + default "120"; + } + + // Graceful stale interval + typedef bgp_GrStaleIntvl { + type uint16 { + range "1..3600"; + } + default "300"; + } + + // Hold Interval + typedef bgp_HoldIntvl { + type uint16 { + range "3..3600"; + } + default "180"; + } + + // IGP Preference + typedef bgp_IgpPref { + type uint8; + } + + // IGP Route Type + typedef bgp_IgpRtType { + type uint8; + } + + // Inherit template peer control bits. This contains common fields of peer and peer-session templates (please refer to + // MOs PeerCont and SessionCont). + typedef bgp_InheritContPeerCtrlType { + + // bits- Using string + type string; + } + + // Inherit template peer-policy control bits. (Please refer + // to MO PolicyCont). + typedef bgp_InheritContPeerPolicyCtrlType { + + // bits- Using string + type string; + } + + // Keepalive Interval + typedef bgp_KaIntvl { + type uint16 { + range "0..3600"; + } + default "60"; + } + + // Last error len + typedef bgp_LastErrLen { + type uint8; + } + + // Last error value + typedef bgp_LastErrVal { + type uint32; + } + + // NH iLast Resolved Timestamp + typedef bgp_LastResolvTs { + type string; + default "0"; + } + + // Label + typedef bgp_Lbl { + type uint32; + default "0"; + } + + // Link Attribute TLV flags for Link-state + // Default Value computed from none + typedef bgp_LnkLsAttrFlags { + + // bits- Using string + type string; + default "none"; + } + + // Log Neighbor changes + typedef bgp_LogNbrSt { + type enumeration { + + // none + enum none { + value 0; + } + + // Enable + enum enable { + value 1; + } + + // Disable + enum disable { + value 2; + } + } + default "none"; + } + + // Link-State status + typedef bgp_LsAdminSt { + type enumeration { + + // Inactive + enum inactive { + value 0; + } + + // Active + enum active { + value 1; + } + } + default "inactive"; + } + + // Link-State attribute entry type + typedef bgp_LsAttrEntryType { + type enumeration { + + // Unspecified + enum none { + value 0; + } + + // Peer Node Segment Identifier + enum peer-node-sid { + value 1101; + } + + // Peer Adjacency Segment Identifier + enum peer-adj-sid { + value 1102; + } + + // Peer Set Segment Identifier + enum peer-set-sid { + value 1103; + } + } + default "none"; + } + + // Link-State NLRI Type + typedef bgp_LsNlriType { + type enumeration { + + // Unspecified + enum none { + value 0; + } + + // Node NLRI + enum node { + value 1; + } + + // Link NLRI + enum link { + value 2; + } + + // IPv4 Topology Prefix NLRI + enum ipv4-topo { + value 3; + } + + // IPv6 Topology Prefix NLRI + enum ipv6-topo { + value 4; + } + } + default "none"; + } + + // Link-State Protocol Identifier + typedef bgp_LsProtoId { + type enumeration { + + // Unspecified + enum none { + value 0; + } + + // IS-IS Level 1 + enum isis-l1 { + value 1; + } + + // IS-IS Level 2 + enum isis-l2 { + value 2; + } + + // OSPFv2 + enum ospf-v2 { + value 3; + } + + // Direct + enum direct { + value 4; + } + + // Static configuration + enum static { + value 5; + } + + // OSPFv3 + enum ospf-v3 { + value 6; + } + + // Egress Peer Engineering + enum epe { + value 7; + } + } + default "none"; + } + + // Major notify error + typedef bgp_MajNotifErr { + type enumeration { + + // None + enum none { + value 0; + } + + // Header Error + enum hdr-err { + value 1; + } + + // Open Message Error + enum open-msg-err { + value 2; + } + + // Update Message Error + enum upd-msg-err { + value 3; + } + + // Holdtimer Expired + enum hold-timer-exp { + value 4; + } + + // FSM Error + enum fsm-err { + value 5; + } + + // Cease Error + enum cease-err { + value 6; + } + + // Capability Message Error + enum cap-msg-err { + value 7; + } + + // Process Restart Error + enum process-restart-err { + value 101; + } + + // FD Read Error + enum fd-read-err { + value 102; + } + + // FD Ioctl Error + enum fd-ioctl-err { + value 103; + } + + // Peer Closed Session Error + enum peer-close-sess-err { + value 104; + } + + // Peer Received Notification Error + enum rcvd-notif-err { + value 105; + } + + // Received Duplicate Connection Request + enum rcvd-dup-conn-req { + value 106; + } + + // Dynamic Capability no Buffer + enum dyn-cap-no-buf { + value 107; + } + } + } + + // Maximum AS Limit + typedef bgp_MaxAsLimit { + type uint16 { + range "0..512"; + } + } + + // Maximum Ecmp + typedef bgp_MaxEcmp { + type uint8 { + range "1..64"; + } + default "1"; + } + + // Maximum Peers + typedef bgp_MaxPeerCnt { + type uint32 { + range "0..1000"; + } + } + + // Maximum Prefix + typedef bgp_MaxPfx { + type uint32; + } + + // Action when the prefixes crosses the maximum limit + typedef bgp_MaxPfxAct { + type enumeration { + + // Log + enum log { + value 1; + } + + // Shutdown + enum shut { + value 2; + } + + // Restart + enum restart { + value 3; + } + } + default "shut"; + } + + // Duration before we restart the peer when the maximum + // prefix limit is reached + typedef bgp_MaxPfxDuration { + + // MAX Converted to int from 0xffff + type uint16 { + range "0..65535"; + } + } + + // Threshold at which warning is issued when number of prefixes + // crosses the threshold, units in percentage + typedef bgp_MaxPfxThresh { + type uint8 { + range "0..100"; + } + } + + // MED dampening interval + typedef bgp_MedIntvl { + type uint32 { + range "0..4294967295"; + } + } + + // Memory consumed (in bytes) + typedef bgp_MemConsumed { + type uint32; + } + + // Metric + typedef bgp_Metric { + type uint32; + } + + // Minor notify error + typedef bgp_MinNotifErr { + type enumeration { + + // None + enum none { + value 0; + } + + // Unspecified Msg Header Error + enum unspecified-msg-hdr-err { + value 1; + } + + // Connection not Synchronized + enum conn-not-synced { + value 2; + } + + // Bad Message Length + enum bad-msg-len { + value 3; + } + + // Bad Message Type + enum bad-msg-type { + value 4; + } + + // Unknown Message Header Error + enum unknown-msg-hdr-err { + value 5; + } + + // Unspecified Open Error + enum unspecified-open-err { + value 6; + } + + // Unsupported Version + enum unsupp-version { + value 7; + } + + // Bad Peer AS + enum bad-peer-as { + value 8; + } + + // Bad Peer Router ID + enum bad-peer-rtrid { + value 9; + } + + // Unsupported Optional Parameter + enum unsupp-opt-param { + value 10; + } + + // Authentication Error + enum auth-err { + value 11; + } + + // Unacceptable Holdtime + enum bad-holdtime { + value 12; + } + + // Unsupported Capability + enum unsupp-cap { + value 13; + } + + // Unknown Open Header Error + enum unknown-open-hdr-err { + value 14; + } + + // Unspecified Update Error + enum unspecified-update-err { + value 15; + } + + // Malformed Attribute List + enum malformed-attr-list { + value 16; + } + + // Unrecognized Wellknown Attr + enum unrecognized-wellknown-attr { + value 17; + } + + // Missing Well-known Attribute + enum missing-wellknown-attr { + value 18; + } + + // Attribute Flags Error + enum attr-flags-err { + value 19; + } + + // Attribute Length Error + enum attr-len-err { + value 20; + } + + // Invalid Origin Attribute + enum invalid-origin-attr { + value 21; + } + + // Bgp AS Routing Loop Error + enum as-loop-err { + value 22; + } + + // Invalid Next-hop Attribute + enum invalid-nh-attr { + value 23; + } + + // Optional Attribute Error + enum opt-attr-err { + value 24; + } + + // Invalid Network Field + enum invalid-nw-field { + value 25; + } + + // Malformed AS Path + enum bad-as-path { + value 26; + } + + // Unknown Update Header Error + enum unknown-update-hdr-err { + value 27; + } + + // Unspecified Cease Error + enum unspecified-cease-err { + value 28; + } + + // Maximum Prefix Count + enum max-pfx-count-err { + value 29; + } + + // Administratively Shutdown + enum admin-shut { + value 30; + } + + // Peer Deconfigured + enum peer-decfg { + value 31; + } + + // Session Cleared + enum session-cleared { + value 32; + } + + // Connection Rejected + enum conn-rej { + value 33; + } + + // Other Configuration Change Error + enum other-cfg-chg { + value 34; + } + + // Connection Collision Resolution + enum conn-coll-resolution { + value 35; + } + + // Out of Resource + enum out-of-rsrc { + value 36; + } + + // Dynamic Capability Configuration Change + enum dyn-cap-cfg-chg { + value 37; + } + + // TTL Configuration Change + enum ttl-cfg-chg { + value 38; + } + + // TTL Security Configuration Change + enum ttl-security-cfg-chg { + value 39; + } + + // Passive Neighbor Configuration Change + enum passive-neighbor-cfg-chg { + value 40; + } + + // Address-family Configuration Change + enum af-cfg-chg { + value 41; + } + + // Route-reflector Configuration Change + enum rr-cfg-chg { + value 42; + } + + // Router-id Configuration Change + enum rtrid-cfg-chg { + value 43; + } + + // Confederation Id Change + enum confed-id-chg { + value 44; + } + + // Confederation Membership Change + enum confed-membership-change { + value 45; + } + + // Graceful-restart Configuration Change + enum gr-cfg-chg { + value 46; + } + + // Soft-reconfiguration Change + enum soft-recfg-chg { + value 47; + } + + // Update-source Interface Change + enum updatesrc-if-chg { + value 48; + } + + // Local-as Change + enum localas-chg { + value 49; + } + + // Unknown Cease Error + enum unknown-cease-err { + value 50; + } + + // Unspecified Cappability Message Error + enum unspecified-cap-msg-err { + value 51; + } + + // Unknown Sequence Number + enum unknown-seq-num { + value 52; + } + + // Invalid Capability Length + enum invalid-cap-len { + value 53; + } + + // Malformed Capability Value + enum bad-cap-val { + value 54; + } + + // Unsupported Capability Code + enum unsupp-cap-code { + value 55; + } + + // Unknown Capability Error + enum unknown-cap-err { + value 56; + } + } + } + + // Mode + typedef bgp_Mode { + type enumeration { + + // Fabric + enum fabric { + value 1; + } + + // External + enum external { + value 2; + } + } + default "fabric"; + } + + // MCAST-VPN NLRI route-type + typedef bgp_MvpnRtType { + type enumeration { + + // Unspecified + enum none { + value 0; + } + + // Multicast Inter-AS PMSI Auto Discovery route + enum interas-ipmsi-ad { + value 1; + } + + // Multicast Intra-AS PMSI Auto Discovery route + enum intraas-ipmsi-ad { + value 2; + } + + // Multicast S-PMSI Auto Discovery route + enum spmsi-ad { + value 3; + } + + // Multicast Leaf Auto Discovery route + enum leaf-ad { + value 4; + } + + // Multicast Source-Active Auto Discovery route + enum sa-ad { + value 5; + } + + // Shared C-Multicast route + enum shared-c-mcast { + value 6; + } + + // Source C-Multicast route + enum source-c-mcast { + value 7; + } + } + default "none"; + } + + // NH Next Advertised Timestamp + typedef bgp_NextAdvTs { + type string; + default "0"; + } + + // Nexthop flags + typedef bgp_NhFlags { + + // bits- Using string + type string; + } + + // Link Attribute TLV flags for Link-state + // Default Value computed from none + typedef bgp_NodeLsAttrFlags { + + // bits- Using string + type string; + default "none"; + } + + // Number of paths + typedef bgp_NumPaths { + type uint32; + } + + // Number of Peers + typedef bgp_NumPeers { + type uint32; + } + + // Order (for AS path segments and AS path items) + typedef bgp_Order { + type uint16; + } + + // Origin + typedef bgp_Origin { + type enumeration { + + // Learned Via IGP + enum igp { + value 1; + } + + // Learned Via EGP + enum egp { + value 2; + } + + // Learned by some other Means + enum incomplete { + value 3; + } + } + default "igp"; + } + + // Authentication status + typedef bgp_PasswdSet { + type enumeration { + + // Enabled + enum enabled { + value 1; + } + enum disabled { + value 0; + } + } + default "disabled"; + } + + // Path flags + typedef bgp_PathFlags { + + // bits- Using string + type string; + } + + // Path id + typedef bgp_PathId { + type uint32; + } + + // Path status + typedef bgp_PathSt { + type enumeration { + + // Deleted + enum deleted { + value 0; + } + + // Staled + enum staled { + value 1; + } + + // Valid + enum valid { + value 2; + } + + // InValid + enum invalid { + value 3; + } + + // history + enum history { + value 4; + } + + // suppressed + enum suppressed { + value 5; + } + + // dampened + enum dampened { + value 6; + } + } + } + + // Path type + typedef bgp_PathT { + type enumeration { + + // Internal + enum internal { + value 1; + } + + // External + enum external { + value 2; + } + + // Confederation + enum confederation { + value 3; + } + + // Local + enum local { + value 4; + } + + // Aggregate + enum aggregate { + value 5; + } + + // Redistribute + enum redistribute { + value 6; + } + + // Injected + enum injected { + value 7; + } + } + default "internal"; + } + + // Peer Address Family Control + typedef bgp_PeerAfControl { + + // bits- Using string + type string; + } + + // Peer AF flags + typedef bgp_PeerAfFlags { + + // bits- Using string + type string; + } + + // Peer Control + typedef bgp_PeerControl { + + // bits- Using string + type string; + } + + // TODO: Change this to nw:Cnt64 Count of BGP Messages + typedef bgp_PeerCount { + type uint64; + } + + // Peer Fabric Type + typedef bgp_PeerFabType { + type enumeration { + + // Fabric internal + enum fabric-internal { + value 0; + } + + // Fabric external + enum fabric-external { + value 1; + } + + // Fabric Border Leaf + enum fabric-border-leaf { + value 2; + } + } + default "fabric-internal"; + } + + // Peer flags + typedef bgp_PeerFlags { + + // bits- Using string + type string; + } + + // Peer graceful restart state + typedef bgp_PeerGrSt { + type enumeration { + + // Not applicable + enum na { + value 1; + } + + // Reset + enum reset { + value 2; + } + + // Up + enum up { + value 3; + } + } + default "na"; + } + + // Peer Index + typedef bgp_PeerIdx { + type uint16; + } + + // Peer operational state + typedef bgp_PeerOperSt { + type enumeration { + + // Unspecified + enum unspecified { + value 0; + } + + // Illegal + enum illegal { + value 1; + } + + // Shut + enum shut { + value 2; + } + + // Idle + enum idle { + value 3; + } + + // Connect + enum connect { + value 4; + } + + // Active + enum active { + value 5; + } + + // Open sent + enum open-sent { + value 6; + } + + // Open confirm + enum open-confirm { + value 7; + } + + // Established + enum established { + value 8; + } + + // Closing + enum closing { + value 9; + } + + // Error + enum error { + value 10; + } + + // Unknown + enum unknown { + value 11; + } + } + default "unspecified"; + } + + // Peer Type + typedef bgp_PeerType { + type enumeration { + + // ibgp + enum ibgp { + value 1; + } + + // ebgp + enum ebgp { + value 2; + } + } + default "ibgp"; + } + + // Pfx Flushed + typedef bgp_PfxFlushed { + type uint64; + } + + // Prefix Attributes TLV flags for Link-state + // Default Value computed from none + typedef bgp_PfxLsAttrFlags { + + // bits- Using string + type string; + default "none"; + } + + // TODO: Change this to nw:Cnt64 Counts for Prefix Peers + typedef bgp_PfxPeerCounts { + type uint64; + } + + // Prefix Peer Timeout + typedef bgp_PfxPeerTimeout { + type uint16 { + range "0..1200"; + } + } + + // Prefix Peer Wait + typedef bgp_PfxPeerWaitTime { + type uint16 { + range "0..1200"; + } + } + + // TODO: Change this to nw:Cnt64 Pfx Saved + typedef bgp_PfxSaved { + type uint64; + } + + // Pfx Sent + typedef bgp_PfxSent { + type uint64; + } + + // Prefix-Sid attribute entry type + typedef bgp_PfxSidAttrEntryType { + type enumeration { + + // Unspecified + enum none { + value 0; + } + + // Label Index + enum label-index { + value 1; + } + + // IPv6-SID + enum ipv6-sid { + value 2; + } + + // Originator SRGB + enum origin-srgb { + value 3; + } + } + default "none"; + } + + // PMSI Tunnel Type + typedef bgp_PmsiTunType { + type enumeration { + + // Unspecified + enum none { + value 0; + } + + // Ingress Replication + enum ingress-repl { + value 1; + } + } + default "none"; + } + + // private-as Control + typedef bgp_PrivateASControl { + type enumeration { + enum none { + value 0; + } + + // Remove private AS + enum remove-exclusive { + value 1; + } + + // Remove all private AS + enum remove-all { + value 2; + } + + // Replace private AS with local AS + enum replace-as { + value 3; + } + } + default "none"; + } + + // Reconnect Interval Value + typedef bgp_ReConnectIntvl { + type uint16 { + range "1..60"; + } + default "60"; + } + + // RNH Epoch + typedef bgp_RnhEpoch { + type uint8; + } + + // Route control direction + typedef bgp_RtCtrlDir { + type enumeration { + + // Incoming + enum in { + value 1; + } + + // Outgoing + enum out { + value 2; + } + } + default "in"; + } + + // Route control operational state + typedef bgp_RtCtrlOperSt { + type enumeration { + + // Unresolved + enum unresolved { + value 1; + } + + // Resolved + enum resolved { + value 2; + } + } + default "unresolved"; + } + + // Route flags + typedef bgp_RtFlags { + + // bits- Using string + type string; + } + + // Labeled address-family route flags + typedef bgp_RtLblAfFlags { + + // bits- Using string + type string; + } + + // Route version + typedef bgp_RtVer { + type uint32; + } + + // Route target policy type + typedef bgp_RttPType { + type enumeration { + + // Import + enum import { + value 1; + } + + // Export + enum export { + value 2; + } + } + default "import"; + } + + // Segment Routing Global Block + // Default Value "0" Removed - out of range 16..471804 + typedef bgp_SRGBRange { + type uint32 { + range "16..471804"; + } + } + + // Peer shut state qualifier + typedef bgp_ShutStQual { + type enumeration { + + // Unspecified + enum unspecified { + value 0; + } + + // Administratively down + enum admin { + value 1; + } + + // No memory + enum no-mem { + value 2; + } + + // Exceeded prefix limit + enum exceeded-pfxlimit { + value 3; + } + + // Administratively up + enum admin-up { + value 4; + } + + // No Affinity + enum no-affinity { + value 5; + } + } + default "unspecified"; + } + + // Event History Buffer Size + typedef bgp_Size { + type uint32 { + range "0..4 | 8192..1048576"; + } + default "0"; + } + + // FD to connect to the peer + typedef bgp_SockFD { + type uint32; + } + + // Soft Reconfiguration + typedef bgp_SoftReconfigBackup { + type enumeration { + enum none { + value 0; + } + + // Inbound Only + enum inbound { + value 1; + } + + // Inbound Always + enum inbound-always { + value 2; + } + } + } + + // BMP Server ID + typedef bgp_SrvId { + type uint8 { + range "1..2"; + } + } + + // Peer Idle State Reason + typedef bgp_StReason { + type enumeration { + enum none { + value 0; + } + + // NoMem + enum no-mem { + value 1; + } + } + default "none"; + } + + // Aggregate Address Summary-Only + typedef bgp_SummaryOnly { + type enumeration { + + // Enabled + enum enabled { + value 1; + } + + // Disabled + enum disabled { + value 0; + } + } + default "disabled"; + } + + // Table state + typedef bgp_TblSt { + type enumeration { + + // Unknown + enum unknown { + value 0; + } + + // Up + enum up { + value 1; + } + + // Down + enum down { + value 2; + } + } + } + + // Table version + typedef bgp_TblVer { + type uint32; + } + + // eBGP Multihop TTL value + typedef bgp_TtlVal { + type uint16 { + range "0..255"; + } + } + + // Unknown Attribute Length + typedef bgp_UnknownAttrLen { + + // MAX Converted to int from 0xffffffff + type uint32 { + range "0..4294967295"; + } + } + + // Version + typedef bgp_Ver { + type enumeration { + + // BGP Version 4 + enum v4 { + value 4; + } + } + default "v4"; + } + + // VNID + // Default Value "0" Removed - out of range 4096..16777215 + typedef bgp_Vnid { + + // MAX Converted to int from 0xffffff + type uint32 { + range "4096..16777215"; + } + } + + // Dampen Igp Metric + typedef bgp_igpMetric { + type uint16 { + range "0..3600"; + } + default "600"; + } + + typedef cap_Constraint { + type uint32; + } + + typedef cap_Counter { + type uint32; + } + + typedef cap_Model { + type string; + } + + // Quantitative + typedef cap_Quant { + + // MAX Converted to int from 0xFFFF + type uint16 { + range "0..65535"; + } + default "0"; + } + + typedef cap_RaiseFaultState { + type enumeration { + enum nominal { + value 0; + } + enum ruleHasLess { + value 1; + } + enum ruleHasMore { + value 2; + } + } + default "nominal"; + } + + typedef cap_RuleT { + type enumeration { + enum limit { + value 1; + } + } + default "limit"; + } + + typedef cap_Scope { + type enumeration { + enum node { + value 0; + } + enum policy-domain { + value 1; + } + enum fabric { + value 2; + } + } + default "node"; + } + + typedef cap_StorageHint { + type uint8; + } + + typedef cap_Vendor { + type string; + } + + typedef cap_Version { + type string; + } + + // Adjacency state qualifier + typedef cdp_AdjStQual { + + // bits- Using string + type string; + } + + // Capability type + typedef cdp_CapT { + + // bits- Using string + type string; + } + + // Neighbor device id + typedef cdp_DevId { + type string; + } + + // Device identifier type + typedef cdp_DevIdT { + type enumeration { + + // MAC address + enum mac { + value 1; + } + + // Serial number + enum serialNum { + value 2; + } + + // System name + enum sysName { + value 3; + } + + // System name and serial number + enum sysNameAndSerialNum { + value 4; + } + } + default "sysNameAndSerialNum"; + } + + // Neighbor device index + typedef cdp_DevIndex { + type uint32; + } + + // Duplex + typedef cdp_Duplex { + type enumeration { + + // Unknown + enum unknown { + value 0; + } + + // Half duplex + enum half { + value 1; + } + + // Full duplex + enum full { + value 2; + } + } + } + + // Hold interval + // No Enums - transformed from scalar:Enum8 to scalar:UByte, YANG integer equivalent uint8 + typedef cdp_HoldIntvl { + type uint8 { + range "10..255"; + } + default "180"; + } + + // MTU + typedef cdp_MTU { + type uint32; + } + + // Neighbor version + typedef cdp_NbrVer { + type string; + } + + // Operational state + typedef cdp_OperSt { + type enumeration { + + // Up + enum up { + value 1; + } + + // Down + enum down { + value 2; + } + } + default "down"; + } + + // Operational state qualifier + typedef cdp_OperStQual { + type enumeration { + + // Up + enum up { + value 1; + } + + // Administratively down + enum admin-down { + value 2; + } + + // Interface down + enum if-down { + value 3; + } + + // Unsupported + enum unsupported { + value 4; + } + } + default "unsupported"; + } + + // Neighbor platform id + typedef cdp_PlatId { + type string; + } + + // Neighbor port id + typedef cdp_PortId { + type string; + } + + // System Location + typedef cdp_SysLoc { + type string; + } + + // System name + typedef cdp_SysName { + type string; + } + + // System OID Length + typedef cdp_SysObjIdL { + type uint8; + } + + // System OID Value + typedef cdp_SysObjIdV { + type mtx_array_uint32; + } + + // Transmission frequency + // No Enums - transformed from scalar:Enum8 to scalar:UByte, YANG integer equivalent uint8 + typedef cdp_TxFreq { + type uint8 { + range "5..254"; + } + default "60"; + } + + // Version + typedef cdp_Ver { + type enumeration { + + // Version 1 + enum v1 { + value 1; + } + + // Version 2 + enum v2 { + value 2; + } + } + default "v2"; + } + + // Vlan id + typedef cdp_VlanId { + type uint16; + default "0"; + } + + typedef comm_Port { + type uint32 { + range "1024..65000"; + } + } + + typedef comp_DelimitedString { + type string; + } + + typedef comp_HostState { + type enumeration { + + // Maintenance Mode + enum maintenance { + value 0; + } + + // Connected + enum connected { + value 1; + } + + // Not Responding + enum noresponse { + value 2; + } + + // Disconnected + enum disconnected { + value 3; + } + + // Powered On + enum poweredOn { + value 4; + } + + // Powered Off + enum poweredOff { + value 5; + } + + // StandBy + enum standBy { + value 6; + } + + // Suspended + enum suspended { + value 7; + } + + // Unknown + enum unknown { + value 8; + } + } + default "disconnected"; + } + + typedef comp_NicInstType { + type enumeration { + + // Unknown + enum unknown { + value 0; + } + + // Baremetal Host + enum phys { + value 1; + } + + // Virtual Machine + enum virt { + value 2; + } + + // Hypervisor Host + enum hv { + value 3; + } + } + default "unknown"; + } + + typedef comp_NicState { + type enumeration { + + // Down + enum down { + value 0; + } + + // Up + enum up { + value 1; + } + } + default "down"; + } + + typedef comp_Vendor { + type enumeration { + enum VMware { + value 1; + } + enum Microsoft { + value 2; + } + } + default "VMware"; + } + + // Result of filter check + typedef compat_FilterStatus { + type enumeration { + + // failed + enum failed { + value 0; + } + + // passed + enum passed { + value 1; + } + } + default "failed"; + } + + // Operation type + typedef conftmpl_OperationType { + type enumeration { + + // Create + enum create { + value 1; + } + + // Delete + enum delete { + value 2; + } + } + default "create"; + } + + // Template type + typedef conftmpl_TemplateType { + type enumeration { + + // Unknown + enum unknown { + value 0; + } + + // Vrf + enum vrf { + value 1; + } + + // Vlan + enum vlan { + value 2; + } + + // Intf + enum intf { + value 3; + } + } + default "unknown"; + } + + // Adj addr + typedef coop_AdjAddr { + type address_Ipv4; + } + + // Adjacency flags + typedef coop_AdjFlags { + + // bits- Using string + type string; + } + + // Adjacency operational state + typedef coop_AdjOperSt { + type enumeration { + + // Down + enum down { + value 1; + } + + // Up + enum up { + value 2; + } + } + default "down"; + } + + // Adjacency operational state qualifier + typedef coop_AdjOperStQual { + type enumeration { + + // Unspecified + enum unspecified { + value 0; + } + + // Route not reachable + enum route-unreachable { + value 1; + } + + // TCP Connection Down + enum tcp-down { + value 2; + } + + // Peer inactive + enum peer-inactive { + value 3; + } + + // Peer congested + enum peer-congested { + value 4; + } + + // Up + enum up { + value 5; + } + } + default "unspecified"; + } + + // Collisions load factor + typedef coop_CollLdFactor { + + // MAX Converted to int from 0xffff + type uint16 { + range "1..65535"; + } + default "1"; + } + + // Ctx flags + typedef coop_CtxFlags { + + // bits- Using string + type string; + } + + // Dampen action + typedef coop_DampAction { + type enumeration { + + // Freeze + enum freeze { + value 1; + } + + // Withdraw + enum withdraw { + value 2; + } + } + default "freeze"; + } + + // Half life + typedef coop_DampHalfLife { + + // MAX Converted to int from 0xffff + type uint16 { + range "1..65535"; + } + default "10"; + } + + // Dampen Penalty + typedef coop_DampPenalty { + + // MAX Converted to int from 0xffff + type uint16 { + range "100..65535"; + } + default "1000"; + } + + // Dampen reuse threshold + typedef coop_DampReuseThresh { + + // MAX Converted to int from 0xffff + type uint16 { + range "100..65535"; + } + default "2500"; + } + + // Dampen saturation threshold + typedef coop_DampSatThresh { + + // MAX Converted to int from 0xffff + type uint16 { + range "100..65535"; + } + default "10000"; + } + + // Dampen threshold + typedef coop_DampThresh { + + // MAX Converted to int from 0xffff + type uint16 { + range "100..65535"; + } + default "4000"; + } + + // Domain operational state + typedef coop_DomOperSt { + type enumeration { + + // Down + enum down { + value 0; + } + + // Initializing + enum init { + value 1; + } + + // Up + enum up { + value 2; + } + } + default "down"; + } + + // Domain operational state qualifier + typedef coop_DomOperStQual { + type enumeration { + + // Unspecified + enum unspecified { + value 0; + } + + // Configuration not resolved + enum config-unresolved { + value 1; + } + + // Time not synced + enum time-not-synced { + value 2; + } + + // Infra domain down + enum infra-dom-down { + value 3; + } + + // Council pending + enum council-pending { + value 4; + } + + // Inconsistent configuration + enum inconsistent-config { + value 5; + } + + // Admin down + enum admin-down { + value 6; + } + + // Up + enum up { + value 7; + } + } + default "unspecified"; + } + + // Ep controls + // Default Value computed from notify-citizen + typedef coop_EpControl { + + // bits- Using string + type string; + default "notify-citizen"; + } + + // Ep flags + typedef coop_EpFlags { + + // bits- Using string + type string; + } + + // Graceful restart time (in seconds) + typedef coop_GRTime { + + // MAX Converted to int from 0xffff + type uint32 { + range "1..65535"; + } + default "600"; + } + + // Hello Interval (in seconds) + typedef coop_HelloIntvl { + + // MAX Converted to int from 0xffff + type uint16 { + range "1..65535"; + } + default "60"; + } + + // IGMP version + typedef coop_IGMPVersion { + type uint8 { + range "1..3"; + } + default "2"; + } + + // McastGrp flags + typedef coop_McGrpFlags { + + // bits- Using string + type string; + } + + // Mrtr flags + typedef coop_MrtrFlags { + + // bits- Using string + type string; + } + + // Peer controls + typedef coop_PeerControl { + + // bits- Using string + type string; + } + + // Port id + typedef coop_PortId { + + // MAX Converted to int from 0xffffffff + type uint32 { + range "0..4294967295"; + } + default "0"; + } + + // Publisher id + typedef coop_PubId { + type address_Ipv4; + } + + // Refresh interval (in seconds) + typedef coop_RefreshIntvl { + + // MAX Converted to int from 0x2aaaaaaa + type uint32 { + range "1..715827882"; + } + default "3600"; + } + + // Repository size + typedef coop_RepSz { + + // MAX Converted to int from 0xffffffff + type uint32 { + range "1..4294967295"; + } + default "1000000"; + } + + // Repository type + typedef coop_RepT { + type enumeration { + + // Endpoint reachability repository + enum ep { + value 1; + } + + // Oracle repository + enum oracle { + value 2; + } + + // Leaf repository + enum leaf { + value 3; + } + + // Multicast group membership repository + enum mgrpmbr { + value 4; + } + + // Multicast router repository + enum mrouter { + value 5; + } + + // Service node repository + enum svcnode { + value 6; + } + + // Anycast repository + enum anycast { + value 7; + } + + // External router repository + enum extrtr { + value 8; + } + + // VPC repository + enum vpc { + value 9; + } + + // VTEP repository + enum vtep { + value 10; + } + + // Context repository + enum ctx { + value 11; + } + } + default "ep"; + } + + // Role + typedef coop_Role { + type enumeration { + + // Citizen + enum citizen { + value 1; + } + + // Oracle + enum oracle { + value 2; + } + } + default "citizen"; + } + + // Shard Interval + typedef coop_ShardIntvl { + + // MAX Converted to int from 0xffffffff + type uint32 { + range "1..4294967295"; + } + } + + // Switch id + typedef coop_SwId { + type address_Ipv4; + } + + // Synthetic flags + typedef coop_SynthFlags { + + // bits- Using string + type string; + } + + // Synthetic Generator algorithm + typedef coop_SynthGen { + type enumeration { + enum xxx { + value 1; + } + } + default "xxx"; + } + + // Synthetic ip + typedef coop_SynthIp { + type address_Ipv4; + } + + // Synthetic vrf + typedef coop_SynthVrf { + type uint32; + } + + // Timestamp (NTP raw format) + typedef coop_Timestamp { + type string; + } + + // VNID + typedef coop_Vnid { + + // MAX Converted to int from 0xffffff + type uint32 { + range "1..16777215"; + } + default "1"; + } + + // Specifies the HA mode in which this system is configured + typedef top_Mode { + type enumeration { + enum unspecified { + value 0; + } + enum stand-alone { + value 1; + } + enum cluster { + value 2; + } + } + default "unspecified"; + } + + grouping System-group { + leaf id { + type uint32; + } + + // Specifies if this system is configured in standalone mode or HA pair + // Type is an MO-Defined-Type + leaf mode { + description "System mode"; + + // Type is an MO-Defined-Type + type top_Mode; + } + } + + container System { + description "System"; + + uses System-group; + } +} diff --git a/sdk/cpp/tests/test_sanity_codec.cpp b/sdk/cpp/tests/test_sanity_codec.cpp index bc42b90eb..855e01f67 100644 --- a/sdk/cpp/tests/test_sanity_codec.cpp +++ b/sdk/cpp/tests/test_sanity_codec.cpp @@ -22,6 +22,7 @@ #include #include #include +#include #include #include @@ -263,6 +264,23 @@ config_runner_1(ydktest_sanity::Runner *runner) runner->two_list->ldata.push_back(std::move(l_2)); } +TEST_CASE("typedef_encode") +{ + CodecServiceProvider codec_provider{EncodingFormat::XML}; + CodecService codec_service{}; + + // Create class System and set values for its members + auto system = std::make_unique(); + system->id = 22; + system->mode = ydktest_sanity_typedefs::TopMode::stand_alone; + + std::string xml = codec_service.encode(codec_provider, *system, true); + + auto system_decoded = codec_service.decode(codec_provider, xml, std::make_unique()); + + CHECK(*system_decoded == *system); +} + TEST_CASE("single_encode") { CodecServiceProvider codec_provider{EncodingFormat::XML}; diff --git a/sdk/go/core/tests/service_codec_test.go b/sdk/go/core/tests/service_codec_test.go index 538c716fe..19ebdf12c 100644 --- a/sdk/go/core/tests/service_codec_test.go +++ b/sdk/go/core/tests/service_codec_test.go @@ -9,6 +9,7 @@ import ( ysanity_bgp "github.com/CiscoDevNet/ydk-go/ydk/models/ydktest/openconfig_bgp" ysanity_bgp_types "github.com/CiscoDevNet/ydk-go/ydk/models/ydktest/openconfig_bgp_types" ysanity "github.com/CiscoDevNet/ydk-go/ydk/models/ydktest/sanity" + ysanity_typedefs "github.com/CiscoDevNet/ydk-go/ydk/models/ydktest/sanity_typedefs" "github.com/CiscoDevNet/ydk-go/ydk/providers" "github.com/CiscoDevNet/ydk-go/ydk/services" "github.com/CiscoDevNet/ydk-go/ydk/types" @@ -415,6 +416,21 @@ func (suite *CodecTestSuite) TestXMLDecodeOCPattern() { suite.Equal(types.EntityEqual(entity, ocA), true) } +func (suite *CodecTestSuite) TestTypedefsXMLEncodeDecode() { + systemEncode := ysanity_typedefs.System{} + systemEncode.Id = 22 + systemEncode.Mode = ysanity_typedefs.TopMode_stand_alone + + suite.Provider.Encoding = encoding.XML + + payload := suite.Codec.Encode(&suite.Provider, &systemEncode) + + entity := suite.Codec.Decode(&suite.Provider, payload) + systemDecode := entity.(*ysanity_typedefs.System) + + suite.Equal(types.EntityEqual(&systemEncode, systemDecode), true) +} + func TestCodecTestSuite(t *testing.T) { if testing.Verbose() { ydk.EnableLogging(ydk.Debug) diff --git a/sdk/python/core/tests/test_sanity_codec.py b/sdk/python/core/tests/test_sanity_codec.py index 1deb86b0d..6c501595a 100644 --- a/sdk/python/core/tests/test_sanity_codec.py +++ b/sdk/python/core/tests/test_sanity_codec.py @@ -371,6 +371,18 @@ def test_decode_invalid_subtree_2(self): self.provider.encoding = EncodingFormat.JSON self.codec.encode(self.provider, ysanity.Runner(), subtree=True) + def test_encode_decode_typedefs(self): + from ydk.models.ydktest import ydktest_sanity_typedefs as ysanity_typedefs + system_encode = ysanity_typedefs.System() + system_encode.mode = ysanity_typedefs.TopMode.stand_alone + system_encode.id = 22; + + self.provider.encoding = EncodingFormat.XML + payload = self.codec.encode(self.provider, system_encode) + + system_decode = self.codec.decode(self.provider, payload) + self.assertEqual(system_encode, system_decode) + if __name__ == '__main__': import sys suite = unittest.TestLoader().loadTestsFromTestCase(SanityYang) diff --git a/yang/ydktest/ydktest-sanity-typedefs@2018-01-30.yang b/yang/ydktest/ydktest-sanity-typedefs@2018-01-30.yang new file mode 100644 index 000000000..f3de84b44 --- /dev/null +++ b/yang/ydktest/ydktest-sanity-typedefs@2018-01-30.yang @@ -0,0 +1,6233 @@ +module ydktest-sanity-typedefs { + + yang-version 1; + + namespace "http://cisco.com/ns/yang/ydktest-sanity-typedefs"; + + prefix top; + + organization + "Cisco Systems, Inc."; + + contact + "Cisco Systems, Inc. + Customer Service + + Postal: 170 West Tasman Drive + San Jose, CA 95134 + + Tel: +1 800 553-NETS + + E-mail: ydk-admin@cisco.com"; + + description + "This module contains 461 typedef statements copied from NXOS Device YANG Model + The module created to test YDK with newer version of libyang library, + which supports more than 255 typedef statements"; + + revision 2018-01-30 { + description + "Initial Revision. + Generated by ygorelik"; + } + + typedef address_Ipv4 { + type string { + } + } + + typedef address_Ipv6 { + type string { + } + } + + typedef address_Ip { + type union { + type address_Ipv4; + type address_Ipv6; + } + } + + typedef address_Mac { + type string { + } + } + + typedef mtx_array_ifindex { + type string { + } + } + + typedef mtx_array_uint8 { + type string { + } + } + + typedef mtx_array_uint16 { + type string { + } + } + + typedef mtx_array_uint32 { + type string { + } + } + + typedef mtx_array_uint64 { + type string { + } + } + + typedef mtx_array_bit { + type string { + } + } + + typedef mtx_array_community { + type string { + } + } + + typedef aaa_AccountStatus { + type enumeration { + + // Active + enum active { + value 0; + } + + // Inactive + enum inactive { + value 1; + } + } + default "active"; + } + + typedef aaa_BannerMsg { + type string; + } + + typedef aaa_Boolean { + type enumeration { + + // No + enum no { + value 0; + } + + // Yes + enum yes { + value 1; + } + } + default "yes"; + } + + typedef aaa_Clear { + type enumeration { + + // No + enum no { + value 0; + } + + // Yes + enum yes { + value 1; + } + } + default "no"; + } + + typedef aaa_CmdType { + type enumeration { + + // Config + enum config { + value 0; + } + + // Exec + enum exec { + value 1; + } + } + default "config"; + } + + typedef aaa_Date { + type string; + } + + typedef aaa_Delimiter { + type string; + } + + typedef aaa_Email { + type address_Email { + } + } + + typedef aaa_EncKey { + type string { + length "0..240"; + } + } + + typedef aaa_EncryptedArray { + type mtx_array_uint8; + } + + typedef aaa_ExternalUnixUID { + type uint16 { + range "16000..23999"; + } + } + + typedef aaa_HistoryDepth { + type uint8 { + range "0..15"; + } + default "5"; + } + + typedef aaa_IdleTimer { + type uint16 { + range "0..1440"; + } + } + + typedef aaa_KeyEnc { + type enumeration { + + // Clear Text + enum 0 { + value 0; + } + + // Type-6 Encrypted + enum 6 { + value 6; + } + + // Encrypted + enum 7 { + value 7; + } + } + default "0"; + } + + typedef aaa_KeyEncUserPass { + type enumeration { + + // Unspecified + enum unspecified { + value 255; + } + + // Clear Text + enum clear { + value 0; + } + + // Encrypted + enum Encrypt { + value 5; + } + } + } + + typedef aaa_LdapAttribute { + type string { + length "0..63"; + } + } + + // NXOS supports maximum limits in the type definitions + typedef aaa_LdapDn { + type string { + length "0..127"; + } + } + + typedef aaa_LdapFilter { + type string { + length "0..63"; + } + } + + typedef aaa_LdapSSLStrictnessLevel { + type enumeration { + + // Strict + enum strict { + value 0; + } + + // Permissive + enum permissive { + value 1; + } + } + default "strict"; + } + + typedef aaa_LoggingLevel { + type enumeration { + + // Emergency + enum Emergency { + value 0; + } + + // Alert + enum Alert { + value 1; + } + + // Critical + enum Critical { + value 2; + } + + // Error + enum Error { + value 3; + } + + // Warning + enum Warning { + value 4; + } + + // Notifications + enum Notif { + value 5; + } + + // Informational + enum Inform { + value 6; + } + + // Debug + enum Debug { + value 7; + } + } + default "Error"; + } + + typedef aaa_MonitorServerType { + type enumeration { + + // Disabled + enum disabled { + value 0; + } + + // Enabled + enum enabled { + value 1; + } + } + default "disabled"; + } + + typedef aaa_MonitoringPasswordType { + type string; + } + + typedef aaa_MonitoringUserType { + type string { + } + default "test"; + } + + typedef aaa_NoRolePolicy { + type enumeration { + + // No Login + enum no-login { + value 0; + } + + // Assign Default Role + enum assign-default-role { + value 1; + } + } + } + + typedef aaa_Order { + type uint16 { + range "0..16"; + } + } + + typedef aaa_Passwd { + type string { + length "1..127"; + } + } + + typedef aaa_Phone { + type address_Phone; + } + + typedef aaa_Port { + type uint32 { + range "1..65535"; + } + } + + typedef aaa_ProviderGroupDeadtime { + type uint32 { + range "0..1440"; + } + default "0"; + } + + // Limited by NXOS maximum size for server group + typedef aaa_ProviderGroupName { + type string { + length "0..127"; + } + } + + typedef aaa_ProviderGroupProtocol { + type enumeration { + + // TACACS + enum tacacs { + value 0; + } + + // RADIUS + enum radius { + value 1; + } + + // LDAP + enum ldap { + value 2; + } + } + } + + typedef aaa_ProviderGroupSnmpIndex { + type uint32; + } + + typedef aaa_ProviderSnmpIndex { + type uint32; + } + + typedef aaa_ProviderState { + type enumeration { + + // Unknown + enum unknown { + value 0; + } + + // Operable + enum operable { + value 1; + } + + // Inoperable + enum inoperable { + value 2; + } + } + default "unknown"; + } + + typedef aaa_PwdChangeCount { + type uint8 { + range "0..10"; + } + } + + typedef aaa_PwdChangeInterval { + type uint16 { + range "1..745"; + } + } + + typedef aaa_PwdExpWarnTime { + type uint8 { + range "0..30"; + } + } + + typedef aaa_PwdHistory { + type string; + } + + typedef aaa_PwdLen { + type uint32; + } + + typedef aaa_PwdLifeTime { + type uint16 { + range "0..3650"; + } + } + + typedef aaa_PwdPolicy { + type enumeration { + + // Enable + enum enable { + value 0; + } + + // Disable + enum disable { + value 1; + } + } + default "enable"; + } + + typedef aaa_RadPort { + type uint32 { + range "0..65535"; + } + } + + typedef aaa_RadSrvUseType { + type enumeration { + + // Authentication + enum Auth { + value 0; + } + + // Authorization + enum Author { + value 1; + } + + // Accounting + enum Acc { + value 2; + } + + // All + enum All { + value 3; + } + } + default "All"; + } + + typedef aaa_Realm { + type enumeration { + + // Local + enum local { + value 0; + } + + // RADIUS + enum radius { + value 1; + } + + // TACACS+ + enum tacacs { + value 2; + } + + // LDAP + enum ldap { + value 3; + } + } + default "local"; + } + + typedef aaa_Retries { + type uint32 { + range "0..5"; + } + default "1"; + } + + typedef aaa_RuleAccessType { + type enumeration { + + // none + enum none { + value 0; + } + + // Read + enum read { + value 1; + } + + // Read Write + enum read-write { + value 2; + } + + // Command + enum command { + value 3; + } + } + } + + typedef aaa_RuleCmdStrType { + type string { + length "0..128"; + } + } + + typedef aaa_RuleEntityType { + type string { + length "0..512"; + } + } + + typedef aaa_RuleNumberType { + type uint32 { + range "1..256"; + } + } + + typedef aaa_RulePermissionType { + type enumeration { + + // none + enum none { + value 0; + } + + // Permit + enum permit { + value 1; + } + + // Deny + enum deny { + value 2; + } + } + } + + typedef aaa_RuleScopeType { + type enumeration { + + // none + enum none { + value 0; + } + + // Feature + enum feature { + value 2; + } + + // Feature Group + enum feature-group { + value 3; + } + + // OID + enum oid { + value 21; + } + } + } + + typedef aaa_SshData { + type string { + length "0..16384"; + } + } + + typedef aaa_TimeMin { + type uint32 { + range "0..1440"; + } + default "0"; + } + + typedef aaa_TimeSec { + type uint32 { + range "1..60"; + } + default "5"; + } + + typedef aaa_UnixUID { + type uint16 { + range "99..15999"; + } + } + + typedef aaa_UserCertDataType { + type string; + } + + typedef aaa_UserRolePrivType { + type enumeration { + + // No Privilege + enum noDataPriv { + value 0; + } + + // Read Privilege + enum readPriv { + value 1; + } + + // Write Privilege + enum writePriv { + value 2; + } + } + default "noDataPriv"; + } + + typedef aaa_authenticationProtocol { + type enumeration { + + // PAP + enum pap { + value 0; + } + + // CHAP + enum chap { + value 1; + } + + // MS-CHAP + enum mschap { + value 2; + } + + // MS-CHAPv2 + enum mschapv2 { + value 3; + } + + // ASCII + enum ascii { + value 4; + } + } + } + + // Bank type + typedef ac_BankT { + type enumeration { + + // Even + enum even { + value 1; + } + + // Odd + enum Odd { + value 2; + } + } + default "even"; + } + + // Control + typedef ac_Control { + + // bits- Using string + type string; + } + + // ECN + typedef ac_Ecn { + type uint8 { + range "0..2"; + } + default "0"; + } + + // Ether type + typedef ac_EtherT { + type uint16; + } + + // Ip options + typedef ac_IpOpt { + + // bits- Using string + type string; + } + + // MAC + typedef ac_Mac { + type address_Mac; + } + + // Order + typedef ac_Order { + type uint16 { + range "1..1024"; + } + } + + // Payload size + typedef ac_PayloadSz { + type uint8; + } + + // Interface identifier + typedef nw_IfId { + type string; + } + + // Port id + typedef ac_PortId { + type nw_IfId; + } + + // Operational state of HW rules + typedef ac_RuleOperSt { + type enumeration { + + // Pending + enum pending { + value 1; + } + + // Installed + enum installed { + value 2; + } + + // Failed + enum failed { + value 3; + } + } + default "pending"; + } + + typedef acl_ACEStats { + type uint8; + default "0"; + } + + // ACE action type + typedef acl_ActionType { + type enumeration { + + // Invalid + enum invalid { + value 0; + } + + // Permit + enum permit { + value 1; + } + + // Deny + enum deny { + value 2; + } + + // Copy + enum copy { + value 3; + } + + // Divert + enum divert { + value 4; + } + + // Redirect + enum redirect { + value 5; + } + } + default "invalid"; + } + + // Capture Session + typedef acl_CaptureSes { + type uint16 { + range "0..48"; + } + } + + // config State + typedef acl_ConfigState { + type uint8; + default "0"; + } + + // http option (http-method) value enum + typedef acl_HttpOptionType { + type enumeration { + + // get + enum get { + value 1; + } + + // put + enum put { + value 2; + } + + // head + enum head { + value 3; + } + + // post + enum post { + value 4; + } + + // delete + enum delete { + value 5; + } + + // trace + enum trace { + value 6; + } + + // connect + enum connect { + value 7; + } + + // invalid + enum invalid { + value 0; + } + } + } + + // Name of interface, e.g. "Eth1/2" + typedef acl_IfName { + type nw_IfId; + } + + // MAC Protocol + typedef acl_MACProtocol { + + // MAX Converted to int from 0x10000 + type uint32 { + range "0..65536"; + } + default "65536"; + } + + // ACL name + typedef acl_Name { + type string { + length "1..64"; + } + } + + // L4 port relationship operator + typedef acl_Operator { + type uint8; + default "0"; + } + + // Packet Length + typedef acl_PktLen { + type uint16 { + range "19..9210"; + } + } + + // L4 port number + typedef acl_PortNumber { + type uint16; + default "0"; + } + + // ACL name + typedef acl_RemarkStr { + type string { + length "1..100"; + } + } + + // ACE sequence number + typedef acl_SequenceNumber { + type uint32 { + range "0..4294967295"; + } + } + + // TCP Flags Mask + typedef acl_TcpFlagsMask { + type uint8 { + range "0..64"; + } + } + + // TCP option length + typedef acl_TcpOptionLengthType { + type uint32 { + range "0..41"; + } + } + + // time-range name + typedef acl_TimeRangeName { + type string { + length "0..64"; + } + } + + // UDF mask + typedef acl_UdfMask { + type uint16 { + range "0..65535"; + } + } + + // UDF name + typedef acl_UdfName { + type string { + length "1..16"; + } + } + + // UDF value + typedef acl_UdfVal { + type uint16 { + range "0..65535"; + } + } + + // VLAN Acl action type + typedef acl_VAclActionType { + type enumeration { + + // invalid + enum invalid { + value 0; + } + + // forward + enum forward { + value 1; + } + + // drop + enum drop { + value 2; + } + + // redirect + enum redirect { + value 3; + } + } + default "invalid"; + } + + // VLAN Acl action log enable/disable + typedef acl_VAclLog { + type uint8; + default "0"; + } + + // VLAN Acl match acl type + // Refer to CLI_ACL_IP/CLI_ACL_IPV6/CLI_ACL_MAC for values + typedef acl_VAclMatchType { + type uint16; + default "0"; + } + + // Vlan List String for VLAN Acl Policy + typedef acl_VlanListStr { + type string { + length "0..512"; + } + } + + // VLAN + typedef acl_VlanType { + type uint32 { + range "0..4095"; + } + default "4095"; + } + + // nve vni ID + typedef acl_VniType { + type uint32 { + range "0..16777216"; + } + } + + // cos type + typedef acl_cosType { + type uint8 { + range "0..8"; + } + default "8"; + } + + // erspan DSCP + typedef acl_erspanDscpType { + type uint8 { + range "0..64"; + } + default "64"; + } + + // erspan gre protocol + typedef acl_erspanGreType { + type uint32 { + range "0..65536"; + } + default "65536"; + } + + // VLAN Acl policy operation apply/remove + typedef acl_operation { + type uint8; + default "1"; + } + + typedef action_AdminSt { + type enumeration { + + // Unknown + enum unknown { + value 0; + } + + // Start + enum start { + value 1; + } + + // Stop + enum stop { + value 2; + } + + // Suspend + enum suspend { + value 3; + } + } + default "unknown"; + } + + typedef action_Descr { + type string; + } + + // Frequency of the task + typedef action_Freq { + type string; + } + + typedef action_OperSt { + type enumeration { + + // Scheduled + enum scheduled { + value 0; + } + + // Processing + enum processing { + value 1; + } + + // Completed + enum completed { + value 2; + } + + // Cancelled + enum cancelled { + value 3; + } + + // Failed + enum failed { + value 4; + } + + // Indeterminate + enum indeterminate { + value 5; + } + + // Suspended + enum suspended { + value 6; + } + + // Crash-Suspect + enum crashsuspect { + value 7; + } + } + default "scheduled"; + } + + // Task status qualifier + typedef action_Qual { + type string; + } + + // Result history retention size: how many records + // to keep per rule + typedef action_RetentionSize { + type uint16 { + range "1..1024"; + } + default "100"; + } + + // Resuilt history retention time: how long records are + // to be kept per rule + typedef action_RetentionTime { + type string; + } + + // Type of the task + typedef action_Type { + type enumeration { + + // Clear + enum clear { + value 1; + } + + // Reset + enum reset { + value 2; + } + + // Reload + enum reload { + value 3; + } + + // Locate + enum locate { + value 4; + } + + // Install + enum install { + value 5; + } + + // Test + enum test { + value 6; + } + + // Collect + enum collect { + value 7; + } + + // Set Interface In-Service + enum interface-in-service { + value 8; + } + } + default "clear"; + } + + // Global access controls + typedef actrl_AccControl { + + // bits- Using string + type string; + } + + // Rule direction + typedef actrl_Direction { + type enumeration { + + // Uni-directional + enum uni-dir { + value 1; + } + + // Bi-directional + enum bi-dir { + value 2; + } + } + default "uni-dir"; + } + + // Entry priority, this is the priority for entry + typedef actrl_EntryPrio { + type uint8 { + range "1..7"; + } + default "7"; + } + + // Filter id + // @@@ Keep this in sync with vzFltId. + // @@@ Only way to moving FltId from 16 to 32 bits without dropping traffic + // @@@ during upgrade, was to introduce vzFiltId (16 bits) + typedef actrl_FltId { + + // MAX Converted to int from 0xffffffff + type uint32 { + range "1..4294967295"; + } + } + + // Log clear interval + typedef actrl_LogClrIntvl { + type uint16 { + range "1000..2800"; + } + default "2800"; + } + + // Operational state of Rule + typedef actrl_OperSt { + type enumeration { + + // enabled + enum enabled { + value 1; + } + + // disabled + enum disabled { + value 2; + } + } + default "disabled"; + } + + // Reasons for rule being disabled. + typedef actrl_OperStQual { + + // bits- Using string + type string; + } + + // PPF Node id + typedef actrl_PpfNodeId { + + // MAX Converted to int from 0xffffffff + type uint32 { + range "1..4294967295"; + } + } + + // Array PPF Node id + typedef actrl_PpfNodeIdArray { + type mtx_array_uint32; + } + + // Rule id + typedef actrl_RuleId { + + // MAX Converted to int from 0xffffffff + type uint32 { + range "1..4294967295"; + } + } + + // Filter to Rule ID mapping array + typedef actrl_RuleIdArray { + type mtx_array_uint32; + } + + // Rule ID array index + typedef actrl_RuleIndex { + type uint16 { + range "1..1024"; + } + } + + // Rule priority, this is the priority for a set of rules + typedef actrl_RulePrio { + type uint8 { + range "1..11"; + } + } + + // Rule type + typedef actrl_RuleT { + type enumeration { + + // Tenant + enum tenant { + value 1; + } + + // Management + enum mgmt { + value 2; + } + + // SNMP + enum snmp { + value 3; + } + + // Flood + enum bd_flood { + value 4; + } + + // Vrf + enum vrf_default { + value 5; + } + + // Infra + enum infra { + value 6; + } + } + default "tenant"; + } + + // Scope id (24-bit) + typedef actrl_ScopeId { + + // MAX Converted to int from 0xffffff + type uint32 { + range "1..16777215"; + } + default "1"; + } + + // Security Label (12-bit) + typedef actrl_SecLbl { + + // MAX Converted to int from 0xfff + type uint16 { + range "1..4095"; + } + } + + // Subject represents the entitiy to which the capability constraint gets applied + typedef actrlcap_Subj { + type enumeration { + + // Unknown + enum unknown { + value 0; + } + + // Actrl Rules + enum rule-namespace { + value 1; + } + + // Actrl Scopes + enum scope-namespace { + value 2; + } + } + default "unknown"; + } + + typedef address_Email { + type string; + } + + typedef address_HostNameOrDottedQuad { + type string { + length "1..256"; + } + } + + typedef address_Phone { + type string; + } + + // Adjacency Flags + typedef adjacency_AdjFlags { + + // bits- Using string + type string; + } + + // Adjacency operational state + typedef adjacency_AdjOperSt { + type enumeration { + + // Unknown + enum unspecified { + value 0; + } + + // Incomplete + enum incomplete { + value 1; + } + + // Resolved + enum normal { + value 2; + } + } + } + + // Database type + typedef adjacency_DbT { + type enumeration { + + // IP database + enum ip { + value 1; + } + + // IPv6 database + enum ipv6 { + value 2; + } + } + default "ip"; + } + + typedef aggregate_AdminState { + type enumeration { + + // Unknown + enum unknown { + value 0; + } + + // Up + enum up { + value 1; + } + + // Down + enum down { + value 2; + } + } + default "down"; + } + + // Address Family Type + typedef aggregate_AfT { + type enumeration { + + // Ipv4 unicast address family + enum ipv4-ucast { + value 0; + } + + // Vpnv4 unicast address family + enum vpnv4-ucast { + value 1; + } + + // Ipv6 unicast address family + enum ipv6-ucast { + value 2; + } + + // Vpnv6 unicast address family + enum vpnv6-ucast { + value 3; + } + + // L2-Evpn unicast address family + enum l2-evpn { + value 4; + } + } + default "l2-evpn"; + } + + typedef aggregate_BfdStatus { + type enumeration { + + // Unknown + enum unknown { + value 0; + } + + // Admin Down + enum admin_down { + value 1; + } + + // Oper Down + enum down { + value 2; + } + + // Intialization + enum init { + value 3; + } + + // Up + enum up { + value 4; + } + } + default "admin_down"; + } + + typedef aggregate_BooleanFlag { + type enumeration { + + // No + enum no { + value 0; + } + + // Yes + enum yes { + value 1; + } + } + default "no"; + } + + // + // + // + // + // + // + // + // + // + // + // + // + // Bandwidth metric of the SVI in kilobits per second. + typedef aggregate_Bw { + type uint32 { + range "1..400000000"; + } + default "10000000"; + } + + typedef aggregate_ConfTmplStatus { + type enumeration { + + // ConfigTmplInactive + enum inactive { + value 0; + } + + // ConfigTmplOperational + enum active { + value 1; + } + + // ConfigTmplFailed + enum failed { + value 2; + } + } + default "inactive"; + } + + typedef aggregate_ConfigMgmtStatus { + type enumeration { + + // Unknown + enum unknown { + value 0; + } + + // ConfigMgmtReady + enum configMgmtReady { + value 1; + } + + // ConfigMgmtNotReady + enum configMgmtNotReady { + value 2; + } + + // ConfigMgmtPurgeStart + enum configMgmtPurgeStart { + value 4; + } + } + default "configMgmtNotReady"; + } + + typedef aggregate_ConfigSourceType { + type enumeration { + + // Unknown + enum unknown { + value 0; + } + + // Cli + enum cli { + value 1; + } + + // Controller + enum controller { + value 2; + } + } + default "cli"; + } + + typedef aggregate_ConfigStatus { + type enumeration { + + // Unknown + enum unknown { + value 0; + } + + // ConfigReady + enum configReady { + value 1; + } + + // ConfigNotReady + enum configNotReady { + value 2; + } + + // ConfigPurgeInProgress + enum configPurgeInProgress { + value 4; + } + } + default "configNotReady"; + } + + typedef aggregate_ControllerID { + type uint32 { + range "0..16"; + } + default "0"; + } + + typedef aggregate_ControllerIdBitmap { + type mtx_array_bit; + } + + typedef aggregate_CpuType { + type string; + } + + typedef aggregate_CtrlrType { + type enumeration { + + // Unknown + enum unknown { + value 0; + } + + // L2Vxlan + enum l2-vxlan { + value 1; + } + + // Vxlan + enum vxlan { + value 2; + } + } + default "l2-vxlan"; + } + + // Default Value computed from unicast + typedef aggregate_EpType { + + // bits- Using string + type string; + default "unicast"; + } + + typedef aggregate_GroupAddr { + type string; + } + + typedef aggregate_HostReachabilityMode { + type enumeration { + + // Unknown + enum unknown { + value 0; + } + + // FloodAndLearn + enum floodAndLearn { + value 1; + } + + // Controller + enum controller { + value 2; + } + + // Bgp + enum bgp { + value 3; + } + } + default "floodAndLearn"; + } + + typedef aggregate_IngressRepProtocolType { + type enumeration { + + // Unknown + enum unknown { + value 0; + } + + // Static + enum static { + value 1; + } + + // Bgp + enum bgp { + value 2; + } + } + default "unknown"; + } + + typedef aggregate_IntfAssignMode { + type enumeration { + + // Dedicated + enum dedicated { + value 0; + } + + // Shared + enum shared { + value 1; + } + } + } + + typedef aggregate_IntfType { + type enumeration { + + // Unknown + enum unknown { + value 0; + } + + // Port + enum port { + value 1; + } + + // Port Channel + enum port-channel { + value 2; + } + + // Tunnel + enum tunnel { + value 3; + } + + // Loopback + enum loopback { + value 4; + } + + // SVI + enum svi { + value 5; + } + } + } + + typedef aggregate_MTU { + type uint32 { + range "1..9216"; + } + default "9216"; + } + + // Mac type + typedef aggregate_MacType { + type enumeration { + + // Unknown + enum unknown { + value 0; + } + + // Unicast + enum unicast { + value 1; + } + + // Multicast + enum multicast { + value 2; + } + } + default "unicast"; + } + + // Minimum rx interval (in ms) + typedef aggregate_MinRxIntvl { + type uint16 { + range "0..999"; + } + default "50"; + } + + // Minimum tx interval (in ms) + typedef aggregate_MinTxIntvl { + type uint16 { + range "0..999"; + } + default "50"; + } + + typedef aggregate_ModuleType { + type string; + } + + typedef aggregate_OperState { + type enumeration { + + // Unknown + enum unknown { + value 0; + } + + // Up + enum up { + value 1; + } + + // Down + enum down { + value 2; + } + } + default "down"; + } + + typedef aggregate_ReplicationModeType { + type enumeration { + + // Unknown + enum unknown { + value 0; + } + + // ReplicationServer + enum replicationServer { + value 1; + } + + // IngressReplication + enum ingressReplication { + value 2; + } + + // IpMulticast + enum ipMulticast { + value 3; + } + } + default "unknown"; + } + + typedef aggregate_ResourceStatus { + type enumeration { + + // Unknown + enum unknown { + value 0; + } + + // VlanCreated + enum vlanCreated { + value 1; + } + + // VlanFailed + enum vlanFailed { + value 2; + } + + // VnidCreated + enum vnidCreated { + value 3; + } + + // VnidFailed + enum vnidFailed { + value 4; + } + + // VlansCarved + enum vlansCarved { + value 5; + } + + // VlansNotCarved + enum vlansNotCarved { + value 6; + } + + // VnidCreationReceived + enum vnidCreationReceived { + value 7; + } + + // MyTEPIPPublished + enum myTEPIPPublished { + value 101; + } + + // ControllerIntfNotCarved + enum controllerIntfNotCarved { + value 201; + } + + // ControllerIntfCarved + enum controllerIntfCarved { + value 202; + } + } + default "unknown"; + } + + // Route target policy type + typedef aggregate_RttPType { + type enumeration { + + // Import + enum import { + value 1; + } + + // Export + enum export { + value 2; + } + } + default "import"; + } + + typedef aggregate_TunnelType { + type enumeration { + + // Unknown + enum unknown { + value 0; + } + + // VxLanOverIPV4 + enum vxlanipv4 { + value 1; + } + + // VxLanOverIPV6 + enum vxlanipv6 { + value 2; + } + + // NVGRE + enum nvgre { + value 3; + } + } + } + + typedef aggregate_VpcKeepaliveStatus { + type enumeration { + + // VpcOobUnknown + enum VpcOobUnknown { + value 0; + } + + // VpcOobDisabled + enum VpcOobDisabled { + value 1; + } + + // VpcOobPeerAlive + enum VpcOobPeerAlive { + value 2; + } + + // VpcOobPeerNotAlive + enum VpcOobPeerNotAlive { + value 3; + } + + // VpcOobPeerAliveDomainMismatch + enum VpcOobPeerAliveDomainMismatch { + value 4; + } + + // VpcOobSuspended + enum VpcOobSuspended { + value 5; + } + + // VpcOobNotOperational + enum VpcOobNotOperational { + value 6; + } + + // VpcOobSuspendedVrf + enum VpcOobSuspendedVrf { + value 7; + } + + // VpcOobMisconfig + enum VpcOobMisconfig { + value 8; + } + } + default "VpcOobUnknown"; + } + + typedef aggregate_VpcOperStatus { + type enumeration { + + // down + enum down { + value 0; + } + + // up + enum up { + value 1; + } + } + default "down"; + } + + typedef aggregate_VpcPeerLinkStatus { + type enumeration { + + // VpcPeerNolink + enum VpcPeerNolink { + value 0; + } + + // VpcPeerLinkDown + enum VpcPeerLinkDown { + value 1; + } + + // VpcPeerOk + enum VpcPeerOk { + value 2; + } + + // VpcPeerNotfound + enum VpcPeerNotfound { + value 3; + } + } + default "VpcPeerNolink"; + } + + // Fabric Forwarding Mode + typedef aggregate_fabFwdMode { + type enumeration { + + // Standard + enum standard { + value 0; + } + + // Anycast Gateway + enum anycastgw { + value 1; + } + + // ProxyGw + enum proxygw { + value 2; + } + } + default "standard"; + } + + // Database type + typedef aib_DbT { + type enumeration { + + // Adjacency Database + enum adj { + value 1; + } + } + default "adj"; + } + + // Owner type + typedef aib_Owner { + type string; + } + + // Preference type + typedef aib_Pref { + + // MAX Converted to int from 0xffff + type uint16 { + range "1..65535"; + } + default "1"; + } + + // Update time stamp type + typedef aib_UpdateTs { + type string; + } + + // Burst interval shift + typedef analytics_BurstIntvlShift { + type uint8 { + range "0..255"; + } + default "0"; + } + + // Mode + typedef analytics_CModeT { + type enumeration { + + // ACI mode + enum aci { + value 0; + } + + // Standalone mode + enum standalone { + value 1; + } + } + default "aci"; + } + + // Collector buket identifier + typedef analytics_CollBucketId { + type uint8 { + range "1..255"; + } + } + + // Collect Interval + typedef analytics_CollIntvl { + type uint32 { + range "100..64000"; + } + default "100"; + } + + // Collector version + typedef analytics_CollVersion { + type enumeration { + + // Version 5 + enum v5 { + value 1; + } + + // Version 9 + enum v9 { + value 2; + } + + // Cisco proprietary version 1 + enum cisco-v1 { + value 3; + } + } + default "cisco-v1"; + } + + // Collect params + // Default Value computed from src-intf + typedef analytics_CollectParams { + + // bits- Using string + type string; + default "src-intf"; + } + + // Collector identifier + typedef analytics_CollectorId { + type uint32 { + range "0..65535"; + } + } + + // Default filtering policy type + typedef analytics_DefPolicyT { + type enumeration { + + // Permit + enum permit { + value 0; + } + + // Deny + enum deny { + value 1; + } + } + default "permit"; + } + + // Direction type + typedef analytics_DirectionT { + type enumeration { + + // Ingress + enum in { + value 1; + } + + // Egress + enum out { + value 2; + } + + // Both + enum both { + value 3; + } + } + default "in"; + } + + // IP filter type + typedef analytics_FltType { + type enumeration { + + // Ipv4 type + enum ipv4 { + value 1; + } + + // Ipv6 type + enum ipv6 { + value 2; + } + + // CE type + enum ce { + value 3; + } + } + default "ipv4"; + } + + // Forwarding instance target identifier + typedef analytics_FwdInstTargetId { + type uint32 { + range "0..16777215"; + } + } + + // Hash value + typedef analytics_HashT { + type uint32 { + range "0..4294967295"; + } + default "0"; + } + + // Hash width type + typedef analytics_HashWidthT { + type uint16 { + range "1..255"; + } + default "12"; + } + + // IP packet identifier shift + typedef analytics_IpPktIdShift { + type uint8 { + range "0..255"; + } + default "0"; + } + + // Layer4 port + typedef analytics_L4Port { + type uint32 { + range "1..65535"; + } + } + + // Match params + // Default Value computed from src-ipv4 + typedef analytics_MatchParams { + + // bits- Using string + type string; + default "src-ipv4"; + } + + // Mode + typedef analytics_ModeT { + type enumeration { + + // Analytics mode + enum analytics { + value 0; + } + + // Netflow mode + enum netflow { + value 1; + } + } + default "netflow"; + } + + // MTU + typedef analytics_Mtu { + type uint16 { + range "576..9216"; + } + default "1500"; + } + + // Operational state of Rule + typedef analytics_OperSt { + type enumeration { + + // enabled + enum enabled { + value 1; + } + + // disabled + enum disabled { + value 2; + } + } + default "disabled"; + } + + // Reasons for rule being disabled. + typedef analytics_OperStQual { + + // bits- Using string + type string; + } + + // Payload length identifier + typedef analytics_PayloadLenIdT { + type uint8 { + range "0..10"; + } + } + + // Payload length + typedef analytics_PayloadLenT { + + // MAX Converted to int from 0x3fff + type uint32 { + range "0..16383"; + } + default "0"; + } + + // Receive window size identifier + typedef analytics_RcvWindowSzIdT { + type uint8 { + range "0..4"; + } + } + + // Receive window size + typedef analytics_RcvWindowSzT { + type uint32 { + range "0..65535"; + } + default "0"; + } + + // Sample size + typedef analytics_SampleSzT { + type uint32 { + range "1..65535"; + } + default "1"; + } + + // Sampler mode + typedef analytics_SamplerMode { + type enumeration { + + // M out of N flows + enum flow { + value 1; + } + + // M out of N pkts + enum pkts { + value 2; + } + } + default "flow"; + } + + // TCP options header length identifier + typedef analytics_TCPOptHdrLenIdT { + type uint8 { + range "0..6"; + } + } + + // TCP options header length + typedef analytics_TCPOptHdrLenT { + type uint32 { + range "0..15"; + } + default "0"; + } + + // Sequence number guess threshold + typedef analytics_ThresholdT { + type uint32 { + range "0..4294967295"; + } + default "0"; + } + + // Create Count + typedef analytics_createCount { + type uint32 { + range "0..16777215"; + } + default "0"; + } + + // Hit Count + typedef analytics_hitCount { + type uint32 { + range "0..16777215"; + } + default "0"; + } + + // Num tcam entries type + typedef analytics_numTcamEntT { + type uint32 { + range "1..65535"; + } + default "1024"; + } + + // Num tcam entries per V4 type + typedef analytics_numTcamEntV4T { + type uint16 { + range "1..256"; + } + default "1"; + } + + // Num tcam entries per V6 type + typedef analytics_numTcamEntV6T { + type uint16 { + range "1..256"; + } + default "4"; + } + + // Adjacency Flags + typedef arp_AdjFlags { + + // bits- Using string + type string; + } + + // Adjacency operational state + typedef arp_AdjOperSt { + type enumeration { + + // Unknown + enum unspecified { + value 0; + } + + // Incomplete + enum incomplete { + value 1; + } + + // Resolved + enum normal { + value 2; + } + } + } + + typedef arp_AdjRouteDist { + type uint32 { + range "2..250"; + } + default "250"; + } + + // ARP Cache Limit + typedef arp_ArpCacheLimit { + type uint32 { + range "1..614400"; + } + default "174080"; + } + + // ARP Cache Syslog Rate + typedef arp_ArpCacheSyslogRate { + type uint32 { + range "1..1000"; + } + default "1"; + } + + // Config Error + typedef arp_ConfigErr { + + // bits- Using string + type string; + } + + // Config Error Inst MO + typedef arp_ConfigErrInst { + + // bits- Using string + type string; + } + + // Database type + typedef arp_DbT { + type enumeration { + + // IP database + enum ip { + value 1; + } + + // SupCache database + enum supcache { + value 2; + } + } + default "ip"; + } + + // Event History Size + typedef arp_EventLogSize { + type enumeration { + + // Disable + enum disabled { + value 0; + } + + // Small + enum small { + value 1; + } + + // Medium + enum medium { + value 2; + } + + // Large + enum large { + value 3; + } + } + default "small"; + } + + // Event Log Type + typedef arp_EventType { + type enumeration { + + // CLI Events + enum cli { + value 0; + } + + // Client Events + enum client-events { + value 1; + } + + // Client Errors + enum client-errors { + value 2; + } + + // Control Events + enum control-events { + value 3; + } + + // Internal Events + enum internal-events { + value 4; + } + + // Internal Errors + enum internal-errors { + value 5; + } + + // High Availability Events + enum high-availability { + value 6; + } + + // IP Sync Events + enum ip-sync { + value 7; + } + + // ARP Local Cache Events + enum local-cache-events { + value 8; + } + + // ARP Local Cache Errors + enum local-cache-errors { + value 9; + } + + // Packet Messages Logs + enum pkt-messages { + value 10; + } + + // SNMP Events + enum snmp { + value 11; + } + + // ARP Suppression Events + enum suppress-events { + value 12; + } + + // ARP Suppression Errors + enum suppress-errors { + value 13; + } + + // Sync Event Logs + enum sync { + value 14; + } + + // Controller MAC-IP route error logs + enum arp-controller-errors { + value 15; + } + + // DME debug event + enum arp-dme-event { + value 16; + } + + // Adjacency Control Logs + enum adjacency-control { + value 101; + } + + // Adjacency Error Logs + enum adjacency-errors { + value 102; + } + + // Adjacency IPC Logs + enum adjacency-ipc-events { + value 103; + } + + // Adjacency Stats Logs + enum adjacency-stats { + value 104; + } + + // Adjacency High Availability Logs + enum adjacency-high-availability { + value 105; + } + + // Adjacency CLI Logs + enum adjacency-cli { + value 106; + } + + // Adjacency SDB Logs + enum adjacency-sdb { + value 107; + } + + // Adjacency SNMP Logs + enum adjacency-snmp { + value 108; + } + + // Adjacency Net Broker Logs + enum adjacency-netbroker { + value 109; + } + + // Adjacency DME event debugs + enum am-dme-event { + value 110; + } + + // Adjacency event debugs + enum am-event { + value 111; + } + } + } + + // Logging Level + typedef arp_LoggingLevel { + type enumeration { + + // Emergency + enum emergency { + value 0; + } + + // Alert + enum alert { + value 1; + } + + // Critical + enum critical { + value 2; + } + + // Error + enum error { + value 3; + } + + // Warning + enum warning { + value 4; + } + + // Notification + enum notification { + value 5; + } + + // Informational + enum informational { + value 6; + } + + // Debug + enum debug { + value 7; + } + } + default "error"; + } + + // MAC Delete adjaceny refresh timeout + typedef arp_MacDelTimeout { + type uint16; + } + + // Max packet count + typedef arp_MaxPacket { + type uint32 { + range "0..32767"; + } + default "1000"; + } + + // ARP off list timeout + typedef arp_OffListTimeout { + type uint16 { + range "180..1800"; + } + default "180"; + } + + // Opcode + typedef arp_Opcode { + type enumeration { + + // Unspecified + enum unspecified { + value 0; + } + + // ARP request + enum req { + value 1; + } + + // ARP reply + enum reply { + value 2; + } + } + default "unspecified"; + } + + // RARP Fabric Forwarding Rate Limit + typedef arp_RarpForwadingRate { + type uint16 { + range "200..400"; + } + default "200"; + } + + // Static Adjacency operational state + typedef arp_StAdjOperSt { + type enumeration { + + // Down + enum down { + value 0; + } + + // Incomplete + enum up { + value 1; + } + + // Unspecified + enum unspecified { + value 10; + } + } + default "unspecified"; + } + + // Static Adjacency operational state qualifier + typedef arp_StAdjOperStQual { + type enumeration { + + // Unspecified + enum unspecified { + value 0; + } + + // Subnet mismatch + enum subnet-mismatch { + value 1; + } + + // Invalid MAC + enum invalid-mac { + value 2; + } + + // Invalid IP + enum invalid-ip { + value 3; + } + + // Invalid VRF + enum invalid-vrf { + value 4; + } + + // Own MAC + enum own-mac { + value 5; + } + + // Interface down + enum if-down { + value 6; + } + + // Up + enum up { + value 7; + } + + // Invalid Interface + enum invalid-if { + value 8; + } + + // Invalid CLI Data + enum invalid-clidata { + value 9; + } + + // No Memory + enum no-memory { + value 10; + } + } + default "unspecified"; + } + + // Suppression Cache flag + typedef arp_SupCacheFlag { + + // bits- Using string + type string; + } + + // Suppression ARP Mode + typedef arp_SuppressArpMode { + type enumeration { + + // Disabled + enum disabled { + value 0; + } + + // L2SuppressARP + enum l2suppressarp { + value 1; + } + + // L2L3SuppressARP + enum l2l3suppressarp { + value 2; + } + + // Invalid + enum invalid { + value 3; + } + } + } + + // ARP suppress timeout + typedef arp_SuppressionTimeout { + type uint16 { + range "0..28800"; + } + default "0"; + } + + // Syslog threshold + typedef arp_SyslogCnt { + type uint32 { + range "0..65535"; + } + default "10000"; + } + + // throttle timeout + typedef arp_ThrottleTimeout { + type uint16 { + range "300..1800"; + } + default "300"; + } + + // ARP timeout + typedef arp_Timeout { + type uint16 { + range "60..28800"; + } + default "1500"; + } + + // Default SVI autoState + typedef bd_DefaultSVIAutoState { + type enumeration { + enum disable { + value 0; + } + enum enable { + value 1; + } + } + default "enable"; + } + + // Address family type + typedef bfd_AfT { + type enumeration { + + // IPv4 address family + enum ipv4 { + value 1; + } + + // IPv6 address family + enum ipv6 { + value 2; + } + } + default "ipv4"; + } + + // Application private data + typedef bfd_AppData { + type mtx_array_uint8; + } + + // Application session flags + typedef bfd_AppFlags { + + // bits- Using string + type string; + } + + // Application ID + typedef bfd_AppId { + type uint32; + } + + // Authentication hex key + typedef bfd_AuthHexKey { + type mtx_array_uint8; + } + + // Authentication hex key size + typedef bfd_AuthHexKeySize { + type uint8 { + range "0..40"; + } + } + + // Authentication key + typedef bfd_AuthKey { + type string { + length "min..20"; + } + } + + // Authentication key id + typedef bfd_AuthKeyId { + type uint8 { + range "1..255"; + } + } + + // Authentication Sequence Number + typedef bfd_AuthSeqno { + type uint32; + } + + // Authentication type + typedef bfd_AuthT { + type enumeration { + + // No authentication + enum none { + value 0; + } + + // Keyed SHA1 + enum sha1 { + value 4; + } + + // Met Keyed SHA1 + enum met-sha1 { + value 5; + } + } + default "none"; + } + + // Current session index + typedef bfd_CurSessIndex { + type uint32; + } + + // Detection multiplier + typedef bfd_DetectMult { + type uint8 { + range "1..50"; + } + default "3"; + } + + // Diag Code + typedef bfd_DiagCode { + type enumeration { + + // No Diagnostic + enum none { + value 0; + } + + // Control Detection Time Expired + enum detect-timeout { + value 1; + } + + // Echo Function Failed + enum echo-fail { + value 2; + } + + // Neighbor Signaled Session Down + enum nbr-signal-down { + value 3; + } + + // Forwarding Plane Reset + enum fwd-plane-reset { + value 4; + } + + // Path Down + enum path-down { + value 5; + } + + // Concatenated Path Down + enum concat-path-down { + value 6; + } + + // Administratively Down + enum admin-down { + value 7; + } + + // Reverse Concatenated Path Down + enum rev-concat-path-down { + value 8; + } + } + } + + // Session discriminator + typedef bfd_Discr { + type uint32; + } + + // echo rx interval (in ms) + typedef bfd_EchoRxIntvl { + type uint16 { + range "0..999"; + } + default "0"; + } + + typedef bfd_IfControl { + + // bits- Using string + type string; + } + + // Interface Detection multiplier + typedef bfd_IfDetectMult { + type uint8 { + range "0..50"; + } + default "0"; + } + + // Interface Minimum rx interval (in ms) + typedef bfd_IfMinRxIntvl { + type uint16 { + range "0..999"; + } + default "0"; + } + + // Interface Minimum tx interval (in ms) + typedef bfd_IfMinTxIntvl { + type uint16 { + range "0..999"; + } + default "0"; + } + + // Global flags + typedef bfd_InstFlags { + + // bits- Using string + type string; + } + + // Minimum rx interval (in ms) + typedef bfd_MinRxIntvl { + type uint16 { + range "50..999"; + } + default "50"; + } + + // Minimum tx interval (in ms) + typedef bfd_MinTxIntvl { + type uint16 { + range "50..999"; + } + default "50"; + } + + // Oper State + typedef bfd_OperSt { + type enumeration { + + // AdminDown + enum admin-down { + value 0; + } + + // Down + enum down { + value 1; + } + + // Init + enum init { + value 2; + } + + // Up + enum up { + value 3; + } + } + } + + // Packet flags + typedef bfd_PktFlags { + + // bits- Using string + type string; + } + + // Packet Interval (in ms) + typedef bfd_PktInterval { + type uint32; + } + + // Application sap ID + typedef bfd_SapId { + type uint32; + } + + // Slow interval (in ms) + typedef bfd_SlowIntvl { + type uint16 { + range "1000..30000"; + } + default "2000"; + } + + // BFD Start timeout + // Default Value "0" Removed - out of range 60..3600 + typedef bfd_StTm { + type uint32 { + range "60..3600"; + } + } + + // Startup interval (in second) + typedef bfd_StartupIntvl { + type uint16 { + range "0..30"; + } + default "5"; + } + + // BFD Cfg State + typedef bfd_TrkMbrLnk { + type enumeration { + + // Enabled + enum enable { + value 1; + } + + // Disabled + enum disable { + value 0; + } + } + default "disable"; + } + + // Additional Paths capability in DomAf + typedef bgp_AddlPathCapT { + + // bits- Using string + type string; + } + + // Administrative state + typedef bgp_AdminSt { + type enumeration { + + // Enabled + enum enabled { + value 1; + } + + // Disabled + enum disabled { + value 2; + } + } + default "disabled"; + } + + // Advertisement Interval + typedef bgp_AdvInterval { + type uint16 { + range "0..600"; + } + } + + // Advertise l2vpn evpn + typedef bgp_AdvertL2vpnEvpn { + type enumeration { + + // Enabled + enum enabled { + value 1; + } + + // Disabled + enum disabled { + value 0; + } + } + default "disabled"; + } + + typedef bgp_AdvtMapCondition { + type enumeration { + + // no options + enum none { + value 0; + } + + // Exist Route Map + enum exist { + value 1; + } + + // Non-Exist Route Map + enum non-exist { + value 2; + } + } + default "none"; + } + + // Address family type + typedef bgp_AfT { + type enumeration { + + // IPv4 unicast address family + enum ipv4-ucast { + value 1; + } + + // IPv4 multicast address family + enum ipv4-mcast { + value 2; + } + + // Vpnv4 unicast address family + enum vpnv4-ucast { + value 3; + } + + // IPv6 unicast address family + enum ipv6-ucast { + value 5; + } + + // IPv6 multicast address family + enum ipv6-mcast { + value 6; + } + + // Vpnv6 unicast address family + enum vpnv6-ucast { + value 7; + } + + // L2Vpn EVpn address family + enum l2vpn-evpn { + value 9; + } + + // IPv4 labeled unicast address family + enum ipv4-lucast { + value 10; + } + + // IPv6 labeled unicast address family + enum ipv6-lucast { + value 11; + } + + // Link state address family + enum lnkstate { + value 12; + } + + // IPv4 mvpn address family + enum ipv4-mvpn { + value 13; + } + + // IPv6 mvpn address family + enum ipv6-mvpn { + value 14; + } + + // L2Vpn vpls address family + enum l2vpn-vpls { + value 15; + } + + // IPv4 mdt address family + enum ipv4-mdt { + value 16; + } + } + default "ipv4-ucast"; + } + + // Activate the affinity group + typedef bgp_AffGrpActv { + type uint16 { + range "0..65535"; + } + } + + // AS path database size + typedef bgp_AsPathDbSz { + type uint32; + } + + // AS segment type + typedef bgp_AsSegT { + type enumeration { + + // Sequence + enum sequence { + value 1; + } + + // Set + enum set { + value 2; + } + } + default "set"; + } + + // AS Set + typedef bgp_AsSet { + type enumeration { + + // Enabled + enum enabled { + value 1; + } + + // Disabled + enum disabled { + value 0; + } + } + default "disabled"; + } + + // Asn number + typedef bgp_AsnNum { + type string; + } + + // Customizes AS_PATH attribute for routes received from eBGP neighbor + typedef bgp_AsnPropagation { + type enumeration { + + // no options + enum none { + value 0; + } + + // no-prepend + enum no-prepend { + value 1; + } + + // no-prepend+replace-as + enum replace-as { + value 2; + } + + // noPrepend+replace-as+dual-as + enum dual-as { + value 3; + } + } + default "none"; + } + + // Attribute database size + typedef bgp_AttribDbSz { + type uint32; + } + + // BestPath Timeout Limit + typedef bgp_BestPathIntvl { + type uint16 { + range "1..3600"; + } + default "300"; + } + + // BMP server state + typedef bgp_BmpSt { + type enumeration { + + // Enabled + enum enabled { + value 0; + } + + // Disabled + enum disabled { + value 1; + } + } + default "enabled"; + } + + // Additional Paths capability in Neighbor Af + typedef bgp_CapAddlPathCapT { + + // bits- Using string + type string; + } + + // Capability type + typedef bgp_CapT { + + // bits- Using string + type string; + } + + // Cluster ID + typedef bgp_ClusterId { + type string; + } + + // Connection Attempts + typedef bgp_ConnAttempts { + type uint32; + default "0"; + } + + // Connection info + typedef bgp_ConnMode { + + // bits- Using string + type string; + } + + // BGP Distance + typedef bgp_Distance { + type uint16 { + range "1..255"; + } + } + + // VRF Id + typedef bgp_DomId { + type uint32; + } + + // Domain operational state + typedef bgp_DomOperSt { + type enumeration { + + // Unknown + enum unknown { + value 0; + } + + // Up + enum up { + value 1; + } + + // Down + enum down { + value 2; + } + } + default "unknown"; + } + + // Egress Peer Engineering EPE for neighbor status + typedef bgp_EgressPeerEng { + type enumeration { + + // Disabled + enum none { + value 0; + } + + // Egress Peer Engineering Enabled + enum enabled { + value 1; + } + + // Advertise Adjacency-SIDs for multi-hop neighbor paths + enum enabled-adj-sid { + value 2; + } + } + default "none"; + } + + // Event History Buffer Type + typedef bgp_EhType { + type enumeration { + enum none { + value 0; + } + + // Cli buffer + enum cli { + value 1; + } + + // Events buffer + enum events { + value 2; + } + + // Periodic buffer + enum periodic { + value 3; + } + + // Detailed buffer + enum detail { + value 4; + } + + // Errors buffer + enum errors { + value 5; + } + + // Objstore buffer + enum objstore { + value 6; + } + } + default "none"; + } + + // EVPN route-type + typedef bgp_EvpnRtType { + type enumeration { + + // Unspecified + enum none { + value 0; + } + + // Ethernet Auto-Discovery route + enum a-d { + value 1; + } + + // MAC/IP Advertisement route + enum mac-ip { + value 2; + } + + // Inclusive Multicast Ethernet Tag route + enum imet { + value 3; + } + + // Ethernet Segment route + enum eth-seg { + value 4; + } + + // IP Prefix route + enum ip-pfx { + value 5; + } + } + default "none"; + } + + // Graceful restart controls + // Default Value computed from complete + typedef bgp_GrCtrl { + + // bits- Using string + type string; + default "complete"; + } + + // Graceful restart interval + typedef bgp_GrIntvl { + type uint16 { + range "1..3600"; + } + default "120"; + } + + // Graceful stale interval + typedef bgp_GrStaleIntvl { + type uint16 { + range "1..3600"; + } + default "300"; + } + + // Hold Interval + typedef bgp_HoldIntvl { + type uint16 { + range "3..3600"; + } + default "180"; + } + + // IGP Preference + typedef bgp_IgpPref { + type uint8; + } + + // IGP Route Type + typedef bgp_IgpRtType { + type uint8; + } + + // Inherit template peer control bits. This contains common fields of peer and peer-session templates (please refer to + // MOs PeerCont and SessionCont). + typedef bgp_InheritContPeerCtrlType { + + // bits- Using string + type string; + } + + // Inherit template peer-policy control bits. (Please refer + // to MO PolicyCont). + typedef bgp_InheritContPeerPolicyCtrlType { + + // bits- Using string + type string; + } + + // Keepalive Interval + typedef bgp_KaIntvl { + type uint16 { + range "0..3600"; + } + default "60"; + } + + // Last error len + typedef bgp_LastErrLen { + type uint8; + } + + // Last error value + typedef bgp_LastErrVal { + type uint32; + } + + // NH iLast Resolved Timestamp + typedef bgp_LastResolvTs { + type string; + default "0"; + } + + // Label + typedef bgp_Lbl { + type uint32; + default "0"; + } + + // Link Attribute TLV flags for Link-state + // Default Value computed from none + typedef bgp_LnkLsAttrFlags { + + // bits- Using string + type string; + default "none"; + } + + // Log Neighbor changes + typedef bgp_LogNbrSt { + type enumeration { + + // none + enum none { + value 0; + } + + // Enable + enum enable { + value 1; + } + + // Disable + enum disable { + value 2; + } + } + default "none"; + } + + // Link-State status + typedef bgp_LsAdminSt { + type enumeration { + + // Inactive + enum inactive { + value 0; + } + + // Active + enum active { + value 1; + } + } + default "inactive"; + } + + // Link-State attribute entry type + typedef bgp_LsAttrEntryType { + type enumeration { + + // Unspecified + enum none { + value 0; + } + + // Peer Node Segment Identifier + enum peer-node-sid { + value 1101; + } + + // Peer Adjacency Segment Identifier + enum peer-adj-sid { + value 1102; + } + + // Peer Set Segment Identifier + enum peer-set-sid { + value 1103; + } + } + default "none"; + } + + // Link-State NLRI Type + typedef bgp_LsNlriType { + type enumeration { + + // Unspecified + enum none { + value 0; + } + + // Node NLRI + enum node { + value 1; + } + + // Link NLRI + enum link { + value 2; + } + + // IPv4 Topology Prefix NLRI + enum ipv4-topo { + value 3; + } + + // IPv6 Topology Prefix NLRI + enum ipv6-topo { + value 4; + } + } + default "none"; + } + + // Link-State Protocol Identifier + typedef bgp_LsProtoId { + type enumeration { + + // Unspecified + enum none { + value 0; + } + + // IS-IS Level 1 + enum isis-l1 { + value 1; + } + + // IS-IS Level 2 + enum isis-l2 { + value 2; + } + + // OSPFv2 + enum ospf-v2 { + value 3; + } + + // Direct + enum direct { + value 4; + } + + // Static configuration + enum static { + value 5; + } + + // OSPFv3 + enum ospf-v3 { + value 6; + } + + // Egress Peer Engineering + enum epe { + value 7; + } + } + default "none"; + } + + // Major notify error + typedef bgp_MajNotifErr { + type enumeration { + + // None + enum none { + value 0; + } + + // Header Error + enum hdr-err { + value 1; + } + + // Open Message Error + enum open-msg-err { + value 2; + } + + // Update Message Error + enum upd-msg-err { + value 3; + } + + // Holdtimer Expired + enum hold-timer-exp { + value 4; + } + + // FSM Error + enum fsm-err { + value 5; + } + + // Cease Error + enum cease-err { + value 6; + } + + // Capability Message Error + enum cap-msg-err { + value 7; + } + + // Process Restart Error + enum process-restart-err { + value 101; + } + + // FD Read Error + enum fd-read-err { + value 102; + } + + // FD Ioctl Error + enum fd-ioctl-err { + value 103; + } + + // Peer Closed Session Error + enum peer-close-sess-err { + value 104; + } + + // Peer Received Notification Error + enum rcvd-notif-err { + value 105; + } + + // Received Duplicate Connection Request + enum rcvd-dup-conn-req { + value 106; + } + + // Dynamic Capability no Buffer + enum dyn-cap-no-buf { + value 107; + } + } + } + + // Maximum AS Limit + typedef bgp_MaxAsLimit { + type uint16 { + range "0..512"; + } + } + + // Maximum Ecmp + typedef bgp_MaxEcmp { + type uint8 { + range "1..64"; + } + default "1"; + } + + // Maximum Peers + typedef bgp_MaxPeerCnt { + type uint32 { + range "0..1000"; + } + } + + // Maximum Prefix + typedef bgp_MaxPfx { + type uint32; + } + + // Action when the prefixes crosses the maximum limit + typedef bgp_MaxPfxAct { + type enumeration { + + // Log + enum log { + value 1; + } + + // Shutdown + enum shut { + value 2; + } + + // Restart + enum restart { + value 3; + } + } + default "shut"; + } + + // Duration before we restart the peer when the maximum + // prefix limit is reached + typedef bgp_MaxPfxDuration { + + // MAX Converted to int from 0xffff + type uint16 { + range "0..65535"; + } + } + + // Threshold at which warning is issued when number of prefixes + // crosses the threshold, units in percentage + typedef bgp_MaxPfxThresh { + type uint8 { + range "0..100"; + } + } + + // MED dampening interval + typedef bgp_MedIntvl { + type uint32 { + range "0..4294967295"; + } + } + + // Memory consumed (in bytes) + typedef bgp_MemConsumed { + type uint32; + } + + // Metric + typedef bgp_Metric { + type uint32; + } + + // Minor notify error + typedef bgp_MinNotifErr { + type enumeration { + + // None + enum none { + value 0; + } + + // Unspecified Msg Header Error + enum unspecified-msg-hdr-err { + value 1; + } + + // Connection not Synchronized + enum conn-not-synced { + value 2; + } + + // Bad Message Length + enum bad-msg-len { + value 3; + } + + // Bad Message Type + enum bad-msg-type { + value 4; + } + + // Unknown Message Header Error + enum unknown-msg-hdr-err { + value 5; + } + + // Unspecified Open Error + enum unspecified-open-err { + value 6; + } + + // Unsupported Version + enum unsupp-version { + value 7; + } + + // Bad Peer AS + enum bad-peer-as { + value 8; + } + + // Bad Peer Router ID + enum bad-peer-rtrid { + value 9; + } + + // Unsupported Optional Parameter + enum unsupp-opt-param { + value 10; + } + + // Authentication Error + enum auth-err { + value 11; + } + + // Unacceptable Holdtime + enum bad-holdtime { + value 12; + } + + // Unsupported Capability + enum unsupp-cap { + value 13; + } + + // Unknown Open Header Error + enum unknown-open-hdr-err { + value 14; + } + + // Unspecified Update Error + enum unspecified-update-err { + value 15; + } + + // Malformed Attribute List + enum malformed-attr-list { + value 16; + } + + // Unrecognized Wellknown Attr + enum unrecognized-wellknown-attr { + value 17; + } + + // Missing Well-known Attribute + enum missing-wellknown-attr { + value 18; + } + + // Attribute Flags Error + enum attr-flags-err { + value 19; + } + + // Attribute Length Error + enum attr-len-err { + value 20; + } + + // Invalid Origin Attribute + enum invalid-origin-attr { + value 21; + } + + // Bgp AS Routing Loop Error + enum as-loop-err { + value 22; + } + + // Invalid Next-hop Attribute + enum invalid-nh-attr { + value 23; + } + + // Optional Attribute Error + enum opt-attr-err { + value 24; + } + + // Invalid Network Field + enum invalid-nw-field { + value 25; + } + + // Malformed AS Path + enum bad-as-path { + value 26; + } + + // Unknown Update Header Error + enum unknown-update-hdr-err { + value 27; + } + + // Unspecified Cease Error + enum unspecified-cease-err { + value 28; + } + + // Maximum Prefix Count + enum max-pfx-count-err { + value 29; + } + + // Administratively Shutdown + enum admin-shut { + value 30; + } + + // Peer Deconfigured + enum peer-decfg { + value 31; + } + + // Session Cleared + enum session-cleared { + value 32; + } + + // Connection Rejected + enum conn-rej { + value 33; + } + + // Other Configuration Change Error + enum other-cfg-chg { + value 34; + } + + // Connection Collision Resolution + enum conn-coll-resolution { + value 35; + } + + // Out of Resource + enum out-of-rsrc { + value 36; + } + + // Dynamic Capability Configuration Change + enum dyn-cap-cfg-chg { + value 37; + } + + // TTL Configuration Change + enum ttl-cfg-chg { + value 38; + } + + // TTL Security Configuration Change + enum ttl-security-cfg-chg { + value 39; + } + + // Passive Neighbor Configuration Change + enum passive-neighbor-cfg-chg { + value 40; + } + + // Address-family Configuration Change + enum af-cfg-chg { + value 41; + } + + // Route-reflector Configuration Change + enum rr-cfg-chg { + value 42; + } + + // Router-id Configuration Change + enum rtrid-cfg-chg { + value 43; + } + + // Confederation Id Change + enum confed-id-chg { + value 44; + } + + // Confederation Membership Change + enum confed-membership-change { + value 45; + } + + // Graceful-restart Configuration Change + enum gr-cfg-chg { + value 46; + } + + // Soft-reconfiguration Change + enum soft-recfg-chg { + value 47; + } + + // Update-source Interface Change + enum updatesrc-if-chg { + value 48; + } + + // Local-as Change + enum localas-chg { + value 49; + } + + // Unknown Cease Error + enum unknown-cease-err { + value 50; + } + + // Unspecified Cappability Message Error + enum unspecified-cap-msg-err { + value 51; + } + + // Unknown Sequence Number + enum unknown-seq-num { + value 52; + } + + // Invalid Capability Length + enum invalid-cap-len { + value 53; + } + + // Malformed Capability Value + enum bad-cap-val { + value 54; + } + + // Unsupported Capability Code + enum unsupp-cap-code { + value 55; + } + + // Unknown Capability Error + enum unknown-cap-err { + value 56; + } + } + } + + // Mode + typedef bgp_Mode { + type enumeration { + + // Fabric + enum fabric { + value 1; + } + + // External + enum external { + value 2; + } + } + default "fabric"; + } + + // MCAST-VPN NLRI route-type + typedef bgp_MvpnRtType { + type enumeration { + + // Unspecified + enum none { + value 0; + } + + // Multicast Inter-AS PMSI Auto Discovery route + enum interas-ipmsi-ad { + value 1; + } + + // Multicast Intra-AS PMSI Auto Discovery route + enum intraas-ipmsi-ad { + value 2; + } + + // Multicast S-PMSI Auto Discovery route + enum spmsi-ad { + value 3; + } + + // Multicast Leaf Auto Discovery route + enum leaf-ad { + value 4; + } + + // Multicast Source-Active Auto Discovery route + enum sa-ad { + value 5; + } + + // Shared C-Multicast route + enum shared-c-mcast { + value 6; + } + + // Source C-Multicast route + enum source-c-mcast { + value 7; + } + } + default "none"; + } + + // NH Next Advertised Timestamp + typedef bgp_NextAdvTs { + type string; + default "0"; + } + + // Nexthop flags + typedef bgp_NhFlags { + + // bits- Using string + type string; + } + + // Link Attribute TLV flags for Link-state + // Default Value computed from none + typedef bgp_NodeLsAttrFlags { + + // bits- Using string + type string; + default "none"; + } + + // Number of paths + typedef bgp_NumPaths { + type uint32; + } + + // Number of Peers + typedef bgp_NumPeers { + type uint32; + } + + // Order (for AS path segments and AS path items) + typedef bgp_Order { + type uint16; + } + + // Origin + typedef bgp_Origin { + type enumeration { + + // Learned Via IGP + enum igp { + value 1; + } + + // Learned Via EGP + enum egp { + value 2; + } + + // Learned by some other Means + enum incomplete { + value 3; + } + } + default "igp"; + } + + // Authentication status + typedef bgp_PasswdSet { + type enumeration { + + // Enabled + enum enabled { + value 1; + } + enum disabled { + value 0; + } + } + default "disabled"; + } + + // Path flags + typedef bgp_PathFlags { + + // bits- Using string + type string; + } + + // Path id + typedef bgp_PathId { + type uint32; + } + + // Path status + typedef bgp_PathSt { + type enumeration { + + // Deleted + enum deleted { + value 0; + } + + // Staled + enum staled { + value 1; + } + + // Valid + enum valid { + value 2; + } + + // InValid + enum invalid { + value 3; + } + + // history + enum history { + value 4; + } + + // suppressed + enum suppressed { + value 5; + } + + // dampened + enum dampened { + value 6; + } + } + } + + // Path type + typedef bgp_PathT { + type enumeration { + + // Internal + enum internal { + value 1; + } + + // External + enum external { + value 2; + } + + // Confederation + enum confederation { + value 3; + } + + // Local + enum local { + value 4; + } + + // Aggregate + enum aggregate { + value 5; + } + + // Redistribute + enum redistribute { + value 6; + } + + // Injected + enum injected { + value 7; + } + } + default "internal"; + } + + // Peer Address Family Control + typedef bgp_PeerAfControl { + + // bits- Using string + type string; + } + + // Peer AF flags + typedef bgp_PeerAfFlags { + + // bits- Using string + type string; + } + + // Peer Control + typedef bgp_PeerControl { + + // bits- Using string + type string; + } + + // TODO: Change this to nw:Cnt64 Count of BGP Messages + typedef bgp_PeerCount { + type uint64; + } + + // Peer Fabric Type + typedef bgp_PeerFabType { + type enumeration { + + // Fabric internal + enum fabric-internal { + value 0; + } + + // Fabric external + enum fabric-external { + value 1; + } + + // Fabric Border Leaf + enum fabric-border-leaf { + value 2; + } + } + default "fabric-internal"; + } + + // Peer flags + typedef bgp_PeerFlags { + + // bits- Using string + type string; + } + + // Peer graceful restart state + typedef bgp_PeerGrSt { + type enumeration { + + // Not applicable + enum na { + value 1; + } + + // Reset + enum reset { + value 2; + } + + // Up + enum up { + value 3; + } + } + default "na"; + } + + // Peer Index + typedef bgp_PeerIdx { + type uint16; + } + + // Peer operational state + typedef bgp_PeerOperSt { + type enumeration { + + // Unspecified + enum unspecified { + value 0; + } + + // Illegal + enum illegal { + value 1; + } + + // Shut + enum shut { + value 2; + } + + // Idle + enum idle { + value 3; + } + + // Connect + enum connect { + value 4; + } + + // Active + enum active { + value 5; + } + + // Open sent + enum open-sent { + value 6; + } + + // Open confirm + enum open-confirm { + value 7; + } + + // Established + enum established { + value 8; + } + + // Closing + enum closing { + value 9; + } + + // Error + enum error { + value 10; + } + + // Unknown + enum unknown { + value 11; + } + } + default "unspecified"; + } + + // Peer Type + typedef bgp_PeerType { + type enumeration { + + // ibgp + enum ibgp { + value 1; + } + + // ebgp + enum ebgp { + value 2; + } + } + default "ibgp"; + } + + // Pfx Flushed + typedef bgp_PfxFlushed { + type uint64; + } + + // Prefix Attributes TLV flags for Link-state + // Default Value computed from none + typedef bgp_PfxLsAttrFlags { + + // bits- Using string + type string; + default "none"; + } + + // TODO: Change this to nw:Cnt64 Counts for Prefix Peers + typedef bgp_PfxPeerCounts { + type uint64; + } + + // Prefix Peer Timeout + typedef bgp_PfxPeerTimeout { + type uint16 { + range "0..1200"; + } + } + + // Prefix Peer Wait + typedef bgp_PfxPeerWaitTime { + type uint16 { + range "0..1200"; + } + } + + // TODO: Change this to nw:Cnt64 Pfx Saved + typedef bgp_PfxSaved { + type uint64; + } + + // Pfx Sent + typedef bgp_PfxSent { + type uint64; + } + + // Prefix-Sid attribute entry type + typedef bgp_PfxSidAttrEntryType { + type enumeration { + + // Unspecified + enum none { + value 0; + } + + // Label Index + enum label-index { + value 1; + } + + // IPv6-SID + enum ipv6-sid { + value 2; + } + + // Originator SRGB + enum origin-srgb { + value 3; + } + } + default "none"; + } + + // PMSI Tunnel Type + typedef bgp_PmsiTunType { + type enumeration { + + // Unspecified + enum none { + value 0; + } + + // Ingress Replication + enum ingress-repl { + value 1; + } + } + default "none"; + } + + // private-as Control + typedef bgp_PrivateASControl { + type enumeration { + enum none { + value 0; + } + + // Remove private AS + enum remove-exclusive { + value 1; + } + + // Remove all private AS + enum remove-all { + value 2; + } + + // Replace private AS with local AS + enum replace-as { + value 3; + } + } + default "none"; + } + + // Reconnect Interval Value + typedef bgp_ReConnectIntvl { + type uint16 { + range "1..60"; + } + default "60"; + } + + // RNH Epoch + typedef bgp_RnhEpoch { + type uint8; + } + + // Route control direction + typedef bgp_RtCtrlDir { + type enumeration { + + // Incoming + enum in { + value 1; + } + + // Outgoing + enum out { + value 2; + } + } + default "in"; + } + + // Route control operational state + typedef bgp_RtCtrlOperSt { + type enumeration { + + // Unresolved + enum unresolved { + value 1; + } + + // Resolved + enum resolved { + value 2; + } + } + default "unresolved"; + } + + // Route flags + typedef bgp_RtFlags { + + // bits- Using string + type string; + } + + // Labeled address-family route flags + typedef bgp_RtLblAfFlags { + + // bits- Using string + type string; + } + + // Route version + typedef bgp_RtVer { + type uint32; + } + + // Route target policy type + typedef bgp_RttPType { + type enumeration { + + // Import + enum import { + value 1; + } + + // Export + enum export { + value 2; + } + } + default "import"; + } + + // Segment Routing Global Block + // Default Value "0" Removed - out of range 16..471804 + typedef bgp_SRGBRange { + type uint32 { + range "16..471804"; + } + } + + // Peer shut state qualifier + typedef bgp_ShutStQual { + type enumeration { + + // Unspecified + enum unspecified { + value 0; + } + + // Administratively down + enum admin { + value 1; + } + + // No memory + enum no-mem { + value 2; + } + + // Exceeded prefix limit + enum exceeded-pfxlimit { + value 3; + } + + // Administratively up + enum admin-up { + value 4; + } + + // No Affinity + enum no-affinity { + value 5; + } + } + default "unspecified"; + } + + // Event History Buffer Size + typedef bgp_Size { + type uint32 { + range "0..4 | 8192..1048576"; + } + default "0"; + } + + // FD to connect to the peer + typedef bgp_SockFD { + type uint32; + } + + // Soft Reconfiguration + typedef bgp_SoftReconfigBackup { + type enumeration { + enum none { + value 0; + } + + // Inbound Only + enum inbound { + value 1; + } + + // Inbound Always + enum inbound-always { + value 2; + } + } + } + + // BMP Server ID + typedef bgp_SrvId { + type uint8 { + range "1..2"; + } + } + + // Peer Idle State Reason + typedef bgp_StReason { + type enumeration { + enum none { + value 0; + } + + // NoMem + enum no-mem { + value 1; + } + } + default "none"; + } + + // Aggregate Address Summary-Only + typedef bgp_SummaryOnly { + type enumeration { + + // Enabled + enum enabled { + value 1; + } + + // Disabled + enum disabled { + value 0; + } + } + default "disabled"; + } + + // Table state + typedef bgp_TblSt { + type enumeration { + + // Unknown + enum unknown { + value 0; + } + + // Up + enum up { + value 1; + } + + // Down + enum down { + value 2; + } + } + } + + // Table version + typedef bgp_TblVer { + type uint32; + } + + // eBGP Multihop TTL value + typedef bgp_TtlVal { + type uint16 { + range "0..255"; + } + } + + // Unknown Attribute Length + typedef bgp_UnknownAttrLen { + + // MAX Converted to int from 0xffffffff + type uint32 { + range "0..4294967295"; + } + } + + // Version + typedef bgp_Ver { + type enumeration { + + // BGP Version 4 + enum v4 { + value 4; + } + } + default "v4"; + } + + // VNID + // Default Value "0" Removed - out of range 4096..16777215 + typedef bgp_Vnid { + + // MAX Converted to int from 0xffffff + type uint32 { + range "4096..16777215"; + } + } + + // Dampen Igp Metric + typedef bgp_igpMetric { + type uint16 { + range "0..3600"; + } + default "600"; + } + + typedef cap_Constraint { + type uint32; + } + + typedef cap_Counter { + type uint32; + } + + typedef cap_Model { + type string; + } + + // Quantitative + typedef cap_Quant { + + // MAX Converted to int from 0xFFFF + type uint16 { + range "0..65535"; + } + default "0"; + } + + typedef cap_RaiseFaultState { + type enumeration { + enum nominal { + value 0; + } + enum ruleHasLess { + value 1; + } + enum ruleHasMore { + value 2; + } + } + default "nominal"; + } + + typedef cap_RuleT { + type enumeration { + enum limit { + value 1; + } + } + default "limit"; + } + + typedef cap_Scope { + type enumeration { + enum node { + value 0; + } + enum policy-domain { + value 1; + } + enum fabric { + value 2; + } + } + default "node"; + } + + typedef cap_StorageHint { + type uint8; + } + + typedef cap_Vendor { + type string; + } + + typedef cap_Version { + type string; + } + + // Adjacency state qualifier + typedef cdp_AdjStQual { + + // bits- Using string + type string; + } + + // Capability type + typedef cdp_CapT { + + // bits- Using string + type string; + } + + // Neighbor device id + typedef cdp_DevId { + type string; + } + + // Device identifier type + typedef cdp_DevIdT { + type enumeration { + + // MAC address + enum mac { + value 1; + } + + // Serial number + enum serialNum { + value 2; + } + + // System name + enum sysName { + value 3; + } + + // System name and serial number + enum sysNameAndSerialNum { + value 4; + } + } + default "sysNameAndSerialNum"; + } + + // Neighbor device index + typedef cdp_DevIndex { + type uint32; + } + + // Duplex + typedef cdp_Duplex { + type enumeration { + + // Unknown + enum unknown { + value 0; + } + + // Half duplex + enum half { + value 1; + } + + // Full duplex + enum full { + value 2; + } + } + } + + // Hold interval + // No Enums - transformed from scalar:Enum8 to scalar:UByte, YANG integer equivalent uint8 + typedef cdp_HoldIntvl { + type uint8 { + range "10..255"; + } + default "180"; + } + + // MTU + typedef cdp_MTU { + type uint32; + } + + // Neighbor version + typedef cdp_NbrVer { + type string; + } + + // Operational state + typedef cdp_OperSt { + type enumeration { + + // Up + enum up { + value 1; + } + + // Down + enum down { + value 2; + } + } + default "down"; + } + + // Operational state qualifier + typedef cdp_OperStQual { + type enumeration { + + // Up + enum up { + value 1; + } + + // Administratively down + enum admin-down { + value 2; + } + + // Interface down + enum if-down { + value 3; + } + + // Unsupported + enum unsupported { + value 4; + } + } + default "unsupported"; + } + + // Neighbor platform id + typedef cdp_PlatId { + type string; + } + + // Neighbor port id + typedef cdp_PortId { + type string; + } + + // System Location + typedef cdp_SysLoc { + type string; + } + + // System name + typedef cdp_SysName { + type string; + } + + // System OID Length + typedef cdp_SysObjIdL { + type uint8; + } + + // System OID Value + typedef cdp_SysObjIdV { + type mtx_array_uint32; + } + + // Transmission frequency + // No Enums - transformed from scalar:Enum8 to scalar:UByte, YANG integer equivalent uint8 + typedef cdp_TxFreq { + type uint8 { + range "5..254"; + } + default "60"; + } + + // Version + typedef cdp_Ver { + type enumeration { + + // Version 1 + enum v1 { + value 1; + } + + // Version 2 + enum v2 { + value 2; + } + } + default "v2"; + } + + // Vlan id + typedef cdp_VlanId { + type uint16; + default "0"; + } + + typedef comm_Port { + type uint32 { + range "1024..65000"; + } + } + + typedef comp_DelimitedString { + type string; + } + + typedef comp_HostState { + type enumeration { + + // Maintenance Mode + enum maintenance { + value 0; + } + + // Connected + enum connected { + value 1; + } + + // Not Responding + enum noresponse { + value 2; + } + + // Disconnected + enum disconnected { + value 3; + } + + // Powered On + enum poweredOn { + value 4; + } + + // Powered Off + enum poweredOff { + value 5; + } + + // StandBy + enum standBy { + value 6; + } + + // Suspended + enum suspended { + value 7; + } + + // Unknown + enum unknown { + value 8; + } + } + default "disconnected"; + } + + typedef comp_NicInstType { + type enumeration { + + // Unknown + enum unknown { + value 0; + } + + // Baremetal Host + enum phys { + value 1; + } + + // Virtual Machine + enum virt { + value 2; + } + + // Hypervisor Host + enum hv { + value 3; + } + } + default "unknown"; + } + + typedef comp_NicState { + type enumeration { + + // Down + enum down { + value 0; + } + + // Up + enum up { + value 1; + } + } + default "down"; + } + + typedef comp_Vendor { + type enumeration { + enum VMware { + value 1; + } + enum Microsoft { + value 2; + } + } + default "VMware"; + } + + // Result of filter check + typedef compat_FilterStatus { + type enumeration { + + // failed + enum failed { + value 0; + } + + // passed + enum passed { + value 1; + } + } + default "failed"; + } + + // Operation type + typedef conftmpl_OperationType { + type enumeration { + + // Create + enum create { + value 1; + } + + // Delete + enum delete { + value 2; + } + } + default "create"; + } + + // Template type + typedef conftmpl_TemplateType { + type enumeration { + + // Unknown + enum unknown { + value 0; + } + + // Vrf + enum vrf { + value 1; + } + + // Vlan + enum vlan { + value 2; + } + + // Intf + enum intf { + value 3; + } + } + default "unknown"; + } + + // Adj addr + typedef coop_AdjAddr { + type address_Ipv4; + } + + // Adjacency flags + typedef coop_AdjFlags { + + // bits- Using string + type string; + } + + // Adjacency operational state + typedef coop_AdjOperSt { + type enumeration { + + // Down + enum down { + value 1; + } + + // Up + enum up { + value 2; + } + } + default "down"; + } + + // Adjacency operational state qualifier + typedef coop_AdjOperStQual { + type enumeration { + + // Unspecified + enum unspecified { + value 0; + } + + // Route not reachable + enum route-unreachable { + value 1; + } + + // TCP Connection Down + enum tcp-down { + value 2; + } + + // Peer inactive + enum peer-inactive { + value 3; + } + + // Peer congested + enum peer-congested { + value 4; + } + + // Up + enum up { + value 5; + } + } + default "unspecified"; + } + + // Collisions load factor + typedef coop_CollLdFactor { + + // MAX Converted to int from 0xffff + type uint16 { + range "1..65535"; + } + default "1"; + } + + // Ctx flags + typedef coop_CtxFlags { + + // bits- Using string + type string; + } + + // Dampen action + typedef coop_DampAction { + type enumeration { + + // Freeze + enum freeze { + value 1; + } + + // Withdraw + enum withdraw { + value 2; + } + } + default "freeze"; + } + + // Half life + typedef coop_DampHalfLife { + + // MAX Converted to int from 0xffff + type uint16 { + range "1..65535"; + } + default "10"; + } + + // Dampen Penalty + typedef coop_DampPenalty { + + // MAX Converted to int from 0xffff + type uint16 { + range "100..65535"; + } + default "1000"; + } + + // Dampen reuse threshold + typedef coop_DampReuseThresh { + + // MAX Converted to int from 0xffff + type uint16 { + range "100..65535"; + } + default "2500"; + } + + // Dampen saturation threshold + typedef coop_DampSatThresh { + + // MAX Converted to int from 0xffff + type uint16 { + range "100..65535"; + } + default "10000"; + } + + // Dampen threshold + typedef coop_DampThresh { + + // MAX Converted to int from 0xffff + type uint16 { + range "100..65535"; + } + default "4000"; + } + + // Domain operational state + typedef coop_DomOperSt { + type enumeration { + + // Down + enum down { + value 0; + } + + // Initializing + enum init { + value 1; + } + + // Up + enum up { + value 2; + } + } + default "down"; + } + + // Domain operational state qualifier + typedef coop_DomOperStQual { + type enumeration { + + // Unspecified + enum unspecified { + value 0; + } + + // Configuration not resolved + enum config-unresolved { + value 1; + } + + // Time not synced + enum time-not-synced { + value 2; + } + + // Infra domain down + enum infra-dom-down { + value 3; + } + + // Council pending + enum council-pending { + value 4; + } + + // Inconsistent configuration + enum inconsistent-config { + value 5; + } + + // Admin down + enum admin-down { + value 6; + } + + // Up + enum up { + value 7; + } + } + default "unspecified"; + } + + // Ep controls + // Default Value computed from notify-citizen + typedef coop_EpControl { + + // bits- Using string + type string; + default "notify-citizen"; + } + + // Ep flags + typedef coop_EpFlags { + + // bits- Using string + type string; + } + + // Graceful restart time (in seconds) + typedef coop_GRTime { + + // MAX Converted to int from 0xffff + type uint32 { + range "1..65535"; + } + default "600"; + } + + // Hello Interval (in seconds) + typedef coop_HelloIntvl { + + // MAX Converted to int from 0xffff + type uint16 { + range "1..65535"; + } + default "60"; + } + + // IGMP version + typedef coop_IGMPVersion { + type uint8 { + range "1..3"; + } + default "2"; + } + + // McastGrp flags + typedef coop_McGrpFlags { + + // bits- Using string + type string; + } + + // Mrtr flags + typedef coop_MrtrFlags { + + // bits- Using string + type string; + } + + // Peer controls + typedef coop_PeerControl { + + // bits- Using string + type string; + } + + // Port id + typedef coop_PortId { + + // MAX Converted to int from 0xffffffff + type uint32 { + range "0..4294967295"; + } + default "0"; + } + + // Publisher id + typedef coop_PubId { + type address_Ipv4; + } + + // Refresh interval (in seconds) + typedef coop_RefreshIntvl { + + // MAX Converted to int from 0x2aaaaaaa + type uint32 { + range "1..715827882"; + } + default "3600"; + } + + // Repository size + typedef coop_RepSz { + + // MAX Converted to int from 0xffffffff + type uint32 { + range "1..4294967295"; + } + default "1000000"; + } + + // Repository type + typedef coop_RepT { + type enumeration { + + // Endpoint reachability repository + enum ep { + value 1; + } + + // Oracle repository + enum oracle { + value 2; + } + + // Leaf repository + enum leaf { + value 3; + } + + // Multicast group membership repository + enum mgrpmbr { + value 4; + } + + // Multicast router repository + enum mrouter { + value 5; + } + + // Service node repository + enum svcnode { + value 6; + } + + // Anycast repository + enum anycast { + value 7; + } + + // External router repository + enum extrtr { + value 8; + } + + // VPC repository + enum vpc { + value 9; + } + + // VTEP repository + enum vtep { + value 10; + } + + // Context repository + enum ctx { + value 11; + } + } + default "ep"; + } + + // Role + typedef coop_Role { + type enumeration { + + // Citizen + enum citizen { + value 1; + } + + // Oracle + enum oracle { + value 2; + } + } + default "citizen"; + } + + // Shard Interval + typedef coop_ShardIntvl { + + // MAX Converted to int from 0xffffffff + type uint32 { + range "1..4294967295"; + } + } + + // Switch id + typedef coop_SwId { + type address_Ipv4; + } + + // Synthetic flags + typedef coop_SynthFlags { + + // bits- Using string + type string; + } + + // Synthetic Generator algorithm + typedef coop_SynthGen { + type enumeration { + enum xxx { + value 1; + } + } + default "xxx"; + } + + // Synthetic ip + typedef coop_SynthIp { + type address_Ipv4; + } + + // Synthetic vrf + typedef coop_SynthVrf { + type uint32; + } + + // Timestamp (NTP raw format) + typedef coop_Timestamp { + type string; + } + + // VNID + typedef coop_Vnid { + + // MAX Converted to int from 0xffffff + type uint32 { + range "1..16777215"; + } + default "1"; + } + + // Specifies the HA mode in which this system is configured + typedef top_Mode { + type enumeration { + enum unspecified { + value 0; + } + enum stand-alone { + value 1; + } + enum cluster { + value 2; + } + } + default "unspecified"; + } + + grouping System-group { + leaf id { + type uint32; + } + + // Specifies if this system is configured in standalone mode or HA pair + // Type is an MO-Defined-Type + leaf mode { + description "System mode"; + + // Type is an MO-Defined-Type + type top_Mode; + } + } + + container System { + description "System"; + + uses System-group; + } +} From df357b38a3a58b8b47af04da2122a1bf3aebe43b Mon Sep 17 00:00:00 2001 From: Yan Date: Thu, 1 Feb 2018 09:05:39 -0500 Subject: [PATCH 23/24] changed IP address in test_sanity_levels.cpp --- sdk/cpp/tests/test_sanity_levels.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sdk/cpp/tests/test_sanity_levels.cpp b/sdk/cpp/tests/test_sanity_levels.cpp index 2e8c3a7f8..e3f1b5ad9 100644 --- a/sdk/cpp/tests/test_sanity_levels.cpp +++ b/sdk/cpp/tests/test_sanity_levels.cpp @@ -36,7 +36,7 @@ TEST_CASE("one_level_pos_set") auto r_1 = make_unique(); r_1->ydktest_sanity_one->number = 1; - r_1->ydktest_sanity_one->name = "-|90|1-0|240|25-.-|90|199|200|25-.9|1-|1-9|240|250.-|99|199|2-9|25-"; + r_1->ydktest_sanity_one->name = "1.2.3.4"; bool reply = crud.create(provider, *r_1->ydktest_sanity_one); REQUIRE(reply); } @@ -53,7 +53,7 @@ TEST_CASE("one_level_pos") REQUIRE(reply); r_1->ydktest_sanity_one->number = 1; - r_1->ydktest_sanity_one->name = "-|90|1-0|240|25-.-|90|199|200|25-.9|1-|1-9|240|250.-|99|199|2-9|25-"; + r_1->ydktest_sanity_one->name = "1.2.3.4"; reply = crud.create(provider, *r_1); REQUIRE(reply); From 854c4d67ce8fc4c2c7168a22d02d3ce32112f188 Mon Sep 17 00:00:00 2001 From: Yan Gorelik Date: Fri, 2 Feb 2018 11:52:29 -0800 Subject: [PATCH 24/24] Removed bogus white spaces --- sdk/python/core/tests/test_sanity_codec.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sdk/python/core/tests/test_sanity_codec.py b/sdk/python/core/tests/test_sanity_codec.py index 6c501595a..b7ad0b85b 100644 --- a/sdk/python/core/tests/test_sanity_codec.py +++ b/sdk/python/core/tests/test_sanity_codec.py @@ -376,10 +376,10 @@ def test_encode_decode_typedefs(self): system_encode = ysanity_typedefs.System() system_encode.mode = ysanity_typedefs.TopMode.stand_alone system_encode.id = 22; - + self.provider.encoding = EncodingFormat.XML payload = self.codec.encode(self.provider, system_encode) - + system_decode = self.codec.decode(self.provider, payload) self.assertEqual(system_encode, system_decode)