Login| Sign Up| Help| Contact|

Patent Searching and Data


Title:
METHOD AND APPARATUS FOR MERGING OF YANG CONFIGURATION AND STATE DATA IN MODEL-DRIVEN APPLICATIONS
Document Type and Number:
WIPO Patent Application WO/2019/233616
Kind Code:
A1
Abstract:
A method for obtaining state data together with corresponding configuration data of a resource operating in a communications or data network. The resource is modelled in a YANG data model stored in a memory associated with said resource. The method comprises the steps of receiving a request for retrieving state data and configuration data of the resource, said request comprising an instance identifier of the resource and splitting the received instance identifier into relative paths according to syntax of a YANG data model. Further the method comprises identifying a configuration data schema node of the resource in the YANG data model of the resource based on the relative paths, identifying state data schema node of the resource in said YANG data model of the resource based on the identified configuration data schema node and constructing an instance identifier of the data node containing the state data. The method also comprises retrieving configuration data and state data from the configuration and state data nodes for this resource and merging said retrieved information for output.

Inventors:
HOLLMANN MARK (IE)
Application Number:
PCT/EP2018/076511
Publication Date:
December 12, 2019
Filing Date:
September 28, 2018
Export Citation:
Click for automatic bibliography generation   Help
Assignee:
ERICSSON TELEFON AB L M (SE)
International Classes:
H04L12/24; H04L12/26
Foreign References:
US20180131745A12018-05-10
US20170187577A12017-06-29
Other References:
BIERMAN YUMAWORKS A: "Guidelines for Authors and Reviewers of YANG Data Model Documents; draft-ietf-netmod-rfc6087bis-17.txt", GUIDELINES FOR AUTHORS AND REVIEWERS OF YANG DATA MODEL DOCUMENTS; DRAFT-IETF-NETMOD-RFC6087BIS-17.TXT; INTERNET-DRAFT: NETWORK WORKING GROUP, INTERNET ENGINEERING TASK FORCE, IETF; STANDARDWORKINGDRAFT, INTERNET SOCIETY (ISOC) 4, RUE DES FALAISES CH, no. 17, 6 February 2018 (2018-02-06), pages 1 - 71, XP015125581
BJORKLUND TAIL-F SYSTEMS M: "A YANG Data Model for Interface Management; draft-ietf-netmod-rfc7223bis-03.txt", A YANG DATA MODEL FOR INTERFACE MANAGEMENT; DRAFT-IETF-NETMOD-RFC7223BIS-03.TXT; INTERNET-DRAFT: NETWORK WORKING GROUP, INTERNET ENGINEERING TASK FORCE, IETF; STANDARDWORKINGDRAFT, INTERNET SOCIETY (ISOC) 4, RUE DES FALAISES CH- 1205 GENEVA, SWITZERL, no. 3, 11 January 2018 (2018-01-11), pages 1 - 48, XP015125129
"YANG - A Data Modeling Language for the Network Configuration Protocol (NETCONF", RFC 6020, Retrieved from the Internet
"The YANG 1.1 Data Modeling Language", RFC 7950, Retrieved from the Internet
"A YANG Data Model for Interface Management", RFC 7223, Retrieved from the Internet
"XML Path Language (XPath", XPATH SYNTAX - THE WORLD WIDE WEB CONSORTIUM, 16 November 1999 (1999-11-16), Retrieved from the Internet
Attorney, Agent or Firm:
ERICSSON (SE)
Download PDF:
Claims:
Claims:

1. A method for obtaining state data together with corresponding configuration data of a resource operating in a communications or data network, wherein the resource is modelled in a YANG data model stored in a memory associated with said resource; the method comprising the steps of:

- receiving a request for retrieving state data and configuration data of the resource, said request comprising an instance identifier of the resource;

- splitting the received instance identifier into relative paths according to syntax of a YANG data model;

- identifying a configuration data schema node of the resource in the YANG data model of the resource based on the relative paths;

- identifying state data schema node of the resource in said YANG data model of the resource based on the identified configuration data schema node;

- constructing an instance identifier of the data node containing the state data; - retrieving configuration data and state data from the configuration and state data nodes for this resource; and

- merging said retrieved information for output.

2. The method according to claim 1, wherein the YANG data model is available to a network management system.

3. The method according to claim 1 or claim 2, wherein the operation of splitting the received instance identifier further extracts a node prefix, node namespace, node name and key according to the syntax of the YANG data model.

4. The method according to any one of claims 1 to 3, wherein the operation of identifying a configuration data schema node comprises comparing relative path information including namespace obtained from the instance identifier in the operation of splitting against namespaces of all child schema nodes in the instance of the YANG data model of the resource until a last match is found, wherein the last matched child schema node is the identified configuration data schema node.

5. The method according to any one of claims 1 to 4, wherein the operation of identifying state data schema node comprises: - creating an empty first stack;

creating an empty second stack;

setting a first schema node with parameters of the identified configuration data schema node; a) pushing name of the first schema node onto the first stack; b) identifying a parent schema node of the first schema node; c) setting the identified parent node as a new first schema node;

- repeating the steps a to c until a second schema node is found having the same parent schema node as the first schema node and namespace, cardinality and keys of the second schema node are the same as for the first schema node and the name of the second schema node comprises the name of the first schema node with a predefined suffix, and the second schema node is marked as config=false setting the first schema node with parameters of the identified second schema node;

pushing the name of the first schema node onto the second stack; and d) popping the top-most schema node off the first stack; e) identifying a child schema node of the popped schema node, such that namespaces, cardinality and keys of the child schema node and the popped schema node are the same and further the names of the child schema node and the popped schema node are the same or the name of the child schema node is that of the popped schema node with a predefined suffix; f) pushing the child schema node onto the second stack; repeating the steps d tof until the first stack is empty, wherein the last identified child schema node contains definition of state data.

6. The method according to claim 5 comprising storing in a cache information about all identified child schema nodes containing definition of state data including mapping of this information to the entries of the second stack.

7. The method according to claim 6, wherein after the operation of splitting the received instance identifier into relative paths the produced relative paths are compared to the content of the cache and if a match is found, then the method bypasses the operations of identifying a configuration data schema node and identifying a state data schema node and continues with the operation of constructing an instance identifier of the data node containing the state data based on the data found in the cache.

8. The method according to claim 1, wherein if a container exists under the schema node for the state data and said container has no corresponding container under the configuration data schema node, the method comprises retrieving the state data part of said container.

9. The method according to any one of the preceding claims wherein the operation of splitting the received instance identifier into relative paths is carried out according to XPath syntax and the syntax of the YANG data model.

10. An apparatus for obtaining state data together with corresponding configuration data of a resource operating in a communications or data network, wherein the resource is modelled in a YANG data model stored in a memory associated with said resource; the apparatus comprising a processing circuitry and a memory, the memory containing instructions executable by the processing circuitry such that the apparatus is operative to: - receive a request for retrieving state data and configuration data of the resource, said request comprising an instance identifier of the resource;

- split the received instance identifier into relative paths according to syntax of a YANG data model;

- identify a configuration data schema node of the resource in the YANG data model of the resource based on the relative paths;

- identify state data schema node of the resource in said YANG data model of the resource based on the identified configuration data schema node;

- construct an instance identifier of the data node containing the state data;

- retrieve configuration data and state data from the configuration and state data nodes for this resource; and

- merge this retrieved information for output.

11. The apparatus according to claim 10, wherein the YANG data model is available to a network management system.

12. The apparatus according to claim 10 or claim 11, wherein in performing the operation of splitting the apparatus is further operative to extract a node prefix, node namespace, node name and key according to a YANG data model.

13. The apparatus according to any one of claims 10 to 12, wherein in performing the operation of identifying a configuration data schema node the apparatus is further operative to compare relative path information including namespace obtained from the instance identifier in the operation of splitting against namespaces of all child schema nodes in the YANG data model of the resource until a last match is found, wherein the last matched child schema node is the identified configuration data schema node.

14. The apparatus according to any one of claims 10 to 13, wherein in performing the operation of identifying state data schema node the apparatus is further operative to: create an empty first stack;

- create an empty second stack;

set a first schema node with parameters of the identified configuration data schema node; a) push name of the first schema node onto the first stack; b) identify a parent schema node of the first schema node; c) set the identified parent node as a new first schema node; repeat the operations a to c until a second schema node is found having the same parent schema node as the first schema node and namespace, cardinality and keys of the second schema node are the same as for the first schema node and the name of the second schema node comprises the name of the first schema node with a predefined suffix, and the second schema node is marked as read-only;

set the first schema node with parameters of the identified second schema node; push the name of the first schema node onto the second stack; and d) pop the top-most schema node off the first stack; e) identify a child schema node of the popped schema node, such that namespaces, cardinality and keys of the child schema node and the popped schema node are the same and further the names of the child schema node and the popped schema node are the same or the name of the child schema node is that of the popped schema node with a predefined suffix; f) push the child schema node onto the second stack; repeat the operations d to/ until the first stack is empty, wherein the last identified child schema node contains definition of state data.

