Skip to content

Commit

Permalink
Resolved issue CiscoDevNet#1067
Browse files Browse the repository at this point in the history
Signed-off-by: Ubuntu <ubuntu@ubuntu1804.linuxvmimages.local>
  • Loading branch information
Ubuntu committed Jun 24, 2022
1 parent e39c4a8 commit ed32678
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
3 changes: 1 addition & 2 deletions sdk/cpp/core/src/entity_data_node_walker.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ using namespace std;
namespace ydk
{
static void populate_data_node(Entity & entity, path::DataNode & data_node);
static void populate_name_values(path::DataNode & parent_data_node, EntityPath & path);
static bool data_node_is_leaf(path::DataNode & data_node);
static bool data_node_is_list(path::DataNode & data_node);
static string get_segment_path(const string & path);
Expand Down Expand Up @@ -125,7 +124,7 @@ static void populate_data_node(Entity & entity, path::DataNode & parent_data_nod
walk_children(entity, *data_node);
}

static void populate_name_values(path::DataNode & data_node, EntityPath & path)
void populate_name_values(path::DataNode & data_node, EntityPath & path)
{
YLOG_DEBUG("Leaf count: {}", path.value_paths.size());
for(const pair<string, LeafData> & name_value : path.value_paths)
Expand Down
1 change: 1 addition & 0 deletions sdk/cpp/core/src/entity_data_node_walker.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ void get_entity_from_data_node(path::DataNode * node, std::shared_ptr<Entity> en

YFilter get_data_node_yfilter(path::DataNode * node);

void populate_name_values(path::DataNode & data_node, EntityPath & path);
void walk_children(Entity & entity, path::DataNode & data_node);
}
#endif /* _WALKER_HPP_ */
4 changes: 3 additions & 1 deletion sdk/cpp/core/src/executor_service.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,10 @@ shared_ptr<Entity> ExecutorService::execute_rpc(

// Handle input
auto input = rpc_entity.get_child_by_name("input", "");
if (input != nullptr && (input->has_operation() || input->has_data() || input->is_presence_container))
if (input)
{
EntityPath input_path = get_entity_path(*input, input->parent);
populate_name_values(rpc_input, input_path);
walk_children(*input, rpc_input);
}

Expand Down

0 comments on commit ed32678

Please sign in to comment.