diff options
Diffstat (limited to 'dgbuilder')
37 files changed, 572 insertions, 408 deletions
diff --git a/dgbuilder/createReleaseDir.sh b/dgbuilder/createReleaseDir.sh new file mode 100755 index 00000000..ccfd1d96 --- /dev/null +++ b/dgbuilder/createReleaseDir.sh @@ -0,0 +1,129 @@ +#!/bin/bash +export PATH=$PATH:. +appDir=$(pwd) +if [ "$#" != 3 -a "$#" != 4 ] +then + echo "Usage $0 releaseDir loginId emailAddress [gitLocalRepository]" + echo "Note: Specify the gitLocalRepository path if you would want to be able to import flows from your local git repository" + exit +fi +if [ ! -e "releases" ] +then + mkdir releases +fi +releaseDir="$1" +name="Release $releaseDir" +loginId="$2" +emailid="$3" +dbHost="dbhost" +dbPort="3306" +dbName="sdnctl" +dbUser="sdnctl" +dbPassword="gamma" +gitLocalRepository="$4" + +lastPort=$(find "releases/" -name "customSettings.js" |xargs grep uiPort|cut -d: -f2|sed -e s/,//|sort|tail -1) +echo $lastPort|grep uiPort >/dev/null 2>&1 +if [ "$?" == "0" ] +then +lastPort=$(find "releases/" -name "customSettings.js" |xargs grep uiPort|cut -d: -f3|sed -e s/,//|sort|tail -1) +fi +#echo $lastPort +if [ "${lastPort}" == "" ] +then + lastPort="3099" +fi +let nextPort=$(expr $lastPort+1) +#echo $nextPort +if [ ! -e "releases/$releaseDir" ] +then +mkdir releases/$releaseDir +cd releases/$releaseDir +mkdir flows +mkdir flows/shared +mkdir flows/shared/backups +mkdir html +mkdir xml +mkdir lib +mkdir lib/flows +mkdir logs +mkdir conf +mkdir codecloud +customSettingsFile="customSettings.js" +if [ ! -e "./$customSettingsFile" ] +then + echo "module.exports = {" >$customSettingsFile + echo " 'name' : '$name'," >>$customSettingsFile + echo " 'emailAddress' :'$emailid'," >>$customSettingsFile + echo " 'uiPort' :$nextPort," >>$customSettingsFile + echo " 'mqttReconnectTime': 15000," >>$customSettingsFile + echo " 'serialReconnectTime' : 15000," >>$customSettingsFile + echo " 'debugMaxLength': 1000," >>$customSettingsFile + echo " 'htmlPath': 'releases/$releaseDir/html/'," >>$customSettingsFile + echo " 'xmlPath': 'releases/$releaseDir/xml/'," >>$customSettingsFile + echo " 'flowFile' : 'releases/$releaseDir/flows/flows.json'," >>$customSettingsFile + echo " 'sharedDir': 'releases/$releaseDir/flows/shared'," >>$customSettingsFile + echo " 'userDir' : 'releases/$releaseDir'," >>$customSettingsFile + echo " 'httpAuth': {user:'$loginId',pass:'cc03e747a6afbbcbf8be7668acfebee5'}," >>$customSettingsFile + echo " 'dbHost': '$dbHost'," >>$customSettingsFile + echo " 'dbPort': '$dbPort'," >>$customSettingsFile + echo " 'dbName': '$dbName'," >>$customSettingsFile + echo " 'dbUser': '$dbUser'," >>$customSettingsFile + echo " 'dbPassword': '$dbPassword'," >>$customSettingsFile + echo " 'gitLocalRepository': '$gitLocalRepository'" >>$customSettingsFile + echo " }" >>$customSettingsFile +fi + #echo "Created custom settings file $customSettingsFile" + echo "Done ....." +else + echo "ERROR:customSettings file $customSettingsFile already exists for $releaseDir" + exit +fi +#echo "Content of custom settings file" +#echo "============================================================================" +# cat $customSettingsFile +#echo "============================================================================" +svclogicPropFile="./conf/svclogic.properties" +if [ ! -d "${appDir}/yangFiles" ] +then + mkdir -p "${appDir}/yangFiles" +fi +if [ ! -d "${appDir}/generatedJS" ] +then + mkdir -p "${appDir}/generatedJS" +fi + +if [ ! -e "./$svclogicPropFile" ] +then + echo "org.openecomp.sdnc.sli.dbtype=jdbc" >$svclogicPropFile + echo "org.openecomp.sdnc.sli.jdbc.url=jdbc:mysql://dbhost:3306/sdnctl" >>$svclogicPropFile + echo "org.openecomp.sdnc.sli.jdbc.database=sdnctl" >>$svclogicPropFile + echo "org.openecomp.sdnc.sli.jdbc.user=sdnctl" >>$svclogicPropFile + echo "org.openecomp.sdnc.sli.jdbc.password=gamma" >>$svclogicPropFile +fi +if [ ! -e "${appDir}/flowShareUsers.js" ] +then + echo "module.exports = {\"flowShareUsers\":" >${appDir}/flowShareUsers.js + echo " [" >>${appDir}/flowShareUsers.js + echo " ]" >>${appDir}/flowShareUsers.js + echo "}" >>${appDir}/flowShareUsers.js +fi +grep "$releaseDir" ${appDir}/flowShareUsers.js >/dev/null 2>&1 +if [ "$?" != "0" ] +then + num_of_lines=$(cat ${appDir}/flowShareUsers.js|wc -l) + if [ $num_of_lines -gt 4 ] + then + content=$(head -n -2 ${appDir}/flowShareUsers.js) + echo "${content}," > ${appDir}/flowShareUsers.js + else + content=$(head -n -2 ${appDir}/flowShareUsers.js) + echo "$content" > ${appDir}/flowShareUsers.js + fi + echo " {" >> ${appDir}/flowShareUsers.js + echo " \"name\" : \"$name\"," >> ${appDir}/flowShareUsers.js + echo " \"rootDir\" : \"$releaseDir\"" >> ${appDir}/flowShareUsers.js + echo " }" >> ${appDir}/flowShareUsers.js + echo " ]" >> ${appDir}/flowShareUsers.js + echo "}" >> ${appDir}/flowShareUsers.js +fi diff --git a/dgbuilder/nodes/dge/dgelogic/block.html b/dgbuilder/nodes/dge/dgelogic/block.html index 29c85ac0..9dc116ee 100644 --- a/dgbuilder/nodes/dge/dgelogic/block.html +++ b/dgbuilder/nodes/dge/dgelogic/block.html @@ -75,7 +75,7 @@ <div class="source"> <pre><block> <record plugin="org.openecomp.sdnc.sli.recording.FileRecorder"> - <parameter name="file" value="/tmp/gamma_r1.log" /> + <parameter name="file" value="/tmp/sample_r1.log" /> <parameter name="field1" value="__TIMESTAMP__"/> <parameter name="field2" value="RESERVED"/> <parameter name="field3" value="$asePort.uni_circuit_id"/> diff --git a/dgbuilder/nodes/dge/dgelogic/configure.html b/dgbuilder/nodes/dge/dgelogic/configure.html index f1afc8d4..232d22e3 100644 --- a/dgbuilder/nodes/dge/dgelogic/configure.html +++ b/dgbuilder/nodes/dge/dgelogic/configure.html @@ -99,7 +99,7 @@ <outcome value="success"> <block> <record plugin="org.openecomp.sdnc.sli.recording.FileRecorder"> - <parameter name="file" value="/tmp/gamma_r1.log" /> + <parameter name="file" value="/tmp/sampler1.log" /> <parameter name="field1" value="__TIMESTAMP__"/> <parameter name="field2" value="ACTIVE"/> <parameter name="field3" value="$uni-circuit-id"/> diff --git a/dgbuilder/nodes/dge/dgelogic/delete.html b/dgbuilder/nodes/dge/dgelogic/delete.html index 4a011e6e..0fbb0022 100644 --- a/dgbuilder/nodes/dge/dgelogic/delete.html +++ b/dgbuilder/nodes/dge/dgelogic/delete.html @@ -71,7 +71,7 @@ <div class="section"> <h5><a name="Example"></a>Example</h5> <div class="source"> -<pre><delete plugin="org.openecomp.sdnc.sli.resource.gamma.GammaResource" +<pre><delete plugin="org.openecomp.sdnc.sli.resource.samplesvc.SampleServiceResource" resource="ase-port" key="uni_circuit_id == $uni-circuit-id"> <outcome value="true"> diff --git a/dgbuilder/nodes/dge/dgelogic/exists.html b/dgbuilder/nodes/dge/dgelogic/exists.html index 652495e0..0ccc43a9 100644 --- a/dgbuilder/nodes/dge/dgelogic/exists.html +++ b/dgbuilder/nodes/dge/dgelogic/exists.html @@ -71,7 +71,7 @@ <div class="section"> <h5><a name="Example"></a>Example</h5> <div class="source"> -<pre><exists plugin="org.openecomp.sdnc.sli.resource.gamma.GammaResource" +<pre><exists plugin="org.openecomp.sdnc.sli.resource.samplesvc.SampleServiceResource" resource="ase-port" key="uni_circuit_id == $uni-circuit-id"> <outcome value="true"> diff --git a/dgbuilder/nodes/dge/dgelogic/get-resource.html b/dgbuilder/nodes/dge/dgelogic/get-resource.html index 4e1b1a98..ecd58192 100644 --- a/dgbuilder/nodes/dge/dgelogic/get-resource.html +++ b/dgbuilder/nodes/dge/dgelogic/get-resource.html @@ -74,7 +74,7 @@ <div class="section"> <h5><a name="Example"></a>Example</h5> <div class="source"> -<pre><get-resource plugin="org.openecomp.sdnc.sli.resource.gamma.GammaResource" +<pre><get-resource plugin="org.openecomp.sdnc.sli.resource.samplesvc.SampleServiceResource" resource="ase-port" key="uni_circuit_id == $uni-circuit-id"> <outcome value="success"> diff --git a/dgbuilder/nodes/dge/dgelogic/is-available.html b/dgbuilder/nodes/dge/dgelogic/is-available.html index 4bc22365..dc27e048 100644 --- a/dgbuilder/nodes/dge/dgelogic/is-available.html +++ b/dgbuilder/nodes/dge/dgelogic/is-available.html @@ -71,7 +71,7 @@ <div class="section"> <h5><a name="Example"></a>Example</h5> <div class="source"> -<pre><is-available plugin="org.openecomp.sdnc.sli.resource.gamma.GammaResource" +<pre><is-available plugin="org.openecomp.sdnc.sli.resource.samplesvc.SampleServiceResource" resource="ase-port" key="resource-emt-clli == $edge-device-clli and speed >= $uni-cir-value"> <outcome value="true"> diff --git a/dgbuilder/nodes/dge/dgelogic/notify.html b/dgbuilder/nodes/dge/dgelogic/notify.html index 78820482..157a133d 100644 --- a/dgbuilder/nodes/dge/dgelogic/notify.html +++ b/dgbuilder/nodes/dge/dgelogic/notify.html @@ -71,7 +71,7 @@ <div class="section"> <h5><a name="Example"></a>Example</h5> <div class="source"> -<pre><notify plugin="org.openecomp.sdnc.sli.resource.gamma.GammaResource" +<pre><notify plugin="org.openecomp.sdnc.sli.resource.samplesvc.SampleServiceResource" resource="network-connection" action="DELETE" > <parameter name="message" value="Hello, world!" /> <outcome value="success"> diff --git a/dgbuilder/nodes/dge/dgelogic/record.html b/dgbuilder/nodes/dge/dgelogic/record.html index 654b88dc..310ebac0 100644 --- a/dgbuilder/nodes/dge/dgelogic/record.html +++ b/dgbuilder/nodes/dge/dgelogic/record.html @@ -75,7 +75,7 @@ <h5><a name="Example"></a>Example</h5> <div class="source"> <pre><record plugin="org.openecomp.sdnc.sli.recording.FileRecorder"> - <parameter name="file" value="/tmp/gamma_r1.log" /> + <parameter name="file" value="/tmp/sample_r1.log" /> <parameter name="field1" value="__TIMESTAMP__"/> <parameter name="field2" value="ACTIVE"/> <parameter name="field3" value="$uni-circuit-id"/> diff --git a/dgbuilder/nodes/dge/dgelogic/release.html b/dgbuilder/nodes/dge/dgelogic/release.html index 39c88399..c68a2f72 100644 --- a/dgbuilder/nodes/dge/dgelogic/release.html +++ b/dgbuilder/nodes/dge/dgelogic/release.html @@ -74,7 +74,7 @@ <div class="section"> <h5><a name="Example"></a>Example</h5> <div class="source"> -<pre><release plugin="org.openecomp.sdnc.sli.resource.gamma.GammaResource" +<pre><release plugin="org.openecomp.sdnc.sli.resource.samplesvc.SampleServiceResource" resource="ase-port" key="uni_circuit_id == $uni-circuit-id"> <outcome value="success"> diff --git a/dgbuilder/nodes/dge/dgelogic/reserve.html b/dgbuilder/nodes/dge/dgelogic/reserve.html index c2e4a10f..a6a799a2 100644 --- a/dgbuilder/nodes/dge/dgelogic/reserve.html +++ b/dgbuilder/nodes/dge/dgelogic/reserve.html @@ -74,7 +74,7 @@ <div class="section"> <h5><a name="Example"></a>Example</h5> <div class="source"> -<pre><reserve plugin="org.openecomp.sdnc.sli.resource.gamma.GammaResource" +<pre><reserve plugin="org.openecomp.sdnc.sli.resource.samplesvc.SampleServiceResource" resource="ase-port" key="resource-emt-clli == $edge-device-clli and speed >= $uni-cir-value" select="min(speed)"> diff --git a/dgbuilder/nodes/dge/dgelogic/save.html b/dgbuilder/nodes/dge/dgelogic/save.html index 56bfa49e..923698ae 100644 --- a/dgbuilder/nodes/dge/dgelogic/save.html +++ b/dgbuilder/nodes/dge/dgelogic/save.html @@ -77,7 +77,7 @@ <div class="section"> <h5><a name="Example"></a>Example</h5> <div class="source"> -<pre><save plugin="`$gamma-resource-plugin`" resource="resourceName" +<pre><save plugin="`$resource-plugin`" resource="resourceName" key="keyName=value" pfx="requests.resourceName"> <parameter name="parameter1" diff --git a/dgbuilder/nodes/dge/dgelogic/switchNode.html b/dgbuilder/nodes/dge/dgelogic/switchNode.html index 61c71098..ad2077b1 100644 --- a/dgbuilder/nodes/dge/dgelogic/switchNode.html +++ b/dgbuilder/nodes/dge/dgelogic/switchNode.html @@ -61,7 +61,7 @@ <div class="source"> <pre><switch test="$uni-cir-units"> <outcome value="Mbps"> - <reserve plugin="org.openecomp.sdnc.sli.resource.gamma.GammaResource" + <reserve plugin="org.openecomp.sdnc.sli.resource.samplesvc.SampleServiceResource" resource="ase-port" key="resource-emt-clli == $edge-device-clli and speed >= $uni-cir-value" pfx="asePort"> @@ -80,7 +80,7 @@ </reserve> </outcome> <outcome value="Gbps"> - <reserve plugin="org.openecomp.sdnc.sli.resource.gamma.GammaResource" + <reserve plugin="org.openecomp.sdnc.sli.resource.samplesvc.SampleServiceResource" resource="ase-port" key="resource-emt-clli == $edge-device-clli and speed >= $uni-cir-value*1000" pfx="asePort"> diff --git a/dgbuilder/nodes/dge/dgelogic/update.html b/dgbuilder/nodes/dge/dgelogic/update.html index b268f7a4..e728a409 100644 --- a/dgbuilder/nodes/dge/dgelogic/update.html +++ b/dgbuilder/nodes/dge/dgelogic/update.html @@ -71,7 +71,7 @@ <div class="section"> <h5><a name="Example"></a>Example</h5> <div class="source"> -<pre><update plugin="org.openecomp.sdnc.sli.resource.gamma.GammaResource" +<pre><update plugin="org.openecomp.sdnc.sli.resource.samplesvc.SampleServiceResource" resource="network-connection" action="DELETE" > <parameter name="message" value="Hello, world!" /> <outcome value="success"> diff --git a/dgbuilder/pom.xml b/dgbuilder/pom.xml new file mode 100644 index 00000000..5eb8e726 --- /dev/null +++ b/dgbuilder/pom.xml @@ -0,0 +1,119 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> + + <parent> + <groupId>org.openecomp.sdnc.oam</groupId> + <artifactId>sdnc-oam</artifactId> + <version>1.1.0-SNAPSHOT</version> + </parent> + + <modelVersion>4.0.0</modelVersion> + <packaging>pom</packaging> + <groupId>org.openecomp.sdnc.oam</groupId> + <artifactId>dgbuilder</artifactId> + + <version>1.1.0-SNAPSHOT</version> + + <name>Directed Graph Builder</name> + <description>Directed Graph Builder</description> + + <properties> + <application.name>dgbuilder</application.name> + <skip.SWM>true</skip.SWM> + <adm.base>/opt/app/dgbuilder</adm.base> + <maven.build.timestamp.format>yyMMdd-HHmmss</maven.build.timestamp.format> + <build.number>${maven.build.timestamp}</build.number> + <SWM_VERSION>${project.version}-${build.number}</SWM_VERSION> + </properties> + + <dependencies> + <dependency> + <groupId>org.openecomp.sdnc.core</groupId> + <artifactId>sli-common</artifactId> + <version>${sdnctl.sli.version}</version> + </dependency> + <dependency> + <groupId>mysql</groupId> + <artifactId>mysql-connector-java</artifactId> + <version>5.1.31</version> + <type>jar</type> + </dependency> + <dependency> + <groupId>org.antlr</groupId> + <artifactId>antlr4</artifactId> + <version>${antlr.version}</version> + <type>jar</type> + <scope>compile</scope> + </dependency> + <dependency> + <groupId>org.slf4j</groupId> + <artifactId>slf4j-api</artifactId> + <version>${slf4j.version}</version> + </dependency> + <dependency> + <groupId>org.slf4j</groupId> + <artifactId>slf4j-simple</artifactId> + <version>1.7.5</version> + <scope>compile</scope> + </dependency> + <dependency> + <groupId>org.apache.commons</groupId> + <artifactId>commons-lang3</artifactId> + <version>${commons.lang3.version}</version> + </dependency> + </dependencies> + + <build> + <plugins> + <plugin> + <artifactId>maven-assembly-plugin</artifactId> + <executions> + <execution> + <id>create-zip</id> + <goals> + <goal>single</goal> + </goals> + <phase>package</phase> + <configuration> + <finalName>${application.name}.${project.version}</finalName> + <attach>true</attach> + <descriptors> + <descriptor>src/assembly/assemble_zip.xml</descriptor> + </descriptors> + </configuration> + </execution> + </executions> + </plugin> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-dependency-plugin</artifactId> + <executions> + <execution> + <id>copy-dependencies</id> + <goals> + <goal>copy-dependencies</goal> + </goals> + <phase>prepare-package</phase> + <configuration> + <transitive>false</transitive> + <outputDirectory>${project.build.directory}/svclogic/lib</outputDirectory> + <overWriteReleases>false</overWriteReleases> + <overWriteSnapshots>true</overWriteSnapshots> + <overWriteIfNewer>true</overWriteIfNewer> + <useRepositoryLayout>false</useRepositoryLayout> + <addParentPoms>false</addParentPoms> + <copyPom>false</copyPom> + <scope>provided</scope> + </configuration> + </execution> + </executions> + </plugin> + </plugins> + </build> + + <organization> + <name>AT&T</name> + </organization> +</project> + diff --git a/dgbuilder/public/icons/bluetooth.png b/dgbuilder/public/icons/bluetooth.png Binary files differdeleted file mode 100644 index 1967b064..00000000 --- a/dgbuilder/public/icons/bluetooth.png +++ /dev/null diff --git a/dgbuilder/releases/sdnc1.0/flows/shared/backups/.gitignore b/dgbuilder/releases/sdnc1.0/flows/shared/backups/.gitignore new file mode 100644 index 00000000..e69de29b --- /dev/null +++ b/dgbuilder/releases/sdnc1.0/flows/shared/backups/.gitignore diff --git a/dgbuilder/settings.js.orig b/dgbuilder/settings.js.orig deleted file mode 100644 index 3466b047..00000000 --- a/dgbuilder/settings.js.orig +++ /dev/null @@ -1,128 +0,0 @@ -/** - * Copyright 2013 IBM Corp. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - **/ -module.exports = { - // the tcp port that the Node-RED web server is listening on - uiPort: 1880, - - // By default, the Node-RED UI accepts connections on all IPv4 interfaces. - // The following property can be used to listen on a specific interface. For - // example, the following would only allow connections from the local machine. - //uiHost: "127.0.0.1", - - // Retry time in milliseconds for MQTT connections - mqttReconnectTime: 15000, - - // Retry time in milliseconds for Serial port connections - serialReconnectTime: 15000, - - // Retry time in milliseconds for TCP socket connections - //socketReconnectTime: 10000, - - // Timeout in milliseconds for TCP server socket connections - // defaults to no timeout - //socketTimeout: 120000, - - // Maximum number of lines in debug window before pruning - debugMaxLength: 1000, - - // The file containing the flows. If not set, it defaults to flows_<hostname>.json - //flowFile: 'flows.json', - - // To enabled pretty-printing of the flow within the flow file, set the following - // property to true: - //flowFilePretty: true, - - // By default, all user data is stored in the Node-RED install directory. To - // use a different location, the following property can be used - //userDir: '/home/nol/.node-red/', - - // Node-RED scans the `nodes` directory in the install directory to find nodes. - // The following property can be used to specify an additional directory to scan. - //nodesDir: '/home/nol/.node-red/nodes', - - // By default, the Node-RED UI is available at http://localhost:1880/ - // The following property can be used to specifiy a different root path. - // If set to false, this is disabled. - //httpAdminRoot: '/admin', - - // You can protect the user interface with a userid and password by using the following property. - // The password must be an md5 hash eg.. 5f4dcc3b5aa765d61d8327deb882cf99 ('password') - //httpAdminAuth: {user:"user",pass:"5f4dcc3b5aa765d61d8327deb882cf99"}, - - // Some nodes, such as HTTP In, can be used to listen for incoming http requests. - // By default, these are served relative to '/'. The following property - // can be used to specifiy a different root path. If set to false, this is - // disabled. - //httpNodeRoot: '/nodes', - - // To password protect the node-defined HTTP endpoints, the following property - // can be used. - // The password must be an md5 hash eg.. 5f4dcc3b5aa765d61d8327deb882cf99 ('password') - //httpNodeAuth: {user:"user",pass:"5f4dcc3b5aa765d61d8327deb882cf99"}, - - // When httpAdminRoot is used to move the UI to a different root path, the - // following property can be used to identify a directory of static content - // that should be served at http://localhost:1880/. - //httpStatic: '/home/nol/node-red-dashboard/', - - // To password protect the static content, the following property can be used. - // The password must be an md5 hash eg.. 5f4dcc3b5aa765d61d8327deb882cf99 ('password') - //httpStaticAuth: {user:"user",pass:"5f4dcc3b5aa765d61d8327deb882cf99"}, - - // The following property can be used in place of 'httpAdminRoot' and 'httpNodeRoot', - // to apply the same root to both parts. - //httpRoot: '/red', - - // The following property can be used in place of 'httpAdminAuth' and 'httpNodeAuth', - // to apply the same authentication to both parts. - //httpAuth: {user:"user",pass:"5f4dcc3b5aa765d61d8327deb882cf99"}, - - // The following property can be used to disable the editor. The admin API - // is not affected by this option. To disable both the editor and the admin - // API, use either the httpRoot or httpAdminRoot properties - //disableEditor: false, - - // The following property can be used to enable HTTPS - // See http://nodejs.org/api/https.html#https_https_createserver_options_requestlistener - // for details on its contents. - //https: { - // key: fs.readFileSync('privatekey.pem'), - // cert: fs.readFileSync('certificate.pem') - //}, - - // The following property can be used to configure cross-origin resource sharing - // in the HTTP nodes. - // See https://github.com/troygoode/node-cors#configuration-options for - // details on its contents. The following is a basic permissive set of options: - //httpNodeCors: { - // origin: "*", - // methods: "GET,PUT,POST,DELETE" - //}, - - // Anything in this hash is globally available to all functions. - // It is accessed as context.global. - // eg: - // functionGlobalContext: { os:require('os') } - // can be accessed in a function block as: - // context.global.os - - functionGlobalContext: { - // os:require('os'), - // bonescript:require('bonescript'), - // arduino:require('duino') - } - -} diff --git a/dgbuilder/show_status.sh b/dgbuilder/show_status.sh new file mode 100755 index 00000000..21197515 --- /dev/null +++ b/dgbuilder/show_status.sh @@ -0,0 +1,54 @@ +#!/bin/bash +tbold=$(tput setf 3) +bold=$(tput setf 2) +bold1=$(tput setf 2) +offbold=$(tput rmso;tput sgr0) + +function pad { + #echo "1 is $1 2 is $2" + if [ "$1" == "" ] + then + $1 = ""; + fi + let count=0 + curr_len=`expr length "$1"` + let space_length=$2-$curr_len + spaces="" + while [ $count -lt $space_length ] + do + spaces="$spaces " + let count=$count+1 + done + echo "$1$spaces" +} + +function isRunning { + echo $(curl -I "$1" 2>/dev/null|head -1|tail -1|awk '{print $2}') +} +dirName=$(pwd) +options=($(ls -l $dirName/releases|grep ^d|awk '{print $NF}'|sort)) + echo "$(pad RELEASE 15)$(pad URL 30)$(pad Status 10)" + echo "$(pad '----' 15)$(pad '---' 30)$(pad '------' 10)" + for opt in "${options[@]}" + do + + releaseDir="$opt" + if [ -e "./releases/${opt}/customSettings.js" ] + then + pid=$(cat ./releases/$releaseDir/logs/process_pid 2>/dev/null) + port=$(cat ./releases/$releaseDir/customSettings.js 2>/dev/null|grep uiPort|sed -e 's/[, ]//g'|cut -d: -f2) + resp1=$(isRunning "http://localhost:$port") + if [ "$resp1" == "401" ] + then + echo "$(pad $releaseDir 15)$(pad http://localhost:$port 30)${bold}$(pad running 10)${offbold}" + else + processId=$(netstat -upltn 2>/dev/null|grep $port|awk '{print $NF}'|sed -e 's%/node-red%%g') + if [ "$processId" == "" ] + then + echo "$(pad $releaseDir 15)$(pad http://localhost:$port 30)${bold}$(pad stopped 10)${offbold}" + else + echo "$(pad $releaseDir 15)$(pad http://localhost:$port 30)${bold}$(pad running 10)${offbold}" + fi + fi + fi + done diff --git a/dgbuilder/src/assembly/assemble_zip.xml b/dgbuilder/src/assembly/assemble_zip.xml new file mode 100644 index 00000000..0fbdde84 --- /dev/null +++ b/dgbuilder/src/assembly/assemble_zip.xml @@ -0,0 +1,109 @@ +<!-- + ============LICENSE_START======================================================= + openECOMP : SDN-C + ================================================================================ + Copyright (C) 2017 AT&T Intellectual Property. All rights + reserved. + ================================================================================ + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + ============LICENSE_END========================================================= + --> + +<!-- Defines how we build the .zip file which is our distribution. --> + +<assembly + xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0 http://maven.apache.org/xsd/assembly-1.1.0.xsd"> + <formats> + <format>zip</format> + </formats> + + <includeBaseDirectory>false</includeBaseDirectory> + + <fileSets> + <fileSet> + <directory>core_nodes</directory> + <outputDirectory>dgbuilder/core_nodes</outputDirectory> + </fileSet> + <fileSet> + <directory>dgeflows</directory> + <outputDirectory>dgbuilder/dgeflows</outputDirectory> + </fileSet> + <fileSet> + <directory>generatedJS</directory> + <outputDirectory>dgbuilder/generatedJS</outputDirectory> + </fileSet> + <fileSet> + <directory>git_scripts</directory> + <outputDirectory>dgbuilder/git_scripts</outputDirectory> + </fileSet> + <fileSet> + <directory>nodes</directory> + <outputDirectory>dgbuilder/nodes</outputDirectory> + </fileSet> + <fileSet> + <directory>public</directory> + <outputDirectory>dgbuilder/public</outputDirectory> + </fileSet> + <fileSet> + <directory>red</directory> + <outputDirectory>dgbuilder/red</outputDirectory> + </fileSet> + <fileSet> + <directory>releases</directory> + <outputDirectory>dgbuilder/releases</outputDirectory> + </fileSet> + <fileSet> + <directory>svclogic</directory> + <outputDirectory>dgbuilder/svclogic</outputDirectory> + </fileSet> + <fileSet> + <directory>test</directory> + <outputDirectory>dgbuilder/test</outputDirectory> + </fileSet> + <fileSet> + <directory>tools</directory> + <outputDirectory>dgbuilder/tools</outputDirectory> + </fileSet> + <fileSet> + <directory>yangFiles</directory> + <outputDirectory>dgbuilder/yangFiles</outputDirectory> + </fileSet> + <fileSet> + <directory>.</directory> + <outputDirectory>dgbuilder/</outputDirectory> + <includes> + <include>*.json</include> + <include>*.js</include> + <include>*.md</include> + <include>*.sh</include> + <include>LICENSE</include> + </includes> + </fileSet> + <fileSet> + <directory>target/svclogic/lib</directory> + <outputDirectory>dgbuilder/svclogic/lib</outputDirectory> + <includes> + <include>sli-common*.jar</include> + <include>mysql-connector*.jar</include> + <include>antlr*.jar</include> + <include>commons-lang*.jar</include> + <include>slf4j-api*.jar</include> + <include>slf4j-simple*.jar</include> + </includes> + </fileSet> + </fileSets> + + +</assembly> diff --git a/dgbuilder/start.sh b/dgbuilder/start.sh new file mode 100755 index 00000000..38f11582 --- /dev/null +++ b/dgbuilder/start.sh @@ -0,0 +1,74 @@ +#!/bin/bash +releaseDir="$1" +if [ "$#" != "1" ] +then + echo "Usage: $0 releaseDirName" + exit +fi +echo "ReleaseDir:$releaseDir" +export PROJECT_HOME=`pwd` +tbold=$(tput setf 3) +bold=$(tput setf 2) +bold1=$(tput setf 2) +offbold=$(tput rmso;tput sgr0) + +function pad { + #echo "1 is $1 2 is $2" + if [ "$1" == "" ] + then + $1 = ""; + fi + let count=0 + curr_len=`expr length "$1"` + let space_length=$2-$curr_len + spaces="" + while [ $count -lt $space_length ] + do + spaces="$spaces " + let count=$count+1 + done + echo "$1$spaces" +} + +function isRunning { + echo $(curl -I "$1" 2>/dev/null|head -1|tail -1|awk '{print $2}') +} + +npm install + +if [ -e "releases/${releaseDir}/customSettings.js" ] +then + pid=$(cat releases/$releaseDir/logs/process_pid 2>/dev/null) + port=$(cat releases/$releaseDir/customSettings.js|grep uiPort|sed -e 's/[, ]//g'|cut -d: -f2 ) + count=$(ps -p$pid 2>/dev/null|grep -v PID|wc -l) + if [ "$count" != "0" ] + then + echo "For Release \"$releaseDir\" - http://localhost:$port" + echo "********ALREADY RUNNING PID:$pid *******" + else + pid_listening_on_port=$(netstat -upltn 2>/dev/null|grep -w $port|awk '{print $NF}'|cut -d'/' -f1) + if [ "$pid_listening_on_port" != "" ] + then + if [ "$pid_listening_on_port" != "$pid" ] + then + echo "port $port is already in use by other process" + ps -p $pid_listening_on_port + else + echo "Process is already running."; + fi + exit; + fi + node red.js --settings releases/${releaseDir}/customSettings.js + process_pid="$!" + echo $process_pid >releases/$releaseDir/logs/process_pid + port=$(cat releases/${releaseDir}/customSettings.js|grep uiPort|sed -e 's/[, ]//g'|cut -d: -f2) + echo "For Release \"$releaseDir\" ${urlIp}:$port --- STARTED PID:$process_pid" + if [ "${releaseDir}" != "" ] + then + sleep 3 + ./show_status.sh|grep -w ${releaseDir} + fi + fi +else + echo "Directory ${releaseDir} is not setup. Use the createReleaseDir.sh script to setup the directory." +fi diff --git a/dgbuilder/stop.sh b/dgbuilder/stop.sh new file mode 100755 index 00000000..b67babc0 --- /dev/null +++ b/dgbuilder/stop.sh @@ -0,0 +1,52 @@ +#!/bin/bash +tbold=$(tput setf 3) +bold=$(tput setf 2) +bold1=$(tput setf 2) +offbold=$(tput rmso;tput sgr0) + +function pad { + #echo "1 is $1 2 is $2" + if [ "$1" == "" ] + then + $1 = ""; + fi + let count=0 + curr_len=`expr length "$1"` + let space_length=$2-$curr_len + spaces="" + while [ $count -lt $space_length ] + do + spaces="$spaces " + let count=$count+1 + done + echo "$1$spaces" +} +releaseDir="" +if [ "$#" == "1" ] +then + releaseDir="$1" +fi + +if [ -e "releases/${releaseDir}/customSettings.js" ] +then + port=$(cat releases/${releaseDir}/customSettings.js|grep uiPort|sed -e 's/[, ]//g'|cut -d: -f2) + kill $(cat releases/${releaseDir}/logs/process_pid 2>/dev/null) >/dev/null 2>&1 + if [ "$?" != "0" ] + then + #kill only if its a node-red process + processPid=$(netstat -upltn 2>/dev/null|grep -w $port|awk '{print $NF}'|sed -e 's%/node-red%%g') + kill $processPid 2>/dev/null + echo "http://localhost:$port ---- STOPPED" + ./show_status.sh|grep -w "${releaseDir}" + else + echo "http://localhost:$port ---- STOPPED" + ./show_status.sh|grep -w "${releaseDir}" + fi +else + if [ "$releaseDir" != "" ] + then + echo "Release Directory ${releaseDir} not setup."; + else + echo "Usage:$0 releaseDirName" + fi +fi diff --git a/dgbuilder/svclogic/lib/.gitignore b/dgbuilder/svclogic/lib/.gitignore new file mode 100644 index 00000000..e69de29b --- /dev/null +++ b/dgbuilder/svclogic/lib/.gitignore diff --git a/dgbuilder/svclogic/lib/antlr4-4.5.1.jar b/dgbuilder/svclogic/lib/antlr4-4.5.1.jar Binary files differdeleted file mode 100644 index 81039db1..00000000 --- a/dgbuilder/svclogic/lib/antlr4-4.5.1.jar +++ /dev/null diff --git a/dgbuilder/svclogic/lib/commons-lang3-3.1.jar b/dgbuilder/svclogic/lib/commons-lang3-3.1.jar Binary files differdeleted file mode 100644 index a85e539b..00000000 --- a/dgbuilder/svclogic/lib/commons-lang3-3.1.jar +++ /dev/null diff --git a/dgbuilder/svclogic/lib/mysql-connector-java-5.1.31.jar b/dgbuilder/svclogic/lib/mysql-connector-java-5.1.31.jar Binary files differdeleted file mode 100644 index 26864e49..00000000 --- a/dgbuilder/svclogic/lib/mysql-connector-java-5.1.31.jar +++ /dev/null diff --git a/dgbuilder/svclogic/lib/slf4j-api-1.6.1.jar b/dgbuilder/svclogic/lib/slf4j-api-1.6.1.jar Binary files differdeleted file mode 100644 index f1f4fdd2..00000000 --- a/dgbuilder/svclogic/lib/slf4j-api-1.6.1.jar +++ /dev/null diff --git a/dgbuilder/svclogic/lib/slf4j-simple-1.7.5.jar b/dgbuilder/svclogic/lib/slf4j-simple-1.7.5.jar Binary files differdeleted file mode 100644 index eca11dd4..00000000 --- a/dgbuilder/svclogic/lib/slf4j-simple-1.7.5.jar +++ /dev/null diff --git a/dgbuilder/svclogic/lib/sli-common.jar b/dgbuilder/svclogic/lib/sli-common.jar Binary files differdeleted file mode 100644 index beacbe7a..00000000 --- a/dgbuilder/svclogic/lib/sli-common.jar +++ /dev/null diff --git a/dgbuilder/tools/formatXml.py b/dgbuilder/tools/formatXml.py new file mode 100644 index 00000000..913456a1 --- /dev/null +++ b/dgbuilder/tools/formatXml.py @@ -0,0 +1,11 @@ +import xml.dom.minidom +import lxml.etree as etree +import sys + +xml_fname=sys.argv[1] +#xml = xml.dom.minidom.parse(xml_fname) # or xml.dom.minidom.parseString(xml_string) +#pretty_xml_as_string = xml.toprettyxml() +#print pretty_xml_as_string + +x = etree.parse(xml_fname) +print etree.tostring(x, pretty_print = True) diff --git a/dgbuilder/tools/format_xml.sh b/dgbuilder/tools/format_xml.sh index f0074e67..c66153ed 100755 --- a/dgbuilder/tools/format_xml.sh +++ b/dgbuilder/tools/format_xml.sh @@ -8,10 +8,9 @@ if [ -z "$PROJECT_HOME" ] then export PROJECT_HOME=$(pwd)/.. fi -export CLASSPATH=$CLASSPATH:. if [ -e "$1" ] then - java FormatXml $1 + python $PROJECT_HOME/tools/formatXml.py $1 else echo "File $1 does not exist" fi diff --git a/dgbuilder/tools/getRpcsClassFromYang.sh b/dgbuilder/tools/getRpcsClassFromYang.sh index d7fc213e..91d95f02 100755 --- a/dgbuilder/tools/getRpcsClassFromYang.sh +++ b/dgbuilder/tools/getRpcsClassFromYang.sh @@ -3,7 +3,7 @@ toolsDir=$PROJECT_HOME/tools if [ "$#" != "2" ] then echo "Usage $0 yang_file generated_jar_file" - echo "example $0 /home/users/sdnc/src/aic-homing/model/src/main/yang/AicHoming.yang /home/users/sdnc/src/aic-homing/model/target/aicHoming.model-2.0.0.jar" + echo "example $0 /home/users/sdnc/src/sample.yang /home/users/sdnc/target/sample.model-1.0.0.jar" exit fi yangFile="$1" diff --git a/dgbuilder/tools/guava-14.0.1.jar b/dgbuilder/tools/guava-14.0.1.jar Binary files differdeleted file mode 100644 index 3a3d9258..00000000 --- a/dgbuilder/tools/guava-14.0.1.jar +++ /dev/null diff --git a/dgbuilder/tools/javax.json-api-1.0.jar b/dgbuilder/tools/javax.json-api-1.0.jar Binary files differdeleted file mode 100644 index d276c793..00000000 --- a/dgbuilder/tools/javax.json-api-1.0.jar +++ /dev/null diff --git a/dgbuilder/tools/jsonTool.js b/dgbuilder/tools/jsonTool.js index b4ed21f0..d95ae10d 100644 --- a/dgbuilder/tools/jsonTool.js +++ b/dgbuilder/tools/jsonTool.js @@ -101,267 +101,12 @@ for( j in obj){ } } -a=[ -'service-configuration-operation-input.service-information.service-instance-id', -'service-configuration-operation-input.service-information.subscriber-name', -'service-configuration-operation-input.service-information.service-type', -'service-configuration-operation-input.svc-config-additional-data.management-ip', -'service-configuration-operation-input.sdnc-request-header.svc-request-id', -'service-configuration-operation-input.sdnc-request-header.svc-notification-url', -'service-configuration-operation-input.sdnc-request-header.svc-action', -'service-configuration-operation-input.vr-lan.routing-protocol', -'service-configuration-operation-input.vr-lan.vr-lan-interface[].v4-vr-lan-prefix', -'service-configuration-operation-input.vr-lan.vr-lan-interface[].vr-designation', -'service-configuration-operation-input.vr-lan.vr-lan-interface[].v4-vr-lan-prefix-length', -'service-configuration-operation-input.vr-lan.vr-lan-interface[].v6-vr-lan-prefix', -'service-configuration-operation-input.vr-lan.vr-lan-interface[].v6-vr-lan-prefix-length', -'service-configuration-operation-input.vr-lan.vr-lan-interface[].t-defaulted-v6-vrlan', -'service-configuration-operation-input.vr-lan.vr-lan-interface[].v4-vce-loopback-address', -'service-configuration-operation-input.vr-lan.vr-lan-interface[].v6-vce-wan-address', -'service-configuration-operation-input.vr-lan.vr-lan-interface[].v4-dhcp-server-enabled', -'service-configuration-operation-input.vr-lan.vr-lan-interface[].v6-dhcp-server-enabled', -'service-configuration-operation-input.vr-lan.vr-lan-interface[].use-v4-default-pool', -'service-configuration-operation-input.vr-lan.vr-lan-interface[].v4-dhcp-default-pool-prefix', -'service-configuration-operation-input.vr-lan.vr-lan-interface[].v4-dhcp-default-pool-prefix-length', -'service-configuration-operation-input.vr-lan.vr-lan-interface[].excluded-v4-dhcp-addresses-from-default-pool[].excluded-v4-address', -'service-configuration-operation-input.vr-lan.vr-lan-interface[].excluded-v4-dhcp-addresses-from-default-pool[].key', -'service-configuration-operation-input.vr-lan.vr-lan-interface[].use-v6-default-pool', -'service-configuration-operation-input.vr-lan.vr-lan-interface[].v6-dhcp-default-pool-prefix', -'service-configuration-operation-input.vr-lan.vr-lan-interface[].v6-dhcp-default-pool-prefix-length', -'service-configuration-operation-input.vr-lan.vr-lan-interface[].excluded-v6-dhcp-addresses-from-default-pool[].excluded-v6-address', -'service-configuration-operation-input.vr-lan.vr-lan-interface[].excluded-v6-dhcp-addresses-from-default-pool[].key', -'service-configuration-operation-input.vr-lan.vr-lan-interface[].v6-dhcp-pools[].v6-dhcp-pool-prefix', -'service-configuration-operation-input.vr-lan.vr-lan-interface[].v6-dhcp-pools[].v6-dhcp-pool-prefix-length', -'service-configuration-operation-input.vr-lan.vr-lan-interface[].v6-dhcp-pools[].v6-dhcp-relay-gateway-address', -'service-configuration-operation-input.vr-lan.vr-lan-interface[].v6-dhcp-pools[].v6-dhcp-relay-next-hop-address', -'service-configuration-operation-input.vr-lan.vr-lan-interface[].v6-dhcp-pools[].excluded-v6-addresses[].excluded-v6-address', -'service-configuration-operation-input.vr-lan.vr-lan-interface[].v6-dhcp-pools[].excluded-v6-addresses[].key', -'service-configuration-operation-input.vr-lan.vr-lan-interface[].v6-dhcp-pools[].key', -'service-configuration-operation-input.vr-lan.vr-lan-interface[].v4-dhcp-pools[].v4-dhcp-relay-next-hop-address', -'service-configuration-operation-input.vr-lan.vr-lan-interface[].v4-dhcp-pools[].v4-dhcp-pool-prefix', -'service-configuration-operation-input.vr-lan.vr-lan-interface[].v4-dhcp-pools[].v4-dhcp-pool-prefix-length', -'service-configuration-operation-input.vr-lan.vr-lan-interface[].v4-dhcp-pools[].v4-dhcp-relay-gateway-address', -'service-configuration-operation-input.vr-lan.vr-lan-interface[].v4-dhcp-pools[].excluded-v4-addresses[].excluded-v4-address', -'service-configuration-operation-input.vr-lan.vr-lan-interface[].v4-dhcp-pools[].excluded-v4-addresses[].key', -'service-configuration-operation-input.vr-lan.vr-lan-interface[].v4-dhcp-pools[].key', -'service-configuration-operation-input.vr-lan.vr-lan-interface[].v4-nat-enabled', -'service-configuration-operation-input.vr-lan.vr-lan-interface[].v4-nat-mapping-entries[].v4-nat-internal', -'service-configuration-operation-input.vr-lan.vr-lan-interface[].v4-nat-mapping-entries[].v4-nat-next-hop-address', -'service-configuration-operation-input.vr-lan.vr-lan-interface[].v4-nat-mapping-entries[].v4-nat-external', -'service-configuration-operation-input.vr-lan.vr-lan-interface[].v4-nat-mapping-entries[].key', -'service-configuration-operation-input.vr-lan.vr-lan-interface[].t-provided-v6-lan-public-prefixes[].request-index', -'service-configuration-operation-input.vr-lan.vr-lan-interface[].t-provided-v6-lan-public-prefixes[].v6-next-hop-address', -'service-configuration-operation-input.vr-lan.vr-lan-interface[].t-provided-v6-lan-public-prefixes[].v6-lan-public-prefix', -'service-configuration-operation-input.vr-lan.vr-lan-interface[].t-provided-v6-lan-public-prefixes[].v6-lan-public-prefix-length', -'service-configuration-operation-input.vr-lan.vr-lan-interface[].t-provided-v6-lan-public-prefixes[].key', -'service-configuration-operation-input.vr-lan.vr-lan-interface[].t-provided-v4-lan-public-prefixes[].request-index', -'service-configuration-operation-input.vr-lan.vr-lan-interface[].t-provided-v4-lan-public-prefixes[].v4-lan-public-prefix', -'service-configuration-operation-input.vr-lan.vr-lan-interface[].t-provided-v4-lan-public-prefixes[].v4-next-hop-address', -'service-configuration-operation-input.vr-lan.vr-lan-interface[].t-provided-v4-lan-public-prefixes[].v4-lan-public-prefix-length', -'service-configuration-operation-input.vr-lan.vr-lan-interface[].t-provided-v4-lan-public-prefixes[].key', -'service-configuration-operation-input.vr-lan.vr-lan-interface[].v6-static-routes[].v6-static-route-prefix-length', -'service-configuration-operation-input.vr-lan.vr-lan-interface[].v6-static-routes[].v6-next-hop-address', -'service-configuration-operation-input.vr-lan.vr-lan-interface[].v6-static-routes[].v6-static-route-prefix', -'service-configuration-operation-input.vr-lan.vr-lan-interface[].v6-static-routes[].key', -'service-configuration-operation-input.vr-lan.vr-lan-interface[].v4-static-routes[].v4-static-route-prefix-length', -'service-configuration-operation-input.vr-lan.vr-lan-interface[].v4-static-routes[].v4-next-hop-address', -'service-configuration-operation-input.vr-lan.vr-lan-interface[].v4-static-routes[].v4-static-route-prefix', -'service-configuration-operation-input.vr-lan.vr-lan-interface[].v4-static-routes[].key', -'service-configuration-operation-input.vr-lan.vr-lan-interface[].v4-pat-enabled', -'service-configuration-operation-input.vr-lan.vr-lan-interface[].v4-pat-default-pool-prefix-length', -'service-configuration-operation-input.vr-lan.vr-lan-interface[].use-v4-default-pool', -'service-configuration-operation-input.vr-lan.vr-lan-interface[].v4-pat-default-pool-prefix', -'service-configuration-operation-input.vr-lan.vr-lan-interface[].v4-pat-pools[].v4-pat-pool-prefix', -'service-configuration-operation-input.vr-lan.vr-lan-interface[].v4-pat-pools[].v4-pat-pool-next-hop-address', -'service-configuration-operation-input.vr-lan.vr-lan-interface[].v4-pat-pools[].v4-pat-pool-prefix-length', -'service-configuration-operation-input.vr-lan.vr-lan-interface[].v4-pat-pools[].key', -'service-configuration-operation-input.vr-lan.vr-lan-interface[].v6-firewall-packet-filters[].v6-firewall-prefix', -'service-configuration-operation-input.vr-lan.vr-lan-interface[].v6-firewall-packet-filters[].v6-firewall-prefix-length', -'service-configuration-operation-input.vr-lan.vr-lan-interface[].v6-firewall-packet-filters[].allow-icmp-ping', -'service-configuration-operation-input.vr-lan.vr-lan-interface[].v6-firewall-packet-filters[].udp-port-list[].port-number', -'service-configuration-operation-input.vr-lan.vr-lan-interface[].v6-firewall-packet-filters[].udp-port-list[].key', -'service-configuration-operation-input.vr-lan.vr-lan-interface[].v6-firewall-packet-filters[].tcp-port-list[].port-number', -'service-configuration-operation-input.vr-lan.vr-lan-interface[].v6-firewall-packet-filters[].tcp-port-list[].key', -'service-configuration-operation-input.vr-lan.vr-lan-interface[].v6-firewall-packet-filters[].key', -'service-configuration-operation-input.vr-lan.vr-lan-interface[].stateful-firewall-lite-v4-enabled', -'service-configuration-operation-input.vr-lan.vr-lan-interface[].stateful-firewall-lite-v6-enabled', -'service-configuration-operation-input.vr-lan.vr-lan-interface[].v4-firewall-packet-filters[].allow-icmp-ping', -'service-configuration-operation-input.vr-lan.vr-lan-interface[].v4-firewall-packet-filters[].udp-port-list[].port-number', -'service-configuration-operation-input.vr-lan.vr-lan-interface[].v4-firewall-packet-filters[].udp-port-list[].key', -'service-configuration-operation-input.vr-lan.vr-lan-interface[].v4-firewall-packet-filters[].tcp-port-list[].port-number', -'service-configuration-operation-input.vr-lan.vr-lan-interface[].v4-firewall-packet-filters[].tcp-port-list[].key', -'service-configuration-operation-input.vr-lan.vr-lan-interface[].v4-firewall-packet-filters[].v4-firewall-prefix', -'service-configuration-operation-input.vr-lan.vr-lan-interface[].v4-firewall-packet-filters[].v4-firewall-prefix-length', -'service-configuration-operation-input.vr-lan.vr-lan-interface[].v4-firewall-packet-filters[].key', -'service-configuration-operation-input.vr-lan.vr-lan-interface[].key', -'service-configuration-operation-input.internet-evc-access-information.internet-evc-speed-value', -'service-configuration-operation-input.internet-evc-access-information.ip-version', -'service-configuration-operation-input.internet-evc-access-information.internet-evc-speed-units', -'service-configuration-operation-input.l2-homing-information.preferred-aic-clli', -'service-configuration-operation-input.l2-homing-information.evc-name', -'service-configuration-operation-input.l2-homing-information.topology', -'service-configuration-operation-input.internet-service-change-details.internet-evc-speed-value', -'service-configuration-operation-input.internet-service-change-details.internet-evc-speed-units', -'service-configuration-operation-input.internet-service-change-details.t-provided-v4-lan-public-prefixes[].request-index', -'service-configuration-operation-input.internet-service-change-details.t-provided-v4-lan-public-prefixes[].v4-lan-public-prefix', -'service-configuration-operation-input.internet-service-change-details.t-provided-v4-lan-public-prefixes[].v4-lan-public-prefix-length', -'service-configuration-operation-input.internet-service-change-details.t-provided-v4-lan-public-prefixes[].key', -'service-configuration-operation-input.internet-service-change-details.t-provided-v6-lan-public-prefixes[].request-index', -'service-configuration-operation-input.internet-service-change-details.t-provided-v6-lan-public-prefixes[].v6-lan-public-prefix', -'service-configuration-operation-input.internet-service-change-details.t-provided-v6-lan-public-prefixes[].v6-lan-public-prefix-length', -'service-configuration-operation-input.internet-service-change-details.t-provided-v6-lan-public-prefixes[].key' -]; - -a=[ - "service-configuration-operation-input.sdnc-request-header.svc-notification-url", - "service-configuration-operation-input.sdnc-request-header.svc-request-id", - "service-configuration-operation-input.sdnc-request-header.svc-action", - "service-configuration-operation-input.vpe-vpn-service.route-target", - "service-configuration-operation-input.vpe-vpn-service.e2e-vpn-key", - "service-configuration-operation-input.vpe-vpn-service.vpn-id", - "service-configuration-operation-input.vpe-vpn-service.vpn-vame", - "service-configuration-operation-input.vpe-vpn-service.spoke-routes.route-target", - "service-configuration-operation-input.vpe-vpn-service.spoke-routes.max-threshold", - "service-configuration-operation-input.vpe-vpn-service.spoke-routes.max-routes-limit", - "service-configuration-operation-input.vpe-vpn-service.v4-max-routes.max-routes-limit-warning", - "service-configuration-operation-input.vpe-vpn-service.v4-max-routes.max-routes-limit", - "service-configuration-operation-input.vpe-vpn-service.v6-max-routes.max-routes-limit-warning", - "service-configuration-operation-input.vpe-vpn-service.v6-max-routes.max-routes-limit", - "service-configuration-operation-input.vpe-vpn-service.multicast-parameters.vpn-multicast-planned-region[].regions", - "service-configuration-operation-input.vpe-vpn-service.multicast-parameters.vpn-multicast-planned-region[].key", - "service-configuration-operation-input.vpe-vpn-service.multicast-parameters.vpn-v4-multicast-enabled", - "service-configuration-operation-input.vpe-vpn-service.multicast-parameters.v4-multicast.max-routes-limit-warning", - "service-configuration-operation-input.vpe-vpn-service.multicast-parameters.v4-multicast.max-routes-limit", - "service-configuration-operation-input.vpe-vpn-service.multicast-parameters.v4-multicast.v4-data-mdt", - "service-configuration-operation-input.vpe-vpn-service.multicast-parameters.v4-multicast.v4-static-rp-triplet[].rp-address", - "service-configuration-operation-input.vpe-vpn-service.multicast-parameters.v4-multicast.v4-static-rp-triplet[].c-groups[].group-address-prefix-length", - "service-configuration-operation-input.vpe-vpn-service.multicast-parameters.v4-multicast.v4-static-rp-triplet[].c-groups[].c-group-address-prefix", - "service-configuration-operation-input.vpe-vpn-service.multicast-parameters.v4-multicast.v4-static-rp-triplet[].c-groups[].key", - "service-configuration-operation-input.vpe-vpn-service.multicast-parameters.v4-multicast.v4-static-rp-triplet[].key", - "service-configuration-operation-input.vpe-vpn-service.multicast-parameters.v4-multicast.v4-pim-sm-static-override", - "service-configuration-operation-input.vpe-vpn-service.multicast-parameters.v4-multicast.v4-pim-ssm-default-range", - "service-configuration-operation-input.vpe-vpn-service.multicast-parameters.v4-multicast.v4-pim-ssm-groups[].v4-pim-ssm-group-address", - "service-configuration-operation-input.vpe-vpn-service.multicast-parameters.v4-multicast.v4-pim-ssm-groups[].v4-pim-ssm-group-address-prefix-length", - "service-configuration-operation-input.vpe-vpn-service.multicast-parameters.v4-multicast.v4-pim-ssm-groups[].key", - "service-configuration-operation-input.vpe-vpn-service.multicast-parameters.v4-multicast.v4-default-mdt", - "service-configuration-operation-input.vpe-vpn-service.multicast-parameters.v4-multicast.v4-data-mdt-wildcard-mask", - "service-configuration-operation-input.vpe-vpn-service.multicast-parameters.vpn-v6-multicast-enabled", - "service-configuration-operation-input.vpe-vpn-service.multicast-parameters.v6-multicast.max-routes-limit-warning", - "service-configuration-operation-input.vpe-vpn-service.multicast-parameters.v6-multicast.max-routes-limit", - "service-configuration-operation-input.vpe-vpn-service.multicast-parameters.v6-multicast.v6-static-rp-triplet[].rp-address", - "service-configuration-operation-input.vpe-vpn-service.multicast-parameters.v6-multicast.v6-static-rp-triplet[].c-groups[].group-address-prefix-length", - "service-configuration-operation-input.vpe-vpn-service.multicast-parameters.v6-multicast.v6-static-rp-triplet[].c-groups[].c-group-address-prefix", - "service-configuration-operation-input.vpe-vpn-service.multicast-parameters.v6-multicast.v6-static-rp-triplet[].c-groups[].key", - "service-configuration-operation-input.vpe-vpn-service.multicast-parameters.v6-multicast.v6-static-rp-triplet[].key", - "service-configuration-operation-input.vpe-vpn-service.multicast-parameters.v6-multicast.v6-pim-sm-static-override", - "service-configuration-operation-input.vpe-vpn-service.multicast-parameters.v6-multicast.v6-pim-ssm-default-range", - "service-configuration-operation-input.vpe-vpn-service.multicast-parameters.v6-multicast.v6-pim-ssm-groups[].v6-pim-ssm-group-address", - "service-configuration-operation-input.vpe-vpn-service.multicast-parameters.v6-multicast.v6-pim-ssm-groups[].v6-pim-ssm-group-address-prefix-length", - "service-configuration-operation-input.vpe-vpn-service.multicast-parameters.v6-multicast.v6-pim-ssm-groups[].key", - "service-configuration-operation-input.vpe-vpn-service.customer-id", - "service-configuration-operation-input.vpe-vpn-service.vrf-details[].router-distinguisher", - "service-configuration-operation-input.vpe-vpn-service.vrf-details[].vpe-name", - "service-configuration-operation-input.vpe-vpn-service.vrf-details[].vrf-import-details[].vrf-import", - "service-configuration-operation-input.vpe-vpn-service.vrf-details[].vrf-import-details[].key", - "service-configuration-operation-input.vpe-vpn-service.vrf-details[].member", - "service-configuration-operation-input.vpe-vpn-service.vrf-details[].name", - "service-configuration-operation-input.vpe-vpn-service.vrf-details[].vrf-name", - "service-configuration-operation-input.vpe-vpn-service.vrf-details[].vrf-export-details[].vrf-export", - "service-configuration-operation-input.vpe-vpn-service.vrf-details[].vrf-export-details[].key", - "service-configuration-operation-input.vpe-vpn-service.vrf-details[].apply-group-template[].apply-group", - "service-configuration-operation-input.vpe-vpn-service.vrf-details[].apply-group-template[].key", - "service-configuration-operation-input.vpe-vpn-service.vrf-details[].key", - "service-configuration-operation-input.service-information.subscriber-name", - "service-configuration-operation-input.service-information.subscriber-global-id", - "service-configuration-operation-input.service-information.service-type", - "service-configuration-operation-input.service-information.service-instance-id", - "service-configuration-operation-input.request-information.notification-url", - "service-configuration-operation-input.request-information.order-number", - "service-configuration-operation-input.request-information.order-version", - "service-configuration-operation-input.request-information.request-action", - "service-configuration-operation-input.request-information.request-sub-action", - "service-configuration-operation-input.request-information.source", - "service-configuration-operation-input.request-information.request-id", - "service-configuration-operation-output.configuration-response-common.svc-request-id", - "service-configuration-operation-output.configuration-response-common.response-message", - "service-configuration-operation-output.configuration-response-common.ack-final-indicator", - "service-configuration-operation-output.configuration-response-common.response-code" -]; +var a=[]; var nObj={}; for(var i=0;i<a.length;i++){ dotToJson(a[i],'',nObj); } -var a = [ - "service-configuration-operation-input.sdnc-request-header.svc-notification-url:String", - "service-configuration-operation-input.sdnc-request-header.svc-request-id:String", - "service-configuration-operation-input.sdnc-request-header.svc-action:Enum:[Createupdatevpn]", - "service-configuration-operation-input.vpe-vpn-service.route-target:String", - "service-configuration-operation-input.vpe-vpn-service.e2e-vpn-key:String", - "service-configuration-operation-input.vpe-vpn-service.vpn-id:Integer", - "service-configuration-operation-input.vpe-vpn-service.vpn-vame:String", - "service-configuration-operation-input.vpe-vpn-service.spoke-routes.route-target:String", - "service-configuration-operation-input.vpe-vpn-service.spoke-routes.max-threshold:Short", - "service-configuration-operation-input.vpe-vpn-service.spoke-routes.max-routes-limit:BigInteger", - "service-configuration-operation-input.vpe-vpn-service.v4-max-routes.max-routes-limit-warning:Short", - "service-configuration-operation-input.vpe-vpn-service.v4-max-routes.max-routes-limit:BigInteger", - "service-configuration-operation-input.vpe-vpn-service.v6-max-routes.max-routes-limit-warning:Short", - "service-configuration-operation-input.vpe-vpn-service.v6-max-routes.max-routes-limit:BigInteger", - "service-configuration-operation-input.vpe-vpn-service.multicast-parameters.vpn-multicast-planned-region[].regions:Enum:[EMEA, US, AP, LA, Canada]", - "service-configuration-operation-input.vpe-vpn-service.multicast-parameters.vpn-multicast-planned-region[].key:Identifier", - "service-configuration-operation-input.vpe-vpn-service.multicast-parameters.vpn-v4-multicast-enabled:Enum:[Y, N]", - "service-configuration-operation-input.vpe-vpn-service.multicast-parameters.v4-multicast.max-routes-limit-warning:Short", - "service-configuration-operation-input.vpe-vpn-service.multicast-parameters.v4-multicast.max-routes-limit:BigInteger", - "service-configuration-operation-input.vpe-vpn-service.multicast-parameters.v4-multicast.v4-data-mdt:Ipv4Address", - "service-configuration-operation-input.vpe-vpn-service.multicast-parameters.v4-multicast.v4-static-rp-triplet[].rp-address:Ipv4Address", - "service-configuration-operation-input.vpe-vpn-service.multicast-parameters.v4-multicast.v4-static-rp-triplet[].c-groups[].group-address-prefix-length:Short", - "service-configuration-operation-input.vpe-vpn-service.multicast-parameters.v4-multicast.v4-static-rp-triplet[].c-groups[].c-group-address-prefix:Ipv4Address", - "service-configuration-operation-input.vpe-vpn-service.multicast-parameters.v4-multicast.v4-static-rp-triplet[].c-groups[].key:Identifier", - "service-configuration-operation-input.vpe-vpn-service.multicast-parameters.v4-multicast.v4-static-rp-triplet[].key:Identifier", - "service-configuration-operation-input.vpe-vpn-service.multicast-parameters.v4-multicast.v4-pim-sm-static-override:Enum:[Y, N]", - "service-configuration-operation-input.vpe-vpn-service.multicast-parameters.v4-multicast.v4-pim-ssm-default-range:Enum:[Y, N]", - "service-configuration-operation-input.vpe-vpn-service.multicast-parameters.v4-multicast.v4-pim-ssm-groups[].v4-pim-ssm-group-address:Ipv4Address", - "service-configuration-operation-input.vpe-vpn-service.multicast-parameters.v4-multicast.v4-pim-ssm-groups[].v4-pim-ssm-group-address-prefix-length:Short", - "service-configuration-operation-input.vpe-vpn-service.multicast-parameters.v4-multicast.v4-pim-ssm-groups[].key:Identifier", - "service-configuration-operation-input.vpe-vpn-service.multicast-parameters.v4-multicast.v4-default-mdt:Ipv4Address", - "service-configuration-operation-input.vpe-vpn-service.multicast-parameters.v4-multicast.v4-data-mdt-wildcard-mask:Ipv4Address", - "service-configuration-operation-input.vpe-vpn-service.multicast-parameters.vpn-v6-multicast-enabled:Enum:[Y, N]", - "service-configuration-operation-input.vpe-vpn-service.multicast-parameters.v6-multicast.max-routes-limit-warning:Short", - "service-configuration-operation-input.vpe-vpn-service.multicast-parameters.v6-multicast.max-routes-limit:BigInteger", - "service-configuration-operation-input.vpe-vpn-service.multicast-parameters.v6-multicast.v6-static-rp-triplet[].rp-address:Ipv6Address", - "service-configuration-operation-input.vpe-vpn-service.multicast-parameters.v6-multicast.v6-static-rp-triplet[].c-groups[].group-address-prefix-length:Short", - "service-configuration-operation-input.vpe-vpn-service.multicast-parameters.v6-multicast.v6-static-rp-triplet[].c-groups[].c-group-address-prefix:Ipv6Address", - "service-configuration-operation-input.vpe-vpn-service.multicast-parameters.v6-multicast.v6-static-rp-triplet[].c-groups[].key:Identifier", - "service-configuration-operation-input.vpe-vpn-service.multicast-parameters.v6-multicast.v6-static-rp-triplet[].key:Identifier", - "service-configuration-operation-input.vpe-vpn-service.multicast-parameters.v6-multicast.v6-pim-sm-static-override:Enum:[Y, N]", - "service-configuration-operation-input.vpe-vpn-service.multicast-parameters.v6-multicast.v6-pim-ssm-default-range:Enum:[Y, N]", - "service-configuration-operation-input.vpe-vpn-service.multicast-parameters.v6-multicast.v6-pim-ssm-groups[].v6-pim-ssm-group-address:Ipv6Address", - "service-configuration-operation-input.vpe-vpn-service.multicast-parameters.v6-multicast.v6-pim-ssm-groups[].v6-pim-ssm-group-address-prefix-length:Short", - "service-configuration-operation-input.vpe-vpn-service.multicast-parameters.v6-multicast.v6-pim-ssm-groups[].key:Identifier", - "service-configuration-operation-input.vpe-vpn-service.customer-id:String", - "service-configuration-operation-input.vpe-vpn-service.vrf-details[].router-distinguisher:String", - "service-configuration-operation-input.vpe-vpn-service.vrf-details[].vpe-name:String", - "service-configuration-operation-input.vpe-vpn-service.vrf-details[].vrf-import-details[].vrf-import:String", - "service-configuration-operation-input.vpe-vpn-service.vrf-details[].vrf-import-details[].key:Identifier", - "service-configuration-operation-input.vpe-vpn-service.vrf-details[].member:String", - "service-configuration-operation-input.vpe-vpn-service.vrf-details[].name:String", - "service-configuration-operation-input.vpe-vpn-service.vrf-details[].vrf-name:String", - "service-configuration-operation-input.vpe-vpn-service.vrf-details[].vrf-export-details[].vrf-export:String", - "service-configuration-operation-input.vpe-vpn-service.vrf-details[].vrf-export-details[].key:Identifier", - "service-configuration-operation-input.vpe-vpn-service.vrf-details[].apply-group-template[].apply-group:String", - "service-configuration-operation-input.vpe-vpn-service.vrf-details[].apply-group-template[].key:Identifier", - "service-configuration-operation-input.vpe-vpn-service.vrf-details[].key:Identifier", - "service-configuration-operation-input.service-information.subscriber-name:String", - "service-configuration-operation-input.service-information.subscriber-global-id:String", - "service-configuration-operation-input.service-information.service-type:Enum:[NBIPVPN]", - "service-configuration-operation-input.service-information.service-instance-id:String", - "service-configuration-operation-input.request-information.notification-url:String", - "service-configuration-operation-input.request-information.order-number:String", - "service-configuration-operation-input.request-information.order-version:String", - "service-configuration-operation-input.request-information.request-action:Enum:[Layer3ServiceVPNRequest]", - "service-configuration-operation-input.request-information.request-sub-action:Enum:[ACTIVATE, COMPLETE, CANCEL, SUPP]", - "service-configuration-operation-input.request-information.source:String", - "service-configuration-operation-input.request-information.request-id:String" -] + var nObj={}; for(var i=0;i<a.length;i++){ var key =a[i].substring(0,a[i].indexOf(':')); @@ -370,8 +115,5 @@ for(var i=0;i<a.length;i++){ if(value == undefined) value =""; dotToJson(key,value,nObj); } -//nObj={};, -//var a1='service-configuration-operation-input[].vr-lan.vr-lan-interface[].v4-firewall-packet-filters[].v4-firewall-prefix-length';, - //dotToJson(a1,'',nObj); console.log(JSON.stringify(nObj,null,4)); //console.log (stringToObj('abc.ebg.h',"",{})); diff --git a/dgbuilder/tools/setClasspath b/dgbuilder/tools/setClasspath index 082d31a2..898ef350 100755 --- a/dgbuilder/tools/setClasspath +++ b/dgbuilder/tools/setClasspath @@ -1,8 +1,11 @@ toolsDir=${PROJECT_HOME}/tools +svcLogicLib=${PROJECT_HOME}/svclogic/lib + export CLASSPATH= -export CLASSPATH=${toolsDir}/guava-14.0.1.jar:$CLASSPATH -export CLASSPATH=${toolsDir}/javax.json-api-1.0.jar:$CLASSPATH -export CLASSPATH=${toolsDir}/slf4j-api-1.7.2.jar:$CLASSPATH +for i in `find ${svcLogicLib} -name "*.jar" -print` +do +export CLASSPATH=$CLASSPATH:$i +done for i in `find ${toolsDir}/tmpws/jars -name "*.jar" -print` do diff --git a/dgbuilder/tools/slf4j-api-1.7.2.jar b/dgbuilder/tools/slf4j-api-1.7.2.jar Binary files differdeleted file mode 100644 index 1a887083..00000000 --- a/dgbuilder/tools/slf4j-api-1.7.2.jar +++ /dev/null |