diff --git a/utils/yangutils/datamodel/src/main/java/org/onosproject/yangutils/datamodel/ResolvableType.java b/utils/yangutils/datamodel/src/main/java/org/onosproject/yangutils/datamodel/ResolvableType.java
index 80ee4a0..ad00cae 100644
--- a/utils/yangutils/datamodel/src/main/java/org/onosproject/yangutils/datamodel/ResolvableType.java
+++ b/utils/yangutils/datamodel/src/main/java/org/onosproject/yangutils/datamodel/ResolvableType.java
@@ -39,5 +39,15 @@
     /**
      * Identifies the leafref.
      */
-    YANG_LEAFREF
+    YANG_LEAFREF,
+
+    /**
+     * Identifies the base.
+     */
+    YANG_BASE,
+
+    /**
+     * Identifies the identityref.
+     */
+    YANG_IDENTITYREF
 }
diff --git a/utils/yangutils/datamodel/src/main/java/org/onosproject/yangutils/datamodel/YangBase.java b/utils/yangutils/datamodel/src/main/java/org/onosproject/yangutils/datamodel/YangBase.java
new file mode 100644
index 0000000..40c2293
--- /dev/null
+++ b/utils/yangutils/datamodel/src/main/java/org/onosproject/yangutils/datamodel/YangBase.java
@@ -0,0 +1,114 @@
+/*
+ * Copyright 2016-present Open Networking Laboratory
+ *
+ * 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.
+ */
+package org.onosproject.yangutils.datamodel;
+
+import org.onosproject.yangutils.datamodel.exceptions.DataModelException;
+import org.onosproject.yangutils.datamodel.utils.ResolvableStatus;
+
+import java.io.Serializable;
+
+/**
+ * Reference RFC 6020.
+ *
+ * Represents data model node to maintain information defined in YANG base.
+ *  The "base" statement, which is optional, takes as an argument a
+ * string that is the name of an existing identity, from which the new
+ * identity is derived.  If no "base" statement is present, the identity
+ * is defined from scratch.
+ *
+ * If a prefix is present on the base name, it refers to an identity
+ * defined in the module that was imported with that prefix, or the
+ * local module if the prefix matches the local module's prefix.
+ * Otherwise, an identity with the matching name MUST be defined in the
+ * current module or an included submodule.
+ */
+
+/**
+ * Represents data model node to maintain information defined in YANG base.
+ */
+ public class YangBase implements Resolvable, Serializable {
+
+    private static final long serialVersionUID = 806201693L;
+
+    // YANG node identifier.
+    private YangNodeIdentifier baseIdentifier;
+
+    // Referred identity parent information.
+    private YangIdentity referredIdentity;
+
+     /**
+     * Status of resolution. If completely resolved enum value is "RESOLVED",
+     * if not enum value is "UNRESOLVED", in case reference of grouping/typedef/base/identityref
+     * is added to uses/type/base/identityref but it's not resolved value of enum should be
+     * "INTRA_FILE_RESOLVED".
+     */
+    private ResolvableStatus resolvableStatus;
+
+    // Creates a base type of node.
+    public YangBase() {
+        resolvableStatus = ResolvableStatus.UNRESOLVED;
+    }
+
+    /**
+     * Returns the YANG node identifier.
+     *
+     * @return the YANG node identifier
+     */
+    public YangNodeIdentifier getBaseIdentifier() {
+        return baseIdentifier;
+    }
+
+    /**
+     * Sets the YANG node identifier.
+     *
+     * @param baseIdentifier the YANG node identifier to set
+     */
+    public void setBaseIdentifier(YangNodeIdentifier baseIdentifier) {
+        this.baseIdentifier = baseIdentifier;
+    }
+
+    /**
+     * Returns the parent identity node.
+     *
+     * @return the parent identity node
+     */
+    public YangIdentity getReferredIdentity() {
+        return referredIdentity;
+    }
+
+    /**
+     * Sets the parent identity node.
+     *
+     * @param referredIdentity the parent identity node to set
+     */
+    public void setReferredIdentity(YangIdentity referredIdentity) {
+        this.referredIdentity = referredIdentity;
+    }
+
+    @Override
+    public ResolvableStatus getResolvableStatus() {
+        return resolvableStatus;
+    }
+
+    @Override
+    public void setResolvableStatus(ResolvableStatus resolvableStatus) {
+        this.resolvableStatus = resolvableStatus;
+    }
+
+    @Override
+    public void resolve() throws DataModelException {
+    }
+}
diff --git a/utils/yangutils/datamodel/src/main/java/org/onosproject/yangutils/datamodel/YangDerivedInfo.java b/utils/yangutils/datamodel/src/main/java/org/onosproject/yangutils/datamodel/YangDerivedInfo.java
index 640aa64..1661d96 100644
--- a/utils/yangutils/datamodel/src/main/java/org/onosproject/yangutils/datamodel/YangDerivedInfo.java
+++ b/utils/yangutils/datamodel/src/main/java/org/onosproject/yangutils/datamodel/YangDerivedInfo.java
@@ -334,7 +334,7 @@
                     return RESOLVED;
                 }
             }
-        } else if (baseType.getDataType() == LEAFREF) {
+        } else if ((baseType.getDataType() == LEAFREF) || (baseType.getDataType() == IDENTITYREF)) {
             setEffectiveBuiltInType(baseType.getDataType());
             return RESOLVED;
         } else {
diff --git a/utils/yangutils/datamodel/src/main/java/org/onosproject/yangutils/datamodel/YangIdentity.java b/utils/yangutils/datamodel/src/main/java/org/onosproject/yangutils/datamodel/YangIdentity.java
new file mode 100644
index 0000000..5e57012
--- /dev/null
+++ b/utils/yangutils/datamodel/src/main/java/org/onosproject/yangutils/datamodel/YangIdentity.java
@@ -0,0 +1,152 @@
+/*
+ * Copyright 2016-present Open Networking Laboratory
+ *
+ * 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.
+ */
+package org.onosproject.yangutils.datamodel;
+
+import org.onosproject.yangutils.datamodel.exceptions.DataModelException;
+import org.onosproject.yangutils.datamodel.utils.Parsable;
+import org.onosproject.yangutils.datamodel.utils.YangConstructType;
+
+import java.io.Serializable;
+
+/*-
+ * Reference RFC 6020.
+ *
+ *  The "identity" statement is used to define a new globally unique,
+ *  abstract, and untyped identity.  Its only purpose is to denote its
+ *  name, semantics, and existence.  An identity can either be defined
+ *  from scratch or derived from a base identity.  The identity's
+ *  argument is an identifier that is the name of the identity.  It is
+ *  followed by a block of substatements that holds detailed identity
+ *  information.
+ *
+ *  The identity's Substatements
+ *
+ *                +--------------+---------+-------------+-----------------------+
+ *                | substatement | section | cardinality |  data model mapping   |
+ *                +--------------+---------+-------------+-----------------------+
+ *                | base         | 7.16.2  | 0..1        |  -YangNodeIdentifier  |
+ *                | description  | 7.19.3  | 0..1        |  -string              |
+ *                | reference    | 7.19.4  | 0..1        |  -string              |
+ *                | status       | 7.19.2  | 0..1        |  -YangStatus          |
+ *                +--------------+---------+-------------+-----------------------+
+ */
+
+/**
+ * Represents data model node to maintain information defined in YANG identity.
+ */
+public class YangIdentity extends YangNode implements YangCommonInfo, Parsable, Serializable {
+
+    private static final long serialVersionUID = 806201691L;
+
+    //Name of the identity.
+    private String name;
+
+    //Base node of identity.
+    private YangBase baseNode;
+
+    //Status of YANG identity.
+    private YangStatusType status;
+
+    //Description of YANG identity.
+    private String description;
+
+    //YANG reference of the identity.
+    private String reference;
+
+    //Creates a identity type of node.
+    public YangIdentity() {
+        super(YangNodeType.IDENTITY_NODE);
+    }
+
+    /**
+     * Returns the name of identity.
+     *
+     * @return the identity name
+     */
+    public String getName() {
+        return name;
+    }
+
+    /**
+     * Sets the name of identity.
+     *
+     * @param name the identity name to set
+     */
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    @Override
+    public YangStatusType getStatus() {
+        return status;
+    }
+
+    @Override
+    public void setStatus(YangStatusType status) {
+        this.status = status;
+    }
+
+    @Override
+    public String getDescription() {
+        return description;
+    }
+
+    @Override
+    public void setDescription(String description) {
+        this.description = description;
+    }
+
+    @Override
+    public String getReference() {
+        return reference;
+    }
+
+    @Override
+    public void setReference(String reference) {
+        this.reference = reference;
+    }
+
+    @Override
+    public YangConstructType getYangConstructType() {
+        return YangConstructType.IDENTITY_DATA;
+    }
+
+    @Override
+    public void validateDataOnEntry() throws DataModelException {
+    }
+
+    @Override
+    public void validateDataOnExit() throws DataModelException {
+    }
+
+    /**
+     * Returns base node of identity.
+     *
+     * @return the base node of identity
+     */
+    public YangBase getBaseNode() {
+        return baseNode;
+    }
+
+    /**
+     * Sets the base node.
+     *
+     * @param baseNode the base node to set
+     */
+    public void setBaseNode(YangBase baseNode) {
+        this.baseNode = baseNode;
+    }
+}
diff --git a/utils/yangutils/datamodel/src/main/java/org/onosproject/yangutils/datamodel/YangIdentityRef.java b/utils/yangutils/datamodel/src/main/java/org/onosproject/yangutils/datamodel/YangIdentityRef.java
new file mode 100644
index 0000000..d03fcf4
--- /dev/null
+++ b/utils/yangutils/datamodel/src/main/java/org/onosproject/yangutils/datamodel/YangIdentityRef.java
@@ -0,0 +1,196 @@
+/*
+ * Copyright 2016-present Open Networking Laboratory
+ *
+ * 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.
+ */
+package org.onosproject.yangutils.datamodel;
+
+import org.onosproject.yangutils.datamodel.exceptions.DataModelException;
+import org.onosproject.yangutils.datamodel.utils.Parsable;
+import org.onosproject.yangutils.datamodel.utils.ResolvableStatus;
+import org.onosproject.yangutils.datamodel.utils.YangConstructType;
+
+import java.io.Serializable;
+
+/*-
+ * Reference RFC 6020.
+ *
+ * The identityref type is used to reference an existing identity.
+ *
+ *  The identityref's base Statement :
+ *       The "base" statement, which is a substatement to the "type"
+ *  statement, MUST be present if the type is "identityref".  The
+ *  argument is the name of an identity, as defined by an "identity"
+ *  statement.  If a prefix is present on the identity name, it refers to
+ *  an identity defined in the module that was imported with that prefix.
+ *  Otherwise, an identity with the matching name MUST be defined in the
+ *  current module or an included submodule.
+ *  Valid values for an identityref are any identities derived from the
+ *  identityref's base identity.  On a particular server, the valid
+ *  values are further restricted to the set of identities defined in the
+ *  modules supported by the server.
+ */
+
+/**
+ * Represents data model node to maintain information defined in YANG identityref.
+ */
+public class YangIdentityRef extends YangNode implements Parsable, Resolvable, Serializable {
+
+    private static final long serialVersionUID = 806201692L;
+
+    // Get referred identity parent information.
+    private YangIdentity referredIdentity;
+
+    // YANG node identifier.
+    private YangNodeIdentifier baseIdentity;
+
+    /**
+     * Status of resolution. If completely resolved enum value is "RESOLVED",
+     * if not enum value is "UNRESOLVED", in case reference of grouping/typedef/identityref/base
+     * is added to uses/type/identityref/base but it's not resolved value of enum should be
+     * "INTRA_FILE_RESOLVED".
+     */
+    private ResolvableStatus resolvableStatus;
+
+    // Creates a specific identityref of node.
+    public YangIdentityRef() {
+        super(YangNodeType.IDENTITYREF_NODE);
+        baseIdentity = new YangNodeIdentifier();
+        resolvableStatus = ResolvableStatus.UNRESOLVED;
+    }
+
+    @Override
+    public ResolvableStatus getResolvableStatus() {
+        return resolvableStatus;
+    }
+
+    @Override
+    public void setResolvableStatus(ResolvableStatus resolvableStatus) {
+        this.resolvableStatus = resolvableStatus;
+    }
+
+    @Override
+    public void resolve() throws DataModelException {
+
+        // Check if the derived info is present.
+        YangIdentity identity = getReferredIdentity();
+
+        if (identity == null) {
+            throw new DataModelException("Linker Error: Identity information is missing.");
+        }
+
+        while (identity.getBaseNode() != null) {
+            if (identity.getBaseNode().getResolvableStatus() != ResolvableStatus.RESOLVED) {
+                setResolvableStatus(ResolvableStatus.INTRA_FILE_RESOLVED);
+                return;
+            }
+            identity = identity.getBaseNode().getReferredIdentity();
+        }
+    }
+
+    /**
+     * Returns the YANG base node identifier.
+     *
+     * @return the YANG base node identifier
+     */
+    public YangNodeIdentifier getBaseIdentity() {
+        return baseIdentity;
+    }
+
+    /**
+     * Sets the YANG node identifier.
+     *
+     * @param baseIdentity the YANG node identifier to set
+     */
+    public void setBaseIdentity(YangNodeIdentifier baseIdentity) {
+        this.baseIdentity = baseIdentity;
+    }
+
+    /**
+     * Returns the name of identity.
+     *
+     * @return the identity name
+     */
+    @Override
+    public String getName() {
+        return baseIdentity.getName();
+    }
+
+    /**
+     * Sets the name of identity.
+     *
+     * @param name the identity name to set
+     */
+    @Override
+    public void setName(String name) {
+        baseIdentity.setName(name);
+    }
+
+    /**
+     * Sets node identifier.
+     *
+     * @param nodeIdentifier the node identifier
+     */
+    public void setNodeIdentifier(YangNodeIdentifier nodeIdentifier) {
+        this.baseIdentity = nodeIdentifier;
+    }
+
+    /**
+     * Returns prefix associated with base.
+     *
+     * @return prefix associated with base
+     */
+    public String getPrefix() {
+        return baseIdentity.getPrefix();
+    }
+
+    /**
+     * Sets prefix associated with base.
+     *
+     * @param prefix prefix associated with base
+     */
+    public void setPrefix(String prefix) {
+        baseIdentity.setPrefix(prefix);
+    }
+
+    @Override
+    public YangConstructType getYangConstructType() {
+        return YangConstructType.IDENTITYREF_DATA;
+    }
+
+    @Override
+    public void validateDataOnEntry() throws DataModelException {
+    }
+
+    @Override
+    public void validateDataOnExit() throws DataModelException {
+    }
+
+    /**
+     * Returns the parent identity node.
+     *
+     * @return the parent identity node
+     */
+    public YangIdentity getReferredIdentity() {
+        return referredIdentity;
+    }
+
+    /**
+     * Sets the parent identity node.
+     *
+     * @param referredIdentity the parent identity node to set
+     */
+    public void setReferredIdentity(YangIdentity referredIdentity) {
+        this.referredIdentity = referredIdentity;
+    }
+}
diff --git a/utils/yangutils/datamodel/src/main/java/org/onosproject/yangutils/datamodel/YangModule.java b/utils/yangutils/datamodel/src/main/java/org/onosproject/yangutils/datamodel/YangModule.java
index ec25d65..6e515ad 100644
--- a/utils/yangutils/datamodel/src/main/java/org/onosproject/yangutils/datamodel/YangModule.java
+++ b/utils/yangutils/datamodel/src/main/java/org/onosproject/yangutils/datamodel/YangModule.java
@@ -216,6 +216,17 @@
     private List<YangResolutionInfo> leafrefResolutionList;
 
     /**
+     * base resolution list.
+     */
+    private List<YangResolutionInfo> baseResolutionList;
+
+    /**
+     * identityref resolution list.
+     */
+    private List<YangResolutionInfo> identityrefResolutionList;
+
+
+    /**
      * Creates a YANG node of module type.
      */
     public YangModule() {
@@ -225,6 +236,8 @@
         usesResolutionList = new LinkedList<>();
         ifFeatureResolutionList = new LinkedList<>();
         leafrefResolutionList = new LinkedList<>();
+        baseResolutionList = new LinkedList<>();
+        identityrefResolutionList = new LinkedList<>();
         importList = new LinkedList<YangImport>();
         includeList = new LinkedList<YangInclude>();
         listOfLeaf = new LinkedList<YangLeaf>();
@@ -597,8 +610,12 @@
             return usesResolutionList;
         } else if (type == ResolvableType.YANG_IF_FEATURE) {
             return ifFeatureResolutionList;
-        } else {
+        } else if (type == ResolvableType.YANG_LEAFREF) {
             return leafrefResolutionList;
+        } else if (type == ResolvableType.YANG_BASE) {
+            return baseResolutionList;
+        } else {
+            return identityrefResolutionList;
         }
     }
 
@@ -611,8 +628,12 @@
             usesResolutionList.add(resolutionInfo);
         } else if (type == ResolvableType.YANG_IF_FEATURE) {
             ifFeatureResolutionList.add(resolutionInfo);
-        } else {
+        } else if (type == ResolvableType.YANG_LEAFREF) {
             leafrefResolutionList.add(resolutionInfo);
+        } else if (type == ResolvableType.YANG_BASE) {
+            baseResolutionList.add(resolutionInfo);
+        } else if (type == ResolvableType.YANG_IDENTITYREF) {
+            identityrefResolutionList.add(resolutionInfo);
         }
     }
 
@@ -627,6 +648,10 @@
             ifFeatureResolutionList.add((YangResolutionInfo) resolutionList);
         } else if (type == ResolvableType.YANG_LEAFREF) {
             leafrefResolutionList = resolutionList;
+        } else if (type == ResolvableType.YANG_BASE) {
+            baseResolutionList = resolutionList;
+        } else if (type == ResolvableType.YANG_IDENTITYREF) {
+            identityrefResolutionList = resolutionList;
         }
 
     }
@@ -650,11 +675,8 @@
         while (includeInfoIterator.hasNext()) {
             YangInclude yangInclude = includeInfoIterator.next();
             YangSubModule subModule = null;
-            try {
-                subModule = yangInclude.addReferenceToInclude(yangNodeSet);
-            } catch (DataModelException e) {
-                throw e;
-            }
+            subModule = yangInclude.addReferenceToInclude(yangNodeSet);
+
             // Check if the referred sub-modules parent is self
             if (!(subModule.getBelongsTo().getModuleNode() == this)) {
                 yangInclude.reportIncludeError();
diff --git a/utils/yangutils/datamodel/src/main/java/org/onosproject/yangutils/datamodel/YangNodeType.java b/utils/yangutils/datamodel/src/main/java/org/onosproject/yangutils/datamodel/YangNodeType.java
index 35fe918..c6108c7 100644
--- a/utils/yangutils/datamodel/src/main/java/org/onosproject/yangutils/datamodel/YangNodeType.java
+++ b/utils/yangutils/datamodel/src/main/java/org/onosproject/yangutils/datamodel/YangNodeType.java
@@ -102,5 +102,15 @@
     /**
      * Node contains "YANG's list" information.
      */
-    LIST_NODE
+    LIST_NODE,
+
+    /**
+     * Identity node.
+     */
+    IDENTITY_NODE,
+
+    /**
+     * Identityref node.
+     */
+    IDENTITYREF_NODE
 }
diff --git a/utils/yangutils/datamodel/src/main/java/org/onosproject/yangutils/datamodel/YangSubModule.java b/utils/yangutils/datamodel/src/main/java/org/onosproject/yangutils/datamodel/YangSubModule.java
index 5a5d52f..498f5e7 100644
--- a/utils/yangutils/datamodel/src/main/java/org/onosproject/yangutils/datamodel/YangSubModule.java
+++ b/utils/yangutils/datamodel/src/main/java/org/onosproject/yangutils/datamodel/YangSubModule.java
@@ -214,6 +214,16 @@
     private List<YangResolutionInfo> leafrefResolutionList;
 
     /**
+     * base resolution list.
+     */
+    private List<YangResolutionInfo> baseResolutionList;
+
+    /**
+     * identityref resolution list.
+     */
+    private List<YangResolutionInfo> identityrefResolutionList;
+
+    /**
      * Creates a sub module node.
      */
     public YangSubModule() {
@@ -222,6 +232,8 @@
         usesResolutionList = new LinkedList<>();
         ifFeatureResolutionList = new LinkedList<>();
         leafrefResolutionList = new LinkedList<>();
+        baseResolutionList = new LinkedList<>();
+        identityrefResolutionList = new LinkedList<>();
         importList = new LinkedList<YangImport>();
         includeList = new LinkedList<YangInclude>();
         listOfLeaf = new LinkedList<YangLeaf>();
@@ -559,8 +571,12 @@
             return usesResolutionList;
         } else if (type == ResolvableType.YANG_IF_FEATURE) {
             return ifFeatureResolutionList;
-        } else {
+        } else if (type == ResolvableType.YANG_LEAFREF) {
             return leafrefResolutionList;
+        } else if (type == ResolvableType.YANG_BASE) {
+            return baseResolutionList;
+        } else {
+            return identityrefResolutionList;
         }
     }
 
@@ -573,8 +589,12 @@
             usesResolutionList.add(resolutionInfo);
         } else if (type == ResolvableType.YANG_IF_FEATURE) {
             ifFeatureResolutionList.add(resolutionInfo);
-        } else {
+        } else if (type == ResolvableType.YANG_LEAFREF) {
             leafrefResolutionList.add(resolutionInfo);
+        } else if (type == ResolvableType.YANG_BASE) {
+            baseResolutionList.add(resolutionInfo);
+        } else if (type == ResolvableType.YANG_IDENTITYREF) {
+            identityrefResolutionList.add(resolutionInfo);
         }
     }
 
@@ -589,6 +609,10 @@
             ifFeatureResolutionList.add((YangResolutionInfo) resolutionList);
         } else if (type == ResolvableType.YANG_LEAFREF) {
             leafrefResolutionList = resolutionList;
+        } else if (type == ResolvableType.YANG_BASE) {
+            baseResolutionList = resolutionList;
+        } else if (type == ResolvableType.YANG_IDENTITYREF) {
+            identityrefResolutionList = resolutionList;
         }
 
     }