15. The apparatus according to claim 14 operative to store in a cache information about all identified child schema nodes containing definition of state data including mapping of this information to the entries of the second stack.

16. The apparatus according to claim 15, wherein after the operation of splitting the received instance identifier into relative paths according to syntax of the YANG data model the apparatus is further operative to compare the produced relative paths to the content of the cache and if a match is found, then apparatus is operative to bypass the operations of identifying a configuration data schema node and identifying a state data schema node and to continue with the operation of constructing an instance identifier of the data node containing the state data based on the data found in the cache.

17. The apparatus according to claim 10, wherein if a container exists under the schema node for the state data and said container has no corresponding container under the configuration data schema node, the apparatus is operative to retrieve the state data part of said container.

18. The apparatus according to any one of claims 10 to 17 operative to carry out the operation of splitting the received instance identifier into relative paths according to XPath syntax and the syntax of the YANG data model.

19. An apparatus for obtaining state data together with corresponding configuration data of a resource operating in a communications or data network, wherein the resource is modelled in a YANG data model stored in a memory associated with said resource; wherein the apparatus is adapted to:

- receive a request for retrieving state data and configuration data of the resource, said request comprising an instance identifier of the resource;

- split the received instance identifier into relative paths according to syntax of a YANG data model;

- identify a configuration data schema node of the resource in the YANG data model of the resource based on the relative paths;

- identify state data schema node of the resource in said YANG data model of the resource based on the identified configuration data schema node;

- construct an instance identifier of the data node containing the state data;

- retrieve configuration data and state data from the configuration and state data nodes for this resource; and

- merge this retrieved information for output.

20. The apparatus according to claim 19, wherein the YANG data model is available to a network management system.

21. The apparatus according to claim 19 or claim 20, wherein in performing the operation of splitting the apparatus is further operative to extract a node prefix, node namespace, node name and key according to a syntax of a YANG data model.

22. A method, implemented by a computing device, of providing resource information based on a YANG data model, the method comprising: receiving a message comprising an instance identifier of a data node representing a resource that is modelled in a YANG data model;

determining, based on the instance identifier, corresponding configuration and state data nodes of the resource within the YANG data model;

obtaining configuration and state information of the resource using the corresponding configuration and state data nodes; and

responding to the message with the configuration and state information of the resource.

23. The method according to claim 22, wherein obtaining the configuration and state information of the resource comprises fetching the configuration and state information of the resource from a remote device.

24. The method according to claim 23, wherein the remote device is the resource.

25. The method according to any one of claims 22-24, wherein determining the corresponding configuration and state data nodes of the resource based on the instance identifier comprises determining the configuration data node based on the instance identifier and determining the state data node based on the configuration data node.

26. The method according to any one of claims 22-25, wherein the message comprises a request for retrieving state data and configuration data of the resource.

27. The method according to any one of claims 22-26, wherein the operation of determining corresponding configuration and state data nodes of the resource within the YANG data model comprises:

- splitting the received instance identifier into relative paths according to a syntax of a YANG data model;

- identifying a configuration data schema node of the resource in the YANG data model of the resource based on the relative paths;

- identifying state data schema node of the resource in said YANG data model of the resource based on the identified configuration data schema node.

28. The method according to claim 27 wherein the operation of splitting the received instance identifier into relative paths is carried out according to XPath syntax and the syntax of the YANG data model.

29. The method according to any one of claims 22-28, wherein the operation of obtaining configuration and state information of the resource using the corresponding configuration and state data nodes comprises:

- constructing an instance identifier of the data node containing the state data;

- retrieving configuration data and state data from the configuration and state data nodes for this resource; and

- merging said retrieved information for output.

30. A computing device for providing resource information based on a YANG data model, the computing device configured to: receive a message comprising an instance identifier of a data node representing a resource that is modelled in a YANG data model; determine, based on the instance identifier, corresponding configuration and state data nodes of the resource within the YANG data model; obtain configuration and state information of the resource using the corresponding configuration and state data nodes; and respond to the message with the configuration and state information of the resource.

31. The computing device according to claim 30, operative to fetch the configuration and state information of the resource from a remote device to obtain the configuration and state information of the resource.

32. The computing device according to claim 30 or 31, wherein the message comprises a request for retrieving state data and configuration data of the resource.

33. The computing device according to any one of claims 30-32, wherein to determine corresponding configuration and state data nodes of the resource modelled in the YANG data model the computing device is configured to:

- split the received instance identifier into relative paths according to syntax of a YANG data model;

- identify a configuration data schema node of the resource in the YANG data model of the resource based on the relative paths; - identify state data schema node of the resource in said YANG data model of the resource based on the identified configuration data schema node.

34. The computing device according to any one of claims 30-33, wherein to use the corresponding configuration and state data nodes to obtain configuration and state information of the resource the computing device is configured to:

- construct an instance identifier of the data node containing the state data;

- retrieve configuration data and state data from the configuration and state data nodes for this resource; and

- merge said retrieved information for output.

35. The computing device according to claim 30, configured to perform the method of any one of claims 22-29.

36. A computing device for providing resource information based on a YANG data model, the computing device comprising: a processor and a memory, the memory containing instructions executable by the processor whereby the device is operative to:

receive a message comprising an instance identifier of a data node representing a resource that is modelled in a YANG data model; determine, based on the instance identifier, corresponding configuration and state data nodes of the resource modelled within the YANG data model; use the corresponding configuration and state data nodes to obtain configuration and state information of the resource; and respond to the message with the configuration and state information of the resource.

37. The computing device according to claim 36, configured to perform the method of any of claims 22-29.

38. A computer program, comprising instructions which, when executed on at least one processor of a device, cause the at least one processor to carry out the method according to any one of claims 1-9 or 22-29.

39. A carrier containing the computer program according to claim 38, wherein the carrier is one of an electronic signal, optical signal, radio signal, or computer readable storage medium.

Description:
Method and apparatus for Merging of YANG Configuration and State Data in

Model-driven Applications

Technical Field The present invention relates to a method and apparatus for obtaining state data and configuration data of a resource operating in a communications or data network, in general, and in particular to techniques for obtaining such data for a resource modelled in a YANG data model.

Background YANG (Yet Another Next Generation) is a data modelling language used to model configuration and state data of resources. It is used widely in the IT industry to express the data model of data communications devices, such as internet routers, and telecommunications devices, such as packet core nodes. It is also extensively used for a variety of other purposes, such as defining the data model for network-related services for software-defined networking (SDN). The language is flexible enough to model any set of resource types which are in a hierarchical relationship with each other. The YANG language is a public standard and is described in RFC 6020 (ref. 1) and RFC 7950 (ref. 2). An example of a YANG data model, taken from RFC 7223 (ref. 3), in simplified syntax, is shown in figure 1, where: - indentation indicates hierarchy,

- rw = read-write; ro = read-only (implying“ config = false”),

- * indicates cardinality 0..n,

- [name] indicates that leaf“name”, which is of type string, is the key for instances of interface, As can be seen, there is no common ancestor of “interfaces” and“interfaces- state The same data model is, in different notation and with some omissions for brevity, shown in figure 2. In YANG, a data model is also referred to as“schema tree”.

Each of the elements shown in figure 2 is called a“schema node” in YANG. A schema node can be a“container” (if singleton, called a“list” is maximum cardinality is larger than 1) that holds other schema nodes, or can be a“leaf’ which is conceptually similar to a scalar (there are other things in YANG as well that can be schema nodes, which are not of relevance to the discussion at hand). A schema node is identified by namespace and name, the combination of which must be unique in the context of its parent schema node. Lists and leaves can have cardinality (a container has, by definition, a maximum cardinality of one). Where the maximum cardinality of a list is larger than one, one or more leaves can be designated to be“keys”. Keys are used to uniquely identify instances. YANG allows multiple roots, that is, schema nodes which do not have a parent schema node, for the schema tree. An absolute root of a schema tree does not exist in terms of a modelled schema node. In figure 2, the top-most schema node named“/ (root) 002, does not exist in the actual data model and cannot have an instantiation. It is added by the apparatus to have a single true root of the data model.“Containers” 004 and 006 as well as“Lists” 010 and 012 are hierarchical schema nodes which contain other schema nodes.“Leafs”, 014, are scalars. While in the YANG data modelling language leafs are also schema nodes, these are ignored here for the purposes of the method. On the schema nodes, only the name is shown in this figure. Each schema node also has an implicit namespace, which is given by the prefix of the schema node. The prefix maps to a namespace.

