From b2175581c55981e2eb039f3543baffe76d13394d Mon Sep 17 00:00:00 2001 From: Dan Timoney Date: Fri, 31 Mar 2017 17:47:19 -0400 Subject: [SDNC-5] Rebase sdnc-oam Port to OpenDaylight Boron and sync updates since 16.10 Change-Id: I9f6febe0bd3d50c3d27c775e5a41806ee3d2e6cb Signed-off-by: Dan Timoney Former-commit-id: c7fb7db31a50d5f0005251d41f497fbd4fb2ae4b --- dgbuilder/tools/formatXml.py | 11 ++ dgbuilder/tools/format_xml.sh | 3 +- dgbuilder/tools/getRpcsClassFromYang.sh | 2 +- dgbuilder/tools/guava-14.0.1.jar | Bin 2189117 -> 0 bytes dgbuilder/tools/javax.json-api-1.0.jar | Bin 19754 -> 0 bytes dgbuilder/tools/jsonTool.js | 262 +------------------------------- dgbuilder/tools/setClasspath | 9 +- dgbuilder/tools/slf4j-api-1.7.2.jar | Bin 26083 -> 0 bytes 8 files changed, 21 insertions(+), 266 deletions(-) create mode 100644 dgbuilder/tools/formatXml.py delete mode 100644 dgbuilder/tools/guava-14.0.1.jar delete mode 100644 dgbuilder/tools/javax.json-api-1.0.jar delete mode 100644 dgbuilder/tools/slf4j-api-1.7.2.jar (limited to 'dgbuilder/tools') 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 deleted file mode 100644 index 3a3d9258..00000000 Binary files a/dgbuilder/tools/guava-14.0.1.jar and /dev/null differ diff --git a/dgbuilder/tools/javax.json-api-1.0.jar b/dgbuilder/tools/javax.json-api-1.0.jar deleted file mode 100644 index d276c793..00000000 Binary files a/dgbuilder/tools/javax.json-api-1.0.jar and /dev/null differ 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