diff --git a/utils/yangutils/datamodel/src/main/java/org/onosproject/yangutils/datamodel/utils/DataModelUtils.java b/utils/yangutils/datamodel/src/main/java/org/onosproject/yangutils/datamodel/utils/DataModelUtils.java
index 3007ffa..489ac5c 100644
--- a/utils/yangutils/datamodel/src/main/java/org/onosproject/yangutils/datamodel/utils/DataModelUtils.java
+++ b/utils/yangutils/datamodel/src/main/java/org/onosproject/yangutils/datamodel/utils/DataModelUtils.java
@@ -22,6 +22,8 @@
 import org.onosproject.yangutils.datamodel.CollisionDetector;
 import org.onosproject.yangutils.datamodel.ResolvableType;
 import org.onosproject.yangutils.datamodel.YangIfFeature;
+import org.onosproject.yangutils.datamodel.YangBase;
+import org.onosproject.yangutils.datamodel.YangIdentityRef;
 import org.onosproject.yangutils.datamodel.YangLeaf;
 import org.onosproject.yangutils.datamodel.YangLeafList;
 import org.onosproject.yangutils.datamodel.YangLeafRef;
@@ -176,6 +178,10 @@
                 .getEntityToResolve() instanceof YangLeafRef) {
             resolutionNode.addToResolutionList(resolutionInfo,
                     ResolvableType.YANG_LEAFREF);
+        } else if (resolutionInfo.getEntityToResolveInfo().getEntityToResolve() instanceof YangBase) {
+            resolutionNode.addToResolutionList(resolutionInfo, ResolvableType.YANG_BASE);
+        } else if (resolutionInfo.getEntityToResolveInfo().getEntityToResolve() instanceof YangIdentityRef) {
+            resolutionNode.addToResolutionList(resolutionInfo, ResolvableType.YANG_IDENTITYREF);
         }
     }
 
diff --git a/utils/yangutils/plugin/src/main/java/org/onosproject/yangutils/linker/impl/YangEntityToResolveInfoImpl.java b/utils/yangutils/plugin/src/main/java/org/onosproject/yangutils/linker/impl/YangEntityToResolveInfoImpl.java
index 17285f6..d33dfd7 100644
--- a/utils/yangutils/plugin/src/main/java/org/onosproject/yangutils/linker/impl/YangEntityToResolveInfoImpl.java
+++ b/utils/yangutils/plugin/src/main/java/org/onosproject/yangutils/linker/impl/YangEntityToResolveInfoImpl.java
@@ -19,6 +19,8 @@
 
 import org.onosproject.yangutils.datamodel.YangEntityToResolveInfo;
 import org.onosproject.yangutils.datamodel.YangIfFeature;
+import org.onosproject.yangutils.datamodel.YangBase;
+import org.onosproject.yangutils.datamodel.YangIdentityRef;
 import org.onosproject.yangutils.datamodel.YangNode;
 import org.onosproject.yangutils.datamodel.YangType;
 import org.onosproject.yangutils.datamodel.YangUses;
@@ -79,6 +81,10 @@
             prefix = ((YangUses) entityToBeResolved).getPrefix();
         } else if (entityToBeResolved instanceof YangIfFeature) {
             prefix = ((YangIfFeature) entityToBeResolved).getPrefix();
+        } else if (entityToBeResolved instanceof YangBase) {
+            prefix = ((YangBase) entityToBeResolved).getBaseIdentifier().getPrefix();
+        } else if (entityToBeResolved instanceof YangIdentityRef) {
+            prefix = ((YangIdentityRef) entityToBeResolved).getBaseIdentity().getPrefix();
         } else {
             throw new LinkerException("Linker Exception: Entity to resolved is other than type/uses");
         }
diff --git a/utils/yangutils/plugin/src/main/java/org/onosproject/yangutils/linker/impl/YangLinkerManager.java b/utils/yangutils/plugin/src/main/java/org/onosproject/yangutils/linker/impl/YangLinkerManager.java
index 914b5d5..3847d3d 100644
--- a/utils/yangutils/plugin/src/main/java/org/onosproject/yangutils/linker/impl/YangLinkerManager.java
+++ b/utils/yangutils/plugin/src/main/java/org/onosproject/yangutils/linker/impl/YangLinkerManager.java
@@ -158,11 +158,16 @@
             try {
                 ((YangReferenceResolver) yangNode)
                         .resolveInterFileLinking(ResolvableType.YANG_IF_FEATURE);
-                ((YangReferenceResolver) yangNode).resolveInterFileLinking(ResolvableType.YANG_USES);
+                ((YangReferenceResolver) yangNode)
+                        .resolveInterFileLinking(ResolvableType.YANG_USES);
                 ((YangReferenceResolver) yangNode)
                         .resolveInterFileLinking(ResolvableType.YANG_DERIVED_DATA_TYPE);
                 ((YangReferenceResolver) yangNode)
                         .resolveInterFileLinking(ResolvableType.YANG_LEAFREF);
+                ((YangReferenceResolver) yangNode)
+                        .resolveInterFileLinking(ResolvableType.YANG_BASE);
+                ((YangReferenceResolver) yangNode)
+                        .resolveInterFileLinking(ResolvableType.YANG_IDENTITYREF);
             } catch (DataModelException e) {
                 String errorInfo = "Error in file: " + yangNode.getName() + " at line: "
                         + e.getLineNumber() + " at position: " + e.getCharPositionInLine() + NEW_LINE + e.getMessage();
diff --git a/utils/yangutils/plugin/src/main/java/org/onosproject/yangutils/linker/impl/YangResolutionInfoImpl.java b/utils/yangutils/plugin/src/main/java/org/onosproject/yangutils/linker/impl/YangResolutionInfoImpl.java
index b70d44c..eb42233 100644
--- a/utils/yangutils/plugin/src/main/java/org/onosproject/yangutils/linker/impl/YangResolutionInfoImpl.java
+++ b/utils/yangutils/plugin/src/main/java/org/onosproject/yangutils/linker/impl/YangResolutionInfoImpl.java
@@ -24,12 +24,15 @@
 import org.onosproject.yangutils.datamodel.Resolvable;
 import org.onosproject.yangutils.datamodel.ResolvableType;
 import org.onosproject.yangutils.datamodel.YangAtomicPath;
+import org.onosproject.yangutils.datamodel.YangBase;
 import org.onosproject.yangutils.datamodel.YangDerivedInfo;
 import org.onosproject.yangutils.datamodel.YangEntityToResolveInfo;
 import org.onosproject.yangutils.datamodel.YangFeature;
 import org.onosproject.yangutils.datamodel.YangFeatureHolder;
 import org.onosproject.yangutils.datamodel.YangGrouping;
 import org.onosproject.yangutils.datamodel.YangIfFeature;
+import org.onosproject.yangutils.datamodel.YangIdentity;
+import org.onosproject.yangutils.datamodel.YangIdentityRef;
 import org.onosproject.yangutils.datamodel.YangImport;
 import org.onosproject.yangutils.datamodel.YangInclude;
 import org.onosproject.yangutils.datamodel.YangInput;
@@ -69,9 +72,12 @@
 import static org.onosproject.yangutils.utils.UtilConstants.GROUPING_LINKER_ERROR;
 import static org.onosproject.yangutils.utils.UtilConstants.INPUT;
 import static org.onosproject.yangutils.utils.UtilConstants.LEAFREF;
+import static org.onosproject.yangutils.utils.UtilConstants.IDENTITYREF;
 import static org.onosproject.yangutils.utils.UtilConstants.LEAFREF_LINKER_ERROR;
 import static org.onosproject.yangutils.utils.UtilConstants.OUTPUT;
 import static org.onosproject.yangutils.utils.UtilConstants.TYPEDEF_LINKER_ERROR;
+import static org.onosproject.yangutils.utils.UtilConstants.IDENTITYREF_LINKER_ERROR;
+import static org.onosproject.yangutils.utils.UtilConstants.BASE_LINKER_ERROR;
 
 /**
  * Represents implementation of resolution object which will be resolved by
@@ -143,7 +149,10 @@
 
         setCurReferenceResolver(dataModelRootNode);
 
-        // Current node to resolve, it can be a YANG type, YANG uses or YANG if-feature or YANG leafref.
+        /**
+         * Current node to resolve, it can be a YANG type, YANG uses or YANG if-feature or
+         * YANG leafref or YANG base or YANG identityref.
+         */
         T entityToResolve = getEntityToResolveInfo().getEntityToResolve();
 
         // Check if linking is already done
@@ -157,7 +166,7 @@
             }
         } else {
             throw new DataModelException("Data Model Exception: Entity to resolved is other than " +
-                    "type/uses/if-feature/leafref");
+                    "type/uses/if-feature/leafref/base/identityref");
         }
 
         // Push the initial entity to resolve in stack.
@@ -178,7 +187,10 @@
 
         while (getPartialResolvedStack().size() != 0) {
 
-            // Current node to resolve, it can be a YANG type or YANG uses.
+            /**
+             * Current node to resolve, it can be a YANG type or YANG uses or
+             * YANG if-feature or YANG leafref or YANG base or YANG identityref.
+             */
             T entityToResolve = getCurrentEntityToResolveFromStack();
             // Check if linking is already done
             if (entityToResolve instanceof Resolvable) {
@@ -227,6 +239,10 @@
                                 errorInfo = GROUPING_LINKER_ERROR;
                             } else if (resolvable instanceof YangIfFeature) {
                                 errorInfo = FEATURE_LINKER_ERROR;
+                            } else if (resolvable instanceof YangBase) {
+                                errorInfo = BASE_LINKER_ERROR;
+                            } else if (resolvable instanceof YangIdentityRef) {
+                                errorInfo = IDENTITYREF_LINKER_ERROR;
                             } else {
                                 errorInfo = LEAFREF_LINKER_ERROR;
                             }
@@ -246,14 +262,16 @@
 
             } else {
                 throw new DataModelException(
-                        "Data Model Exception: Entity to resolved is other than type/uses/if-feature/leafref");
+                        "Data Model Exception: Entity to resolved is other than type/uses/if-feature" +
+                                "/leafref/base/identityref");
             }
         }
 
     }
 
     /**
-     * Adds the leafref type to the type, which has derived type referring to typedef with leafref type.
+     * Adds the leafref/identityref type to the type, which has derived type referring to
+     * typedef with leafref/identityref type.
      */
     private void addDerivedRefTypeToRefTypeResolutionList() throws DataModelException {
 
@@ -279,9 +297,10 @@
         YangDerivedInfo derivedInfo = (YangDerivedInfo) yangType.getDataTypeExtendedInfo();
 
         /*
-         * If the derived types referred type is not leaf ref return
+         * If the derived types referred type is not leafref/identityref return
          */
-        if (derivedInfo.getEffectiveBuiltInType() != YangDataTypes.LEAFREF) {
+        if ((derivedInfo.getEffectiveBuiltInType() != YangDataTypes.LEAFREF) &&
+                (derivedInfo.getEffectiveBuiltInType() != YangDataTypes.IDENTITYREF)) {
             return;
         }
 
@@ -292,28 +311,49 @@
             extendedInfo = (T) derivedInfoFromTypedef.getReferredTypeDef().getTypeDefBaseType()
                     .getDataTypeExtendedInfo();
         }
+
         /*
-         * Backup the derived types leaf ref info, delete all the info in
-         * current type, but for resolution status as resolved. Copy the backed
-         * up leaf ref to types extended info, create a leaf ref resolution info
-         * using the current resolution info and add to leaf ref resolution
-         * list.
+         * Backup the derived types leafref/identityref info, delete all the info in current type,
+         * but for resolution status as resolved. Copy the backed up leafref/identityref to types extended info,
+         * create a leafref/identityref resolution info using the current resolution info and
+         * add to leafref/identityref resolution list.
          */
-        YangLeafRef leafRefInTypeDef = (YangLeafRef) extendedInfo;
-        yangType.resetYangType();
+        if (derivedInfo.getEffectiveBuiltInType() == YangDataTypes.LEAFREF) {
+            YangLeafRef leafRefInTypeDef = (YangLeafRef) extendedInfo;
+            yangType.resetYangType();
 
-        yangType.setResolvableStatus(RESOLVED);
-        yangType.setDataType(YangDataTypes.LEAFREF);
-        yangType.setDataTypeName(LEAFREF);
-        yangType.setDataTypeExtendedInfo(leafRefInTypeDef);
-        leafRefInTypeDef.setResolvableStatus(UNRESOLVED);
+            yangType.setResolvableStatus(RESOLVED);
+            yangType.setDataType(YangDataTypes.LEAFREF);
+            yangType.setDataTypeName(LEAFREF);
+            yangType.setDataTypeExtendedInfo(leafRefInTypeDef);
+            leafRefInTypeDef.setResolvableStatus(UNRESOLVED);
 
-        // Add resolution information to the list.
-        YangResolutionInfoImpl resolutionInfoImpl = new YangResolutionInfoImpl<>(leafRefInTypeDef,
-                potentialAncestorWithReferredNode, getLineNumber(), getCharPosition());
-        getCurReferenceResolver().addToResolutionList(resolutionInfoImpl,
-                ResolvableType.YANG_LEAFREF);
-        getCurReferenceResolver().resolveSelfFileLinking(ResolvableType.YANG_LEAFREF);
+            // Add resolution information to the list.
+            YangResolutionInfoImpl resolutionInfoImpl = new YangResolutionInfoImpl<>(leafRefInTypeDef,
+                                                                potentialAncestorWithReferredNode,
+                                                                getLineNumber(), getCharPosition());
+            getCurReferenceResolver().addToResolutionList(resolutionInfoImpl,
+                                                          ResolvableType.YANG_LEAFREF);
+            getCurReferenceResolver().resolveSelfFileLinking(ResolvableType.YANG_LEAFREF);
+
+        } else if (derivedInfo.getEffectiveBuiltInType() == YangDataTypes.IDENTITYREF) {
+
+            YangIdentityRef identityRefInTypeDef = (YangIdentityRef) extendedInfo;
+            yangType.resetYangType();
+
+            yangType.setResolvableStatus(RESOLVED);
+            yangType.setDataType(YangDataTypes.IDENTITYREF);
+            yangType.setDataTypeName(IDENTITYREF);
+            yangType.setDataTypeExtendedInfo(identityRefInTypeDef);
+            identityRefInTypeDef.setResolvableStatus(UNRESOLVED);
+
+            // Add resolution information to the list.
+            YangResolutionInfoImpl resolutionInfoImpl = new YangResolutionInfoImpl<>(identityRefInTypeDef,
+                                            potentialAncestorWithReferredNode, getLineNumber(), getCharPosition());
+            getCurReferenceResolver().addToResolutionList(resolutionInfoImpl,
+                                                          ResolvableType.YANG_IDENTITYREF);
+            getCurReferenceResolver().resolveSelfFileLinking(ResolvableType.YANG_IDENTITYREF);
+        }
     }
 
     /**
@@ -360,6 +400,10 @@
         } else if (getCurrentEntityToResolveFromStack() instanceof YangLeafRef) {
             resolveSelfFileLinkingForLeafref(potentialAncestorWithReferredNode);
             return;
+        } else if ((getCurrentEntityToResolveFromStack() instanceof YangIdentityRef) ||
+                (getCurrentEntityToResolveFromStack() instanceof YangBase)) {
+            resolveSelfFileLinkingForBaseAndIdentityref();
+            return;
         } else {
 
             /**
@@ -453,6 +497,47 @@
     }
 
     /**
+     * Resolves self file linking for base/identityref.
+     *
+     * @throws DataModelException a violation of data model rules
+     */
+    private void resolveSelfFileLinkingForBaseAndIdentityref()
+            throws DataModelException {
+
+        boolean referredIdentityFound = false;
+        String nodeName = null;
+
+        if (getCurrentEntityToResolveFromStack() instanceof YangIdentityRef) {
+           nodeName = ((YangIdentityRef) getCurrentEntityToResolveFromStack()).getName();
+        }
+
+        if (getCurrentEntityToResolveFromStack() instanceof YangBase) {
+            nodeName = ((YangBase) getCurrentEntityToResolveFromStack()).getBaseIdentifier().getName();
+        }
+
+        if (getCurReferenceResolver() instanceof YangModule) {
+            YangModule rootNode = (YangModule) getCurReferenceResolver();
+            // Sends list of nodes for finding the target identity.
+            referredIdentityFound = isIdentityReferenceFound(nodeName, rootNode);
+        } else if (getCurReferenceResolver() instanceof YangSubModule) {
+            YangSubModule rootNode = (YangSubModule) getCurReferenceResolver();
+            // Sends list of nodes for finding the target identity.
+            referredIdentityFound = isIdentityReferenceFound(nodeName, rootNode);
+        }
+
+        if (referredIdentityFound) {
+            return;
+        }
+
+        /*
+         * In case prefix is not present it's a candidate for inter-file resolution via include list.
+         */
+        if (getRefPrefix() == null) {
+            ((Resolvable) getCurrentEntityToResolveFromStack()).setResolvableStatus(INTRA_FILE_RESOLVED);
+        }
+    }
+
+    /**
      * Returns the root parent with respect to the ancestor count from leafref.
      *
      * @param ancestorCount count of node where parent node can be reached
@@ -561,6 +646,41 @@
     }
 
     /**
+     * Returns the status of the referred identity found for base/identityref.
+     *
+     * @param nodeName the name of the base nodeidentifier/identityref nodeidentifier
+     * @param ancestorWithTheReferredNode the parent node of base/identityref
+     * @return status of referred base/identityref
+     * @throws DataModelException a violation of data model rules
+     */
+    private boolean isIdentityReferenceFound(String nodeName, YangNode ancestorWithTheReferredNode)
+            throws DataModelException {
+
+        // When child is not present return.
+        if (ancestorWithTheReferredNode.getChild() == null) {
+            return false;
+        }
+
+        ancestorWithTheReferredNode = ancestorWithTheReferredNode.getChild();
+
+        // Checks all the siblings under the node and returns the matched node.
+        YangNode nodeFound = isReferredNodeInSiblingProcessedForIdentity(ancestorWithTheReferredNode, nodeName);
+
+        if (nodeFound != null) {
+            // Adds reference link of entity to the node under resolution.
+            addReferredEntityLink(nodeFound, LINKED);
+
+            /**
+             * resolve the reference and update the partial resolution stack with any further recursive references
+             */
+            addUnresolvedRecursiveReferenceToStack(nodeFound);
+            return true;
+        }
+
+        return false;
+    }
+
+    /**
      * Fills the referred leaf or leaf-list inside the path predicates.
      *
      * @param ancestorWithTheReferredNode the actual node where YANG list will be present
@@ -856,6 +976,28 @@
     }
 
     /**
+     * Checks for the referred parent node for the base/identity.
+     *
+     * @param potentialReferredNode potential referred node
+     * @return the reffered parent node of base/identity.
+     * @throws DataModelException data model errors
+     */
+    private YangNode isReferredNodeInSiblingProcessedForIdentity(YangNode potentialReferredNode,
+                            String referredNodeName)  throws DataModelException {
+
+        while (potentialReferredNode != null) {
+            if (potentialReferredNode instanceof YangIdentity) {
+                // Check if the potential referred node is the actual referred node
+                if (isReferredNodeForIdentity(potentialReferredNode, referredNodeName)) {
+                    return potentialReferredNode;
+                }
+            }
+            potentialReferredNode = potentialReferredNode.getNextSibling();
+        }
+        return null;
+    }
+
+    /**
      * Checks if the current reference node name and the name in the path are equal.
      *
      * @param currentReferredNode the node where the reference is pointed
@@ -878,6 +1020,28 @@
     }
 
     /**
+     * Checks if the current reference node name and the name in the base/identityref base are equal.
+     *
+     * @param currentReferredNode the node where the reference is pointed
+     * @param nameOfIdentityRefBase name of the base in the base/identityref base
+     * @return status of the match between the name
+     * @throws DataModelException a violation of data model rules
+     */
+    private boolean isReferredNodeForIdentity(YangNode currentReferredNode, String nameOfIdentityRefBase)
+            throws DataModelException {
+
+        if ((getCurrentEntityToResolveFromStack() instanceof YangIdentityRef) ||
+                (getCurrentEntityToResolveFromStack() instanceof YangBase)) {
+            /*
+             * Check if name of node name matches with the current reference node.
+             */
+            return currentReferredNode.getName().contentEquals(nameOfIdentityRefBase);
+        } else {
+            throw new DataModelException("Data Model Exception: Entity to resolved is other than identityref");
+        }
+    }
+
+    /**
      * Checks for the referred node defined in a ancestor scope.
      *
      * @param potentialReferredNode potential referred node
@@ -946,8 +1110,18 @@
                  */
                 return isNodeNameSameAsResolutionInfoName(potentialReferredNode);
             }
+        } else if ((getCurrentEntityToResolveFromStack() instanceof YangBase) ||
+                (getCurrentEntityToResolveFromStack() instanceof YangIdentityRef)) {
+            if (potentialReferredNode instanceof YangIdentity) {
+                /*
+                 * Check if name of node name matches with the entity being
+                 * resolved
+                 */
+                return isNodeNameSameAsResolutionInfoName(potentialReferredNode);
+            }
         } else {
-            throw new DataModelException("Data Model Exception: Entity to resolved is other than type/uses");
+            throw new DataModelException("Data Model Exception: Entity to resolved is other than type/" +
+                                                 "uses/base/identityref");
         }
         return false;
     }
@@ -977,6 +1151,16 @@
             }
         } else if (getCurrentEntityToResolveFromStack() instanceof YangIfFeature) {
             return isFeatureDefinedInNode(node);
+        } else if (getCurrentEntityToResolveFromStack() instanceof YangBase) {
+            if (node.getName().contentEquals(
+                    ((YangBase) getCurrentEntityToResolveFromStack()).getBaseIdentifier().getName())) {
+                return true;
+            }
+        } else if (getCurrentEntityToResolveFromStack() instanceof YangIdentityRef) {
+            if (node.getName().contentEquals(
+                    ((YangIdentityRef) getCurrentEntityToResolveFromStack()).getName())) {
+                return true;
+            }
         } else {
             throw new DataModelException("Data Model Exception: Entity to resolved is other than type/uses");
         }