The left branch of the schema tree is used for configuration data; the right branch is used for state data. This is apparent by the fact that schema node, 006, has the same name as schema node, 004, but having a suffix of “-state and further that it is marked as “config = false”. This is common convention in YANG. The word“config” is a keyword of the YANG language. It is used to indicate whether a schema node denotes configuration (“config = true”) and thereby something that can both be written-to and read; or whether the schema node is state data (“config = false”) and hence can only ever be read.

The branch for the state data (right branch) is larger than the branch for the configuration data. There exists an additional container “statistics” , 008, in the state branch, which does not exist in the configuration branch.

The names of schema nodes, 010, and, 012, match, and they use the exact same leaf as key. This allows for correlation between configuration data and state data.

The instantiation of a YANG data model (i.e. actual data) is called the“data tree”, and an instantiated schema node is called a“data node”. Every data node is uniquely identifiable by an“instance identifier”, which is in effect a path that enables an agent to navigate down through the data tree to the data node. The syntax of an instance identifier is a subset of the XPath syntax. Figure 3 shows an example of a data tree, which is an instantiation of the simplified data model shown in figure 2.

Figure 3 illustrates configuration data and state data of three resources of type “interface” . Each circle represents an instance of a“container” or“list” schema node. Each instance of a schema node is called a“data node”, and the totality of the data nodes is called the“data tree”. Some data nodes illustrated in figure 3, i.e. 020, 022, 024, 026, are singletons; that is, there is ever at most a single data node having this namespace and name under the same parent data node. The prefix“if:” is shown on each of the data nodes. This prefix can be resolved to a namespace; it is the exact same prefix and namespace are used for the schema node that is instantiated by the data node. The names of the two“interface” data nodes match up between the configuration data and the state data.

The top-most data node named“/ (root) 028, does not exist in the actual instance model. It has been added here to show the structural relationships of the two branches of the data tree (configuration data on the left and state data on the right).

An example of a schema identifier can be found in figure 4. YANG widely uses prefixes to make the data model and instance identifiers more concise. A prefix is simply a placeholder for a namespace. The mapping of prefixes to namespaces is part of a YANG data model. The instance identifier identifies a data node in the data tree by means of a path, element 040 in figure 4, and it can be broken down into relative paths. Here, there are two relative paths; the first being“if. -interfaces”, the second being“if: interface [if: name=’eth2 ]”.

The first relative path is identified simply by the schema node prefix and name. This can be done as this schema node has a maximum cardinality of one, meaning it is a singleton.

The second relative path requires additional information to identify the correct instance of“interface”. The name and value of the key attribute are used for this purpose. Note the name of the key attribute is“name”.

Prefixes are used to identify the namespace of data nodes; here, the prefix“if” is used, which is the same as used inside the respective schema node.

YANG distinguishes between configuration data and state data of resources. Configuration data is always read- write and denotes the actual configuration of the resource; state data is always read-only and denotes the state of the resource. The resource may be a network device, for example a network node. Typical examples for state data are operational states and performance counters. In a YANG model, state data is denoted by using the keyword“config” and giving it the value“false”.

In YANG, it is common convention to separate the configuration data from the state data of a resource inside the data model. This is achieved by using different branches in the hierarchy under a common root. Consider figures 1, 2 and 3 again which show this. It is common convention in YANG to use the suffix“-state” for a schema node name to indicate a schema node that holds state data.

As data models of network devices, and other resources, are defined in a machine- consumable fashion by virtue of using YANG as data modelling language, it is possible to build management applications that read these data models and which automatically adapt their user- facing output in-line with the data model to display the instance values of resources. These applications are said to be model-driven, as their behaviour is driven by the contents of data models. Figure 5 shows an example of such a model-driven application. Here, a CLI

(command line interface) is used to retrieve the detailed data of a data node, identified by an instance identifier. The example corresponds with the data tree shown in figure 3. The CLI is model-driven and has no knowledge whatsoever about the resource“interface i.e. is completely agnostic to its function and meaning. Further, figure 5 shows three requests for data relating to interface“eth2”. In the first request, the configuration data for this interface is retrieved; in the second request, some state data for this interface is requested and in the third request, some more state data for this interface is requested.

Figure 6 likewise shows a model-driven application - here, a GUI, graphical user interface, is used to show the data tree in a topology, and the data that relates to each data node is shown in tabular form. The layout of the table, and to be more precise the number of rows and the names of the attributes shown, are taken from the model. The left-hand side of figure 6 shows a topological view of the data tree hierarchy. Interface“eth2” has been selected, and its configuration data is shown in tabular fashion on the right.

There exist at least three products that the inventor is aware of in respect of model- driven applications for YANG data models:

- Cisco NSO (commercial, formerly tail- fNCS): This product has a command line interface with auto-completion of instance identifiers to access YANG data tree nodes

- YumaWorks yangcli-pro (open source and commercial): A command line interface to access YANG data tree nodes.

- OpenDayLight (open source): Has a GUI to visualize YANG data trees. However, devices and operations now to be described are neither disclosed nor suggested in documentation of these products.

Summary

It is the object of the present invention to provide an improved method and apparatus for obtaining state data together with corresponding configuration data of a resource modelled in a YANG data model.

According to a first aspect of the present invention there is provided a method for obtaining state data together with corresponding configuration data of a resource operating in a communications or data network. The resource is modelled in a YANG data model stored in a memory associated with said resource. The method comprises the steps of receiving a request for retrieving state data and configuration data of the resource, said request comprising an instance identifier of the resource and splitting the received instance identifier into relative paths according to syntax of a YANG data model. Further the method comprises identifying a configuration data schema node of the resource in the YANG data model of the resource based on the relative paths, identifying state data schema node of the resource in said YANG data model of the resource based on the identified configuration data schema node and constructing an instance identifier of the data node containing the state data. The method also comprises retrieving configuration data and state data from the configuration and state data nodes for this resource and merging said retrieved information for output.

According to a second aspect of the present invention there is provided an apparatus for obtaining state data together with corresponding configuration data of a resource operating in a communications or data network, wherein the resource is modelled in a YANG data model stored in a memory associated with said resource. The apparatus comprises a processing circuitry and a memory. The memory contains instructions executable by the processing circuitry such that the apparatus is operative to receive a request for retrieving state data and configuration data of the resource, said request comprising an instance identifier of the resource and to split the received instance identifier into relative paths according to syntax of a YANG data model. The apparatus is further operative to identify a configuration data schema node of the resource in the YANG data model of the resource based on the relative paths, identify state data schema node of the resource in said YANG data model of the resource based on the identified configuration data schema node and to construct an instance identifier of the data node containing the state data. The apparatus is also operative to retrieve configuration data and state data from the configuration and state data nodes for this resource and to merge this retrieved information for output.

According to a third aspect of the present invention there is provided an apparatus for obtaining state data together with corresponding configuration data of a resource operating in a communications or data network, wherein the resource is modelled in a YANG data model stored in a memory associated with said resource. The apparatus is adapted to receive a request for retrieving state data and configuration data of the resource, said request comprising an instance identifier of the resource and to split the received instance identifier into relative paths according to syntax of a Y ANG data model.

The apparatus is further adapted to identify a configuration data schema node of the resource in the YANG data model of the resource based on the relative paths, identify state data schema node of the resource in said YANG data model of the resource based on the identified configuration data schema node and to construct an instance identifier of the data node containing the state data. The apparatus is also adapted to retrieve configuration data and state data from the configuration and state data nodes for this resource and to merge this retrieved information for output.

According to a fourth aspect of the present invention there is provided a method, implemented by a computing device, of providing resource information based on a YANG data model. The method comprises receiving a message comprising an instance identifier of a data node representing a resource that is modelled in a YANG data model and determining, based on the instance identifier, corresponding configuration and state data nodes of the resource within the YANG data model. The method also comprises obtaining configuration and state information of the resource using the corresponding configuration and state data nodes and responding to the message with the configuration and state information of the resource.

According to a fifth aspect of the present invention there is provided a computing device for providing resource information based on a YANG data model. The computing device configured to receive a message comprising an instance identifier of a data node representing a resource that is modelled in a YANG data model and determine, based on the instance identifier, corresponding configuration and state data nodes of the resource within the YANG data model. The computing device is also configured to obtain configuration and state information of the resource using the corresponding configuration and state data nodes and respond to the message with the configuration and state information of the resource.

According to a sixth aspect of the present invention there is provided a computing device for providing resource information based on a YANG data model. The computing device comprises a processor and a memory, the memory containing instructions executable by the processor whereby the device is operative to receive a message comprising an instance identifier of a data node representing a resource that is modelled in a YANG data model and to determine, based on the instance identifier, corresponding configuration and state data nodes of the resource modelled within the YANG data model. The computing device is also operative to use the corresponding configuration and state data nodes to obtain configuration and state information of the resource and respond to the message with the configuration and state information of the resource.

There is also disclosed a computer program comprising instructions which, when executed on at least one processor of a device, cause the at least one processor to carry out the method according disclosed in this document.

