1 define(['app/yangui/yangui.module', 'common/yangutils/yangutils.services'], function(yangui, yangutils) {
\r
3 yangui.register.factory('checkFlow', function($http, reqBuilder, yangUtils, YangUtilsRestangular) {
\r
5 var fnc = function($scope) {
\r
6 var requestPath = $scope.selSubApi.buildApiRequestString().replace('config','operational'),
\r
8 getPathIdentifierData = function(pathArray){
\r
10 pathArray.forEach(function(item){
\r
11 if( item.hasIdentifier() ) {
\r
12 data += item.name + ': ' + item.identifierValue + '\n ';
\r
17 identifiers = getPathIdentifierData($scope.selSubApi.pathArray);
\r
19 YangUtilsRestangular.one('restconf').customGET(requestPath).then(
\r
21 alert('Flow: \n\n' + identifiers + '\n\n is in controller.');
\r
22 }, function (result) {
\r
23 alert('Flow: \n\n' + identifiers + '\n\n isn\'t in controller.');
\r
29 module: ['opendaylight-inventory'],
\r
31 pathString: ['config/opendaylight-inventory:nodes/node/{id}/flow-node-inventory:table/{id}/flow/{id}/'],
\r
32 label: 'Verify operational flow',
\r