@@ -1020,8 +1204,13 @@
             // do nothing , referred node is already set
         } else if (getCurrentEntityToResolveFromStack() instanceof YangLeafRef) {
             // do nothing , referred node is already set
+        } else if (getCurrentEntityToResolveFromStack() instanceof YangBase) {
+            ((YangBase) getCurrentEntityToResolveFromStack()).setReferredIdentity((YangIdentity) referredNode);
+        } else if (getCurrentEntityToResolveFromStack() instanceof YangIdentityRef) {
+            ((YangIdentityRef) getCurrentEntityToResolveFromStack()).setReferredIdentity((YangIdentity) referredNode);
         } else {
-            throw new DataModelException("Data Model Exception: Entity to resolved is other than type/uses");
+            throw new DataModelException("Data Model Exception: Entity to resolved is other than type" +
+                                                 "/uses/base/identityref");
         }
 
         // Sets the resolution status in inside the type/uses.
@@ -1062,6 +1251,15 @@
         } else if (getCurrentEntityToResolveFromStack() instanceof YangLeafRef) {
             // do nothing , referred node is already set
             throw new DataModelException("Data Model Exception: Entity to resolved is other than type/uses");
+        } else if ((getCurrentEntityToResolveFromStack() instanceof YangBase) ||
+                (getCurrentEntityToResolveFromStack() instanceof YangIdentityRef)) {
+            /*
+             * Search if the identity has any un resolved base, if so return true, else return false.
+             */
+            addUnResolvedBaseToStack(referredNode);
+        } else {
+            throw new DataModelException("Data Model Exception: Entity to resolved is other than type/uses/" +
+                                                 "base/identityref");
         }
     }
 
@@ -1109,6 +1307,26 @@
     }
 
     /**
+     * Returns if there is any unresolved base in identity.
+     *
+     * @param node module/submodule node
+     */
+    private void addUnResolvedBaseToStack(YangNode node) {
+
+        YangIdentity curNode = (YangIdentity) node;
+        if (curNode.getBaseNode() != null) {
+            if (curNode.getBaseNode().getResolvableStatus() != RESOLVED) {
+                YangEntityToResolveInfoImpl<YangBase> unResolvedEntityInfo = new YangEntityToResolveInfoImpl<>();
+                unResolvedEntityInfo.setEntityToResolve(curNode.getBaseNode());
+                unResolvedEntityInfo.setHolderOfEntityToResolve(node);
+                addInPartialResolvedStack((YangEntityToResolveInfoImpl<T>) unResolvedEntityInfo);
+
+            }
+        }
+    }
+
+
+    /**
      * Returns stack of YANG type with partially resolved YANG construct
      * hierarchy.
      *
@@ -1247,8 +1465,13 @@
             refPrefix = ((YangIfFeature) getCurrentEntityToResolveFromStack()).getPrefix();
         } else if (getCurrentEntityToResolveFromStack() instanceof YangLeafRef) {
             refPrefix = refPrefixForLeafRef();
+        } else if (getCurrentEntityToResolveFromStack() instanceof YangBase) {
+            refPrefix = ((YangBase) getCurrentEntityToResolveFromStack()).getBaseIdentifier().getPrefix();
+        } else if (getCurrentEntityToResolveFromStack() instanceof YangIdentityRef) {
+            refPrefix = ((YangIdentityRef) getCurrentEntityToResolveFromStack()).getPrefix();
         } else {
-            throw new DataModelException("Data Model Exception: Entity to resolved is other than type/uses");
+            throw new DataModelException("Data Model Exception: Entity to resolved is other than " +
+                                                 "type/uses/base/identityref");
         }
         return refPrefix;
     }
@@ -1392,6 +1615,10 @@
                 errorInfo = GROUPING_LINKER_ERROR;
             } else if (getCurrentEntityToResolveFromStack() instanceof YangIfFeature) {
                 errorInfo = FEATURE_LINKER_ERROR;
+            } else if (getCurrentEntityToResolveFromStack() instanceof YangBase) {
+                errorInfo = BASE_LINKER_ERROR;
+            } else if (getCurrentEntityToResolveFromStack() instanceof YangIdentityRef) {
+                errorInfo = IDENTITYREF_LINKER_ERROR;
             } else {
                 errorInfo = LEAFREF_LINKER_ERROR;
             }
@@ -1449,7 +1676,12 @@
                 setCurReferenceResolver((YangReferenceResolver) yangInclude.getIncludedNode());
 
                 return referredNode;
+            } else if (getCurrentEntityToResolveFromStack() instanceof YangBase) {
+                linkedNode = findRefIdentity(yangInclude.getIncludedNode());
+            } else if (getCurrentEntityToResolveFromStack() instanceof YangIdentityRef) {
+                linkedNode = findRefIdentityRef(yangInclude.getIncludedNode());
             }
+
             if (linkedNode != null) {
                 // Add the link to external entity.
                 addReferredEntityLink(linkedNode, INTER_FILE_LINKED);
@@ -1502,6 +1734,10 @@
                     setCurReferenceResolver((YangReferenceResolver) yangImport.getImportedNode());
 
                     return referredNode;
+                } else if (getCurrentEntityToResolveFromStack() instanceof YangBase) {
+                    linkedNode = findRefIdentity(yangImport.getImportedNode());
+                } else if (getCurrentEntityToResolveFromStack() instanceof YangIdentityRef) {
+                    linkedNode = findRefIdentityRef(yangImport.getImportedNode());
                 }
                 if (linkedNode != null) {
                     // Add the link to external entity.
@@ -1584,8 +1820,13 @@
             return (T) ((YangIfFeature) getCurrentEntityToResolveFromStack()).getReferredFeatureHolder();
         } else if (getCurrentEntityToResolveFromStack() instanceof YangLeafRef) {
             return (T) ((YangLeafRef) getCurrentEntityToResolveFromStack()).getReferredLeafOrLeafList();
+        } else if (getCurrentEntityToResolveFromStack() instanceof YangBase) {
+            return (T) ((YangBase) getCurrentEntityToResolveFromStack()).getReferredIdentity();
+        } else if (getCurrentEntityToResolveFromStack() instanceof YangIdentityRef) {
+            return (T) ((YangIdentityRef) getCurrentEntityToResolveFromStack()).getReferredIdentity();
         } else {
-            throw new DataModelException("Data Model Exception: Entity to resolved is other than type/uses");
+            throw new DataModelException("Data Model Exception: Entity to resolved is other than type" +
+                                                 "/uses/base/identityref");
         }
     }
 
@@ -1651,4 +1892,45 @@
         }
         return null;
     }
+
+    /**
+     * Finds the referred identity node at the root level of imported/included node.
+     *
+     * @param refNode module/sub-module node
+     * @return referred identity
+     */
+    private YangNode findRefIdentity(YangNode refNode) {
+        YangNode tmpNode = refNode.getChild();
+        while (tmpNode != null) {
+            if (tmpNode instanceof YangIdentity) {
+                if (tmpNode.getName()
+                        .equals(((YangBase) getCurrentEntityToResolveFromStack()).getBaseIdentifier().getName())) {
+                    return tmpNode;
+                }
+            }
+            tmpNode = tmpNode.getNextSibling();
+        }
+        return null;
+    }
+
+    /**
+     * Finds the referred identity node at the root level of imported/included node.
+     *
+     * @param refNode module/sub-module node
+     * @return referred identity
+     */
+    private YangNode findRefIdentityRef(YangNode refNode) {
+        YangNode tmpNode = refNode.getChild();
+        while (tmpNode != null) {
+            if (tmpNode instanceof YangIdentity) {
+                if (tmpNode.getName()
+                        .equals(((YangIdentityRef) getCurrentEntityToResolveFromStack())
+                                        .getBaseIdentity().getName())) {
+                    return tmpNode;
+                }
+            }
+            tmpNode = tmpNode.getNextSibling();
+        }
+        return null;
+    }
 }
diff --git a/utils/yangutils/plugin/src/main/java/org/onosproject/yangutils/parser/impl/TreeWalkListener.java b/utils/yangutils/plugin/src/main/java/org/onosproject/yangutils/parser/impl/TreeWalkListener.java
index 443c071..a1daf0f 100644
--- a/utils/yangutils/plugin/src/main/java/org/onosproject/yangutils/parser/impl/TreeWalkListener.java
+++ b/utils/yangutils/plugin/src/main/java/org/onosproject/yangutils/parser/impl/TreeWalkListener.java
@@ -28,6 +28,7 @@
 import org.onosproject.yangutils.parser.antlrgencode.GeneratedYangParser;
 import org.onosproject.yangutils.parser.impl.listeners.AugmentListener;
 import org.onosproject.yangutils.parser.impl.listeners.BaseFileListener;
+import org.onosproject.yangutils.parser.impl.listeners.BaseListener;
 import org.onosproject.yangutils.parser.impl.listeners.BelongsToListener;
 import org.onosproject.yangutils.parser.impl.listeners.BitListener;
 import org.onosproject.yangutils.parser.impl.listeners.BitsListener;
@@ -42,7 +43,9 @@
 import org.onosproject.yangutils.parser.impl.listeners.EnumerationListener;
 import org.onosproject.yangutils.parser.impl.listeners.FeatureListener;
 import org.onosproject.yangutils.parser.impl.listeners.GroupingListener;
+import org.onosproject.yangutils.parser.impl.listeners.IdentityrefListener;
 import org.onosproject.yangutils.parser.impl.listeners.IfFeatureListener;
+import org.onosproject.yangutils.parser.impl.listeners.IdentityListener;
 import org.onosproject.yangutils.parser.impl.listeners.ImportListener;
 import org.onosproject.yangutils.parser.impl.listeners.IncludeListener;
 import org.onosproject.yangutils.parser.impl.listeners.InputListener;
@@ -450,12 +453,12 @@
 
     @Override
     public void enterIdentityStatement(GeneratedYangParser.IdentityStatementContext ctx) {
-        handleUnsupportedYangConstruct(YangConstructType.IDENTITY_DATA, ctx, CURRENTLY_UNSUPPORTED);
+        IdentityListener.processIdentityEntry(this, ctx);
     }
 
     @Override
     public void exitIdentityStatement(GeneratedYangParser.IdentityStatementContext ctx) {
-        // do nothing.
+        IdentityListener.processIdentityExit(this, ctx);
     }
 
     @Override
@@ -470,7 +473,7 @@
 
     @Override
     public void enterBaseStatement(GeneratedYangParser.BaseStatementContext ctx) {
-        handleUnsupportedYangConstruct(YangConstructType.BASE_DATA, ctx, CURRENTLY_UNSUPPORTED);
+        BaseListener.processBaseEntry(this, ctx);
     }
 
     @Override
@@ -710,12 +713,12 @@
 
     @Override
     public void enterIdentityrefSpecification(GeneratedYangParser.IdentityrefSpecificationContext ctx) {
-        // do nothing.
+        IdentityrefListener.processIdentityrefEntry(this, ctx);
     }
 
     @Override
     public void exitIdentityrefSpecification(GeneratedYangParser.IdentityrefSpecificationContext ctx) {
-        // do nothing.
+        IdentityrefListener.processIdentityrefExit(this, ctx);
     }
 
     @Override
diff --git a/utils/yangutils/plugin/src/main/java/org/onosproject/yangutils/parser/impl/listeners/BaseListener.java b/utils/yangutils/plugin/src/main/java/org/onosproject/yangutils/parser/impl/listeners/BaseListener.java
new file mode 100644
index 0000000..1925375
--- /dev/null
+++ b/utils/yangutils/plugin/src/main/java/org/onosproject/yangutils/parser/impl/listeners/BaseListener.java
@@ -0,0 +1,116 @@
+/*
+ * Copyright 2016-present Open Networking Laboratory
+ *
+ * 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.
+ */
+package org.onosproject.yangutils.parser.impl.listeners;
+
+import org.onosproject.yangutils.datamodel.YangBase;
+import org.onosproject.yangutils.datamodel.YangIdentity;
+import org.onosproject.yangutils.datamodel.YangIdentityRef;
+import org.onosproject.yangutils.datamodel.YangNode;
+import org.onosproject.yangutils.datamodel.YangNodeIdentifier;
+import org.onosproject.yangutils.datamodel.exceptions.DataModelException;
+import org.onosproject.yangutils.linker.impl.YangResolutionInfoImpl;
+import org.onosproject.yangutils.datamodel.utils.Parsable;
+import org.onosproject.yangutils.parser.antlrgencode.GeneratedYangParser;
+import org.onosproject.yangutils.parser.exceptions.ParserException;
+import org.onosproject.yangutils.parser.impl.TreeWalkListener;
+
+import static org.onosproject.yangutils.datamodel.utils.DataModelUtils.addResolutionInfo;
+import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorLocation.ENTRY;
+import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorLocation.EXIT;
+import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorMessageConstruction.constructExtendedListenerErrorMessage;
+import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorMessageConstruction.constructListenerErrorMessage;
+import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorType.*;
+import static org.onosproject.yangutils.parser.impl.parserutils.ListenerUtil.getValidNodeIdentifier;
+import static org.onosproject.yangutils.parser.impl.parserutils.ListenerValidation.checkStackIsNotEmpty;
+import static org.onosproject.yangutils.datamodel.utils.YangConstructType.BASE_DATA;
+
+/**
+ * base-stmt           = base-keyword sep identifier-ref-arg-str
+ *                          optsep stmtend*
+ * identifier-ref-arg  = [prefix ":"] identifier
+ */
+
+/**
+ * Represents listener based call back function corresponding to the "base"
+ * rule defined in ANTLR grammar file for corresponding ABNF rule in RFC 6020.
+ */
+public final class BaseListener {
+
+    //Creates a new base listener.
+    private BaseListener() {
+    }
+
+    /**
+     * Performs validation and updates the data model tree when parser receives an
+     * input matching the grammar rule (base).
+     *
+     * @param listener listener's object
+     * @param ctx context object of the grammar rule
+     */
+    public static void processBaseEntry(TreeWalkListener listener,
+                                          GeneratedYangParser.BaseStatementContext ctx) {
+
+        // Check for stack to be non empty.
+        checkStackIsNotEmpty(listener, MISSING_HOLDER, BASE_DATA, ctx.string().getText(), ENTRY);
+
+        YangNodeIdentifier nodeIdentifier = getValidNodeIdentifier(ctx.string().getText(), BASE_DATA, ctx);
+
+        Parsable tmpData = listener.getParsedDataStack().peek();
+
+        /**
+         * For identityref base node identifier is copied in identity listener itself, so no need to process
+         * base statement for indentityref
+         */
+        if (tmpData instanceof YangIdentityRef) {
+            return;
+        }
+
+        if (!(tmpData instanceof YangIdentity)) {
+             throw new ParserException(constructListenerErrorMessage(INVALID_HOLDER, BASE_DATA,
+                                                                     ctx.string().getText(), ENTRY));
+        }
+
+        YangBase yangBase = new YangBase();
+        yangBase.setBaseIdentifier(nodeIdentifier);
+        ((YangIdentity) tmpData).setBaseNode(yangBase);
+
+        int errorLine = ctx.getStart().getLine();
+        int errorPosition = ctx.getStart().getCharPositionInLine();
+
+        // Add resolution information to the list
+        YangResolutionInfoImpl resolutionInfo =
+                new YangResolutionInfoImpl<YangBase>(yangBase, (YangNode) tmpData, errorLine, errorPosition);
+        addToResolutionList(resolutionInfo, ctx);
+    }
+
+    /**
+     * Add to resolution list.
+     *
+     * @param resolutionInfo resolution information
+     * @param ctx context object of the grammar rule
+     */
+    private static void addToResolutionList(YangResolutionInfoImpl<YangBase> resolutionInfo,
+                                            GeneratedYangParser.BaseStatementContext ctx) {
+
+        try {
+            addResolutionInfo(resolutionInfo);
+        } catch (DataModelException e) {
+            throw new ParserException(constructExtendedListenerErrorMessage(UNHANDLED_PARSED_DATA,
+                    BASE_DATA, ctx.string().getText(), EXIT, e.getMessage()));
+        }
+    }
+
+}
diff --git a/utils/yangutils/plugin/src/main/java/org/onosproject/yangutils/parser/impl/listeners/IdentityListener.java b/utils/yangutils/plugin/src/main/java/org/onosproject/yangutils/parser/impl/listeners/IdentityListener.java
new file mode 100644
index 0000000..d8dec2c
--- /dev/null
+++ b/utils/yangutils/plugin/src/main/java/org/onosproject/yangutils/parser/impl/listeners/IdentityListener.java
@@ -0,0 +1,123 @@
+/*
+ * Copyright 2016-present Open Networking Laboratory
+ *
+ * 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.
+ */
+package org.onosproject.yangutils.parser.impl.listeners;
+
+import org.onosproject.yangutils.datamodel.YangIdentity;
+import org.onosproject.yangutils.datamodel.YangModule;
+import org.onosproject.yangutils.datamodel.YangNode;
+import org.onosproject.yangutils.datamodel.YangSubModule;
+import org.onosproject.yangutils.datamodel.exceptions.DataModelException;
+import org.onosproject.yangutils.datamodel.utils.Parsable;
+import org.onosproject.yangutils.parser.antlrgencode.GeneratedYangParser;
+import org.onosproject.yangutils.parser.exceptions.ParserException;
+import org.onosproject.yangutils.parser.impl.TreeWalkListener;
+
+import static org.onosproject.yangutils.datamodel.utils.GeneratedLanguage.JAVA_GENERATION;
+import static org.onosproject.yangutils.translator.tojava.YangDataModelFactory.getYangIdentityNode;
+import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorLocation.ENTRY;
+import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorLocation.EXIT;
+import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorMessageConstruction.constructExtendedListenerErrorMessage;
+import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorMessageConstruction.constructListenerErrorMessage;
+import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorType.MISSING_HOLDER;
+import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorType.UNHANDLED_PARSED_DATA;
+import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorType.INVALID_HOLDER;
+import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorType.MISSING_CURRENT_HOLDER;
+import static org.onosproject.yangutils.parser.impl.parserutils.ListenerUtil.getValidIdentifier;
+import static org.onosproject.yangutils.parser.impl.parserutils.ListenerValidation.checkStackIsNotEmpty;
+import static org.onosproject.yangutils.datamodel.utils.YangConstructType.IDENTITY_DATA;
+
+/**
+ * Reference: RFC6020 and YANG ANTLR Grammar.
+ *
+ * ABNF grammar as per RFC6020
+ * identity-stmt       = identity-keyword sep identifier-arg-str optsep
+ *                       (";" /
+ *                        "{" stmtsep
+ *                            ;; these stmts can appear in any order
+ *                            [base-stmt stmtsep]
+ *                            [status-stmt stmtsep]
+ *                            [description-stmt stmtsep]
+ *                            [reference-stmt stmtsep]
+ *                        "}")
+ */
+
+/**
+ * Represents listener based call back function corresponding to the "identity"
+ * rule defined in ANTLR grammar file for corresponding ABNF rule in RFC 6020.
+ */
+public final class IdentityListener {
+
+    //Creates a identity listener.
+    private IdentityListener() {
+    }
+
+    /**
+     * Performs validations and update the data model tree when parser receives an input
+     * matching the grammar rule (identity).
+     *
+     * @param listener Listener's object
+     * @param ctx      context object of the grammar rule
+     */
+    public static void processIdentityEntry(TreeWalkListener listener,
+                                            GeneratedYangParser.IdentityStatementContext ctx) {
+
+        // Check for stack to be non empty.
+        checkStackIsNotEmpty(listener, MISSING_HOLDER, IDENTITY_DATA, ctx.identifier().getText(), ENTRY);
+
+        String identifier = getValidIdentifier(ctx.identifier().getText(), IDENTITY_DATA, ctx);
+
+        YangIdentity identity = getYangIdentityNode(JAVA_GENERATION);
+        identity.setName(identifier);
+
+        Parsable curData = listener.getParsedDataStack().peek();
+        if (curData instanceof YangModule || curData instanceof YangSubModule) {
+            YangNode curNode = (YangNode) curData;
+            try {
+                curNode.addChild(identity);
+            } catch (DataModelException e) {
+                throw new ParserException(constructExtendedListenerErrorMessage(UNHANDLED_PARSED_DATA,
+                        IDENTITY_DATA, ctx.identifier().getText(), ENTRY, e.getMessage()));
+            }
+            // Push identity node to the stack.
+            listener.getParsedDataStack().push(identity);
+        } else {
+            throw new ParserException(constructListenerErrorMessage(INVALID_HOLDER, IDENTITY_DATA,
+                    ctx.identifier().getText(), ENTRY));
+        }
+
+    }
+
+    /**
+     * Performs validations and update the data model tree when parser exits from grammar
+     * rule (identity).
+     *
+     * @param listener Listener's object
+     * @param ctx      context object of the grammar rule
+     */
+    public static void processIdentityExit(TreeWalkListener listener,
+                                       GeneratedYangParser.IdentityStatementContext ctx) {
+
+        // Check for stack to be non empty.
+        checkStackIsNotEmpty(listener, MISSING_CURRENT_HOLDER, IDENTITY_DATA, ctx.identifier().getText(), EXIT);
+
+        Parsable parsableType = listener.getParsedDataStack().pop();
+        if (!(parsableType instanceof YangIdentity)) {
+            throw new ParserException(constructListenerErrorMessage(INVALID_HOLDER, IDENTITY_DATA,
+                    ctx.identifier().getText(), EXIT));
+        }
+    }
+
+}
diff --git a/utils/yangutils/plugin/src/main/java/org/onosproject/yangutils/parser/impl/listeners/IdentityrefListener.java b/utils/yangutils/plugin/src/main/java/org/onosproject/yangutils/parser/impl/listeners/IdentityrefListener.java
new file mode 100644
index 0000000..49037e2
--- /dev/null
+++ b/utils/yangutils/plugin/src/main/java/org/onosproject/yangutils/parser/impl/listeners/IdentityrefListener.java
@@ -0,0 +1,214 @@
+/*
+ * Copyright 2016-present Open Networking Laboratory
+ *
+ * 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.
+ */
+package org.onosproject.yangutils.parser.impl.listeners;
+
+import org.onosproject.yangutils.datamodel.YangIdentityRef;
+import org.onosproject.yangutils.datamodel.YangNode;
+import org.onosproject.yangutils.datamodel.YangNodeIdentifier;
+import org.onosproject.yangutils.datamodel.YangType;
+import org.onosproject.yangutils.datamodel.exceptions.DataModelException;
+import org.onosproject.yangutils.datamodel.utils.Parsable;
+import org.onosproject.yangutils.datamodel.utils.builtindatatype.YangDataTypes;
+import org.onosproject.yangutils.linker.impl.YangResolutionInfoImpl;
+import org.onosproject.yangutils.parser.antlrgencode.GeneratedYangParser;
+import org.onosproject.yangutils.parser.exceptions.ParserException;
+import org.onosproject.yangutils.parser.impl.TreeWalkListener;
+
+import static org.onosproject.yangutils.datamodel.utils.DataModelUtils.addResolutionInfo;
+import static org.onosproject.yangutils.datamodel.utils.ResolvableStatus.UNRESOLVED;
+import static org.onosproject.yangutils.datamodel.utils.YangConstructType.BASE_DATA;
+import static org.onosproject.yangutils.datamodel.utils.YangConstructType.IDENTITYREF_DATA;
+import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorLocation.ENTRY;
+import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorLocation.EXIT;
+import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorMessageConstruction.constructExtendedListenerErrorMessage;
+import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorMessageConstruction.constructListenerErrorMessage;
+import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorType.MISSING_HOLDER;
+import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorType.INVALID_HOLDER;
+import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorType.MISSING_CURRENT_HOLDER;
+import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorType.UNHANDLED_PARSED_DATA;
+import static org.onosproject.yangutils.parser.impl.parserutils.ListenerUtil.getValidNodeIdentifier;
+import static org.onosproject.yangutils.parser.impl.parserutils.ListenerValidation.checkStackIsNotEmpty;
+
+/**
+ * Reference: RFC6020 and YANG ANTLR Grammar
+ *
+ * ABNF grammar as per RFC6020
+ * identityref-specification =
+ *                        base-stmt stmtsep
+ * base-stmt           = base-keyword sep identifier-ref-arg-str
+ *                          optsep stmtend*
+ * identifier-ref-arg  = [prefix ":"] identifier
+ */
+
+/**
+ * Represents listener based call back function corresponding to the "identityref"
+ * rule defined in ANTLR grammar file for corresponding ABNF rule in RFC 6020.
+ */
+public final class IdentityrefListener {
+
+    //Creates a new type listener.
+    private IdentityrefListener() {
+    }
+
+    /**
+     * Performs validation and updates the data model tree when parser receives an input
+     * matching the grammar rule (identityref).
+     *
+     * @param listener listener's object
+     * @param ctx      context object of the grammar rule
+     */
+    public static void processIdentityrefEntry(TreeWalkListener listener,
+                                        GeneratedYangParser.IdentityrefSpecificationContext ctx) {
+
+        // Check for stack to be non empty.
+        checkStackIsNotEmpty(listener, MISSING_HOLDER, IDENTITYREF_DATA, "", ENTRY);
+
+        if (listener.getParsedDataStack().peek() instanceof YangType) {
+
+            YangIdentityRef identityRef = new YangIdentityRef();
+            Parsable typeData = listener.getParsedDataStack().pop();
+            YangDataTypes yangDataTypes = ((YangType) typeData).getDataType();
+            YangResolutionInfoImpl resolutionInfo;
+
+            // Validate node identifier.
+            YangNodeIdentifier nodeIdentifier = getValidNodeIdentifier(ctx.baseStatement().string().getText(),
+                                                                       BASE_DATA, ctx);
+            identityRef.setBaseIdentity(nodeIdentifier);
+            ((YangType) typeData).setDataTypeExtendedInfo(identityRef);
+
+            int errorLine = ctx.getStart().getLine();
+            int errorPosition = ctx.getStart().getCharPositionInLine();
+
+            Parsable tmpData = listener.getParsedDataStack().peek();
+            switch (tmpData.getYangConstructType()) {
+                case LEAF_DATA:
+
+                    // Pop the stack entry to obtain the parent YANG node.
+                    Parsable leaf = listener.getParsedDataStack().pop();
+                    Parsable parentNodeOfLeaf = listener.getParsedDataStack().peek();
+
+                    // Push the popped entry back to the stack.
+                    listener.getParsedDataStack().push(leaf);
+
+                    // Verify parent node of leaf
+                    if (!(parentNodeOfLeaf instanceof YangNode)) {
+                        throw new ParserException(constructListenerErrorMessage(INVALID_HOLDER,
+                                                                                IDENTITYREF_DATA, ctx.getText(), EXIT));
+                    }
+
+                    identityRef.setResolvableStatus(UNRESOLVED);
+
+                    // Add resolution information to the list
+                    resolutionInfo =  new YangResolutionInfoImpl<YangIdentityRef>(identityRef,
+                                                  (YangNode) parentNodeOfLeaf, errorLine, errorPosition);
+                    addToResolutionList(resolutionInfo, ctx);
+
+                    break;
+                case LEAF_LIST_DATA:
+
+                    // Pop the stack entry to obtain the parent YANG node.
+                    Parsable leafList = listener.getParsedDataStack().pop();
+                    Parsable parentNodeOfLeafList = listener.getParsedDataStack().peek();
+
+                    // Push the popped entry back to the stack.
+                    listener.getParsedDataStack().push(leafList);
+
+                    // Verify parent node of leaf
+                    if (!(parentNodeOfLeafList instanceof YangNode)) {
+                        throw new ParserException(constructListenerErrorMessage(INVALID_HOLDER,
+                                                                                IDENTITYREF_DATA, ctx.getText(), EXIT));
+                    }
+
+                    identityRef.setResolvableStatus(UNRESOLVED);
+
+                    // Add resolution information to the list
+                    resolutionInfo = new YangResolutionInfoImpl<YangIdentityRef>(identityRef,
+                                               (YangNode) parentNodeOfLeafList, errorLine, errorPosition);
+                    addToResolutionList(resolutionInfo, ctx);
+                    break;
+                case UNION_DATA:
+
+                    Parsable parentNodeOfUnionNode = listener.getParsedDataStack().peek();
+
+                    // Verify parent node of leaf
+                    if (!(parentNodeOfUnionNode instanceof YangNode)) {
+                        throw new ParserException(constructListenerErrorMessage(INVALID_HOLDER,
+                                                                                IDENTITYREF_DATA, ctx.getText(), EXIT));
+                    }
+
+                    identityRef.setResolvableStatus(UNRESOLVED);
+
+                    // Add resolution information to the list
+                    resolutionInfo = new YangResolutionInfoImpl<YangIdentityRef>(identityRef,
+                                              (YangNode) parentNodeOfUnionNode, errorLine, errorPosition);
+                    addToResolutionList(resolutionInfo, ctx);
+
+                    break;
+                case TYPEDEF_DATA:
+                    /**
+                     * Do not add the identity ref to resolution list. It needs to be
+                     * added to resolution list, when leaf/leaf list references to
+                     * this typedef. At this time that leaf/leaf-list becomes the
+                     * parent for the identityref.
+                     */
+                    break;
+                default:
+                    throw new ParserException(constructListenerErrorMessage(INVALID_HOLDER, IDENTITYREF_DATA,
+                                                                            ctx.getText(), EXIT));
+            }
+            listener.getParsedDataStack().push(typeData);
+            listener.getParsedDataStack().push(identityRef);
+         } else {
+            throw new ParserException(constructListenerErrorMessage(INVALID_HOLDER, IDENTITYREF_DATA, "", ENTRY));
+        }
+    }
+
+    /**
+     * Performs validations and update the data model tree when parser exits from grammar
+     * rule (identityref).
+     *
+     * @param listener Listener's object
+     * @param ctx      context object of the grammar rule
+     */
+    public static void processIdentityrefExit(TreeWalkListener listener,
+                                       GeneratedYangParser.IdentityrefSpecificationContext ctx) {
+
+        // Check for stack to be non empty.
+        checkStackIsNotEmpty(listener, MISSING_CURRENT_HOLDER, IDENTITYREF_DATA, ctx.getText(), EXIT);
+
+        Parsable parsableType = listener.getParsedDataStack().pop();
+        if (!(parsableType instanceof YangIdentityRef)) {
+            throw new ParserException(constructListenerErrorMessage(INVALID_HOLDER, IDENTITYREF_DATA,
+                                                                    ctx.getText(), EXIT));
+        }
+    }
+
+    /**
+     * Adds to resolution list.
+     *
+     * @param resolutionInfo resolution information
+     * @param ctx            context object of the grammar rule
+     */
+    private static void addToResolutionList(YangResolutionInfoImpl<YangIdentityRef> resolutionInfo,
+                                            GeneratedYangParser.IdentityrefSpecificationContext ctx) {
+        try {
+            addResolutionInfo(resolutionInfo);
+        } catch (DataModelException e) {
+            throw new ParserException(constructExtendedListenerErrorMessage(UNHANDLED_PARSED_DATA,
+                                               IDENTITYREF_DATA, ctx.getText(), ENTRY, e.getMessage()));
+        }
+    }
+}
diff --git a/utils/yangutils/plugin/src/main/java/org/onosproject/yangutils/parser/impl/listeners/ModuleListener.java b/utils/yangutils/plugin/src/main/java/org/onosproject/yangutils/parser/impl/listeners/ModuleListener.java
index ebf9d97..5b50ff9 100644
--- a/utils/yangutils/plugin/src/main/java/org/onosproject/yangutils/parser/impl/listeners/ModuleListener.java
+++ b/utils/yangutils/plugin/src/main/java/org/onosproject/yangutils/parser/impl/listeners/ModuleListener.java
@@ -130,6 +130,10 @@
                     .peek()).resolveSelfFileLinking(ResolvableType.YANG_DERIVED_DATA_TYPE);
             ((YangReferenceResolver) listener.getParsedDataStack()
                     .peek()).resolveSelfFileLinking(ResolvableType.YANG_LEAFREF);