There is also disclosed a carrier containing the computer program disclosed above, wherein the carrier is one of an electronic signal, optical signal, radio signal, or computer readable storage medium. Further features of the present invention are as claimed in the dependent claims.

The present invention provides the benefit of simplifying and making more efficient the work with YANG data models. A user can see both configuration and state data together and contextualize this and can do so with a single request. The user does not have to navigate or issue multiple requests and need not be aware of how exactly the state data is modelled.

Brief description of the drawings

The present solution will be understood and appreciated more fully from the following detailed description taken in conjunction with the drawings in which: Figure 1 illustrates YANG data model for interface management, as specified by

RFC 7223;

Figure 2 illustrates the same data model as shown in figure 1, but in an alternative notation with some of the elements have been omitted for brevity;

Figure 3 illustrates an instantiation of the data model shown in figure 2; Figure 4 illustrates an example of an instance identifier referring to a data node as shown in figure 3;

Figure 5 illustrates an example of a naive model-driven CLI using the instance data shown in figure 3;

Figure 6 illustrates an example of a naive model-driven GUI using the instance data shown in figure 3;

Figure 7 presents an overview of actors, interfaces and artefacts involved;

Figure 8 illustrates one embodiment of a method for obtaining state data together with corresponding configuration data of a resource operating in a communications or data network; Figure 9 illustrates an example of a data model used for explanation of the embodiment of the method;

Figure 10 illustrates an example of a data tree used for explanation of the embodiment of the method; Figure 11 illustrates an example of an initial request for configuration and state data;

Figure 12 illustrates an instance identifier after having been split up and assigned to collection“P”;

Figure 13 illustrates an embodiment of a method for determining configuration data schema node based on relative paths;

Figures l4a and l4b illustrate an operation of finding the state data schema node based on configuration data schema node;

Figure 15: illustrates an initial position before searching for schema node containing definition of state data; Figure 16: illustrates an intermediate state after having established Z successfully;

Figure 17 illustrates a schema node of the state data successfully found;

Figure 18 illustrates a collection P updated with the schema node names from stack L;

Figure 19 illustrates possible visualization of the result set; Figure 20 illustrates one embodiment of an operation of caching;

Figure 21 illustrates possible visualization of the result set taken into consideration state data underneath the found state data schema node;

Figure 22 illustrates an alternative embodiment of the method for obtaining state data together with corresponding configuration data of a resource operating in a communications or data network; Figure 23 illustrates one embodiment of an apparatus for obtaining state data together with corresponding configuration data of a resource operating in a communications or data network;

Figure 24 illustrates an embodiment of the method for providing resource information based on a YANG data model.

Detailed description

In the following description, for purposes of explanation and not limitation, specific details are set forth such as particular architectures, interfaces, techniques, etc. in order to provide a thorough understanding of the embodiments of the presented solution. However, it will be apparent to those skilled in the art that the solution may be practiced in other embodiments that depart from these specific details. In other instances, detailed descriptions of well-known devices, circuits, and methods are omitted so as not to obscure the description with unnecessary details.

Reference throughout the specification to“one embodiment” or“an embodiment” means that a particular feature, structure, or characteristic described in connection with an embodiment is included in at least one embodiment of the present solution. Thus, the appearance of the phrases“in one embodiment” or“in an embodiment” in various places throughout the specification are not necessarily all referring to the same embodiment. Further, the particular features, structures or characteristics may be combined in any suitable manner in one or more embodiments.

In one embodiment there is described and illustrated in Figure 22 a method for obtaining state data together with corresponding configuration data of a network device operating in a communications or data network. For example, network device may be a base station, such as eNodeB in Long Term Evolution (LTE), NodeB in Wideband Code Division Multiple Access (WCDMA) or other types of base stations, as well as a Radio Network Controller (RNC), a Base Station Controller (BSC), or other types of control nodes, in alternative embodiments the network device may also be a router or a switch. The network device is modelled in a YANG data model stored in a memory associated with said network device. The method comprising the operations of receiving, 2202, a request for retrieving state data and configuration data of the network device, said request comprising an instance identifier of the configuration data node within the network device and splitting, 2204, the received instance identifier into relative paths according to syntax of a YANG data model. In a preferred embodiment the splitting is carried out according to XPath syntax and the syntax of the YANG data model. Further, the method includes the operations of identifying, 2206, a configuration data schema node of the network device in the YANG data model of the network device based on the relative paths and identifying, 2208, state data schema node of the network device in said YANG data model of the network device based on the identified configuration data schema node, retrieving, 2210, configuration data and state data from the configuration and state data nodes for this network device and merging, 2212, said retrieved information for output.

In a preferred embodiment the YANG data model is available to a network management system.

In another preferred embodiment the operation of splitting, 2204, the received instance identifier further extracts the node prefix, node namespace, node name and key according to the YANG data model.

It is also described and illustrated in figure 23 an embodiment of an apparatus, 2300, for obtaining state data together with corresponding configuration data of a network device operating in a communications or data network. The apparatus 2300 illustrated in figure 23 represents one embodiment of the apparatus 100 illustrated in figure 7. The network device is modelled in a YANG data model stored in a memory associated with said network device. The apparatus, 2300, comprises a processing circuitry, 2302, and a memory, 2304. The memory, 2304, contains instructions executable by the processing circuitry, 2302, such that the apparatus, 2300, is operative to receive a request for retrieving state data and configuration data of the network device, said request comprising an instance identifier of the configuration data node within the network device and split the received instance identifier into relative paths according to syntax of a YANG data model. In a preferred embodiment the splitting is carried out according to XPath syntax and the syntax of the YANG data model. Further, by executing the instructions by the processing circuitry, 2302, the apparatus is operative to identify a configuration data schema node of the network device in the instance of the YANG data model of the network device based on the relative paths and identify state data schema node of the network device in said instance of the YANG data model of the network device based on the identified configuration data schema node. Further, by executing the instructions by the processing circuitry, 2302, the apparatus is operative to retrieve configuration data and state data from the configuration and state data nodes for this network device and merge this retrieved information for output.

The processing circuitry 2302 may be a microprocessor, controller, microcontroller, central processing unit, digital signal processor, application specific integrated circuit, field programmable gate array, any other type of electronic circuitry, or any combination of one or more of the preceding. The processing circuitry 2302 may comprise one or more processor cores. In particular embodiments, some or all of the functionality described herein as being provided by the apparatus 2300 may be implemented by processing circuitry 2302 executing software instructions, either alone or in conjunction with other components of the apparatus 2300, such as memory 2304. Memory 2304 may store code (which is composed of software instructions and which is sometimes referred to as computer program code or a computer program) and/or data using non-transitory machine-readable (e.g., computer-readable) media, such as machine-readable storage media (e.g., magnetic disks, optical disks, solid state drives, read only memory (ROM), flash memory devices, phase change memory) and machine- readable transmission media (e.g., electrical, optical, radio, acoustical or other form of propagated signals - such as carrier waves, infrared signals). For instance, memory 2304 may comprise non-volatile memory containing code to be executed by processing circuitry 2302. Where memory 2304 is non-volatile, the code and/or data stored therein can persist even when the network device is turned off (when power is removed). In some instances, while the apparatus 2300 is turned on that part of the code that is to be executed by the processing circuitry 2302 may be copied from non-volatile memory into volatile memory (e.g., dynamic random access memory (DRAM), static random access memory (SRAM)) of the apparatus 2300.

Interface 2306 may be used in the wired and/or wireless communication of signalling and/or data to or from the apparatus 2300. For example, interface 2306 may perform any formatting, coding, or translating to allow the apparatus 2300 to send and receive data whether over a wired and/or a wireless connection. In some embodiments, interface 2306 may comprise radio circuitry capable of receiving data from other devices in the network over a wireless connection and/or sending data out to other devices via a wireless connection. This radio circuitry may include transmitter(s), receiver(s), and/or transceiver(s) suitable for radio frequency communication. The radio circuitry may convert digital data into a radio signal having the appropriate parameters (e.g., frequency, timing, channel, bandwidth, etc.). The radio signal may then be transmitted via antennas to the appropriate recipient(s). In some embodiments, interface 2306 may comprise network interface controller(s) (NICs), also known as a network interface card, network adapter, local area network (LAN) adapter or physical network interface. The NIC(s) may facilitate in connecting the apparatus 2300 to other devices allowing them to communicate via wire through plugging in a cable to a physical port connected to a NIC. As explained above, in particular embodiments, processor 2302 may represent part of interface 2306, and some or all of the functionality described as being provided by interface 2306 may be provided more specifically by processor 2302.

The components of the apparatus 2300 are each depicted as separate boxes located within a single larger box for reasons of simplicity in describing certain aspects and features of the apparatus 2300 disclosed herein. In practice however, one or more of the components illustrated in the example apparatus 2300 may comprise multiple different physical elements (e.g., interface 2306 may comprise terminals for coupling wires for a wired connection and a radio transceiver for a wireless connection).

