--- /dev/null
+*** ietf-lisp-address-types.yang 2016-05-29 00:36:20.843215496 +0530
+--- ietf-lisp-address-types-updated.yang 2016-05-29 00:37:35.135213297 +0530
+***************
+*** 449,455 ****
+ reference
+ "http://tools.ietf.org/html/draft-ietf-lisp-lcaf-10
+ #section-4.5";
+! leaf latitude {
+ type bits {
+ bit N {
+ description
+--- 449,455 ----
+ reference
+ "http://tools.ietf.org/html/draft-ietf-lisp-lcaf-10
+ #section-4.5";
+! /*leaf latitude {
+ type bits {
+ bit N {
+ description
+***************
+*** 458,464 ****
+ }
+ description
+ "Bit that selects between North and South latitude.";
+! }
+ leaf latitude-degrees {
+ type uint8 {
+ range "0 .. 90";
+--- 458,464 ----
+ }
+ description
+ "Bit that selects between North and South latitude.";
+! }*/
+ leaf latitude-degrees {
+ type uint8 {
+ range "0 .. 90";
+***************
+*** 480,486 ****
+ description
+ "Seconds of latitude.";
+ }
+! leaf longitude {
+ type bits {
+ bit E {
+ description
+--- 480,486 ----
+ description
+ "Seconds of latitude.";
+ }
+! /*leaf longitude {
+ type bits {
+ bit E {
+ description
+***************
+*** 489,495 ****
+ }
+ description
+ "Bit that selects between East and West longitude.";
+! }
+ leaf longitude-degrees {
+ type uint16 {
+ range "0 .. 180";
+--- 489,495 ----
+ }
+ description
+ "Bit that selects between East and West longitude.";
+! }*/
+ leaf longitude-degrees {
+ type uint16 {
+ range "0 .. 180";
+***************
+*** 588,594 ****
+ description
+ "AFI address.";
+ }
+! leaf lrs-bits {
+ type bits{
+ bit lookup {
+ description
+--- 588,594 ----
+ description
+ "AFI address.";
+ }
+! /*leaf lrs-bits {
+ type bits{
+ bit lookup {
+ description
+***************
+*** 605,611 ****
+ }
+ description
+ "Flag bits per hop.";
+! }
+ }
+ }
+ container source-dest-key {
+--- 605,611 ----
+ }
+ description
+ "Flag bits per hop.";
+! }*/
+ }
+ }
+ container source-dest-key {
--- /dev/null
+#!/bin/bash
+echo "Downloading yang dependencies..."
+
+DIRECTORY="odl-lispflowmapping-yang-files"
+
+# odl-lispflowmapping-yang-files will contain all the yang files
+# odl-lispflowmapping-yang-files/LispFlowMappingYANGBindings will
+# contain all the binding files generated by pyangbind.
+mkdir -p ${WORKSPACE}/$DIRECTORY
+
+GITWEB_LISP="https://git.opendaylight.org/gerrit/gitweb?p=lispflowmapping.git;a=blob_plain"
+GITWEB_MDSAL="https://git.opendaylight.org/gerrit/gitweb?p=mdsal.git;a=blob_plain"
+GITWEB_CONTROLLER="https://git.opendaylight.org/gerrit/gitweb?p=controller.git;a=blob_plain"
+
+# Download yang-files in the VM on fly using curl before generating
+# binding files.
+curl "$GITWEB_LISP;f=mappingservice/lisp-proto/src/main/yang/ietf-lisp-address-types.yang" -o ${WORKSPACE}/$DIRECTORY/ietf-lisp-address-types.yang
+curl "$GITWEB_LISP;f=mappingservice/lisp-proto/src/main/yang/odl-lisp-proto.yang" -o ${WORKSPACE}/$DIRECTORY/odl-lisp-proto.yang
+curl "$GITWEB_LISP;f=mappingservice/lisp-proto/src/main/yang/odl-inet-binary-types.yang" -o ${WORKSPACE}/$DIRECTORY/odl-inet-binary-types.yang
+curl "$GITWEB_LISP;f=mappingservice/api/src/main/yang/odl-mappingservice.yang" -o ${WORKSPACE}/$DIRECTORY/odl-mappingservice.yang
+curl "$GITWEB_LISP;f=mappingservice/lisp-proto/src/main/yang/odl-lisp-address-types.yang" -o ${WORKSPACE}/$DIRECTORY/odl-lisp-address-types.yang
+curl "$GITWEB_MDSAL;f=model/ietf/ietf-yang-types-20130715/src/main/yang/ietf-yang-types@2013-07-15.yang" -o ${WORKSPACE}/$DIRECTORY/ietf-yang-types.yang
+curl "$GITWEB_MDSAL;f=model/ietf/ietf-inet-types-2013-07-15/src/main/yang/ietf-inet-types@2013-07-15.yang" -o ${WORKSPACE}/$DIRECTORY/ietf-inet-types.yang
+curl "$GITWEB_MDSAL;f=model/yang-ext/src/main/yang/yang-ext.yang" -o ${WORKSPACE}/$DIRECTORY/yang-ext.yang
+curl "$GITWEB_CONTROLLER;f=opendaylight/config/config-api/src/main/yang/config.yang" -o ${WORKSPACE}/$DIRECTORY/config.yang
+
+# Copy bits patch to yang file directory
+cp bits.patch ${WORKSPACE}/$DIRECTORY
+
+# Go to odl-lispflowmapping-yang-files directory
+cd ${WORKSPACE}/$DIRECTORY
+
+# Currently bits are not supported in pyangbind plugin so
+# We need to apply patch to generate pyangbind bindings
+# Successfully.
+patch -i bits.patch && echo 'Patch applied successfully!'
+
+# Generate binding files using pyangbind
+PYBINDPLUGIN=`/usr/bin/env python -c 'import pyangbind; import os; print "%s/plugin" % os.path.dirname(pyangbind.__file__)'`
+pyang --plugindir $PYBINDPLUGIN -f pybind --build-rpcs --split-class-dir ${WORKSPACE}/$DIRECTORY/LISPFlowMappingYANGBindings ./odl-mappingservice.yang
+
+# Go back the main direcory
+cd ../../
+
+echo "Yang Dependencies and bindings downloaded successfully in ${WORKSPACE}/$DIRECTORY"