diff options
24 files changed, 1706 insertions, 320 deletions
diff --git a/configbackuprestore/vnfconfigbackupservice/pom.xml b/configbackuprestore/vnfconfigbackupservice/pom.xml index c6c6b5a3..d931ab03 100644 --- a/configbackuprestore/vnfconfigbackupservice/pom.xml +++ b/configbackuprestore/vnfconfigbackupservice/pom.xml @@ -18,7 +18,19 @@ <url>http://maven.apache.org</url> <dependencies> - + + <dependency> + <groupId>org.onap.sdnc.oam.vnfbackup</groupId> + <artifactId>getBackupVnfDetailService</artifactId> + <version>1.4.0-SNAPSHOT</version> + </dependency> + + <dependency> + <groupId>org.onap.sdnc.oam.vnfbackup</groupId> + <artifactId>vnfconfigreportsservice</artifactId> + <version>1.4.0-SNAPSHOT</version> + </dependency> + <dependency> <groupId>org.jmockit</groupId> <artifactId>jmockit</artifactId> @@ -134,4 +146,4 @@ </plugin> </plugins> </build> -</project> +</project>
\ No newline at end of file diff --git a/configbackuprestore/vnfconfigbackupservice/src/main/resource/application.properties b/configbackuprestore/vnfconfigbackupservice/src/main/resource/application.properties deleted file mode 100644 index 4c2287b2..00000000 --- a/configbackuprestore/vnfconfigbackupservice/src/main/resource/application.properties +++ /dev/null @@ -1,72 +0,0 @@ -server.port = 9003 -#server.error.whitelabel.enabled=false -spring.mvc.view.prefix = /WEB-INF/views/ -spring.mvc.view.suffix = .jsp -# -#spring.datasource.url=jdbc:mariadb://localhost:3306/testreports?useSSL=false -##spring.datasource.url=jdbc:mysql://localhost:3306/mysql?useSSL=false -##spring.datasource.driver-class-name=com.mysql.jdbc.Driver -#spring.datasource.driver-class-name=org.mariadb.jdbc.Driver -#spring.datasource.name=mysql -#spring.jpa.database=testreports -#spring.jpa.database-platform=org.hibernate.dialect.MySQL5InnoDBDialect -##org.hibernate.dialect.MySQLDialect -# -# -#spring.datasource.username=root -#spring.datasource.password=12345 -#spring.jpa.generate-ddl=true -#spring.datasource.tomcat.max-wait=20000 -#spring.datasource.tomcat.max-active=50 -#spring.datasource.tomcat.max-idle=20 -#spring.datasource.tomcat.min-idle=15 -# -spring.jpa.hibernate.ddl-auto=update -# -#spring.jpa.properties.hibernate.dialect =org.hibernate.dialect.MySQL5InnoDBDialect -## org.hibernate.dialect.MySQLDialect -# -#spring.jpa.properties.hibernate.id.new_generator_mappings = false -#spring.jpa.properties.hibernate.format_sql = true -# -#logging.level.org.hibernate.SQL=DEBUG -#logging.level.org.hibernate.type.descriptor.sql.BasicBinder=TRACE -sdnc.rest.vnf.api.host=10.53.172.121 -sdnc.rest.vnf.api.port=8282 -sdnc.rest.vnf.api.basepath=/restconf -sdnc.rest.vnf.api.username=admin -sdnc.rest.vnf.api.password=Kp8bJ4SXszM0WXlhak3eHlcse2gAw84vaoGGmJvUy2U - -spring.jackson.serialization.fail-on-empty-beans=false - -server.tomcat.uri-encoding=utf-8 - -#server.error.whitelabel.enabled=false -#spring.mvc.view.prefix = /WEB-INF/views/ -#spring.mvc.view.suffix = .jsp - -logging.level.org.springframework=TRACE -logging.level.com=TRACE - -# =============================== -# Set here configurations for the database connection -spring.datasource.url=jdbc:mariadb://localhost:3306/configtest -spring.datasource.username=root -spring.datasource.password=root -spring.datasource.driver-class-name=org.mariadb.jdbc.Driver -# Keep the connection alive if idle for a long time (needed in production) -spring.datasource.testWhileIdle=true -spring.datasource.validationQuery=SELECT 1 -# =============================== -# = JPA / HIBERNATE -# =============================== -# Show or not log for each sql query -spring.jpa.show-sql=true -# Hibernate ddl auto (create, create-drop, update): with "create-drop" the database -# schema will be automatically created afresh for every start of application -#spring.jpa.hibernate.ddl-auto=validate -# Naming strategy -spring.jpa.hibernate.naming.implicit-strategy=org.hibernate.boot.model.naming.ImplicitNamingStrategyLegacyHbmImpl -spring.jpa.hibernate.naming.physical-strategy=org.springframework.boot.orm.jpa.hibernate.SpringPhysicalNamingStrategy -# Allows Hibernate to generate SQL optimized for a particular DBMS -spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.MySQL5InnoDBDialect diff --git a/configbackuprestore/vnfconfigbackupservice/src/main/resources/application.properties b/configbackuprestore/vnfconfigbackupservice/src/main/resources/application.properties new file mode 100644 index 00000000..aee97f8e --- /dev/null +++ b/configbackuprestore/vnfconfigbackupservice/src/main/resources/application.properties @@ -0,0 +1,33 @@ +server.port = 9003 + +spring.mvc.view.prefix = /WEB-INF/views/ +spring.mvc.view.suffix = .jsp + +sdnc.rest.vnf.api.host=10.53.172.134 +sdnc.rest.vnf.api.port=8282 +sdnc.rest.vnf.api.basepath=/restconf +sdnc.rest.vnf.api.username=admin +sdnc.rest.vnf.api.password=Kp8bJ4SXszM0WXlhak3eHlcse2gAw84vaoGGmJvUy2U + +# =============================== +# Set here configurations for the database connection +spring.datasource.url=jdbc:mariadb://localhost:3306/configtest +spring.datasource.username=root +spring.datasource.password=root +spring.datasource.driver-class-name=org.mariadb.jdbc.Driver +# Keep the connection alive if idle for a long time (needed in production) +spring.datasource.testWhileIdle=true +spring.datasource.validationQuery=SELECT 1 +# =============================== +# = JPA / HIBERNATE +# =============================== +# Show or not log for each sql query +spring.jpa.show-sql=true +# Hibernate ddl auto (create, create-drop, update): with "create-drop" the database +# schema will be automatically created afresh for every start of application +spring.jpa.hibernate.ddl-auto=update +# Naming strategy +spring.jpa.hibernate.naming.implicit-strategy=org.hibernate.boot.model.naming.ImplicitNamingStrategyLegacyHbmImpl +spring.jpa.hibernate.naming.physical-strategy=org.springframework.boot.orm.jpa.hibernate.SpringPhysicalNamingStrategy +# Allows Hibernate to generate SQL optimized for a particular DBMS +spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.MySQL5InnoDBDialect
\ No newline at end of file diff --git a/configbackuprestore/vnfconfigbackupservice/src/main/resource/log4j2.xml b/configbackuprestore/vnfconfigbackupservice/src/main/resources/log4j2.xml index e443b529..e443b529 100644 --- a/configbackuprestore/vnfconfigbackupservice/src/main/resource/log4j2.xml +++ b/configbackuprestore/vnfconfigbackupservice/src/main/resources/log4j2.xml diff --git a/configbackuprestore/vnfconfigbackupservice/src/main/webapp/WEB-INF/lib/jsp-api-2.0.jar b/configbackuprestore/vnfconfigbackupservice/src/main/webapp/WEB-INF/lib/jsp-api-2.0.jar Binary files differdeleted file mode 100644 index 3d0c81fe..00000000 --- a/configbackuprestore/vnfconfigbackupservice/src/main/webapp/WEB-INF/lib/jsp-api-2.0.jar +++ /dev/null diff --git a/configbackuprestore/vnfconfigbackupservice/src/main/webapp/WEB-INF/lib/jstl-1.2.jar b/configbackuprestore/vnfconfigbackupservice/src/main/webapp/WEB-INF/lib/jstl-1.2.jar Binary files differdeleted file mode 100644 index 0fd275e9..00000000 --- a/configbackuprestore/vnfconfigbackupservice/src/main/webapp/WEB-INF/lib/jstl-1.2.jar +++ /dev/null diff --git a/configbackuprestore/vnfconfigbackupservice/src/main/webapp/js/sdnc-controller/sdnc-applyConfig-controller.js b/configbackuprestore/vnfconfigbackupservice/src/main/webapp/js/sdnc-controller/sdnc-applyConfig-controller.js index faff3633..ed6733e5 100644 --- a/configbackuprestore/vnfconfigbackupservice/src/main/webapp/js/sdnc-controller/sdnc-applyConfig-controller.js +++ b/configbackuprestore/vnfconfigbackupservice/src/main/webapp/js/sdnc-controller/sdnc-applyConfig-controller.js @@ -5,10 +5,10 @@ myApp.controller('ApplyConfigCtrl', ['$scope','$window', '$http', 'growl', 'devi //THIS FUNCTION WILL BE CALLED ON PAGE LOAD $scope.getAllVNFFromRc = function() { - deviceConfigService.getAllVNFFromRc().then(function(data) { + deviceConfigService.getAllVnfIds().then(function(data) { if (data != null) { console.log(data); - $scope.objvnfList = data; + $scope.objvnfList= data['vnfDisplayList']; console.log("CompareConfigCtrl:getAllVNFFromRc called" + $scope.objvnfList); } else { $scope.warningMessage = "No VNF is eligible for configuration!!!"; @@ -24,29 +24,27 @@ myApp.controller('ApplyConfigCtrl', ['$scope','$window', '$http', 'growl', 'devi $scope.getAllVNFFromRc(); - + $scope.ShowResult=false; $scope.selectVnf = function(selectedValueVnf) { - + if (selectedValueVnf != null && selectedValueVnf != "") { + $scope.ShowResult=true; var vnfId = selectedValueVnf; - - $scope.fileContent = ''; + $scope.successMessagebool1 = false; + $scope.fileContent = ''; $scope.fileSize = 0; $scope.fileName = ''; - + $scope.submit = function () { var file = document.getElementById("myFileInput").files[0]; $scope.result1={}; - if (file) { var aReader = new FileReader(); aReader.readAsText(file, "UTF-8"); aReader.onload = function (evt) { - // $scope.fileContent = aReader.result; $scope.fileName = document.getElementById("myFileInput").files[0].name; $scope.fileSize = document.getElementById("myFileInput").files[0].size; var id= vnfId; result1=JSON.parse(aReader.result); - /*var item = JSON.parse(result1);*/ $scope.fileContent = aReader.result.search(id); $scope.successMessagebool = false; if( $scope.fileContent == -1){ @@ -58,17 +56,24 @@ myApp.controller('ApplyConfigCtrl', ['$scope','$window', '$http', 'growl', 'devi disableCountDown: true }); } - else{ - + else{ $scope.apply(); - } } aReader.onerror = function (evt) { $scope.fileContent = "error"; } - } - $scope.successMessagebool1 = false; + + }else{ + $scope.errorMessage = "Please select file!!!!"; + growl.error($scope.errorMessage, { + title: 'Error!', + globalDisableCloseButton: false, + ttl: 7000, + disableCountDown: true + }); + } + $scope.apply = function() { if (file) { deviceConfigService.runApplyconfig(vnfId,result1); @@ -80,14 +85,22 @@ myApp.controller('ApplyConfigCtrl', ['$scope','$window', '$http', 'growl', 'devi disableCountDown: true }); $scope.successMessagebool1 = true; - - } }; - } + }; } else { + $scope.ShowResult = false; + $scope.showCompare = false; + $scope.showResult = false; + $scope.errorMessage = "Please select a VNF!!!"; + growl.error($scope.errorMessage, { + title: 'Error!', + globalDisableCloseButton: false, + ttl: 7000, + disableCountDown: true + }); + } - } + }; -}]); - +}]);
\ No newline at end of file diff --git a/configbackuprestore/vnfconfigbackupservice/src/main/webapp/js/sdnc-controller/sdnc-compareConfig-controller.js b/configbackuprestore/vnfconfigbackupservice/src/main/webapp/js/sdnc-controller/sdnc-compareConfig-controller.js index 91584b00..9884862c 100644 --- a/configbackuprestore/vnfconfigbackupservice/src/main/webapp/js/sdnc-controller/sdnc-compareConfig-controller.js +++ b/configbackuprestore/vnfconfigbackupservice/src/main/webapp/js/sdnc-controller/sdnc-compareConfig-controller.js @@ -29,6 +29,10 @@ myApp.controller('CompareConfigCtrl', ['$scope','$filter', '$http','$window', 'g $scope.itemsPerPage = 5; $scope.pagedItems = []; $scope.currentPage = 0; + $scope.version1=false; + $scope.version2=false; + $scope.version3=false; + $scope.version4=false; //THIS FUNCTION WILL BE CALLED ON PAGE LOAD $scope.getAllVNF = function() { @@ -54,9 +58,6 @@ myApp.controller('CompareConfigCtrl', ['$scope','$filter', '$http','$window', 'g if (selectedValueVnf != null && selectedValueVnf != "") { console.log("selectedvnf Value", selectedValueVnf); - //selectedItem = selectedValueVnf.split("%"); -// var vnfName = selectedItem[0]; -// var vnfType = selectedItem[1]; var vnfId = selectedValueVnf; $scope.getVersionList(vnfId); } else { @@ -278,9 +279,6 @@ myApp.controller('CompareConfigCtrl', ['$scope','$filter', '$http','$window', 'g $scope.versionsSelected = []; angular.forEach(objVersion, function(item) { angular.forEach($scope.objVersionModel, function(val, index) { - /* if (item.vnfversion == val['vnfversion'] && item.selected == false) { - $scope.objVersionModel.splice(index, 1); - }*/ if (item.selected) { if ($scope.versionsSelected.indexOf(item) == -1) $scope.versionsSelected.push(item); @@ -295,11 +293,11 @@ myApp.controller('CompareConfigCtrl', ['$scope','$filter', '$http','$window', 'g versionDetails.vnfversion = item['vnfversion']; versionDetails.vnfName = item['vnfname']; var vnfid = item['vnfid']; - // var config = JSON.parse(item['configinfo']); var config = item['configinfo']; var config1=JSON.parse(config); console.log("CompareConfigCtrl::createCompareModel::objCompareModel1", config1); deviceConfigService.runApplyconfig(vnfid,config1); + $scope.showResult = false; $scope.successMessage = "File uploaded successfully"; growl.success($scope.successMessage, { title: 'Success!', @@ -349,9 +347,6 @@ myApp.controller('CompareConfigCtrl', ['$scope','$filter', '$http','$window', 'g $scope.versionsSelected = []; angular.forEach(objVersion, function(item) { angular.forEach($scope.objVersionModel, function(val, index) { - /*if (item.vnfversion == val['vnfversion'] && item.selected == false) { - $scope.objVersionModel.splice(index, 1); - }*/ if (item.selected) { if ($scope.versionsSelected.indexOf(item) == -1) $scope.versionsSelected.push(item); @@ -372,7 +367,6 @@ myApp.controller('CompareConfigCtrl', ['$scope','$filter', '$http','$window', 'g versionObj.versionDetails = versionDetails; //fetch all the other topology/network,opertaion status for the vnf - // versionObj.topologyInfo = $scope.fetchConfigDetails(item); versionObj.topologyInfo = $scope.fetchTopologyInfo(item); versionObj.vnfIdInfo = $scope.fetchVnfId(item); versionObj.serviceStatusInfo= $scope.fetchServiceStatus(item); @@ -440,9 +434,6 @@ myApp.controller('CompareConfigCtrl', ['$scope','$filter', '$http','$window', 'g $scope.versionsSelected = []; angular.forEach(objVersion, function(item) { angular.forEach($scope.objVersionModel, function(val, index) { - /*if ((item.vnfversion == val['vnfversion']) && item.selected == false) { - // $scope.objVersionModel.splice(index, 1); - }*/ if (item.selected) { if ($scope.versionsSelected.indexOf(item) == -1) $scope.versionsSelected.push(item); @@ -456,13 +447,10 @@ myApp.controller('CompareConfigCtrl', ['$scope','$filter', '$http','$window', 'g var versionObj = {}; var versionDetails = {}; versionDetails.vnfversion = item.vnfversion; - /*versionDetails.vnfName = item['vnfname']; - versionDetails.vnfid = item['vnfid'];*/ versionDetails.timeStamp = item.createdAt; versionObj.versionDetails = versionDetails; //fetch all the other topology/network,opertaion status for the vnf - // versionObj.topologyInfo = $scope.fetchConfigDetails(item); versionObj.topologyInfo = $scope.fetchTopologyInfo(item); versionObj.vnfIdInfo = $scope.fetchVnfId(item); versionObj.serviceStatusInfo= $scope.fetchServiceStatus(item); @@ -475,9 +463,20 @@ myApp.controller('CompareConfigCtrl', ['$scope','$filter', '$http','$window', 'g if ((versionObj.versionDetails.vnfversion == $scope.versionsSelected[0].vnfversion)) { $scope.objCompareModel1 = versionObj; + $scope.version1=true; } else if ((versionObj.versionDetails.vnfversion == $scope.versionsSelected[1].vnfversion)) {$scope.objCompareModel2 = versionObj; - } + $scope.version2=true; + $scope.version3=false; + $scope.version4=false; + }else if((versionObj.versionDetails.vnfversion == $scope.versionsSelected[2].vnfversion)){ + $scope.objCompareModel3 = versionObj; + $scope.version3=true; + $scope.version4=false; + }else if((versionObj.versionDetails.vnfversion == $scope.versionsSelected[3].vnfversion)){ + $scope.objCompareModel4 = versionObj; + $scope.version4=true; + } document.getElementById("view").style.display = "none"; } ); $scope.showResult = true; diff --git a/configbackuprestore/vnfconfigbackupservice/src/main/webapp/js/sdnc-services/sdnc-compareConfig-service.js b/configbackuprestore/vnfconfigbackupservice/src/main/webapp/js/sdnc-services/sdnc-compareConfig-service.js index 7b5c688e..42bafcd9 100644 --- a/configbackuprestore/vnfconfigbackupservice/src/main/webapp/js/sdnc-services/sdnc-compareConfig-service.js +++ b/configbackuprestore/vnfconfigbackupservice/src/main/webapp/js/sdnc-services/sdnc-compareConfig-service.js @@ -34,8 +34,7 @@ myApp.service('deviceConfigService', ['$http','VNF_API_BASE', function($http, VN }); }; - - + this.getAllVNF = function() { var testlist = {}; return $http.get('/getAllBackupVnfIds') @@ -51,11 +50,24 @@ myApp.service('deviceConfigService', ['$http','VNF_API_BASE', function($http, VN }; + this.getAllVnfIds = function() { + var rctestlist = {}; + return $http.get('/getAllVnfIds') + .then(function(response) { + console.log("---validationTestService::getAllVNF From Restconf::TestResponse---" + JSON.stringify(response)); + vnflist = response.data; + return vnflist; + }, + function(response) { + console.log("validationTestService::getAllVNF From Restconf::Status Code", response.status); + return response; + }); + + }; + this.getVersions = function(vnfId) { var data = {}; -// data.selectedVnfName = vnfName; -// data.selectedVnfType = vnfType; data.vnfId = vnfId; var config = { params: data, @@ -67,15 +79,9 @@ myApp.service('deviceConfigService', ['$http','VNF_API_BASE', function($http, VN console.log("deviceConfigService::getVersions::config", JSON.stringify(config)); var baseUrl = VNF_API_BASE; - // var baseApi='runtest'; - // var apiUrl= baseUrl + baseApi; - - // Call the pre validation service var request = { method: 'GET', url: '/configDetailsById/'+vnfId, - //url: 'sdnc-stubs/getAllConfigForVNF.json', - //data: data, headers: { 'Content-Type': 'application/json', @@ -144,22 +150,6 @@ myApp.service('deviceConfigService', ['$http','VNF_API_BASE', function($http, VN console.log("validationTestService::getAllVNF::Status Code", response); return newConfig; }); - /*.then(function (response) { - if (response.data) - { $scope.successMessage1 = "Put Data Method Executed Successfully!"; - return response; - } - var status= response.status; - if (status == 200){ - $window.alert("applyed successfully "); - } - var successMessage1 = "Put Data Method Executed Successfully!"; - }, - function (response) { - var successMessage1 = "Service not Exists"; - }); - - */ }; diff --git a/configbackuprestore/vnfconfigbackupservice/src/main/webapp/static/images/Apply.jpg b/configbackuprestore/vnfconfigbackupservice/src/main/webapp/static/images/Apply.jpg Binary files differindex f7ea085b..7d5ab8de 100644 --- a/configbackuprestore/vnfconfigbackupservice/src/main/webapp/static/images/Apply.jpg +++ b/configbackuprestore/vnfconfigbackupservice/src/main/webapp/static/images/Apply.jpg diff --git a/configbackuprestore/vnfconfigbackupservice/src/main/webapp/static/style/sdnc-style.css b/configbackuprestore/vnfconfigbackupservice/src/main/webapp/static/style/sdnc-style.css index 5f192049..82f9c105 100644 --- a/configbackuprestore/vnfconfigbackupservice/src/main/webapp/static/style/sdnc-style.css +++ b/configbackuprestore/vnfconfigbackupservice/src/main/webapp/static/style/sdnc-style.css @@ -478,13 +478,6 @@ input[type=checkbox] { } -.columnsVersion { - float: left; - width: 33.3%; - padding: 8px; - border-radius: 15px; -} - .columnsVersionview{ float: left; width: 50%; @@ -541,3 +534,29 @@ input[type=checkbox] { .listHeading{ background-color: #ffcccc; } +table.tableCompare{ + font-family: "Trebuchet MS", Arial, Helvetica, sans-serif; + border-collapse: collapse; + width: 100%; + table-layout: auto; +} + table.tableCompare tr:nth-child(even){ + background-color: #E1E0DA; +} + table.tableCompare th{ + padding-top: 12px; + padding-bottom: 12px; + text-align: left; + background: linear-gradient(to top, #f8f8f8 0%, #cce5ff 83%); + color: black; +} + table.tableCompare td,table.tableCompare th { + min-width:100px; + padding: 3px; + height:10%; + max-width:200px; +} + table.tableCompare tr:{ + text-align: left; + height:105;; +} diff --git a/configbackuprestore/vnfconfigbackupservice/src/main/webapp/static/views/form-applyConfig.jsp b/configbackuprestore/vnfconfigbackupservice/src/main/webapp/static/views/form-applyConfig.jsp index 76293840..c686b389 100644 --- a/configbackuprestore/vnfconfigbackupservice/src/main/webapp/static/views/form-applyConfig.jsp +++ b/configbackuprestore/vnfconfigbackupservice/src/main/webapp/static/views/form-applyConfig.jsp @@ -19,22 +19,32 @@ */ --> <div class="ReportMain" > - <div class="heading"><img src="static/images/Apply.jpg" width=70 height="40" style="margin-left:5px;"> Apply Configruation</div> - <form name="myForm" style="background-color:#f2f2f2; border: 1px solid #ddd;"> + <div class="heading"><img src="static/images/Apply.jpg" width=50 height="40" style="margin-left:5px;"> Apply Configruation</div> + <form name="myForm" style="background-color: #f2f2f2;padding:20px 15px;border: 1px ridge #ddd"> <div growl></div> - <div class="row" style="background-color:#f2f2f2;width:100%;margin-left:1px;height:75px"> - <div class="column" style="width:30%;background-color:#f2f2f2;height:55px;margin-left:40px;"> - <label class="labeltext">Select Avaliable VNF</label> - </div> - <div class="column" style="background-color:#f2f2f2;width:60%;height:55px;margin-left:0px;"> - <select class="form-control" style="width:100%;margin-top:0px;" ng-model="selectedValueVnf" ng-change="selectVnf(selectedValueVnf)"> - <option ng-repeat="vnf in objvnfList" value="{{vnf.vnfid}}">VnfId- {{vnf.vnfid}} VnfName- {{vnf.vnfname}}</option> - <option value="">Select VNFId</option> - </select> - </div> - </div> - <div class="row" style="background-color:#f2f2f2;width:100%;margin-left:1px;height:100px"> + <div class="row"> + <div class="column" + style="width: 20%; background-color: #f2f2f2; height: 35px; margin-left: 35px;"> + <label class="labeltext">Select Avaliable VNF</label> + </div> + <div class="column" + style="background-color: #f2f2f2; width: 45%; height: 55px; margin-left: 0px;"> + <select class="form-control" style="width: 100%; margin-top: 0px;" + name="select" ng-model="selectedValueVnf" + ng-change=selectVnf(selectedValueVnf) required> + <option ng-repeat="vnf in objvnfList" value="{{vnf.vnfId}}">VnfId- + {{vnf.vnfId}} VnfName- {{vnf.vnfName}}</option> + <option value="">Select VNF</option> + </select> + <div role="alert"> + <span class="error" ng-show="myForm.select.$error.required"> + Required!</span> + </div> + </div> + </div> +<br><br> + <div class="row" style="background-color:#f2f2f2;width:100%;margin-left:1px;height:100px" ng-show="ShowResult"> <div class="column" style="width:30%;height:55px;margin-left:35px;"> <input type="file" style="width:300px" id="myFileInput" ng-model="file" accept=".json"/> </div> diff --git a/configbackuprestore/vnfconfigbackupservice/src/main/webapp/static/views/form-compareConfig.html b/configbackuprestore/vnfconfigbackupservice/src/main/webapp/static/views/form-compareConfig.html index 93ab7b64..6acaa0e3 100644 --- a/configbackuprestore/vnfconfigbackupservice/src/main/webapp/static/views/form-compareConfig.html +++ b/configbackuprestore/vnfconfigbackupservice/src/main/webapp/static/views/form-compareConfig.html @@ -46,7 +46,7 @@ <th>Action</th> </tr> <tr ng-repeat="version in pagedItems[currentPage] | orderBy:sort.sortingOrder:sort.reverse"> - <td>{{$index+1}}</td> + <td>{{ ($index + 1) + (currentPage - 1) * itemsPerPage + 5}}</td> <td>{{version.vnfversion}}</td> <td>{{version.createdAt}}</td> <td>{{version.updatedAt}}</td> @@ -54,7 +54,7 @@ </td> </tr> - <td colspan="5"> + <td colspan="5" ng-if="pagedItems.length > 5"> <!-- ng-show="pagedItems.length > 5" --> <ul class="pagination pull-right"> <li ng-class="{disabled: currentPage == 0}"><a href diff --git a/configbackuprestore/vnfconfigbackupservice/src/main/webapp/static/views/form-deviceConfig.html b/configbackuprestore/vnfconfigbackupservice/src/main/webapp/static/views/form-deviceConfig.html index 54b39b27..fb5248c8 100644 --- a/configbackuprestore/vnfconfigbackupservice/src/main/webapp/static/views/form-deviceConfig.html +++ b/configbackuprestore/vnfconfigbackupservice/src/main/webapp/static/views/form-deviceConfig.html @@ -129,14 +129,16 @@ -<div id = "Div1" class="VersionMain" ng-show="showResult"> +<div id = "Div1" class="VersionMain" ng-show="showResult" > <div class="versionHeading"><img src="static/images/compare.jpg" width=25 height="25" style="margin-left:5px;"> Version Comparision Result</div> - <div class="columnsVersion"> - <ul class="price"> + <table class="tableCompare" > + <td style="width:230px;"> + + <ul class="price" style="font-weight:bold;"> <li class="headerVersion">Attributes</li> <div style="background-color:#E1E0DA;"> - <li class="listHeading">Config Details</li> - <li ng-repeat="(key,value) in objCompareModel1.versionDetails">{{key}}</li> + <li class="listHeading">Config Details</li> + <li ng-repeat="(key,value) in objCompareModel1.versionDetails">{{key}}</li> <hr class="separator"> </hr> </div> @@ -195,50 +197,50 @@ </hr> </div> </ul> - </div> - <div class="columnsVersion"> + </td><td> + <ul class="price"> <li class="headerVersion" style="background-color:#807C7C">Version {{objCompareModel1.versionDetails.vnfversion}}</li> <div style="background-color:#E1E0DA;"> <li class="listHeading">Config Details</li> - <li ng-repeat="(key,value) in objCompareModel1.versionDetails">{{value}}</li> + <li style="height:29px;overflow: auto;" ng-repeat="(key,value) in objCompareModel1.versionDetails">{{value}}</li> <hr class="separator"> </hr> </div> <div style="background-color:#E1E0DA;" > <li class="listHeading">VNF ID</li> - <li ng-repeat="(key,value) in objCompareModel1.vnfIdInfo">{{value}}</li> + <li style="height:29px;overflow: auto;" ng-repeat="(key,value) in objCompareModel1.vnfIdInfo">{{value}}</li> <hr class="separator"> </hr> </div> <div style="background-color:#E1E0DA;"> <li class="listHeading">SERVICE STATUS</li> - <li ng-repeat="(key,value) in objCompareModel1.serviceStatusInfo">{{value}}</li> + <li style="height:29px;overflow: auto;" ng-repeat="(key,value) in objCompareModel1.serviceStatusInfo">{{value}}</li> <hr class="separator"> </hr> </div> <div style="background-color:#E1E0DA;"> <li class="listHeading">VNF Topology Identifer</li> - <li ng-repeat="(key,value) in objCompareModel1.vnfTopologyIdentifier">{{value}}</li> + <li style="height:29px;overflow: auto;" ng-repeat="(key,value) in objCompareModel1.vnfTopologyIdentifier">{{value}}</li> <hr class="separator"> </hr> </div> <div style="background-color:#E1E0DA;"> <li class="listHeading">Operation Status</li> - <li ng-repeat="(key,value) in objCompareModel1.operationStatus">{{value}}</li> + <li style="height:29px;overflow: auto;" ng-repeat="(key,value) in objCompareModel1.operationStatus">{{value}}</li> <hr class="separator"> </hr> </div> <div style="background-color:#E1E0DA;"> <li class="listHeading">Request Info</li> - <li ng-repeat="(key,value) in objCompareModel1.vnfRequestInfo">{{value}}</li> + <li style="height:29px;overflow: auto;" ng-repeat="(key,value) in objCompareModel1.vnfRequestInfo">{{value}}</li> <hr class="separator"> </hr> </div> <div style="background-color:#E1E0DA;"> <li class="listHeading">Service Info</li> - <li ng-repeat="(key,value) in objCompareModel1.serviceInfo">{{value}}</li> + <li style="height:29px;overflow: auto;" ng-repeat="(key,value) in objCompareModel1.serviceInfo">{{value}}</li> <hr class="separator"> </hr> </div> @@ -250,7 +252,7 @@ </div> <div style="background-color:#E1E0DA;"> <li class="listHeading">Request Information</li> - <li ng-repeat="(key,value) in objCompareModel1.requestInfo">{{value}}</li> + <li style="height:29px;overflow: auto;" ng-repeat="(key,value) in objCompareModel1.requestInfo">{{value}}</li> <hr class="separator"> </hr> </div> @@ -261,50 +263,50 @@ </hr> </div> </ul> - </div> - - <div class="columnsVersion"> + +</td><td> + <ul class="price"> <li class="headerVersion"style="background-color:#807C7C">Version {{objCompareModel2.versionDetails.vnfversion}}</li> <div style="background-color:#E1E0DA;"> <li class="listHeading">Config Details</li> - <li ng-repeat="(key,value) in objCompareModel2.versionDetails">{{value}}</li> + <li style="height:29px;overflow: auto;" ng-repeat="(key,value) in objCompareModel2.versionDetails">{{value}}</li> <hr class="separator"> </hr> </div> <div style="background-color:#E1E0DA;"> <li class="listHeading">VNF ID</li> - <li ng-repeat="(key,value) in objCompareModel2.vnfIdInfo">{{value}}</li> + <li style="height:29px;overflow: auto;" ng-repeat="(key,value) in objCompareModel2.vnfIdInfo">{{value}}</li> <hr class="separator"> </hr> </div> <div style="background-color:#E1E0DA;"> <li class="listHeading">SERVICE STATUS</li> - <li ng-repeat="(key,value) in objCompareModel2.serviceStatusInfo">{{value}}</li> + <li style="height:29px;overflow: auto;" ng-repeat="(key,value) in objCompareModel2.serviceStatusInfo">{{value}}</li> <hr class="separator"> </hr> </div> <div style="background-color:#E1E0DA;"> <li class="listHeading">VNF Topology Identifer</li> - <li ng-repeat="(key,value) in objCompareModel2.vnfTopologyIdentifier">{{value}}</li> + <li style="height:29px;overflow: auto;" ng-repeat="(key,value) in objCompareModel2.vnfTopologyIdentifier">{{value}}</li> <hr class="separator"> </hr> </div> <div style="background-color:#E1E0DA;"> <li class="listHeading">Operation Status</li> - <li ng-repeat="(key,value) in objCompareModel2.operationStatus">{{value}}</li> + <li style="height:29px;overflow: auto;" ng-repeat="(key,value) in objCompareModel2.operationStatus">{{value}}</li> <hr class="separator"> </hr> </div> <div style="background-color:#E1E0DA;"> <li class="listHeading">Request Info</li> - <li ng-repeat="(key,value) in objCompareModel2.vnfRequestInfo">{{value}}</li> + <li style="height:29px;overflow: auto;" ng-repeat="(key,value) in objCompareModel2.vnfRequestInfo">{{value}}</li> <hr class="separator"> </hr> </div> <div style="background-color:#E1E0DA;"> <li class="listHeading">Service Info</li> - <li ng-repeat="(key,value) in objCompareModel2.serviceInfo">{{value}}</li> + <li style="height:29px;overflow: auto;" ng-repeat="(key,value) in objCompareModel2.serviceInfo">{{value}}</li> <hr class="separator"> </hr> </div> @@ -316,7 +318,7 @@ </div> <div style="background-color:#E1E0DA;"> <li class="listHeading">Request Information</li> - <li ng-repeat="(key,value) in objCompareModel2.requestInfo">{{value}}</li> + <li style="height:29px;overflow: auto;" ng-repeat="(key,value) in objCompareModel2.requestInfo">{{value}}</li> <hr class="separator"> </hr> </div> @@ -327,6 +329,139 @@ </hr> </div> </ul> - </div> + +</td><td ng-show=version3> + <ul class="price"> + <li class="headerVersion"style="background-color:#807C7C">Version {{objCompareModel3.versionDetails.vnfversion}}</li> + <div style="background-color:#E1E0DA;"> + <li class="listHeading">Config Details</li> + <li style="height:29px;overflow: auto;" ng-repeat="(key,value) in objCompareModel3.versionDetails">{{value}}</li> + <hr class="separator"> + </hr> + </div> + <div style="background-color:#E1E0DA;"> + <li class="listHeading">VNF ID</li> + <li style="height:29px;overflow: auto;" ng-repeat="(key,value) in objCompareModel3.vnfIdInfo">{{value}}</li> + <hr class="separator"> + </hr> + </div> + <div style="background-color:#E1E0DA;"> + <li class="listHeading">SERVICE STATUS</li> + <li style="height:29px;overflow: auto;" ng-repeat="(key,value) in objCompareModel3.serviceStatusInfo">{{value}}</li> + <hr class="separator"> + </hr> + </div> + <div style="background-color:#E1E0DA;"> + <li class="listHeading">VNF Topology Identifer</li> + <li style="height:29px;overflow: auto;" ng-repeat="(key,value) in objCompareModel3.vnfTopologyIdentifier">{{value}}</li> + <hr class="separator"> + </hr> + </div> + <div style="background-color:#E1E0DA;"> + <li class="listHeading">Operation Status</li> + <li style="height:29px;overflow: auto;" ng-repeat="(key,value) in objCompareModel3.operationStatus">{{value}}</li> + <hr class="separator"> + </hr> + </div> + <div style="background-color:#E1E0DA;"> + <li class="listHeading">Request Info</li> + <li style="height:29px;overflow: auto;" ng-repeat="(key,value) in objCompareModel3.vnfRequestInfo">{{value}}</li> + <hr class="separator"> + </hr> + </div> + <div style="background-color:#E1E0DA;"> + <li class="listHeading">Service Info</li> + <li style="height:29px;overflow: auto;" ng-repeat="(key,value) in objCompareModel3.serviceInfo">{{value}}</li> + <hr class="separator"> + </hr> + </div> + <div style="background-color:#E1E0DA;"> + <li class="listHeading">Service Request Header</li> + <li style="height:29px;overflow: auto;" ng-repeat="(key,value) in objCompareModel3.requestHeader">{{value}}</li> + <hr class="separator"> + </hr> + </div> + <div style="background-color:#E1E0DA;"> + <li class="listHeading">Request Information</li> + <li style="height:29px;overflow: auto;" ng-repeat="(key,value) in objCompareModel3.requestInfo">{{value}}</li> + <hr class="separator"> + </hr> + </div> + <div style="background-color:#E1E0DA;"> + <li class="listHeading">VNF Topology</li> + <li style="height:29px;overflow: auto;" ng-repeat="(key,value) in objCompareModel3.topologyInfo">{{value}}</li> + <hr class="separator"> + </hr> + </div> + </ul> + +</td><td ng-show=version4> + + <ul class="price"> + <li class="headerVersion"style="background-color:#807C7C">Version {{objCompareModel4.versionDetails.vnfversion}}</li> + <div style="background-color:#E1E0DA;"> + <li class="listHeading">Config Details</li> + <li style="height:29px;overflow: auto;" ng-repeat="(key,value) in objCompareModel4.versionDetails">{{value}}</li> + <hr class="separator"> + </hr> + </div> + <div style="background-color:#E1E0DA;"> + <li class="listHeading">VNF ID</li> + <li style="height:29px;overflow: auto;" ng-repeat="(key,value) in objCompareModel4.vnfIdInfo">{{value}}</li> + <hr class="separator"> + </hr> + </div> + <div style="background-color:#E1E0DA;"> + <li class="listHeading">SERVICE STATUS</li> + <li style="height:29px;overflow: auto;" ng-repeat="(key,value) in objCompareModel4.serviceStatusInfo">{{value}}</li> + <hr class="separator"> + </hr> + </div> + <div style="background-color:#E1E0DA;"> + <li class="listHeading">VNF Topology Identifer</li> + <li style="height:29px;overflow: auto;" ng-repeat="(key,value) in objCompareModel4.vnfTopologyIdentifier">{{value}}</li> + <hr class="separator"> + </hr> + </div> + <div style="background-color:#E1E0DA;"> + <li class="listHeading">Operation Status</li> + <li style="height:29px;overflow: auto;" ng-repeat="(key,value) in objCompareModel4.operationStatus">{{value}}</li> + <hr class="separator"> + </hr> + </div> + <div style="background-color:#E1E0DA;"> + <li class="listHeading">Request Info</li> + <li style="height:29px;overflow: auto;" ng-repeat="(key,value) in objCompareModel4.vnfRequestInfo">{{value}}</li> + <hr class="separator"> + </hr> + </div> + <div style="background-color:#E1E0DA;"> + <li class="listHeading">Service Info</li> + <li style="height:29px;overflow: auto;" ng-repeat="(key,value) in objCompareModel4.serviceInfo">{{value}}</li> + <hr class="separator"> + </hr> + </div> + <div style="background-color:#E1E0DA;"> + <li class="listHeading">Service Request Header</li> + <li style="height:29px;overflow: auto;" ng-repeat="(key,value) in objCompareModel4.requestHeader">{{value}}</li> + <hr class="separator"> + </hr> + </div> + <div style="background-color:#E1E0DA;"> + <li class="listHeading">Request Information</li> + <li style="height:29px;overflow: auto;" ng-repeat="(key,value) in objCompareModel4.requestInfo">{{value}}</li> + <hr class="separator"> + </hr> + </div> + <div style="background-color:#E1E0DA;"> + <li class="listHeading">VNF Topology</li> + <li style="height:29px;overflow: auto;" ng-repeat="(key,value) in objCompareModel4.topologyInfo">{{value}}</li> + <hr class="separator"> + </hr> + </div> + </ul> + + </td> +</table> </div>
\ No newline at end of file diff --git a/configbackuprestore/vnfconfigbackupservice/src/main/webapp/static/views/form-deviceConfigView.html b/configbackuprestore/vnfconfigbackupservice/src/main/webapp/static/views/form-deviceConfigView.html index e9a19aa3..d6cf2fda 100644 --- a/configbackuprestore/vnfconfigbackupservice/src/main/webapp/static/views/form-deviceConfigView.html +++ b/configbackuprestore/vnfconfigbackupservice/src/main/webapp/static/views/form-deviceConfigView.html @@ -90,25 +90,25 @@ <li class="headerVersion" style="background-color:#807C7C">Version {{objCompareModel1.versionDetails.vnfversion}}</li> <div style="background-color:#E1E0DA;"> <li class="listHeading">Config Details</li> - <li ng-repeat="(key,value) in objCompareModel1.versionDetails">{{value}}</li> + <li style="height:29px;overflow: auto;" ng-repeat="(key,value) in objCompareModel1.versionDetails">{{value}}</li> <hr class="separator"> </hr> </div> <div style="background-color:#E1E0DA;" > <li class="listHeading">VNF ID</li> - <li ng-repeat="(key,value) in objCompareModel1.vnfIdInfo">{{value}}</li> + <li style="height:29px;overflow: auto;" ng-repeat="(key,value) in objCompareModel1.vnfIdInfo">{{value}}</li> <hr class="separator"> </hr> </div> <div style="background-color:#E1E0DA;"> <li class="listHeading">SERVICE STATUS</li> - <li ng-repeat="(key,value) in objCompareModel1.serviceStatusInfo">{{value}}</li> + <li style="height:29px;overflow: auto;" ng-repeat="(key,value) in objCompareModel1.serviceStatusInfo">{{value}}</li> <hr class="separator"> </hr> </div> <div style="background-color:#E1E0DA;"> <li class="listHeading">VNF Topology Identifer</li> - <li ng-repeat="(key,value) in objCompareModel1.vnfTopologyIdentifier">{{value}}</li> + <li style="height:29px;overflow: auto;" ng-repeat="(key,value) in objCompareModel1.vnfTopologyIdentifier">{{value}}</li> <hr class="separator"> </hr> </div> @@ -120,13 +120,13 @@ </div> <div style="background-color:#E1E0DA;"> <li class="listHeading">Request Info</li> - <li ng-repeat="(key,value) in objCompareModel1.vnfRequestInfo">{{value}}</li> + <li style="height:29px;overflow: auto;" ng-repeat="(key,value) in objCompareModel1.vnfRequestInfo">{{value}}</li> <hr class="separator"> </hr> </div> <div style="background-color:#E1E0DA;"> <li class="listHeading">Service Info</li> - <li ng-repeat="(key,value) in objCompareModel1.serviceInfo">{{value}}</li> + <li style="height:29px;overflow: auto;" ng-repeat="(key,value) in objCompareModel1.serviceInfo">{{value}}</li> <hr class="separator"> </hr> </div> @@ -138,13 +138,13 @@ </div> <div style="background-color:#E1E0DA;"> <li class="listHeading">Request Information</li> - <li ng-repeat="(key,value) in objCompareModel1.requestInfo">{{value}}</li> + <li style="height:29px;overflow: auto;" ng-repeat="(key,value) in objCompareModel1.requestInfo">{{value}}</li> <hr class="separator"> </hr> </div> <div style="background-color:#E1E0DA;"> <li class="listHeading">VNF Topology</li> - <li style="height:29px;overflow: auto;" ng-repeat="(key,value) in objCompareModel1.topologyInfo">{{value}}</li> + <li style="height:29px;overflow: auto;" style="height:29px;overflow: auto;" ng-repeat="(key,value) in objCompareModel1.topologyInfo">{{value}}</li> <hr class="separator"> </hr> </div> diff --git a/configbackuprestore/vnfconfigbackupservice/src/main/webapp/static/views/form-viewReport.html b/configbackuprestore/vnfconfigbackupservice/src/main/webapp/static/views/form-viewReport.html index d4841ad5..2537263e 100644 --- a/configbackuprestore/vnfconfigbackupservice/src/main/webapp/static/views/form-viewReport.html +++ b/configbackuprestore/vnfconfigbackupservice/src/main/webapp/static/views/form-viewReport.html @@ -70,9 +70,9 @@ <td>{{version.vnfname }}</td> <td>{{version.vnfid}}</td> </tr> - <td colspan="4"> + <td colspan="4" ng-show="pagedItems.length > 5" > <!-- ng-show="pagedItems.length > 5" --> - <ul class="pagination pull-right"> + <ul class="pagination pull-right" > <li ng-class="{disabled: currentPage == 0}"><a href ng-click="prevPage()">«</a></li> <li ng-repeat="n in range(pagedItems.length, currentPage, currentPage + gap) " diff --git a/configbackuprestore/vnfconfigbackupservice/src/main/webapp/static/views/form-viewReportById.html b/configbackuprestore/vnfconfigbackupservice/src/main/webapp/static/views/form-viewReportById.html index b4eec391..6fde31fc 100644 --- a/configbackuprestore/vnfconfigbackupservice/src/main/webapp/static/views/form-viewReportById.html +++ b/configbackuprestore/vnfconfigbackupservice/src/main/webapp/static/views/form-viewReportById.html @@ -102,7 +102,7 @@ <td>{{version.vnfname }}</td> <td>{{version.versionNo}}</td> </tr> - <td colspan="4"> + <td colspan="4" ng-if="pagedItems.length > 5"> <ul class="pagination pull-right"> <li ng-class="{disabled: currentPage == 0}"><a href ng-click="prevPage()">«</a></li> diff --git a/installation/ansible-server/src/main/yml/ansible_vfw_distributetraffic@0.00.yml b/installation/ansible-server/src/main/yml/ansible_vfw_distributetraffic@0.00.yml new file mode 100644 index 00000000..aeffe62f --- /dev/null +++ b/installation/ansible-server/src/main/yml/ansible_vfw_distributetraffic@0.00.yml @@ -0,0 +1,110 @@ +--- +- hosts: all + gather_facts: no + tasks: + - include_vars: "{{ ConfigFileName }}" + - debug: var=fwIp + failed_when: fwIp is not defined + - debug: var=sinkIp + failed_when: sinkIp is not defined + - name: Read PKG IP + shell: cat /opt/config/vpg_private_ip_0.txt + register: pkgIp + become: true + - name: Read OLD FW IP + shell: cat /opt/config/fw_ipaddr.txt + register: oldFwIp + become: true + - name: Read OLD SINK IP + shell: cat /opt/config/sink_ipaddr.txt + register: oldSinkIp + become: true + - name: Read protected net CIDR + shell: cat /opt/config/protected_net_cidr.txt + register: protectedCidr + become: true + - debug: var=pkgIp.stdout + - debug: var=oldFwIp.stdout + - debug: var=oldSinkIp.stdout + - debug: var=protectedCidr.stdout + - debug: + msg: "FW IP has not been changed" + when: oldFwIp.stdout == fwIp + - block: + - name: Remove OLD FW IP route + shell: vppctl ip route del {{ protectedCidr.stdout }} via {{ oldFwIp.stdout }} + - name: Add NEW FW IP route + shell: vppctl ip route add {{ protectedCidr.stdout }} via {{ fwIp }} + - name: Save NEW FW IP address + shell: echo {{ fwIp }} > /opt/config/fw_ipaddr.txt + - debug: + msg: "FW IP has been changed" + become: true + when: oldFwIp.stdout != fwIp + - debug: + msg: "SINK IP has not been changed" + when: oldSinkIp.stdout == sinkIp + - block: + - block: + - name: Modify packet stream files + debug: + msg: "Modify packet stream files" + - shell: "sed -i -e '0,/UDP/ s/UDP:.*/UDP: {{ pkgIp.stdout }} -> {{ sinkIp }}/' /opt/pg_streams/stream_fw_udp1" + - shell: "sed -i -e '0,/UDP/ s/UDP:.*/UDP: {{ pkgIp.stdout }} -> {{ sinkIp }}/' /opt/pg_streams/stream_fw_udp2" + - shell: "sed -i -e '0,/UDP/ s/UDP:.*/UDP: {{ pkgIp.stdout }} -> {{ sinkIp }}/' /opt/pg_streams/stream_fw_udp3" + - shell: "sed -i -e '0,/UDP/ s/UDP:.*/UDP: {{ pkgIp.stdout }} -> {{ sinkIp }}/' /opt/pg_streams/stream_fw_udp4" + - shell: "sed -i -e '0,/UDP/ s/UDP:.*/UDP: {{ pkgIp.stdout }} -> {{ sinkIp }}/' /opt/pg_streams/stream_fw_udp5" + - shell: "sed -i -e '0,/UDP/ s/UDP:.*/UDP: {{ pkgIp.stdout }} -> {{ sinkIp }}/' /opt/pg_streams/stream_fw_udp6" + - shell: "sed -i -e '0,/UDP/ s/UDP:.*/UDP: {{ pkgIp.stdout }} -> {{ sinkIp }}/' /opt/pg_streams/stream_fw_udp7" + - shell: "sed -i -e '0,/UDP/ s/UDP:.*/UDP: {{ pkgIp.stdout }} -> {{ sinkIp }}/' /opt/pg_streams/stream_fw_udp8" + - shell: "sed -i -e '0,/UDP/ s/UDP:.*/UDP: {{ pkgIp.stdout }} -> {{ sinkIp }}/' /opt/pg_streams/stream_fw_udp9" + - shell: "sed -i -e '0,/UDP/ s/UDP:.*/UDP: {{ pkgIp.stdout }} -> {{ sinkIp }}/' /opt/pg_streams/stream_fw_udp10" + - block: + - name: Delete old streams + debug: + msg: "Delete old streams" + - shell: vppctl packet-generator delete fw_udp1 + - shell: vppctl packet-generator delete fw_udp2 + - shell: vppctl packet-generator delete fw_udp3 + - shell: vppctl packet-generator delete fw_udp4 + - shell: vppctl packet-generator delete fw_udp5 + - shell: vppctl packet-generator delete fw_udp6 + - shell: vppctl packet-generator delete fw_udp7 + - shell: vppctl packet-generator delete fw_udp8 + - shell: vppctl packet-generator delete fw_udp9 + - shell: vppctl packet-generator delete fw_udp10 + - block: + - name: Install new streams + debug: + msg: "Install new streams" + - shell: vppctl exec /opt/pg_streams/stream_fw_udp1 + - shell: vppctl exec /opt/pg_streams/stream_fw_udp2 + - shell: vppctl exec /opt/pg_streams/stream_fw_udp3 + - shell: vppctl exec /opt/pg_streams/stream_fw_udp4 + - shell: vppctl exec /opt/pg_streams/stream_fw_udp5 + - shell: vppctl exec /opt/pg_streams/stream_fw_udp6 + - shell: vppctl exec /opt/pg_streams/stream_fw_udp7 + - shell: vppctl exec /opt/pg_streams/stream_fw_udp8 + - shell: vppctl exec /opt/pg_streams/stream_fw_udp9 + - shell: vppctl exec /opt/pg_streams/stream_fw_udp10 + - block: + - name: Enable new streams + debug: + msg: "Enable new streams" + - shell: vppctl packet-generator enable fw_udp1 + - shell: vppctl packet-generator enable fw_udp2 + - shell: vppctl packet-generator enable fw_udp3 + - shell: vppctl packet-generator enable fw_udp4 + - shell: vppctl packet-generator enable fw_udp5 + - shell: vppctl packet-generator enable fw_udp6 + - shell: vppctl packet-generator enable fw_udp7 + - shell: vppctl packet-generator enable fw_udp8 + - shell: vppctl packet-generator enable fw_udp9 + - shell: vppctl packet-generator enable fw_udp10 + - name: Save NEW SINK IP address + shell: echo {{ sinkIp }} > /opt/config/sink_ipaddr.txt + - debug: + msg: "SINK IP has been changed" + become: true + when: oldSinkIp.stdout != sinkIp + diff --git a/platform-logic/datachange/src/main/json/DataChange_esr-thirdparty-sdnc-discovery-of-zte.json b/platform-logic/datachange/src/main/json/DataChange_esr-thirdparty-sdnc-discovery-of-zte.json index d8262519..f7332e85 100644 --- a/platform-logic/datachange/src/main/json/DataChange_esr-thirdparty-sdnc-discovery-of-zte.json +++ b/platform-logic/datachange/src/main/json/DataChange_esr-thirdparty-sdnc-discovery-of-zte.json @@ -1,20 +1,20 @@ [
{
- "id": "461e2499.8f3954",
+ "id": "15787234.124136",
"type": "dgstart",
"name": "DGSTART",
"outputs": 1,
- "x": 98,
- "y": 69,
- "z": "233b36a1.5b5d1a",
+ "x": 101,
+ "y": 108,
+ "z": "5c3ac6a5.48ce2",
"wires": [
[
- "701f3038.9db4d"
+ "65c08ccc.a64284"
]
]
},
{
- "id": "701f3038.9db4d",
+ "id": "65c08ccc.a64284",
"type": "service-logic",
"name": "DataChange ${project.version}",
"module": "DataChange",
@@ -22,279 +22,1187 @@ "comments": "",
"xml": "<service-logic xmlns='http://www.onap.org/sdnc/svclogic' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:schemaLocation='http://www.onap.org/sdnc/svclogic ./svclogic.xsd' module='DataChange' version='${project.version}'>",
"outputs": 1,
- "x": 202,
- "y": 158,
- "z": "233b36a1.5b5d1a",
+ "x": 205,
+ "y": 197,
+ "z": "5c3ac6a5.48ce2",
"wires": [
[
- "ba25d02c.fdd0a8"
+ "24732328.986984"
]
]
},
{
- "id": "ba25d02c.fdd0a8",
+ "id": "24732328.986984",
"type": "method",
"name": "method esr-thirdparty-sdnc-discovery-of-zte",
"xml": "<method rpc='esr-thirdparty-sdnc-discovery-of-zte' mode='sync'>\n",
"comments": "",
"outputs": 1,
- "x": 270,
- "y": 256,
- "z": "233b36a1.5b5d1a",
+ "x": 273,
+ "y": 295,
+ "z": "5c3ac6a5.48ce2",
"wires": [
[
- "a3d44b66.a5094"
+ "255730f2.067e3"
]
]
},
{
- "id": "a3d44b66.a5094",
+ "id": "255730f2.067e3",
"type": "block",
"name": "block : atomic",
"xml": "<block atomic='true'>",
"atomic": "true",
"comments": "",
"outputs": 1,
- "x": 194,
- "y": 363,
- "z": "233b36a1.5b5d1a",
+ "x": 197,
+ "y": 402,
+ "z": "5c3ac6a5.48ce2",
"wires": [
[
- "ca8f74a.2337f88"
+ "52a3f44e.4fe8d4"
]
]
},
{
- "id": "ca8f74a.2337f88",
+ "id": "52a3f44e.4fe8d4",
"type": "switchNode",
"name": "switch aai-event-trigger",
"xml": "<switch test=\"`$data-change-notification-input.aai-event-trigger`\">\n",
"comments": "",
"outputs": 1,
- "x": 396,
- "y": 363,
- "z": "233b36a1.5b5d1a",
+ "x": 399,
+ "y": 402,
+ "z": "5c3ac6a5.48ce2",
"wires": [
[
- "63184cea.989334",
- "7bf3b058.b30c4"
+ "a7ad4b32.3232d",
+ "7ca795d2.5ae15c"
]
]
},
{
- "id": "63184cea.989334",
+ "id": "a7ad4b32.3232d",
"type": "outcome",
"name": "update",
"xml": "<outcome value='Update'>\n",
"comments": "",
"outputs": 1,
- "x": 624,
- "y": 318,
- "z": "233b36a1.5b5d1a",
+ "x": 627,
+ "y": 357,
+ "z": "5c3ac6a5.48ce2",
"wires": [
[
- "fdd46760.8bf7f"
+ "6a7a4af2.cbffc4"
]
]
},
{
- "id": "7bf3b058.b30c4",
+ "id": "7ca795d2.5ae15c",
"type": "outcome",
"name": "delete",
"xml": "<outcome value='delete'>\n",
"comments": "",
"outputs": 1,
- "x": 622,
- "y": 486,
- "z": "233b36a1.5b5d1a",
+ "x": 625,
+ "y": 525,
+ "z": "5c3ac6a5.48ce2",
"wires": [
[
- "8e4adf58.75aaa"
+ "3084a5a8.99639a"
]
]
},
{
- "id": "8e4adf58.75aaa",
+ "id": "3084a5a8.99639a",
"type": "block",
"name": "block : atomic",
"xml": "<block atomic='true'>",
"atomic": "true",
"comments": "",
"outputs": 1,
- "x": 797,
- "y": 486,
- "z": "233b36a1.5b5d1a",
+ "x": 800,
+ "y": 525,
+ "z": "5c3ac6a5.48ce2",
"wires": [
[ ]
]
},
{
- "id": "fdd46760.8bf7f",
+ "id": "6a7a4af2.cbffc4",
"type": "block",
"name": "block",
"xml": "<block>\n",
"atomic": "false",
"comments": "",
"outputs": 1,
- "x": 776,
- "y": 318,
- "z": "233b36a1.5b5d1a",
+ "x": 779,
+ "y": 357,
+ "z": "5c3ac6a5.48ce2",
"wires": [
[
- "da8890ad.af057"
+ "9521c124.e5b908"
]
]
},
{
- "id": "da8890ad.af057",
+ "id": "9521c124.e5b908",
"type": "switchNode",
"name": "switch type",
"xml": "<switch test=\"`$prop.sdncRestApi.type`\">\n",
"comments": "",
"outputs": 1,
- "x": 945,
- "y": 318,
- "z": "233b36a1.5b5d1a",
+ "x": 948,
+ "y": 357,
+ "z": "5c3ac6a5.48ce2",
"wires": [
[
- "f4b967b.17aaa18",
- "9bc9bbca.bea01"
+ "b1b8ddba.d5362",
+ "b2791c8d.f92988"
]
]
},
{
- "id": "f4b967b.17aaa18",
+ "id": "b1b8ddba.d5362",
"type": "outcome",
"name": "SOTN",
"xml": "<outcome value='SOTN'>\n",
"comments": "",
"outputs": 1,
- "x": 1121,
- "y": 253,
- "z": "233b36a1.5b5d1a",
+ "x": 1124,
+ "y": 292,
+ "z": "5c3ac6a5.48ce2",
"wires": [
[
- "8178bbaf.4eb688"
+ "2476cb54.ee54e4"
]
]
},
{
- "id": "9bc9bbca.bea01",
+ "id": "b2791c8d.f92988",
"type": "outcome",
"name": "other",
"xml": "<outcome value='Other'>\n",
"comments": "",
"outputs": 1,
- "x": 1115,
- "y": 375,
- "z": "233b36a1.5b5d1a",
+ "x": 1118,
+ "y": 414,
+ "z": "5c3ac6a5.48ce2",
"wires": [
[
- "d8c7c62c.b1c62"
+ "615692ea.bd454c"
]
]
},
{
- "id": "d8c7c62c.b1c62",
+ "id": "615692ea.bd454c",
"type": "returnFailure",
"name": "return failure",
"xml": "<return status='failure'>\n<parameter name='ack-final' value='Y'/>\n<parameter name='error-code' value=\"500\" />\n<parameter name='error-message' value=\"`'Unsupported type = ' + $prop.sdncRestApi.type`\" />\n",
"comments": "",
- "x": 1307,
- "y": 375,
- "z": "233b36a1.5b5d1a",
+ "x": 1310,
+ "y": 414,
+ "z": "5c3ac6a5.48ce2",
"wires": [ ]
},
{
- "id": "8178bbaf.4eb688",
+ "id": "2476cb54.ee54e4",
"type": "block",
"name": "block : atomic",
"xml": "<block atomic='true'>",
"atomic": "true",
"comments": "",
"outputs": 1,
- "x": 1307,
- "y": 253,
- "z": "233b36a1.5b5d1a",
+ "x": 1310,
+ "y": 292,
+ "z": "5c3ac6a5.48ce2",
"wires": [
[
- "9fb7d11c.800968"
+ "58ffaa94.11ecc4",
+ "876baee.788865"
]
]
},
{
- "id": "9fb7d11c.800968",
+ "id": "58ffaa94.11ecc4",
"type": "execute",
"name": "execute RestApiCallNode Get ZTE Topology",
- "xml": "<execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >\n<parameter name=\"templateFileName\" value=\"`$prop.restapi.templateDir + '/getztetopotemplate.json'`\" />\n<parameter name=\"restapiUrl\" value=\"`$zte.prop.sdncRestApi.thirdpartySdnc.url + '/restconf/operations/ZTE-API-Topology:get-topology-details'`\" />\n<parameter name=\"restapiUser\" value=\"`$zte.prop.sdncRestApi.thirdpartySdnc.user`\" />\n<parameter name=\"restapiPassword\" value=\"`$zte.prop.sdncRestApi.thirdpartySdnc.password`\" />\n<parameter name=\"format\" value=\"json\"/>\n<parameter name=\"httpMethod\" value=\"POST\"/>\n<parameter name=\"responsePrefix\" value=\"ztetopology\"/>\n<parameter name=\"trustStoreFileName\" value=\"/opt/onap/sdnc/data/stores/truststore.openecomp.zte.client.jks\"/>\n<parameter name=\"trustStorePassword\" value=\"adminadmin\"/>\n<parameter name=\"keyStoreFileName\" value=\"/opt/onap/sdnc/data/stores/sdnc.zte.p12\"/>\n<parameter name=\"keyStorePassword\" value=\"adminadmin\"/>\n",
+ "xml": "<execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >\n<parameter name=\"templateFileName\" value=\"`$prop.restapi.templateDir + '/getzteodutopotemplate.json'`\" />\n<parameter name=\"restapiUrl\" value=\"`$zte.prop.sdncRestApi.thirdpartySdnc.url + '/restconf/operations/ZTE-API-Topology:get-topology-details'`\" />\n<parameter name=\"restapiUser\" value=\"`$zte.prop.sdncRestApi.thirdpartySdnc.user`\" />\n<parameter name=\"restapiPassword\" value=\"`$zte.prop.sdncRestApi.thirdpartySdnc.password`\" />\n<parameter name=\"format\" value=\"json\"/>\n<parameter name=\"httpMethod\" value=\"POST\"/>\n<parameter name=\"responsePrefix\" value=\"ztetopology\"/>",
"comments": "",
"outputs": 1,
- "x": 1627,
- "y": 161,
- "z": "233b36a1.5b5d1a",
+ "x": 1630,
+ "y": 200,
+ "z": "5c3ac6a5.48ce2",
"wires": [
[
- "eab2d66e.d885b8",
- "17a6c836.1328e"
+ "1cff6c99.978523",
+ "8b1af88f.90711"
]
]
},
{
- "id": "eab2d66e.d885b8",
+ "id": "1cff6c99.978523",
"type": "success",
"name": "success",
"xml": "<outcome value='success'>\n",
"comments": "",
"outputs": 1,
- "x": 1909,
- "y": 106,
- "z": "233b36a1.5b5d1a",
+ "x": 1912,
+ "y": 145,
+ "z": "5c3ac6a5.48ce2",
"wires": [
[
- "e4e6a315.e66f18"
+ "3c98a053.587f4"
]
]
},
{
- "id": "17a6c836.1328e",
+ "id": "8b1af88f.90711",
"type": "failure",
"name": "failure",
"xml": "<outcome value='failure'>\n",
"comments": "",
"outputs": 1,
- "x": 1907,
- "y": 206,
- "z": "233b36a1.5b5d1a",
+ "x": 1910,
+ "y": 245,
+ "z": "5c3ac6a5.48ce2",
"wires": [
[
- "f408426d.ddcf3"
+ "f7875e10.0e8698"
]
]
},
{
- "id": "e4e6a315.e66f18",
+ "id": "3c98a053.587f4",
"type": "block",
"name": "block : atomic",
"xml": "<block atomic=\"true\">",
"atomic": "true",
"comments": "",
"outputs": 1,
- "x": 2108,
- "y": 105,
- "z": "233b36a1.5b5d1a",
+ "x": 2111,
+ "y": 144,
+ "z": "5c3ac6a5.48ce2",
"wires": [
[ ]
]
},
{
- "id": "f408426d.ddcf3",
+ "id": "f7875e10.0e8698",
"type": "returnFailure",
"name": "return failure",
- "xml": "<return status='failure'>\n<parameter name='ack-final' value='Y'/>\n<parameter name=\"error-code\" value=\"500\" />\n<parameter name=\"error-message\" value=\"Error executing Create vpn rest api\" />\n",
+ "xml": "<return status='failure'>\n<parameter name='ack-final' value='Y'/>\n<parameter name=\"error-code\" value=\"500\" />\n<parameter name=\"error-message\" value=\"Error executing Get odutopo rest api\" />\n",
"comments": "",
- "x": 2103,
- "y": 206,
- "z": "233b36a1.5b5d1a",
+ "x": 2106,
+ "y": 245,
+ "z": "5c3ac6a5.48ce2",
+ "wires": [ ]
+ },
+ {
+ "id": "876baee.788865",
+ "type": "for",
+ "name": "for each oduTopology",
+ "xml": "<for index='nidx' start='0' end='`$ztetopology.output.topology.node-ref-id_length`' >",
+ "comments": "",
+ "outputs": 1,
+ "x": 1538,
+ "y": 333,
+ "z": "5c3ac6a5.48ce2",
+ "wires": [
+ [
+ "8b00f3a6.5f00a"
+ ]
+ ]
+ },
+ {
+ "id": "b480d508.259ad",
+ "type": "update",
+ "name": "save network-resource",
+ "xml": "<save plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='network-resource' \n key='network-resource.network-id = $prop.zte.network-id' >\n<parameter name='network-id' value='`$prop.zte.network-id`' />\n<parameter name='client-id' value='`$prop.zte.client-id`' />\n<parameter name='te-topo-id' value='`$prop.zte.topo-id`' />\n<parameter name='provider-id' value='`$prop.zte.provider-id`' />",
+ "comments": "",
+ "outputs": 1,
+ "x": 1993,
+ "y": 381,
+ "z": "5c3ac6a5.48ce2",
+ "wires": [
+ [ ]
+ ]
+ },
+ {
+ "id": "8b00f3a6.5f00a",
+ "type": "block",
+ "name": "block : atomic",
+ "xml": "<block atomic='true'>",
+ "atomic": "true",
+ "comments": "",
+ "outputs": 1,
+ "x": 1736,
+ "y": 333,
+ "z": "5c3ac6a5.48ce2",
+ "wires": [
+ [
+ "5a3bb265.58783c",
+ "9645ad1c.475eb",
+ "b480d508.259ad"
+ ]
+ ]
+ },
+ {
+ "id": "5a3bb265.58783c",
+ "type": "execute",
+ "name": "execute RestApiCallNode Get ZTE oduTopology",
+ "xml": "<execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >\n<parameter name=\"templateFileName\" value=\"`$prop.restapi.templateDir + '/getzteodutoponodetemplate.json'`\" />\n<parameter name=\"restapiUrl\" value=\"`$zte.prop.sdncRestApi.thirdpartySdnc.url + '/restconf/operations/ZTE-API-Topology:get-topology-details'`\" />\n<parameter name=\"restapiUser\" value=\"`$zte.prop.sdncRestApi.thirdpartySdnc.user`\" />\n<parameter name=\"restapiPassword\" value=\"`$zte.prop.sdncRestApi.thirdpartySdnc.password`\" />\n<parameter name=\"format\" value=\"json\"/>\n<parameter name=\"httpMethod\" value=\"POST\"/>\n<parameter name=\"responsePrefix\" value=\"ztetopologynode\"/>",
+ "comments": "",
+ "outputs": 1,
+ "x": 2075,
+ "y": 437,
+ "z": "5c3ac6a5.48ce2",
+ "wires": [
+ [
+ "942544d4.b8ec58",
+ "8acdf237.4dae08"
+ ]
+ ]
+ },
+ {
+ "id": "8acdf237.4dae08",
+ "type": "success",
+ "name": "success",
+ "xml": "<outcome value='success'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1509,
+ "y": 689,
+ "z": "5c3ac6a5.48ce2",
+ "wires": [
+ [
+ "6d8d547d.f1dd64"
+ ]
+ ]
+ },
+ {
+ "id": "942544d4.b8ec58",
+ "type": "failure",
+ "name": "failure",
+ "xml": "<outcome value='failure'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1510,
+ "y": 564,
+ "z": "5c3ac6a5.48ce2",
+ "wires": [
+ [
+ "faf343d1.9734d"
+ ]
+ ]
+ },
+ {
+ "id": "faf343d1.9734d",
+ "type": "returnFailure",
+ "name": "return failure",
+ "xml": "<return status='failure'>\n<parameter name='ack-final' value='Y'/>\n<parameter name=\"error-code\" value=\"500\" />\n<parameter name=\"error-message\" value=\"Error executing Get odutopo node rest api\" />\n",
+ "comments": "",
+ "x": 1701,
+ "y": 564,
+ "z": "5c3ac6a5.48ce2",
+ "wires": [ ]
+ },
+ {
+ "id": "6d8d547d.f1dd64",
+ "type": "for",
+ "name": "for each oduTopology node",
+ "xml": "<for index='pidx' start='0' end='`$ztetopologynode.output.topology.node-ref-id_length`' >\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1735,
+ "y": 689,
+ "z": "5c3ac6a5.48ce2",
+ "wires": [
+ [
+ "a25bc521.5bb6a"
+ ]
+ ]
+ },
+ {
+ "id": "f538452a.143d98",
+ "type": "update",
+ "name": "save pnf",
+ "xml": "<save plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='pnf' \n key='pnf.pnf-name = $ztetopologynodedetails.node.uuid' >\n<parameter name='pnf-name' value='`$ztetopologynodedetails.node.uuid`' />\n<parameter name='pnf-id' value='`$ztetopologynodedetails.node.uuid`' />\n<parameter name='operational-status' value=\"up\" />\n<parameter name='admin-status' value=\"up\" />\n<parameter name='in-maint' value='true' />\n\n\n\n\n\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 2743,
+ "y": 815,
+ "z": "5c3ac6a5.48ce2",
+ "wires": [
+ [ ]
+ ]
+ },
+ {
+ "id": "11d1e28b.963c9d",
+ "type": "execute",
+ "name": "execute RestApiCallNode Get ZTE oduTopology Node details",
+ "xml": "<execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >\n<parameter name=\"templateFileName\" value=\"`$prop.restapi.templateDir + '/getzteodutoponodedetailstemplate.json'`\" />\n<parameter name=\"restapiUrl\" value=\"`$zte.prop.sdncRestApi.thirdpartySdnc.url + '/restconf/operations/ZTE-API-Topology:get-node-details'`\" />\n<parameter name=\"restapiUser\" value=\"`$zte.prop.sdncRestApi.thirdpartySdnc.user`\" />\n<parameter name=\"restapiPassword\" value=\"`$zte.prop.sdncRestApi.thirdpartySdnc.password`\" />\n<parameter name=\"format\" value=\"json\"/>\n<parameter name=\"httpMethod\" value=\"POST\"/>\n<parameter name=\"responsePrefix\" value=\"ztetopologynodedetails\"/>",
+ "comments": "",
+ "outputs": 1,
+ "x": 2337,
+ "y": 688,
+ "z": "5c3ac6a5.48ce2",
+ "wires": [
+ [
+ "55658f39.4a8e78",
+ "c9a1df1.d5a80a"
+ ]
+ ]
+ },
+ {
+ "id": "55658f39.4a8e78",
+ "type": "failure",
+ "name": "failure",
+ "xml": "<outcome value='failure'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1716,
+ "y": 830,
+ "z": "5c3ac6a5.48ce2",
+ "wires": [
+ [
+ "fd93d8e1.2313b"
+ ]
+ ]
+ },
+ {
+ "id": "fd93d8e1.2313b",
+ "type": "returnFailure",
+ "name": "return failure",
+ "xml": "<return status='failure'>\n<parameter name='ack-final' value='Y'/>\n<parameter name=\"error-code\" value=\"500\" />\n<parameter name=\"error-message\" value=\"Error executing Get odutopo node details rest api\" />\n",
+ "comments": "",
+ "x": 1866,
+ "y": 830,
+ "z": "5c3ac6a5.48ce2",
+ "wires": [ ]
+ },
+ {
+ "id": "c9a1df1.d5a80a",
+ "type": "success",
+ "name": "success",
+ "xml": "<outcome value='success'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1714,
+ "y": 935,
+ "z": "5c3ac6a5.48ce2",
+ "wires": [
+ [
+ "77de9cee.930a9c"
+ ]
+ ]
+ },
+ {
+ "id": "77de9cee.930a9c",
+ "type": "block",
+ "name": "block",
+ "xml": "<block>\n",
+ "atomic": "false",
+ "comments": "",
+ "outputs": 1,
+ "x": 1897,
+ "y": 935,
+ "z": "5c3ac6a5.48ce2",
+ "wires": [
+ [
+ "1b4283dd.592abc",
+ "eecb4617.57e91",
+ "7e0ea1c3.cc762",
+ "61c3b72.b4d2c48"
+ ]
+ ]
+ },
+ {
+ "id": "1b4283dd.592abc",
+ "type": "save",
+ "name": "save pnf relationship to network-resource in AAI",
+ "xml": "<save plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='pnf:relationship-list' \n key='pnf.pnf-name = $ztetopologynodedetails.node.uuid' force=\"true\" pfx=\"tmp.AnAI-data\">\n<parameter name=\"relationship-list.relationship[0].related-to\" value=\"network-resource\" />\n<parameter name=\"relationship-list.relationship[0].related-link\" value=\"'/network/network-resources/network-resource/' + 'zteNetwork'\" />\n<parameter name=\"relationship-list.relationship[0].relationship-data[0].relationship-key\" value=\"network-resource.network-id\" />\n<parameter name=\"relationship-list.relationship[0].relationship-data[0].relationship-value\" value=\"zteNetwork\" />",
+ "comments": "",
+ "outputs": 1,
+ "x": 2192,
+ "y": 1024,
+ "z": "5c3ac6a5.48ce2",
+ "wires": [
+ [ ]
+ ]
+ },
+ {
+ "id": "eecb4617.57e91",
+ "type": "save",
+ "name": "save pnf relation with esr-thirdparty-sdnc",
+ "xml": "<save plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='esr-thirdparty-sdnc:relationship-list' \n key='esr-thirdparty-sdnc.thirdparty-sdnc-id = $zte.prop.sdncRestApi.thirdpartySdnc.id' \n force=\"true\" pfx=\"tmp.AnAI-data\">\n<parameter name=\"relationship-list.relationship[0].related-to\" value=\"pnf\" />\n<parameter name=\"relationship-list.relationship[0].related-link\" value=\"`'/network/pnfs/pnf/' + $ztetopologynodedetails.node.uuid`\" />\n<parameter name=\"relationship-list.relationship[0].relationship-data[0].relationship-key\" value=\"pnf.pnf-name\" />\n<parameter name=\"relationship-list.relationship[0].relationship-data[0].relationship-value\" value=\"`$ztetopologynodedetails.node.uuid`\" />\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 2166,
+ "y": 1091,
+ "z": "5c3ac6a5.48ce2",
+ "wires": [
+ [ ]
+ ]
+ },
+ {
+ "id": "7f6ccbfa.b45a74",
+ "type": "execute",
+ "name": "execute RestApiCallNode Get ZTE oduTopology Node edge point details",
+ "xml": "<execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >\n<parameter name=\"templateFileName\" value=\"`$prop.restapi.templateDir + '/getzteodutoponodenepdetailstemplate.json'`\" />\n<parameter name=\"restapiUrl\" value=\"`$zte.prop.sdncRestApi.thirdpartySdnc.url + '/restconf/operations/ZTE-API-Topology:get-node-edge-point-details'`\" />\n<parameter name=\"restapiUser\" value=\"`$zte.prop.sdncRestApi.thirdpartySdnc.user`\" />\n<parameter name=\"restapiPassword\" value=\"`$zte.prop.sdncRestApi.thirdpartySdnc.password`\" />\n<parameter name=\"format\" value=\"json\"/>\n<parameter name=\"httpMethod\" value=\"POST\"/>\n<parameter name=\"responsePrefix\" value=\"ztetopologynodenepdetails\"/>",
+ "comments": "",
+ "outputs": 1,
+ "x": 2797,
+ "y": 1272,
+ "z": "5c3ac6a5.48ce2",
+ "wires": [
+ [
+ "38b0f2d1.620906",
+ "7b5490b3.a1044"
+ ]
+ ]
+ },
+ {
+ "id": "df44c30b.78cdc",
+ "type": "for",
+ "name": "for each oduTopology node nep name",
+ "xml": "<for index='tidx' start='0' end='`$ztetopologynodenepdetails.output.node-edge-point.name_length`' >\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 2687,
+ "y": 1507,
+ "z": "5c3ac6a5.48ce2",
+ "wires": [
+ [
+ "a99510c.7985ef"
+ ]
+ ]
+ },
+ {
+ "id": "a99510c.7985ef",
+ "type": "execute",
+ "name": "contains client",
+ "xml": "<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='contains' >\n <parameter name=\"source\" value=\"`$ztetopologynodenepdetails.node-edge-point.name[tidx].value`\"/>\n <parameter name=\"target\" value=\"client\"/>\n ",
+ "comments": "",
+ "outputs": 1,
+ "x": 3028,
+ "y": 1507,
+ "z": "5c3ac6a5.48ce2",
+ "wires": [
+ [
+ "81ab5973.689e",
+ "3487141b.53f6bc"
+ ]
+ ]
+ },
+ {
+ "id": "81ab5973.689e",
+ "type": "outcomeTrue",
+ "name": "true",
+ "xml": "<outcome value='true'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 3240,
+ "y": 1507,
+ "z": "5c3ac6a5.48ce2",
+ "wires": [
+ [
+ "ce449c28.7c7b3"
+ ]
+ ]
+ },
+ {
+ "id": "7b5490b3.a1044",
+ "type": "success",
+ "name": "success",
+ "xml": "<outcome value='success'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 2391,
+ "y": 1507,
+ "z": "5c3ac6a5.48ce2",
+ "wires": [
+ [
+ "df44c30b.78cdc"
+ ]
+ ]
+ },
+ {
+ "id": "38b0f2d1.620906",
+ "type": "failure",
+ "name": "failure",
+ "xml": "<outcome value='failure'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 2391,
+ "y": 1416,
+ "z": "5c3ac6a5.48ce2",
+ "wires": [
+ [
+ "e2cba4e6.c2e7a"
+ ]
+ ]
+ },
+ {
+ "id": "e2cba4e6.c2e7a",
+ "type": "returnFailure",
+ "name": "return failure",
+ "xml": "<return status='failure'>\n<parameter name='ack-final' value='Y'/>\n<parameter name=\"error-code\" value=\"500\" />\n<parameter name=\"error-message\" value=\"Error executing Get odutopo node edge point details rest api\" />\n",
+ "comments": "",
+ "x": 2763,
+ "y": 1416,
+ "z": "5c3ac6a5.48ce2",
+ "wires": [ ]
+ },
+ {
+ "id": "3bf4d883.90249",
+ "type": "set",
+ "name": "set zte unique-ltpId",
+ "xml": "<set>\n<parameter name='zte-unique-ltpId' value=\"`'nodeId-' + $ztetopologynodedetails.node.uuid + '-ltpId-' + $ztetopologynodenepdetails.node-edge-point.uuid`\" />\n",
+ "comments": "",
+ "x": 3692,
+ "y": 1507,
+ "z": "5c3ac6a5.48ce2",
+ "wires": [ ]
+ },
+ {
+ "id": "ce449c28.7c7b3",
+ "type": "block",
+ "name": "block",
+ "xml": "<block>\n",
+ "atomic": "false",
+ "comments": "",
+ "outputs": 1,
+ "x": 3478,
+ "y": 1507,
+ "z": "5c3ac6a5.48ce2",
+ "wires": [
+ [
+ "3bf4d883.90249",
+ "613c2ada.da8a7c",
+ "ab8b449e.5887e"
+ ]
+ ]
+ },
+ {
+ "id": "d2080e42.04e638",
+ "type": "update",
+ "name": "save p-interface",
+ "xml": "<save plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='p-interface' \n key='pnf.pnf-name = $ztetopologynodedetails.node.uuid\n AND p-interface.interface-name = $zte-unique-ltpId' > \n<parameter name='interface-name' value='`$zte-unique-ltpId`' />\n<parameter name='network-ref' value=\"`'providerId/' + $prop.zte.provider-id + '/topologyId/' + $prop.zte.topo-id + '/clientId/' + $prop.zte.client-id`\" />\n<parameter name='transparent' value=\"true\" />\n<parameter name='speed-value' value='`$zte-bandwidth`' />\n<parameter name='operational-status' value=\"up\" />\n<parameter name='in-maint' value=\"true\" />\n\"`'nodeId-' + $node.node-id + '-ltpId-' + $tp.te-tp-id`\"",
+ "comments": "",
+ "outputs": 1,
+ "x": 4117,
+ "y": 1699,
+ "z": "5c3ac6a5.48ce2",
+ "wires": [
+ [
+ "768c64d0.f7a43c",
+ "1c2dd58d.1dea72"
+ ]
+ ]
+ },
+ {
+ "id": "3487141b.53f6bc",
+ "type": "outcomeFalse",
+ "name": "false",
+ "xml": "<outcome value='false'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 3239,
+ "y": 1433,
+ "z": "5c3ac6a5.48ce2",
+ "wires": [
+ [
+ "c0e9d951.a60da8"
+ ]
+ ]
+ },
+ {
+ "id": "c0e9d951.a60da8",
+ "type": "block",
+ "name": "block",
+ "xml": "<block>\n",
+ "atomic": "false",
+ "comments": "",
+ "outputs": 1,
+ "x": 3474,
+ "y": 1433,
+ "z": "5c3ac6a5.48ce2",
+ "wires": [
+ [ ]
+ ]
+ },
+ {
+ "id": "768c64d0.f7a43c",
+ "type": "success",
+ "name": "success",
+ "xml": "<outcome value='success'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 4305,
+ "y": 1633,
+ "z": "5c3ac6a5.48ce2",
+ "wires": [
+ [
+ "faf97108.30335"
+ ]
+ ]
+ },
+ {
+ "id": "1c2dd58d.1dea72",
+ "type": "failure",
+ "name": "failure",
+ "xml": "<outcome value='failure'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 4305,
+ "y": 1698,
+ "z": "5c3ac6a5.48ce2",
+ "wires": [
+ [
+ "48e7c11a.010d9"
+ ]
+ ]
+ },
+ {
+ "id": "faf97108.30335",
+ "type": "block",
+ "name": "block",
+ "xml": "<block>\n",
+ "atomic": "false",
+ "comments": "",
+ "outputs": 1,
+ "x": 4494,
+ "y": 1632,
+ "z": "5c3ac6a5.48ce2",
+ "wires": [
+ [ ]
+ ]
+ },
+ {
+ "id": "7e0ea1c3.cc762",
+ "type": "switchNode",
+ "name": "switch",
+ "xml": "<switch test=\"`$ztetopologynodedetails.node.global-state-pac.operational-state == 'ENABLED'`\">\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 2067,
+ "y": 934,
+ "z": "5c3ac6a5.48ce2",
+ "wires": [
+ [
+ "c9232bab.411fe",
+ "a6b9bca2.6fc2b"
+ ]
+ ]
+ },
+ {
+ "id": "c9232bab.411fe",
+ "type": "outcomeTrue",
+ "name": "true",
+ "xml": "<outcome value='true'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 2268,
+ "y": 883,
+ "z": "5c3ac6a5.48ce2",
+ "wires": [
+ [
+ "18266e26.721f3a"
+ ]
+ ]
+ },
+ {
+ "id": "a6b9bca2.6fc2b",
+ "type": "outcomeFalse",
+ "name": "false",
+ "xml": "<outcome value='false'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 2267,
+ "y": 954,
+ "z": "5c3ac6a5.48ce2",
+ "wires": [
+ [
+ "3e090a83.a9b3c6"
+ ]
+ ]
+ },
+ {
+ "id": "18266e26.721f3a",
+ "type": "switchNode",
+ "name": "switch",
+ "xml": "<switch test=\"`$ztetopologynodedetails.node.global-state-pac.administrative-state == 'LOCKED'`\">\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 2424,
+ "y": 883,
+ "z": "5c3ac6a5.48ce2",
+ "wires": [
+ [
+ "18fde8e6.1e96f7",
+ "1bdb1333.5ff0dd"
+ ]
+ ]
+ },
+ {
+ "id": "3e090a83.a9b3c6",
+ "type": "switchNode",
+ "name": "switch",
+ "xml": "<switch test=\"`$ztetopologynodedetails.node.global-state-pac.administrative-state == 'LOCKED'`\">\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 2425,
+ "y": 954,
+ "z": "5c3ac6a5.48ce2",
+ "wires": [
+ [
+ "9439c895.756d",
+ "c071256a.4164e8"
+ ]
+ ]
+ },
+ {
+ "id": "18fde8e6.1e96f7",
+ "type": "outcomeTrue",
+ "name": "true",
+ "xml": "<outcome value='true'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 2587,
+ "y": 815,
+ "z": "5c3ac6a5.48ce2",
+ "wires": [
+ [
+ "f538452a.143d98"
+ ]
+ ]
+ },
+ {
+ "id": "1bdb1333.5ff0dd",
+ "type": "outcomeFalse",
+ "name": "false",
+ "xml": "<outcome value='false'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 2590,
+ "y": 883,
+ "z": "5c3ac6a5.48ce2",
+ "wires": [
+ [
+ "5f1efe1e.eaa66"
+ ]
+ ]
+ },
+ {
+ "id": "9439c895.756d",
+ "type": "outcomeTrue",
+ "name": "true",
+ "xml": "<outcome value='true'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 2591,
+ "y": 954,
+ "z": "5c3ac6a5.48ce2",
+ "wires": [
+ [
+ "e6e244a4.0300f"
+ ]
+ ]
+ },
+ {
+ "id": "c071256a.4164e8",
+ "type": "outcomeFalse",
+ "name": "false",
+ "xml": "<outcome value='false'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 2592,
+ "y": 1023,
+ "z": "5c3ac6a5.48ce2",
+ "wires": [
+ [
+ "79274805.8fd178"
+ ]
+ ]
+ },
+ {
+ "id": "5f1efe1e.eaa66",
+ "type": "update",
+ "name": "save pnf",
+ "xml": "<save plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='pnf' \n key='pnf.pnf-name = $ztetopologynodedetails.node.uuid' >\n<parameter name='pnf-name' value='`$ztetopologynodedetails.node.uuid`' />\n<parameter name='pnf-id' value='`$ztetopologynodedetails.node.uuid`' />\n<parameter name='operational-status' value=\"up\" />\n<parameter name='admin-status' value=\"down\" />\n<parameter name='in-maint' value='true' />\n\n\n\n\n\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 2743,
+ "y": 883,
+ "z": "5c3ac6a5.48ce2",
+ "wires": [
+ [ ]
+ ]
+ },
+ {
+ "id": "e6e244a4.0300f",
+ "type": "update",
+ "name": "save pnf",
+ "xml": "<save plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='pnf' \n key='pnf.pnf-name = $ztetopologynodedetails.node.uuid' >\n<parameter name='pnf-name' value='`$ztetopologynodedetails.node.uuid`' />\n<parameter name='pnf-id' value='`$ztetopologynodedetails.node.uuid`' />\n<parameter name='operational-status' value=\"down\" />\n<parameter name='admin-status' value=\"up\" />\n<parameter name='in-maint' value='true' />\n\n\n\n\n\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 2740,
+ "y": 954,
+ "z": "5c3ac6a5.48ce2",
+ "wires": [
+ [ ]
+ ]
+ },
+ {
+ "id": "79274805.8fd178",
+ "type": "update",
+ "name": "save pnf",
+ "xml": "<save plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='pnf' \n key='pnf.pnf-name = $ztetopologynodedetails.node.uuid' >\n<parameter name='pnf-name' value='`$ztetopologynodedetails.node.uuid`' />\n<parameter name='pnf-id' value='`$ztetopologynodedetails.node.uuid`' />\n<parameter name='operational-status' value=\"down\" />\n<parameter name='admin-status' value=\"down\" />\n<parameter name='in-maint' value='true' />\n\n\n\n\n\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 2741,
+ "y": 1023,
+ "z": "5c3ac6a5.48ce2",
+ "wires": [
+ [ ]
+ ]
+ },
+ {
+ "id": "613c2ada.da8a7c",
+ "type": "switchNode",
+ "name": "test operational-state",
+ "xml": "<switch test=\"`$ztetopologynodedetails.node.global-state-pac.operational-state == 'ENABLED'`\">\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 3692,
+ "y": 1696,
+ "z": "5c3ac6a5.48ce2",
+ "wires": [
+ [
+ "e65d9fab.c131f",
+ "fc04748b.c0e76"
+ ]
+ ]
+ },
+ {
+ "id": "e65d9fab.c131f",
+ "type": "outcomeTrue",
+ "name": "true",
+ "xml": "<outcome value='true'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 3908,
+ "y": 1699,
+ "z": "5c3ac6a5.48ce2",
+ "wires": [
+ [
+ "d2080e42.04e638"
+ ]
+ ]
+ },
+ {
+ "id": "fc04748b.c0e76",
+ "type": "outcomeFalse",
+ "name": "false",
+ "xml": "<outcome value='false'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 3911,
+ "y": 1813,
+ "z": "5c3ac6a5.48ce2",
+ "wires": [
+ [
+ "278d5ea5.1b82ca"
+ ]
+ ]
+ },
+ {
+ "id": "278d5ea5.1b82ca",
+ "type": "update",
+ "name": "save p-interface",
+ "xml": "<save plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='p-interface' \n key='pnf.pnf-name = $ztetopologynodedetails.node.uuid\n AND p-interface.interface-name = $zte-unique-ltpId' > \n<parameter name='interface-name' value='`$zte-unique-ltpId`' />\n<parameter name='network-ref' value=\"`'providerId/' + $prop.zte.provider-id + '/topologyId/' + $prop.zte.topo-id + '/clientId/' + $prop.zte.client-id`\" />\n<parameter name='transparent' value=\"true\" />\n<parameter name='speed-value' value='`$zte-bandwidth`' />\n<parameter name='operational-status' value=\"down\" />\n<parameter name='in-maint' value=\"true\" />\n\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 4118,
+ "y": 1813,
+ "z": "5c3ac6a5.48ce2",
+ "wires": [
+ [
+ "775b7d93.cb0874",
+ "ee21bf18.cecaa"
+ ]
+ ]
+ },
+ {
+ "id": "775b7d93.cb0874",
+ "type": "success",
+ "name": "success",
+ "xml": "<outcome value='success'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 4306,
+ "y": 1813,
+ "z": "5c3ac6a5.48ce2",
+ "wires": [
+ [
+ "c0aead49.1958f8"
+ ]
+ ]
+ },
+ {
+ "id": "ee21bf18.cecaa",
+ "type": "failure",
+ "name": "failure",
+ "xml": "<outcome value='failure'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 4303,
+ "y": 1874,
+ "z": "5c3ac6a5.48ce2",
+ "wires": [
+ [
+ "54ef23c0.7c3d8c"
+ ]
+ ]
+ },
+ {
+ "id": "c0aead49.1958f8",
+ "type": "block",
+ "name": "block",
+ "xml": "<block>\n",
+ "atomic": "false",
+ "comments": "",
+ "outputs": 1,
+ "x": 4492,
+ "y": 1813,
+ "z": "5c3ac6a5.48ce2",
+ "wires": [
+ [ ]
+ ]
+ },
+ {
+ "id": "48e7c11a.010d9",
+ "type": "update",
+ "name": "save p-interface",
+ "xml": "<save plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='p-interface' \n key='pnf.pnf-name = $ztetopologynodedetails.node.uuid\n AND p-interface.interface-name = $zte-unique-ltpId' > \n<parameter name='interface-name' value='`$zte-unique-ltpId`' />\n<parameter name='network-ref' value=\"`'providerId/' + $prop.zte.provider-id + '/topologyId/' + $prop.zte.topo-id + '/clientId/' + $prop.zte.client-id`\" />\n<parameter name='transparent' value=\"true\" />\n<parameter name='speed-value' value='`$zte-bandwidth`' />\n<parameter name='operational-status' value=\"up\" />\n<parameter name='in-maint' value=\"true\" />\n\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 4525,
+ "y": 1698,
+ "z": "5c3ac6a5.48ce2",
+ "wires": [
+ [ ]
+ ]
+ },
+ {
+ "id": "54ef23c0.7c3d8c",
+ "type": "update",
+ "name": "save p-interface",
+ "xml": "<save plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='p-interface' \n key='pnf.pnf-name = $ztetopologynodedetails.node.uuid\n AND p-interface.interface-name = $zte-unique-ltpId' > \n<parameter name='interface-name' value='`$zte-unique-ltpId`' />\n<parameter name='network-ref' value=\"`'providerId/' + $prop.zte.provider-id + '/topologyId/' + $prop.zte.topo-id + '/clientId/' + $prop.zte.client-id`\" />\n<parameter name='transparent' value=\"true\" />\n<parameter name='speed-value' value='`$zte-bandwidth`' />\n<parameter name='operational-status' value=\"up\" />\n<parameter name='in-maint' value=\"true\" />\n\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 4519,
+ "y": 1874,
+ "z": "5c3ac6a5.48ce2",
+ "wires": [
+ [ ]
+ ]
+ },
+ {
+ "id": "9645ad1c.475eb",
+ "type": "set",
+ "name": "set params",
+ "xml": "<set>\n<parameter name='prop.zte.network-id' value=\"zteNetwork\" />\n<parameter name='prop.zte.client-id' value=\"zteClient1\" />\n<parameter name='prop.zte.topo-id' value=\"zteTopo1\" />\n<parameter name='prop.zte.provider-id' value=\"zteProvider1\" />\n<parameter name='prop.zte.odutopo.name' value='`$ztetopology.output.topology.node-ref-id[$nidx]`' />\n",
+ "comments": "",
+ "x": 1957,
+ "y": 333,
+ "z": "5c3ac6a5.48ce2",
+ "wires": [ ]
+ },
+ {
+ "id": "a25bc521.5bb6a",
+ "type": "block",
+ "name": "block",
+ "xml": "<block>\n",
+ "atomic": "false",
+ "comments": "",
+ "outputs": 1,
+ "x": 1957,
+ "y": 689,
+ "z": "5c3ac6a5.48ce2",
+ "wires": [
+ [
+ "11d1e28b.963c9d",
+ "9403cfc0.48bae8"
+ ]
+ ]
+ },
+ {
+ "id": "9403cfc0.48bae8",
+ "type": "set",
+ "name": "set odutopo node name",
+ "xml": "<set>\n<parameter name='prop.zte.odutopo.node.name' value='`$ztetopologynode.output.topology.node-ref-id[$pidx]`' />\n",
+ "comments": "",
+ "x": 2221,
+ "y": 614,
+ "z": "5c3ac6a5.48ce2",
+ "wires": [ ]
+ },
+ {
+ "id": "d1f5b2ac.93ca5",
+ "type": "set",
+ "name": "set odutopo node nep uuid",
+ "xml": "<set>\n<parameter name='prop.zte.odutopo.node.nep.uuid' value='`$ztetopologynodedetails.output.node.node-edge-point-id[$ridx]`' />\n",
+ "comments": "",
+ "x": 2657,
+ "y": 1155,
+ "z": "5c3ac6a5.48ce2",
+ "wires": [ ]
+ },
+ {
+ "id": "61c3b72.b4d2c48",
+ "type": "for",
+ "name": "for each oduTopology node nep",
+ "xml": "<for index='ridx' start='0' end='`$ztetopologynodedetails.output.node.node-edge-point-id_length`' >\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 2137,
+ "y": 1156,
+ "z": "5c3ac6a5.48ce2",
+ "wires": [
+ [
+ "ba3d5d3.bbc9ca"
+ ]
+ ]
+ },
+ {
+ "id": "ba3d5d3.bbc9ca",
+ "type": "block",
+ "name": "block",
+ "xml": "<block>\n",
+ "atomic": "false",
+ "comments": "",
+ "outputs": 1,
+ "x": 2402,
+ "y": 1155,
+ "z": "5c3ac6a5.48ce2",
+ "wires": [
+ [
+ "d1f5b2ac.93ca5",
+ "7f6ccbfa.b45a74"
+ ]
+ ]
+ },
+ {
+ "id": "ab8b449e.5887e",
+ "type": "set",
+ "name": "set zte bandwidth",
+ "xml": "<set>\n<parameter name='zte-bandwidth' value='`1000 * 1000000 * 1.25 * $ztetopologynodenepdetails.node-edge-point.lp[0].odu-nep-pac.oducapacity`' />\n",
+ "comments": "",
+ "x": 3684,
+ "y": 1595,
+ "z": "5c3ac6a5.48ce2",
"wires": [ ]
}
]
\ No newline at end of file diff --git a/platform-logic/datachange/src/main/xml/DataChange_esr-thirdparty-sdnc-discovery-of-zte.xml b/platform-logic/datachange/src/main/xml/DataChange_esr-thirdparty-sdnc-discovery-of-zte.xml index 2cc77da8..77c83bb9 100644 --- a/platform-logic/datachange/src/main/xml/DataChange_esr-thirdparty-sdnc-discovery-of-zte.xml +++ b/platform-logic/datachange/src/main/xml/DataChange_esr-thirdparty-sdnc-discovery-of-zte.xml @@ -1,42 +1,248 @@ -<service-logic
- xmlns='http://www.onap.org/sdnc/svclogic'
- xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:schemaLocation='http://www.onap.org/sdnc/svclogic ./svclogic.xsd' module='DataChange' version='${project.version}'>
- <method rpc='esr-thirdparty-sdnc-discovery-of-zte' mode='sync'>
+<service-logic xmlns="http://www.onap.org/sdnc/svclogic" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.onap.org/sdnc/svclogic ./svclogic.xsd" module="DataChange" version="${project.version}">
+ <method rpc="esr-thirdparty-sdnc-discovery-of-zte" mode="sync">
<block atomic="true">
- <switch test='`$data-change-notification-input.aai-event-trigger`'>
- <outcome value='Update'>
+ <switch test="`$data-change-notification-input.aai-event-trigger`">
+ <outcome value="Update">
<block>
- <switch test='`$prop.sdncRestApi.type`'>
- <outcome value='SOTN'>
+ <switch test="`$prop.sdncRestApi.type`">
+ <outcome value="SOTN">
<block atomic="true">
- <execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest'>
- <parameter name="templateFileName" value="`$prop.restapi.templateDir + '/getztetopotemplate.json'`"/>
+ <execute plugin="org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode" method="sendRequest">
+ <parameter name="templateFileName" value="`$prop.restapi.templateDir + '/getzteodutopotemplate.json'`"/>
<parameter name="restapiUrl" value="`$zte.prop.sdncRestApi.thirdpartySdnc.url + '/restconf/operations/ZTE-API-Topology:get-topology-details'`"/>
<parameter name="restapiUser" value="`$zte.prop.sdncRestApi.thirdpartySdnc.user`"/>
<parameter name="restapiPassword" value="`$zte.prop.sdncRestApi.thirdpartySdnc.password`"/>
<parameter name="format" value="json"/>
<parameter name="httpMethod" value="POST"/>
- <parameter name="responsePrefix" value="ztetopology"/>
- <parameter name="trustStoreFileName" value="/opt/onap/sdnc/data/stores/truststore.openecomp.zte.client.jks"/>
- <parameter name="trustStorePassword" value="adminadmin"/>
- <parameter name="keyStoreFileName" value="/opt/onap/sdnc/data/stores/sdnc.zte.p12"/>
- <parameter name="keyStorePassword" value="adminadmin"/>
- <outcome value='success'>
+ <parameter name="responsePrefix" value="ztetopology"/>
+ <outcome value="success">
<block atomic="true"/>
</outcome>
- <outcome value='failure'>
- <return status='failure'>
- <parameter name='ack-final' value='Y'/>
+ <outcome value="failure">
+ <return status="failure">
+ <parameter name="ack-final" value="Y"/>
<parameter name="error-code" value="500"/>
- <parameter name="error-message" value="Error executing Create vpn rest api"/>
+ <parameter name="error-message" value="Error executing Get odutopo rest api"/>
</return>
</outcome>
</execute>
+ <for index="nidx" start="0" end="`$ztetopology.output.topology.node-ref-id_length`">
+ <block atomic="true">
+ <set>
+ <parameter name="prop.zte.network-id" value="zteNetwork"/>
+ <parameter name="prop.zte.client-id" value="zteClient1"/>
+ <parameter name="prop.zte.topo-id" value="zteTopo1"/>
+ <parameter name="prop.zte.provider-id" value="zteProvider1"/>
+ <parameter name="prop.zte.odutopo.name" value="`$ztetopology.output.topology.node-ref-id[$nidx]`"/>
+ </set>
+ <save plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService" resource="network-resource" key="network-resource.network-id = $prop.zte.network-id">
+ <parameter name="network-id" value="`$prop.zte.network-id`"/>
+ <parameter name="client-id" value="`$prop.zte.client-id`"/>
+ <parameter name="te-topo-id" value="`$prop.zte.topo-id`"/>
+ <parameter name="provider-id" value="`$prop.zte.provider-id`"/>
+ </save>
+ <execute plugin="org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode" method="sendRequest">
+ <parameter name="templateFileName" value="`$prop.restapi.templateDir + '/getzteodutoponodetemplate.json'`"/>
+ <parameter name="restapiUrl" value="`$zte.prop.sdncRestApi.thirdpartySdnc.url + '/restconf/operations/ZTE-API-Topology:get-topology-details'`"/>
+ <parameter name="restapiUser" value="`$zte.prop.sdncRestApi.thirdpartySdnc.user`"/>
+ <parameter name="restapiPassword" value="`$zte.prop.sdncRestApi.thirdpartySdnc.password`"/>
+ <parameter name="format" value="json"/>
+ <parameter name="httpMethod" value="POST"/>
+ <parameter name="responsePrefix" value="ztetopologynode"/>
+ <outcome value="failure">
+ <return status="failure">
+ <parameter name="ack-final" value="Y"/>
+ <parameter name="error-code" value="500"/>
+ <parameter name="error-message" value="Error executing Get odutopo node rest api"/>
+ </return>
+ </outcome>
+ <outcome value="success">
+ <for index="pidx" start="0" end="`$ztetopologynode.output.topology.node-ref-id_length`">
+ <block>
+ <set>
+ <parameter name="prop.zte.odutopo.node.name" value="`$ztetopologynode.output.topology.node-ref-id[$pidx]`"/>
+ </set>
+ <execute plugin="org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode" method="sendRequest">
+ <parameter name="templateFileName" value="`$prop.restapi.templateDir + '/getzteodutoponodedetailstemplate.json'`"/>
+ <parameter name="restapiUrl" value="`$zte.prop.sdncRestApi.thirdpartySdnc.url + '/restconf/operations/ZTE-API-Topology:get-node-details'`"/>
+ <parameter name="restapiUser" value="`$zte.prop.sdncRestApi.thirdpartySdnc.user`"/>
+ <parameter name="restapiPassword" value="`$zte.prop.sdncRestApi.thirdpartySdnc.password`"/>
+ <parameter name="format" value="json"/>
+ <parameter name="httpMethod" value="POST"/>
+ <parameter name="responsePrefix" value="ztetopologynodedetails"/>
+ <outcome value="failure">
+ <return status="failure">
+ <parameter name="ack-final" value="Y"/>
+ <parameter name="error-code" value="500"/>
+ <parameter name="error-message" value="Error executing Get odutopo node details rest api"/>
+ </return>
+ </outcome>
+ <outcome value="success">
+ <block>
+ <switch test="`$ztetopologynodedetails.node.global-state-pac.operational-state == 'ENABLED'`">
+ <outcome value="true">
+ <switch test="`$ztetopologynodedetails.node.global-state-pac.administrative-state == 'LOCKED'`">
+ <outcome value="true">
+ <save plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService" resource="pnf" key="pnf.pnf-name = $ztetopologynodedetails.node.uuid">
+ <parameter name="pnf-name" value="`$ztetopologynodedetails.node.uuid`"/>
+ <parameter name="pnf-id" value="`$ztetopologynodedetails.node.uuid`"/>
+ <parameter name="operational-status" value="up"/>
+ <parameter name="admin-status" value="up"/>
+ <parameter name="in-maint" value="true"/>
+ </save>
+ </outcome>
+ <outcome value="false">
+ <save plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService" resource="pnf" key="pnf.pnf-name = $ztetopologynodedetails.node.uuid">
+ <parameter name="pnf-name" value="`$ztetopologynodedetails.node.uuid`"/>
+ <parameter name="pnf-id" value="`$ztetopologynodedetails.node.uuid`"/>
+ <parameter name="operational-status" value="up"/>
+ <parameter name="admin-status" value="down"/>
+ <parameter name="in-maint" value="true"/>
+ </save>
+ </outcome>
+ </switch>
+ </outcome>
+ <outcome value="false">
+ <switch test="`$ztetopologynodedetails.node.global-state-pac.administrative-state == 'LOCKED'`">
+ <outcome value="true">
+ <save plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService" resource="pnf" key="pnf.pnf-name = $ztetopologynodedetails.node.uuid">
+ <parameter name="pnf-name" value="`$ztetopologynodedetails.node.uuid`"/>
+ <parameter name="pnf-id" value="`$ztetopologynodedetails.node.uuid`"/>
+ <parameter name="operational-status" value="down"/>
+ <parameter name="admin-status" value="up"/>
+ <parameter name="in-maint" value="true"/>
+ </save>
+ </outcome>
+ <outcome value="false">
+ <save plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService" resource="pnf" key="pnf.pnf-name = $ztetopologynodedetails.node.uuid">
+ <parameter name="pnf-name" value="`$ztetopologynodedetails.node.uuid`"/>
+ <parameter name="pnf-id" value="`$ztetopologynodedetails.node.uuid`"/>
+ <parameter name="operational-status" value="down"/>
+ <parameter name="admin-status" value="down"/>
+ <parameter name="in-maint" value="true"/>
+ </save>
+ </outcome>
+ </switch>
+ </outcome>
+ </switch>
+ <save plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService" resource="pnf:relationship-list" key="pnf.pnf-name = $ztetopologynodedetails.node.uuid" force="true" pfx="tmp.AnAI-data">
+ <parameter name="relationship-list.relationship[0].related-to" value="network-resource"/>
+ <parameter name="relationship-list.relationship[0].related-link" value="'/network/network-resources/network-resource/' + 'zteNetwork'"/>
+ <parameter name="relationship-list.relationship[0].relationship-data[0].relationship-key" value="network-resource.network-id"/>
+ <parameter name="relationship-list.relationship[0].relationship-data[0].relationship-value" value="zteNetwork"/>
+ </save>
+ <save plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService" resource="esr-thirdparty-sdnc:relationship-list" key="esr-thirdparty-sdnc.thirdparty-sdnc-id = $zte.prop.sdncRestApi.thirdpartySdnc.id" force="true" pfx="tmp.AnAI-data">
+ <parameter name="relationship-list.relationship[0].related-to" value="pnf"/>
+ <parameter name="relationship-list.relationship[0].related-link" value="`'/network/pnfs/pnf/' + $ztetopologynodedetails.node.uuid`"/>
+ <parameter name="relationship-list.relationship[0].relationship-data[0].relationship-key" value="pnf.pnf-name"/>
+ <parameter name="relationship-list.relationship[0].relationship-data[0].relationship-value" value="`$ztetopologynodedetails.node.uuid`"/>
+ </save>
+ <for index="ridx" start="0" end="`$ztetopologynodedetails.output.node.node-edge-point-id_length`">
+ <block>
+ <set>
+ <parameter name="prop.zte.odutopo.node.nep.uuid" value="`$ztetopologynodedetails.output.node.node-edge-point-id[$ridx]`"/>
+ </set>
+ <execute plugin="org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode" method="sendRequest">
+ <parameter name="templateFileName" value="`$prop.restapi.templateDir + '/getzteodutoponodenepdetailstemplate.json'`"/>
+ <parameter name="restapiUrl" value="`$zte.prop.sdncRestApi.thirdpartySdnc.url + '/restconf/operations/ZTE-API-Topology:get-node-edge-point-details'`"/>
+ <parameter name="restapiUser" value="`$zte.prop.sdncRestApi.thirdpartySdnc.user`"/>
+ <parameter name="restapiPassword" value="`$zte.prop.sdncRestApi.thirdpartySdnc.password`"/>
+ <parameter name="format" value="json"/>
+ <parameter name="httpMethod" value="POST"/>
+ <parameter name="responsePrefix" value="ztetopologynodenepdetails"/>
+ <outcome value="failure">
+ <return status="failure">
+ <parameter name="ack-final" value="Y"/>
+ <parameter name="error-code" value="500"/>
+ <parameter name="error-message" value="Error executing Get odutopo node edge point details rest api"/>
+ </return>
+ </outcome>
+ <outcome value="success">
+ <for index="tidx" start="0" end="`$ztetopologynodenepdetails.output.node-edge-point.name_length`">
+ <execute plugin="org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils" method="contains">
+ <parameter name="source" value="`$ztetopologynodenepdetails.node-edge-point.name[tidx].value`"/>
+ <parameter name="target" value="client"/>
+ <outcome value="false">
+ <block></block>
+ </outcome>
+ <outcome value="true">
+ <block>
+ <set>
+ <parameter name="zte-unique-ltpId" value="`'nodeId-' + $ztetopologynodedetails.node.uuid + '-ltpId-' + $ztetopologynodenepdetails.node-edge-point.uuid`"/>
+ </set>
+ <set>
+ <parameter name="zte-bandwidth" value="`1000 * 1000000 * 1.25 * $ztetopologynodenepdetails.node-edge-point.lp[0].odu-nep-pac.oducapacity`"/>
+ </set>
+ <switch test="`$ztetopologynodedetails.node.global-state-pac.operational-state == 'ENABLED'`">
+ <outcome value="true">
+ <save plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService" resource="p-interface" key="pnf.pnf-name = $ztetopologynodedetails.node.uuid AND p-interface.interface-name = $zte-unique-ltpId">
+ <parameter name="interface-name" value="`$zte-unique-ltpId`"/>
+ <parameter name="network-ref" value="`'providerId/' + $prop.zte.provider-id + '/topologyId/' + $prop.zte.topo-id + '/clientId/' + $prop.zte.client-id`"/>
+ <parameter name="transparent" value="true"/>
+ <parameter name="speed-value" value="`$zte-bandwidth`"/>
+ <parameter name="operational-status" value="up"/>
+ <parameter name="in-maint" value="true"/> "`'nodeId-' + $node.node-id + '-ltpId-' + $tp.te-tp-id`"
+ <outcome value="success">
+ <block></block>
+ </outcome>
+ <outcome value="failure">
+ <save plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService" resource="p-interface" key="pnf.pnf-name = $ztetopologynodedetails.node.uuid AND p-interface.interface-name = $zte-unique-ltpId">
+ <parameter name="interface-name" value="`$zte-unique-ltpId`"/>
+ <parameter name="network-ref" value="`'providerId/' + $prop.zte.provider-id + '/topologyId/' + $prop.zte.topo-id + '/clientId/' + $prop.zte.client-id`"/>
+ <parameter name="transparent" value="true"/>
+ <parameter name="speed-value" value="`$zte-bandwidth`"/>
+ <parameter name="operational-status" value="up"/>
+ <parameter name="in-maint" value="true"/>
+ </save>
+ </outcome>
+ </save>
+ </outcome>
+ <outcome value="false">
+ <save plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService" resource="p-interface" key="pnf.pnf-name = $ztetopologynodedetails.node.uuid AND p-interface.interface-name = $zte-unique-ltpId">
+ <parameter name="interface-name" value="`$zte-unique-ltpId`"/>
+ <parameter name="network-ref" value="`'providerId/' + $prop.zte.provider-id + '/topologyId/' + $prop.zte.topo-id + '/clientId/' + $prop.zte.client-id`"/>
+ <parameter name="transparent" value="true"/>
+ <parameter name="speed-value" value="`$zte-bandwidth`"/>
+ <parameter name="operational-status" value="down"/>
+ <parameter name="in-maint" value="true"/>
+ <outcome value="success">
+ <block></block>
+ </outcome>
+ <outcome value="failure">
+ <save plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService" resource="p-interface" key="pnf.pnf-name = $ztetopologynodedetails.node.uuid AND p-interface.interface-name = $zte-unique-ltpId">
+ <parameter name="interface-name" value="`$zte-unique-ltpId`"/>
+ <parameter name="network-ref" value="`'providerId/' + $prop.zte.provider-id + '/topologyId/' + $prop.zte.topo-id + '/clientId/' + $prop.zte.client-id`"/>
+ <parameter name="transparent" value="true"/>
+ <parameter name="speed-value" value="`$zte-bandwidth`"/>
+ <parameter name="operational-status" value="up"/>
+ <parameter name="in-maint" value="true"/>
+ </save>
+ </outcome>
+ </save>
+ </outcome>
+ </switch>
+ </block>
+ </outcome>
+ </execute>
+ </for>
+ </outcome>
+ </execute>
+ </block>
+ </for>
+ </block>
+ </outcome>
+ </execute>
+ </block>
+ </for>
+ </outcome>
+ </execute>
+ </block>
+ </for>
</block>
</outcome>
- <outcome value='Other'>
- <return status='failure'>
- <parameter name='ack-final' value='Y'/>
+ <outcome value="Other">
+ <return status="failure">
+ <parameter name="ack-final" value="Y"/>
<parameter name="error-code" value="500"/>
<parameter name="error-message" value="`'Unsupported type = ' + $prop.sdncRestApi.type`"/>
</return>
@@ -44,7 +250,7 @@ </switch>
</block>
</outcome>
- <outcome value='delete'>
+ <outcome value="delete">
<block atomic="true"/>
</outcome>
</switch>
diff --git a/platform-logic/restapi-templates/src/main/json/getzteodutoponodedetailstemplate.json b/platform-logic/restapi-templates/src/main/json/getzteodutoponodedetailstemplate.json new file mode 100644 index 00000000..5d893833 --- /dev/null +++ b/platform-logic/restapi-templates/src/main/json/getzteodutoponodedetailstemplate.json @@ -0,0 +1,6 @@ + +{ + "input":{ + "node-id":${prop.zte.odutopo.node.name} + } +} diff --git a/platform-logic/restapi-templates/src/main/json/getzteodutoponodenepdetailstemplate.json b/platform-logic/restapi-templates/src/main/json/getzteodutoponodenepdetailstemplate.json new file mode 100644 index 00000000..7f84b6dd --- /dev/null +++ b/platform-logic/restapi-templates/src/main/json/getzteodutoponodenepdetailstemplate.json @@ -0,0 +1,6 @@ + +{ + "input":{ + "node-edge-point-id":${prop.zte.odutopo.node.nep.uuid} + } +} diff --git a/platform-logic/restapi-templates/src/main/json/getzteodutoponodetemplate.json b/platform-logic/restapi-templates/src/main/json/getzteodutoponodetemplate.json new file mode 100644 index 00000000..d7e9cde6 --- /dev/null +++ b/platform-logic/restapi-templates/src/main/json/getzteodutoponodetemplate.json @@ -0,0 +1,6 @@ + +{ + "input":{ + "topology-name":${prop.zte.odutopo.name} + } +} diff --git a/platform-logic/restapi-templates/src/main/json/getzteodutopotemplate.json b/platform-logic/restapi-templates/src/main/json/getzteodutopotemplate.json new file mode 100644 index 00000000..29253999 --- /dev/null +++ b/platform-logic/restapi-templates/src/main/json/getzteodutopotemplate.json @@ -0,0 +1,5 @@ + +{ + "input":{ + } +} |