Model-driven applications are very powerful as they offer access to any data that is modelled. However, a naive implementation of such a model-driven application will only ever consider the data node that has been explicitly requested by the user.

In a situation where a resource has both configuration data and state data, either of this information will not be displayed, due to the separation of configuration and state in YANG. Hence, the information returned will be incomplete.

Consider figure 5 again. It is apparent that three single requests are required to fetch all relevant information that relates to this particular resource. Not only this, it is unclear what the actual instance identifier should be for the second and third request - is it“if:interfaces-state” , or is it“if:interface-state” to denote the state branch in the data tree? Without consulting the actual data model this is difficult. Likewise, unless the data model is consulted, the user may be unaware that there is actually another container in the state branch under the“interface” container, which is part of the resource state data.

Further, consider figure 6. While the problem with the exact instance identifier does not exist here as these are all listed in the topology view, the user is forced to select these individually to see the relevant information. If the topology is large this may involve considerable navigation carrying a risk of confusion (“which interface was I looking at again?”).

As such, it is hard to contextualize configuration and state data.

The problem at hand is solved by determining, in a fully automated fashion, the state data schema node in the respective YANG data model that contains the configuration data schema node, and from the state data schema node to construct the instance identifier to the data node containing the state data which corresponds to the configuration data node of the resource, and then subsequently to fetch both of these. Various extensions to this logic are also presented. The advantage of this solution is that a user can see both configuration and state data together and contextualize this and can do so with a single request. The user does not have to navigate or issue multiple requests and need not be aware of how exactly the state data is modelled. This simplifies the work of the user and makes the user work flow more efficient.

Consider figure 21 which shows how the end result of such a single request may look like, and contrast this with figure 5.

An apparatus that is capable of accessing configuration data and state data of configured resources of a network device, or network service, or indeed any other hierarchically-related set of resources which are identifiable and whose data model is expressed in the YANG data modelling language, and a method to determine the identity of the data node or data nodes holding the state data based on the identity of the data node holding the configuration data, and a method to merge this data, as will now be presented.

Overview The following is an overview of the actors, interfaces and network elements involved. See figure 7.

A Management Agent, 102, executing on a Host, 104, exposes the configuration data and state data of a related set of hierarchically- structured resources, 106. The totality of the instance data for said resources, 106, is referred-to as“data tree”. The configuration data or state data of an individual resource (e.g. network device, for example a network node, a radio antenna, an IP transport interface, etc.) is referred-to as“data node”. A data node is uniquely identified by an instance identifier.

Said resources, 106, are modelled by means of a data model expressed in the YANG data modelling language. The data model is referred to as“schema tree”, with each YANG container / list referred-to here as“schema node”. Schema nodes are instantiated by data nodes. Said Host, 104, containing said Management Agent, 102, may have a physical embodiment or may be virtualized.

An apparatus, 100, communicates with said Management Agent, 102, using a suitable management protocol, including but not limited to NETCONF, possibly also using authentication / authorization to secure the connection to said Management Agent, 102.

Said apparatus, 100, will typically be realized by a software component, such as an application, or a function.

Said apparatus, 100, may be physically executing on the same Host, 104, together with said Management Agent, 102, or indeed may be running on a separate host to that of said Management Agent, 102. Said apparatus, 100, may be executing on a host which has a physical embodiment, or which may be virtualized.

Said apparatus, 100, possesses one or more interfaces, including, but not restricted to, a graphical user interface, 108, and/or a command line interface, 110, through which it is possible for human users, 112, to interact with said apparatus, 100, in order to perform management operations against said resources, 106.

Among other things, such management operations may include, for example, obtaining and/or setting one or more parameters relating to a radio interface, radio resource management, mobility management, security management, communication management, and/or network management. Such parameters may relate, for example, to idle/connected mode of a network device, time and/or frequency resources of an interface, channel coding, interleaving, modulation, link adaptation, flow control, multiplexing, handover, device power control, transmission power control, timing advance, channel management, paging, call session establishment/release/re-establishment, load management, positioning, location services, signal measurement, reference signals, subscription management, cell configuration, call/session routing, quality of service (QoS), billing, charging, policy management, bearer management, and/or timer control. In particular, setting such parameters may relate, for example, to enabling, disabling, or assigning a particular value to said parameters.

Said apparatus, 100, may also offer machine-consumable interfaces, 114, such as, but not restricted to, a REST interface, through which it is possible for semi-automated or fully-automated machine agents, 116, to interact with said apparatus, 100, in order to perform management operations against said resources, 106.

Said users, 112, or machine agents, 116, use the interfaces 108, 110, 114 offered by said apparatus, 100, to read the current configuration data and state data of said resources, 106, and to manipulate the configuration of said resources, 106. Said apparatus, 100, has access to, by means including, but not limited to, locally installed copies of, and/or automatically or user-initiated downloaded or otherwise sourced copies of, the YANG Data Model, 118, that describes the structure of the configuration data and state data of said resources, 106.

Method The following describes one embodiment of a method of handling a request to return configuration data and state data for a resource. Also see figure 8. Each of the steps shown here is described in more detail in subsequent sections.

Step 1 : Said users, 112, or machine agents, 116, wish to retrieve the configuration data and state data of a resource (in one embodiment this may be a network device, but in typical embodiments a network device comprises a plurality of resources). The instance identifier of the resource is included in this request.

Step 2: The instance identifier received is split up into relative paths and each of these is further split up into various parts.

Step 3 : The schema node that contains the definition of the configuration data is identified in the schema tree. Step 4: The schema node that contains the definition of the state data is identified in the schema tree.

Step 5: The instance identifier to the data node containing the state data is constructed. Step 6: Both the configuration data and state data are read, and the merged results returned.

Notes on notation and terminology

The subsequent discussion makes use of single uppercase letters, such as‘S’ and ‘W’, to refer to various schema nodes, or data structures. Lowercase letters, such as Ϊ’ and /’, are used to refer to iterators over data structures.

Further, let N(X) be the name of a schema node X; let PX(X) be the prefix of a schema node if; let NS(X) be the namespace of a schema node if; let C(X) be the maximum cardinality of a schema node X; let K(X) be the keys of a schema node X.

Said apparatus, 100, uses a fictitious, un-modelled, schema node which for the purposes of this method is considered the singleton root schema node, under which the actual schema tree is mounted. This fictitious schema node is referred-to as“/ (root)

The YANG data modelling language allows for multiple data models fragments, called modules and sub-modules, to form together the totality of the data model. In the method, all mentions of the YANG data model should be understood to mean the totality of all YANG modules and sub-modules which together form the data model.

The method described only considers YANG container and list constructs to be schema nodes. In the YANG language, other constructs can be schema nodes as well; however, for the purposes of the method described herein these other constructs are ignored as they are not of relevance. The YANG language allows for containers and list constructs to be made conditional by various constructs, such as“when “choice “if-feature” and others. The method described herein considers all of these conditions to always be fulfilled, and further logically removes any of these conditionality constructs, some of which are also schema nodes in the YANG language, from the data model, such that only a container and list constructs remain, with their original relative hierarchy intact. An example data model shown in figure 9, with an example data tree shown in figure 10, may be used to help understand the method described.

The data model illustrated in figure 9 shows an example of how the resources of an enclosure containing racks, line-cards and ports may be modelled in YANG. As explained in the description of figure 2 the top-most schema node named“/ (root)” does not exist in the actual data model and cannot have an instantiation. It is added by the apparatus to have a single true root of the data model. The left branch of the schema tree is used for configuration data, whereas the right branch is used for state data. This is apparent by the fact that schema node, 222, has the same name as schema node, 220, but having a suffix of “-state and further that it is marked as“con fig = false This is common convention in YANG. As explained earlier, the word“config” is a keyword of the YANG language. It is used to indicate whether a schema node denotes configuration (“config = true”) and thereby something that can both be written-to and read; or whether the schema node is state data (“config = false”) and hence can only ever be read. List “port-state 224, contains three leaves; one of these (“nr”) is used as key, the other two contain state data in the form of some packet counters. The prefix for all elements in this data model is “en: Further, in the data model this prefix is mapped to namespace “com.acme/enclosure

The data tree illustrated in figure 10 shows instance data (data nodes). Each circle represents an instance of a YANG container or an instance of a member of a YANG list. As explained earlier, the top-most node named“/ (root)” does not exist in the actual data tree. It is used here to create a structural relationship between the two branches. Dashed lines denote hierarchical relationships to data nodes that are not of relevance to the example at hand, and which have been omitted for brevity. With the YANG notation explained now the embodiment of the method illustrated in figure 8 with reference to figure 7 will be described in more detail.

Step 1: Initial request by user or machine agent

