Jump to: navigation, search

OpenDaylight dlux:yangUI





The main page. On the top part is displayed tree of APIs and subAPIs and buttons for calling of possible functions (GET, POST, PUT, DELETE, …). Not every subAPIs have possibility to call every functions. For example, subAPIs “operational” have only functionality GET. On the bottom part are displayed inputs according chosen subAPI. Inputs can be filled from ODL, when existing data from ODL is displayed, or can be filled by user on the page and send to ODL.



  • ./src/app/yangui/yangui.module.js – defines path to index.tpl.html and root.tpl.html
  • ./src/app/yangui/yangui.controller.js – contains controllers called from index.tpl.html. These are controller for APIs with all functionality for creating main structures for APIs, nodes, linking subApis with rootNodes and saving structures to scope, and controllers for inputs which represents statements from yang models. From these controllers are called functions defined in YangUtils.



./src/common/yangutils/ yangutils.services.js


  • arrayUtils – defines functions for working with arrays.
  • pathUtils – defines functions for working with xpath (paths to APIs and subAPIs). It divides xpath string to array of elements, so this array can be later used for search functions.
  • syncFact – provides synchronization between requests to and from ODL when it’s needed.
  • custFunct – it is linked with apiConnector.createCustomFunctionalityApis in yangui controller in yangui.controller.js. That function makes it possible to create some custom function called by the click on button in index.tpl.html. All custom functions are stored in array and linked to specific subAPI. When particular subAPI is expanded and clicked, its inputs (linked root node with its child nodes) is displayed in the bottom part of the page and its buttons with custom functionality are displayed also.
  • reqBuilder – creates object builder = request built from filled inputs on page in JSON format. It is possible with “show preview” button. This request is sent to ODL when button PUT or POST is clicked.
  • yinParser – factory for reading of .xml files of yang models and creating objects hierarchy. Every statement from yang is represented by node.
  • nodeWrapper – adds functions to objects in tree hierarchy created with yinParser. These functions provide functionality for every type of node.
  • apiConnector – the main functionality is filling the main structures and linking them. Structure of APIs and subAPIs which is two level array - first level is filled by main APIs, second level is filled by others sub APIs. Second main structure is array of root nodes, which are objects including root node and its children nodes. Linking these two structures is creating links between every subAPI (second level of APIs array) and its root node, which must be displayed like inputs when subAPI is expanded.
  • yangUtils – some top level functions which are used by yangui controller for creating the main structures.



  • ./src/assets/views/yangui/*.tpl.html – templates for displaying of statements, these files shows data from config datastore. It must exist one file for each statement (list, case, choice, leaf, …) .
  • ./src/assets/views/yangui/operational/*.tpl.html – templates for displaying of statements, these files shows data from operational datastore. It must exist one file for each statement (list, case, choice, leaf, …) .