+            ((YangReferenceResolver) listener.getParsedDataStack()
+                    .peek()).resolveSelfFileLinking(ResolvableType.YANG_BASE);
+            ((YangReferenceResolver) listener.getParsedDataStack()
+                    .peek()).resolveSelfFileLinking(ResolvableType.YANG_IDENTITYREF);
         } catch (DataModelException e) {
             LinkerException linkerException = new LinkerException(e.getMessage());
             linkerException.setLine(e.getLineNumber());
diff --git a/utils/yangutils/plugin/src/main/java/org/onosproject/yangutils/parser/impl/listeners/SubModuleListener.java b/utils/yangutils/plugin/src/main/java/org/onosproject/yangutils/parser/impl/listeners/SubModuleListener.java
index 2132324..d2c4f48 100644
--- a/utils/yangutils/plugin/src/main/java/org/onosproject/yangutils/parser/impl/listeners/SubModuleListener.java
+++ b/utils/yangutils/plugin/src/main/java/org/onosproject/yangutils/parser/impl/listeners/SubModuleListener.java
@@ -135,6 +135,10 @@
                     .resolveSelfFileLinking(ResolvableType.YANG_DERIVED_DATA_TYPE);
             ((YangReferenceResolver) listener.getParsedDataStack().peek())
                     .resolveSelfFileLinking(ResolvableType.YANG_LEAFREF);
+            ((YangReferenceResolver) listener.getParsedDataStack().peek())
+                    .resolveSelfFileLinking(ResolvableType.YANG_BASE);
+            ((YangReferenceResolver) listener.getParsedDataStack().peek())
+                    .resolveSelfFileLinking(ResolvableType.YANG_IDENTITYREF);
         } catch (DataModelException e) {
             LinkerException linkerException = new LinkerException(e.getMessage());
             linkerException.setLine(e.getLineNumber());
diff --git a/utils/yangutils/plugin/src/main/java/org/onosproject/yangutils/parser/impl/listeners/TypeListener.java b/utils/yangutils/plugin/src/main/java/org/onosproject/yangutils/parser/impl/listeners/TypeListener.java
index 32955d5..e108d14 100644
--- a/utils/yangutils/plugin/src/main/java/org/onosproject/yangutils/parser/impl/listeners/TypeListener.java
+++ b/utils/yangutils/plugin/src/main/java/org/onosproject/yangutils/parser/impl/listeners/TypeListener.java
@@ -310,7 +310,11 @@
                     parserException = new ParserException("YANG file error : a type leafref" +
                             " must have one path statement.");
                     break;
-                // TODO : decimal64, identity ref
+                case IDENTITYREF:
+                    parserException = new ParserException("YANG file error : a type identityref" +
+                                                                  " must have base statement.");
+                    break;
+                // TODO : decimal64,
                 default:
                     return;
             }
diff --git a/utils/yangutils/plugin/src/main/java/org/onosproject/yangutils/parser/impl/parserutils/ListenerUtil.java b/utils/yangutils/plugin/src/main/java/org/onosproject/yangutils/parser/impl/parserutils/ListenerUtil.java
index 2aaa563..48ac0de 100644
--- a/utils/yangutils/plugin/src/main/java/org/onosproject/yangutils/parser/impl/parserutils/ListenerUtil.java
+++ b/utils/yangutils/plugin/src/main/java/org/onosproject/yangutils/parser/impl/parserutils/ListenerUtil.java
@@ -48,10 +48,8 @@
 import static org.onosproject.yangutils.utils.UtilConstants.CLOSE_PARENTHESIS;
 import static org.onosproject.yangutils.utils.UtilConstants.COLON;
 import static org.onosproject.yangutils.utils.UtilConstants.CURRENT;
-import static org.onosproject.yangutils.utils.UtilConstants.CURRENTLY_UNSUPPORTED;
 import static org.onosproject.yangutils.utils.UtilConstants.EMPTY_STRING;
 import static org.onosproject.yangutils.utils.UtilConstants.FALSE;
-import static org.onosproject.yangutils.utils.UtilConstants.IDENTITYREF;
 import static org.onosproject.yangutils.utils.UtilConstants.OPEN_SQUARE_BRACKET;
 import static org.onosproject.yangutils.utils.UtilConstants.QUOTES;
 import static org.onosproject.yangutils.utils.UtilConstants.SLASH;