[Ola] Said users, 112, or machine agents, 116, wish to retrieve the configuration data and state data of a resource (e.g. network device, a radio antenna, an IP interface), which is part of said resources 106, such that the data is presented together.

[Olb] Said users, 112, or machine agents, 116, supply the instance identity of a resource part of said resources, 106, to said apparatus, 100, on one of said interfaces, 108, 110, 114. This is supplied as a request to retrieve the configuration data and state data of the resource. See figure 11, which shows a request made to retrieve the configuration and state data for a resource identified by the given instance identifier. Shown in figure 11 is a request made on a Command Line Interface. The instance identifier identifies exactly one data node in the data tree. In figure 10, this data node is denoted by circle“S”, 1002. Each relative path of the instance identifier contains the name and prefix, and thereby implicitly the namespace of, a schema node in the schema tree.

Step 2: Splitting the Instance Identifier into relative paths

[02a] Said apparatus, 100, splits the instance identifier supplied into relative paths, and further splits these up into node prefix, node namespace, node name and keys values, as is now explained in the following. See figure 12, which shows a number of relative paths being result of processing of the instance identifier. Each relative path is separated into the node prefix and subsequently resolved to a namespace, the node name and node keys. Not all relative paths may have node keys - in the example shown in figure 12, container“enclosure” does not have a key, as it is a singleton.

[02b] Said apparatus, 100, determines the relative paths by splitting the instance identifier based on the forward solidus 7 character, ignoring any leading forward solidus character 7 and ignoring any forward solidus character 7 used within the value part or parts of any key-value sequence used within any relative path. The result of this is an ordered collection of relative paths.