@@ -341,7 +339,6 @@
         String[] tmpData = tmpIdentifierString.split(Pattern.quote(COLON));
         if (tmpData.length == 1) {
             YangNodeIdentifier nodeIdentifier = new YangNodeIdentifier();
-            checkForUnsupportedTypes(tmpData[0], yangConstruct, ctx);
             nodeIdentifier.setName(getValidIdentifier(tmpData[0], yangConstruct, ctx));
             return nodeIdentifier;
         } else if (tmpData.length == 2) {
@@ -375,7 +372,6 @@
         String[] tmpData = tmpIdentifierString.split(Pattern.quote(COLON));
         if (tmpData.length == 1) {
             YangNodeIdentifier nodeIdentifier = new YangNodeIdentifier();
-            checkForUnsupportedTypes(tmpData[0], yangConstruct, ctx);
             nodeIdentifier.setName(getValidIdentifierForLeafref(tmpData[0], yangConstruct, ctx, yangLeafRef));
             return nodeIdentifier;
         } else if (tmpData.length == 2) {
@@ -706,24 +702,6 @@
     }
 
     /**
-     * Checks whether the type is an unsupported type.
-     *
-     * @param typeName name of the type
-     * @param yangConstruct yang construct to check if it is type
-     * @param ctx yang construct's context to get the line number and character position
-     */
-    private static void checkForUnsupportedTypes(String typeName,
-            YangConstructType yangConstruct, ParserRuleContext ctx) {
-
-        if (yangConstruct == YangConstructType.TYPE_DATA) {
-            if (typeName.equalsIgnoreCase(IDENTITYREF)) {
-                handleUnsupportedYangConstruct(YangConstructType.IDENTITYREF_DATA,
-                        ctx, CURRENTLY_UNSUPPORTED);
-            }
-        }
-    }
-
-    /**
      * Checks and return valid absolute schema node id.
      *
      * @param argumentString string from yang file
diff --git a/utils/yangutils/plugin/src/main/java/org/onosproject/yangutils/translator/tojava/GeneratedJavaFileType.java b/utils/yangutils/plugin/src/main/java/org/onosproject/yangutils/translator/tojava/GeneratedJavaFileType.java
index d4666c0c..1a2b9b8 100644
--- a/utils/yangutils/plugin/src/main/java/org/onosproject/yangutils/translator/tojava/GeneratedJavaFileType.java
+++ b/utils/yangutils/plugin/src/main/java/org/onosproject/yangutils/translator/tojava/GeneratedJavaFileType.java
@@ -89,6 +89,11 @@
     public static final int GENERATE_EVENT_SUBJECT_CLASS = 1024;
 
     /**
+     * Identity listener class.
+     */
+    public static final int GENERATE_IDENTITY_CLASS = 2048;
+
+    /**
      * Creates an instance of generate java file type.
      */
     private GeneratedJavaFileType() {
diff --git a/utils/yangutils/plugin/src/main/java/org/onosproject/yangutils/translator/tojava/YangDataModelFactory.java b/utils/yangutils/plugin/src/main/java/org/onosproject/yangutils/translator/tojava/YangDataModelFactory.java
index 4d68fe2..9ba4068 100644
--- a/utils/yangutils/plugin/src/main/java/org/onosproject/yangutils/translator/tojava/YangDataModelFactory.java
+++ b/utils/yangutils/plugin/src/main/java/org/onosproject/yangutils/translator/tojava/YangDataModelFactory.java
@@ -20,6 +20,7 @@
 import org.onosproject.yangutils.datamodel.YangChoice;
 import org.onosproject.yangutils.datamodel.YangContainer;
 import org.onosproject.yangutils.datamodel.YangGrouping;
+import org.onosproject.yangutils.datamodel.YangIdentity;
 import org.onosproject.yangutils.datamodel.YangInput;
 import org.onosproject.yangutils.datamodel.YangLeaf;
 import org.onosproject.yangutils.datamodel.YangLeafList;
@@ -41,6 +42,7 @@
 import org.onosproject.yangutils.translator.tojava.javamodel.YangJavaContainer;
 import org.onosproject.yangutils.translator.tojava.javamodel.YangJavaEnumeration;
 import org.onosproject.yangutils.translator.tojava.javamodel.YangJavaGrouping;
+import org.onosproject.yangutils.translator.tojava.javamodel.YangJavaIdentity;
 import org.onosproject.yangutils.translator.tojava.javamodel.YangJavaInput;
 import org.onosproject.yangutils.translator.tojava.javamodel.YangJavaLeaf;
 import org.onosproject.yangutils.translator.tojava.javamodel.YangJavaLeafList;
@@ -163,6 +165,24 @@
      * generated
      * @return the corresponding inherited node based on the target language
      */
+    public static YangIdentity getYangIdentityNode(GeneratedLanguage targetLanguage) {
+        switch (targetLanguage) {
+            case JAVA_GENERATION: {
+                return new YangJavaIdentity();
+            }
+            default: {
+                throw new TranslatorException("Only YANG to Java is supported.");
+            }
+        }
+    }
+
+    /**
+     * Returns based on the target language generate the inherited data model node.
+     *
+     * @param targetLanguage target language in which YANG mapping needs to be
+     * generated
+     * @return the corresponding inherited node based on the target language
+     */
     public static YangGrouping getYangGroupingNode(GeneratedLanguage targetLanguage) {
         switch (targetLanguage) {
             case JAVA_GENERATION: {
diff --git a/utils/yangutils/plugin/src/main/java/org/onosproject/yangutils/translator/tojava/javamodel/AttributesJavaDataType.java b/utils/yangutils/plugin/src/main/java/org/onosproject/yangutils/translator/tojava/javamodel/AttributesJavaDataType.java
index 6df66af..52595c7 100644
--- a/utils/yangutils/plugin/src/main/java/org/onosproject/yangutils/translator/tojava/javamodel/AttributesJavaDataType.java
+++ b/utils/yangutils/plugin/src/main/java/org/onosproject/yangutils/translator/tojava/javamodel/AttributesJavaDataType.java
@@ -20,7 +20,9 @@
 
 import org.onosproject.yangutils.datamodel.YangDerivedInfo;
 import org.onosproject.yangutils.datamodel.YangEnumeration;
+import org.onosproject.yangutils.datamodel.YangIdentity;
 import org.onosproject.yangutils.datamodel.YangLeafRef;
+import org.onosproject.yangutils.datamodel.YangIdentityRef;
 import org.onosproject.yangutils.datamodel.YangNode;
 import org.onosproject.yangutils.datamodel.YangType;
 import org.onosproject.yangutils.datamodel.YangTypeDef;
@@ -161,8 +163,10 @@
                     YangType<?> referredType = getReferredTypeFromLeafref(yangType);
                     return getJavaImportClass(referredType, isListAttr, pluginConfig);
                 case IDENTITYREF:
-                    //TODO:IDENTITYREF
-                    break;
+                    YangIdentityRef identityRef = (YangIdentityRef) yangType.getDataTypeExtendedInfo();
+                    YangIdentity identity = identityRef.getReferredIdentity();
+                    return getCapitalCase(getCamelCase(((YangJavaIdentity) identity).
+                                                        getName(), pluginConfig));
                 case EMPTY:
                     return BOOLEAN_WRAPPER;
                 case UNION:
@@ -196,8 +200,9 @@
                     YangType<?> referredType = getReferredTypeFromLeafref(yangType);
                     return getJavaImportClass(referredType, isListAttr, pluginConfig);
                 case IDENTITYREF:
-                    //TODO:IDENTITYREF
-                    break;
+                    YangIdentityRef identityRef = (YangIdentityRef) yangType.getDataTypeExtendedInfo();
+                    YangIdentity identity = identityRef.getReferredIdentity();
+                    return getCapitalCase(getCamelCase(((YangJavaIdentity) identity).getName(), pluginConfig));
                 case EMPTY:
                     return BOOLEAN_DATA_TYPE;
                 case UNION:
@@ -212,7 +217,6 @@
                     return null;
             }
         }
-        return null;
     }
 
     /**
@@ -253,8 +257,7 @@
                     YangType<?> referredType = getReferredTypeFromLeafref(yangType);
                     return getJavaImportPackage(referredType, isListAttr, conflictResolver);
                 case IDENTITYREF:
-                    //TODO:IDENTITYREF
-                    break;
+                    return getIdentityRefPackage(yangType, conflictResolver);
                 case UNION:
                     return getUnionPackage(yangType, conflictResolver);
                 case INSTANCE_IDENTIFIER:
@@ -280,8 +283,7 @@
                     YangType<?> referredType = getReferredTypeFromLeafref(yangType);
                     return getJavaImportPackage(referredType, isListAttr, conflictResolver);
                 case IDENTITYREF:
-                    //TODO:IDENTITYREF
-                    break;
+                    return getIdentityRefPackage(yangType, conflictResolver);
                 case EMPTY:
                     return JAVA_LANG;
                 case UNION:
@@ -294,7 +296,6 @@
                     return null;
             }
         }
-        return null;
     }
 
     /**
@@ -361,6 +362,25 @@
     }
 
     /**
+     * Returns YANG identity's java package.
+     *
+     * @param type             YANG type
+     * @param conflictResolver object of YANG to java naming conflict util
+     * @return YANG identity's java package
+     */
+    private static String getIdentityRefPackage(YangType<?> type, YangToJavaNamingConflictUtil conflictResolver) {
+
+        if (!(type.getDataTypeExtendedInfo() instanceof YangIdentityRef)) {
+            throw new TranslatorException("type should have been identityref.");
+        }
+        YangIdentityRef identityRef = (YangIdentityRef) type.getDataTypeExtendedInfo();
+        YangJavaIdentity identity = (YangJavaIdentity) (identityRef.getReferredIdentity());
+        if (identity.getJavaFileInfo().getPackage() == null) {
+            return getPackageFromParent(identity.getParent(), conflictResolver);
+        }
+        return identity.getJavaFileInfo().getPackage();
+    }
+    /**
      * Returns package from parent node.
      *
      * @param parent           parent YANG node
diff --git a/utils/yangutils/plugin/src/main/java/org/onosproject/yangutils/translator/tojava/javamodel/YangJavaIdentity.java b/utils/yangutils/plugin/src/main/java/org/onosproject/yangutils/translator/tojava/javamodel/YangJavaIdentity.java
new file mode 100644
index 0000000..ec0e637
--- /dev/null
+++ b/utils/yangutils/plugin/src/main/java/org/onosproject/yangutils/translator/tojava/javamodel/YangJavaIdentity.java
@@ -0,0 +1,168 @@
+/*
+ * Copyright 2016-present Open Networking Laboratory
+ *
+ * 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.
+ */
+package org.onosproject.yangutils.translator.tojava.javamodel;
+
+import org.onosproject.yangutils.datamodel.YangIdentity;
+import org.onosproject.yangutils.translator.exception.TranslatorException;
+import org.onosproject.yangutils.translator.tojava.JavaCodeGenerator;
+import org.onosproject.yangutils.translator.tojava.JavaCodeGeneratorInfo;
+import org.onosproject.yangutils.translator.tojava.JavaFileInfo;
+import org.onosproject.yangutils.translator.tojava.JavaImportData;
+import org.onosproject.yangutils.translator.tojava.JavaQualifiedTypeInfo;
+import org.onosproject.yangutils.translator.tojava.TempJavaCodeFragmentFiles;
+import org.onosproject.yangutils.utils.io.impl.YangPluginConfig;
+
+import java.io.File;
+import java.io.IOException;
+import java.util.List;
+
+import static org.onosproject.yangutils.translator.tojava.GeneratedJavaFileType.GENERATE_INTERFACE_WITH_BUILDER;
+import static org.onosproject.yangutils.translator.tojava.GeneratedJavaFileType.GENERATE_IDENTITY_CLASS;
+import static org.onosproject.yangutils.translator.tojava.javamodel.YangJavaModelUtils.updatePackageInfo;
+import static org.onosproject.yangutils.translator.tojava.utils.JavaFileGeneratorUtils.getFileObject;
+import static org.onosproject.yangutils.translator.tojava.utils.JavaFileGeneratorUtils.initiateJavaFileGeneration;
+import static org.onosproject.yangutils.translator.tojava.utils.JavaIdentifierSyntax.createPackage;
+import static org.onosproject.yangutils.translator.tojava.utils.TempJavaCodeFragmentFilesUtils.closeFile;
+import static org.onosproject.yangutils.utils.io.impl.YangIoUtils.getCapitalCase;
+
+/**
+ * Represents input information extended to support java code generation.
+ */
+public class YangJavaIdentity extends YangIdentity
+        implements JavaCodeGeneratorInfo, JavaCodeGenerator {
+
+    //File type extension for java classes.
+    private static final String JAVA_FILE_EXTENSION = ".java";
+
+
+    //Contains the information of the java file being generated.
+    private JavaFileInfo javaFileInfo;
+
+    //Contains the information of the importd.
+    private transient JavaImportData importData;
+
+    /**
+     * File handle to maintain temporary java code fragments as per the code
+     * snippet types.
+     */
+    private TempJavaCodeFragmentFiles tempFileHandle;
+
+    /**
+     * Creates YANG java container object.
+     */
+    public YangJavaIdentity() {
+        setJavaFileInfo(new JavaFileInfo());
+        getJavaFileInfo().setGeneratedFileTypes(GENERATE_INTERFACE_WITH_BUILDER);
+        importData = new JavaImportData();
+    }
+
+    /**
+     * Returns the generated java file information.
+     *
+     * @return generated java file information
+     */
+    @Override
+    public JavaFileInfo getJavaFileInfo() {
+        if (javaFileInfo == null) {
+            throw new TranslatorException("Missing java info in java datamodel node");
+        }
+        return javaFileInfo;
+    }
+
+    /**
+     * Sets the java file info object.
+     *
+     * @param javaInfo java file info object
+     */
+    @Override
+    public void setJavaFileInfo(JavaFileInfo javaInfo) {
+        javaFileInfo = javaInfo;
+    }
+
+    /**
+     * Returns the temporary file handle.
+     *
+     * @return temporary file handle
+     */
+    @Override
+    public TempJavaCodeFragmentFiles getTempJavaCodeFragmentFiles() {
+        return tempFileHandle;
+    }
+
+    /**
+     * Sets temporary file handle.
+     *
+     * @param fileHandle temporary file handle
+     */
+    @Override
+    public void setTempJavaCodeFragmentFiles(TempJavaCodeFragmentFiles fileHandle) {
+        tempFileHandle = fileHandle;
+    }
+
+    /**
+     * Prepare the information for java code generation corresponding to YANG
+     * container info.
+     *
+     * @param yangPlugin YANG plugin config
+     * @throws TranslatorException translator operation fail
+     */
+    @Override
+    public void generateCodeEntry(YangPluginConfig yangPlugin) throws TranslatorException {
+        try {
+            updatePackageInfo(this, yangPlugin);
+            JavaQualifiedTypeInfo basePkgInfo = new JavaQualifiedTypeInfo();
+            String className = getCapitalCase(getJavaFileInfo().getJavaName());
+            String path = getJavaFileInfo().getPackageFilePath();
+            createPackage(this);
+            List<String> imports = null;
+            boolean isQualified = false;
+
+            if (getBaseNode() != null && getBaseNode().getReferredIdentity() != null) {
+                if (!(getBaseNode().getReferredIdentity() instanceof YangJavaIdentity)) {
+                    throw new TranslatorException("Failed to prepare generate code entry for base node");
+                }
+                YangJavaIdentity baseIdentity = (YangJavaIdentity) getBaseNode().getReferredIdentity();
+                String baseClassName = getCapitalCase(baseIdentity.getJavaFileInfo().getJavaName());
+                String basePkg =  baseIdentity.getJavaFileInfo().getPackage();
+                basePkgInfo.setClassInfo(baseClassName);
+                basePkgInfo.setPkgInfo(basePkg);
+                isQualified = importData.addImportInfo(basePkgInfo, className, getJavaFileInfo().getPackage());
+                if (!isQualified) {
+                    imports = importData.getImports();
+                }
+            }
+
+            File file = getFileObject(path, className, JAVA_FILE_EXTENSION, getJavaFileInfo());
+
+            initiateJavaFileGeneration(file, GENERATE_IDENTITY_CLASS, imports, this, className);
+            closeFile(file, false);
+        } catch (IOException e) {
+            throw new TranslatorException(
+                    "Failed to prepare generate code entry for identity node " + this.getName());
+        }
+    }
+
+    /**
+     * Create a java file using the YANG container info.
+     *
+     * @throws TranslatorException translator operation fail
+     */
+    @Override
+    public void generateCodeExit() throws TranslatorException {
+        /* Do nothing, file is already generated in entry*/
+    }
+}
+
diff --git a/utils/yangutils/plugin/src/main/java/org/onosproject/yangutils/translator/tojava/utils/ClassDefinitionGenerator.java b/utils/yangutils/plugin/src/main/java/org/onosproject/yangutils/translator/tojava/utils/ClassDefinitionGenerator.java
index 69f6d3e..ab8134f 100644
--- a/utils/yangutils/plugin/src/main/java/org/onosproject/yangutils/translator/tojava/utils/ClassDefinitionGenerator.java
+++ b/utils/yangutils/plugin/src/main/java/org/onosproject/yangutils/translator/tojava/utils/ClassDefinitionGenerator.java
@@ -16,10 +16,13 @@
 
 package org.onosproject.yangutils.translator.tojava.utils;
 
+import org.onosproject.yangutils.datamodel.YangIdentity;
 import org.onosproject.yangutils.datamodel.YangNode;
 import org.onosproject.yangutils.datamodel.YangNotification;
+import org.onosproject.yangutils.translator.exception.TranslatorException;
 import org.onosproject.yangutils.translator.tojava.JavaQualifiedTypeInfo;
 import org.onosproject.yangutils.translator.tojava.TempJavaCodeFragmentFilesContainer;
+import org.onosproject.yangutils.translator.tojava.javamodel.YangJavaIdentity;
 
 import static org.onosproject.yangutils.translator.tojava.GeneratedJavaFileType.BUILDER_CLASS_MASK;
 import static org.onosproject.yangutils.translator.tojava.GeneratedJavaFileType.BUILDER_INTERFACE_MASK;
@@ -27,6 +30,7 @@
 import static org.onosproject.yangutils.translator.tojava.GeneratedJavaFileType.GENERATE_EVENT_CLASS;
 import static org.onosproject.yangutils.translator.tojava.GeneratedJavaFileType.GENERATE_EVENT_LISTENER_INTERFACE;
 import static org.onosproject.yangutils.translator.tojava.GeneratedJavaFileType.GENERATE_EVENT_SUBJECT_CLASS;
+import static org.onosproject.yangutils.translator.tojava.GeneratedJavaFileType.GENERATE_IDENTITY_CLASS;
 import static org.onosproject.yangutils.translator.tojava.GeneratedJavaFileType.GENERATE_SERVICE_AND_MANAGER;
 import static org.onosproject.yangutils.translator.tojava.GeneratedJavaFileType.GENERATE_TYPEDEF_CLASS;
 import static org.onosproject.yangutils.translator.tojava.GeneratedJavaFileType.GENERATE_UNION_CLASS;
@@ -57,6 +61,8 @@
 import static org.onosproject.yangutils.utils.UtilConstants.SERVICE;
 import static org.onosproject.yangutils.utils.UtilConstants.SPACE;
 import static org.onosproject.yangutils.utils.UtilConstants.SUBJECT;
+import static org.onosproject.yangutils.utils.UtilConstants.ABSTRACT;
+import static org.onosproject.yangutils.utils.io.impl.YangIoUtils.getCapitalCase;
 import static org.onosproject.yangutils.utils.io.impl.YangIoUtils.trimAtLast;
 
 /**
@@ -128,6 +134,8 @@
                 return getEventListenerDefinition(yangName);
             case GENERATE_EVENT_SUBJECT_CLASS:
                 return getClassDefinition(yangName);
+            case GENERATE_IDENTITY_CLASS:
+                return getIdentityClassDefinition(yangName, curNode);
             default:
                 return null;
         }
@@ -214,6 +222,32 @@
     }
 
     /**
+     * Returns implementation file identity class definition.
+     *
+     * @param yangName file name
+     * @return identity class definition
+     */
+    private static String getIdentityClassDefinition(String yangName, YangNode curNode) {
+        if (!(curNode instanceof YangJavaIdentity)) {
+            throw new TranslatorException("Expected java identity instance node");
+        }
+        YangJavaIdentity identity = (YangJavaIdentity) curNode;
+        if (identity.getBaseNode() != null) {
+            YangIdentity baseIdentity = identity.getBaseNode().getReferredIdentity();
+            if (!(baseIdentity instanceof YangJavaIdentity)) {
+                throw new TranslatorException("Expected java identity instance node");
+            }
+
+            YangJavaIdentity baseJavaIdentity = (YangJavaIdentity) baseIdentity;
+            return PUBLIC + SPACE + ABSTRACT + SPACE + CLASS + SPACE + yangName + SPACE + EXTEND + SPACE
+                    + getCapitalCase(baseJavaIdentity.getJavaFileInfo().getJavaName()) + SPACE +
+                    OPEN_CURLY_BRACKET + NEW_LINE;
+        }
+
+        return PUBLIC + SPACE + ABSTRACT + SPACE + CLASS + SPACE + yangName + SPACE + OPEN_CURLY_BRACKET + NEW_LINE;
+    }
+
+    /**
      * Returns type file class definition.
      *
      * @param yangName file name
diff --git a/utils/yangutils/plugin/src/main/java/org/onosproject/yangutils/translator/tojava/utils/JavaFileGeneratorUtils.java b/utils/yangutils/plugin/src/main/java/org/onosproject/yangutils/translator/tojava/utils/JavaFileGeneratorUtils.java
index fc24ff9..4a2b6f5 100644
--- a/utils/yangutils/plugin/src/main/java/org/onosproject/yangutils/translator/tojava/utils/JavaFileGeneratorUtils.java
+++ b/utils/yangutils/plugin/src/main/java/org/onosproject/yangutils/translator/tojava/utils/JavaFileGeneratorUtils.java
@@ -42,6 +42,7 @@
 import static org.onosproject.yangutils.translator.tojava.GeneratedJavaFileType.GENERATE_SERVICE_AND_MANAGER;
 import static org.onosproject.yangutils.translator.tojava.GeneratedJavaFileType.GENERATE_TYPEDEF_CLASS;
 import static org.onosproject.yangutils.translator.tojava.GeneratedJavaFileType.GENERATE_UNION_CLASS;
+import static org.onosproject.yangutils.translator.tojava.GeneratedJavaFileType.GENERATE_IDENTITY_CLASS;
 import static org.onosproject.yangutils.translator.tojava.GeneratedJavaFileType.IMPL_CLASS_MASK;
 import static org.onosproject.yangutils.translator.tojava.GeneratedJavaFileType.INTERFACE_MASK;
 import static org.onosproject.yangutils.translator.tojava.GeneratedTempFileType.ATTRIBUTES_MASK;
@@ -68,6 +69,7 @@
 import static org.onosproject.yangutils.utils.io.impl.YangIoUtils.getJavaPackageFromPackagePath;
 import static org.onosproject.yangutils.utils.io.impl.YangIoUtils.getSmallCase;
 import static org.onosproject.yangutils.utils.UtilConstants.CLOSE_PARENTHESIS;
+import static org.onosproject.yangutils.utils.UtilConstants.CLOSE_CURLY_BRACKET;
 import static org.onosproject.yangutils.utils.UtilConstants.COMPONENT_ANNOTATION;
 import static org.onosproject.yangutils.utils.UtilConstants.EQUAL;
 import static org.onosproject.yangutils.utils.UtilConstants.FOUR_SPACE_INDENTATION;
@@ -294,6 +296,7 @@
             }
 
             file.createNewFile();
+
             appendContents(file, genType, imports, curNode, className);
         } catch (IOException e) {
             throw new IOException("Failed to create " + file.getName() + " class file.");
@@ -348,6 +351,11 @@
                 appendHeaderContents(file, pkgString, importsList);
                 write(file, genType, EVENT_SUBJECT_CLASS, curNode, className);
                 break;
+            case GENERATE_IDENTITY_CLASS:
+                appendHeaderContents(file, pkgString, importsList);
+                write(file, genType, EVENT_SUBJECT_CLASS, curNode, className);
+                insertDataIntoJavaFile(file, CLOSE_CURLY_BRACKET);
+                break;
             default:
                 break;
         }
diff --git a/utils/yangutils/plugin/src/main/java/org/onosproject/yangutils/utils/UtilConstants.java b/utils/yangutils/plugin/src/main/java/org/onosproject/yangutils/utils/UtilConstants.java
index 032493c..d56a2ed 100644
--- a/utils/yangutils/plugin/src/main/java/org/onosproject/yangutils/utils/UtilConstants.java
+++ b/utils/yangutils/plugin/src/main/java/org/onosproject/yangutils/utils/UtilConstants.java
@@ -647,6 +647,11 @@
     public static final String PUBLIC = "public";
 
     /**
+     * Static attribute for abstract modifier.
+     */
+    public static final String ABSTRACT = "abstract";
+
+    /**
      * Static attribute for protected modifier.
      */
     public static final String PROTECTED = "protected";
@@ -1196,6 +1201,18 @@
             + "leaf/leaf-list for given leafref";
 
     /**
+     * Static attribute for base linker error information.
+     */
+    public static final String BASE_LINKER_ERROR = "YANG file error: Unable to find base "
+            + "identity for given base";
+
+    /**
+     * Static attribute for identityref linker error information.
+     */
+    public static final String IDENTITYREF_LINKER_ERROR = "YANG file error: Unable to find base "
+            + "identity for given base";
+
+    /**
      * Static attribute for reference.
      */
     public static final String REFERENCE = "Reference";
diff --git a/utils/yangutils/plugin/src/test/java/org/onosproject/yangutils/parser/impl/listeners/IdentityListenerTest.java b/utils/yangutils/plugin/src/test/java/org/onosproject/yangutils/parser/impl/listeners/IdentityListenerTest.java
new file mode 100644
index 0000000..b0ae937
--- /dev/null
+++ b/utils/yangutils/plugin/src/test/java/org/onosproject/yangutils/parser/impl/listeners/IdentityListenerTest.java
@@ -0,0 +1,220 @@
+/*
+ * Copyright 2016-present Open Networking Laboratory
+ *
+ * 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.
+ */
+package org.onosproject.yangutils.parser.impl.listeners;
+
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.rules.ExpectedException;
+import org.onosproject.yangutils.datamodel.YangIdentity;
+import org.onosproject.yangutils.datamodel.YangIdentityRef;
+import org.onosproject.yangutils.datamodel.YangLeaf;
+import org.onosproject.yangutils.datamodel.YangLeafList;
+import org.onosproject.yangutils.datamodel.YangModule;
+import org.onosproject.yangutils.datamodel.YangNode;
+import org.onosproject.yangutils.datamodel.YangNodeType;
+import org.onosproject.yangutils.datamodel.YangType;
+import org.onosproject.yangutils.datamodel.YangTypeDef;
+import org.onosproject.yangutils.datamodel.utils.ResolvableStatus;
+import org.onosproject.yangutils.datamodel.utils.builtindatatype.YangDataTypes;
+import org.onosproject.yangutils.parser.exceptions.ParserException;
+import org.onosproject.yangutils.parser.impl.YangUtilsParserManager;
+
+import java.io.IOException;
+import java.util.ListIterator;
+
+import static org.hamcrest.MatcherAssert.assertThat;
+import static org.hamcrest.core.Is.is;
+
+/**
+ * Test case for identity listener.
+ */
+public class IdentityListenerTest {
+    @Rule
+    public ExpectedException thrown = ExpectedException.none();
+
+    private final YangUtilsParserManager manager = new YangUtilsParserManager();
+
+    /**
+     * Checks for updating datamodel for identity/identityref.
+     */
+    @Test
+    public void processIdentityrefType() throws IOException, ParserException {
+
+        YangNode node = manager
+                .getDataModel("src/test/resources/IdentityListener.yang");
+
+        // Check whether the data model tree returned is of type module.
+        assertThat((node instanceof YangModule), is(true));
+
+        // Check whether the node type is set properly to module.
+        assertThat(node.getNodeType(), is(YangNodeType.MODULE_NODE));
+
+        // Check whether the module name is set correctly.
+        YangModule yangNode = (YangModule) node;
+        assertThat(yangNode.getName(), is("IdentityListener"));
+
+        YangIdentity yangIdentity = (YangIdentity) yangNode.getChild();
+        assertThat(yangIdentity.getName(), is("tunnel"));
+
+        yangIdentity = (YangIdentity) yangNode.getChild().getNextSibling();
+        assertThat(yangIdentity.getName(), is("tunnel-type"));
+
+        yangIdentity = (YangIdentity) yangNode.getChild().getNextSibling().getNextSibling();
+        assertThat(yangIdentity.getName(), is("ref-address-family"));
+
+        yangIdentity = (YangIdentity) yangNode.getChild().getNextSibling().getNextSibling()
+                .getNextSibling();
+        assertThat(yangIdentity.getName(), is("ipv4-address-family"));
+        assertThat(yangIdentity.getBaseNode().getBaseIdentifier().getName(), is("ref-address-family"));
+        assertThat(yangIdentity.getBaseNode().getReferredIdentity().getName(), is("ref-address-family"));
+
+        yangIdentity = (YangIdentity) yangNode.getChild().getNextSibling().getNextSibling()
+                .getNextSibling().getNextSibling();
+        assertThat(yangIdentity.getName(), is("ipv6-address-family"));
+        assertThat(yangIdentity.getBaseNode().getBaseIdentifier().getName(), is("ref-address-family"));
+        assertThat(yangIdentity.getBaseNode().getReferredIdentity().getName(), is("ref-address-family"));
+        assertThat(yangIdentity.getBaseNode().getResolvableStatus(), is(ResolvableStatus.RESOLVED));
+
+        ListIterator<YangLeaf> leafIterator = yangNode.getListOfLeaf().listIterator();
+        YangLeaf leafInfo = leafIterator.next();
+
+        assertThat(leafInfo.getName(), is("tunnel"));
+        assertThat(leafInfo.getDataType().getDataTypeName(), is("identityref"));
+        assertThat(leafInfo.getDataType().getDataType(), is(YangDataTypes.IDENTITYREF));
+        YangIdentityRef yangIdentityRef = (YangIdentityRef) leafInfo.getDataType().getDataTypeExtendedInfo();
+        assertThat(yangIdentityRef.getName(), is("ref-address-family"));
+        assertThat(yangIdentityRef.getBaseIdentity().getName(), is("ref-address-family"));
+        assertThat(yangIdentityRef.getReferredIdentity().getName(), is("ref-address-family"));
+        assertThat(yangIdentityRef.getResolvableStatus(), is(ResolvableStatus.RESOLVED));
+
+        ListIterator<YangLeafList> leafListIterator = yangNode.getListOfLeafList().listIterator();
+        YangLeafList leafListInfo = leafListIterator.next();
+
+        // Check whether the information in the leaf is correct.
+        assertThat(leafListInfo.getName(), is("network-ref"));
+        assertThat(leafListInfo.getDataType().getDataTypeName(), is("identityref"));
+        assertThat(leafListInfo.getDataType().getDataType(), is(YangDataTypes.IDENTITYREF));
+        yangIdentityRef = (YangIdentityRef) (leafListInfo.getDataType().getDataTypeExtendedInfo());
+
+        // Check whether identityref type got resolved.
+        assertThat(yangIdentityRef.getResolvableStatus(), is(ResolvableStatus.RESOLVED));
+    }
+
+    /**
+     * Checks for updating datamodel for intrafile resolution identity/identityref.
+     */
+    @Test
+    public void processIntraIdentityrefType() throws IOException, ParserException {
+
+        YangNode node = manager
+                .getDataModel("src/test/resources/IdentityIntraFile.yang");
+
+        // Check whether the data model tree returned is of type module.
+        assertThat((node instanceof YangModule), is(true));
+
+        // Check whether the node type is set properly to module.
+        assertThat(node.getNodeType(), is(YangNodeType.MODULE_NODE));
+
+        // Check whether the module name is set correctly.
+        YangModule yangNode = (YangModule) node;
+        assertThat(yangNode.getName(), is("IdentityIntraFile"));
+
+        YangIdentity yangIdentity = (YangIdentity) yangNode.getChild();
+        assertThat(yangIdentity.getName(), is("ipv4-address-family"));
+        assertThat(yangIdentity.getBaseNode().getBaseIdentifier().getName(), is("ref-address-family"));
+        assertThat(yangIdentity.getBaseNode().getResolvableStatus(), is(ResolvableStatus.INTRA_FILE_RESOLVED));
+    }
+
+    /**
+     * Checks for updating datamodel for identityref used in tydedef.
+     */
+    @Test
+    public void processIdentityTypedefStatement() throws IOException, ParserException {
+
+        YangNode node = manager.getDataModel("src/test/resources/IdentityTypedef.yang");
+
+        // Check whether the data model tree returned is of type module.
+        assertThat((node instanceof YangModule), is(true));
+
+        // Check whether the node type is set properly to module.
+        assertThat(node.getNodeType(), is(YangNodeType.MODULE_NODE));
+
+        // Check whether the module name is set correctly.
+        YangModule yangNode = (YangModule) node;
+        assertThat(yangNode.getName(), is("Test"));
+
+        YangIdentity yangIdentity = (YangIdentity) yangNode.getChild();
+        assertThat(yangIdentity.getName(), is("tunnel"));
+
+        YangTypeDef typedef = (YangTypeDef) yangNode.getChild().getNextSibling();
+        assertThat(typedef.getName(), is("type15"));
+
+        YangType type = typedef.getTypeList().iterator().next();
+        assertThat(type.getDataType(), is(YangDataTypes.IDENTITYREF));
+        assertThat(type.getDataTypeName(), is("identityref"));
+
+        YangIdentityRef identityRef = (YangIdentityRef) type.getDataTypeExtendedInfo();
+        assertThat(identityRef.getName(), is("tunnel"));
+        assertThat(identityRef.getBaseIdentity().getName(), is("tunnel"));
+
+        ListIterator<YangLeaf> leafIterator = yangNode.getListOfLeaf().listIterator();
+        YangLeaf leafInfo = leafIterator.next();
+
+        assertThat(leafInfo.getName(), is("tunnel-value"));
+        assertThat(leafInfo.getDataType().getDataTypeName(), is("identityref"));
+        assertThat(leafInfo.getDataType().getDataType(), is(YangDataTypes.IDENTITYREF));
+        YangIdentityRef yangIdentityRef = (YangIdentityRef) leafInfo.getDataType().getDataTypeExtendedInfo();
+        assertThat(yangIdentityRef.getName(), is("tunnel"));
+        assertThat(yangIdentityRef.getBaseIdentity().getName(), is("tunnel"));
+        assertThat(yangIdentityRef.getReferredIdentity().getName(), is("tunnel"));
+        assertThat(yangIdentityRef.getResolvableStatus(), is(ResolvableStatus.RESOLVED));
+   }
+
+    /**
+     * Checks for updating datamodel for unresolved status of identityref used in tydedef.
+     */
+    @Test
+    public void processIdentityUnresolvedTypedefStatement() throws IOException, ParserException {
+
+        YangNode node = manager.getDataModel("src/test/resources/IdentityTypedefUnresolved.yang");
+
+        // Check whether the data model tree returned is of type module.
+        assertThat((node instanceof YangModule), is(true));
+
+        // Check whether the node type is set properly to module.
+        assertThat(node.getNodeType(), is(YangNodeType.MODULE_NODE));
+
+        // Check whether the module name is set correctly.
+        YangModule yangNode = (YangModule) node;
+        assertThat(yangNode.getName(), is("Test"));
+
+        YangIdentity yangIdentity = (YangIdentity) yangNode.getChild();
+        assertThat(yangIdentity.getName(), is("tunnel"));
+
+        YangTypeDef typedef = (YangTypeDef) yangNode.getChild().getNextSibling();
+        assertThat(typedef.getName(), is("type15"));
+
+        YangType type = typedef.getTypeList().iterator().next();
+        assertThat(type.getDataType(), is(YangDataTypes.IDENTITYREF));
+        assertThat(type.getDataTypeName(), is("identityref"));
+
+        YangIdentityRef identityRef = (YangIdentityRef) type.getDataTypeExtendedInfo();
+        assertThat(identityRef.getName(), is("tunnel"));
+        assertThat(identityRef.getBaseIdentity().getName(), is("tunnel"));
+        assertThat(identityRef.getResolvableStatus(), is(ResolvableStatus.UNRESOLVED));
+
+    }
+}
diff --git a/utils/yangutils/plugin/src/test/java/org/onosproject/yangutils/parser/impl/listeners/TypeListenerTest.java b/utils/yangutils/plugin/src/test/java/org/onosproject/yangutils/parser/impl/listeners/TypeListenerTest.java
index 8891108..b6b497a 100644
--- a/utils/yangutils/plugin/src/test/java/org/onosproject/yangutils/parser/impl/listeners/TypeListenerTest.java
+++ b/utils/yangutils/plugin/src/test/java/org/onosproject/yangutils/parser/impl/listeners/TypeListenerTest.java
@@ -122,20 +122,6 @@
     }
 
     /**
-     * Checks for unsupported type identityref.
-     */
-    @Test
-    public void processIdentityrefType() throws IOException, ParserException {
-
-        thrown.expect(ParserException.class);
-        thrown.expectMessage("YANG file error : \"identityref\" is not supported in current version,"
-                + " please check wiki for YANG utils road map.");
-
-        YangNode node = manager
-                .getDataModel("src/test/resources/IdentityrefInvalidIdentifier.yang");
-    }
-
-    /**
      * Checks for type instance-identifier.
      */
     @Test
diff --git a/utils/yangutils/plugin/src/test/java/org/onosproject/yangutils/plugin/manager/InterFileIdentityLinkingTest.java b/utils/yangutils/plugin/src/test/java/org/onosproject/yangutils/plugin/manager/InterFileIdentityLinkingTest.java
new file mode 100644
index 0000000..7805bf0
--- /dev/null
+++ b/utils/yangutils/plugin/src/test/java/org/onosproject/yangutils/plugin/manager/InterFileIdentityLinkingTest.java
@@ -0,0 +1,642 @@
+/*
+ * Copyright 2016-present Open Networking Laboratory
+ *
+ * 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.
+ */
+package org.onosproject.yangutils.plugin.manager;
+
+import org.apache.maven.plugin.MojoExecutionException;
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.rules.ExpectedException;
+import org.onosproject.yangutils.datamodel.YangIdentity;
+import org.onosproject.yangutils.datamodel.YangIdentityRef;
+import org.onosproject.yangutils.datamodel.YangLeaf;
+import org.onosproject.yangutils.datamodel.YangLeafList;
+import org.onosproject.yangutils.datamodel.YangModule;
+import org.onosproject.yangutils.datamodel.YangNode;
+import org.onosproject.yangutils.datamodel.YangType;
+import org.onosproject.yangutils.datamodel.YangTypeDef;
+import org.onosproject.yangutils.datamodel.utils.ResolvableStatus;
+import org.onosproject.yangutils.datamodel.utils.builtindatatype.YangDataTypes;
+import org.onosproject.yangutils.linker.exceptions.LinkerException;
+import org.onosproject.yangutils.linker.impl.YangLinkerManager;
+import org.onosproject.yangutils.parser.exceptions.ParserException;
+import org.onosproject.yangutils.utils.io.impl.YangFileScanner;
+
+import java.io.IOException;
+import java.util.ListIterator;
+
+import static org.hamcrest.MatcherAssert.assertThat;
+import static org.hamcrest.core.Is.is;
+import static org.onosproject.yangutils.datamodel.YangNodeType.MODULE_NODE;
+
+/**
+ * Test cases for testing inter file linking for identity.
+ */
+public class InterFileIdentityLinkingTest {
+    @Rule
+    public ExpectedException thrown = ExpectedException.none();
+
+    private final YangUtilManager utilManager = new YangUtilManager();
+    private final YangLinkerManager yangLinkerManager = new YangLinkerManager();
+
+    /**
+     * Checks inter file feature linking with imported file.
+     */
+    @Test
+    public void processIdentityInImportedFile()
+            throws IOException, ParserException, MojoExecutionException {
+
+        String searchDir = "src/test/resources/interfileidentityimport";
+        utilManager.createYangFileInfoSet(YangFileScanner.getYangFiles(searchDir));
+        utilManager.parseYangFileInfoSet();
+        utilManager.createYangNodeSet();
+
+        YangNode selfNode = null;
+        YangNode refNode1 = null;
+        YangNode refNode2 = null;
+
+        // Create YANG node set
+        yangLinkerManager.createYangNodeSet(utilManager.getYangNodeSet());
+
+        // Add references to import list.
+        yangLinkerManager.addRefToYangFilesImportList(utilManager.getYangNodeSet());
+
+        // Carry out inter-file linking.
+        yangLinkerManager.processInterFileLinking(utilManager.getYangNodeSet());
+
+        for (YangNode rootNode : utilManager.getYangNodeSet()) {
+            if (rootNode.getName().equals("IdentityIntraFile")) {
+                selfNode = rootNode;
+            } else if (rootNode.getName().equals("IdentityInModule")) {
+                refNode1 = rootNode;
+            } else {
+                refNode2 = rootNode;
+            }
+        }
+
+        // Check whether the data model tree returned is of type module.
+        assertThat(selfNode instanceof YangModule, is(true));
+
+        // Check whether the node type is set properly to module.
+        assertThat(selfNode.getNodeType(), is(MODULE_NODE));
+
+        // Check whether the module name is set correctly.
+        YangModule yangNode = (YangModule) selfNode;
+        assertThat(yangNode.getName(), is("IdentityIntraFile"));
+
+        YangIdentity yangIdentity = (YangIdentity) yangNode.getChild();
+        assertThat(yangIdentity.getName(), is("ipv4-address-family"));
+        assertThat(yangIdentity.getBaseNode().getBaseIdentifier().getName(), is("ref-address-family"));
+        assertThat(yangIdentity.getBaseNode().getReferredIdentity().getName(), is("ref-address-family"));
+        assertThat(yangIdentity.getBaseNode().getResolvableStatus(), is(ResolvableStatus.RESOLVED));
+
+        yangIdentity = (YangIdentity) yangNode.getChild().getNextSibling();
+        assertThat(yangIdentity.getName(), is("ipv6-address-family"));
+        assertThat(yangIdentity.getBaseNode().getBaseIdentifier().getName(), is("ref-address-family"));
+        assertThat(yangIdentity.getBaseNode().getReferredIdentity().getName(), is("ref-address-family"));
+        assertThat(yangIdentity.getBaseNode().getResolvableStatus(), is(ResolvableStatus.RESOLVED));
+
+        ListIterator<YangLeaf> leafIterator = yangNode.getListOfLeaf().listIterator();
+        YangLeaf leafInfo = leafIterator.next();
+
+        assertThat(leafInfo.getName(), is("tunnel"));
+        assertThat(leafInfo.getDataType().getDataTypeName(), is("identityref"));
+        assertThat(leafInfo.getDataType().getDataType(), is(YangDataTypes.IDENTITYREF));
+        YangIdentityRef yangIdentityRef = (YangIdentityRef) leafInfo.getDataType().getDataTypeExtendedInfo();
+        assertThat(yangIdentityRef.getName(), is("ref-address-family"));
+        assertThat(yangIdentityRef.getBaseIdentity().getName(), is("ref-address-family"));
+        assertThat(yangIdentityRef.getReferredIdentity().getName(), is("ref-address-family"));
+        assertThat(yangIdentityRef.getResolvableStatus(), is(ResolvableStatus.RESOLVED));
+
+        ListIterator<YangLeafList> leafListIterator = yangNode.getListOfLeafList().listIterator();
+        YangLeafList leafListInfo = leafListIterator.next();
+
+        // Check whether the information in the leaf is correct.
+        assertThat(leafListInfo.getName(), is("network-ref"));
+        assertThat(leafListInfo.getDataType().getDataTypeName(), is("identityref"));
+        assertThat(leafListInfo.getDataType().getDataType(), is(YangDataTypes.IDENTITYREF));
+        yangIdentityRef = (YangIdentityRef) (leafListInfo.getDataType().getDataTypeExtendedInfo());
+        assertThat(yangIdentityRef.getBaseIdentity().getName(), is("ref-address-family"));
+        assertThat(yangIdentityRef.getReferredIdentity().getName(), is("ref-address-family"));
+        assertThat(yangIdentityRef.getResolvableStatus(), is(ResolvableStatus.RESOLVED));
+
+    }
+
+    /**
+     * Checks inter file feature linking with included file.
+     */
+    @Test
+    public void processIdentityInIncludedFile()
+            throws IOException, ParserException, MojoExecutionException {
+
+        String searchDir = "src/test/resources/interfileidentityinlude";
+        utilManager.createYangFileInfoSet(YangFileScanner.getYangFiles(searchDir));
+        utilManager.parseYangFileInfoSet();
+        utilManager.createYangNodeSet();
+
+        YangNode selfNode = null;
+        YangNode refNode1 = null;
+        YangNode refNode2 = null;
+
+        // Create YANG node set
+        yangLinkerManager.createYangNodeSet(utilManager.getYangNodeSet());
+
+        // Carry out linking of sub module with module.
+        yangLinkerManager.linkSubModulesToParentModule(utilManager.getYangNodeSet());
+
+        // Add references to import list.
+        yangLinkerManager.addRefToYangFilesImportList(utilManager.getYangNodeSet());
+
+        // Add references to include list.
+        yangLinkerManager.addRefToYangFilesIncludeList(utilManager.getYangNodeSet());
+
+        // Carry out inter-file linking.
+        yangLinkerManager.processInterFileLinking(utilManager.getYangNodeSet());
+
+        for (YangNode rootNode : utilManager.getYangNodeSet()) {
+            if (rootNode.getName().equals("syslog3")) {
+                selfNode = rootNode;
+            } else if (rootNode.getName().equals("syslog4")) {
+                refNode1 = rootNode;
+            } else {
+                refNode2 = rootNode;
+            }
+        }
+
+        // Check whether the data model tree returned is of type module.
+        assertThat(selfNode instanceof YangModule, is(true));
+
+        // Check whether the node type is set properly to module.
+        assertThat(selfNode.getNodeType(), is(MODULE_NODE));
+
+        // Check whether the module name is set correctly.
+        YangModule yangNode = (YangModule) selfNode;
+        assertThat(yangNode.getName(), is("syslog3"));
+
+        YangIdentity yangIdentity = (YangIdentity) yangNode.getChild();
+        assertThat(yangIdentity.getName(), is("ipv4-address-family"));
+        assertThat(yangIdentity.getBaseNode().getBaseIdentifier().getName(), is("ref-address-family"));
+        assertThat(yangIdentity.getBaseNode().getReferredIdentity().getName(), is("ref-address-family"));
+        assertThat(yangIdentity.getBaseNode().getResolvableStatus(), is(ResolvableStatus.RESOLVED));
+
+        yangIdentity = (YangIdentity) yangNode.getChild().getNextSibling();
+        assertThat(yangIdentity.getName(), is("ipv6-address-family"));
+        assertThat(yangIdentity.getBaseNode().getBaseIdentifier().getName(), is("ref-address-family"));
+        assertThat(yangIdentity.getBaseNode().getReferredIdentity().getName(), is("ref-address-family"));
+        assertThat(yangIdentity.getBaseNode().getResolvableStatus(), is(ResolvableStatus.RESOLVED));
+
+        ListIterator<YangLeaf> leafIterator = yangNode.getListOfLeaf().listIterator();
+        YangLeaf leafInfo = leafIterator.next();
+
+        assertThat(leafInfo.getName(), is("tunnel"));
+        assertThat(leafInfo.getDataType().getDataTypeName(), is("identityref"));
+        assertThat(leafInfo.getDataType().getDataType(), is(YangDataTypes.IDENTITYREF));
+        YangIdentityRef yangIdentityRef = (YangIdentityRef) leafInfo.getDataType().getDataTypeExtendedInfo();
+        assertThat(yangIdentityRef.getName(), is("ref-address-family"));
+        assertThat(yangIdentityRef.getBaseIdentity().getName(), is("ref-address-family"));
+        assertThat(yangIdentityRef.getReferredIdentity().getName(), is("ref-address-family"));
+        assertThat(yangIdentityRef.getResolvableStatus(), is(ResolvableStatus.RESOLVED));
+
+        ListIterator<YangLeafList> leafListIterator = yangNode.getListOfLeafList().listIterator();
+        YangLeafList leafListInfo = leafListIterator.next();
+
+        // Check whether the information in the leaf is correct.
+        assertThat(leafListInfo.getName(), is("network-ref"));
+        assertThat(leafListInfo.getDataType().getDataTypeName(), is("identityref"));
+        assertThat(leafListInfo.getDataType().getDataType(), is(YangDataTypes.IDENTITYREF));
+        yangIdentityRef = (YangIdentityRef) (leafListInfo.getDataType().getDataTypeExtendedInfo());
+        assertThat(yangIdentityRef.getBaseIdentity().getName(), is("ref-address-family"));
+        assertThat(yangIdentityRef.getReferredIdentity().getName(), is("ref-address-family"));
+        assertThat(yangIdentityRef.getResolvableStatus(), is(ResolvableStatus.RESOLVED));
+    }
+
+    /**
+     * Checks inter file feature linking with imported file with dependency.
+     */
+    @Test
+    public void processIdentityInImportedFileWithDependency()
+            throws IOException, ParserException, MojoExecutionException {
+
+        String searchDir = "src/test/resources/interfileidentityimportdependency";
+        utilManager.createYangFileInfoSet(YangFileScanner.getYangFiles(searchDir));
+        utilManager.parseYangFileInfoSet();
+        utilManager.createYangNodeSet();
+
+        YangNode selfNode = null;
+        YangNode refNode1 = null;
+        YangNode refNode2 = null;
+
+        // Create YANG node set
+        yangLinkerManager.createYangNodeSet(utilManager.getYangNodeSet());
+
+        // Add references to import list.
+        yangLinkerManager.addRefToYangFilesImportList(utilManager.getYangNodeSet());
+
+        // Carry out inter-file linking.
+        yangLinkerManager.processInterFileLinking(utilManager.getYangNodeSet());
+
+        for (YangNode rootNode : utilManager.getYangNodeSet()) {
+            if (rootNode.getName().equals("syslog1")) {
+                selfNode = rootNode;
+            } else if (rootNode.getName().equals("syslog2")) {
+                refNode1 = rootNode;
+            } else {
+                refNode2 = rootNode;
+            }
+        }
+
+        // Check whether the data model tree returned is of type module.
+        assertThat(selfNode instanceof YangModule, is(true));
+
+        // Check whether the node type is set properly to module.
+        assertThat(selfNode.getNodeType(), is(MODULE_NODE));
+
+        // Check whether the module name is set correctly.
+        YangModule yangNode = (YangModule) selfNode;
+        assertThat(yangNode.getName(), is("syslog1"));
+
+        YangIdentity yangIdentity = (YangIdentity) yangNode.getChild();
+        assertThat(yangIdentity.getName(), is("ipv4-address-family"));
+        assertThat(yangIdentity.getBaseNode().getBaseIdentifier().getName(), is("ref-address-family"));
+        assertThat(yangIdentity.getBaseNode().getReferredIdentity().getName(), is("ref-address-family"));
+        assertThat(yangIdentity.getBaseNode().getResolvableStatus(), is(ResolvableStatus.RESOLVED));
+
+        yangIdentity = (YangIdentity) yangNode.getChild().getNextSibling();
+        assertThat(yangIdentity.getName(), is("ipv6-address-family"));
+        assertThat(yangIdentity.getBaseNode().getBaseIdentifier().getName(), is("ref-address-family"));
+        assertThat(yangIdentity.getBaseNode().getReferredIdentity().getName(), is("ref-address-family"));
+        assertThat(yangIdentity.getBaseNode().getResolvableStatus(), is(ResolvableStatus.RESOLVED));
+
+        ListIterator<YangLeaf> leafIterator = yangNode.getListOfLeaf().listIterator();
+        YangLeaf leafInfo = leafIterator.next();
+
+        assertThat(leafInfo.getName(), is("tunnel"));
+        assertThat(leafInfo.getDataType().getDataTypeName(), is("identityref"));
+        assertThat(leafInfo.getDataType().getDataType(), is(YangDataTypes.IDENTITYREF));
+        YangIdentityRef yangIdentityRef = (YangIdentityRef) leafInfo.getDataType().getDataTypeExtendedInfo();
+        assertThat(yangIdentityRef.getName(), is("ref-address-family"));
+        assertThat(yangIdentityRef.getBaseIdentity().getName(), is("ref-address-family"));
+        assertThat(yangIdentityRef.getReferredIdentity().getName(), is("ref-address-family"));
+        assertThat(yangIdentityRef.getResolvableStatus(), is(ResolvableStatus.RESOLVED));
+
+        ListIterator<YangLeafList> leafListIterator = yangNode.getListOfLeafList().listIterator();
+        YangLeafList leafListInfo = leafListIterator.next();
+
+        // Check whether the information in the leaf is correct.
+        assertThat(leafListInfo.getName(), is("network-ref"));
+        assertThat(leafListInfo.getDataType().getDataTypeName(), is("identityref"));
+        assertThat(leafListInfo.getDataType().getDataType(), is(YangDataTypes.IDENTITYREF));
+        yangIdentityRef = (YangIdentityRef) (leafListInfo.getDataType().getDataTypeExtendedInfo());
+        assertThat(yangIdentityRef.getBaseIdentity().getName(), is("ref-address-family"));
+        assertThat(yangIdentityRef.getReferredIdentity().getName(), is("ref-address-family"));
+        assertThat(yangIdentityRef.getResolvableStatus(), is(ResolvableStatus.RESOLVED));
+   }
+
+    /**
+     * Checks inter file feature linking with included file with dependency.
+     */
+    @Test
+    public void processIdentityInIncludedFileWithDependency()
+            throws IOException, ParserException, MojoExecutionException {
+
+        String searchDir = "src/test/resources/interfileidentityincludedependency";
+        utilManager.createYangFileInfoSet(YangFileScanner.getYangFiles(searchDir));
+        utilManager.parseYangFileInfoSet();
+        utilManager.createYangNodeSet();
+
+        YangNode selfNode = null;
+        YangNode refNode1 = null;
+        YangNode refNode2 = null;
+
+        // Create YANG node set
+        yangLinkerManager.createYangNodeSet(utilManager.getYangNodeSet());
+
+        // Carry out linking of sub module with module.
+        yangLinkerManager.linkSubModulesToParentModule(utilManager.getYangNodeSet());
+
+        // Add references to include list.
+        yangLinkerManager.addRefToYangFilesIncludeList(utilManager.getYangNodeSet());
+
+        // Add references to import list.
+        yangLinkerManager.addRefToYangFilesImportList(utilManager.getYangNodeSet());
+
+        // Carry out inter-file linking.
+        yangLinkerManager.processInterFileLinking(utilManager.getYangNodeSet());
+
+        for (YangNode rootNode : utilManager.getYangNodeSet()) {
+            if (rootNode.getName().equals("syslog1")) {
+                selfNode = rootNode;
+            } else if (rootNode.getName().equals("syslog2")) {
+                refNode1 = rootNode;
+            } else {
+                refNode2 = rootNode;
+            }
+        }
+
+        // Check whether the data model tree returned is of type module.
+        assertThat(selfNode instanceof YangModule, is(true));
+
+        // Check whether the node type is set properly to module.
+        assertThat(selfNode.getNodeType(), is(MODULE_NODE));
+
+        // Check whether the module name is set correctly.
+        YangModule yangNode = (YangModule) selfNode;
+        assertThat(yangNode.getName(), is("syslog1"));
+
+        YangIdentity yangIdentity = (YangIdentity) yangNode.getChild();
+        assertThat(yangIdentity.getName(), is("ipv4-address-family"));
+        assertThat(yangIdentity.getBaseNode().getBaseIdentifier().getName(), is("ref-address-family"));
+        assertThat(yangIdentity.getBaseNode().getReferredIdentity().getName(), is("ref-address-family"));
+        assertThat(yangIdentity.getBaseNode().getResolvableStatus(), is(ResolvableStatus.RESOLVED));
+
+        yangIdentity = (YangIdentity) yangNode.getChild().getNextSibling();
+        assertThat(yangIdentity.getName(), is("ipv6-address-family"));
+        assertThat(yangIdentity.getBaseNode().getBaseIdentifier().getName(), is("ref-address-family"));
+        assertThat(yangIdentity.getBaseNode().getReferredIdentity().getName(), is("ref-address-family"));
+        assertThat(yangIdentity.getBaseNode().getResolvableStatus(), is(ResolvableStatus.RESOLVED));
+
+        ListIterator<YangLeaf> leafIterator = yangNode.getListOfLeaf().listIterator();
+        YangLeaf leafInfo = leafIterator.next();
+
+        assertThat(leafInfo.getName(), is("tunnel"));
+        assertThat(leafInfo.getDataType().getDataTypeName(), is("identityref"));
+        assertThat(leafInfo.getDataType().getDataType(), is(YangDataTypes.IDENTITYREF));
+        YangIdentityRef yangIdentityRef = (YangIdentityRef) leafInfo.getDataType().getDataTypeExtendedInfo();
+        assertThat(yangIdentityRef.getName(), is("ref-address-family"));
+        assertThat(yangIdentityRef.getBaseIdentity().getName(), is("ref-address-family"));
+        assertThat(yangIdentityRef.getReferredIdentity().getName(), is("ref-address-family"));
+        assertThat(yangIdentityRef.getResolvableStatus(), is(ResolvableStatus.RESOLVED));
+
+        ListIterator<YangLeafList> leafListIterator = yangNode.getListOfLeafList().listIterator();
+        YangLeafList leafListInfo = leafListIterator.next();
+
+        // Check whether the information in the leaf is correct.
+        assertThat(leafListInfo.getName(), is("network-ref"));
+        assertThat(leafListInfo.getDataType().getDataTypeName(), is("identityref"));
+        assertThat(leafListInfo.getDataType().getDataType(), is(YangDataTypes.IDENTITYREF));
+        yangIdentityRef = (YangIdentityRef) (leafListInfo.getDataType().getDataTypeExtendedInfo());
+        assertThat(yangIdentityRef.getBaseIdentity().getName(), is("ref-address-family"));
+        assertThat(yangIdentityRef.getReferredIdentity().getName(), is("ref-address-family"));
+        assertThat(yangIdentityRef.getResolvableStatus(), is(ResolvableStatus.RESOLVED));
+    }
+
+    /**
+     * Checks inter file feature linking with imported file with dependency
+     * feature undefined.
+     */
+    @Test
+    public void processIdentityInImportedFileWithDependencyUndefined()
+            throws IOException, LinkerException, MojoExecutionException {
+        thrown.expect(LinkerException.class);
+        thrown.expectMessage("YANG file error: Unable to find base identity for given base");
+
+        String searchDir = "src/test/resources/interfileidentityimportdependencyUndefined";
+        utilManager.createYangFileInfoSet(YangFileScanner.getYangFiles(searchDir));
+        utilManager.parseYangFileInfoSet();
+        utilManager.createYangNodeSet();
+
+        YangNode selfNode = null;
+        YangNode refNode1 = null;
+        YangNode refNode2 = null;
+
+        // Create YANG node set
+        yangLinkerManager.createYangNodeSet(utilManager.getYangNodeSet());
+
+        // Add references to import list.
+        yangLinkerManager.addRefToYangFilesImportList(utilManager.getYangNodeSet());
+
+        // Carry out inter-file linking.
+        yangLinkerManager.processInterFileLinking(utilManager.getYangNodeSet());
+    }
+
+    /**
+     * Checks inter file feature linking with included file with dependency
+     * feature undefined.
+     */
+    @Test
+    public void processIdentityInIncludedFileWithDependencyUndefined()
+            throws IOException, LinkerException, MojoExecutionException {
+        thrown.expect(LinkerException.class);
+        thrown.expectMessage("YANG file error: Unable to find base identity for given base");
+
+        String searchDir = "src/test/resources/interfileidentityincludedependencyUndefined";
+        utilManager.createYangFileInfoSet(YangFileScanner.getYangFiles(searchDir));
+        utilManager.parseYangFileInfoSet();
+        utilManager.createYangNodeSet();
+
+        YangNode selfNode = null;
+        YangNode refNode1 = null;
+        YangNode refNode2 = null;
+
+        // Create YANG node set
+        yangLinkerManager.createYangNodeSet(utilManager.getYangNodeSet());
+
+        // Carry out linking of sub module with module.
+        yangLinkerManager.linkSubModulesToParentModule(utilManager.getYangNodeSet());
+
+        // Add references to import list.
+        yangLinkerManager.addRefToYangFilesImportList(utilManager.getYangNodeSet());
+
+        // Add references to include list.
+        yangLinkerManager.addRefToYangFilesIncludeList(utilManager.getYangNodeSet());
+
+        // Carry out inter-file linking.
+        yangLinkerManager.processInterFileLinking(utilManager.getYangNodeSet());
+    }
+
+    /**
+     * Checks inter file feature linking with imported file.
+     */
+    @Test
+    public void processIdentityTypedefUnresolvedInImportedFile()
+            throws IOException, ParserException, MojoExecutionException {
+
+        String searchDir = "src/test/resources/interfileidentitytypedef";
+        utilManager.createYangFileInfoSet(YangFileScanner.getYangFiles(searchDir));
+        utilManager.parseYangFileInfoSet();
+        utilManager.createYangNodeSet();
+
+        YangNode selfNode = null;
+        YangNode refNode1 = null;
+        YangNode refNode2 = null;
+
+        // Create YANG node set
+        yangLinkerManager.createYangNodeSet(utilManager.getYangNodeSet());
+
+        // Add references to import list.
+        yangLinkerManager.addRefToYangFilesImportList(utilManager.getYangNodeSet());
+
+        // Carry out inter-file linking.
+        yangLinkerManager.processInterFileLinking(utilManager.getYangNodeSet());
+
+        for (YangNode rootNode : utilManager.getYangNodeSet()) {
+            if (rootNode.getName().equals("IdentityIntraFile")) {
+                selfNode = rootNode;
+            } else if (rootNode.getName().equals("IdentityInModule")) {
+                refNode1 = rootNode;
+            } else {
+                refNode2 = rootNode;
+            }
+        }
+        // Check whether the data model tree returned is of type module.
+        assertThat(selfNode instanceof YangModule, is(true));
+
+        // Check whether the node type is set properly to module.
+        assertThat(selfNode.getNodeType(), is(MODULE_NODE));
+
+        // Check whether the module name is set correctly.
+        YangModule yangNode = (YangModule) selfNode;
+        assertThat(yangNode.getName(), is("IdentityIntraFile"));
+
+        YangIdentity yangIdentity = (YangIdentity) yangNode.getChild();
+        assertThat(yangIdentity.getName(), is("ipv4-address-family"));
+        assertThat(yangIdentity.getBaseNode().getBaseIdentifier().getName(), is("ref-address-family"));
+        assertThat(yangIdentity.getBaseNode().getReferredIdentity().getName(), is("ref-address-family"));
+        assertThat(yangIdentity.getBaseNode().getResolvableStatus(), is(ResolvableStatus.RESOLVED));
+
+        yangIdentity = (YangIdentity) yangNode.getChild().getNextSibling();
+        assertThat(yangIdentity.getName(), is("ipv6-address-family"));
+        assertThat(yangIdentity.getBaseNode().getBaseIdentifier().getName(), is("ref-address-family"));
+        assertThat(yangIdentity.getBaseNode().getReferredIdentity().getName(), is("ref-address-family"));
+        assertThat(yangIdentity.getBaseNode().getResolvableStatus(), is(ResolvableStatus.RESOLVED));
+
+        ListIterator<YangLeaf> leafIterator = yangNode.getListOfLeaf().listIterator();
+        YangLeaf leafInfo = leafIterator.next();
+
+        assertThat(leafInfo.getName(), is("tunnel"));
+        assertThat(leafInfo.getDataType().getDataTypeName(), is("identityref"));
+        assertThat(leafInfo.getDataType().getDataType(), is(YangDataTypes.IDENTITYREF));
+        YangIdentityRef yangIdentityRef = (YangIdentityRef) leafInfo.getDataType().getDataTypeExtendedInfo();
+        assertThat(yangIdentityRef.getName(), is("ref-address-family"));
+        assertThat(yangIdentityRef.getBaseIdentity().getName(), is("ref-address-family"));
+        assertThat(yangIdentityRef.getReferredIdentity().getName(), is("ref-address-family"));
+        assertThat(yangIdentityRef.getResolvableStatus(), is(ResolvableStatus.RESOLVED));
+
+        ListIterator<YangLeafList> leafListIterator = yangNode.getListOfLeafList().listIterator();
+        YangLeafList leafListInfo = leafListIterator.next();
+
+        // Check whether the information in the leaf is correct.
+        assertThat(leafListInfo.getName(), is("network-ref"));
+        assertThat(leafListInfo.getDataType().getDataTypeName(), is("identityref"));
+        assertThat(leafListInfo.getDataType().getDataType(), is(YangDataTypes.IDENTITYREF));
+        yangIdentityRef = (YangIdentityRef) (leafListInfo.getDataType().getDataTypeExtendedInfo());
+        // Check whether leafref type got resolved.
+        assertThat(yangIdentityRef.getResolvableStatus(), is(ResolvableStatus.RESOLVED));
+
+        YangTypeDef typedef = (YangTypeDef) yangNode.getChild().getNextSibling().getNextSibling();
+        assertThat(typedef.getName(), is("type15"));
+
+        YangType type = typedef.getTypeList().iterator().next();
+        assertThat(type.getDataType(), is(YangDataTypes.IDENTITYREF));
+        assertThat(type.getDataTypeName(), is("identityref"));
+
+        YangIdentityRef identityRef = (YangIdentityRef) type.getDataTypeExtendedInfo();
+        assertThat(identityRef.getName(), is("ref-address-family"));
+        assertThat(identityRef.getBaseIdentity().getName(), is("ref-address-family"));
+        assertThat(identityRef.getResolvableStatus(), is(ResolvableStatus.UNRESOLVED));
+    }
+
+    /**
+     * Checks inter file feature linking with imported file.
+     */
+    @Test
+    public void processIdentityTypedefInImportedFile()
+            throws IOException, ParserException, MojoExecutionException {
+
+        String searchDir = "src/test/resources/interfileidentitytypedef";
+        utilManager.createYangFileInfoSet(YangFileScanner.getYangFiles(searchDir));
+        utilManager.parseYangFileInfoSet();
+        utilManager.createYangNodeSet();
+
+        YangNode selfNode = null;
+        YangNode refNode1 = null;
+        YangNode refNode2 = null;
+
+        // Create YANG node set
+        yangLinkerManager.createYangNodeSet(utilManager.getYangNodeSet());
+
+        // Add references to import list.
+        yangLinkerManager.addRefToYangFilesImportList(utilManager.getYangNodeSet());
+
+        // Carry out inter-file linking.
+        yangLinkerManager.processInterFileLinking(utilManager.getYangNodeSet());
+
+        for (YangNode rootNode : utilManager.getYangNodeSet()) {
+            if (rootNode.getName().equals("IdentityTypedef")) {
+                selfNode = rootNode;
+            } else if (rootNode.getName().equals("IdentityInModule")) {
+                refNode1 = rootNode;
+            } else {
+                refNode2 = rootNode;
+            }
+        }
+
+        // Check whether the data model tree returned is of type module.
+        assertThat(selfNode instanceof YangModule, is(true));
+
+        // Check whether the node type is set properly to module.
+        assertThat(selfNode.getNodeType(), is(MODULE_NODE));
+
+        // Check whether the module name is set correctly.
+        YangModule yangNode = (YangModule) selfNode;
+        assertThat(yangNode.getName(), is("IdentityTypedef"));
+
+        YangIdentity yangIdentity = (YangIdentity) yangNode.getChild();
+        assertThat(yangIdentity.getName(), is("ipv4-address-family"));
+        assertThat(yangIdentity.getBaseNode().getBaseIdentifier().getName(), is("ref-address-family"));
+        assertThat(yangIdentity.getBaseNode().getReferredIdentity().getName(), is("ref-address-family"));
+        assertThat(yangIdentity.getBaseNode().getResolvableStatus(), is(ResolvableStatus.RESOLVED));
+
+        yangIdentity = (YangIdentity) yangNode.getChild().getNextSibling();
+        assertThat(yangIdentity.getName(), is("ipv6-address-family"));
+        assertThat(yangIdentity.getBaseNode().getBaseIdentifier().getName(), is("ref-address-family"));
+        assertThat(yangIdentity.getBaseNode().getReferredIdentity().getName(), is("ref-address-family"));
+        assertThat(yangIdentity.getBaseNode().getResolvableStatus(), is(ResolvableStatus.RESOLVED));
+
+        YangTypeDef typedef = (YangTypeDef) yangNode.getChild().getNextSibling().getNextSibling();
+        assertThat(typedef.getName(), is("type15"));
+
+        YangType type = typedef.getTypeList().iterator().next();
+        assertThat(type.getDataType(), is(YangDataTypes.IDENTITYREF));
+        assertThat(type.getDataTypeName(), is("identityref"));
+
+        YangIdentityRef identityRef = (YangIdentityRef) type.getDataTypeExtendedInfo();
+        assertThat(identityRef.getName(), is("ref-address-family"));
+        assertThat(identityRef.getBaseIdentity().getName(), is("ref-address-family"));
+
+        ListIterator<YangLeaf> leafIterator = yangNode.getListOfLeaf().listIterator();
+        YangLeaf leafInfo = leafIterator.next();
+
+        assertThat(leafInfo.getName(), is("tunnel"));
+        assertThat(leafInfo.getDataType().getDataTypeName(), is("identityref"));
+        assertThat(leafInfo.getDataType().getDataType(), is(YangDataTypes.IDENTITYREF));
+        YangIdentityRef yangIdentityRef = (YangIdentityRef) leafInfo.getDataType().getDataTypeExtendedInfo();
+        assertThat(yangIdentityRef.getName(), is("ref-address-family"));
+        assertThat(yangIdentityRef.getBaseIdentity().getName(), is("ref-address-family"));
+        assertThat(yangIdentityRef.getReferredIdentity().getName(), is("ref-address-family"));
+        assertThat(yangIdentityRef.getResolvableStatus(), is(ResolvableStatus.RESOLVED));
+
+        ListIterator<YangLeafList> leafListIterator = yangNode.getListOfLeafList().listIterator();
+        YangLeafList leafListInfo = leafListIterator.next();
+
+        // Check whether the information in the leaf is correct.
+        assertThat(leafListInfo.getName(), is("network-ref"));
+        assertThat(leafListInfo.getDataType().getDataTypeName(), is("identityref"));
+        assertThat(leafListInfo.getDataType().getDataType(), is(YangDataTypes.IDENTITYREF));
+        yangIdentityRef = (YangIdentityRef) (leafListInfo.getDataType().getDataTypeExtendedInfo());
+        // Check whether leafref type got resolved.
+        assertThat(yangIdentityRef.getResolvableStatus(), is(ResolvableStatus.RESOLVED));
+    }
+}
diff --git a/utils/yangutils/plugin/src/test/resources/IdentityInModule.yang b/utils/yangutils/plugin/src/test/resources/IdentityInModule.yang
new file mode 100644
index 0000000..5688615
--- /dev/null
+++ b/utils/yangutils/plugin/src/test/resources/IdentityInModule.yang
@@ -0,0 +1,14 @@
+module IdentityInModule{
+    yang-version 1;
+    namespace http://huawei.com;
+    prefix IdentityInModule;
+
+    identity tunnel-type {
+        description
+           "Base identity from which specific tunnel types are derived.";
+    }
+
+    identity ref-address-family {
+        reference "http://www.iana.org/assignments/address-family-numbers/address-family-numbers.xhtml#address-family-numbers-2";
+    }
+}
\ No newline at end of file
diff --git a/utils/yangutils/plugin/src/test/resources/IdentityIntraFile.yang b/utils/yangutils/plugin/src/test/resources/IdentityIntraFile.yang
new file mode 100644
index 0000000..c61fcfb
--- /dev/null
+++ b/utils/yangutils/plugin/src/test/resources/IdentityIntraFile.yang
@@ -0,0 +1,23 @@
+module IdentityIntraFile {
+    yang-version 1;
+    namespace http://huawei.com;
+    prefix IdentityIntraFile;
+
+    import "IdentityInModule" {
+        prefix "IdentityInModule";
+    }
+
+    identity ipv4-address-family {
+        base IdentityInModule:ref-address-family;
+    }
+
+    identity ipv6-address-family {
+        base IdentityInModule:ref-address-family;
+    }
+
+    leaf tunnel {
+        type identityref {
+            base IdentityInModule:ref-address-family;
+        }
+    }
+}
\ No newline at end of file
diff --git a/utils/yangutils/plugin/src/test/resources/IdentityListener.yang b/utils/yangutils/plugin/src/test/resources/IdentityListener.yang
new file mode 100644
index 0000000..a7ef4d2
--- /dev/null
+++ b/utils/yangutils/plugin/src/test/resources/IdentityListener.yang
@@ -0,0 +1,39 @@
+module IdentityListener{
+    yang-version 1;
+    namespace http://huawei.com;
+    prefix IdentityListener;
+
+    identity tunnel {
+        description
+           "Base identity from which specific tunnel types are derived.";
+    }
+
+    identity tunnel-type {
+        description
+           "Base identity from which specific tunnel types are derived.";
+    }
+
+    identity ref-address-family {
+        reference "http://www.iana.org/assignments/address-family-numbers/address-family-numbers.xhtml#address-family-numbers-2";
+    }
+
+    identity ipv4-address-family {
+        base ref-address-family;
+    }
+
+    identity ipv6-address-family {
+        base ref-address-family;
+    }
+
+    leaf tunnel {
+        type identityref {
+            base ref-address-family;
+        }
+    }
+
+    leaf-list network-ref {
+        type identityref {
+            base ref-address-family;
+        }
+    }
+}
\ No newline at end of file
diff --git a/utils/yangutils/plugin/src/test/resources/IdentityTypedef.yang b/utils/yangutils/plugin/src/test/resources/IdentityTypedef.yang
new file mode 100644
index 0000000..6e8f603
--- /dev/null
+++ b/utils/yangutils/plugin/src/test/resources/IdentityTypedef.yang
@@ -0,0 +1,20 @@
+module Test {
+    yang-version 1;
+    namespace http://huawei.com;
+    prefix Ant;
+
+    identity tunnel {
+        description
+           "Base identity from which specific tunnel types are derived.";
+    }
+
+    leaf tunnel-value {
+        type type15;
+    }
+
+    typedef type15 {
+        type identityref {
+             base tunnel;
+         }
+    }
+}
diff --git a/utils/yangutils/plugin/src/test/resources/IdentityTypedefUnresolved.yang b/utils/yangutils/plugin/src/test/resources/IdentityTypedefUnresolved.yang
new file mode 100644
index 0000000..d837fd1
--- /dev/null
+++ b/utils/yangutils/plugin/src/test/resources/IdentityTypedefUnresolved.yang
@@ -0,0 +1,16 @@
+module Test {
+    yang-version 1;
+    namespace http://huawei.com;
+    prefix Ant;
+
+    identity tunnel {
+        description
+           "Base identity from which specific tunnel types are derived.";
+    }
+
+    typedef type15 {
+        type identityref {
+             base tunnel;
+         }
+    }
+}
diff --git a/utils/yangutils/plugin/src/test/resources/IdentityrefInvalidIdentifier.yang b/utils/yangutils/plugin/src/test/resources/IdentityrefInvalidIdentifier.yang
deleted file mode 100644
index 99a8129..0000000
--- a/utils/yangutils/plugin/src/test/resources/IdentityrefInvalidIdentifier.yang
+++ /dev/null
@@ -1,11 +0,0 @@
-module Test {
-    yang-version 1;
-    namespace http://huawei.com;
-    prefix Ant;
-    grouping currentcheck {
-        leaf invalid-interval {
-            type identityref {
-            }
-        }
-    }
-}
diff --git a/utils/yangutils/plugin/src/test/resources/identityRef/identityRef.yang b/utils/yangutils/plugin/src/test/resources/identityRef/identityRef.yang
new file mode 100644
index 0000000..a7389e7
--- /dev/null
+++ b/utils/yangutils/plugin/src/test/resources/identityRef/identityRef.yang
@@ -0,0 +1,19 @@
+module IdentityTest{
+    yang-version 1;
+    namespace http://huawei.com;
+    prefix IdentityTest;
+
+    identity ref-address-family {
+        description "ref-address-family";
+    }
+
+    identity ipv4-address-family {
+        base ref-address-family;
+    }
+
+    leaf tunnel {
+        type identityref {
+            base ref-address-family;
+        }
+    }
+}
\ No newline at end of file
diff --git a/utils/yangutils/plugin/src/test/resources/interfileidentityimport/IdentityInModule.yang b/utils/yangutils/plugin/src/test/resources/interfileidentityimport/IdentityInModule.yang
new file mode 100644
index 0000000..efaadd6
--- /dev/null
+++ b/utils/yangutils/plugin/src/test/resources/interfileidentityimport/IdentityInModule.yang
@@ -0,0 +1,15 @@
+
+module IdentityInModule{
+    yang-version 1;
+    namespace http://huawei.com;
+    prefix IdentityInModule;
+
+    identity tunnel-type {
+        description
+           "Base identity from which specific tunnel types are derived.";
+    }
+
+    identity ref-address-family {
+        reference "http://www.iana.org/assignments/address-family-numbers/address-family-numbers.xhtml#address-family-numbers-2";
+    }
+}
\ No newline at end of file
diff --git a/utils/yangutils/plugin/src/test/resources/interfileidentityimport/IdentityIntraFile.yang b/utils/yangutils/plugin/src/test/resources/interfileidentityimport/IdentityIntraFile.yang
new file mode 100644
index 0000000..4036e97
--- /dev/null
+++ b/utils/yangutils/plugin/src/test/resources/interfileidentityimport/IdentityIntraFile.yang
@@ -0,0 +1,29 @@
+module IdentityIntraFile {
+    yang-version 1;
+    namespace http://huawei.com;
+    prefix IdentityIntraFile;
+
+    import "IdentityInModule" {
+        prefix "IdentityInModule";
+    }
+
+    identity ipv4-address-family {
+        base IdentityInModule:ref-address-family;
+    }
+
+    identity ipv6-address-family {
+        base IdentityInModule:ref-address-family;
+    }
+
+    leaf tunnel {
+        type identityref {
+            base IdentityInModule:ref-address-family;
+        }
+    }
+
+    leaf-list network-ref {
+        type identityref {
+            base IdentityInModule:ref-address-family;
+        }
+    }
+}
\ No newline at end of file
diff --git a/utils/yangutils/plugin/src/test/resources/interfileidentityimportdependency/featurefile1.yang b/utils/yangutils/plugin/src/test/resources/interfileidentityimportdependency/featurefile1.yang
new file mode 100644
index 0000000..b808b11
--- /dev/null
+++ b/utils/yangutils/plugin/src/test/resources/interfileidentityimportdependency/featurefile1.yang
@@ -0,0 +1,30 @@
+module syslog1 {
+    yang-version 1;
+    namespace "http://huawei1.com";
+    prefix "sys1";
+
+    import "syslog2" {
+       prefix "sys2";
+    }
+
+    identity ipv4-address-family {
+       base sys2:ref-address-family;
+    }
+
+    identity ipv6-address-family {
+       base sys2:ref-address-family;
+    }
+
+    leaf tunnel {
+        type identityref {
+            base sys2:ref-address-family;
+        }
+    }
+
+    leaf-list network-ref {
+        type identityref {
+            base sys2:ref-address-family;
+        }
+    }
+
+}
diff --git a/utils/yangutils/plugin/src/test/resources/interfileidentityimportdependency/featurefile2.yang b/utils/yangutils/plugin/src/test/resources/interfileidentityimportdependency/featurefile2.yang
new file mode 100644
index 0000000..2469e24
--- /dev/null
+++ b/utils/yangutils/plugin/src/test/resources/interfileidentityimportdependency/featurefile2.yang
@@ -0,0 +1,17 @@
+module syslog2 {
+     yang-version 1;
+     namespace "http://huawei2.com";
+     prefix "sys2";
+
+     import "syslog3" {
+        prefix "sys3";
+     }
+
+     identity tunnel-type {
+         base sys3:final-address-family;
+     }
+
+     identity ref-address-family {
+         base sys3:final-address-family;
+     }
+}
diff --git a/utils/yangutils/plugin/src/test/resources/interfileidentityimportdependency/featurefile3.yang b/utils/yangutils/plugin/src/test/resources/interfileidentityimportdependency/featurefile3.yang
new file mode 100644
index 0000000..f460bd1
--- /dev/null
+++ b/utils/yangutils/plugin/src/test/resources/interfileidentityimportdependency/featurefile3.yang
@@ -0,0 +1,10 @@
+module syslog3 {
+     yang-version 1;
+     namespace "http://huawei3.com";
+     prefix "sys3";
+
+    identity final-address-family {
+        description
+           "Base identity from which specific tunnel types are derived.";
+    }
+}
diff --git a/utils/yangutils/plugin/src/test/resources/interfileidentityimportdependencyUndefined/featurefile1.yang b/utils/yangutils/plugin/src/test/resources/interfileidentityimportdependencyUndefined/featurefile1.yang
new file mode 100644
index 0000000..ec2e48c
--- /dev/null
+++ b/utils/yangutils/plugin/src/test/resources/interfileidentityimportdependencyUndefined/featurefile1.yang
@@ -0,0 +1,29 @@
+module syslog1 {
+     yang-version 1;
+     namespace "http://huawei1.com";
+     prefix "sys1";
+
+     import "syslog2" {
+        prefix "sys2";
+     }
+
+     identity ipv4-address-family {
+        base sys2:ref-address-family;
+     }
+
+     identity ipv6-address-family {
+        base sys2:ref-address-family;
+     }
+
+    leaf tunnel {
+        type identityref {
+            base sys2:ref-address-family;
+        }
+    }
+
+    leaf-list network-ref {
+        type identityref {
+            base sys2:ref-address-family;
+        }
+    }
+}
diff --git a/utils/yangutils/plugin/src/test/resources/interfileidentityimportdependencyUndefined/featurefile2.yang b/utils/yangutils/plugin/src/test/resources/interfileidentityimportdependencyUndefined/featurefile2.yang
new file mode 100644
index 0000000..25e66af
--- /dev/null
+++ b/utils/yangutils/plugin/src/test/resources/interfileidentityimportdependencyUndefined/featurefile2.yang
@@ -0,0 +1,18 @@
+module syslog2 {
+     yang-version 1;
+     namespace "http://huawei2.com";
+     prefix "sys2";
+
+     import "syslog3" {
+        prefix "sys3";
+     }
+
+     identity tunnel-type {
+         base sys3:final-address-family;
+     }
+
+     identity ref-address-family {
+         base sys3:final-address-family;
+     }
+}
+
diff --git a/utils/yangutils/plugin/src/test/resources/interfileidentityimportdependencyUndefined/featurefile3.yang b/utils/yangutils/plugin/src/test/resources/interfileidentityimportdependencyUndefined/featurefile3.yang
new file mode 100644
index 0000000..f638139
--- /dev/null
+++ b/utils/yangutils/plugin/src/test/resources/interfileidentityimportdependencyUndefined/featurefile3.yang
@@ -0,0 +1,5 @@
+module syslog3 {
+     yang-version 1;
+     namespace "http://huawei3.com";
+     prefix "sys3";
+}
diff --git a/utils/yangutils/plugin/src/test/resources/interfileidentityincludedependency/featurefile1.yang b/utils/yangutils/plugin/src/test/resources/interfileidentityincludedependency/featurefile1.yang
new file mode 100644
index 0000000..fe987ea
--- /dev/null
+++ b/utils/yangutils/plugin/src/test/resources/interfileidentityincludedependency/featurefile1.yang
@@ -0,0 +1,27 @@
+module syslog1 {
+    yang-version 1;
+    namespace "http://huawei3.com";
+    prefix "sys1";
+
+    include "syslog2";
+
+    identity ipv4-address-family {
+       base ref-address-family;
+    }
+
+    identity ipv6-address-family {
+       base ref-address-family;
+    }
+
+    leaf tunnel {
+        type identityref {
+            base ref-address-family;
+        }
+    }
+
+    leaf-list network-ref {
+        type identityref {
+            base ref-address-family;
+        }
+    }
+}
diff --git a/utils/yangutils/plugin/src/test/resources/interfileidentityincludedependency/featurefile2.yang b/utils/yangutils/plugin/src/test/resources/interfileidentityincludedependency/featurefile2.yang
new file mode 100644
index 0000000..14fd83c
--- /dev/null
+++ b/utils/yangutils/plugin/src/test/resources/interfileidentityincludedependency/featurefile2.yang
@@ -0,0 +1,19 @@
+submodule syslog2 {
+     yang-version 1;
+     belongs-to "syslog1" {
+         prefix "sys1";
+     }
+
+     import "syslog3" {
+        prefix "sys3";
+     }
+
+     identity tunnel-type {
+         base sys3:final-address-family;
+     }
+
+     identity ref-address-family {
+         base sys3:final-address-family;
+     }
+}
+
diff --git a/utils/yangutils/plugin/src/test/resources/interfileidentityincludedependency/featurefile3.yang b/utils/yangutils/plugin/src/test/resources/interfileidentityincludedependency/featurefile3.yang
new file mode 100644
index 0000000..aa056f0
--- /dev/null
+++ b/utils/yangutils/plugin/src/test/resources/interfileidentityincludedependency/featurefile3.yang
@@ -0,0 +1,10 @@
+module syslog3 {
+     yang-version 1;
+     namespace "http://huawei3.com";
+     prefix "sys3";
+
+     identity final-address-family {
+         description
+            "Base identity from which specific tunnel types are derived.";
+     }
+}
diff --git a/utils/yangutils/plugin/src/test/resources/interfileidentityincludedependencyUndefined/featurefile1.yang b/utils/yangutils/plugin/src/test/resources/interfileidentityincludedependencyUndefined/featurefile1.yang
new file mode 100644
index 0000000..bc4878f
--- /dev/null
+++ b/utils/yangutils/plugin/src/test/resources/interfileidentityincludedependencyUndefined/featurefile1.yang
@@ -0,0 +1,27 @@
+module syslog1 {
+    yang-version 1;
+    namespace "http://huawei3.com";
+    prefix "sys1";
+
+    include "syslog2";
+
+    identity ipv4-address-family {
+       base sys2:ref-address-family;
+    }
+
+    identity ipv6-address-family {
+       base sys2:ref-address-family;
+    }
+
+    leaf tunnel {
+        type identityref {
+            base sys2:ref-address-family;
+        }
+    }
+
+    leaf-list network-ref {
+        type identityref {
+            base sys2:ref-address-family;
+        }
+    }
+}
diff --git a/utils/yangutils/plugin/src/test/resources/interfileidentityincludedependencyUndefined/featurefile2.yang b/utils/yangutils/plugin/src/test/resources/interfileidentityincludedependencyUndefined/featurefile2.yang
new file mode 100644
index 0000000..14fd83c
--- /dev/null
+++ b/utils/yangutils/plugin/src/test/resources/interfileidentityincludedependencyUndefined/featurefile2.yang
@@ -0,0 +1,19 @@
+submodule syslog2 {
+     yang-version 1;
+     belongs-to "syslog1" {
+         prefix "sys1";
+     }
+
+     import "syslog3" {
+        prefix "sys3";
+     }
+
+     identity tunnel-type {
+         base sys3:final-address-family;
+     }
+
+     identity ref-address-family {
+         base sys3:final-address-family;
+     }
+}
+
diff --git a/utils/yangutils/plugin/src/test/resources/interfileidentityincludedependencyUndefined/featurefile3.yang b/utils/yangutils/plugin/src/test/resources/interfileidentityincludedependencyUndefined/featurefile3.yang
new file mode 100644
index 0000000..f638139
--- /dev/null
+++ b/utils/yangutils/plugin/src/test/resources/interfileidentityincludedependencyUndefined/featurefile3.yang
@@ -0,0 +1,5 @@
+module syslog3 {
+     yang-version 1;
+     namespace "http://huawei3.com";
+     prefix "sys3";
+}
diff --git a/utils/yangutils/plugin/src/test/resources/interfileidentityinlude/IdentityInModule.yang b/utils/yangutils/plugin/src/test/resources/interfileidentityinlude/IdentityInModule.yang
new file mode 100644
index 0000000..e42ad86
--- /dev/null
+++ b/utils/yangutils/plugin/src/test/resources/interfileidentityinlude/IdentityInModule.yang
@@ -0,0 +1,27 @@
+module syslog3 {
+     yang-version 1;
+     namespace "http://huawei3.com";
+     prefix "sys3";
+
+     include "syslog4";
+
+     identity ipv4-address-family {
+         base ref-address-family;
+     }
+
+     identity ipv6-address-family {
+         base ref-address-family;
+     }
+
+    leaf tunnel {
+         type identityref {
+             base ref-address-family;
+         }
+    }
+
+    leaf-list network-ref {
+        type identityref {
+            base ref-address-family;
+        }
+    }
+}
diff --git a/utils/yangutils/plugin/src/test/resources/interfileidentityinlude/IdentityIntraFile.yang b/utils/yangutils/plugin/src/test/resources/interfileidentityinlude/IdentityIntraFile.yang
new file mode 100644
index 0000000..ffa1a7d
--- /dev/null
+++ b/utils/yangutils/plugin/src/test/resources/interfileidentityinlude/IdentityIntraFile.yang
@@ -0,0 +1,15 @@
+submodule syslog4 {
+     yang-version 1;
+     belongs-to "syslog3" {
+         prefix "sys3";
+     }
+
+     identity tunnel-type {
+         description
+            "Base identity from which specific tunnel types are derived.";
+     }
+
+     identity ref-address-family {
+         reference "http://www.iana.org/assignments/address-family-numbers/address-family-numbers.xhtml#address-family-numbers-2";
+     }
+}
\ No newline at end of file
diff --git a/utils/yangutils/plugin/src/test/resources/interfileidentitytypedef/IdentityInModule.yang b/utils/yangutils/plugin/src/test/resources/interfileidentitytypedef/IdentityInModule.yang
new file mode 100644
index 0000000..5688615
--- /dev/null
+++ b/utils/yangutils/plugin/src/test/resources/interfileidentitytypedef/IdentityInModule.yang
@@ -0,0 +1,14 @@
+module IdentityInModule{
+    yang-version 1;
+    namespace http://huawei.com;
+    prefix IdentityInModule;
+
+    identity tunnel-type {
+        description
+           "Base identity from which specific tunnel types are derived.";
+    }
+
+    identity ref-address-family {
+        reference "http://www.iana.org/assignments/address-family-numbers/address-family-numbers.xhtml#address-family-numbers-2";
+    }
+}
\ No newline at end of file
diff --git a/utils/yangutils/plugin/src/test/resources/interfileidentitytypedef/IdentityIntraFile.yang b/utils/yangutils/plugin/src/test/resources/interfileidentitytypedef/IdentityIntraFile.yang
new file mode 100644
index 0000000..fcb2984
--- /dev/null
+++ b/utils/yangutils/plugin/src/test/resources/interfileidentitytypedef/IdentityIntraFile.yang
@@ -0,0 +1,35 @@
+module IdentityIntraFile {
+    yang-version 1;
+    namespace http://huawei.com;
+    prefix IdentityIntraFile;
+
+    import "IdentityInModule" {
+        prefix "IdentityInModule";
+    }
+
+    identity ipv4-address-family {
+        base IdentityInModule:ref-address-family;
+    }
+
+    identity ipv6-address-family {
+        base IdentityInModule:ref-address-family;
+    }
+
+    leaf tunnel {
+        type identityref {
+            base IdentityInModule:ref-address-family;
+        }
+    }
+
+    leaf-list network-ref {
+        type identityref {
+            base IdentityInModule:ref-address-family;
+        }
+    }
+
+    typedef type15 {
+        type identityref {
+            base IdentityInModule:ref-address-family;
+        }
+    }
+}
\ No newline at end of file
diff --git a/utils/yangutils/plugin/src/test/resources/interfileidentitytypedef/IdentityTypedef.yang b/utils/yangutils/plugin/src/test/resources/interfileidentitytypedef/IdentityTypedef.yang
new file mode 100644
index 0000000..6a58976
--- /dev/null
+++ b/utils/yangutils/plugin/src/test/resources/interfileidentitytypedef/IdentityTypedef.yang
@@ -0,0 +1,31 @@
+module IdentityTypedef {
+    yang-version 1;
+    namespace http://huawei.com;
+    prefix IdentityTypedef;
+
+    import "IdentityInModule" {
+        prefix "IdentityInModule";
+    }
+
+    identity ipv4-address-family {
+        base IdentityInModule:ref-address-family;
+    }
+
+    identity ipv6-address-family {
+        base IdentityInModule:ref-address-family;
+    }
+
+    leaf tunnel {
+        type type15;
+    }
+
+    leaf-list network-ref {
+        type type15;
+    }
+
+    typedef type15 {
+        type identityref {
+            base IdentityInModule:ref-address-family;
+        }
+    }
+}
\ No newline at end of file
diff --git a/utils/yangutils/plugin/src/test/resources/interfileietf/ietf-te-types.yang b/utils/yangutils/plugin/src/test/resources/interfileietf/ietf-te-types.yang
index 6268832..ffa1984 100644
--- a/utils/yangutils/plugin/src/test/resources/interfileietf/ietf-te-types.yang
+++ b/utils/yangutils/plugin/src/test/resources/interfileietf/ietf-te-types.yang
@@ -56,7 +56,7 @@
        reference "RFC3209";
      }
 
-     /*identity tunnel-type {
+     identity tunnel-type {
        description
          "Base identity from which specific tunnel types are
          derived.";
@@ -254,7 +254,7 @@
        base lsp-encoding-types;
        description
          "Line (e.g., 8B/10B) LSP encoding";
-     }*/
+     }
 
      /* TE basic features */
      feature p2mp-te {
@@ -452,7 +452,7 @@
        }
      }
 
-     /*identity route-usage-type {
+     identity route-usage-type {
        description
          "Base identity for route usage";
      }
@@ -576,7 +576,7 @@
        description
          "The set of attribute filters associated with a
          tunnel any of which renders a link unacceptable";
-     }*/
+     }
 
      typedef admin-group {
        type binary {
@@ -605,7 +605,7 @@
        description "SRLG type";
      }
 
-     /*identity path-computation-srlg-type {
+     identity path-computation-srlg-type {
        description
          "Base identity for SRLG path computation";
      }
@@ -632,7 +632,7 @@
        base path-computation-srlg-type;
        description
          "Include weighted SRLG check in path computation";
-     }*/
+     }
 
      typedef te-metric {
        type uint32;