[02c] Let“P” be this ordered collection of relative paths thus determined. Let P[17 be the first entry o f co llection P, and in general let P[n ] be the n-th entry o f co llection P.

[02d] Each relative path will be further separated into node prefix, node name and keys. This is done in accordance with XPath rules (see ref. 4). Each prefix is resolved to a namespace by consulting the prefix / namespace mapping inside the data model.

[02e] The result is a number of relative paths extracted, with each entry being a relative path, and further the node prefix, node namespace, node name and key separated out. Consider figure 12 again.

Step 3: Finding the configuration data schema node based on relative paths

[03a] Said apparatus, 100, consults said Data Model, 118, and locates the configuration data schema node that contains the definition of the requested resource, based on the relative paths extracted in the previous step, as is now explained in the following. See figure 13, which shows one embodiment of steps to be performed to find the configuration data schema node in the schema tree, 1302, based on the relative paths of an instance identifier, 1304. If a match on name and namespace of the relative path against a schema node cannot be found, 1306-No, the instance identifier is invalid. If all the entries in P are exhausted, 1308-No, the schema node S arrived-at, 1312, denotes the node in the schema tree that contains the configuration data definition of the resource identified through the instance identifier.

[03b] Let“M” be a reference to a schema node with M being initialized with the abstract root schema node“/” further let“i” be an index running from one up to and including the size of P and it being initialized with the value one, step 1302.

[03c] Said apparatus, 100, considers all child schema nodes of , and attempts to find a schema node S such that S' is a child of M, and further that N(S) = N(P[i]) and NS(S) = NS(P[iJ) as part of this comparison, prefixes are resolved to namespaces by consulting the prefix / namespace mapping inside the data model, loop 1304 - 1306 - 1308 - 1310 - 1304. If a match cannot be found, 1306-No, then the instance identifier supplied is incorrect and in which case said apparatus, 100, will return an appropriate error, 1314. In this case it may be that the instance identifier supplied by the user was incorrect (i.e. refers to a data node that cannot exist according to the model). For example, the user has used “linecard” instead of“line-card” in the instance identifier example, but“linecard” does not exist in the model. Otherwise, 1306-Yes, a check will be performed to see whether all entries of P have been iterated over, 1308: if this is the case, the schema node S arrived it is the node in the schema tree that holds the definition of the configuration data of the resource identified by the instance identifier, 1308-No; otherwise, l308-Yes, M is set to S, the index i is increased by one, 1310, and this sub-step [03c] is repeated.

[03d] The configuration data schema node ultimately found is S, 1312, which will be used in the next section.

Step 4: Finding the state data schema node based on configuration data schema node

[04a] Given a configuration data schema node S thus found, said apparatus, 100, now tries to find the schema node in the schema tree that contains the definition of the state data of the requested resource (i.e. state data schema node), as is now explained in the following:

[04b] In general, said apparatus, 100, attempts to find a schema node Y sharing the same ancestor schema node as S in the schema tree hierarchy such that Y != S. The meaning of“!=” is unequal. In the context of this disclosure, it means that schema nodes Y and S do not represent the same schema node. Additional requirements on S and Y are:

• NS(Y) = NS(S) and C(Y) = C(S) and K(Y) = K(S);

• the number of ancestor schema nodes of both Y and S up to the shared ancestor schema node is the same; • the namespace, cardinality and key are equal for each of the respective ancestor schema nodes, recursively, up to the shared ancestor of Y and S

• N(Y) = N(S) or N(Y) = N(S) +“-state

• for all ancestors equidistant from Y and S in the schema tree hierarchy

N (ancestor (Y)) = N (ancestor (S)) or N (ancestor (Y)) = N (ancestor (S)) +“-state” except for the shared ancestor and except for the last of the ancestors of Y and S under the shared ancestor, where

N(last-ancestor-under-shared-ancestor(Y)) = N(last-ancestor-under-shared-ancestor (S)) +‘‘-state and further the last ancestor under the shared ancestor of Y being marked as config = false.

[04c] The detailed method to perform this search is as follows. The diagrams of figures l4a and l4b shows the method when trying to find the state data schema node, beginning with the configuration data schema node and working up the configuration branch until a suitable sibling of a schema node is found. [04d] A stack is created, 1402. Each entry of this stack will contain a reference to a schema node. Entries can be pushed onto the stack and can be popped from the stack (last-in first-out). A pushing of a value onto the stack will increase the number of entries on the stack by one; a popping of an entry will always return the last pushed value, and at the same time remove this value from the stack and thereby decrease the number of entries of the stack by one. Let T be this stack.

[04e] A second stack is created, 1402. Each entry of this stack will contain the name of a schema node. The semantics of such a stack are the same as outline above. Let

L be this stack.

[04f] Let W be a schema node that is under consideration. Let W be initialized with S, 1402. Here we mean that W simply gets the value of S or, in other words, W points to the same schema node as S. See figure 15 for this initial state for the example data tree shown in figure 10. In figure 15 the same data model is shown as in figure 9, but only YANG“container” and“list” constructs, as only these are of relevance to the method. The initial state in the table shown in figure 15 is shown before the search for the state data schema node is started. Schema node W is initialized to the configuration data schema node S previously found. Stacks T and L are empty.

[04g] In the next step an attempt is made to find a schema node Z being a sibling of W, such that both Z and W have the same parent schema node in the schema tree, and such that N(Z) = N(W) +“-state” and NS(Z) = NS(W) and C(Z) = C(W) and K(Z) = K(W) and Zbeing marked as config = false, 1404. If this attempt fails and tF has a parent schema node, steps 1406-No and l408-Yes, push W onto stack T and set W to be the parent schema node of W, 1410. The operations of the sub-step [04g] are repeated until a schema node Zbeing a sibling of W is found, step 1406- Yes, or, if there is no parent schema node of W left to navigate to, step 1408-No, the attempt has failed and the data model does not contain a definition of state data for the resource in accordance with general YANG conventions, 1412.

[04h] If the previous sub-step succeeded, 1406- Yes, set W to be schema node Z eventually arrived-at. Push N(W) onto stack L, 1414. See figure 16 for the intermediate state arrived at this point for the example data tree shown in figure 10. Figure 16 shows an intermediate state of the determination of the state data schema node. At this point, the top-most siblings, sharing a common ancestor and satisfying certain other criteria, have been found, i.e. en: enclosure and en: enclosure-state in figure 16. In the table at the bottom of figure 16 stack Fhas been filled with all the schema nodes encountered on the way up to“en: enclosure” and stack L already has an entry added - that of the name of the found schema node Z:“enclosure-state

[04i] Pop the top-most schema node from stack T and let this schema node be E, 1418. Attempt to find a schema node D being a child schema node of W, such that N(D) = N(E) or N(D) = N(E) + “-state” and further such that NS(D) = NS(E) and

C(D) = C(E) and K(D) = K(E), 1420. If this attempt succeeds, l422-Yes, push N(D) onto stack L, set W to be D, 1424, and repeat this sub-step [04i] until the stack T is empty, !4l6-Yes; once empty, !4l6-Yes, the schema node W eventually arrived-at contains the state data schema node for the resource, 1426. If this attempt fails, the data model does not contain a definition of state data for the resource in accordance with general YANG conventions, 1428.

[04j] See figure 17 for this final state after having eventually arrived-at schema node W representing the schema node of the state data for the example data tree shown in figure 10. The state data schema node has been successfully found. The table at the bottom of figure 17 shows that stack T has been emptied while walking down the state branch and comparing the namespaces and names of the schema nodes, whereas stack L contains the names of all schema nodes encountered on the way down to the state data schema node.

[04k] While navigating through the schema tree and attempting to match schema nodes, key K is omitted from consideration for each schema node where C (schema-node) = I ; where C (schema-node) > 1 and multiple keys have been specified all keys are considered; key K is identified by both the name and namespace of the leaf or leaves which are used as key or keys. Further, any prefix encountered as part of the navigation through the schema tree is resolved to the namespace by consulting the prefix / namespace mapping inside the data model.

Step 5: Constructing the instance identifier to the data node in the data tree containing the state data [05a] Assuming said apparatus, 100, has found the schema node of the definition of the state data for the requested resource as detailed before, said apparatus, 100, now calculates the identity of the instance identifier for the state data in the data tree, as is now explained in the following. Please also refer to figure 18, where the table shows the contents of collection P after the stack L has been unwound. The schema names taken off stack L have been used to overwrite the node names in P (5-th column). Note how in entry 1 the name of the node is now“enclosure-state in entry 4 the name of the node is now “port-state” . Compare this to the original content of this collection P that is shown in figure 12. The re-assembled instance identifier is now pointing at the data node for the state data, as opposed to pointing to the data node for the configuration data originally.

[05b] Let“i” be an index running from the number of entries in P downwards to one, and it being initialized with the value equal to the number of entries in P.

[05c] Pop the top entry from stack L and set N(P[iJ) to that entry; afterwards, reduce index i by one. Repeat this sub-step [05c] until either the stack is empty or i is zero.

[05d] Let“j” be an index running from one up to and including the number of entries in P and it being initialized with the value one. An empty string B is created.

[05e] For each entry in P, append the following to string B the forward solidus character 7\ PX(P[j]), the colon character ”, N(P[j]), and K(P[j]) if it exists; after each iteration index j is increased by one.

[05 f] String B now contains the instance identifier to the data node in the data tree that contains the state data of the resource.

Step 6: Reading configuration and state data and merging results

[06a] Said apparatus, 100, now reads all relevant configuration and state data and merges this as is now explained in the following:

[06b] Said apparatus, 100, retrieves the configuration data for the requested resource using the instance identifier as originally supplied by said users, 112, or machine agents, 116, in sub-step [Olb], from said Management Agent, 102, via suitable means, for example a NETCONF“get-config” command.

[06c] Said apparatus, 100, retrieves the state data for the requested resource using the instance identifier for the state data in the data tree as constructed in step 5, from said Management Agent, 102, via suitable means, for example a NETCONF“get” command.

[06d] The data returned by both requests is now merged together to a single result set and returned to said users, 112, or machine agents, 116. If the returned data is visualized, this may happen by visually merging together the data, or showing it separated into configuration and state data. Some examples are shown in figure 19 where two possible ways of how the configuration and state data may be displayed on a Command Line Interface are illustrated. Key-attribute“nr” is only shown once in both options, as the value for this leaf is the exact same for both configuration and state data out of necessity. Prefixes are omitted in the output. They may be optionally added.

Extensions

The following sections contain various alternative optional embodiments (extensions) of the method described in steps 1 to 6 above, or extensions to individual logic of any of the detailed sub-steps of any of the steps 1 to 6 described above.

Extension 1: Cache mapping from configuration data schema node to state data schema node

[ExOla] Steps 3 and 4 of the method describe how the schema node of the configuration data node is determined, and then subsequently how the schema node for the state data is determined. To avoid execution of these steps in a situation where the instance identifier relates to a schema node of configuration data that has been previously resolved, a caching mechanism may be employed, as is now explained in the following (also see figure 20):

[ExOlb] After sub-step [04j] (i.e. when the configuration data schema node and the state data schema node have been successfully found), said apparatus, 100, places into a cache the following: information about all NS(P[n]) and N(P[n]) with n being a number iterated from 1 up to and including the number of entries in P (you can see this in the left-hand side of figure 20); and

mapping this to the entries of stack L (this is shown in the right-hand side of figure 20). In this way the information found by executing the method of this embodiment of the invention is recorded and can be re-used when the method is executed again.

[ExOlc] Further, when the method is executed again and before executing sub- step [03a], said apparatus, 100, consults this cache and tries to find an entry within the cache matching all NS(P[n]) and N(P[n]) with n being a number iterated from 1 up to and including the number of entries in P. Said apparatus 100 obtained a number of relative paths by executing step 2 (i.e. splitting the Instance Identifier into relative paths) and the output of step 2 is illustrated in figure 12. In the operation of the step [ExOlc] of extension 1 the output of step 2 is checked against the content of the cache. If no such entry is found, the method as described in steps 3 and 4 executes as normal. If, however, a matching entry is found, then the mapped-to values of that entry will be used as stack L, steps 3 and 4 are skipped, and the method continues execution with sub-step [05b]

This caching mechanism is illustrated in an example of a single cache entry in figure 20. A cache may contain one or more mappings from a collection to a stack L. A cache key is the totality of the namespaces and names of the relative paths of an instance identifier. A cache value is the resulting stack L that is populated as part of the navigation from the configuration data schema node to the state data schema node. Repeated invocations of the method may consult such a cache to avoid having to perform repeated navigation through the schema tree, and thereby speed up overall processing. Extension 2: Multiple resources

[Ex02a] In steps 1 to 6 reference is made to the retrieval of configuration data and state data of a resource. In a situation where said users, 112, or machine agents, 116, request configuration data and state data of multiple resources of said resources, 106, as indicated by supplying multiple instance identifiers, the following applies: [Ex02b] Steps 2 to 5 are repeated for each resource. [Ex02c] In step 6, the configuration data and state data read from said management agent is repeated for each resource. Further, the merging together of configuration data and state data happens for each resource.

Extension 3: Different word used to indicate state branch [Ex03a] Given the name of a schema node defining the configuration data of a resource, it is common convention in YANG to append the hyphen character followed by the word“state to that node name to arrive at the name of the schema node containing the definition of the state data of that resource.

[Ex03b] Some schema model designers may choose to not follow that convention, but to use a suffix other than“-state” to denote the schema node for state data. One example is where a localized name of “state” is used instead (perhaps using“status” in the German language, to arrive at suffix“-status”).

[Ex03c] To cater for this scenario, said apparatus, 100, can be configured with one or multiple suffixes that are considered when testing for schema node names. By default, the only suffix considered is“-state In a situation where multiple suffixes have been configured, each one of these is tried in turn, and a match on any of them is considered the same as a match for“-state This applies to all sub-steps in the method where a comparison is made on the name of a schema node with such a suffix.

Extension 4: Additional schema nodes under state data schema node of the resource [Ex04a] Consider figure 2 again. It is apparent that the state branch has a container

“statistic which has no corresponding container in the configuration branch. In other words, the state data for resource“if) interface” is contained not just inside the leaves directly within container“interface”, but also underneath container“statistics

[Ex04b] In a situation where a container exists under the schema node for the state data, which has no corresponding container under the configuration data schema node, the state data part of that container is also retrieved, as is now explained in the following: [Ex04c] Let B be a collection of schema nodes. Let B[l] be the first entry in that collection, and in general let B[n] be the n-th entry of B. Collection B is initially empty.

[Ex04d] After sub-step [04j], said apparatus, 100, matches the child schema nodes of state data schema node W against the child schema nodes of configuration data schema node S. Lor this, it iterates over all child schema nodes of W, and for each of these child schema nodes attempts to find a child schema node of S, such that NS(child-of(S)) = NS(child-of(W)) , and further such that N(child-of(S)) = N(child-of(W)) or N(child-of(S)) + “-state” = N(child-of(W)). If this fails, and further that C(child-of(W)) = 1 (one), add this child schema node to collection B. [Ex04e] The result of this attempt to match the child schema nodes of S and W are zero, one or multiple schema nodes in collection B. If the number of entries in B is larger than zero, additional instance identifiers are created as part of step 5, as is now explained in the following:

[Ex04f] After sub-step [05g], an additional instance identifier is created for each entry in B. The instance identifier for each entry in B is constructed by taking the instance identifier arrived-at in sub-step [05f], and appending the following: the forward solidus character“/”, PX(B[n]), the colon character and N(B[n]).

[Ex04g] When retrieving the state data in sub-step [06c], the state data of those data nodes identified by the additional instance identifiers is also retrieved. This data is merged together with the state data and configuration data of the resource.

[Ex04h] An example of the end result of such an operation, which uses the instance data from figure 3, can be seen in figure 21 which shows how the configuration and state data may be displayed on a Command Line Interface for a request for a resource. Consult figure 3 for the data tree. The state data of container“statistics which has no corresponding container in the configuration, has also been retrieved and is shown in a form to visually separate it from other state data.

Extension 5: Error-handling [Ex05a] At some points in the method a situation may occur where a schema node cannot be found. The handling of these errors is as follows:

[Ex05b] If in sub-step [02b] or in sub-step [02d] the splitting of the instance identifier is not successful, indicating invalid instance identifier syntax, all following sub- steps are skipped, and an appropriate error message is returned.

[Ex05c] If in sub-step [03 c] the configuration data schema node cannot be found, indicating an invalid instance identifier, all following sub-steps are skipped, and an appropriate error message is returned.

[Ex05d] If in sub-step [04g] the attempt to find schema node Z fails, the data model does not contain a definition of state data for the resource in accordance with general YANG conventions. All following sub-steps until [06b] are skipped, sub-step [06b] is executed, sub-step [06c] is skipped, and in sub-step [06d] only the configuration data is returned.

[Ex05e] If in sub-step [04i] the attempt to find schema node D fails, the data model does not contain a definition of state data for the resource in accordance with general YANG conventions. All following sub-steps until [06b] are skipped, sub-step [06b] is executed, sub-step [06c] is skipped, and in sub-step [06d] only the configuration data is returned.

The method and apparatus described above are capable of determining the instance identifier to a state data node that corresponds, with the instance identifier, to a configuration data node of a resource in a fully automated fashion, by means of determining the state data schema node that corresponds with the configuration data schema node of a resource, modelled as part of a YANG data model, based on certain YANG conventions, in a fully automated fashion; and further to retrieve all relevant information from both configuration and state data nodes for this resource and to merge this data. Another embodiment of a method of providing resource information based on a YANG data model in illustrated in figure 24. The method is implemented by a computing device and it comprises operations of receiving, 2402, a message comprising an instance identifier of a data node representing a resource that is modelled in a YANG data model. Preferably, the message comprises a request for retrieving state data and configuration data of the resource. Based on the instance identifier, corresponding configuration and state data nodes of the resource modelled in the YANG data model are then determined, 2404. In the following operation configuration and state information of the resource is obtained, 2406, using the corresponding configuration and state data nodes. Once the configuration and state information is obtained the method comprises responding, 2408, to the message with the obtained configuration and state information of the resource.

Preferably, obtaining the configuration and state information of the resource comprises fetching the configuration and state information of the resource from a remote device, wherein also preferably, the remote device comprises a plurality of resources. In some embodiments the remote device may be the resource.

The instance identifier is used to determine the configuration data node and then the state data node is determined based on said configuration data node, which leads to determining the corresponding configuration and state data nodes.

In a preferred embodiment the operation of determining corresponding configuration and state data nodes of the resource modelled in the YANG data model comprises splitting, 2204, the received instance identifier into relative paths according to XPath syntax and the contents of the YANG data model and then identifying, 2206, a configuration data schema node of the network device in the YANG data model of the network device based on the relative paths. Once the configuration data schema node is identified the method comprises identifying, 2208, state data schema node of the network device in said YANG data model of the network device based on said identified configuration data schema node as described earlier with reference to step 4 illustrated in figure 8 and step 2208 in figure 22. Preferably, the operation of obtaining, 2406, configuration and state information of the resource using the corresponding configuration and state data nodes comprises constructing an instance identifier of the data node containing the state data. Further the operation of obtaining, 2406, comprises retrieving, 2210, configuration data and state data from the configuration and state data nodes for this network device and merging, 2212, said retrieved information for output. More details of the operations of constructing an instance identifier, retrieving configuration data and state data and merging can be found in description of steps 5 and 6 illustrated in figure 8.

In yet another embodiment there is disclosed an apparatus, 2300, implemented as a computing device for providing resource information based on a YANG data model. The computing device is configured to receive a message comprising an instance identifier of a data node representing a resource that is modelled in a YANG data model and to determine, based on the instance identifier, corresponding configuration and state data nodes of the resource modelled in the YANG data model. Further, the computing device is configured to obtain configuration and state information of the resource using the corresponding configuration and state data nodes; and to respond to the message with the configuration and state information of the resource. The computing device, which may be implemented in an arrangement as illustrated in figure 23, may be implemented using a processing circuitry, 2302, and a memory, 2304, wherein the memory, 2304, contains instructions executable by the processing circuitry, 2302, such that the computing device, 2300, is operative to perform according to embodiments of the method described above with reference to figures 24, 22, 8 as well as 13, l4a and l4b.

Embodiments of the present disclosure additionally or alternatively include responsive to receiving a message comprising an instance identifier of a data node representing a resource that is modelled in a YANG data model, determining, based on the instance identifier, corresponding configuration and state data nodes of the resource modelled in the YANG data model and, using the corresponding configuration and state data nodes to obtain configuration and state information of the resource, and responding to the message with the configuration and state information of the resource. In some embodiments, obtaining the configuration and state information of the resource comprises fetching the configuration and state information of the resource from a remote device. Preferably, the remote device comprises a plurality of resources, but in some embodiments the remote device may be the resource

Moreover, in some embodiments, determining corresponding configuration and state data nodes for the resource based on the instance identifier comprises determining the configuration data node based on the instance identifier and determining the state data node based on the configuration data node. In other embodiments, determining corresponding configuration and state data nodes for the resource comprises determining the state data node based on the instance identifier and determining the configuration data node based on the state data node.

Further embodiments:

A computing device for obtaining state data together with corresponding configuration data of a resource operating in a communications or data network, wherein the resource is modelled in a YANG data model stored in a memory associated with said resource, the computing device configured to:

- receive a request for retrieving state data and configuration data of the resource, said request comprising an instance identifier of the resource; - split the received instance identifier into relative paths according to syntax of a

YANG data model;

- identify a configuration data schema node of the resource in the YANG data model of the resource based on the relative paths;

- identify state data schema node of the resource in the YANG data model of the resource based on the identified configuration data schema node;

- construct an instance identifier of the data node containing the state data; - retrieve configuration data and state data from the configuration and state data nodes for this resource; and

- merge said retrieved information for output. A computing device for obtaining state data together with corresponding configuration data of a resource operating in a communications or data network, wherein the resource is modelled in a YANG data model stored in a memory associated with said resource, the device comprising a processor and a memory, the memory containing instructions executable by the processor whereby the device is operative to: - receive a request for retrieving state data and configuration data of the resource, said request comprising an instance identifier of the resource;

- split the received instance identifier into relative paths according to syntax of a YANG data model;

- identify a configuration data schema node of the resource in the YANG data model of the resource based on the relative paths;

- identify state data schema node of the resource in said YANG data model of the resource based on the identified configuration data schema node;

- construct an instance identifier of the data node containing the state data;

- retrieve configuration data and state data from the configuration and state data nodes for this resource; and

- merge said retrieved information for output.

A computing device for obtaining state data together with corresponding configuration data of a resource operating in a communications or data network, wherein the resource is modelled in a YANG data model stored in a memory associated with said resource, the device comprising:

- a receiving module configured to receive a request for retrieving state data and configuration data of the resource, said request comprising an instance identifier of the resource; - a splitting module configured to split the received instance identifier into relative paths according to syntax of a YANG data model;

- a first identifying module configured to identify a configuration data schema node of the resource in the YANG data model of the resource based on the relative paths;

- a second identifying module configured to identify state data schema node of the resource in said YANG data model of the resource based on the identified configuration data schema node;

- a constructing module configured to construct an instance identifier of the data node containing the state data;

- a retrieving module configured to retrieve configuration data and state data from the configuration and state data nodes for this resource; and

- a merging module configured to merge said retrieved information for output.

A computing device for providing resource information based on a YANG data model, the computing device comprising:

- a receiving module configured to receive a message comprising an

instance identifier of a data node representing a resource that is modelled in a YANG data model;

- a determining module configured to determine, based on the instance identifier, corresponding configuration and state data nodes of the resource modelled in the YANG data model;

- an obtaining module configured to use the corresponding configuration and state data nodes to obtain configuration and state information of the resource; and

- a responding module configured to respond to the message with the configuration and state information of the resource. References:

1. RFC 6020 -“YANG - A Data Modeling Language for the Network Configuration Protocol (NETCONF)” - https://tools.ietf.org/htmFrfc6020; 2. RFC 7950 - “The YANG 1.1 Data Modeling Language” - https://tools.ietf.org/html/rfc7950;

3. RFC 7223 - “A YANG Data Model for Interface Management” - https://tools.ietf.org/html/rfc7223;

4. XPath syntax - The World Wide Web Consortium - XML Path Language (XPath) Version 1.0 - W3C Recommendation 16 November 1999 (Status updated October 2016)

- https://www.w3.org/TR/l999/REC-xpath-l999l 116/.