update from RIFT as of 696b75d2fe9fb046261b08c616f1bcf6c0b54a9b second try

Signed-off-by: Jeremy Mordkoff <Jeremy.Mordkoff@riftio.com>
diff --git a/models/CMakeLists.txt b/models/CMakeLists.txt
index dca2a03..c69c55b 100644
--- a/models/CMakeLists.txt
+++ b/models/CMakeLists.txt
@@ -19,11 +19,6 @@
 
 cmake_minimum_required(VERSION 2.8)
 
-set(PKG_NAME models)
-set(PKG_VERSION 1.0)
-set(PKG_RELEASE 1)
-set(PKG_LONG_NAME ${PKG_NAME}-${PKG_VERSION})
-
 set(subdirs
   plugins
   openmano
diff --git a/models/openmano/bin/CMakeLists.txt b/models/openmano/bin/CMakeLists.txt
index 895823c..db2b104 100644
--- a/models/openmano/bin/CMakeLists.txt
+++ b/models/openmano/bin/CMakeLists.txt
@@ -8,5 +8,5 @@
     openmano
     openmano_cleanup.sh
   DESTINATION usr/bin
-  COMPONENT ${PKG_LONG_NAME}
+  COMPONENT ${INSTALL_COMPONENT}
 )
diff --git a/models/openmano/python/CMakeLists.txt b/models/openmano/python/CMakeLists.txt
index abbf139..593527f 100644
--- a/models/openmano/python/CMakeLists.txt
+++ b/models/openmano/python/CMakeLists.txt
@@ -9,5 +9,5 @@
     rift/openmano/__init__.py
     rift/openmano/rift2openmano.py
     rift/openmano/openmano_client.py
-  COMPONENT ${PKG_LONG_NAME}
+  COMPONENT ${INSTALL_COMPONENT}
   PYTHON3_ONLY)
diff --git a/models/openmano/python/rift/openmano/openmano_client.py b/models/openmano/python/rift/openmano/openmano_client.py
index 834eea5..248c7ff 100755
--- a/models/openmano/python/rift/openmano/openmano_client.py
+++ b/models/openmano/python/rift/openmano/openmano_client.py
@@ -92,6 +92,143 @@
 
         return None
 
+    def vnfs(self):
+        url = "http://{host}:{port}/openmano/{tenant}/vnfs".format(
+            host=self._host,
+            port=self._port,
+            tenant=self._tenant
+            )
+        resp = self._session.get(url, headers={'content-type': 'application/json'})
+        
+        try:
+            resp.raise_for_status()
+        except requests.exceptions.HTTPError as e:
+            raise InstanceStatusError(e)
+
+        return resp.json()
+
+    def vnf(self, vnf_id):
+        vnf_uuid = None
+        try:
+            vnfs = self.vnfs()
+            for vnf in vnfs["vnfs"]:
+                # Rift vnf ID gets mapped to osm_id in OpenMano
+                if vnf_id == vnf["osm_id"]:
+                    vnf_uuid = vnf["uuid"]
+                    break
+        except Exception as e:
+            raise e    
+
+        if not vnf_uuid:
+            return None
+        else:
+            url = "http://{host}:{port}/openmano/{tenant}/vnfs/{uuid}".format(
+                host=self._host,
+                port=self._port,
+                tenant=self._tenant,
+                uuid=vnf_uuid
+                )
+            resp = self._session.get(url, headers={'content-type': 'application/json'})
+        
+            try:
+                resp.raise_for_status()
+            except requests.exceptions.HTTPError as e:
+                raise InstanceStatusError(e)
+
+            return resp.json()['vnf']
+
+    def scenarios(self):
+        url = "http://{host}:{port}/openmano/{tenant}/scenarios".format(
+            host=self._host,
+            port=self._port,
+            tenant=self._tenant
+            )
+        resp = self._session.get(url, headers={'content-type': 'application/json'})
+        
+        try:
+            resp.raise_for_status()
+        except requests.exceptions.HTTPError as e:
+            raise InstanceStatusError(e)
+
+        return resp.json()
+
+    def scenario(self, scenario_id):
+        scenario_uuid = None
+        try:
+            scenarios = self.scenarios()
+            for scenario in scenarios["scenarios"]:
+                # Rift NS ID gets mapped to osm_id in OpenMano
+                if scenario_id == scenario["osm_id"]:
+                    scenario_uuid = scenario["uuid"]
+                    break
+        except Exception as e:
+            raise e    
+
+        if not scenario_uuid:
+            return None
+        else:
+            url = "http://{host}:{port}/openmano/{tenant}/scenarios/{uuid}".format(
+                host=self._host,
+                port=self._port,
+                tenant=self._tenant,
+                uuid=scenario_uuid
+                )
+            resp = self._session.get(url, headers={'content-type': 'application/json'})
+        
+            try:
+                resp.raise_for_status()
+            except requests.exceptions.HTTPError as e:
+                raise InstanceStatusError(e)
+
+            return resp.json()['scenario']
+
+    def post_vnfd_v3(self, vnfd_body):
+        # Check if the VNF is present at the RO
+        vnf_rift_id = vnfd_body["vnfd:vnfd-catalog"]["vnfd"][0]["id"]
+        vnf_check = self.vnf(vnf_rift_id)
+        
+        if not vnf_check:  
+            url = "http://{host}:{port}/openmano/v3/{tenant}/vnfd".format(
+                host=self._host,
+                port=self._port,
+                tenant=self._tenant
+                )
+            payload_data = json.dumps(vnfd_body)
+            resp = self._session.post(url, headers={'content-type': 'application/json'},
+                                        data=payload_data)
+            try:
+                resp.raise_for_status()
+            except requests.exceptions.HTTPError as e:
+                raise InstanceStatusError(e)
+
+            return resp.json()['vnfd'][0]
+
+        else:
+            return vnf_check
+
+    def post_nsd_v3(self, nsd_body):
+        # Check if the NS (Scenario) is present at the RO
+        scenario_rift_id = nsd_body["nsd:nsd-catalog"]["nsd"][0]["id"]
+        scenario_check = self.scenario(scenario_rift_id)
+
+        if not scenario_check:   
+            url = "http://{host}:{port}/openmano/v3/{tenant}/nsd".format(
+                host=self._host,
+                port=self._port,
+                tenant=self._tenant
+                )
+            payload_data = json.dumps(nsd_body)
+            resp = self._session.post(url, headers={'content-type': 'application/json'},
+                                        data=payload_data)
+            try:
+                resp.raise_for_status()
+            except requests.exceptions.HTTPError as e:
+                raise InstanceStatusError(e)
+
+            return resp.json()['nsd'][0]
+        else:
+            return scenario_check        
+
 
 class OpenmanoCliAPI(object):
     """ This class implements the necessary funtionality to interact with  """
diff --git a/models/openmano/python/rift/openmano/rift2openmano.py b/models/openmano/python/rift/openmano/rift2openmano.py
index 44e80b6..aeda289 100755
--- a/models/openmano/python/rift/openmano/rift2openmano.py
+++ b/models/openmano/python/rift/openmano/rift2openmano.py
@@ -24,16 +24,22 @@
 import sys
 import tempfile
 import yaml
+import ast
+import json
 
 import gi
 gi.require_version('RwYang', '1.0')
-gi.require_version('RwVnfdYang', '1.0')
-gi.require_version('RwNsdYang', '1.0')
+gi.require_version('RwProjectVnfdYang', '1.0')
+gi.require_version('RwProjectNsdYang', '1.0')
+gi.require_version('NsdYang', '1.0')
+gi.require_version('VnfdYang', '1.0')
 
 from gi.repository import (
     RwYang,
-    RwVnfdYang,
-    RwNsdYang,
+    RwProjectVnfdYang as RwVnfdYang,
+    RwProjectNsdYang as RwNsdYang,
+    NsdYang as NsdYang,
+    VnfdYang as VnfdYang
     )
 
 import rift.package.store
@@ -47,10 +53,9 @@
 
 
 class RiftNSD(object):
-    model = RwYang.Model.create_libncx()
+    model = RwYang.Model.create_libyang()
     model.load_module('nsd')
-    model.load_module('rw-nsd')
-
+    
     def __init__(self, descriptor):
         self._nsd = descriptor
 
@@ -92,28 +97,26 @@
     @classmethod
     def from_xml_file_hdl(cls, hdl):
         hdl.seek(0)
-        descriptor = RwNsdYang.YangData_Nsd_NsdCatalog_Nsd()
+        descriptor = NsdYang.YangData_Nsd_NsdCatalog_Nsd()
         descriptor.from_xml_v2(RiftNSD.model, hdl.read())
         return cls(descriptor)
 
     @classmethod
     def from_yaml_file_hdl(cls, hdl):
         hdl.seek(0)
-        descriptor = RwNsdYang.YangData_Nsd_NsdCatalog_Nsd()
+        descriptor = NsdYang.YangData_Nsd_NsdCatalog_Nsd()
         descriptor.from_yaml(RiftNSD.model, hdl.read())
         return cls(descriptor)
 
-    @classmethod
-    def from_dict(cls, nsd_dict):
-        descriptor = RwNsdYang.YangData_Nsd_NsdCatalog_Nsd.from_dict(nsd_dict)
-        return cls(descriptor)
+    def from_dict(self):
+        descriptor = NsdYang.YangData_Nsd_NsdCatalog_Nsd.from_dict(self._nsd.as_dict(), ignore_missing_keys=True).to_json_without_namespace(RiftNSD.model)
+        return descriptor
 
 
 class RiftVNFD(object):
-    model = RwYang.Model.create_libncx()
+    model = RwYang.Model.create_libyang()
     model.load_module('vnfd')
-    model.load_module('rw-vnfd')
-
+    
     def __init__(self, descriptor):
         self._vnfd = descriptor
 
@@ -147,21 +150,20 @@
     @classmethod
     def from_xml_file_hdl(cls, hdl):
         hdl.seek(0)
-        descriptor = RwVnfdYang.YangData_Vnfd_VnfdCatalog_Vnfd()
+        descriptor = VnfdYang.YangData_Vnfd_VnfdCatalog_Vnfd()
         descriptor.from_xml_v2(RiftVNFD.model, hdl.read())
         return cls(descriptor)
 
     @classmethod
     def from_yaml_file_hdl(cls, hdl):
         hdl.seek(0)
-        descriptor = RwVnfdYang.YangData_Vnfd_VnfdCatalog_Vnfd()
+        descriptor = VnfdYang.YangData_Vnfd_VnfdCatalog_Vnfd()
         descriptor.from_yaml(RiftVNFD.model, hdl.read())
         return cls(descriptor)
 
-    @classmethod
-    def from_dict(cls, vnfd_dict):
-        descriptor = RwVnfdYang.YangData_Vnfd_VnfdCatalog_Vnfd.from_dict(vnfd_dict)
-        return cls(descriptor)
+    def from_dict(self):
+        descriptor = VnfdYang.YangData_Vnfd_VnfdCatalog_Vnfd.from_dict(self._vnfd.as_dict(), ignore_missing_keys=True).to_json_without_namespace(RiftVNFD.model)
+        return descriptor
 
 
 def is_writable_directory(dir_path):
@@ -225,179 +227,65 @@
     return vnfd_name + "__" + str(member_idx)
 
 
-def rift2openmano_nsd(rift_nsd, rift_vnfds, openmano_vnfd_ids, rift_vnfd_id=None):
-    if rift_vnfd_id is None:
-        for vnfd_id in rift_nsd.vnfd_ids:
-            if vnfd_id not in rift_vnfds:
-                raise VNFNotFoundError("VNF id %s not provided" % vnfd_id)
+def rift2openmano_nsd(rift_nsd, rift_vnfds, openmano_vnfd_ids, http_api, rift_vnfd_id=None):
+    try:
+        if rift_vnfd_id is None:
+            for vnfd_id in rift_nsd.vnfd_ids:
+                if vnfd_id not in rift_vnfds:
+                    raise VNFNotFoundError("VNF id %s not provided" % vnfd_id)
 
-    openmano = {}
-    openmano["name"] = rift_nsd.name
-    if rift_vnfd_id is not None:
-        for scaling_groups in rift_nsd.scaling_group_descriptor:
-            openmano["name"] += scaling_groups.name
-    openmano["description"] = rift_nsd.description
-    topology = {}
-    openmano["topology"] = topology
+        openmano_nsd_im_body = json.loads(rift_nsd.from_dict())
+        openmano_nsd_api_format = {
+                                    "nsd:nsd-catalog": {
+                                        "nsd": [openmano_nsd_im_body['nsd-catalog']['nsd'][0]]
+                                    }
+                                }
 
-    topology["nodes"] = {}
-    for vnfd in rift_nsd.constituent_vnfds:
-        vnfd_id = vnfd.vnfd_id_ref
-        if rift_vnfd_id is not None and rift_vnfd_id != vnfd_id:
-            continue
-        rift_vnfd = rift_vnfds[vnfd_id]
-        member_idx = vnfd.member_vnf_index
-        openmano_vnfd_id = openmano_vnfd_ids.get(vnfd_id,None)
-        if openmano_vnfd_id:
-            topology["nodes"][rift_vnfd.name + "__" + str(member_idx)] = {
-                "type": "VNF",
-                "vnf_id": openmano_vnfd_id
-                }
-        else:
-            topology["nodes"][rift_vnfd.name + "__" + str(member_idx)] = {
-                "type": "VNF",
-                "VNF model": rift_vnfd.name
-                }
+        openmano_nsd = http_api.post_nsd_v3(openmano_nsd_api_format)
+        
+        return openmano_nsd
+        
+    except Exception as e:
+        logger.error(e)
+        raise e
 
-    for vld in rift_nsd.vlds:
-        # Openmano has both bridge_net and dataplane_net models for network types
-        # For now, since we are using openmano in developer mode lets just hardcode
-        # to bridge_net since it won't matter anyways.
-        # topology["nodes"][vld.name] = {"type": "network", "model": "bridge_net"}
-        pass
+def rift2openmano_vnfd_nsd(rift_nsd, rift_vnfds, openmano_vnfd_ids, http_api, rift_vnfd_id=None):
+    try:
+        if rift_vnfd_id not in rift_vnfds:
+                raise VNFNotFoundError("VNF id %s not provided" % rift_vnfd_id)
 
-    topology["connections"] = {}
-    for vld in rift_nsd.vlds:
+        # This is the scaling NSD Descriptor. Can use the NSD IM Model.
+        openmano_nsd_im_body = json.loads(rift_nsd.from_dict())
 
-        # Create a connections entry for each external VLD
-        topology["connections"][vld.name] = {}
-        topology["connections"][vld.name]["nodes"] = []
+        openmano_nsd_api_format = {
+                                    "nsd:nsd-catalog": {
+                                        "nsd": [openmano_nsd_im_body['nsd-catalog']['nsd'][0]]
+                                    }
+                                }
 
-        #if vld.vim_network_name:
-        if True:
-            if vld.name not in topology["nodes"]:
-                topology["nodes"][vld.name] = {
-                        "type": "external_network",
-                        "model": vld.name,
-                        }
+        openmano_nsd = http_api.post_nsd_v3(openmano_nsd_im_body)
+        
+        return openmano_nsd
 
-            # Add the external network to the list of connection points
-            topology["connections"][vld.name]["nodes"].append(
-                    {vld.name: "0"}
-                    )
-        elif vld.provider_network.has_field("physical_network"):
-            # Add the external datacenter network to the topology
-            # node list if it isn't already added
-            ext_net_name = vld.provider_network.physical_network
-            ext_net_name_with_seg = ext_net_name
-            if vld.provider_network.has_field("segmentation_id"):
-                ext_net_name_with_seg += ":{}".format(vld.provider_network.segmentation_id)
-
-            if ext_net_name not in topology["nodes"]:
-                topology["nodes"][ext_net_name] = {
-                        "type": "external_network",
-                        "model": ext_net_name_with_seg,
-                        }
-
-            # Add the external network to the list of connection points
-            topology["connections"][vld.name]["nodes"].append(
-                    {ext_net_name: "0"}
-                    )
+    except Exception as e:
+        logger.error(e)
+        raise e
 
 
-        for vnfd_cp in vld.vnfd_connection_point_ref:
-
-            # Get the RIFT VNF for this external VLD connection point
-            vnfd = rift_vnfds[vnfd_cp.vnfd_id_ref]
-
-            # For each VNF in this connection, use the same interface name
-            topology["connections"][vld.name]["type"] = "link"
-            # Vnf ref is the vnf name with the member_vnf_idx appended
-            member_idx = vnfd_cp.member_vnf_index_ref
-            vnf_ref = vnfd.name + "__" + str(member_idx)
-            topology["connections"][vld.name]["nodes"].append(
-                {
-                    vnf_ref: vnfd_cp.vnfd_connection_point_ref
-                }
-            )
-    return openmano
-
-def rift2openmano_vnfd_nsd(rift_nsd, rift_vnfds, openmano_vnfd_ids,rift_vnfd_id=None):
-
-    if rift_vnfd_id not in rift_vnfds:
-            raise VNFNotFoundError("VNF id %s not provided" % rift_vnfd_id)
-
-    openmano_vnfd_nsd = {}
-    for groups in rift_nsd.scaling_group_descriptor:
-        openmano_vnfd_nsd["name"] = rift_vnfd_id+'__'+'scaling_group'+'__'+groups.name
-    openmano_vnfd_nsd["description"] = "Scaling Group"
-    topology = {}
-    openmano_vnfd_nsd["topology"] = topology
-    topology["connections"] = {}
-    topology["nodes"] = {}
-    tst_index = []
-    openmano_vnfd_id = openmano_vnfd_ids.get(rift_vnfd_id,None)
-    for rvnfd_id in rift_nsd.constituent_vnfds:
-        if rvnfd_id.vnfd_id_ref == rift_vnfd_id:
-            rift_vnfd = rift_vnfds[rift_vnfd_id]
-            topology["nodes"][rift_vnfd.name +'__'+str(rvnfd_id.member_vnf_index)] = {
-                "type": "VNF",
-                "vnf_id": openmano_vnfd_id
-            }
-
-    for vld in rift_nsd.vlds:
-
-        # Create a connections entry for each external VLD
-        topology["connections"][vld.name] = {}
-        topology["connections"][vld.name]["nodes"] = []
-        if True:
-            if vld.name not in topology["nodes"]:
-                topology["nodes"][vld.name] = {
-                        "type": "external_network",
-                        "model": vld.name,
-                        }
-            topology["connections"][vld.name]["nodes"].append(
-                    {vld.name: "0"}
-                    )
-
-            
-
-    for vnfd_cp in vld.vnfd_connection_point_ref:
-        if not rift_vnfd_id in vnfd_cp.vnfd_id_ref:
-            continue
-        if rift_vnfd_id in vnfd_cp.vnfd_id_ref:
-
-            # Get the RIFT VNF for this external VLD connection point
-            vnfd = rift_vnfds[vnfd_cp.vnfd_id_ref]
-            
-
-            # For each VNF in this connection, use the same interface name
-            topology["connections"][vld.name]["type"] = "link"
-            # Vnf ref is the vnf name with the member_vnf_idx appended
-            member_idx = vnfd_cp.member_vnf_index_ref
-            vnf_ref = vnfd.name + "__" + str(member_idx)
-            topology["connections"][vld.name]["nodes"].append(
-                {
-                    vnf_ref: vnfd_cp.vnfd_connection_point_ref
-                }
-            )
-    return openmano_vnfd_nsd
-
-
-def cloud_init(rift_vnfd_id, vdu):
+def cloud_init(rift_vnfd_id, vdu, project_name='default'):
     """ Populate cloud_init with script from
          either the inline contents or from the file provided
     """
-    vnfd_package_store = rift.package.store.VnfdPackageFilesystemStore(logger)
+    vnfd_package_store = rift.package.store.VnfdPackageFilesystemStore(logger, project=project_name)
 
     cloud_init_msg = None
-    if vdu.cloud_init is not None:
-        logger.debug("cloud_init script provided inline %s", vdu.cloud_init)
-        cloud_init_msg = vdu.cloud_init
-    elif vdu.cloud_init_file is not None:
-	# Get cloud-init script contents from the file provided in the cloud_init_file param
-        logger.debug("cloud_init script provided in file %s", vdu.cloud_init_file)
-        filename = vdu.cloud_init_file
+    if 'cloud_init' in vdu:
+        logger.debug("cloud_init script provided inline %s", vdu['cloud_init'])
+        cloud_init_msg = vdu['cloud_init']
+    elif 'cloud_init_file' in vdu:
+    # Get cloud-init script contents from the file provided in the cloud_init_file param
+        logger.debug("cloud_init script provided in file %s", vdu['cloud_init_file'])
+        filename = vdu['cloud_init_file']
         vnfd_package_store.refresh()
         stored_package = vnfd_package_store.get_package(rift_vnfd_id)
         cloud_init_extractor = rift.package.cloud_init.PackageCloudInitExtractor(logger)
@@ -412,10 +300,10 @@
     logger.debug("Current cloud init msg is {}".format(cloud_init_msg))
     return cloud_init_msg
 
-def config_file_init(rift_vnfd_id, vdu, cfg_file):
+def config_file_init(rift_vnfd_id, vdu, cfg_file, project_name='default'):
     """ Populate config file init with file provided
     """
-    vnfd_package_store = rift.package.store.VnfdPackageFilesystemStore(logger)
+    vnfd_package_store = rift.package.store.VnfdPackageFilesystemStore(logger, project=project_name)
 
     # Get script contents from the file provided in the cloud_init directory
     logger.debug("config file script provided in file {}".format(cfg_file))
@@ -431,273 +319,45 @@
     logger.debug("Current config file msg is {}".format(cfg_file_msg))
     return cfg_file_msg
 
-def rift2openmano_vnfd(rift_vnfd, rift_nsd):
-    openmano_vnf = {"vnf":{}}
-    vnf = openmano_vnf["vnf"]
+def rift2openmano_vnfd(rift_vnfd, rift_nsd, http_api):
+    try:
+        openmano_vnfd_im_body = json.loads(rift_vnfd.from_dict())
+        
+        # All type_yang leafs renamed to type
+        
 
-    vnf["name"] = rift_vnfd.name
-    vnf["description"] = rift_vnfd.description
+        vnfd_dict = openmano_vnfd_im_body['vnfd-catalog']['vnfd'][0]
+        
+        if 'vdu' in vnfd_dict:
+            for vdu in vnfd_dict['vdu']:
+                if 'cloud_init_file' in vdu:
+                    # Replacing the leaf with the actual contents of the file.
+                    # The RO does not have the ability to read files yet.
+                    vdu['cloud_init_file'] = cloud_init(openmano_vnfd_im_body.id, vdu)
+                elif 'cloud_init' in vdu:
+                    vdu['cloud_init'] = cloud_init(openmano_vnfd_im_body.id, vdu)
 
-    vnf["external-connections"] = []
+                if 'supplemental_boot_data' in vdu:
+                    if 'config_file' in vdu['supplemental_boot_data']:
+                        for config_file in vdu['supplemental_boot_data']['config_file']:
+                            # Replacing the leaf with the actual contents of the file.
+                            # The RO does not have the ability to read files yet.
+                            config_file['source'] = config_file_init(openmano_vnfd_im_body.id, vdu, config_file['source'])
+        
+        openmano_vnfd_api_format = {
+                                    "vnfd:vnfd-catalog": {
+                                        "vnfd": [vnfd_dict]
+                                    }
+                                }
 
-    def find_vdu_and_ext_if_by_cp_ref(cp_ref_name):
-        for vdu in rift_vnfd.vdus:
-            for ext_if in vdu.external_interface:
-                if ext_if.vnfd_connection_point_ref == cp_ref_name:
-                    return vdu, ext_if
+        openmano_vnfd = http_api.post_vnfd_v3(openmano_vnfd_api_format)
+        
+        return openmano_vnfd
 
-        raise ValueError("External connection point reference %s not found" % cp_ref_name)
+    except Exception as e:
+        logger.error(e)
+        raise e
 
-    def find_vdu_and_int_if_by_cp_ref(cp_ref_id):
-        for vdu in rift_vnfd.vdus:
-            for int_if in vdu.internal_interface:
-                if int_if.vdu_internal_connection_point_ref == cp_ref_id:
-                    return vdu, int_if
-
-        raise ValueError("Internal connection point reference %s not found" % cp_ref_id)
-
-    def rift2openmano_if_type(ext_if):
-
-        cp_ref_name = ext_if.vnfd_connection_point_ref
-        for vld in rift_nsd.vlds:
-
-            # if it is an explicit mgmt_network then check if the given
-            # cp_ref is a part of it
-            if not vld.mgmt_network:
-                continue
-
-            for vld_cp in vld.vnfd_connection_point_ref:
-                if vld_cp.vnfd_connection_point_ref == cp_ref_name:
-                    return "mgmt"
-
-
-        rift_type = ext_if.virtual_interface.type_yang
-        # Retaining it for backward compatibility!
-        if rift_type == "OM_MGMT":
-            return "mgmt"
-        elif rift_type == "VIRTIO" or rift_type == "E1000":
-            return "bridge"
-        else:
-            return "data"
-
-    def rift2openmano_vif(rift_type):
-        if rift_type == "VIRTIO":
-            return "virtio"
-        elif rift_type == "E1000":
-            return "e1000"
-        else:
-            raise ValueError("VDU Virtual Interface type {} not supported".format(rift_type))
-
-    # Add all external connections
-    cp_to_port_security_map = {}
-
-    for cp in rift_vnfd.cps:
-        # Find the VDU and and external interface for this connection point
-        vdu, ext_if = find_vdu_and_ext_if_by_cp_ref(cp.name)
-        connection = {
-            "name": cp.name,
-            "type": rift2openmano_if_type(ext_if),
-            "VNFC": vdu.name,
-            "local_iface_name": ext_if.name,
-            "description": "%s iface on VDU %s" % (ext_if.name, vdu.name),
-            }
-
-        if cp.has_field('port_security_enabled'):
-            cp_to_port_security_map[cp.name] = cp.port_security_enabled
-        vnf["external-connections"].append(connection)
-
-    # Add all internal networks
-    for vld in rift_vnfd.internal_vlds:
-        connection = {
-            "name": vld.name,
-            "description": vld.description,
-            "type": "bridge",
-            "elements": [],
-            }
-
-        # Add the specific VDU connection points
-        for int_cp in vld.internal_connection_point:
-            vdu, int_if = find_vdu_and_int_if_by_cp_ref(int_cp.id_ref)
-            connection["elements"].append({
-                "VNFC": vdu.name,
-                "local_iface_name": int_if.name,
-                })
-        if "internal-connections" not in vnf:
-            vnf["internal-connections"] = []
-
-        vnf["internal-connections"].append(connection)
-
-    # Add VDU's
-    vnf["VNFC"] = []
-    for vdu in rift_vnfd.vdus:
-        vnfc = {
-            "name": vdu.name,
-            "description": vdu.name,
-            "bridge-ifaces": [],
-            }
-
-        if vdu.vm_flavor.has_field("storage_gb") and vdu.vm_flavor.storage_gb:
-            vnfc["disk"] = vdu.vm_flavor.storage_gb
-
-        if vdu.has_field("image"):
-            if os.path.isabs(vdu.image):
-                vnfc["VNFC image"] = vdu.image
-            else:
-                vnfc["image name"] = vdu.image
-                if vdu.has_field("image_checksum"):
-                    vnfc["image checksum"] = vdu.image_checksum
-
-        dedicated_int = False
-        for intf in list(vdu.internal_interface) + list(vdu.external_interface):
-            if intf.virtual_interface.type_yang in ["SR_IOV", "PCI_PASSTHROUGH"]:
-                dedicated_int = True
-        if vdu.guest_epa.has_field("numa_node_policy") or dedicated_int:
-            vnfc["numas"] = [{
-                           "memory": max(int(vdu.vm_flavor.memory_mb/1024), 1),
-                           "interfaces":[],
-                           }]
-            numa_node_policy = vdu.guest_epa.numa_node_policy
-            if numa_node_policy.has_field("node"):
-                numa_node = numa_node_policy.node[0]
-
-                if numa_node.has_field("num_cores"):
-                    vnfc["numas"][0]["cores"] = numa_node.num_cores
-
-                if numa_node.has_field("paired_threads"):
-                    if numa_node.paired_threads.has_field("num_paired_threads"):
-                        vnfc["numas"][0]["paired-threads"] = numa_node.paired_threads.num_paired_threads
-                    if len(numa_node.paired_threads.paired_thread_ids) > 0:
-                        vnfc["numas"][0]["paired-threads-id"] = []
-                        for pair in numa_node.paired_threads.paired_thread_ids:
-                             vnfc["numas"][0]["paired-threads-id"].append(
-                                     [pair.thread_a, pair.thread_b]
-                                     )
-
-                if numa_node.has_field("num_threads"):
-                    vnfc["numas"][0]["threads"] = numa_node.num_threads
-            else:
-                if vdu.vm_flavor.has_field("vcpu_count"):
-                    vnfc["numas"][0]["cores"] = max(vdu.vm_flavor.vcpu_count, 1)
-
-        if vdu.vm_flavor.has_field("vcpu_count") and vdu.vm_flavor.vcpu_count:
-            vnfc["vcpus"] = vdu.vm_flavor.vcpu_count
-
-        if vdu.vm_flavor.has_field("memory_mb") and vdu.vm_flavor.memory_mb:
-            vnfc["ram"] = vdu.vm_flavor.memory_mb
-
-
-        if vdu.has_field("hypervisor_epa"):
-            vnfc["hypervisor"] = {}
-            if vdu.hypervisor_epa.has_field("type"):
-                if vdu.hypervisor_epa.type_yang == "REQUIRE_KVM":
-                    vnfc["hypervisor"]["type"] = "QEMU-kvm"
-
-            if vdu.hypervisor_epa.has_field("version"):
-                vnfc["hypervisor"]["version"] = vdu.hypervisor_epa.version
-
-        if vdu.has_field("host_epa"):
-            vnfc["processor"] = {}
-            if vdu.host_epa.has_field("om_cpu_model_string"):
-                vnfc["processor"]["model"] = vdu.host_epa.om_cpu_model_string
-            if vdu.host_epa.has_field("om_cpu_feature"):
-                vnfc["processor"]["features"] = []
-                for feature in vdu.host_epa.om_cpu_feature:
-                    vnfc["processor"]["features"].append(feature.feature)
-
-        if vdu.has_field("volumes"):
-            vnfc["devices"] = []
-            # Sort volumes as device-list is implictly ordered by Openmano
-            newvollist = sorted(vdu.volumes, key=lambda k: k.name) 
-            for iter_num, volume in enumerate(newvollist):
-                if iter_num == 0:
-                    # Convert the first volume to vnfc.image
-                    if os.path.isabs(volume.image):
-                        vnfc["VNFC image"] = volume.image
-                    else:
-                        vnfc["image name"] = volume.image
-                        if volume.has_field("image_checksum"):
-                            vnfc["image checksum"] = volume.image_checksum
-                else:
-                    # Add Openmano devices
-                    device = {}
-                    device["type"] = volume.device_type
-                    if volume.has_field("size"):
-                        device["size"] = volume.size
-                    if volume.has_field("image"):
-                        device["image name"] = volume.image
-                        if volume.has_field("image_checksum"):
-                            device["image checksum"] = volume.image_checksum
-                    vnfc["devices"].append(device)   
-
-        vnfc_boot_data_init = False
-        if vdu.has_field("cloud_init") or vdu.has_field("cloud_init_file"):
-            vnfc['boot-data'] = dict()
-            vnfc_boot_data_init = True
-            vnfc['boot-data']['user-data'] = cloud_init(rift_vnfd.id, vdu)
-
-        if vdu.has_field("supplemental_boot_data"):
-            if vdu.supplemental_boot_data.has_field('boot_data_drive'):
-                if vdu.supplemental_boot_data.boot_data_drive is True:
-                    if vnfc_boot_data_init is False:
-                        vnfc['boot-data'] = dict()
-                        vnfc_boot_data_init = True
-                    vnfc['boot-data']['boot-data-drive'] = vdu.supplemental_boot_data.boot_data_drive
-
-            if vdu.supplemental_boot_data.has_field('config_file'):
-                om_cfgfile_list = list()
-                for custom_config_file in vdu.supplemental_boot_data.config_file:
-                    cfg_source = config_file_init(rift_vnfd.id, vdu, custom_config_file.source)
-                    om_cfgfile_list.append({"dest":custom_config_file.dest, "content": cfg_source})
-                vnfc['boot-data']['config-files'] = om_cfgfile_list
- 
-
-        vnf["VNFC"].append(vnfc)
-
-        for int_if in list(vdu.internal_interface) + list(vdu.external_interface):
-            intf = {
-                "name": int_if.name,
-                }
-            if int_if.virtual_interface.has_field("vpci"):
-                intf["vpci"] = int_if.virtual_interface.vpci
-
-            if int_if.virtual_interface.type_yang in ["VIRTIO", "E1000"]:
-                intf["model"] = rift2openmano_vif(int_if.virtual_interface.type_yang)
-                vnfc["bridge-ifaces"].append(intf)
-
-            elif int_if.virtual_interface.type_yang in ["OM_MGMT"]:
-                vnfc["bridge-ifaces"].append(intf)
-
-            elif int_if.virtual_interface.type_yang == "SR_IOV":
-                intf["bandwidth"] = "10 Gbps"
-                intf["dedicated"] = "no"
-                vnfc["numas"][0]["interfaces"].append(intf)
-
-            elif int_if.virtual_interface.type_yang == "PCI_PASSTHROUGH":
-                intf["bandwidth"] = "10 Gbps"
-                intf["dedicated"] = "yes"
-                if "interfaces" not in vnfc["numas"][0]:
-                    vnfc["numas"][0]["interfaces"] = []
-                vnfc["numas"][0]["interfaces"].append(intf)
-            else:
-                raise ValueError("Interface type %s not supported" % int_if.virtual_interface)
-
-            if int_if.virtual_interface.has_field("bandwidth"):
-                if int_if.virtual_interface.bandwidth != 0:
-                    bps = int_if.virtual_interface.bandwidth
-
-                    # Calculate the bits per second conversion
-                    for x in [('M', 1000000), ('G', 1000000000)]:
-                        if bps/x[1] >= 1:
-                            intf["bandwidth"] = "{} {}bps".format(math.ceil(bps/x[1]), x[0])
-
-        for bridge_iface in vnfc["bridge-ifaces"]:
-            if bridge_iface['name'] in cp_to_port_security_map:
-                bridge_iface['port-security'] = cp_to_port_security_map[bridge_iface['name']]
-        # Sort bridge-ifaces-list TODO sort others
-        newlist = sorted(vnfc["bridge-ifaces"], key=lambda k: k['name'])
-        vnfc["bridge-ifaces"] = newlist
-
-    return openmano_vnf
 
 
 def parse_args(argv=sys.argv[1:]):
@@ -779,6 +439,7 @@
     vnfd_nsd = rift2openmano_vnfd_nsd(nsd, vnf_dict, openmano_vnfr_ids)
     write_yaml_to_file(openmano_nsd["name"], args.outdir, openmano_nsd)
     write_yaml_to_file(vnfd_nsd["name"], args.outdir, vnfd_nsd)
+
     for vnf in vnf_dict.values():
         openmano_vnf = rift2openmano_vnfd(vnf, nsd)
         write_yaml_to_file(openmano_vnf["vnf"]["name"], args.outdir, openmano_vnf)
diff --git a/models/openmano/src/CMakeLists.txt b/models/openmano/src/CMakeLists.txt
index d5ad460..dfb9fc3 100644
--- a/models/openmano/src/CMakeLists.txt
+++ b/models/openmano/src/CMakeLists.txt
@@ -80,5 +80,5 @@
 
  DESTINATION
     usr/rift/mano/examples/tidgen_ns
-    COMPONENT ${PKG_LONG_NAME}
+    COMPONENT ${INSTALL_COMPONENT}
   )
diff --git a/models/openmano/src/generate_tidgen_packages.sh.in b/models/openmano/src/generate_tidgen_packages.sh.in
index 3c50cef..cff777b 100755
--- a/models/openmano/src/generate_tidgen_packages.sh.in
+++ b/models/openmano/src/generate_tidgen_packages.sh.in
@@ -1,15 +1,17 @@
 #! /bin/bash
 
 set -e
+set -x
 
 SOURCE_DIR=@CMAKE_CURRENT_SOURCE_DIR@
 BINARY_DIR=@CMAKE_CURRENT_BINARY_DIR@
 PROJECT_TOP_DIR=@PROJECT_TOP_DIR@
 
 # These paths are needed for finding the overrides and so files
-PYTHONPATH=${PYTHONPATH}:@RIFT_SUBMODULE_SOURCE_ROOT@/rwvcs/ra:@RIFT_SUBMODULE_BINARY_ROOT@/models/plugins/yang
-PYTHON3PATH=${PYTHON3PATH}:@RIFT_SUBMODULE_SOURCE_ROOT@/rwvcs/ra:@RIFT_SUBMODULE_BINARY_ROOT@/models/plugins/yang
-LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:@RIFT_SUBMODULE_BINARY_ROOT@/models/plugins/yang:@RIFT_SUBMODULE_BINARY_ROOT@/common/plugins/yang
+export PYTHONPATH=${PYTHONPATH}:@RIFT_SUBMODULE_SOURCE_ROOT@/rwvcs/ra:@RIFT_SUBMODULE_BINARY_ROOT@/models/plugins/yang
+export PYTHON3PATH=${PYTHON3PATH}:@RIFT_SUBMODULE_SOURCE_ROOT@/rwvcs/ra:@RIFT_SUBMODULE_BINARY_ROOT@/models/plugins/yang
+export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:@RIFT_SUBMODULE_BINARY_ROOT@/models/plugins/yang:@RIFT_SUBMODULE_BINARY_ROOT@/common/plugins/yang
+export GI_TYPELIB_PATH=${GI_TYPELIB_PATH}:@RIFT_SUBMODULE_SOURCE_ROOT@/models/plugins/yang:@RIFT_SUBMODULE_BINARY_ROOT@/common/plugins/yang
 
 # Remove any old directories
 rm -rf ${BINARY_DIR}/2tidgenMWC_4sriov
diff --git a/models/openmano/src/openmano2rift.py b/models/openmano/src/openmano2rift.py
index 503ad89..8b91910 100755
--- a/models/openmano/src/openmano2rift.py
+++ b/models/openmano/src/openmano2rift.py
@@ -1,7 +1,7 @@
 #!/usr/bin/env python3
 
 # 
-#   Copyright 2016 RIFT.IO Inc
+#   Copyright 2016-2017 RIFT.IO Inc
 #
 #   Licensed under the Apache License, Version 2.0 (the "License");
 #   you may not use this file except in compliance with the License.
@@ -28,12 +28,14 @@
 
 import gi
 gi.require_version('RwYang', '1.0')
-gi.require_version('RwVnfdYang', '1.0')
-gi.require_version('RwNsdYang', '1.0')
+gi.require_version('RwProjectVnfdYang', '1.0')
+gi.require_version('RwProjectNsdYang', '1.0')
+gi.require_version('RwProjectYang', '1.0')
 from gi.repository import (
     RwYang,
-    RwVnfdYang,
-    RwNsdYang,
+    RwProjectVnfdYang as RwVnfdYang,
+    RwProjectNsdYang as RwNsdYang,
+    RwProjectYang,
     )
 
 logging.basicConfig(level=logging.WARNING)
@@ -46,7 +48,7 @@
 
 class DescriptorFileWriter(object):
     def __init__(self, module_list, output_dir, output_format):
-        self._model = RwYang.Model.create_libncx()
+        self._model = RwYang.Model.create_libyang()
         for module in module_list:
             self._model.load_module(module)
 
@@ -115,7 +117,7 @@
         return vnf_name
 
     def openmano2rift(self, vnf_list):
-        self.descriptor = RwNsdYang.YangData_Nsd_NsdCatalog()
+        self.descriptor = RwNsdYang.YangData_RwProject_Project_NsdCatalog()
         openmano_nsd = self.openmano.dictionary
         self.name = openmano_nsd['name']
         nsd = self.descriptor.nsd.add()
@@ -203,7 +205,7 @@
         return None
 
     def openmano2rift(self):
-        self.descriptor = RwVnfdYang.YangData_Vnfd_VnfdCatalog()
+        self.descriptor = RwVnfdYang.YangData_RwProject_Project_VnfdCatalog()
         vnfd = self.descriptor.vnfd.add()
         self.vnfd = vnfd
         vnfd.id = str(uuid.uuid1())
@@ -241,9 +243,10 @@
                 if not ext_conn:
                     continue
 
-                ext_iface = vdu.external_interface.add()
+                ext_iface = vdu.interface.add()
                 ext_iface.name = numa_if['name']
-                ext_iface.vnfd_connection_point_ref = ext_conn['name']
+                ext_iface.type_yang = 'EXTERNAL'
+                ext_iface.external_connection_point_ref = ext_conn['name']
                 ext_iface.virtual_interface.vpci = numa_if['vpci']
                 if numa_if['dedicated'] == 'no':
                     ext_iface.virtual_interface.type_yang = 'SR_IOV'
@@ -322,9 +325,10 @@
                     ext_conn = self.find_external_connection(vdu.name,
                                                              bridge_iface['name'])
                     if ext_conn:
-                        ext_iface = vdu.external_interface.add()
+                        ext_iface = vdu.interface.add()
                         ext_iface.name = bridge_iface['name']
-                        ext_iface.vnfd_connection_point_ref = ext_conn['name']
+                        ext_iface.type_yang = 'EXTERNAL'
+                        ext_iface.external_connection_point_ref = ext_conn['name']
                         if 'vpci' in bridge_iface:
                             ext_iface.virtual_interface.vpci = bridge_iface['vpci']
                         ext_iface.virtual_interface.type_yang = 'VIRTIO'
@@ -467,8 +471,9 @@
     vnf_list = create_vnfs_from_yaml_files(args.yaml_file_hdls)
     ns_list = create_ns_from_yaml_files(args.yaml_file_hdls, vnf_list)
 
+    # TODO (Philip): Relook at the model generation
     writer = DescriptorFileWriter(
-        module_list=['nsd', 'rw-nsd', 'vnfd', 'rw-vnfd'],
+        module_list=['rw-project', 'project-nsd', 'rw-project-nsd', 'project-vnfd', 'rw-project-vnfd'],
         output_dir=args.outdir,
         output_format=args.format,
         )
diff --git a/models/plugins/yang/CMakeLists.txt b/models/plugins/yang/CMakeLists.txt
index 2f6e964..99b6a63 100644
--- a/models/plugins/yang/CMakeLists.txt
+++ b/models/plugins/yang/CMakeLists.txt
@@ -1,5 +1,5 @@
 # 
-#   Copyright 2016 RIFT.IO Inc
+#   Copyright 2016-2017 RIFT.IO Inc
 #
 #   Licensed under the Apache License, Version 2.0 (the "License");
 #   you may not use this file except in compliance with the License.
@@ -22,14 +22,19 @@
   ietf-l2-topology.yang
   ietf-network-topology.yang
   ietf-network.yang
+  nsd-base.yang rw-nsd-base.yang
   nsd.yang rw-nsd.yang
+  project-nsd.yang rw-project-nsd.yang
   nsr.yang rw-nsr.yang
   pnfd.yang
   rw-topology.yang
   vld.yang rw-vld.yang
   vlr.yang rw-vlr.yang
+  vnfd-base.yang rw-vnfd-base.yang
   vnfd.yang rw-vnfd.yang
+  project-vnfd.yang rw-project-vnfd.yang
   vnfr.yang rw-vnfr.yang
+  mano-rift-groupings.yang
   vnffgd.yang
   )
 
@@ -37,23 +42,38 @@
   TARGET mano-types_yang
   YANG_FILES
     mano-types.yang
-  COMPONENT ${PKG_LONG_NAME}
+  COMPONENT ${INSTALL_COMPONENT}
+  LIBRARIES
+    rwprojectmano_yang_gen
   )
 
 rift_add_yang_target(
   TARGET mano_yang
   YANG_FILES ${source_yang_files}
   GIR_PATHS ${CMAKE_CURRENT_BINARY_DIR}
-  COMPONENT ${PKG_LONG_NAME}
+  COMPONENT ${INSTALL_COMPONENT}
   LIBRARIES
     rwmanifest_yang_gen
     rwschema_yang_gen
     rwcloud_yang_gen
+    rwro_account_yang_gen
+    rwsdn_yang_gen
     rwconfig_agent_yang_gen
     mano-types_yang_gen
+    rwprojectmano_yang_gen
   DEPENDS
     rwcloud_yang
+    rwro_account_yang
+    rwsdn_yang
     rwconfig_agent_yang
+    rwprojectmano_yang
+  ASSOCIATED_FILES
+    project-vnfd.role.xml
+    project-nsd.role.xml
+    vnfr.role.xml
+    rw-vnfr.role.xml
+    vlr.role.xml
+    nsr.role.xml
   )
 
 #rift_gen_yang_tree(mano-pyang-trees
diff --git a/models/plugins/yang/ietf-network.yang b/models/plugins/yang/ietf-network.yang
index a059e94..9308544 100644
--- a/models/plugins/yang/ietf-network.yang
+++ b/models/plugins/yang/ietf-network.yang
@@ -13,10 +13,6 @@
     prefix inet;
   }
 
-  import rw-pb-ext {
-    prefix "rwpb";
-  }
-
   organization "TBD";
   contact
     "WILL-BE-DEFINED-LATER";
diff --git a/models/plugins/yang/mano-rift-groupings.yang b/models/plugins/yang/mano-rift-groupings.yang
new file mode 100644
index 0000000..1f684b2
--- /dev/null
+++ b/models/plugins/yang/mano-rift-groupings.yang
@@ -0,0 +1,107 @@
+/*
+ * 
+ *   Copyright 2016-2017 RIFT.IO Inc
+ *
+ *   Licensed under the Apache License, Version 2.0 (the "License");
+ *   you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *       http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *   Unless required by applicable law or agreed to in writing, software
+ *   distributed under the License is distributed on an "AS IS" BASIS,
+ *   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *   See the License for the specific language governing permissions and
+ *   limitations under the License.
+ *
+ *
+ */
+
+ module mano-rift-groupings
+{
+  namespace "urn:ietf:params:xml:ns:yang:nfvo:mano-rift-groupings";
+  prefix "mano-rift";
+
+  import vnfd {
+    prefix "vnfd";
+  }
+
+  import mano-types {
+    prefix "manotypes";
+  }
+
+  import nsd {
+    prefix "nsd";
+  }
+
+  import project-vnfd {
+    prefix "project-vnfd";
+  }
+
+  grouping custom-meta-data {
+    description "Grouping for instance-specific meta data";
+    list custom-meta-data {
+      description
+          "List of meta-data to be associated with the instance";
+      key "name";
+      leaf name {
+        description "Name of the meta-data parameter";
+        type string;
+      }
+
+      leaf data-type {
+        description "Data-type the meta-data parameter";
+        type manotypes:meta-data-type;
+        default "STRING";
+      }
+
+      leaf value {
+        description "Value of the meta-data parameter";
+        type string;
+      }
+
+      leaf destination {
+        description "Type of input parameter";
+        type enumeration {
+            enum "CLOUD_INIT";
+            enum "CLOUD_METADATA";
+        }
+        default "CLOUD_METADATA";
+      }
+    }
+  }
+
+  grouping volume-info-additions {
+  	leaf boot-volume {
+      description "This flag indicates if this is boot volume or not";
+      type boolean;
+    }
+
+    leaf boot-priority {
+      description "Boot priority associated with volume";
+      type int32;
+    }
+  }
+
+  grouping http-end-point-additions {
+  	leaf data {
+      description
+        "This is the data to be sent with POST ";
+      type  string;
+    }
+  }
+
+  grouping ssh-key-generated {
+  	container ssh-key-generated {
+      description "SSH key pair generated for this NS";
+      leaf public-key {
+        description "Public key generated";
+        type string;
+      }
+      leaf private-key-file {
+        description "Path to the private key file";
+        type string;
+      }
+    }
+  }
+}
diff --git a/models/plugins/yang/mano-types.yang b/models/plugins/yang/mano-types.yang
index 4ec602c..a58492e 100644
--- a/models/plugins/yang/mano-types.yang
+++ b/models/plugins/yang/mano-types.yang
@@ -1,7 +1,7 @@
 
 /*
- * 
- *   Copyright 2016 RIFT.IO Inc
+ *
+ *   Copyright 2016-2017 RIFT.IO Inc
  *
  *   Licensed under the Apache License, Version 2.0 (the "License");
  *   you may not use this file except in compliance with the License.
@@ -27,8 +27,13 @@
     prefix "inet";
   }
 
-  import rw-pb-ext {
-    prefix "rwpb";
+  import rw-project {
+    prefix "rw-project";
+  }
+
+  revision 2017-02-08 {
+    description
+      "Update model to support projects.";
   }
 
   revision 2015-04-23 {
@@ -40,6 +45,12 @@
       "Derived from earlier versions of base YANG files";
   }
 
+  typedef meta-data-type {
+    type enumeration {
+      enum STRING;
+    }
+  }
+
   typedef package-type {
       description "Type of descriptor being on-boarded";
       type enumeration {
@@ -109,6 +120,7 @@
         "The value should be dimmed by the UI.
         Only applies to parameters with default values.";
       type boolean;
+      default false;
     }
 
     leaf hidden {
@@ -116,28 +128,29 @@
         "The value should be hidden by the UI.
         Only applies to parameters with default values.";
       type boolean;
+      default false;
     }
   }
-  
+
   grouping ui-primitive-group {
     list parameter-group {
       description
             "Grouping of parameters which are logically grouped in UI";
       key "name";
- 
+
       leaf name {
         description
             "Name of the parameter group";
         type string;
       }
- 
+
       list parameter {
         description
             "List of parameters for the service primitive.";
         key "name";
         uses manotypes:primitive-parameter;
       }
- 
+
       leaf mandatory {
         description "Is this parameter group mandatory";
         type boolean;
@@ -146,28 +159,7 @@
     }
   }
 
-  grouping image-properties {
-    leaf image {
-      description
-            "Image name for the software image.
-             If the image name is found within the VNF package it will
-             be uploaded to all VIM accounts during onboarding process.
-             Otherwise, the image must be added to the VIM account with
-             the same name as entered here.
-            ";
-      type string;
-    }
-
-    leaf image-checksum {
-      description
-            "Image md5sum for the software image.
-            The md5sum, if provided, along with the image name uniquely
-            identifies an image uploaded to the CAL.
-            ";
-      type string;
-    } 
-  }
-  grouping initial-config {
+  grouping event-config {
     leaf seq {
       description
           "Sequence number for the configuration primitive.";
@@ -200,11 +192,32 @@
     }
   }
 
+  grouping image-properties {
+    leaf image {
+      description
+            "Image name for the software image.
+             If the image name is found within the VNF package it will
+             be uploaded to all VIM accounts during onboarding process.
+             Otherwise, the image must be added to the VIM account with
+             the same name as entered here.
+            ";
+      type string;
+    }
+
+    leaf image-checksum {
+      description
+            "Image md5sum for the software image.
+            The md5sum, if provided, along with the image name uniquely
+            identifies an image uploaded to the CAL.
+            ";
+      type string;
+    }
+  }
+
   grouping vnf-configuration {
     container vnf-configuration {
-      rwpb:msg-new VnfConfiguration;
       description
-          "Information about the VNF configuration. Note: 
+          "Information about the VNF configuration. Note:
            If the NS contains multiple instances of the
            same VNF, each instance could have a different
            configuration.";
@@ -212,61 +225,18 @@
       choice config-method {
         description
             "Defines the configuration method for the VNF.";
-        case netconf {
-          description
-              "Use NETCONF for configuring the VNF.";
-          container netconf {
-            leaf target {
-              description
-                  "Netconf configuration target";
-              type enumeration {
-                enum running;
-                enum candidate;
-              }
-            }
-
-            leaf protocol {
-              description
-                  "Protocol to use for NETCONF, such as ssh";
-              type enumeration {
-                enum None;
-                enum ssh;
-              }
-            }
-
-            leaf port {
-              description
-                  "Port for the NETCONF server.";
-              type inet:port-number;
-            }
-          }
-        }
-
-        case rest {
-          description
-              "Use REST for configuring the VNF.";
-          container rest {
-            leaf port {
-              description
-                  "Port for the REST server.";
-              type inet:port-number;
-            }
-          }
-        }
-
         case script {
           description
               "Use custom script for configuring the VNF.
-               This script is executed in the context of 
+               This script is executed in the context of
                Orchestrator (The same system and environment
                as the Launchpad).";
           container script {
             leaf script-type {
               description
-                  "Script type - currently supported : bash, expect";
+                  "Script type - currently supported - Scripts confirming to Rift CA plugin";
               type enumeration {
-                enum bash;
-                enum expect;
+                enum rift;
               }
             }
           }
@@ -284,80 +254,60 @@
         }
       }
 
-      container config-access {
-        leaf mgmt-ip-address {
-          description
-              "IP address to be used to configure this VNF,
-               optional if it is possible to resolve dynamically.";
-          type inet:ip-address;
-        }
-
-        leaf username {
-          description 
-              "User name for configuration.";
-          type string;
-        }
-
-        leaf password {
-          description 
-              "Password for configuration access authentication.";
-          type string;
-        }
-      }
-
-      container config-attributes {
+      list config-primitive {
         description
-            "Miscellaneous input parameters to be considered
-             while processing the NSD to apply configuration";
-
-        leaf config-priority {
-          description
-              "Configuration priority - order of configuration
-               to be applied to each VNF in this NS. A low
-               number takes precedence over a high number";
-          type uint64;
-        }
-
-        leaf config-delay {
-          description 
-              "Wait (seconds) before applying the configuration to VNF";
-          type uint64;
-        }
-      }
-
-      list service-primitive {
-        rwpb:msg-new ServicePrimitive;
-        description
-          "List of service primitives supported by the
+          "List of config primitives supported by the
           configuration agent for this VNF.";
         key "name";
 
         leaf name {
           description
-            "Name of the service primitive.";
+            "Name of the config primitive.";
           type string;
         }
 
         list parameter {
           description
-            "List of parameters to the service primitive.";
+            "List of parameters to the config primitive.";
           key "name";
           uses primitive-parameter;
         }
+
+        leaf user-defined-script {
+          description
+            "A user defined script. If user defined script is defined,
+             the script will be executed using bash";
+          type string;
+        }
       }
 
       list initial-config-primitive {
-        rwpb:msg-new InitialConfigPrimitive;
         description
           "Initial set of configuration primitives.";
         key "seq";
-        uses initial-config;
-      }
+        leaf seq {
+          description
+              "Sequence number for the configuration primitive.";
+          type uint64;
+        }
 
-      leaf config-template {
-        description
-            "Configuration template for each VNF";
-        type string;
+        choice primitive-type {
+          case primitive-definition {
+            leaf name {
+              description
+                "Name of the configuration primitive.";
+              type string;
+            }
+
+            uses primitive-parameter-value;
+
+            leaf user-defined-script {
+              description
+                "A user defined script.";
+              type string;
+            }
+          }
+        }
       }
     }
   } // END - grouping vnf-configuration
@@ -454,12 +404,12 @@
     description
         "Type of the widget, typically used by the UI.";
     type enumeration {
+      enum COUNTER;
+      enum GAUGE;
+      enum TEXTBOX;
+      enum SLIDER;
       enum HISTOGRAM;
       enum BAR;
-      enum GAUGE;
-      enum SLIDER;
-      enum COUNTER;
-      enum TEXTBOX;
     }
   }
 
@@ -667,6 +617,13 @@
     }
   } //grouping vm-flavor
 
+	grouping vm-flavor-name {
+  	leaf vm-flavor-name {
+  		description "flavor name to be used while creating vm using cloud account";
+  		type string;
+  	}
+	}
+
   grouping vswitch-epa {
     container vswitch-epa {
       leaf ovs-acceleration {
@@ -784,7 +741,7 @@
         description "Number of threads per cores on the host.";
         type uint64;
       }
-      
+
       list cpu-feature {
         key "feature";
         description "List of CPU features.";
@@ -794,7 +751,7 @@
         }
       }
 
-      
+
       leaf om-cpu-model-string {
         description "OpenMANO CPU model string";
         type string;
@@ -1028,16 +985,18 @@
         description
             "Type of the overlay network.
              LOCAL - Provider network implemented in a single compute node
-             FLAT - Provider network shared by all tenants 
+             FLAT - Provider network shared by all tenants
              VLAN - Provider network implemented using 802.1Q tagging
              VXLAN - Provider networks implemented using RFC 7348
-             GRE - Provider networks implemented using GRE tunnels";
+             GRE - Provider networks implemented using GRE tunnels
+             PORTGROUP - Provider networks implemented for VIO support";
         type enumeration {
           enum LOCAL;
           enum FLAT;
           enum VLAN;
           enum VXLAN;
           enum GRE;
+          enum PORTGROUP;
         }
       }
       leaf segmentation_id {
@@ -1048,6 +1007,108 @@
     }
   }
 
+  grouping ns-service-primitive {
+    list service-primitive {
+      description
+          "Network service level service primitives.";
+
+      key "name";
+
+      leaf name {
+        description
+            "Name of the service primitive.";
+        type string;
+      }
+
+      list parameter {
+        description
+            "List of parameters for the service primitive.";
+
+        key "name";
+        uses manotypes:primitive-parameter;
+      }
+
+      list parameter-group {
+        description
+            "Grouping of parameters which are logically grouped in UI";
+        key "name";
+
+        leaf name {
+          description
+              "Name of the parameter group";
+          type string;
+        }
+
+        list parameter {
+          description
+              "List of parameters for the service primitive.";
+          key "name";
+          uses manotypes:primitive-parameter;
+        }
+
+        leaf mandatory {
+          description "Is this parameter group mandatory";
+          type boolean;
+          default true;
+        }
+      }
+
+      list vnf-primitive-group {
+        description
+            "List of service primitives grouped by VNF.";
+
+        key "member-vnf-index-ref";
+        leaf member-vnf-index-ref {
+          description
+              "Reference to member-vnf within constituent-vnfds";
+          type uint64;
+        }
+
+        leaf vnfd-id-ref {
+          description
+              "A reference to a vnfd. This is a
+               leafref to path:
+                   ../../../../nsd:constituent-vnfd
+                   + [nsd:id = current()/../nsd:id-ref]
+                   + /nsd:vnfd-id-ref
+               NOTE: An issue with confd is preventing the
+               use of xpath. Seems to be an issue with leafref
+               to leafref, whose target is in a different module.
+               Once that is resolved this will switched to use
+               leafref";
+
+          type string;
+        }
+
+        leaf vnfd-name {
+          description
+              "Name of the VNFD";
+          type string;
+        }
+
+        list primitive {
+          key "index";
+
+          leaf index {
+            description "Index of this primitive";
+            type uint32;
+          }
+
+          leaf name {
+            description "Name of the primitive in the VNF primitive ";
+            type string;
+          }
+        }
+      }
+
+      leaf user-defined-script {
+        description
+            "A user defined script.";
+        type string;
+      }
+    }
+  }
+
   grouping monitoring-param {
     list http-endpoint {
       description
@@ -1183,6 +1244,7 @@
       leaf widget-type {
         description "Defines the UI Display variant of measured counters.";
         type manotypes:widget-type;
+        default "COUNTER";
       }
 
       leaf units {
@@ -1423,7 +1485,7 @@
       }
 
       leaf default-value {
-        description "/nsd:nsd-catalog/nsd:nsd/nsd:vendor";
+        description "Default Value for the Input Parameter";
         type string;
       }
     }
@@ -1756,7 +1818,7 @@
     leaf operation {
       description
           "The relational operator used to define whether an alarm should be
-           triggered in certain scenarios, such as if the metric statistic 
+           triggered in certain scenarios, such as if the metric statistic
            goes above or below a specified value.";
       type alarm-operation-type;
     }
@@ -1799,12 +1861,12 @@
       enum openvim;
     }
   }
-  
+
   grouping host-aggregate {
     list host-aggregate {
       description "Name of the Host Aggregate";
       key "metadata-key";
-      
+
       leaf metadata-key {
         description
             "Name of the additional information attached to the host-aggregate";
@@ -1817,13 +1879,13 @@
       }
     }
   }
-  
+
   grouping placement-group-input {
     leaf cloud-type {
       type manotypes:cloud-account-type;
     }
     choice cloud-provider {
-      case openstack {           
+      case openstack {
         container availability-zone {
           description "Name of the Availability Zone";
           leaf name {
@@ -1846,7 +1908,7 @@
       case openmano {
         leaf openmano-construct {
           type empty;
-        }        
+        }
       }
       case vsphere {
         leaf vsphere-construct {
@@ -1865,7 +1927,56 @@
       }
     }
   }
-  
+
+  grouping cloud-config {
+    list key-pair {
+      key "name";
+      description "Used to configure the list of public keys to be injected as part
+          of ns instantiation";
+
+      leaf name {
+        description "Name of this key pair";
+        type string;
+      }
+
+      leaf key {
+        description "Key associated with this key pair";
+        type string;
+      }
+    }
+
+    list user {
+      key "name";
+      description "List of users to be added through cloud-config";
+
+      leaf name {
+        description "Name of the user ";
+        type string;
+      }
+
+      leaf user-info {
+        description "The user name's real name";
+        type string;
+      }
+
+      list key-pair {
+        key "name";
+        description "Used to configure the list of public keys to be injected as part
+            of ns instantiation";
+
+        leaf name {
+          description "Name of this key pair";
+          type string;
+        }
+
+        leaf key {
+          description "Key associated with this key pair";
+          type string;
+        }
+      }
+    }
+  }
+
   grouping placement-group-info {
     description "";
 
@@ -1881,7 +1992,7 @@
                    behind this placement group. This is for human consumption only";
       type string;
     }
-    
+
     leaf strategy {
       description
           "Strategy associated with this placement group
@@ -1904,7 +2015,7 @@
   grouping ip-profile-info {
     description "Grouping for IP-Profile";
     container ip-profile-params {
-      
+
       leaf ip-version {
         type inet:ip-version;
         default ipv4;
@@ -1928,12 +2039,12 @@
       list dns-server {
         key "address";
         leaf address {
-					description "List of DNS Servers associated with IP Profile";
-					type inet:ip-address;
+          description "List of DNS Servers associated with IP Profile";
+          type inet:ip-address;
         }
       }
 
-      container dhcp-params {  
+      container dhcp-params {
         leaf enabled {
           description "This flag indicates if DHCP is enabled or not";
           type boolean;
@@ -1963,19 +2074,19 @@
       description
           "List of IP Profiles.
              IP Profile describes the IP characteristics for the Virtual-Link";
-    
+
       key "name";
 
       leaf name {
         description "Name of the IP-Profile";
         type string;
       }
-      
+
       leaf description {
         description "Description for IP profile";
         type string;
       }
-      
+
       uses ip-profile-info;
     }
   }
@@ -2005,7 +2116,7 @@
         description "Some VIMs implement additional drives to host config-files or meta-data";
         type boolean;
         default false;
-      } 
+      }
     }
   }
 
@@ -2039,7 +2150,6 @@
       case image {
         uses image-properties;
       }
-
     }
 
     leaf device-bus {
@@ -2061,6 +2171,16 @@
           enum lun;
       }
     }
+  }
 
+  grouping rpc-project-name {
+    leaf project-name {
+      default "default";
+      description
+        "Project to which this belongs";
+      type leafref {
+        path "/rw-project:project/rw-project:name";
+      }
+    }
   }
 }
diff --git a/models/plugins/yang/nsd-base.yang b/models/plugins/yang/nsd-base.yang
new file mode 100644
index 0000000..05903e2
--- /dev/null
+++ b/models/plugins/yang/nsd-base.yang
@@ -0,0 +1,793 @@
+
+/*
+ * 
+ *   Copyright 2017 RIFT.IO Inc
+ *
+ *   Licensed under the Apache License, Version 2.0 (the "License");
+ *   you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *       http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *   Unless required by applicable law or agreed to in writing, software
+ *   distributed under the License is distributed on an "AS IS" BASIS,
+ *   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *   See the License for the specific language governing permissions and
+ *   limitations under the License.
+ *
+ *
+ */
+
+module nsd-base
+{
+  namespace "http://riftio.com/ns/riftware-1.0/nsd-base";
+  prefix "nsd-base";
+
+  import vld {
+    prefix "vld";
+  }
+
+  import vnfd-base {
+    prefix "vnfd-base";
+  }
+
+  import ietf-inet-types {
+    prefix "inet";
+  }
+
+  import ietf-yang-types {
+    prefix "yang";
+  }
+
+  import mano-types {
+    prefix "manotypes";
+  }
+
+  revision 2017-02-28 {
+    description
+      "Initial revision. This YANG file defines
+       the Network Service Descriptor (NSD)
+       common groupings";
+    reference
+      "Derived from earlier versions of base YANG files";
+  }
+
+  typedef scaling-trigger {
+    type enumeration {
+      enum pre-scale-in {
+        value 1;
+      }
+      enum post-scale-in {
+        value 2;
+      }
+      enum pre-scale-out {
+        value 3;
+      }
+      enum post-scale-out {
+        value 4;
+      }
+    }
+  }
+
+  typedef scaling-policy-type {
+    type enumeration {
+      enum manual {
+        value 1;
+      }
+      enum automatic {
+        value 2;
+      }
+    }
+  }
+
+  typedef scaling-criteria-operation {
+    type enumeration {
+      enum AND {
+        value 1;
+      }
+      enum OR {
+        value 2;
+      }
+    }
+  }
+
+  grouping primitive-parameter {
+    leaf name {
+      description
+          "Name of the parameter.";
+      type string;
+    }
+
+    leaf data-type {
+      description
+          "Data type associated with the name.";
+      type manotypes:parameter-data-type;
+    }
+
+    leaf mandatory {
+      description "Is this field mandatory";
+      type boolean;
+      default false;
+    }
+
+    leaf default-value {
+      description "The default value for this field";
+      type string;
+    }
+
+    leaf parameter-pool {
+      description "NSD parameter pool name to use for this parameter";
+      type string;
+    }
+  }
+
+  grouping nsd-descriptor-common {
+    leaf id {
+      description "Identifier for the NSD.";
+      type string {
+        length 1..63;
+      }
+    }
+
+    leaf name {
+      description "NSD name.";
+      mandatory true;
+      type string;
+    }
+
+    leaf short-name {
+      description "Short name to appear as label in the UI";
+      type string;
+    }
+
+    leaf vendor {
+      description "Vendor of the NSD.";
+      type string;
+    }
+
+    leaf logo {
+      description
+        "File path for  the vendor specific logo. For example icons/mylogo.png.
+         The logo  should be part of the network service";
+      type string;
+    }
+
+    leaf description {
+      description "Description of the NSD.";
+      type string;
+    }
+
+    leaf version {
+      description "Version of the NSD";
+      type string;
+    }
+
+    list connection-point {
+      description
+          "List for external connection points.
+          Each NS has one or more external connection
+          points. As the name implies that external
+          connection points are used for connecting
+          the NS to other NS or to external networks.
+          Each NS exposes these connection points to
+          the orchestrator. The orchestrator can
+          construct network service chains by
+          connecting the connection points between
+          different NS.";
+
+      key "name";
+      leaf name {
+        description
+            "Name of the NS connection point.";
+        type string;
+      }
+
+      leaf type {
+        description
+            "Type of the connection point.";
+        type manotypes:connection-point-type;
+      }
+    }
+
+    list scaling-group-descriptor {
+      description
+          "scaling group descriptor within this network service.
+           The scaling group defines a group of VNFs,
+           and the ratio of VNFs in the network service
+           that is used as target for scaling action";
+
+      key "name";
+
+      leaf name {
+        description "Name of this scaling group.";
+        type string;
+      }
+
+      list scaling-policy {
+
+        key "name";
+
+        leaf name {
+          description
+              "Name of the scaling policy";
+          type string;
+        }
+
+        leaf scaling-type {
+          description
+              "Type of scaling";
+          type scaling-policy-type;
+        }
+
+        leaf enabled {
+          description
+            "Specifies if the scaling policy can be applied";
+          type boolean;
+          default true;
+        }
+
+        leaf scale-in-operation-type {
+          description
+              "Operation to be applied to check between scaling criterias to
+               check if the scale in threshold condition has been met.
+               Defaults to AND";
+          type scaling-criteria-operation;
+          default AND;
+        }
+
+        leaf scale-out-operation-type {
+          description
+              "Operation to be applied to check between scaling criterias to
+               check if the scale out threshold condition has been met.
+               Defauls to OR";
+          type scaling-criteria-operation;
+          default OR;
+        }
+
+        leaf threshold-time {
+          description
+            "The duration for which the criteria must hold true";
+          type uint32;
+          mandatory true;
+        }
+
+        leaf cooldown-time {
+          description
+            "The duration after a scaling-in/scaling-out action has been
+            triggered, for which there will be no further optional";
+          type uint32;
+          mandatory true;
+        }
+
+        list scaling-criteria {
+          description
+              "list of conditions to be met for generating scaling
+                 requests";
+          key "name";
+
+          leaf name {
+            type string;
+          }
+
+          leaf scale-in-threshold {
+            description
+                "Value below which scale-in requests are generated";
+            type uint64;
+          }
+
+          leaf scale-out-threshold {
+            description
+                "Value above which scale-out requests are generated";
+            type uint64;
+          }
+
+          leaf ns-monitoring-param-ref {
+            description
+               "Reference to the NS level monitoring parameter
+                that is aggregated";
+            type leafref {
+              path "../../../../monitoring-param/id";
+            }
+          }
+        }
+      }
+
+      list vnfd-member {
+        description "List of VNFs in this scaling group";
+        key "member-vnf-index-ref";
+
+        leaf member-vnf-index-ref {
+          description "member VNF index of this member VNF";
+          type leafref {
+            path "../../../constituent-vnfd/member-vnf-index";
+          }
+        }
+
+        leaf count {
+          description
+            "count of this member VNF  within this scaling group.
+             The count allows to define  the number of instances
+             when a scaling action targets this scaling group";
+          type uint32;
+          default 1;
+        }
+      }
+
+      leaf min-instance-count {
+        description
+          "Minimum instances of the scaling group which are allowed.
+          These instances are created by default when the network service
+          is instantiated.";
+        type uint32;
+        default 0;
+      }
+
+      leaf max-instance-count {
+        description
+          "Maximum instances of this scaling group that are allowed
+           in a single network service. The network service scaling
+           will fail, when the number of service group instances
+           exceed the max-instance-count specified.";
+        type uint32;
+        default 10;
+      }
+
+      list scaling-config-action {
+        description "List of scaling config actions";
+        key "trigger";
+
+        leaf trigger {
+          description "scaling trigger";
+          type scaling-trigger;
+        }
+
+        leaf ns-service-primitive-name-ref {
+          description "Reference to the NS service primitive";
+          type leafref {
+            path "../../../service-primitive/name";
+          }
+        }
+      }
+    }
+
+
+    list vnffgd {
+      description
+          "List of VNF Forwarding Graph Descriptors (VNFFGD).";
+
+      key "id";
+
+      leaf id {
+        description
+            "Identifier for the VNFFGD.";
+        type string;
+      }
+
+      leaf name {
+        description
+            "VNFFGD name.";
+        type string;
+      }
+
+      leaf short-name {
+        description
+            "Short name to appear as label in the UI";
+        type string;
+      }
+
+      leaf vendor {
+        description "Provider of the VNFFGD.";
+        type string;
+      }
+
+      leaf description {
+        description "Description of the VNFFGD.";
+        type string;
+      }
+
+      leaf version {
+        description "Version of the VNFFGD";
+        type string;
+      }
+
+      list rsp {
+        description
+          "List of Rendered Service Paths (RSP).";
+
+        key "id";
+
+        leaf id {
+          description
+            "Identifier for the RSP.";
+          type string;
+        }
+
+        leaf name {
+          description
+            "RSP name.";
+          type string;
+        }
+
+        list vnfd-connection-point-ref {
+          description
+            "A list of references to connection points.";
+          key "member-vnf-index-ref";
+
+          leaf member-vnf-index-ref {
+            description "Reference to member-vnf within constituent-vnfds";
+            type leafref {
+              path "../../../../constituent-vnfd/member-vnf-index";
+            }
+          }
+
+          leaf order {
+            type uint8;
+            description
+              "A number that denotes the order of a VNF in a chain";
+          }
+
+          leaf vnfd-id-ref {
+            description
+              "A reference to a vnfd. This is a
+                  leafref to path:
+                      ../../../../nsd:constituent-vnfd
+                      + [nsd:id = current()/../nsd:id-ref]
+                      + /nsd:vnfd-id-ref";
+
+             type leafref {
+                path "../../../../constituent-vnfd" +
+                     "[member-vnf-index = current()/../member-vnf-index-ref]" +
+                     "/vnfd-id-ref";
+             }
+           }
+
+          leaf vnfd-connection-point-ref {
+            description
+              "A reference to a connection point name
+                  in a vnfd. This is a leafref to path:
+                      /vnfd:vnfd-catalog/vnfd:vnfd
+                      + [vnfd:id = current()/../nsd:vnfd-id-ref]
+                      + /vnfd:connection-point/vnfd:name
+                  NOTE: An issue with confd is preventing the
+                  use of xpath. Seems to be an issue with leafref
+                  to leafref, whose target is in a different module.
+                  Once that is resolved this will switched to use
+                  leafref";
+            // TODO: Keeping as string as this needs to be
+            // diffenent lvel based of if it is nsd-catalog or
+            // in nsr.
+            // type leafref {
+            //   path "../../../../../../vnfd:vnfd-catalog/vnfd:vnfd" +
+            //        "[vnfd:id = current()/../vnfd-id-ref]/" +
+            //        "vnfd:connection-point/vnfd:name";
+            // }
+            type string;
+          }
+        }
+      } //rsp
+
+      list classifier {
+        description
+            "List of classifier rules.";
+
+        key "id";
+
+        leaf id {
+          description
+              "Identifier for the classifier rule.";
+          type string;
+        }
+
+        leaf name {
+          description
+              "Name of the classifier.";
+          type string;
+        }
+
+        leaf rsp-id-ref {
+          description
+              "A reference to the RSP.";
+          type leafref {
+            path "../../rsp/id";
+          }
+        }
+
+        leaf member-vnf-index-ref {
+          description "Reference to member-vnf within constituent-vnfds";
+          type leafref {
+            path "../../../constituent-vnfd/member-vnf-index";
+          }
+        }
+
+        leaf vnfd-id-ref {
+          description
+              "A reference to a vnfd. This is a
+                  leafref to path:
+                      ../../../nsd:constituent-vnfd
+                      + [nsd:id = current()/../nsd:id-ref]
+                      + /nsd:vnfd-id-ref";
+
+          type leafref {
+              path "../../../constituent-vnfd" +
+                   "[member-vnf-index = current()/../member-vnf-index-ref]" +
+                   "/vnfd-id-ref";
+          }
+        }
+
+        leaf vnfd-connection-point-ref {
+          description
+              "A reference to a connection point name
+                  in a vnfd. This is a leafref to path:
+                      /vnfd:vnfd-catalog/vnfd:vnfd
+                      + [vnfd:id = current()/../nsd:vnfd-id-ref]
+                      + /vnfd:connection-point/vnfd:name
+                  NOTE: An issue with confd is preventing the
+                  use of xpath. Seems to be an issue with leafref
+                  to leafref, whose target is in a different module.
+                  Once that is resolved this will switched to use
+                  leafref";
+          // TODO: Keeping as string as this needs to be
+          // diffenent lvel based of if it is nsd-catalog or
+          // in nsr.
+          // type leafref {
+          //     path "../../../../../vnfd:vnfd-catalog/vnfd:vnfd" +
+          //          "[vnfd:id = current()/../vnfd-id-ref]/" +
+          //          "vnfd:connection-point/vnfd:name";
+          // }
+          type string;
+        }
+
+        list match-attributes {
+          description
+              "List of match attributes.";
+
+          key "id";
+
+          leaf id {
+            description
+                "Identifier for the classifier match attribute rule.";
+            type string;
+          }
+
+          leaf ip-proto {
+            description
+                "IP Protocol.";
+            type uint8;
+          }
+
+          leaf source-ip-address {
+            description
+                "Source IP address.";
+            type inet:ip-address;
+          }
+
+          leaf destination-ip-address {
+            description
+                "Destination IP address.";
+            type inet:ip-address;
+          }
+
+          leaf source-port {
+            description
+                "Source port number.";
+            type inet:port-number;
+          }
+
+          leaf destination-port {
+            description
+                "Destination port number.";
+            type inet:port-number;
+          }
+          //TODO: Add more match criteria
+        } //match-attributes
+      } // classifier
+    } // vnffgd
+
+    uses manotypes:ip-profile-list;
+
+    list initial-service-primitive {
+      description
+        "Initial set of service primitives for NSD.";
+      key "seq";
+
+      uses manotypes:event-config;
+    }
+
+    list terminate-service-primitive {
+      description
+        "Set of service primitives during
+         termination for NSD.";
+      key "seq";
+
+      uses manotypes:event-config;
+    }
+
+    uses manotypes:input-parameter-xpath;
+
+    list parameter-pool {
+      description
+        "Pool of parameter values which must be
+         pulled from during configuration";
+      key "name";
+
+      leaf name {
+        description
+            "Name of the configuration value pool";
+        type string;
+      }
+
+      container range {
+        description
+            "Create a range of values to populate the pool with";
+
+        leaf start-value {
+          description
+              "Generated pool values start at this value";
+          type uint32;
+          mandatory true;
+        }
+
+        leaf end-value {
+          description
+              "Generated pool values stop at this value";
+          type uint32;
+          mandatory true;
+        }
+      }
+    }
+
+    list key-pair {
+      key "name";
+      description "Used to configure the list of public keys to be injected as part
+          of ns instantiation";
+
+      leaf name {
+        description "Name of this key pair";
+        type string;
+      }
+
+      leaf key {
+        description "Key associated with this key pair";
+        type string;
+      }
+    }
+
+    list user {
+      key "name";
+      description "List of users to be added through cloud-config";
+
+      leaf name {
+        description "Name of the user ";
+        type string;
+      }
+
+      leaf user-info {
+        description "The user name's real name";
+        type string;
+      }
+
+      list key-pair {
+        key "name";
+        description "Used to configure the list of public keys to be injected as part
+            of ns instantiation";
+
+        leaf name {
+          description "Name of this key pair";
+          type string;
+        }
+
+        leaf key {
+          description "Key associated with this key pair";
+          type string;
+        }
+      }
+    }
+  }
+
+  grouping nsd-vld-common {
+    /* Still having issues modelling this,
+       see the comments under vnfd-connection-point-ref
+    */
+    description
+      "List of Virtual Link Descriptors.";
+
+    leaf id {
+      description
+        "Identifier for the VLD.";
+      type string;
+    }
+
+    leaf name {
+      description
+        "Virtual Link Descriptor (VLD) name.";
+      type string;
+    }
+
+    leaf short-name {
+      description
+        "Short name to appear as label in the UI";
+      type string;
+    }
+
+    leaf vendor {
+      description "Provider of the VLD.";
+      type string;
+    }
+
+    leaf description {
+      description "Description of the VLD.";
+      type string;
+    }
+
+    leaf version {
+      description "Version of the VLD";
+      type string;
+    }
+
+    leaf type {
+      type manotypes:virtual-link-type;
+    }
+
+    leaf root-bandwidth {
+      description
+        "For ELAN this is the aggregate bandwidth.";
+      type uint64;
+    }
+
+    leaf leaf-bandwidth {
+      description
+        "For ELAN this is the bandwidth of branches.";
+      type uint64;
+    }
+
+    // replicate for pnfd container here
+    uses manotypes:provider-network;
+
+    leaf mgmt-network {
+      description "Flag indicating whether this network is a VIM management network";
+      type boolean;
+      default false;
+    }
+
+    choice init-params {
+      description "Extra parameters for VLD instantiation";
+
+      case vim-network-ref {
+        leaf vim-network-name {
+          description
+            "Name of network in VIM account. This is used to indicate
+                   pre-provisioned network name in cloud account.";
+          type string;
+        }
+      }
+
+      case vim-network-profile {
+        leaf ip-profile-ref {
+          description "Named reference to IP-profile object";
+          type leafref {
+            path "../../ip-profiles/name";
+          }
+        }
+      }
+
+    }
+  }
+
+  grouping monitoring-param-common {
+    description
+      "List of monitoring parameters from VNF's that should be
+        propogated up into NSR";
+
+    leaf id {
+      type string;
+    }
+
+    leaf name {
+      type string;
+    }
+
+    uses manotypes:monitoring-param-value;
+    uses manotypes:monitoring-param-ui-data;
+    uses manotypes:monitoring-param-aggregation;
+  }
+}
diff --git a/models/plugins/yang/nsd.yang b/models/plugins/yang/nsd.yang
index 7adc2f2..4a88eac 100644
--- a/models/plugins/yang/nsd.yang
+++ b/models/plugins/yang/nsd.yang
@@ -1,7 +1,7 @@
 
 /*
  *
- *   Copyright 2016 RIFT.IO Inc
+ *   Copyright 2016-2017 RIFT.IO Inc
  *
  *   Licensed under the Apache License, Version 2.0 (the "License");
  *   you may not use this file except in compliance with the License.
@@ -23,30 +23,23 @@
   namespace "urn:ietf:params:xml:ns:yang:nfvo:nsd";
   prefix "nsd";
 
-  import rw-pb-ext {
-    prefix "rwpb";
-  }
-
-  import vld {
-    prefix "vld";
-  }
-
   import vnfd {
     prefix "vnfd";
   }
 
-  import ietf-inet-types {
-    prefix "inet";
-  }
-
-  import ietf-yang-types {
-    prefix "yang";
+  import nsd-base {
+    prefix "nsd-base";
   }
 
   import mano-types {
     prefix "manotypes";
   }
 
+  revision 2017-02-28 {
+    description
+      "Update model to support projects.";
+  }
+
   revision 2014-10-27 {
     description
       "Initial revision. This YANG file defines
@@ -55,193 +48,45 @@
       "Derived from earlier versions of base YANG files";
   }
 
-  typedef scaling-trigger {
-    type enumeration {
-      enum pre-scale-in {
-        value 1;
-      }
-      enum post-scale-in {
-        value 2;
-      }
-      enum pre-scale-out {
-        value 3;
-      }
-      enum post-scale-out {
-        value 4;
-      }
-    }
-  }
-
-  typedef scaling-policy-type {
-    type enumeration {
-      enum manual {
-        value 1;
-      }
-      enum automatic {
-        value 2;
-      }
-    }
-  }
-
-  typedef scaling-criteria-operation {
-    type enumeration {
-      enum AND {
-        value 1;
-      }
-      enum OR {
-        value 2;
-      }
-    }
-  }
-
-  grouping primitive-parameter {
-    leaf name {
+  grouping nsd-constituent-vnfd {
+    list constituent-vnfd {
       description
-          "Name of the parameter.";
-      type string;
-    }
+          "List of VNFDs that are part of this
+          network service.";
 
-    leaf data-type {
-      description
-          "Data type associated with the name.";
-      type manotypes:parameter-data-type;
-    }
+      key "member-vnf-index";
 
-    leaf mandatory {
-      description "Is this field mandatory";
-      type boolean;
-      default false;
-    }
-
-    leaf default-value {
-      description "The default value for this field";
-      type string;
-    }
-
-    leaf parameter-pool {
-      description "NSD parameter pool name to use for this parameter";
-      type string;
-    }
-  }
-
-  grouping nsd-descriptor {
-    leaf id {
-      description "Identifier for the NSD.";
-      type string;
-    }
-
-    leaf name {
-      description "NSD name.";
-      mandatory true;
-      type string;
-    }
-
-    leaf short-name {
-      description "Short name to appear as label in the UI";
-      type string;
-    }
-
-    leaf vendor {
-      description "Vendor of the NSD.";
-      type string;
-    }
-
-    leaf logo {
-      description
-        "File path for the vendor-specific logo. For example, icons/mylogo.png.
-         The logo should be part of the network service";
-      type string;
-    }
-
-    leaf description {
-      description "Description of the NSD.";
-      type string;
-    }
-
-    leaf version {
-      description "Version of the NSD";
-      type string;
-    }
-
-    list connection-point {
-      description
-          "List for external connection points.
-          Each network service (NS) has one or more external connection
-          points that connect the NS to other NSs or to external networks.
-          Each NS exposes connection points to the orchestrator, which can
-          construct network service chains by connecting the connection
-          points between different NSs.";
-      key "name";
-      leaf name {
+      leaf member-vnf-index {
         description
-            "Name of the NS connection point.";
-        type string;
+          "Identifier/index for the VNFD. This separate id
+           is required to ensure that multiple VNFs can be
+           part of single NS";
+        type uint64;
       }
 
-      leaf type {
+      leaf vnfd-id-ref {
         description
-            "Type of the connection point.";
-        type manotypes:connection-point-type;
+          "Identifier for the VNFD.";
+        type leafref {
+          path "/vnfd:vnfd-catalog/vnfd:vnfd/vnfd:id";
+        }
+      }
+
+      leaf start-by-default {
+        description
+          "VNFD is started as part of the NS instantiation";
+        type boolean;
+        default true;
       }
     }
+  }
 
-    /* Model Limitations,
-       see the comments under vnfd-connection-point-ref
-     */
+  grouping nsd-vld {
     list vld {
-      description
-          "List of Virtual Link Descriptors (VLDs).";
 
       key "id";
 
-      leaf id {
-        description
-            "Identifier for the VLD.";
-        type string;
-      }
-
-      leaf name {
-        description
-            "Virtual Link Descriptor (VLD) name.";
-        type string;
-      }
-
-      leaf short-name {
-        description
-            "Short name to appear as label in the UI";
-        type string;
-      }
-
-      leaf vendor {
-        description "Provider of the VLD.";
-        type string;
-      }
-
-      leaf description {
-        description "Description of the VLD.";
-        type string;
-      }
-
-      leaf version {
-        description "Version of the VLD";
-        type string;
-      }
-
-      leaf type {
-        type manotypes:virtual-link-type;
-      }
-
-      leaf root-bandwidth {
-        description
-            "For ELAN this is the aggregate bandwidth.";
-        type uint64;
-      }
-
-      leaf leaf-bandwidth {
-        description
-            "For ELAN this is the bandwidth of branches.";
-        type uint64;
-      }
+      uses nsd-base:nsd-vld-common;
 
       list vnfd-connection-point-ref {
         description
@@ -274,235 +119,30 @@
           }
         }
       }
-
-      // replicate for pnfd container here
-      uses manotypes:provider-network;
-
-      leaf mgmt-network {
-         description "Flag indicating whether this network is a VIM management network";
-         type boolean;
-         default false;
-      }
-
-      choice init-params {
-        description "Extra parameters for VLD instantiation";
-
-        case vim-network-ref {
-          leaf vim-network-name {
-            description
-                "Name of network in VIM account. This is used to indicate
-                   pre-provisioned network name in cloud account.";
-            type string;
-          }
-        }
-
-        case vim-network-profile {
-          leaf ip-profile-ref {
-            description "Named reference to IP-profile object";
-            type leafref {
-              path "../../ip-profiles/name";
-            }
-          }
-        }
-      }
     }
+  }
 
-    list constituent-vnfd {
+  grouping nsd-vnf-dependency {
+    list vnf-dependency {
       description
-          "List of VNFDs that are part of this
-          network service.";
-
-      key "member-vnf-index";
-
-      leaf member-vnf-index {
-        description
-          "Identifier/index for the VNFD. This separate id
-           is required so that multiple VNFs can be part of
-           single NS";
-        type uint64;
-      }
-
-      leaf vnfd-id-ref {
-        description
-          "Identifier for the VNFD.";
+          "List of VNF dependencies.";
+      key vnf-source-ref;
+      leaf vnf-source-ref {
         type leafref {
           path "/vnfd:vnfd-catalog/vnfd:vnfd/vnfd:id";
         }
       }
-
-      leaf start-by-default {
+      leaf vnf-depends-on-ref {
         description
-          "VNFD is started as part of the NS instantiation";
-        type boolean;
-        default true;
-      }
-    }
-
-    list scaling-group-descriptor {
-      description
-          "Scaling group descriptor within this network service.
-           The scaling group defines a group of VNFs,
-           and the ratio of VNFs in the network service
-           that is used as target for scaling action";
-
-      key "name";
-
-      leaf name {
-        description "Name of this scaling group.";
-        type string;
-      }
-
-      list scaling-policy {
-
-        key "name";
-
-        leaf name {
-          description
-              "Name of the scaling policy";
-          type string;
-        }
-
-        leaf scaling-type {
-          description
-              "Type of scaling";
-          type scaling-policy-type;
-        }
-
-        leaf enabled {
-          description
-            "Specifies if the scaling policy can be applied";
-          type boolean;
-          default true;
-        }
-
-        leaf scale-in-operation-type {
-          description
-              "Operation to be applied to check between scaling criterias to
-               check if the scale in threshold condition has been met.
-               Defaults to AND";
-          type scaling-criteria-operation;
-          default AND;
-        }
-
-        leaf scale-out-operation-type {
-          description
-              "Operation to be applied to check between scaling criterias to
-               check if the scale out threshold condition has been met.
-               Defaults to OR";
-          type scaling-criteria-operation;
-          default OR;
-        }
-
-        leaf threshold-time {
-          description
-            "The duration for which the criteria must hold true";
-          type uint32;
-          mandatory true;
-        }
-
-        leaf cooldown-time {
-          description
-            "The duration after a scaling-in/scaling-out action has been
-            triggered, for which there will be no further scaling activity";
-          type uint32;
-          mandatory true;
-        }
-
-        list scaling-criteria {
-          description
-              "list of conditions to be met for generating scaling
-                 requests";
-          key "name";
-
-          leaf name {
-            description "Name of the scaling criteria";
-            type string;
-          }
-
-          leaf scale-in-threshold {
-            description
-                "Value below which scale-in requests are generated
-                 (depends on monitoring parameters)";
-            type uint64;
-          }
-
-          leaf scale-out-threshold {
-            description
-                "Value above which scale-out requests are generated
-                 (depends on monitoring parameters)";
-            type uint64;
-          }
-
-          leaf ns-monitoring-param-ref {
-            description
-               "Reference to the NS level monitoring parameter
-                that is aggregated";
-            type leafref {
-              path "../../../../monitoring-param/id";
-            }
-          }
-        }
-      }
-
-      list vnfd-member {
-        description "List of VNFs in this scaling group";
-        key "member-vnf-index-ref";
-
-        leaf member-vnf-index-ref {
-          description "Member VNF index of this member VNF";
-          type leafref {
-            path "../../../constituent-vnfd/member-vnf-index";
-          }
-        }
-
-        leaf count {
-          description
-            "Count of this member VNF  within this scaling group.
-             The count defines the number of instances when a
-             scaling action targets this scaling group.";
-          type uint32;
-          default 1;
-        }
-      }
-
-      leaf min-instance-count {
-        description
-          "Minimum number of instances of the scaling group that
-          are allowed in a single network service. These instances
-          are created by default when the network service is
-          instantiated.";
-        type uint32;
-        default 0;
-      }
-
-      leaf max-instance-count {
-        description
-          "Maximum number of instances of this scaling group that
-          are allowed in a single network service. The network
-          service scaling fails when the number of service group
-          instances exceeds the max-instance-count specified.";
-        type uint32;
-        default 10;
-      }
-
-      list scaling-config-action {
-        description "List of scaling config actions";
-        key "trigger";
-
-        leaf trigger {
-          description "Scaling trigger";
-          type scaling-trigger;
-        }
-
-        leaf ns-config-primitive-name-ref {
-          description "Reference to the NS config name primitive";
-          type leafref {
-            path "../../../service-primitive/name";
-          }
+            "Reference to VNF that sorce VNF depends.";
+        type leafref {
+          path "/vnfd:vnfd-catalog/vnfd:vnfd/vnfd:id";
         }
       }
     }
+  }
 
+  grouping nsd-placement-groups {
     list placement-groups {
       description "List of placement groups at NS level";
 
@@ -526,248 +166,21 @@
           description
               "Identifier for the VNFD.";
           type leafref {
-            path "../../../constituent-vnfd" +
+            path "../../../constituent-vnfd" + 
                  "[member-vnf-index = current()/../member-vnf-index-ref]" +
                  "/vnfd-id-ref";
           }
         }
       }
     }
+  }
 
-    uses manotypes:ip-profile-list;
-
-    list vnf-dependency {
-      description
-          "List of VNF dependencies.";
-      key vnf-source-ref;
-      leaf vnf-source-ref {
-        type leafref {
-          path "../../constituent-vnfd/vnfd-id-ref";
-        }
-      }
-      leaf vnf-depends-on-ref {
-        description
-            "Reference to VNF on which the source VNF depends.";
-        type leafref {
-          path "../../constituent-vnfd/vnfd-id-ref";
-        }
-      }
-    }
-
-    list vnffgd {
-      description
-          "List of VNF Forwarding Graph Descriptors (VNFFGD).";
-
-      key "id";
-
-      leaf id {
-        description
-            "Identifier for the VNFFGD.";
-        type string;
-      }
-
-      leaf name {
-        description
-            "VNFFGD name.";
-        type string;
-      }
-
-      leaf short-name {
-        description
-            "Short name to appear as label in the UI";
-        type string;
-      }
-
-      leaf vendor {
-        description "Provider of the VNFFGD.";
-        type string;
-      }
-
-      leaf description {
-        description "Description of the VNFFGD.";
-        type string;
-      }
-
-      leaf version {
-        description "Version of the VNFFGD";
-        type string;
-      }
-
-      list rsp {
-        description
-            "List of Rendered Service Paths (RSP).";
-
-        key "id";
-
-        leaf id {
-          description
-              "Identifier for the RSP.";
-          type string;
-        }
-
-        leaf name {
-          description
-              "RSP name.";
-          type string;
-        }
-
-        list vnfd-connection-point-ref {
-          description
-                "A list of references to connection points.";
-          key "member-vnf-index-ref";
-
-          leaf member-vnf-index-ref {
-            description "Reference to member-vnf within constituent-vnfds";
-            type leafref {
-              path "../../../../constituent-vnfd/member-vnf-index";
-            }
-          }
-
-          leaf order {
-            type uint8;
-            description
-                "A number that denotes the order of a VNF in a chain";
-          }
-
-           leaf vnfd-id-ref {
-             description
-                 "A reference to a vnfd";
-             type leafref {
-                path "../../../../constituent-vnfd" +
-                     "[member-vnf-index = current()/../member-vnf-index-ref]" +
-                     "/vnfd-id-ref";
-             }
-           }
-
-           leaf vnfd-connection-point-ref {
-             description
-                 "A reference to a connection point name";
-             type leafref {
-               path "/vnfd:vnfd-catalog/vnfd:vnfd" +
-                    "[vnfd:id = current()/../vnfd-id-ref]/" +
-                    "vnfd:connection-point/vnfd:name";
-             }
-          }
-        }
-      } //rsp
-
-      list classifier {
-        description
-            "List of classifier rules.";
-
-        key "id";
-
-        leaf id {
-          description
-              "Identifier for the classifier rule.";
-          type string;
-        }
-
-        leaf name {
-          description
-              "Name of the classifier.";
-          type string;
-        }
-
-        leaf rsp-id-ref {
-          description
-              "A reference to the RSP.";
-          type leafref {
-            path "../../rsp/id";
-          }
-        }
-
-        leaf member-vnf-index-ref {
-          description "Reference to member-vnf within constituent-vnfds";
-          type leafref {
-            path "../../../constituent-vnfd/member-vnf-index";
-          }
-        }
-
-        leaf vnfd-id-ref {
-          description
-              "A reference to a VNFD";
-          type leafref {
-              path "../../../constituent-vnfd" +
-                   "[member-vnf-index = current()/../member-vnf-index-ref]" +
-                   "/vnfd-id-ref";
-          }
-        }
-
-        leaf vnfd-connection-point-ref {
-          description
-              "A reference to a connection point name";
-          type leafref {
-              path "/vnfd:vnfd-catalog/vnfd:vnfd" +
-                   "[vnfd:id = current()/../vnfd-id-ref]/" +
-                   "vnfd:connection-point/vnfd:name";
-          }
-        }
-
-        list match-attributes {
-          description
-              "List of match attributes.";
-
-          key "id";
-
-          leaf id {
-            description
-                "Identifier for the classifier match attribute rule.";
-            type string;
-          }
-
-          leaf ip-proto {
-            description
-                "Internet Protocol.";
-            type uint8;
-          }
-
-          leaf source-ip-address {
-            description
-                "Source IP address.";
-            type inet:ip-address;
-          }
-
-          leaf destination-ip-address {
-            description
-                "Destination IP address.";
-            type inet:ip-address;
-          }
-
-          leaf source-port {
-            description
-                "Source port number.";
-            type inet:port-number;
-          }
-
-          leaf destination-port {
-            description
-                "Destination port number.";
-            type inet:port-number;
-          }
-        } //match-attributes
-      } // classifier
-    } // vnffgd
+  grouping nsd-monitoring-param {
 
     list monitoring-param {
-      description
-        "List of monitoring parameters from VNFs that should be
-        propogated up into NSR";
-      key "id";
+      key id;
 
-      leaf id {
-        description "Identifier for a monitoring parameter";
-        type string;
-      }
-
-      leaf name {
-        description "Name of the monitoring parameter";
-        type string;
-      }
-
-      uses manotypes:monitoring-param-value;
-      uses manotypes:monitoring-param-ui-data;
-      uses manotypes:monitoring-param-aggregation;
+      uses nsd-base:monitoring-param-common;
 
       list vnfd-monitoring-param {
         description "A list of VNFD monitoring params";
@@ -802,42 +215,10 @@
         }
       }
     }
+  }
 
-    uses manotypes:input-parameter-xpath;
-
-    list parameter-pool {
-      description
-         "Pool of parameter values from which to choose during
-         configuration.";
-      key "name";
-
-      leaf name {
-        description
-            "Name of the configuration value pool";
-        type string;
-      }
-
-      container range {
-        description
-            "Create a range of values from which to populate the pool with";
-
-        leaf start-value {
-          description
-              "Generated pool values start at this value";
-          type uint32;
-          mandatory true;
-        }
-
-        leaf end-value {
-          description
-              "Generated pool values stop at this value";
-          type uint32;
-          mandatory true;
-        }
-      }
-    }
-
-    list service-primitive {
+  grouping nsd-service-primitive {
+   list service-primitive {
       description
           "Network service level service primitives.";
 
@@ -913,72 +294,26 @@
         type string;
       }
     }
-
-    list initial-config-primitive {
-      rwpb:msg-new NsdInitialConfigPrimitive;
-      description
-        "Initial set of configuration primitives for NSD.";
-      key "seq";
-
-      uses manotypes:initial-config;
-    }
-
-    list key-pair {
-      key "name";
-      description "Used to configure the list of public keys to be injected as part
-          of NS instantiation";
-
-      leaf name {
-        description "Name of this key pair";
-        type string;
-      }
-
-      leaf key {
-        description "Key associated with this key pair";
-        type string;
-      }
-    }
-
-    list user {
-      key "name";
-      description "List of users to be added through cloud-config";
-
-      leaf name {
-        description "Name of the user ";
-        type string;
-      }
-
-      leaf user-info {
-        description "The user name's real name";
-        type string;
-      }
-
-      list key-pair {
-        key "name";
-        description "Used to configure the list of public keys to be injected as part
-            of NS instantiation";
-
-        leaf name {
-          description "Name of this key pair";
-          type string;
-        }
-
-        leaf key {
-          description "Key associated with this key pair";
-          type string;
-        }
-      }
-    }
   }
 
-
   container nsd-catalog {
 
     list nsd {
-      key "id";
+      key id;
 
-      uses nsd-descriptor;
+      uses nsd-base:nsd-descriptor-common;
+
+      uses nsd-vld;
+
+      uses nsd-constituent-vnfd;
+
+      uses nsd-placement-groups;
+
+      uses nsd-vnf-dependency;
+
+      uses nsd-monitoring-param;
+
+      uses nsd-service-primitive;
     }
   }
-
 }
diff --git a/models/plugins/yang/nsr.role.xml b/models/plugins/yang/nsr.role.xml
new file mode 100644
index 0000000..eb14063
--- /dev/null
+++ b/models/plugins/yang/nsr.role.xml
@@ -0,0 +1,74 @@
+<?xml version="1.0" ?>
+<config xmlns="http://riftio.com/ns/riftware-1.0/rw-rbac-role-def">
+  <key-definition>
+    <role>rw-project-mano:nsr-role</role>
+    <key-set>
+      <name>project-name</name>
+      <path>/rw-project:project/rw-project:name</path>
+      <path>/nsr:exec-scale-out/nsr:project-name</path>
+      <path>/nsr:exec-scale-in/nsr:project-name</path>
+      <path>/nsr:exec-ns-service-primitive/nsr:project-name</path>
+      <path>/nsr:get-ns-service-primitive-values/nsr:project-name</path>
+      <path>/nsr:start-network-service/nsr:project-name</path>
+    </key-set>
+  </key-definition>
+
+  <role-definition>
+    <role>rw-project-mano:lcm-oper</role>
+    <keys-role>rw-project-mano:nsr-role</keys-role>
+    <priority>
+      <lower-than>
+        <role>rw-project:project-admin</role>
+      </lower-than>
+    </priority>
+    <authorize>
+      <permissions>read execute</permissions>
+      <path>/rw-project:project/nsr:ns-instance-config</path>
+      <path>/rw-project:project/nsr:ns-instance-opdata</path>
+      <path>/rw-project:project/nsr:key-pair</path>
+    </authorize>
+  </role-definition>
+
+  <role-definition>
+    <role>rw-project-mano:lcm-admin</role>
+    <keys-role>rw-project-mano:nsr-role</keys-role>
+    <priority>
+      <higher-than>
+        <role>rw-project-mano:lcm-oper</role>
+      </higher-than>
+      <higher-than>
+        <role>rw-project-mano:account-oper</role>
+      </higher-than>
+      <higher-than>
+        <role>rw-project-mano:catalog-oper</role>
+      </higher-than>
+      <higher-than>
+        <role>rw-project:project-oper</role>
+      </higher-than>
+
+    </priority>
+
+    <authorize>
+      <permissions>create read update delete execute</permissions>
+      <path>/rw-project:project/nsr:ns-instance-config</path>
+      <path>/rw-project:project/nsr:ns-instance-opdata</path>
+      <path>/rw-project:project/nsr:key-pair</path>
+      <path>/nsr:exec-scale-out</path>
+      <path>/nsr:exec-scale-in</path>
+      <path>/nsr:exec-ns-service-primitive</path>
+      <path>/nsr:get-ns-service-primitive-values</path>
+    </authorize>
+  </role-definition>
+
+  <role-definition>
+    <role>rw-project:project-admin</role>
+    <keys-role>rw-project-mano:nsr-role</keys-role>
+    <authorize>
+      <permissions>create read update delete execute</permissions>
+      <path>/nsr:exec-scale-out</path>
+      <path>/nsr:exec-scale-in</path>
+      <path>/nsr:exec-ns-service-primitive</path>
+      <path>/nsr:get-ns-service-primitive-values</path>
+    </authorize>
+  </role-definition>
+</config>
diff --git a/models/plugins/yang/nsr.tailf.yang b/models/plugins/yang/nsr.tailf.yang
index b68872e..6d5d882 100644
--- a/models/plugins/yang/nsr.tailf.yang
+++ b/models/plugins/yang/nsr.tailf.yang
@@ -1,7 +1,7 @@
 
 /*
  * 
- *   Copyright 2016 RIFT.IO Inc
+ *   Copyright 2016-2017 RIFT.IO Inc
  *
  *   Licensed under the Apache License, Version 2.0 (the "License");
  *   you may not use this file except in compliance with the License.
@@ -31,22 +31,23 @@
     prefix nsr;
   }
 
-  tailf:annotate "/nsr:ns-instance-opdata" {
+  import rw-project {
+    prefix "rw-project";
+  }
+
+  tailf:annotate "/rw-project:project/nsr:ns-instance-opdata" {
     tailf:callpoint rw_callpoint;
   }
   tailf:annotate "/nsr:exec-ns-service-primitive" {
      tailf:actionpoint rw_actionpoint;
   }
-  tailf:annotate "/nsr:exec-scale-out" {
+  tailf:annotate "/nsr:get-ns-service-primitive-values" {
      tailf:actionpoint rw_actionpoint;
   }
   tailf:annotate "/nsr:exec-scale-in" {
      tailf:actionpoint rw_actionpoint;
   }
-  tailf:annotate "/nsr:get-ns-service-primitive-values" {
-     tailf:actionpoint rw_actionpoint;
-  }
-  tailf:annotate "/nsr:start-network-service" {
+  tailf:annotate "/nsr:exec-scale-out" {
      tailf:actionpoint rw_actionpoint;
   }
 }
diff --git a/models/plugins/yang/nsr.yang b/models/plugins/yang/nsr.yang
index a3f9f57..ef293fb 100644
--- a/models/plugins/yang/nsr.yang
+++ b/models/plugins/yang/nsr.yang
@@ -1,7 +1,7 @@
 
 /*
  * 
- *   Copyright 2016 RIFT.IO Inc
+ *   Copyright 2016-2017 RIFT.IO Inc
  *
  *   Licensed under the Apache License, Version 2.0 (the "License");
  *   you may not use this file except in compliance with the License.
@@ -23,10 +23,6 @@
   namespace "urn:ietf:params:xml:ns:yang:nfvo:nsr";
   prefix "nsr";
 
-  import rw-pb-ext {
-    prefix "rwpb";
-  }
-
   import vlr {
     prefix "vlr";
   }
@@ -35,12 +31,16 @@
     prefix "vld";
   }
 
-  import nsd {
-    prefix "nsd";
+  import nsd-base {
+    prefix "nsd-base";
   }
 
-  import vnfd {
-    prefix "vnfd";
+  import project-nsd {
+    prefix "project-nsd";
+  }
+
+  import project-vnfd {
+    prefix "project-vnfd";
   }
 
   import vnfr {
@@ -60,7 +60,16 @@
   }
 
   import rw-sdn {
-    prefix "rwsdn";
+    prefix "rw-sdn";
+  }
+
+  import rw-project {
+    prefix "rw-project";
+  }
+
+  revision 2017-02-08 {
+    description
+      "Update model to support projects.";
   }
 
   revision 2015-09-10 {
@@ -71,6 +80,34 @@
       "Derived from earlier versions of base YANG files";
   }
 
+  typedef vnffgr-operational-status {
+    type enumeration {
+      enum init;
+      enum running;
+      enum terminate;
+      enum terminated;
+      enum failed;
+    }
+  }
+
+  typedef ns-operational-status {
+    type enumeration {
+      enum init;
+      enum vl-init-phase;
+      enum vnf-init-phase;
+      enum running;
+      enum terminate;
+      enum vnf-terminate-phase;
+      enum vl-terminate-phase;
+      enum terminated;
+      enum failed;
+      enum scaling-out;
+      enum scaling-in;
+      enum vl-instantiate;
+      enum vl-terminate;
+    }
+  }
+
   typedef config-states {
     type enumeration {
       enum init;
@@ -78,6 +115,7 @@
       enum config_not_needed;
       enum configured;
       enum failed;
+      enum terminate;
     }
   }
 
@@ -99,16 +137,16 @@
       leaf key-pair-ref {
         description "A reference to the key pair entry in the global key pair table";
         type leafref {
-          path "/nsr:key-pair/nsr:name";
+          path "../../../../key-pair/name";
         }
       }
     }
     list user {
       key "name";
-
-      description "List of users to be added through cloud-config";
+      description "Used to configure the list of public keys to be injected as part
+                 of ns instantiation";
       leaf name {
-        description "Name of the user ";
+        description "Name of this key pair";
         type string;
       }
       leaf user-info {
@@ -118,108 +156,128 @@
       list ssh-authorized-key {
         key "key-pair-ref";
 
-        description "Used to configure the list of public keys to be injected as part 
+        description "Used to configure the list of public keys to be injected as part
                         of ns instantiation";
 
         leaf key-pair-ref {
           description "A reference to the key pair entry in the global key pair table";
           type leafref {
-            path "/nsr:key-pair/nsr:name";
+            path "../../../../../key-pair/name";
           }
         }
       }
     }
   }
 
-  list key-pair {
-    key "name";
-    description "Used to configure the list of public keys to be injected as part
+  augment "/rw-project:project" {
+    list key-pair {
+      key "name";
+      description "Used to configure the list of public keys to be injected as part
                  of ns instantiation";
+      leaf name {
+        description "Name of this key pair";
+        type string;
+      }
+
+      leaf key {
+        description "Key associated with this key pair";
+        type string;
+      }
+    }
+  }
+
+  grouping event-service-primitive {
+    leaf seq {
+      description
+          "Sequence number for the service primitive.";
+      type uint64;
+    }
+
     leaf name {
-      description "Name of this key pair";
+      description
+          "Name of the service primitive.";
+      type string;
+      mandatory "true";
+    }
+
+    leaf user-defined-script {
+      description
+          "A user defined script.";
       type string;
     }
 
-    leaf key {
-      description "Key associated with this key pair";
-      type string;
-    }
-  }
-
-  rpc start-network-service {
-    description "Start the network service";
-    input {
+    list parameter {
+      key "name";
       leaf name {
-        mandatory true;
-        description "Name of the Network Service";
         type string;
       }
-      leaf nsd-ref {
-        description "Reference to NSR ID ref";
-        mandatory true;
-        type leafref {
-          path "/nsd:nsd-catalog/nsd:nsd/nsd:id";
-        }
-      }
-      uses ns-instance-config-params;
-    }
 
-    output {
-      leaf nsr-id {
-        description "Automatically generated parameter";
-        type yang:uuid;
+      leaf value {
+        type string;
       }
     }
   }
 
+  augment "/rw-project:project" {
+    container ns-instance-config {
 
+      list nsr {
+        key "id";
+        unique "name";
 
-  container ns-instance-config {
-
-    list nsr {
-      key "id";
-      unique "name";
-
-      leaf id {
-        description "Identifier for the NSR.";
-        type yang:uuid;
-      }
-
-      leaf name {
-        description "NSR name.";
-        type string;
-      }
-
-      leaf short-name {
-        description "NSR short name.";
-        type string;
-      }
-
-      leaf description {
-        description "NSR description.";
-        type string;
-      }
-
-      leaf admin-status {
-        description
-          "This is the administrative status of the NS instance";
-
-        type enumeration {
-          enum ENABLED;
-          enum DISABLED;
+        leaf id {
+          description "Identifier for the NSR.";
+          type yang:uuid;
         }
-      }
 
-      container nsd {
-        description "NS descriptor used to instantiate this NS";
-        uses nsd:nsd-descriptor;
-      }
+        leaf name {
+          description "NSR name.";
+          type string;
+        }
 
-      uses ns-instance-config-params;
+        leaf short-name {
+          description "NSR short name.";
+          type string;
+        }
+
+        leaf description {
+          description "NSR description.";
+          type string;
+        }
+
+        leaf admin-status {
+          description
+            "This is the administrative status of the NS instance";
+
+          type enumeration {
+            enum ENABLED;
+            enum DISABLED;
+          }
+        }
+
+        container nsd {
+          description "NS descriptor used to instantiate this NS";
+
+          uses nsd-base:nsd-descriptor-common;
+
+          uses project-nsd:nsr-nsd-vld;
+
+          uses project-nsd:nsr-nsd-constituent-vnfd;
+
+          uses project-nsd:nsr-nsd-placement-groups;
+
+          uses project-nsd:nsr-nsd-vnf-dependency;
+
+          uses project-nsd:nsr-nsd-monitoring-param;
+
+          uses project-nsd:nsr-nsd-service-primitive;
+        }
+        uses ns-instance-config-params;
+      }
     }
   }
 
-  grouping ns-instance-config-params {
+  grouping ns-instance-config-params-common {
     uses manotypes:input-parameter;
 
     list scaling-group {
@@ -228,7 +286,7 @@
 
       leaf scaling-group-name-ref {
         description "name of the scaling group
-        leafref path ../../nsd/scaling-group-descriptor/name";
+        leafref path ../nsd/scaling-group-descriptor/name";
         type string;
       }
 
@@ -245,48 +303,60 @@
     list nsd-placement-group-maps {
       description
           "Mapping from mano-placement groups construct from NSD to cloud
-          platform placement group construct";
+           platform placement group construct";
 
       key "placement-group-ref";
 
       leaf placement-group-ref {
-        description "Reference for NSD placement group
-            leafref path ../../nsd/placement-groups/name";
+        description
+          "Reference for NSD placement group";
+        // type leafref {
+        //   path "../../nsd/placement-groups/name";
+        // }
         type string;
       }
       uses manotypes:placement-group-input;
     }
+  }
 
-   list vnfd-placement-group-maps {
+  grouping ns-instance-config-params {
+    uses ns-instance-config-params-common;
+
+    list vnfd-placement-group-maps {
       description
-          "Mapping from mano-placement groups construct from VNFD to cloud
+        "Mapping from mano-placement groups construct from VNFD to cloud
           platform placement group construct";
 
-    key "placement-group-ref vnfd-id-ref";
+      key "placement-group-ref vnfd-id-ref";
 
-    leaf vnfd-id-ref {
-      description
+      leaf vnfd-id-ref {
+        description
           "A reference to a vnfd. This is a
           leafref to path:
-          ../../../../nsd:constituent-vnfd
-          + [nsr:id = current()/../nsd:id-ref]
-          + /nsd:vnfd-id-ref
-          NOTE: confd limitations prevent the use of xpath";
-      type yang:uuid;
-    }
-
-    leaf placement-group-ref {
-      description
-          "A reference to VNFD placement group";
-      type leafref {
-        path "/vnfd:vnfd-catalog/vnfd:vnfd[vnfd:id = current()/" +
-            "../nsr:vnfd-id-ref]/vnfd:placement-groups/vnfd:name";
+          ../../../../project-nsd:constituent-vnfd
+          + [id = current()/../id-ref]
+          + /project-nsd:vnfd-id-ref
+          NOTE: An issue with confd is preventing the
+          use of xpath. Seems to be an issue with leafref
+          to leafref, whose target is in a different module.
+          Once that is resolved this will switched to use
+          leafref";
+        type yang:uuid;
       }
+
+      leaf placement-group-ref {
+        description
+          "A reference to VNFD placement group";
+        type leafref {
+          path "../../../../project-vnfd:vnfd-catalog/project-vnfd:vnfd[project-vnfd:id = " +
+            "current()/../vnfd-id-ref]/project-vnfd:placement-groups/project-vnfd:name";
+        }
+      }
+
+      uses manotypes:placement-group-input;
     }
 
-    uses manotypes:placement-group-input;
-   }
-   uses cloud-config;
+    uses cloud-config;
   }
 
   grouping vnffgr {
@@ -302,18 +372,19 @@
       leaf vnffgd-id-ref {
         description "VNFFG descriptor id reference";
         type leafref {
-          path "/nsr:ns-instance-config/nsr:nsr"
-            + "[nsr:id=current()/../../ns-instance-config-ref]"
-            + "/nsr:nsd/nsr:vnffgd/nsr:id";
+          path "../../../../ns-instance-config/nsr"
+            + "[id=current()/../../ns-instance-config-ref]"
+            + "/nsd/vnffgd/id";
         }
       }
 
       leaf vnffgd-name-ref {
         description "VNFFG descriptor name reference";
         type leafref {
-            path "/ns-instance-config/nsr"
+            path "../../../../ns-instance-config/nsr"
               + "[id=current()/../../ns-instance-config-ref]"
-              + "/nsd/vnffgd[nsr:id = current()/../vnffgd-id-ref]"
+              + "/nsd/vnffgd"
+              + "[id=current()/../vnffgd-id-ref]"
               + "/name";
         }
       }
@@ -323,10 +394,15 @@
             "The SDN account to use when requesting resources for
             this vnffgr";
         type leafref {
-          path "/rwsdn:sdn/rwsdn:account/rwsdn:name";
+          path "../../../../rw-sdn:sdn/rw-sdn:account/rw-sdn:name";
         }
       }
 
+      leaf cloud-account {
+        description "Cloud Account in which NSR is instantiated";
+        type string;
+      }
+
       leaf operational-status {
         description
           "The operational status of the VNFFGR instance
@@ -336,15 +412,7 @@
             terminated          : The VNFFGR is in the terminated state.
             failed              : The VNFFGR instantiation failed
           ";
-
-        type enumeration {
-          rwpb:enum-type "VnffgrOperationalStatus";
-          enum init;
-          enum running;
-          enum terminate;
-          enum terminated;
-          enum failed;
-        }
+        type vnffgr-operational-status;
       }
 
       list rsp {
@@ -362,11 +430,17 @@
           type string;
         }
 
+        leaf rsp-id {
+          description
+              "Returned Identifier for the RSP.";
+          type yang:uuid;
+        }
+
         leaf vnffgd-rsp-id-ref {
           description
               "Identifier for the VNFFG Descriptor RSP reference";
           type leafref {
-            path "/ns-instance-config/nsr"
+            path "../../../../../ns-instance-config/nsr"
               + "[id=current()/../../../ns-instance-config-ref]"
               + "/nsd/vnffgd"
               + "[id=current()/../../vnffgd-id-ref]"
@@ -378,11 +452,12 @@
           description
               "Name for the VNFFG Descriptor RSP reference";
           type leafref {
-            path "/ns-instance-config/nsr:nsr"
+            path "../../../../../ns-instance-config/nsr"
               + "[id=current()/../../../ns-instance-config-ref]"
               + "/nsd/vnffgd"
               + "[id=current()/../../vnffgd-id-ref]"
-              + "/rsp[id=current()/../vnffgd-rsp-id-ref]"
+              + "/rsp"
+              + "[id=current()/../vnffgd-rsp-id-ref]"
               + "/name";
           }
         }
@@ -426,22 +501,22 @@
             description
                 "A reference to a vnfr id";
                 type leafref {
-                  path "/vnfr:vnfr-catalog/vnfr:vnfr/vnfr:id";
+                  path "../../../../../../vnfr:vnfr-catalog/vnfr:vnfr/vnfr:id";
                 }
           }
           leaf vnfr-name-ref {
             description
                 "A reference to a vnfr name";
                 type leafref {
-                  path "/vnfr:vnfr-catalog/vnfr:vnfr/vnfr:name";
+                  path "../../../../../../vnfr:vnfr-catalog/vnfr:vnfr/vnfr:name";
                 }
           }
           leaf vnfr-connection-point-ref {
             description
                 "A reference to a vnfr connection point.";
             type leafref {
-              path "/vnfr:vnfr-catalog/vnfr:vnfr"
-                 + "[vnfr:id = current()/../nsr:vnfr-id-ref]"
+              path "../../../../../../vnfr:vnfr-catalog/vnfr:vnfr"
+                 + "[vnfr:id = current()/../vnfr-id-ref]"
                  + "/vnfr:connection-point/vnfr:name";
             }
           }
@@ -458,13 +533,9 @@
               type string;
             }
             leaf port-id {
-              rwpb:field-inline "true";
-              rwpb:field-string-max 64;
               type string;
             }
             leaf vm-id {
-              rwpb:field-inline "true";
-              rwpb:field-string-max 64;
               type string;
             }
             leaf address {
@@ -508,11 +579,16 @@
                 "Name of the classifier.";
             type string;
           }
+          leaf-list classifier-id {
+            description
+                "Returned Identifier for the classifier rule.";
+            type yang:uuid;
+          }
           leaf rsp-id-ref {
             description
                 "A reference to the RSP.";
             type leafref {
-              path "../../nsr:rsp/nsr:id";
+              path "../../rsp/id";
             }
           }
           leaf rsp-name {
@@ -524,33 +600,29 @@
             description
                 "A reference to a vnfr id";
                 type leafref {
-                  path "/vnfr:vnfr-catalog/vnfr:vnfr/vnfr:id";
+                  path "../../../../../vnfr:vnfr-catalog/vnfr:vnfr/vnfr:id";
                 }
           }
           leaf vnfr-name-ref {
             description
                 "A reference to a vnfr name";
                 type leafref {
-                  path "/vnfr:vnfr-catalog/vnfr:vnfr/vnfr:name";
+                  path "../../../../../vnfr:vnfr-catalog/vnfr:vnfr/vnfr:name";
                 }
           }
           leaf vnfr-connection-point-ref {
             description
                 "A reference to a vnfr connection point.";
             type leafref {
-              path "/vnfr:vnfr-catalog/vnfr:vnfr"
-                 + "[vnfr:id = current()/../nsr:vnfr-id-ref]"
+              path "../../../../../vnfr:vnfr-catalog/vnfr:vnfr"
+                 + "[vnfr:id = current()/../vnfr-id-ref]"
                  + "/vnfr:connection-point/vnfr:name";
             }
           }
           leaf port-id {
-            rwpb:field-inline "true";
-            rwpb:field-string-max 64;
             type string;
           }
           leaf vm-id {
-            rwpb:field-inline "true";
-            rwpb:field-string-max 64;
             type string;
           }
           leaf ip-address {
@@ -563,62 +635,66 @@
     }
   }
 
-  container ns-instance-opdata {
-    config false;
+  augment "/rw-project:project" {
+    container ns-instance-opdata {
+      config false;
 
-    list nsr {
-      key "ns-instance-config-ref";
+      list nsr {
+        key "ns-instance-config-ref";
 
-      leaf ns-instance-config-ref {
-        type leafref {
-          path "/nsr:ns-instance-config/nsr:nsr/nsr:id";
+        leaf ns-instance-config-ref {
+          type leafref {
+            path "../../../ns-instance-config/nsr/id";
+          }
+          // type yang:uuid;
         }
-      }
 
-      leaf name-ref {
-        description "Network service name reference";
-        type leafref {
-          path "/nsr:ns-instance-config/nsr:nsr/nsr:name";
+        leaf name-ref {
+          description "Network service name reference";
+          type leafref {
+            path "../../../ns-instance-config/nsr" +
+              "[id=current()/../ns-instance-config-ref]" +
+              "/name";
+          }
         }
-      }
 
-      leaf nsd-ref {
-        description "Network service descriptor id reference";
-        type leafref {
-          path "/ns-instance-config/nsr"
-            + "[id=current()/../ns-instance-config-ref]"
-            + "/nsd/id";
+        leaf nsd-ref {
+          description "Network service descriptor id reference";
+          type leafref {
+            path "../../../ns-instance-config/nsr"
+              + "[id=current()/../ns-instance-config-ref]"
+              + "/nsd/id";
+          }
         }
-      }
 
-      leaf nsd-name-ref {
-        description "Network service descriptor name reference";
-        type leafref {
-          path "/ns-instance-config/nsr"
-            + "[id=current()/../ns-instance-config-ref]"
-            + "/nsd/name";
+        leaf nsd-name-ref {
+          description "Network service descriptor name reference";
+          type leafref {
+            path "../../../ns-instance-config/nsr"
+              + "[id=current()/../ns-instance-config-ref]"
+              + "/nsd/name";
+          }
         }
-      }
 
-      leaf create-time {
-        description
-          "Creation timestamp of this Network Service.
+        leaf create-time {
+          description
+            "Creation timestamp of this Network Service.
           The timestamp is expressed as seconds
           since unix epoch - 1970-01-01T00:00:00Z";
 
-        type uint32;
-      }
+          type uint32;
+        }
 
-      leaf uptime {
-        description
-          "Active period of this Network Service.
+        leaf uptime {
+          description
+            "Active period of this Network Service.
           Uptime is expressed in seconds";
 
-        type uint32;
-      }
+          type uint32;
+        }
 
-      list connection-point {
-        description
+        list connection-point {
+          description
             "List for external connection points.
             Each NS has one or more external connection points.
             As the name implies that external connection points
@@ -628,101 +704,100 @@
             construct network service chains by connecting the
             connection points between different NS.";
 
-        key "name";
-        leaf name {
-          description
+          key "name";
+          leaf name {
+            description
               "Name of the NS connection point.";
-          type string;
-        }
+            type string;
+          }
 
-        leaf type {
-          description
+          leaf type {
+            description
               "Type of the connection point.";
-          type manotypes:connection-point-type;
-        }
-      }
-
-      list vlr {
-        key "vlr-ref";
-        leaf vlr-ref {
-          description
-              "Reference to a VLR record in the VLR catalog";
-          type leafref {
-            path "/vlr:vlr-catalog/vlr:vlr/vlr:id";
+            type manotypes:connection-point-type;
           }
         }
 
+        list vlr {
+          key "vlr-ref";
+          leaf vlr-ref {
+            description
+              "Reference to a VLR record in the VLR catalog";
+            type leafref {
+              path "../../../../vlr:vlr-catalog/vlr:vlr/vlr:id";
+            }
+          }
 
-        list vnfr-connection-point-ref {
+
+          list vnfr-connection-point-ref {
+            description
+              "A list of references to connection points.";
+            key "vnfr-id";
+
+            leaf vnfr-id {
+              description "A reference to a vnfr";
+              type leafref {
+                path "../../../../../vnfr:vnfr-catalog/vnfr:vnfr/vnfr:id";
+              }
+            }
+
+            leaf connection-point {
+              description
+                "A reference to a connection point name in a vnfr";
+              type leafref {
+                path "../../../../../vnfr:vnfr-catalog/vnfr:vnfr"
+                  + "[vnfr:id = current()/../vnfr-id]"
+                  + "/vnfr:connection-point/vnfr:name";
+              }
+            }
+          }
+        }
+
+        list constituent-vnfr-ref {
           description
-            "A list of references to connection points.";
+            "List of VNFRs that are part of this
+             network service.";
           key "vnfr-id";
 
           leaf vnfr-id {
-            description "A reference to a vnfr";
-            type leafref {
-              path "/vnfr:vnfr-catalog/vnfr:vnfr/vnfr:id";
-            }
-          }
-
-          leaf connection-point {
             description
-                "A reference to a connection point name in a vnfr";
+              "Reference to the VNFR id
+               This should be a leafref to /vnfr:vnfr-catalog/vnfr:vnfr/vnfr:id
+               But due to confd bug (RIFT-9451), changing to string.";
+            type string;
+          }
+        }
+
+        list scaling-group-record {
+          description "List of scaling group records";
+          key "scaling-group-name-ref";
+
+          leaf scaling-group-name-ref {
+            description "name of the scaling group";
             type leafref {
-              path "/vnfr:vnfr-catalog/vnfr:vnfr"
-                 + "[vnfr:id = current()/../nsr:vnfr-id]"
-                 + "/vnfr:connection-point/vnfr:name";
+              path "../../../../ns-instance-config/nsr"
+                + "[id=current()/../../ns-instance-config-ref]"
+                + "/nsd/scaling-group-descriptor/name";
             }
           }
-        }
-      }
 
-      list constituent-vnfr-ref {
-        description
-            "List of VNFRs that are part of this
-             network service.";
-        key "vnfr-id";
+          list instance {
+            description "Reference to scaling group instance record";
+            key "instance-id";
+            leaf instance-id {
+              description "Scaling group instance id";
+              type uint16;
+            }
 
-        leaf vnfr-id {
-          description
-            "Reference to the VNFR id
-             This should be a leafref to /vnfr:vnfr-catalog/vnfr:vnfr/vnfr:id
-             But due to confd bug (RIFT-9451), changing to string.
-            ";
-          type string;
-        }
-      }
-
-      list scaling-group-record {
-        description "List of scaling group records";
-        key "scaling-group-name-ref";
-
-        leaf scaling-group-name-ref {
-          description "name of the scaling group";
-          type leafref {
-            path "/ns-instance-config/nsr"
-              + "[id=current()/../../ns-instance-config-ref]"
-              + "/nsd/scaling-group-descriptor/name";
-          }
-        }
-
-        list instance {
-          description "Reference to scaling group instance record";
-          key "instance-id";
-          leaf instance-id {
-            description "Scaling group instance id";
-            type uint16;
-          }
-
-          leaf is-default {
-            description "Flag indicating whether this instance was part of
+            leaf is-default {
+              description "Flag indicating whether this instance was part of
                 default scaling group (and thus undeletable)";
-            type boolean;
-          }
+              type boolean;
+            }
 
-          leaf op-status {
-            description
-              "The operational status of the NS instance
+            leaf op-status {
+              description
+                "The operational status of the NS instance
                 init                : The scaling group has just started.
                 vnf-init-phase      : The VNFs in the scaling group are being instantiated.
                 running             : The scaling group  is in running state.
@@ -732,58 +807,58 @@
                 failed              : The scaling group instantiation failed.
               ";
 
-            type enumeration {
-              enum init;
-              enum vnf-init-phase;
-              enum running;
-              enum terminate;
-              enum vnf-terminate-phase;
-              enum terminated;
-              enum failed;
+              type enumeration {
+                enum init;
+                enum vnf-init-phase;
+                enum running;
+                enum terminate;
+                enum vnf-terminate-phase;
+                enum terminated;
+                enum failed;
+              }
             }
-          }
 
-          leaf config-status {
-            description
-              "The configuration status of the scaling group instance
+            leaf config-status {
+              description
+                "The configuration status of the scaling group instance
                configuring : At least one of the VNFs in this scaling group instance
                              is in configuring state
                configured  : All the VNFs in this scaling group instance are
                              configured or config-not-needed state
                failed      : Configuring this scaling group instance failed
               ";
-            type config-states;
-          }
+              type config-states;
+            }
 
-          leaf error-msg {
-            description
-              "Reason for failure in configuration of this scaling instance";
-            type string;
-          }
+            leaf error-msg {
+              description
+                "Reason for failure in configuration of this scaling instance";
+              type string;
+            }
 
-          leaf create-time {
-            description
-              "Creation timestamp of this scaling group record.
+            leaf create-time {
+              description
+                "Creation timestamp of this scaling group record.
               The timestamp is expressed as seconds
               since unix epoch - 1970-01-01T00:00:00Z";
 
               type uint32;
-          }
+            }
 
-          leaf-list vnfrs {
-            description "Reference to VNFR within the scale instance";
-            type leafref {
-              path "../../../constituent-vnfr-ref/vnfr-id";
+            leaf-list vnfrs {
+              description "Reference to VNFR within the scale instance";
+              type leafref {
+                path "../../../constituent-vnfr-ref/vnfr-id";
+              }
             }
           }
         }
-      }
 
-      uses vnffgr;
+        uses vnffgr;
 
-      leaf operational-status {
-        description
-          "The operational status of the NS instance
+        leaf operational-status {
+          description
+            "The operational status of the NS instance
             init                : The network service has just started.
             vl-init-phase       : The VLs in the NS are being instantiated.
             vnf-init-phase      : The VNFs in the NS are being instantiated.
@@ -799,271 +874,184 @@
             vl-terminate        : The NS is terminating a VL
           ";
 
-        type enumeration {
-          enum init;
-          enum vl-init-phase;
-          enum vnf-init-phase;
-          enum running;
-          enum terminate;
-          enum vnf-terminate-phase;
-          enum vl-terminate-phase;
-          enum terminated;
-          enum failed;
-          enum scaling-out;
-          enum scaling-in;
-          enum vl-instantiate;
-          enum vl-terminate;
+          type ns-operational-status;
         }
-      }
 
-      leaf config-status {
-        description
-          "The configuration status of the NS instance
+        leaf config-status {
+          description
+            "The configuration status of the NS instance
             configuring: At least one of the VNFs in this instance is in configuring state
             configured:  All the VNFs in this NS instance are configured or config-not-needed state
           ";
-        type config-states;
-      }
+          type config-states;
+        }
 
-      list service-primitive {
-         description
-              "Network service level service primitives.";
-
-         key "name";
-
-         leaf name {
-            description
-                "Name of the service primitive.";
-            type string;
-         }
-
-         list parameter {
-            description
-                "List of parameters for the service primitive.";
-
-            key "name";
-            uses manotypes:primitive-parameter;
-         }
-
-         uses manotypes:ui-primitive-group;
-
-         list vnf-primitive-group {
-            description
-                "List of service primitives grouped by VNF.";
-
-            key "member-vnf-index-ref";
-            leaf member-vnf-index-ref {
-              description
-                 "Reference to member-vnf within constituent-vnfds";
-              type uint64;
-            }
-
-            leaf vnfd-id-ref {
-               description
-                 "A reference to a vnfd. This is a 
-                  leafref to path:
-                      ../../../../nsd:constituent-vnfd
-                      + [nsd:id = current()/../nsd:id-ref]
-                      + /nsd:vnfd-id-ref
-                  NOTE: confd limitations prevent the use of xpath";
-
-               type string;
-            }
-
-            leaf vnfd-name {
-               description
-                 "Name of the VNFD";
-               type string;
-            }
-
-            list primitive {
-               key "index";
-
-               leaf index {
-                 description "Index of this primitive";
-                 type uint32;
-               }
-
-               leaf name {
-                 description "Name of the primitive in the VNF primitive ";
-                 type string;
-               }
-            }
-         }
-
-         leaf user-defined-script {
+        list service-primitive {
            description
+                "Network service level service primitives.";
+
+           key "name";
+
+           leaf name {
+              description
+                  "Name of the service primitive.";
+              type string;
+           }
+
+           list parameter {
+              description
+                  "List of parameters for the service primitive.";
+
+              key "name";
+              uses manotypes:primitive-parameter;
+           }
+
+           uses manotypes:ui-primitive-group;
+
+           list vnf-primitive-group {
+              description
+                "Reference to member-vnf within constituent-vnfds";
+
+              key "member-vnf-index-ref";
+              leaf member-vnf-index-ref {
+                description
+                   "Reference to member-vnf within constituent-vnfds";
+                type uint64;
+              }
+
+              leaf vnfd-id-ref {
+                 description
+                   "A reference to a vnfd. This is a 
+                    leafref to path:
+                        ../../../../nsd:constituent-vnfd
+                        + [nsd:id = current()/../nsd:id-ref]
+                        + /nsd:vnfd-id-ref
+                    NOTE: An issue with confd is preventing the
+                    use of xpath. Seems to be an issue with leafref
+                    to leafref, whose target is in a different module.
+                    Once that is resovled this will switched to use
+                    leafref";
+
+                 type string;
+              }
+
+              leaf vnfd-name {
+                 description
+                   "Name of the VNFD";
+                 type string;
+              }
+
+              list primitive {
+                 key "index";
+
+                 leaf index {
+                   description "Index of this primitive";
+                   type uint32;
+                 }
+
+                 leaf name {
+                   description "Name of the primitive in the VNF primitive ";
+                   type string;
+                 }
+              }
+           }
+
+           leaf user-defined-script {
+             description
                "A user defined script.";
-           type string;
-         }
-      }
-
-      list initial-config-primitive {
-        rwpb:msg-new NsrInitialConfigPrimitive;
-        description
-            "Initial set of configuration primitives for NSD.";
-        key "seq";
-        leaf seq {
-          description
-              "Sequence number for the configuration primitive.";
-          type uint64;
+             type string;
+           }
         }
 
-        leaf name {
+        list initial-service-primitive {
           description
-              "Name of the configuration primitive.";
-          type string;
-          mandatory "true";
+            "Initial set of service primitives for NSD.";
+          key "seq";
+
+          uses event-service-primitive;
         }
 
-        leaf user-defined-script {
+        list terminate-service-primitive {
           description
-              "A user defined script.";
-          type string;
+            "Set of service primitives to
+             execute during termination of NSD.";
+          key "seq";
+
+          uses event-service-primitive;
         }
 
-        list parameter {
+        list monitoring-param {
           description
-              "List of parameters for the initial config primitive";
-          key "name";
+            "List of NS level params.";
+          key "id";
+
+          uses manotypes:monitoring-param-value;
+          uses manotypes:monitoring-param-ui-data;
+          uses manotypes:monitoring-param-aggregation;
+
+          leaf id {
+            type string;
+          }
+
           leaf name {
-            description "Name of the intitial config parameter";
             type string;
           }
 
-          leaf value {
-            description "Value associated with the initial config 
-                        parameter";
-            type string;
-          }
-        }
-      }
-
-
-      list monitoring-param {
-        description
-          "List of NS level params.";
-        key "id";
-
-        uses manotypes:monitoring-param-value;
-        uses manotypes:monitoring-param-ui-data;
-        uses manotypes:monitoring-param-aggregation;
-
-        leaf id {
-          type string;
-        }
-
-        leaf name {
-          type string;
-        }
-
-        leaf nsd-mon-param-ref {
-          description "Reference to the NSD monitoring param descriptor
+          leaf nsd-mon-param-ref {
+            description "Reference to the NSD monitoring param descriptor
                        that produced this result";
-          type leafref {
-            path "/nsd:nsd-catalog/nsd:nsd[nsd:id = current()/" +
-                 "../../nsr:nsd-ref]/nsd:monitoring-param/nsd:id";
+            // TODO: Fix leafref
+            type leafref {
+              path "../../../../project-nsd:nsd-catalog/project-nsd:nsd" +
+                "[project-nsd:id = current()/../../nsd-ref]" +
+                "/project-nsd:monitoring-param/project-nsd:id";
+            }
           }
-        }
 
-        list vnfr-mon-param-ref {
-          description "A list of VNFR monitoring params associated with this monp";
-          key "vnfr-id-ref vnfr-mon-param-ref";
+          list vnfr-mon-param-ref {
+            description "A list of VNFR monitoring params associated with this monp";
+            key "vnfr-id-ref vnfr-mon-param-ref";
 
-          leaf vnfr-id-ref {
-            description
-               "A reference to a vnfr. This is a
+            leaf vnfr-id-ref {
+              description
+                "A reference to a vnfr. This is a
                 leafref to path:
                     /vnfr:vnfr-catalog/vnfr:vnfr/vnfr:id";
 
-            type yang:uuid;
-          }
+              type yang:uuid;
+            }
 
-          leaf vnfr-mon-param-ref {
-            description "A reference to the VNFR monitoring param";
-            type leafref {
-              path "/vnfr:vnfr-catalog/vnfr:vnfr"
-                + "[vnfr:id = current()/../nsr:vnfr-id-ref]"
-                + "/vnfr:monitoring-param/vnfr:id";
+            leaf vnfr-mon-param-ref {
+              description "A reference to the VNFR monitoring param";
+              type leafref {
+                path "../../../../../vnfr:vnfr-catalog/vnfr:vnfr"
+                  + "[vnfr:id = current()/../vnfr-id-ref]"
+                  + "/vnfr:monitoring-param/vnfr:id";
+              }
             }
           }
         }
-      }
 
-      list config-agent-job {
-        key "job-id";
+        list config-agent-job {
+          key "job-id";
 
-        leaf job-id {
-          description "config agent job Identifier for the NS.";
-          type uint64;
-        }
+          leaf job-id {
+            description "config agent job Identifier for the NS.";
+            type uint64;
+          }
 
-        leaf job-name {
-          description "Config agent job name";
-          type string;
-        }
+          leaf job-name {
+            description "Config agent job name";
+            type string;
+          }
 
-        leaf job-status {
-          description
+          leaf job-status {
+            description
               "Job status to be set based on each VNF primitive execution,
                pending  - if at least one VNF is in pending state
                           and remaining VNFs are in success state.
                Success  - if all VNF executions are in success state
                failure  - if one of the VNF executions is failure";
-          type enumeration {
-            enum pending;
-            enum success;
-            enum failure;
-          }
-        }
-
-        leaf triggered-by {
-          description "The primitive is triggered from NS or VNF level";
-          type trigger-type;
-        }
-
-        leaf create-time {
-          description
-            "Creation timestamp of this Config Agent Job.
-            The timestamp is expressed as seconds
-            since unix epoch - 1970-01-01T00:00:00Z";
-
-          type uint32;
-        }
-
-        leaf job-status-details {
-          description "Config agent job status details, in case of errors";
-          type string;
-        }
-
-        uses manotypes:primitive-parameter-value;
-
-        list parameter-group {
-          description
-              "List of NS Primitive parameter groups";
-          key "name";
-          leaf name {
-            description
-                "Name of the parameter.";
-            type string;
-          }
-
-          uses manotypes:primitive-parameter-value;
-        }
-
-        list vnfr {
-          key "id";
-          leaf id {
-            description "Identifier for the VNFR.";
-            type yang:uuid;
-          }
-          leaf vnf-job-status {
-            description
-                "Job status to be set based on each VNF primitive execution,
-                 pending  - if at least one primitive is in pending state
-                            and remaining primitives are in success state.
-                 Success  - if all primitive executions are in success state
-                 failure  - if one of the primitive executions is failure";
             type enumeration {
               enum pending;
               enum success;
@@ -1071,30 +1059,85 @@
             }
           }
 
-          list primitive {
+          leaf triggered-by {
+            description "The primitive is triggered from NS or VNF level";
+            type trigger-type;
+          }
+
+          leaf create-time {
+            description
+              "Creation timestamp of this Config Agent Job.
+            The timestamp is expressed as seconds
+            since unix epoch - 1970-01-01T00:00:00Z";
+
+            type uint32;
+          }
+
+          leaf job-status-details {
+            description "Config agent job status details, in case of errors";
+            type string;
+          }
+
+          uses manotypes:primitive-parameter-value;
+
+          list parameter-group {
+            description
+              "List of NS Primitive parameter groups";
             key "name";
             leaf name {
-              description "the name of the primitive";
+              description
+                "Name of the parameter.";
               type string;
             }
 
             uses manotypes:primitive-parameter-value;
+          }
 
-            leaf execution-id {
-              description "Execution id of the primitive";
-              type string;
+          list vnfr {
+            key "id";
+            leaf id {
+              description "Identifier for the VNFR.";
+              type yang:uuid;
             }
-            leaf execution-status {
-              description "status of the Execution";
+            leaf vnf-job-status {
+              description
+                "Job status to be set based on each VNF primitive execution,
+                 pending  - if at least one primitive is in pending state
+                            and remaining primitives are in success state.
+                 Success  - if all primitive executions are in success state
+                 failure  - if one of the primitive executions is failure";
               type enumeration {
                 enum pending;
                 enum success;
                 enum failure;
               }
             }
-            leaf execution-error-details {
-              description "Error details if execution-status is failure";
-              type string;
+
+            list primitive {
+              key "name";
+              leaf name {
+                description "the name of the primitive";
+                type string;
+              }
+
+              uses manotypes:primitive-parameter-value;
+
+              leaf execution-id {
+                description "Execution id of the primitive";
+                type string;
+              }
+              leaf execution-status {
+                description "status of the Execution";
+                type enumeration {
+                  enum pending;
+                  enum success;
+                  enum failure;
+                }
+              }
+              leaf execution-error-details {
+                description "Error details if execution-status is failure";
+                type string;
+              }
             }
           }
         }
@@ -1102,22 +1145,30 @@
     }
   }
 
+  grouping rpc-common {
+    uses manotypes:rpc-project-name;
+
+    leaf nsr_id_ref {
+      description "Reference to NSR ID ref";
+      type leafref {
+        path "/rw-project:project[rw-project:name=current()/.." +
+          "/nsr:project-name]/nsr:ns-instance-config/nsr:nsr/nsr:id";
+      }
+      mandatory true;
+    }
+  }
+
   rpc get-ns-service-primitive-values {
     description "Get the service primitive parameter values";
-    input {
-      leaf nsr_id_ref {
-        description "Reference to NSR ID ref";
-        mandatory true;
-        type leafref {
-          path "/nsr:ns-instance-config/nsr:nsr/nsr:id";
-        }
-      }
 
+    input {
       leaf name {
         description "Name of the NS service primitive group";
         mandatory true;
         type string;
       }
+
+      uses rpc-common;
     }
 
     output {
@@ -1172,10 +1223,14 @@
           description
               "A reference to a vnfd. This is a
                leafref to path:
-                   ../../../../nsd:constituent-vnfd
-                   + [nsd:id = current()/../nsd:id-ref]
-                   + /nsd:vnfd-id-ref
-               NOTE: confd limitations prevent the use of xpath";
+                   ../../../../project-nsd:constituent-vnfd
+                   + [project-nsd:id = current()/../project-nsd:id-ref]
+                   + /project-nsd:vnfd-id-ref
+               NOTE: An issue with confd is preventing the
+               use of xpath. Seems to be an issue with leafref
+               to leafref, whose target is in a different module.
+               Once that is resolved this will switched to use
+               leafref";
 
           type string;
         }
@@ -1219,12 +1274,7 @@
         type string;
       }
 
-      leaf nsr_id_ref {
-        description "Reference to NSR ID ref";
-        type leafref {
-          path "/nsr:ns-instance-config/nsr:nsr/nsr:id";
-        }
-      }
+      uses rpc-common;
 
       leaf triggered-by {
         description "The primitive is triggered from NS or VNF level";
@@ -1301,12 +1351,7 @@
         type string;
       }
 
-      leaf nsr_id_ref {
-        description "Reference to NSR ID ref";
-        type leafref {
-          path "/nsr:ns-instance-config/nsr:nsr/nsr:id";
-        }
-      }
+      uses rpc-common;
 
       leaf triggered-by {
         description "The primitive is triggered from NS or VNF level";
@@ -1401,22 +1446,29 @@
     description "Executes scale out request";
 
     input {
-
-      leaf nsr-id-ref {
-        description "Reference to NSR ID ref";
-        type leafref {
-          path "/nsr:ns-instance-config/nsr:nsr/nsr:id";
-        }
-      }
+      uses rpc-common;
 
       leaf scaling-group-name-ref {
         description "name of the scaling group";
-        type string;
+        type leafref {
+          path "/rw-project:project[rw-project:name=current()/.." +
+            "/nsr:project-name]/nsr:ns-instance-config/nsr:nsr" +
+            "[nsr:id=current()/../nsr:nsr_id_ref]/nsr:nsd" +
+            "/nsr:scaling-group-descriptor/nsr:name";
+        }
+        mandatory true;
       }
 
       leaf instance-id {
         description "id of the scaling group";
-        type uint64;
+        type leafref {
+          path "/rw-project:project[rw-project:name=current()/.." +
+            "/nsr:project-name]/nsr:ns-instance-config/nsr:nsr" +
+            "[nsr:id=current()/../nsr:nsr_id_ref]" +
+            "/nsr:scaling-group[nsr:scaling-group-name-ref=current()/.." +
+            "/nsr:scaling-group-name-ref]/nsr:instance/nsr:id";
+        }
+        mandatory true;
       }
 
 
@@ -1433,25 +1485,25 @@
     description "Executes scale out request";
 
     input {
-
-      leaf nsr-id-ref {
-        description "Reference to NSR ID ref";
-        type leafref {
-          path "/nsr:ns-instance-config/nsr:nsr/nsr:id";
-        }
-      }
+      uses rpc-common;
 
       leaf scaling-group-name-ref {
         description "name of the scaling group";
-        type string;
+        type leafref {
+          path "/rw-project:project[rw-project:name=current()/.." +
+            "/nsr:project-name]/nsr:ns-instance-config/nsr:nsr" +
+            "[nsr:id=current()/../nsr:nsr_id_ref]/nsr:nsd" +
+            "/nsr:scaling-group-descriptor/nsr:name";
+        }
+        mandatory true;
       }
 
       leaf instance-id {
         description "id of the scaling group";
         type uint64;
       }
-
     }
+
     output {
      leaf instance-id {
         description "id of the scaling group";
@@ -1460,4 +1512,109 @@
     }
   }
 
+  rpc start-network-service {
+    description "Start the network service";
+    input {
+      leaf name {
+        mandatory true;
+        description "Name of the Network Service";
+        type string;
+      }
+
+      uses manotypes:rpc-project-name;
+
+      leaf nsd_id_ref {
+        description "Reference to NSD ID ref";
+        type leafref {
+          path "/rw-project:project[rw-project:name=current()/.." +
+            "/project-name]/project-nsd:nsd-catalog/project-nsd:nsd/project-nsd:id";
+        }
+      }
+      uses ns-instance-config-params-common;
+
+      list vnfd-placement-group-maps {
+        description
+          "Mapping from mano-placement groups construct from VNFD to cloud
+          platform placement group construct";
+
+        key "placement-group-ref vnfd-id-ref";
+
+        leaf vnfd-id-ref {
+          description
+            "A reference to a vnfd. This is a
+          leafref to path:
+          ../../../../project-nsd:constituent-vnfd
+          + [id = current()/../project-nsd:id-ref]
+          + /project-nsd:vnfd-id-ref
+          NOTE: An issue with confd is preventing the
+          use of xpath. Seems to be an issue with leafref
+          to leafref, whose target is in a different module.
+          Once that is resovled this will switched to use
+          leafref";
+          type yang:uuid;
+        }
+
+        leaf placement-group-ref {
+          description
+            "A reference to VNFD placement group";
+          type leafref {
+            path "/rw-project:project[rw-project:name=current()/" +
+              "../../project-name]/project-vnfd:vnfd-catalog/project-vnfd:vnfd[project-vnfd:id = " +
+              "current()/../vnfd-id-ref]/project-vnfd:placement-groups/project-vnfd:name";
+          }
+        }
+
+        uses manotypes:placement-group-input;
+
+        list ssh-authorized-key {
+          key "key-pair-ref";
+
+          description "List of authorized ssh keys as part of cloud-config";
+
+          leaf key-pair-ref {
+            description "A reference to the key pair entry in the global key pair table";
+            type leafref {
+              path "/rw-project:project[rw-project:name=current()/../../../" +
+                "project-name]/key-pair/name";
+            }
+          }
+        }
+
+        list user {
+          key "name";
+
+          description "List of users to be added through cloud-config";
+          leaf name {
+            description "Name of the user ";
+            type string;
+          }
+          leaf user-info {
+            description "The user name's real name";
+            type string;
+          }
+          list ssh-authorized-key {
+            key "key-pair-ref";
+
+            description "Used to configure the list of public keys to be injected as part
+                        of ns instantiation";
+
+            leaf key-pair-ref {
+              description "A reference to the key pair entry in the global key pair table";
+              type leafref {
+                path "/rw-project:project[rw-project:name=current()/" +
+                  "../../../../project-name]/key-pair/name";
+              }
+            }
+          }
+        }
+      }
+    }
+
+    output {
+      leaf nsr-id {
+        description "Automatically generated parameter";
+        type yang:uuid;
+      }
+    }
+  }
 }
diff --git a/models/plugins/yang/pnfd.yang b/models/plugins/yang/pnfd.yang
index 2f9bcdf..920037a 100644
--- a/models/plugins/yang/pnfd.yang
+++ b/models/plugins/yang/pnfd.yang
@@ -1,7 +1,7 @@
 
 /*
  * 
- *   Copyright 2016 RIFT.IO Inc
+ *   Copyright 2016-2017 RIFT.IO Inc
  *
  *   Licensed under the Apache License, Version 2.0 (the "License");
  *   you may not use this file except in compliance with the License.
@@ -23,10 +23,6 @@
   namespace "urn:ietf:params:xml:ns:yang:nfvo:pnfd";
   prefix "pnfd";
 
-  import rw-pb-ext {
-    prefix "rwpb";
-  }
-
   import ietf-inet-types {
     prefix "inet";
   }
@@ -39,6 +35,15 @@
     prefix "manotypes";
   }
 
+  import rw-project {
+    prefix "rw-project";
+  }
+
+  revision 2017-02-08 {
+    description
+      "Update model to support projects.";
+  }
+
   revision 2015-09-10 {
     description
       "Initial revision. This YANG file defines 
@@ -47,56 +52,58 @@
       "Derived from earlier versions of base YANG files";
   }
 
-  container pnfd-catalog {
+  augment "/rw-project:project" {
+    container pnfd-catalog {
 
-    list pnfd {
-      key "id";
-
-      leaf id {
-        description "Identifier for the PNFD.";
-        type yang:uuid;
-      }
-
-      leaf name {
-        description "PNFD name.";
-        type string;
-      }
-
-      leaf short-name {
-        description "Short name to appear as label in the UI";
-        type string;
-      }
-
-      leaf vendor {
-        description "Vendor of the PNFD.";
-        type string;
-      }
-
-      leaf description {
-        description "Description of the PNFD.";
-        type string;
-      }
-
-      leaf version {
-        description "Version of the PNFD";
-        type string;
-      }
-
-      list connection-point {
-        description
-            "List for external connection points. Each PNF has one or more external
-            connection points.";
+      list pnfd {
         key "id";
+
         leaf id {
-          description
-              "Identifier for the external connection points";
-          type uint64;
+          description "Identifier for the PNFD.";
+          type yang:uuid;
         }
 
-        leaf cp-type {
+        leaf name {
+          description "PNFD name.";
+          type string;
+        }
+
+        leaf short-name {
+          description "Short name to appear as label in the UI";
+          type string;
+        }
+
+        leaf vendor {
+          description "Vendor of the PNFD.";
+          type string;
+        }
+
+        leaf description {
+          description "Description of the PNFD.";
+          type string;
+        }
+
+        leaf version {
+          description "Version of the PNFD";
+          type string;
+        }
+
+        list connection-point {
           description
+            "List for external connection points. Each PNF has one or more external
+            connection points.";
+          key "id";
+          leaf id {
+            description
+              "Identifier for the external connection points";
+            type uint64;
+          }
+
+          leaf cp-type {
+            description
               "Type of the connection point.";
-          type manotypes:connection-point-type;
+            type manotypes:connection-point-type;
+          }
         }
       }
     }
diff --git a/models/plugins/yang/project-nsd.role.xml b/models/plugins/yang/project-nsd.role.xml
new file mode 100644
index 0000000..0463f90
--- /dev/null
+++ b/models/plugins/yang/project-nsd.role.xml
@@ -0,0 +1,60 @@
+<?xml version="1.0" ?>
+<config xmlns="http://riftio.com/ns/riftware-1.0/rw-rbac-role-def">
+  <key-definition>
+    <role>rw-project-mano:project-nsd-role</role>
+    <key-set>
+      <name>project-name</name>
+      <path>/rw-project:project/rw-project:name</path>
+    </key-set>
+  </key-definition>
+
+  <role-definition>
+    <role>rw-project-mano:catalog-oper</role>
+    <keys-role>rw-project-mano:project-nsd-role</keys-role>
+    <priority>
+      <lower-than>
+        <role>rw-project:project-admin</role>
+      </lower-than>
+    </priority>
+    <authorize>
+      <permissions>read execute</permissions>
+      <path>/rw-project:project/project-nsd:nsd-catalog</path>
+    </authorize>
+  </role-definition>
+
+  <role-definition>
+    <role>rw-project-mano:catalog-admin</role>
+    <keys-role>rw-project-mano:project-nsd-role</keys-role>
+    <priority>
+      <higher-than>
+        <role>rw-project-mano:catalog-oper</role>
+      </higher-than>
+      <higher-than>
+        <role>rw-project-mano:account-oper</role>
+      </higher-than>
+      <higher-than>
+        <role>rw-project-mano:lcm-oper</role>
+      </higher-than>
+      <higher-than>
+        <role>rw-project:project-oper</role>
+      </higher-than>
+      <higher-than>
+        <role>rw-project-mano:lcm-admin</role>
+      </higher-than>
+    </priority>
+
+    <authorize>
+      <permissions>create read update delete execute</permissions>
+      <path>/rw-project:project/project-nsd:nsd-catalog</path>
+    </authorize>
+  </role-definition>
+
+  <role-definition>
+    <role>rw-project-mano:lcm-admin</role>
+    <keys-role>rw-project-mano:project-nsd-role</keys-role>
+    <authorize>
+      <permissions>read execute</permissions>
+      <path>/rw-project:project/project-nsd:nsd-catalog</path>
+    </authorize>
+  </role-definition>
+</config>
diff --git a/models/plugins/yang/project-nsd.yang b/models/plugins/yang/project-nsd.yang
new file mode 100644
index 0000000..33d8241
--- /dev/null
+++ b/models/plugins/yang/project-nsd.yang
@@ -0,0 +1,604 @@
+
+/*
+ * 
+ *   Copyright 2017 RIFT.IO Inc
+ *
+ *   Licensed under the Apache License, Version 2.0 (the "License");
+ *   you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *       http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *   Unless required by applicable law or agreed to in writing, software
+ *   distributed under the License is distributed on an "AS IS" BASIS,
+ *   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *   See the License for the specific language governing permissions and
+ *   limitations under the License.
+ *
+ *
+ */
+
+module project-nsd
+{
+  namespace "http://riftio.com/ns/riftware-1.0/project-nsd";
+  prefix "project-nsd";
+
+  import ietf-yang-types {
+    prefix "yang";
+  }
+
+  import mano-types {
+    prefix "manotypes";
+  }
+
+  import project-vnfd {
+    prefix "project-vnfd";
+  }
+
+  import nsd-base {
+    prefix "nsd-base";
+  }
+
+  import rw-project {
+    prefix "rw-project";
+  }
+
+
+  revision 2017-02-28 {
+    description
+      "Initial revision. This YANG file defines
+       the Network Service Descriptor (NSD)
+       under projects";
+    reference
+      "Derived from earlier versions of base YANG files";
+  }
+
+
+  grouping nsd-constituent-vnfd {
+    list constituent-vnfd {
+      description
+          "List of VNFDs that are part of this
+          network service.";
+
+      key "member-vnf-index";
+
+      leaf member-vnf-index {
+        description
+          "Identifier/index for the VNFD. This separate id
+           is required to ensure that multiple VNFs can be
+           part of single NS";
+        type uint64;
+      }
+
+      leaf vnfd-id-ref {
+        description
+          "Identifier for the VNFD.";
+        type leafref {
+          path "/rw-project:project[rw-project:name = current()/../../../../rw-project:name]" +
+            "/project-vnfd:vnfd-catalog/project-vnfd:vnfd/project-vnfd:id";
+        }
+      }
+
+      leaf start-by-default {
+        description
+          "VNFD is started as part of the NS instantiation";
+        type boolean;
+        default true;
+      }
+    }
+  }
+
+  grouping nsr-nsd-constituent-vnfd {
+    list constituent-vnfd {
+      description
+          "List of VNFDs that are part of this
+          network service.";
+
+      key "member-vnf-index";
+
+      leaf member-vnf-index {
+        description
+          "Identifier/index for the VNFD. This separate id
+           is required to ensure that multiple VNFs can be
+           part of single NS";
+        type uint64;
+      }
+
+      leaf vnfd-id-ref {
+        description
+          "Identifier for the VNFD.";
+        type leafref {
+          path "/rw-project:project[rw-project:name = current()/../../../../../rw-project:name]" +
+            "/project-vnfd:vnfd-catalog/project-vnfd:vnfd/project-vnfd:id";
+        }
+      }
+
+      leaf start-by-default {
+        description
+          "VNFD is started as part of the NS instantiation";
+        type boolean;
+        default true;
+      }
+    }
+  }
+
+  grouping nsd-vld {
+    list vld {
+
+      key "id";
+
+      uses nsd-base:nsd-vld-common;
+
+      list vnfd-connection-point-ref {
+        description
+            "A list of references to connection points.";
+        key "member-vnf-index-ref vnfd-connection-point-ref";
+
+        leaf member-vnf-index-ref {
+          description "Reference to member-vnf within constituent-vnfds";
+          type leafref {
+            path "../../../constituent-vnfd/member-vnf-index";
+          }
+        }
+
+        leaf vnfd-id-ref {
+          description
+              "A reference to a vnfd. This is a
+               leafref to path:
+                   ../../constituent-vnfd
+                   + [id = current()/../id-ref]
+                   + /vnfd-id-ref
+               NOTE: An issue with confd is preventing the
+               use of xpath. Seems to be an issue with leafref
+               to leafref, whose target is in a different module.
+               Once that is resolved this will switched to use
+               leafref";
+          //type string;
+          type leafref {
+            path "../../../constituent-vnfd[member-vnf-index = current()/../member-vnf-index-ref]/vnfd-id-ref";
+          }
+        }
+
+        leaf vnfd-connection-point-ref {
+          description "A reference to a connection point name";
+          type leafref {
+            path "../../../../../project-vnfd:vnfd-catalog/project-vnfd:vnfd" +
+                 "[project-vnfd:id = current()/../vnfd-id-ref]/" +
+                 "project-vnfd:connection-point/project-vnfd:name";
+          }
+        }
+      }
+    }
+  }
+
+  grouping nsr-nsd-vld {
+    list vld {
+
+      key "id";
+
+      uses nsd-base:nsd-vld-common;
+
+      list vnfd-connection-point-ref {
+        description
+            "A list of references to connection points.";
+        key "member-vnf-index-ref vnfd-connection-point-ref";
+
+        leaf member-vnf-index-ref {
+          description "Reference to member-vnf within constituent-vnfds";
+
+          type leafref {
+            path "../../../constituent-vnfd/member-vnf-index";
+          }
+        }
+
+        leaf vnfd-id-ref {
+          description
+              "A reference to a vnfd. This is a
+               leafref to path:
+                   ../../nsd:constituent-vnfd
+                   + [nsd:id = current()/../nsd:id-ref]
+                   + /nsd:vnfd-id-ref
+               NOTE: An issue with confd is preventing the
+               use of xpath. Seems to be an issue with leafref
+               to leafref, whose target is in a different module.
+               Once that is resolved this will switched to use
+               leafref";
+          type string;
+        }
+
+        leaf vnfd-connection-point-ref {
+          description "A reference to a connection point name";
+          type leafref {
+            path "../../../../../../project-vnfd:vnfd-catalog/project-vnfd:vnfd" +
+                 "[project-vnfd:id = current()/../vnfd-id-ref]/" +
+                 "project-vnfd:connection-point/project-vnfd:name";
+          }
+        }
+      }
+    }
+  }
+
+  grouping nsd-vnf-dependency {
+    list vnf-dependency {
+      description
+          "List of VNF dependencies.";
+      key vnf-source-ref;
+      leaf vnf-source-ref {
+        type leafref {
+          path "../../../../project-vnfd:vnfd-catalog/project-vnfd:vnfd/project-vnfd:id";
+        }
+      }
+      leaf vnf-depends-on-ref {
+        description
+            "Reference to VNF that sorce VNF depends.";
+        type leafref {
+          path "../../../../project-vnfd:vnfd-catalog/project-vnfd:vnfd/project-vnfd:id";
+        }
+      }
+    }
+  }
+
+  grouping nsr-nsd-vnf-dependency {
+    list vnf-dependency {
+      description
+          "List of VNF dependencies.";
+      key vnf-source-ref;
+      leaf vnf-source-ref {
+        type leafref {
+          path "../../../../../project-vnfd:vnfd-catalog/project-vnfd:vnfd/project-vnfd:id";
+        }
+      }
+      leaf vnf-depends-on-ref {
+        description
+            "Reference to VNF that sorce VNF depends.";
+        type leafref {
+          path "../../../../../project-vnfd:vnfd-catalog/project-vnfd:vnfd/project-vnfd:id";
+        }
+      }
+    }
+  }
+
+  grouping nsd-placement-groups {
+    list placement-groups {
+      description "List of placement groups at NS level";
+
+      key "name";
+      uses manotypes:placement-group-info;
+
+      list member-vnfd {
+        description
+            "List of VNFDs that are part of this placement group";
+
+        key "member-vnf-index-ref";
+
+        leaf member-vnf-index-ref {
+          description "member VNF index of this member VNF";
+          type leafref {
+            path "../../../constituent-vnfd/member-vnf-index";
+          }
+        }
+
+        leaf vnfd-id-ref {
+          description
+              "Identifier for the VNFD.";
+          type leafref {
+            path "../../../../../project-vnfd:vnfd-catalog/project-vnfd:vnfd/project-vnfd:id";
+          }
+        }
+      }
+    }
+  }
+
+  grouping nsr-nsd-placement-groups {
+    list placement-groups {
+      description "List of placement groups at NS level";
+
+      key "name";
+      uses manotypes:placement-group-info;
+
+      list member-vnfd {
+        description
+            "List of VNFDs that are part of this placement group";
+
+        key "member-vnf-index-ref";
+
+        leaf member-vnf-index-ref {
+          description "member VNF index of this member VNF";
+          type leafref {
+            path "../../../constituent-vnfd/member-vnf-index";
+          }
+        }
+
+        leaf vnfd-id-ref {
+          description
+              "Identifier for the VNFD.";
+          type leafref {
+            path "../../../../../../project-vnfd:vnfd-catalog/project-vnfd:vnfd/project-vnfd:id";
+          }
+        }
+      }
+    }
+  }
+
+  grouping nsd-monitoring-param {
+
+    list monitoring-param {
+      key "id";
+
+      uses nsd-base:monitoring-param-common;
+
+      list vnfd-monitoring-param {
+        description "A list of VNFD monitoring params";
+        key "member-vnf-index-ref vnfd-monitoring-param-ref";
+
+        leaf vnfd-id-ref {
+          description
+            "A reference to a vnfd. This is a
+              leafref to path:
+                  ../../../../nsd:constituent-vnfd
+                  + [nsd:id = current()/../nsd:id-ref]
+                  + /nsd:vnfd-id-ref
+              NOTE: An issue with confd is preventing the
+              use of xpath. Seems to be an issue with leafref
+              to leafref, whose target is in a different module.
+              Once that is resolved this will switched to use
+              leafref";
+
+          type leafref {
+            path "../../../constituent-vnfd" +
+              "[member-vnf-index = current()/../member-vnf-index-ref]" +
+              "/vnfd-id-ref";
+          }
+        }
+
+        leaf vnfd-monitoring-param-ref {
+          description "A reference to the VNFD monitoring param";
+          type leafref {
+            path "../../../../../project-vnfd:vnfd-catalog/project-vnfd:vnfd"
+              + "[project-vnfd:id = current()/../vnfd-id-ref]"
+              + "/project-vnfd:monitoring-param/project-vnfd:id";
+          }
+        }
+
+        leaf member-vnf-index-ref {
+          description
+            "Optional reference to member-vnf within constituent-vnfds";
+          type leafref {
+            path "../../../constituent-vnfd/member-vnf-index";
+          }
+        }
+      }
+    }
+  }
+
+  grouping nsr-nsd-monitoring-param {
+    list monitoring-param {
+      key "id";
+
+      uses nsd-base:monitoring-param-common;
+
+      list vnfd-monitoring-param {
+        description "A list of VNFD monitoring params";
+        key "member-vnf-index-ref vnfd-monitoring-param-ref";
+
+        leaf vnfd-id-ref {
+          description
+            "A reference to a vnfd. This is a
+              leafref to path:
+                  ../../../../nsd:constituent-vnfd
+                  + [nsd:id = current()/../nsd:id-ref]
+                  + /nsd:vnfd-id-ref
+              NOTE: An issue with confd is preventing the
+              use of xpath. Seems to be an issue with leafref
+              to leafref, whose target is in a different module.
+              Once that is resolved this will switched to use
+              leafref";
+
+          type string;
+        }
+
+        leaf vnfd-monitoring-param-ref {
+          description "A reference to the VNFD monitoring param";
+          type leafref {
+            path "../../../../../../project-vnfd:vnfd-catalog/project-vnfd:vnfd"
+              + "[project-vnfd:id = current()/../vnfd-id-ref]"
+              + "/project-vnfd:monitoring-param/project-vnfd:id";
+          }
+        }
+
+        leaf member-vnf-index-ref {
+          description
+            "Optional reference to member-vnf within constituent-vnfds";
+          type leafref {
+            path "../../../constituent-vnfd/member-vnf-index";
+          }
+        }
+      }
+    }
+  }
+
+  grouping nsd-service-primitive {
+   list service-primitive {
+      description
+          "Network service level service primitives.";
+
+      key "name";
+
+      leaf name {
+        description
+            "Name of the service primitive.";
+        type string;
+      }
+
+      list parameter {
+        description
+            "List of parameters for the service primitive.";
+
+        key "name";
+        uses manotypes:primitive-parameter;
+      }
+
+      uses manotypes:ui-primitive-group;
+
+      list vnf-primitive-group {
+        description
+            "List of service primitives grouped by VNF.";
+
+        key "member-vnf-index-ref";
+        leaf member-vnf-index-ref {
+          description
+              "Reference to member-vnf within constituent-vnfds";
+          type leafref {
+             path "../../../constituent-vnfd/member-vnf-index";
+          }
+        }
+
+        leaf vnfd-id-ref {
+          description
+              "A reference to a vnfd. This is a leafref";
+
+          type leafref {
+             path "../../../constituent-vnfd" +
+                "[member-vnf-index = current()/../member-vnf-index-ref]" + "/vnfd-id-ref";
+          }
+        }
+
+        leaf vnfd-name {
+          description
+              "Name of the VNFD";
+          type leafref {
+              path "../../../../../project-vnfd:vnfd-catalog/project-vnfd:vnfd"
+                    + "[project-vnfd:id = current()/../vnfd-id-ref]"
+                    + "/project-vnfd:name";
+          }
+        }
+
+        list primitive {
+          key "index";
+
+          leaf index {
+            description "Index of this primitive";
+            type uint32;
+          }
+
+          leaf name {
+            description "Name of the primitive in the VNF primitive ";
+            type string;
+          }
+        }
+      }
+
+      leaf user-defined-script {
+        description
+            "A user defined script.";
+        type string;
+      }
+    }
+  }
+
+  grouping nsr-nsd-service-primitive {
+   list service-primitive {
+      description
+          "Network service level service primitives.";
+
+      key "name";
+
+      leaf name {
+        description
+            "Name of the service primitive.";
+        type string;
+      }
+
+      list parameter {
+        description
+            "List of parameters for the service primitive.";
+
+        key "name";
+        uses manotypes:primitive-parameter;
+      }
+
+      uses manotypes:ui-primitive-group;
+
+      list vnf-primitive-group {
+        description
+            "List of service primitives grouped by VNF.";
+
+        key "member-vnf-index-ref";
+        leaf member-vnf-index-ref {
+          description
+              "Reference to member-vnf within constituent-vnfds";
+          type leafref {
+             path "../../../constituent-vnfd/member-vnf-index";
+          }
+        }
+
+        leaf vnfd-id-ref {
+          description
+              "A reference to a vnfd. This is a leafref";
+
+          type leafref {
+             path "../../../constituent-vnfd" +
+                "[member-vnf-index = current()/../member-vnf-index-ref]" + "/vnfd-id-ref";
+          }
+        }
+
+        leaf vnfd-name {
+          description
+              "Name of the VNFD";
+          type leafref {
+              path "../../../../../../project-vnfd:vnfd-catalog/project-vnfd:vnfd"
+                    + "[project-vnfd:id = current()/../vnfd-id-ref]"
+                    + "/project-vnfd:name";
+          }
+        }
+
+        list primitive {
+          key "index";
+
+          leaf index {
+            description "Index of this primitive";
+            type uint32;
+          }
+
+          leaf name {
+            description "Name of the primitive in the VNF primitive ";
+            type string;
+          }
+        }
+      }
+
+      leaf user-defined-script {
+        description
+            "A user defined script.";
+        type string;
+      }
+    }
+  }
+
+  grouping nsd-descriptor {
+     uses nsd-base:nsd-descriptor-common;
+
+     uses nsd-vld;
+
+     uses nsd-constituent-vnfd;
+
+     uses nsd-placement-groups;
+
+     uses nsd-vnf-dependency;
+
+     uses nsd-monitoring-param;
+
+     uses nsd-service-primitive;
+  }
+
+  augment "/rw-project:project" {
+    container nsd-catalog {
+
+      list nsd {
+        key id;
+
+        uses nsd-descriptor;
+      }
+    }
+  }
+}
diff --git a/models/plugins/yang/project-vnfd.role.xml b/models/plugins/yang/project-vnfd.role.xml
new file mode 100644
index 0000000..8c8ee08
--- /dev/null
+++ b/models/plugins/yang/project-vnfd.role.xml
@@ -0,0 +1,37 @@
+<?xml version="1.0" ?>
+<config xmlns="http://riftio.com/ns/riftware-1.0/rw-rbac-role-def">
+  <key-definition>
+    <role>rw-project-mano:project-vnfd-role</role>
+    <key-set>
+      <name>project-name</name>
+      <path>/rw-project:project/rw-project:name</path>
+    </key-set>
+  </key-definition>
+
+  <role-definition>
+    <role>rw-project-mano:catalog-oper</role>
+    <keys-role>rw-project-mano:project-vnfd-role</keys-role>
+    <authorize>
+      <permissions>read execute</permissions>
+      <path>/rw-project:project/project-vnfd:vnfd-catalog</path>
+    </authorize>
+  </role-definition>
+
+  <role-definition>
+    <role>rw-project-mano:catalog-admin</role>
+    <keys-role>rw-project-mano:project-vnfd-role</keys-role>
+    <authorize>
+      <permissions>create read update delete execute</permissions>
+      <path>/rw-project:project/project-vnfd:vnfd-catalog</path>
+    </authorize>
+  </role-definition>
+
+  <role-definition>
+    <role>rw-project-mano:lcm-admin</role>
+    <keys-role>rw-project-mano:project-vnfd-role</keys-role>
+    <authorize>
+      <permissions>read execute</permissions>
+      <path>/rw-project:project/project-vnfd:vnfd-catalog</path>
+    </authorize>
+  </role-definition>
+</config>
diff --git a/models/plugins/yang/project-vnfd.yang b/models/plugins/yang/project-vnfd.yang
new file mode 100644
index 0000000..5342436
--- /dev/null
+++ b/models/plugins/yang/project-vnfd.yang
@@ -0,0 +1,57 @@
+
+/*
+ * 
+ *   Copyright 2017 RIFT.IO Inc
+ *
+ *   Licensed under the Apache License, Version 2.0 (the "License");
+ *   you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *       http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *   Unless required by applicable law or agreed to in writing, software
+ *   distributed under the License is distributed on an "AS IS" BASIS,
+ *   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *   See the License for the specific language governing permissions and
+ *   limitations under the License.
+ *
+ *
+ */
+
+module project-vnfd
+{
+  namespace "http://riftio.com/ns/riftware-1.0/project-vnfd";
+  prefix "project-vnfd";
+
+  import rw-project {
+    prefix "rw-project";
+  }
+
+  import vnfd-base {
+    prefix "vnfd-base";
+  }
+
+  revision 2017-02-28 {
+    description
+      "Initial revision. This YANG file defines
+       the Virtual Network Function (VNF) descriptor
+       under a project";
+    reference
+      "Derived from earlier versions of base YANG files";
+  }
+
+  augment /rw-project:project {
+    container vnfd-catalog {
+      description
+        "Virtual Network Function Descriptor (VNFD).";
+
+      list vnfd {
+        key "id";
+
+        uses vnfd-base:vnfd-descriptor;
+      }
+    }
+  }
+}
+
+// vim: sw=2
diff --git a/models/plugins/yang/rw-nsd-base.yang b/models/plugins/yang/rw-nsd-base.yang
new file mode 100644
index 0000000..bed366d
--- /dev/null
+++ b/models/plugins/yang/rw-nsd-base.yang
@@ -0,0 +1,49 @@
+
+/*
+ * 
+ *   Copyright 2016-2017 RIFT.IO Inc
+ *
+ *   Licensed under the Apache License, Version 2.0 (the "License");
+ *   you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *       http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *   Unless required by applicable law or agreed to in writing, software
+ *   distributed under the License is distributed on an "AS IS" BASIS,
+ *   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *   See the License for the specific language governing permissions and
+ *   limitations under the License.
+ *
+ *
+ */
+
+module rw-nsd-base
+{
+  namespace "http://riftio.com/ns/riftware-1.0/rw-nsd-base";
+  prefix "rw-nsd-base";
+
+  import mano-types {
+    prefix "manotypes";
+  }
+
+  revision 2017-02-28 {
+    description
+      "Initial revision. This YANG file defines
+       grouping to extend the base MANO NSD";
+    reference
+      "Derived from earlier versions of base YANG files";
+  }
+
+  grouping rw-nsd-ext {
+    uses manotypes:control-param;
+    uses manotypes:action-param;
+    leaf meta {
+      description
+        "Any meta-data needed by the UI";
+      type string;
+    }
+  }
+}
+
+// vim: sw=2
diff --git a/models/plugins/yang/rw-nsd.yang b/models/plugins/yang/rw-nsd.yang
index 4475928..13807a8 100644
--- a/models/plugins/yang/rw-nsd.yang
+++ b/models/plugins/yang/rw-nsd.yang
@@ -1,7 +1,7 @@
 
 /*
  * 
- *   Copyright 2016 RIFT.IO Inc
+ *   Copyright 2016-2017 RIFT.IO Inc
  *
  *   Licensed under the Apache License, Version 2.0 (the "License");
  *   you may not use this file except in compliance with the License.
@@ -23,16 +23,29 @@
   namespace "http://riftio.com/ns/riftware-1.0/rw-nsd";
   prefix "rw-nsd";
 
+  import rw-nsd-base {
+    prefix "rw-nsd-base";
+  }
+
+  import vnfd {
+    prefix "vnfd";
+  }
+
+  import vnfd-base {
+    prefix "vnfd-base";
+  }
+
+  import rw-vnfd {
+    prefix "rwvnfd";
+  }
+
   import nsd {
     prefix "nsd";
   }
 
-  import ietf-yang-types {
-    prefix "yang";
-  }
-
-  import mano-types {
-    prefix "manotypes";
+  revision 2017-02-28 {
+    description
+      "Update model to support projects.";
   }
 
   revision 2015-09-10 {
@@ -43,13 +56,108 @@
       "Derived from earlier versions of base YANG files";
   }
 
+  grouping nsd-config-parameter{
+    list config-parameter-map {
+      key "id";
+      description "A mapping of VNF config parameter
+                   requests and sources within this network service";
+      leaf id {
+        description "Identfier for VNF map";
+        type string;
+      }
+      container config-parameter-request {
+        leaf member-vnf-index-ref {
+          description "Reference to member-vnf within constituent-vnfds";
+          type leafref {
+            path "../../../nsd:constituent-vnfd/nsd:member-vnf-index";
+          }
+        }
+        leaf vnfd-id-ref {
+          description
+              "A reference to a vnfd.";
+          
+          type leafref {
+            path "../../../nsd:constituent-vnfd[nsd:member-vnf-index = current()/../member-vnf-index-ref]/nsd:vnfd-id-ref";
+          }
+        }
+        leaf config-parameter-request-ref {
+          description "Reference to the request in  the VNF
+                       with the specified member-vnf-index";
+          type leafref {
+            path
+              "/vnfd:vnfd-catalog/vnfd:vnfd[vnfd:id = current()/../vnfd-id-ref]" +
+              "/rwvnfd:config-parameter/rwvnfd:config-parameter-request/rwvnfd:name";
+          }
+        }
+      }
+      container config-parameter-source {
+        leaf member-vnf-index-ref {
+          description "Reference to member-vnf within constituent-vnfds";
+          type leafref {
+            path "../../../nsd:constituent-vnfd/nsd:member-vnf-index";
+          }
+        }
+        leaf vnfd-id-ref {
+          description
+              "A reference to a vnfd.";
+          type leafref {
+            path "../../../nsd:constituent-vnfd[nsd:member-vnf-index = current()/../member-vnf-index-ref]/nsd:vnfd-id-ref";
+          }
+        }
+        leaf config-parameter-source-ref {
+          description "Reference to the source in the VNF
+                       with the specified member-vnf-index";
+          type leafref {
+            path
+              "/vnfd:vnfd-catalog/vnfd:vnfd[vnfd:id = current()/../vnfd-id-ref]" +
+              "/rwvnfd:config-parameter/rwvnfd:config-parameter-source/rwvnfd:name";
+          }
+        }
+      }
+    }
+  }
+
   augment /nsd:nsd-catalog/nsd:nsd {
-    uses manotypes:control-param;
-    uses manotypes:action-param;
-    leaf meta {
-      description
-        "Any meta-data needed by the UI";
+    uses rw-nsd-base:rw-nsd-ext;
+    uses nsd-config-parameter;
+  }
+
+  augment /nsd:nsd-catalog/nsd:nsd/nsd:service-primitive/nsd:parameter {
+    leaf out {
+      description "If this is an output of the primitive execution";
+      type boolean;
+      default false;
+    }
+  }
+
+  augment /nsd:nsd-catalog/nsd:nsd/nsd:service-primitive/nsd:parameter-group/nsd:parameter {
+    leaf out {
+      description "If this is an output of the primitive execution";
+      type boolean;
+      default false;
+    }
+  }
+
+  augment /nsd:nsd-catalog/nsd:nsd/nsd:vld {
+    leaf ipv4-nat-pool-name{
       type string;
+      description "IPV4 nat pool name";
+    }
+
+    list virtual-connection-points {
+      description
+        "A list of virtual-connection points associated with Virtual Link.
+             These connection points are not directly associated with any VNFs";
+      key name;
+      uses vnfd-base:common-connection-point;
+
+      leaf-list associated-cps {
+        description
+          "A List of connection points associated with virtual connection point";
+        type leafref {
+          path "../../nsd:vnfd-connection-point-ref/nsd:vnfd-connection-point-ref";
+        }
+      }
     }
   }
 }
diff --git a/models/plugins/yang/rw-nsr.tailf.yang b/models/plugins/yang/rw-nsr.tailf.yang
index 3b7588a..08d0006 100644
--- a/models/plugins/yang/rw-nsr.tailf.yang
+++ b/models/plugins/yang/rw-nsr.tailf.yang
@@ -1,7 +1,7 @@
 
 /*
  * 
- *   Copyright 2016 RIFT.IO Inc
+ *   Copyright 2016-2017 RIFT.IO Inc
  *
  *   Licensed under the Apache License, Version 2.0 (the "License");
  *   you may not use this file except in compliance with the License.
@@ -35,11 +35,11 @@
     prefix nsr;
   }
 
-  tailf:annotate "/nsr:ns-instance-opdata/nsr:nsr/rw-nsr:operational-events" {
-    tailf:callpoint rw_callpoint;
+  import rw-project {
+    prefix "rw-project";
   }
 
-  tailf:annotate "/nsr:ns-instance-opdata/rw-nsr:nsd-ref-count" {
+  tailf:annotate "/rw-project:project/nsr:ns-instance-opdata/nsr:nsr/rw-nsr:operational-events" {
     tailf:callpoint rw_callpoint;
   }
 }
diff --git a/models/plugins/yang/rw-nsr.yang b/models/plugins/yang/rw-nsr.yang
index 472332e..2766a5c 100644
--- a/models/plugins/yang/rw-nsr.yang
+++ b/models/plugins/yang/rw-nsr.yang
@@ -1,7 +1,7 @@
 
 /*
- *
- *   Copyright 2016 RIFT.IO Inc
+ * 
+ *   Copyright 2016-2017 RIFT.IO Inc
  *
  *   Licensed under the Apache License, Version 2.0 (the "License");
  *   you may not use this file except in compliance with the License.
@@ -22,7 +22,7 @@
 {
   namespace "http://riftio.com/ns/riftware-1.0/rw-nsr";
   prefix "rw-nsr";
-
+ 
   import mano-types {
     prefix "manotypes";
   }
@@ -35,10 +35,34 @@
     prefix "nsd";
   }
 
+  import project-vnfd {
+    prefix "project-vnfd";
+  }
+
+  import project-nsd {
+    prefix "project-nsd";
+  }
+
+  import rw-project-vnfd {
+    prefix "rw-project-vnfd";
+  }
+
+  import vnfd-base {
+    prefix "vnfd-base";
+  }
+
+  import mano-rift-groupings {
+    prefix "mano-rift";
+  }
+
   import rw-cloud {
     prefix "rw-cloud";
   }
 
+  import rw-ro-account {
+  	prefix "rw-ro-account";
+  }
+  
   import rw-config-agent {
     prefix "rw-config-agent";
   }
@@ -47,9 +71,18 @@
     prefix "rw-sdn";
   }
 
+  import rw-project {
+    prefix "rw-project";
+  }
+	
   import ietf-yang-types {
     prefix "yang";
   }
+  
+  revision 2017-02-08 {
+    description
+      "Update model to support projects.";
+  }
 
   revision 2015-09-10 {
     description
@@ -97,26 +130,8 @@
 
 
   grouping rw-ns-instance-config {
-    leaf cloud-account {
-      description
-        "The configured cloud account which the NSR is instantiated within.
-         All VDU's, Virtual Links, and provider networks will be requested
-         using the cloud-account's associated CAL instance";
-      type leafref {
-        path "/rw-cloud:cloud/rw-cloud:account/rw-cloud:name";
-      }
-    }
 
-    leaf om-datacenter {
-      description
-        "Openmano datacenter name to use when instantiating
-         the network service.  This is only used when openmano
-         is selected as the cloud account.  This should be superceded
-         by multiple cloud accounts when that becomes available.";
-      type string;
-    }
-
-    list vnf-cloud-account-map {
+    list vnf-datacenter-map {
       description
           "Mapping VNF to Cloud Account where VNF will be instantiated";
 
@@ -125,22 +140,10 @@
         type uint64;
       }
 
-      leaf cloud-account {
+      leaf datacenter {
         description
-            "The configured cloud account where VNF is instantiated within.
-            All VDU's, Virtual Links, and provider networks will be requested
-            using the cloud-account's associated CAL instance";
-        type leafref {
-          path "/rw-cloud:cloud/rw-cloud:account/rw-cloud:name";
-        }
-      }
-
-      leaf om-datacenter {
-        description
-            "Openmano datacenter name to use when instantiating
-            the network service.  This is only used when openmano
-            is selected as the cloud account.  This should be superceded
-            by multiple cloud accounts when that becomes available.";
+            "datacenter name to use when instantiating
+            the network service.";
         type string;
       }
 
@@ -150,12 +153,13 @@
           The configuration for this VNF will be driven using the specified config
           agent account";
         type leafref {
-          path "/rw-config-agent:config-agent/rw-config-agent:account/rw-config-agent:name";
+          path "../../../../rw-config-agent:config-agent/" +
+            "rw-config-agent:account/rw-config-agent:name";
         }
       }
     }
 
-    list vl-cloud-account-map {
+    list vl-datacenter-map {
       description
           "Mapping VL to Cloud Account where VL will be instantiated";
 
@@ -168,46 +172,71 @@
         type string;
       }
 
-      leaf-list cloud-accounts {
+      leaf-list datacenters {
         description
-            "The configured list of cloud accounts where VL is instantiated.
-            All VDU's, Virtual Links, and provider networks will be requested
-            using the cloud-account's associated CAL instance";
-        type leafref {
-          path "/rw-cloud:cloud/rw-cloud:account/rw-cloud:name";
-        }
-      }
-
-      leaf-list om-datacenters {
-        description
-            "Openmano datacenter names to use when instantiating
-            the VLs. This is only used when openmano
-            is selected as the cloud account.  This should be superceded
-            by multiple cloud accounts when that becomes available.";
+            "datacenter names to use when instantiating
+            the VLs.";
         type string;
       }
     }
-  }
+    
+		leaf resource-orchestrator {
+			description
+					"Resource Orchestrator to use when instantiating the VNF.";
+			type leafref {
+				path "../../../rw-ro-account:ro-account/rw-ro-account:account/rw-ro-account:name";	
+			}
+    }
+    
+    leaf datacenter {
+      description
+        "datacenter name to use when instantiating
+         the network service.";
+      type string;
+    }
+    
+	}
 
 
-  augment /nsr:ns-instance-config/nsr:nsr {
+  augment /rw-project:project/nsr:ns-instance-config/nsr:nsr {
     uses rw-ns-instance-config;
   }
 
-  augment /nsr:start-network-service/nsr:input{
-    uses rw-ns-instance-config;
-  }
-
-  augment /nsr:ns-instance-opdata/nsr:nsr {
+  augment /rw-project:project/nsr:ns-instance-opdata/nsr:nsr {
     uses manotypes:action-param;
     uses manotypes:control-param;
 
+    container orchestration-progress {
+      container vms {
+        leaf active {
+          type uint32;
+          default 0;
+        }
+
+        leaf total {
+          type uint32;
+          default 0;
+        }
+      }
+      container networks {
+        leaf active {
+          type uint32;
+          default 0;
+        }
+
+        leaf total {
+          type uint32;
+          default 0;
+        } 
+      }  
+    }
+
     leaf sdn-account {
       description
         "The SDN account associted with the cloud account using which an
          NS was instantiated.";
       type leafref {
-        path "/rw-sdn:sdn/rw-sdn:account/rw-sdn:name";
+        path "../../../rw-sdn:sdn/rw-sdn:account/rw-sdn:name";
       }
     }
 
@@ -359,50 +388,103 @@
     uses operational-events;
   }
 
+  grouping project-nsr-nsd-config-parameter{
+    list config-parameter-map {
+      key "id";
+      description "A mapping of VNF config parameter
+                   requests and sources within this network service";
+      leaf id {
+        description "Identfier for VNF map";
+        type string;
+      }
+      container config-parameter-request {
 
-  augment /nsr:ns-instance-opdata/nsr:nsr/nsr:vlr {
+        leaf member-vnf-index-ref {
+          description "Reference to member-vnf within constituent-vnfds";
+          type leafref {
+            path "../../../nsr:constituent-vnfd/nsr:member-vnf-index";
+          }
+        }
+
+        leaf vnfd-id-ref {
+          description
+              "A reference to a vnfd. This is a
+               leafref to path:
+                   ../../nsr:constituent-vnfd
+                   + [nsr:id = current()/../id-ref]
+                   + /vnfd-id-ref";
+
+          type leafref {
+            path "../../../nsr:constituent-vnfd[nsr:member-vnf-index = current()/../member-vnf-index-ref]/nsr:vnfd-id-ref";
+          }
+        }
+        leaf config-parameter-request-ref {
+          description "Reference to the request in  the VNF
+                       with the specified member-vnf-index";
+          type leafref {
+            path "../../../../../.." +
+              "/project-vnfd:vnfd-catalog/project-vnfd:vnfd[project-vnfd:id = current()/../vnfd-id-ref]" +
+              "/rw-project-vnfd:config-parameter/rw-project-vnfd:config-parameter-request/rw-project-vnfd:name";
+          }
+        }
+      }
+      container config-parameter-source {
+
+        leaf member-vnf-index-ref {
+          description "Reference to member-vnf within constituent-vnfds";
+          type leafref {
+            path "../../../nsr:constituent-vnfd/nsr:member-vnf-index";
+          }
+        }
+
+        leaf vnfd-id-ref {
+          description
+              "A reference to a vnfd. This is a
+               leafref to path:
+                   ../../nsd:constituent-vnfd
+                   + [nsd:id = current()/../nsd:id-ref]
+                   + /nsd:vnfd-id-ref";
+
+          type leafref {
+            path "../../../nsr:constituent-vnfd[nsr:member-vnf-index = current()/../member-vnf-index-ref]/nsr:vnfd-id-ref";
+          }
+        }
+        leaf config-parameter-source-ref {
+          description "Reference to the source in the VNF
+                       with the specified member-vnf-index";
+          type leafref {
+            path "../../../../../.." +
+              "/project-vnfd:vnfd-catalog/project-vnfd:vnfd[project-vnfd:id = current()/../vnfd-id-ref]" +
+              "/rw-project-vnfd:config-parameter/rw-project-vnfd:config-parameter-source/rw-project-vnfd:name";
+          }
+        }
+      }
+    }
+  }
+
+  augment /rw-project:project/nsr:ns-instance-opdata/nsr:nsr/nsr:vlr {
     leaf assigned-subnet {
       description "Subnet added for the VL";
       type string;
     }
-    leaf cloud-account {
+    leaf datacenter {
       description
-        "The configured cloud account in which the VL is instantiated within.";
-      type leafref {
-        path "/rw-cloud:cloud/rw-cloud:account/rw-cloud:name";
-      }
-    }
-    leaf om-datacenter {
-      description
-        "Openmano datacenter name to use when instantiating
-         the network service.  This is only used when openmano
-         is selected as the cloud account.  This should be superceded
-         by multiple cloud accounts when that becomes available.";
+        "Datacenter name to use when instantiating
+         the network service.  ";
       type string;
     }
   }
 
-  augment /nsr:ns-instance-opdata/nsr:nsr/nsr:constituent-vnfr-ref {
-    leaf cloud-account {
+  augment /rw-project:project/nsr:ns-instance-opdata/nsr:nsr/nsr:constituent-vnfr-ref {
+    leaf datacenter {
       description
-        "The configured cloud account in which the VNF is instantiated within.
-         All VDU's, Virtual Links, and provider networks will be requested
-         using the cloud-account's associated CAL instance";
-      type leafref {
-        path "/rw-cloud:cloud/rw-cloud:account/rw-cloud:name";
-      }
-    }
-    leaf om-datacenter {
-      description
-        "Openmano datacenter name to use when instantiating
-         the network service.  This is only used when openmano
-         is selected as the cloud account.  This should be superceded
-         by multiple cloud accounts when that becomes available.";
+        "Datacenter name to use when instantiating
+         the network service.";
       type string;
     }
   }
 
-  augment /nsr:ns-instance-config {
+  augment /rw-project:project/nsr:ns-instance-config {
     leaf nfvi-polling-period {
       description
         "Defines the period (secons) that the NFVI metrics are polled at";
@@ -411,6 +493,90 @@
     }
   }
 
+  augment /rw-project:project/nsr:ns-instance-config/nsr:nsr/nsr:nsd/nsr:vld {
+    leaf ipv4-nat-pool-name{
+      type string;
+      description "IPV4 nat pool name";
+    }
+    
+    list virtual-connection-points {
+      description
+        "A list of virtual-connection points associated with Virtual Link.
+             These connection points are not directly associated with any VNFs";
+      key name;
+      uses vnfd-base:common-connection-point;
+
+      leaf-list associated-cps {
+        description
+          "A List of connection points associated with virtual connection point";
+        type leafref {
+          path "../../nsr:vnfd-connection-point-ref/nsr:vnfd-connection-point-ref";
+        }
+      }
+    }
+  }
+
+  augment /rw-project:project/nsr:ns-instance-config/nsr:nsr/nsr:nsd {
+    uses project-nsr-nsd-config-parameter;
+  }
+
+  augment /rw-project:project/nsr:ns-instance-config/nsr:nsr {
+    list vnf-input-parameter {
+      description
+        "List of input parameters for Constituent VNFs that can be specified when 
+         instantiating a network service.";
+
+      key "member-vnf-index-ref vnfd-id-ref";
+
+      leaf member-vnf-index-ref {
+        description "Reference to member-vnf within constituent-vnfds";
+        type leafref {
+          path "../../nsr:nsd/nsr:constituent-vnfd/nsr:member-vnf-index";
+        }
+      }
+
+      leaf vnfd-id-ref {
+        description
+      "A reference to a VNFD";
+        type leafref {
+          path "../../nsr:nsd/nsr:constituent-vnfd/nsr:vnfd-id-ref";
+        }
+      }
+      
+      uses manotypes:input-parameter;
+    }
+  }
+
+  augment /rw-project:project/nsr:ns-instance-opdata/nsr:nsr {
+    uses mano-rift:ssh-key-generated;
+  }
+
+
+  grouping leaf-out {
+    leaf out {
+      description "If this is an output of the primitive execution";
+      type boolean;
+      default false;
+    }
+  }
+
+
+  augment /rw-project:project/nsr:ns-instance-config/nsr:nsr/nsr:nsd/nsr:service-primitive/nsr:parameter {
+    uses leaf-out;
+  }
+
+  augment /rw-project:project/nsr:ns-instance-config/nsr:nsr/nsr:nsd/nsr:service-primitive/nsr:parameter-group/nsr:parameter {
+    uses leaf-out;
+  }
+
+  augment /rw-project:project/nsr:ns-instance-opdata/nsr:nsr/nsr:service-primitive/nsr:parameter {
+    uses leaf-out;
+  }
+
+  augment /rw-project:project/nsr:ns-instance-opdata/nsr:nsr/nsr:service-primitive/nsr:parameter-group/nsr:parameter {
+    uses leaf-out;
+  }
+
   notification nsm-notification {
     description "Notification for NSM Events.
         The timestamp of this event is automatically expressed
diff --git a/models/plugins/yang/rw-project-nsd.yang b/models/plugins/yang/rw-project-nsd.yang
new file mode 100644
index 0000000..4d3813e
--- /dev/null
+++ b/models/plugins/yang/rw-project-nsd.yang
@@ -0,0 +1,176 @@
+
+/*
+ * 
+ *   Copyright 2017 RIFT.IO Inc
+ *
+ *   Licensed under the Apache License, Version 2.0 (the "License");
+ *   you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *       http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *   Unless required by applicable law or agreed to in writing, software
+ *   distributed under the License is distributed on an "AS IS" BASIS,
+ *   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *   See the License for the specific language governing permissions and
+ *   limitations under the License.
+ *
+ *
+ */
+
+module rw-project-nsd
+{
+  namespace "http://riftio.com/ns/riftware-1.0/rw-project-nsd";
+  prefix "rw-project-nsd";
+
+  import rw-nsd-base {
+    prefix "rw-nsd-base";
+  }
+
+  import project-nsd {
+    prefix "project-nsd";
+  }
+
+  import project-vnfd {
+    prefix "project-vnfd";
+  }
+
+  import rw-project-vnfd {
+    prefix "rw-project-vnfd";
+  }
+
+  import vnfd-base {
+    prefix "vnfd-base";
+  }
+
+  import rw-project {
+    prefix "rw-project";
+  }
+
+  revision 2017-02-28 {
+    description
+      "Initial revision. This YANG file augments
+       the base MANO NSD";
+    reference
+      "Derived from earlier versions of base YANG files";
+  }
+
+  grouping project-nsd-config-parameter{
+    list config-parameter-map {
+      key "id";
+      description "A mapping of VNF config parameter
+                   requests and sources within this network service";
+      leaf id {
+        description "Identfier for VNF map";
+        type string;
+      }
+      container config-parameter-request {
+        leaf member-vnf-index-ref {
+          description "Reference to member-vnf within constituent-vnfds";
+          type leafref {
+            path "../../../project-nsd:constituent-vnfd/project-nsd:member-vnf-index";
+          }
+        }
+        leaf vnfd-id-ref {
+          description
+              "A reference to a vnfd. This is a
+               leafref to path:
+                   ../../project-nsd:constituent-vnfd
+                   + [project-nsd:id = current()/../id-ref]
+                   + /project-nsd:vnfd-id-ref";
+
+          type leafref {
+            path "../../../project-nsd:constituent-vnfd[project-nsd:member-vnf-index = current()/../member-vnf-index-ref]/project-nsd:vnfd-id-ref";
+          }
+        }
+        leaf config-parameter-request-ref {
+          description "Reference to the request in  the VNF
+                       with the specified member-vnf-index";
+          type leafref {
+            path "../../../../.." +
+              "/project-vnfd:vnfd-catalog/project-vnfd:vnfd[project-vnfd:id = current()/../vnfd-id-ref]" +
+              "/rw-project-vnfd:config-parameter/rw-project-vnfd:config-parameter-request/rw-project-vnfd:name";
+          }
+        }
+      }
+      container config-parameter-source {
+        leaf member-vnf-index-ref {
+          description "Reference to member-vnf within constituent-vnfds";
+          type leafref {
+            path "../../../project-nsd:constituent-vnfd/project-nsd:member-vnf-index";
+          }
+        }
+        leaf vnfd-id-ref {
+          description
+              "A reference to a vnfd. This is a
+               leafref to path:
+                   ../../project-nsd:constituent-vnfd
+                   + [project-nsd:id = current()/../id-ref]
+                   + /project-nsd:vnfd-id-ref";
+
+          type leafref {
+            path "../../../project-nsd:constituent-vnfd[project-nsd:member-vnf-index = current()/../member-vnf-index-ref]/project-nsd:vnfd-id-ref";
+          }
+        }
+        leaf config-parameter-source-ref {
+          description "Reference to the source in the VNF
+                       with the specified member-vnf-index";
+          type leafref {
+            path "../../../../.." +
+              "/project-vnfd:vnfd-catalog/project-vnfd:vnfd[project-vnfd:id = current()/../vnfd-id-ref]" +
+              "/rw-project-vnfd:config-parameter/rw-project-vnfd:config-parameter-source/rw-project-vnfd:name";
+          }
+        }
+      }
+    }
+  }
+
+  augment /rw-project:project/project-nsd:nsd-catalog/project-nsd:nsd {
+    uses rw-nsd-base:rw-nsd-ext;
+  }
+
+  augment /rw-project:project/project-nsd:nsd-catalog/project-nsd:nsd/project-nsd:service-primitive/project-nsd:parameter {
+    leaf out {
+      description "If this is an output of the primitive execution";
+      type boolean;
+      default false;
+    }
+  }
+
+  augment /rw-project:project/project-nsd:nsd-catalog/project-nsd:nsd/project-nsd:service-primitive/project-nsd:parameter-group/project-nsd:parameter {
+    leaf out {
+      description "If this is an output of the primitive execution";
+      type boolean;
+      default false;
+    }
+  }
+
+  augment /rw-project:project/project-nsd:nsd-catalog/project-nsd:nsd/project-nsd:vld {
+    leaf ipv4-nat-pool-name{
+      type string;
+      description "IPV4 nat pool name";
+    }
+    
+    list virtual-connection-points {
+      description
+        "A list of virtual-connection points associated with Virtual Link.
+             These connection points are not directly associated with any VNFs";
+      key name;
+      uses vnfd-base:common-connection-point;
+
+      leaf-list associated-cps {
+        description
+          "A List of connection points associated with virtual connection point";
+        type leafref {
+          path "../../project-nsd:vnfd-connection-point-ref/project-nsd:vnfd-connection-point-ref";
+        }
+      }
+    }
+  }
+
+  augment /rw-project:project/project-nsd:nsd-catalog/project-nsd:nsd {
+    uses project-nsd-config-parameter;
+  }
+}
+
+// vim: sw=2
diff --git a/models/plugins/yang/rw-project-vnfd.yang b/models/plugins/yang/rw-project-vnfd.yang
new file mode 100644
index 0000000..bb23af4
--- /dev/null
+++ b/models/plugins/yang/rw-project-vnfd.yang
@@ -0,0 +1,294 @@
+
+/*
+ * 
+ *   Copyright 2016-2017 RIFT.IO Inc
+ *
+ *   Licensed under the Apache License, Version 2.0 (the "License");
+ *   you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *       http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *   Unless required by applicable law or agreed to in writing, software
+ *   distributed under the License is distributed on an "AS IS" BASIS,
+ *   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *   See the License for the specific language governing permissions and
+ *   limitations under the License.
+ *
+ *
+ */
+
+module rw-project-vnfd
+{
+  namespace "http://riftio.com/ns/riftware-1.0/rw-project-vnfd";
+  prefix "rw-project-vnfd";
+
+  import project-vnfd {
+    prefix "project-vnfd";
+  }
+
+  import ietf-inet-types {
+    prefix "inet";
+  }
+
+  import rw-vnfd-base {
+    prefix "rw-vnfd-base";
+  }
+
+  import vnfd {
+    prefix "vnfd";
+  }
+
+  import vnfd-base {
+    prefix "vnfd-base";
+  }
+
+  import rw-project {
+    prefix "rw-project";
+  }
+
+  import mano-rift-groupings {
+    prefix "mano-rift";
+  }
+
+  import mano-types {
+    prefix "manotypes";
+  }
+
+  revision 2017-02-28 {
+    description
+      "Initial revision. This YANG file augments
+       the base MANO VNFD";
+    reference
+      "Derived from earlier versions of base YANG files";
+  }
+
+  grouping vnfd-config-parameter {
+    container config-parameter {
+      description
+        "List of VNF config parameter requests and sources";
+      list config-parameter-source {
+        description "The list of parameters exposed by this VNF";
+        key "name";
+
+        leaf name {
+          description "Name of the source";
+          type string {
+            length "1..128";
+          }
+        }
+
+        leaf description {
+          description " Description of the source";
+          type string;
+        }
+
+        choice source {
+          case descriptor {
+            leaf descriptor {
+              description
+                "Location of this source as an xpath.
+                 For example:
+                   ../../../mgmt-interface/port";
+              type string;
+            }
+          }
+
+          case attribute {
+            leaf attribute {
+              description
+                "Location of this source as runtime attribute.
+                 The value is <xpath>, <attribute_name>
+                 For example:
+                   ../../../mgmt-interface, ip-address
+                   which retruns the ip-address assigned to the
+                   mgmt-interface after VNF instantiation.";
+              type string;
+            }
+          }
+
+          case primitive-ref {
+            leaf config-primitive-name-ref {
+              description
+                "A leafref to configuration primitive.
+                 This refers to a config parameter whose
+                 output parameter is referred in out-parameter.";
+              type leafref {
+                path "../../../project-vnfd:vnf-configuration/project-vnfd:config-primitive/project-vnfd:name";
+              }
+            }
+
+            leaf parameter-ref {
+              description
+                "Name of the output parameter in the config primitiive";
+              type leafref {
+                path
+                  "../../../project-vnfd:vnf-configuration/project-vnfd:config-primitive[project-vnfd:name=current()/../config-primitive-name-ref]/project-vnfd:parameter/project-vnfd:name";
+              }
+            }
+          }
+
+          case value {
+            leaf value {
+              description
+                "Pre-defined value to be used for this source";
+              type string;
+            }
+          }
+        }
+
+        list parameter {
+          key "config-primitive-name-ref";
+
+          leaf config-primitive-name-ref {
+            description
+              "Name of the configuration primitive where this
+             request will used";
+            type leafref {
+              path "../../../../project-vnfd:vnf-configuration/project-vnfd:config-primitive/project-vnfd:name";
+            }
+          }
+
+          leaf config-primitive-parameter-ref {
+            description
+              "Parameter name of the config primitive";
+            type leafref {
+              path "../../../../project-vnfd:vnf-configuration/project-vnfd:config-primitive[project-vnfd:name=current()/../config-primitive-name-ref]/project-vnfd:parameter/project-vnfd:name";
+            }
+          }
+        }
+      }
+
+      list config-parameter-request {
+        description "The list of requests for this VNF";
+        key "name";
+
+        leaf name {
+          description "Name of this parameter request";
+          type string {
+            length "1..128";
+          }
+        }
+
+        leaf description {
+          description "Description of this request";
+          type string;
+        }
+
+        list parameter {
+          key "config-primitive-name-ref";
+
+          leaf config-primitive-name-ref {
+            description
+              "Name of the configuration primitive where this
+             request will used";
+            type leafref {
+              path "../../../../project-vnfd:vnf-configuration/project-vnfd:config-primitive/project-vnfd:name";
+            }
+          }
+
+          leaf config-primitive-parameter-ref {
+            description
+              "Parameter name of the config primitive";
+            type leafref {
+              path "../../../../project-vnfd:vnf-configuration/project-vnfd:config-primitive[project-vnfd:name=current()/../config-primitive-name-ref]/project-vnfd:parameter/project-vnfd:name";
+            }
+          }
+        }
+      }
+    }
+  }
+
+  augment /rw-project:project/project-vnfd:vnfd-catalog/project-vnfd:vnfd {
+    uses rw-vnfd-base:rw-vnfd-ext;
+    uses vnfd-config-parameter;
+  }
+
+  augment /rw-project:project/project-vnfd:vnfd-catalog/project-vnfd:vnfd/project-vnfd:mgmt-interface {
+    uses rw-vnfd-base:ssh-key;
+  }
+
+  augment /rw-project:project/project-vnfd:vnfd-catalog/project-vnfd:vnfd/project-vnfd:http-endpoint {
+    uses mano-rift:http-end-point-additions;
+  }
+
+  augment /rw-project:project/project-vnfd:vnfd-catalog/project-vnfd:vnfd/project-vnfd:vdu/project-vnfd:supplemental-boot-data {
+    uses mano-rift:custom-meta-data;
+  }
+
+  augment /rw-project:project/project-vnfd:vnfd-catalog/project-vnfd:vnfd/project-vnfd:vdu/project-vnfd:volumes {
+    uses mano-rift:volume-info-additions;
+    uses mano-rift:custom-meta-data;
+  }
+
+  augment /rw-project:project/project-vnfd:vnfd-catalog/project-vnfd:vnfd/project-vnfd:vdu/project-vnfd:interface {
+    leaf static-ip-address {
+      description "Static IP address for the connection point";
+      type inet:ip-address;
+    }
+
+    leaf floating-ip-needed{
+      type boolean;
+      default "false";
+      description 
+        "Sole purpose of this field is to facilitate translation of VNFD 
+              to other VNFMs";
+    }
+  } 
+
+  augment /rw-project:project/project-vnfd:vnfd-catalog/project-vnfd:vnfd/project-vnfd:vdu/project-vnfd:volumes/project-vnfd:volume-source {
+    case volume {
+      leaf volume-ref {
+        description "Reference for pre-existing volume in VIM";
+        type string;
+      }
+    }
+  }
+
+  augment /rw-project:project/project-vnfd:vnfd-catalog/project-vnfd:vnfd/project-vnfd:vnf-configuration/project-vnfd:initial-config-primitive/project-vnfd:primitive-type {
+    case primitive-ref {
+      leaf config-primitive-ref {
+        description
+          "Reference to a config primitive name.
+           NOTE: The config primitive referred should have
+                 all the input parameters predefined either
+                 with default values or dependency references.";
+        type leafref {
+          path "../../project-vnfd:config-primitive/project-vnfd:name";
+        }
+      }
+    }
+  }
+
+  augment /rw-project:project/project-vnfd:vnfd-catalog/project-vnfd:vnfd/project-vnfd:internal-vld {
+    list virtual-connection-points {
+      description
+          "A list of virtual-connection points associated with Virtual Link.
+         These connection points are not directly associated with any VDUs";
+      key name;
+      uses vnfd-base:common-connection-point;
+
+      leaf-list associated-cps {
+        description
+            "A List of connection points associated with virtual connection point";
+        type leafref {
+          path "../../project-vnfd:internal-connection-point/project-vnfd:id-ref";
+        }
+      }
+    }
+  }
+
+  augment /rw-project:project/project-vnfd:vnfd-catalog/project-vnfd:vnfd/project-vnfd:vdu/project-vnfd:vm-flavor {
+  	uses manotypes:vm-flavor-name;
+  }
+
+  augment /rw-project:project/project-vnfd:vnfd-catalog/project-vnfd:vnfd/project-vnfd:vnf-configuration/project-vnfd:config-primitive/project-vnfd:parameter {
+    leaf out {
+      description "If this is an output of the primitive execution";
+      type boolean;
+      default false;
+    }
+  }
+  
+}
+// vim: sw=2
diff --git a/models/plugins/yang/rw-vlr.yang b/models/plugins/yang/rw-vlr.yang
index 755bb81..65679b2 100644
--- a/models/plugins/yang/rw-vlr.yang
+++ b/models/plugins/yang/rw-vlr.yang
@@ -1,7 +1,7 @@
 
 /*
  * 
- *   Copyright 2016 RIFT.IO Inc
+ *   Copyright 2016-2017 RIFT.IO Inc
  *
  *   Licensed under the Apache License, Version 2.0 (the "License");
  *   you may not use this file except in compliance with the License.
@@ -27,10 +27,18 @@
     prefix "manotypes";
   }
 
+  import ietf-inet-types {
+    prefix "inet";
+  }
+
   import vlr {
     prefix "vlr";
   }
 
+  import vnfd-base {
+    prefix "vnfd-base";
+  }
+
   import rw-cloud {
     prefix "rw-cloud";
   }
@@ -39,6 +47,15 @@
     prefix "yang";
   }
 
+  import rw-project {
+    prefix "rw-project";
+  }
+
+  revision 2017-02-08 {
+    description
+      "Update model to support projects.";
+  }
+
   revision 2015-09-30 {
     description
       "Initial revision. This YANG file augments
@@ -47,21 +64,12 @@
       "Derived from earlier versions of base YANG files";
   }
 
-  augment /vlr:vlr-catalog/vlr:vlr {
-    leaf cloud-account {
+  augment /rw-project:project/vlr:vlr-catalog/vlr:vlr {
+
+    leaf datacenter {
       description
-        "The cloud account to use when requesting resources for
-         this vlr";
-      type leafref {
-        path "/rw-cloud:cloud/rw-cloud:account/rw-cloud:name";
-      }
-    }
-    leaf om-datacenter {
-      description
-          "Openmano datacenter name to use when instantiating
-          the network service.  This is only used when openmano
-          is selected as the cloud account.  This should be superceded
-          by multiple cloud accounts when that becomes available.";
+          "Datacenter name to use when instantiating
+          the network service.";
       type string;
     }
 
@@ -81,6 +89,29 @@
         "The error message in case of a failed VLR operational status";
       type string;
     }
+
+    list virtual-connection-points {
+      key name;
+      uses vnfd-base:common-connection-point;
+
+      leaf-list associated-cps {
+        type string;
+      }
+
+      leaf connection-point-id {
+        description "VIM identifier for connection point";
+        type string;
+      }
+      
+      leaf ip-address {
+        description "IP Address of virtual connection point";
+        type inet:ip-address;
+      }
+      leaf mac-address {
+        description "MAC Address of the virtual connection point";
+        type string;
+      }
+    }
   }
 }
 
diff --git a/models/plugins/yang/rw-vnfd-base.yang b/models/plugins/yang/rw-vnfd-base.yang
new file mode 100644
index 0000000..3c87eb9
--- /dev/null
+++ b/models/plugins/yang/rw-vnfd-base.yang
@@ -0,0 +1,67 @@
+
+/*
+ * 
+ *   Copyright 2016-2017 RIFT.IO Inc
+ *
+ *   Licensed under the Apache License, Version 2.0 (the "License");
+ *   you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *       http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *   Unless required by applicable law or agreed to in writing, software
+ *   distributed under the License is distributed on an "AS IS" BASIS,
+ *   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *   See the License for the specific language governing permissions and
+ *   limitations under the License.
+ *
+ *
+ */
+
+module rw-vnfd-base
+{
+  namespace "http://riftio.com/ns/riftware-1.0/rw-vnfd-base";
+  prefix "rw-vnfd-base";
+
+  import vnfd {
+    prefix "vnfd";
+  }
+
+  import rwvcs-types {
+    prefix "rwvcstypes";
+  }
+
+  import ietf-yang-types {
+    prefix "yang";
+  }
+
+  import mano-types {
+    prefix "manotypes";
+  }
+
+  revision 2017-02-28 {
+    description
+      "Initial revision. This YANG file defines
+       common structs for extending MANO VNFD";
+    reference
+      "Derived from earlier versions of base YANG files";
+  }
+
+  grouping rw-vnfd-ext {
+    leaf meta {
+      description
+        "Any meta-data needed by the UI";
+      type string;
+    }
+
+  }
+  grouping ssh-key {
+    leaf ssh-key {
+      description
+        "Whether SSH keys need to be generated and passed
+         to the RO and VCA during instantiation.";
+      type boolean;
+    }
+  }
+}
+// vim: sw=2
diff --git a/models/plugins/yang/rw-vnfd.yang b/models/plugins/yang/rw-vnfd.yang
index 29eb852..e8f085c 100644
--- a/models/plugins/yang/rw-vnfd.yang
+++ b/models/plugins/yang/rw-vnfd.yang
@@ -1,7 +1,7 @@
 
 /*
  * 
- *   Copyright 2016 RIFT.IO Inc
+ *   Copyright 2016-2017 RIFT.IO Inc
  *
  *   Licensed under the Apache License, Version 2.0 (the "License");
  *   you may not use this file except in compliance with the License.
@@ -23,24 +23,35 @@
   namespace "http://riftio.com/ns/riftware-1.0/rw-vnfd";
   prefix "rw-vnfd";
 
+  import ietf-inet-types {
+    prefix "inet";
+  }
+
   import vnfd {
     prefix "vnfd";
   }
 
-  import rwvcs-types {
-    prefix "rwvcstypes";
+  import rw-vnfd-base {
+    prefix "rw-vnfd-base";
   }
 
-  import rw-pb-ext { prefix "rwpb"; }
+  import vnfd-base {
+    prefix "vnfd-base";
+  }
 
-  import ietf-yang-types {
-    prefix "yang";
+  import mano-rift-groupings {
+    prefix "mano-rift";
   }
 
   import mano-types {
     prefix "manotypes";
   }
 
+  revision 2017-02-28 {
+    description
+      "Update model to support projects.";
+  }
+
   revision 2015-09-10 {
     description
       "Initial revision. This YANG file augments
@@ -49,69 +60,233 @@
       "Derived from earlier versions of base YANG files";
   }
 
-  augment /vnfd:vnfd-catalog/vnfd:vnfd {
-    uses manotypes:control-param;
-    uses manotypes:action-param;
-    leaf meta {
+  grouping vnfd-config-parameter {
+    container config-parameter {
       description
-        "Any meta-data needed by the UI";
-      type string;
-    }
-    list component {
-      description
-          "This section defines the RIFT.ware
-           virtual components";
-      key "component-name";
-      rwpb:msg-new VcsComponent;
-      rwpb:application-request-point;
+        "List of VNF config parameter requests and sources";
+      list config-parameter-source {
+        description "The list of parameters exposed by this VNF";
+        key "name";
 
-      leaf component-name {
-        description "";
+        leaf name {
+          description "Name of the source";
+          type string {
+            length "1..128";
+          }
+        }
+
+        leaf description {
+          description " Description of the source";
+          type string;
+        }
+
+        choice source {
+          case descriptor {
+            leaf descriptor {
+              description
+                "Location of this source as an xpath.
+                 For example:
+                   ../../../mgmt-interface/port";
+              type string;
+            }
+          }
+
+          case attribute {
+            leaf attribute {
+              description
+                "Location of this source as runtime attribute.
+                 The value is <xpath>, <attribute_name>
+                 For example:
+                   ../../../mgmt-interface, ip-address
+                   which retruns the ip-address assigned to the
+                   mgmt-interface after VNF instantiation.";
+              type string;
+            }
+          }
+
+          case primitive-ref {
+            leaf config-primitive-name-ref {
+              description
+                "A leafref to configuration primitive.
+                 This refers to a config parameter whose
+                 output parameter is referred in out-parameter.";
+              type leafref {
+                path "../../../vnfd:vnf-configuration/vnfd:config-primitive/vnfd:name";
+              }
+            }
+
+            leaf parameter-ref {
+              description
+                "Name of the output parameter in the config primitiive";
+              type leafref {
+                path
+                  "../../../vnfd:vnf-configuration/vnfd:config-primitive[vnfd:name=current()/../config-primitive-name-ref]/vnfd:parameter/vnfd:name";
+              }
+            }
+          }
+
+          case value {
+            leaf value {
+              description
+                "Pre-defined value to be used for this source";
+              type string;
+            }
+          }
+        }
+
+        list parameter {
+          key "config-primitive-name-ref";
+
+          leaf config-primitive-name-ref {
+            description
+              "Name of the configuration primitive where this
+             request will used";
+            type leafref {
+              path "../../../../vnfd:vnf-configuration/vnfd:config-primitive/vnfd:name";
+            }
+          }
+
+          leaf config-primitive-parameter-ref {
+            description
+              "Parameter name of the config primitive";
+            type leafref {
+              path "../../../../vnfd:vnf-configuration/vnfd:config-primitive[vnfd:name=current()/../config-primitive-name-ref]/vnfd:parameter/vnfd:name";
+            }
+          }
+        }
+      }
+
+      list config-parameter-request {
+        description "The list of requests for this VNF";
+        key "name";
+
+        leaf name {
+          description "Name of this parameter request";
+          type string {
+            length "1..128";
+          }
+        }
+
+        leaf description {
+          description "Description of this request";
+          type string;
+        }
+
+        list parameter {
+          key "config-primitive-name-ref";
+
+          leaf config-primitive-name-ref {
+            description
+              "Name of the configuration primitive where this
+             request will used";
+            type leafref {
+              path "../../../../vnfd:vnf-configuration/vnfd:config-primitive/vnfd:name";
+            }
+          }
+
+          leaf config-primitive-parameter-ref {
+            description
+              "Parameter name of the config primitive";
+            type leafref {
+              path "../../../../vnfd:vnf-configuration/vnfd:config-primitive[vnfd:name=current()/../config-primitive-name-ref]/vnfd:parameter/vnfd:name";
+            }
+          }
+        }
+      }
+    }
+  }
+
+  augment /vnfd:vnfd-catalog/vnfd:vnfd {
+    uses rw-vnfd-base:rw-vnfd-ext;
+    uses vnfd-config-parameter;
+  }
+
+  augment /vnfd:vnfd-catalog/vnfd:vnfd/vnfd:mgmt-interface {
+    uses rw-vnfd-base:ssh-key;
+  }
+
+  augment /vnfd:vnfd-catalog/vnfd:vnfd/vnfd:http-endpoint {
+    uses mano-rift:http-end-point-additions;
+  }
+
+  augment /vnfd:vnfd-catalog/vnfd:vnfd/vnfd:vdu/vnfd:supplemental-boot-data {
+    uses mano-rift:custom-meta-data;
+  }
+
+  augment /vnfd:vnfd-catalog/vnfd:vnfd/vnfd:vdu/vnfd:volumes {
+    uses mano-rift:volume-info-additions;
+    uses mano-rift:custom-meta-data;
+  }
+
+  augment /vnfd:vnfd-catalog/vnfd:vnfd/vnfd:vdu/vnfd:interface {
+    leaf static-ip-address {
+      description "Static IP address for the connection point";
+      type inet:ip-address;
+    }
+
+    leaf floating-ip-needed{
+      type boolean;
+      default "false";
+      description 
+        "Sole purpose of this field is to facilitate translation of VNFD 
+              to other VNFMs";
+    }
+  }
+
+  augment /vnfd:vnfd-catalog/vnfd:vnfd/vnfd:vdu/vnfd:volumes/vnfd:volume-source {
+    case volume {
+      leaf volume-ref {
+        description "Reference for pre-existing volume in VIM";
         type string;
       }
-
-      leaf component-type {
-        description "";
-        type rwvcstypes:component_type;
-        mandatory true;
-      }
-
-      choice component {
-        case rwvcs-rwcollection {
-          uses rwvcstypes:rwvcs-rwcollection;
-        }
-        case rwvcs-rwvm {
-          uses rwvcstypes:rwvcs-rwvm;
-        }
-        case rwvcs-rwproc {
-          uses rwvcstypes:rwvcs-rwproc;
-        }
-        case native-proc {
-          uses rwvcstypes:native-proc;
-        }
-        case rwvcs-rwtasklet {
-          uses rwvcstypes:rwvcs-rwtasklet;
-        }
-      }
-    } // list component
+    }
   }
 
-  augment /vnfd:vnfd-catalog/vnfd:vnfd/vnfd:vdu {
-    leaf vcs-component-ref {
+  augment /vnfd:vnfd-catalog/vnfd:vnfd/vnfd:internal-vld {
+    list virtual-connection-points {
       description
-          "This defines the software components using the
-           RIFT.ware Virtual Component System (VCS). This
-           also allows specifying a state machine during
-           the VM startup.
-           NOTE: This is an significant addition to MANO,
-           since MANO doesn't clearly specify a method to
-           identify various software components in a VM.
-           Also using a state machine is not something that
-           is well described in MANO.";
-      type leafref {
-        path "/vnfd:vnfd-catalog/vnfd:vnfd/rw-vnfd:component/rw-vnfd:component-name";
+          "A list of virtual-connection points associated with Virtual Link.
+         These connection points are not directly associated with any VDUs";
+      key name;
+      uses vnfd-base:common-connection-point;
+
+      leaf-list associated-cps {
+        description
+            "A List of connection points associated with virtual connection point";
+        type leafref {
+          path "../../vnfd:internal-connection-point/vnfd:id-ref";
+        }
       }
     }
   }
+
+  
+  augment /vnfd:vnfd-catalog/vnfd:vnfd/vnfd:vdu/vnfd:vm-flavor {
+  	uses manotypes:vm-flavor-name;
+  }
+
+  augment /vnfd:vnfd-catalog/vnfd:vnfd/vnfd:vnf-configuration/vnfd:config-primitive/vnfd:parameter {
+    leaf out {
+      description "If this is an output of the primitive execution";
+      type boolean;
+      default false;
+    }
+  }
+
+  augment /vnfd:vnfd-catalog/vnfd:vnfd/vnfd:vnf-configuration/vnfd:initial-config-primitive/vnfd:primitive-type {
+    case primitive-ref {
+      leaf config-primitive-ref {
+        description
+          "Reference to a config primitive name.
+           NOTE: The config primitive referred should have
+                 all the input parameters predefined either
+                 with default values or dependency references.";
+        type leafref {
+          path "../../vnfd:config-primitive/vnfd:name";
+        }
+      }
+    }
+  }
+  
 }
 // vim: sw=2
diff --git a/models/plugins/yang/rw-vnfr.role.xml b/models/plugins/yang/rw-vnfr.role.xml
new file mode 100644
index 0000000..08f2202
--- /dev/null
+++ b/models/plugins/yang/rw-vnfr.role.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" ?>
+<config xmlns="http://riftio.com/ns/riftware-1.0/rw-rbac-role-def">
+  <key-definition>
+    <role>rw-project-mano:rw-vnfr-role</role>
+    <key-set>
+      <name>project-name</name>
+      <path>/rw-project:project/rw-project:name</path>
+   </key-set>
+  </key-definition>
+
+  <role-definition>
+    <role>rw-project-mano:lcm-oper</role>
+    <keys-role>rw-project-mano:rw-vnfr-role</keys-role>
+    <authorize>
+      <permissions>read execute</permissions>
+      <path>/rw-project:project/rw-vnfr:vnfr-console</path>
+    </authorize>
+  </role-definition>
+
+  <role-definition>
+    <role>rw-project-mano:lcm-admin</role>
+    <keys-role>rw-project-mano:rw-vnfr-role</keys-role>
+    <authorize>
+      <permissions>create read update delete execute</permissions>
+      <path>/rw-project:project/rw-vnfr:vnfr-console</path>
+    </authorize>
+  </role-definition>
+</config>
diff --git a/models/plugins/yang/rw-vnfr.tailf.yang b/models/plugins/yang/rw-vnfr.tailf.yang
index 6090fcf..da9bdbf 100644
--- a/models/plugins/yang/rw-vnfr.tailf.yang
+++ b/models/plugins/yang/rw-vnfr.tailf.yang
@@ -1,7 +1,7 @@
 
 /*
  * 
- *   Copyright 2016 RIFT.IO Inc
+ *   Copyright 2016-2017 RIFT.IO Inc
  *
  *   Licensed under the Apache License, Version 2.0 (the "License");
  *   you may not use this file except in compliance with the License.
@@ -35,15 +35,19 @@
     prefix vnfr;
   }
 
-  tailf:annotate "/vnfr:vnfr-catalog/rw-vnfr:vnfd-ref-count" {
+  import rw-project {
+    prefix "rw-project";
+  }
+
+  tailf:annotate "/rw-project:project/vnfr:vnfr-catalog/rw-vnfr:vnfd-ref-count" {
     tailf:callpoint rw_callpoint;
   }
 
-  tailf:annotate "/vnfr:vnfr-catalog/vnfr:vnfr/rw-vnfr:operational-events" {
+  tailf:annotate "/rw-project:project/vnfr:vnfr-catalog/vnfr:vnfr/rw-vnfr:operational-events" {
     tailf:callpoint rw_callpoint;
   }
 
-  tailf:annotate "/rw-vnfr:vnfr-console" {
+  tailf:annotate "/rw-project:project/rw-vnfr:vnfr-console" {
     tailf:callpoint rw_callpoint;
   }
 
diff --git a/models/plugins/yang/rw-vnfr.yang b/models/plugins/yang/rw-vnfr.yang
index be8acb4..528918c 100644
--- a/models/plugins/yang/rw-vnfr.yang
+++ b/models/plugins/yang/rw-vnfr.yang
@@ -1,7 +1,7 @@
 
 /*
  * 
- *   Copyright 2016 RIFT.IO Inc
+ *   Copyright 2016-2017 RIFT.IO Inc
  *
  *   Licensed under the Apache License, Version 2.0 (the "License");
  *   you may not use this file except in compliance with the License.
@@ -27,14 +27,16 @@
     prefix "manotypes";
   }
 
-  import rw-pb-ext { prefix "rwpb"; }
-
   import vnfr {
     prefix "vnfr";
   }
 
-  import vnfd {
-    prefix "vnfd";
+  import vnfd-base {
+    prefix "vnfd-base";
+  }
+
+  import project-vnfd {
+    prefix "project-vnfd";
   }
 
   import rw-cloud {
@@ -53,6 +55,19 @@
     prefix "inet";
   }
 
+  import rw-project {
+    prefix "rw-project";
+  }
+
+  import mano-rift-groupings {
+    prefix "mano-rift";
+  }
+
+  revision 2017-02-28 {
+    description
+      "Update model to support projects.";
+  }
+
   revision 2015-09-10 {
     description
       "Initial revision. This YANG file augments
@@ -61,13 +76,37 @@
       "Derived from earlier versions of base YANG files";
   }
 
+  typedef vdur-operational-event-types {
+    type enumeration {
+      enum instantiate-rcvd;
+      enum vm-allocation-requested;
+      enum running;
+      enum terminate-rcvd;
+      enum vm-terminate-requested;
+      enum terminated;
+    }
+  }
+
+  typedef vnfr-operational-event-types {
+    type enumeration {
+      enum instantiate-rcvd;
+      enum vl-inited;
+      enum vnf-inited;
+      enum running;
+      enum terminate-rcvd;
+      enum vnf-terminated;
+      enum vl-terminated;
+      enum terminated;
+    }
+  }
+
   grouping vnfr-operational-events {
     list operational-events {
       key "id";
       description
         "Recent operational events for VNFR
-        Though the model does not impose any restrictions on the numbe of events, 
-        the max operational events will be limited to the most recent 10"; 
+        Though the model does not impose any restrictions on the numbe of events,
+        the max operational events will be limited to the most recent 10";
 
       leaf id {
         description "The id of the instance";
@@ -82,17 +121,7 @@
       }
       leaf event {
         description "The event";
-        type enumeration {
-          rwpb:enum-type "VnfrOperationalEvent";
-          enum instantiate-rcvd;
-          enum vl-inited;
-          enum vnf-inited;
-          enum running;
-          enum terminate-rcvd;
-          enum vnf-terminated;
-          enum vl-terminated;
-          enum terminated;
-        }
+        type vnfr-operational-event-types;
       }
       leaf description {
         description
@@ -107,8 +136,8 @@
       key "id";
       description
         "Recent operational events for VDUR
-        Though the model does not impose any restrictions on the numbe of events, 
-        the max operational events will be limited to the most recent 10"; 
+        Though the model does not impose any restrictions on the numbe of events,
+        the max operational events will be limited to the most recent 10";
 
       leaf id {
         description "The id of the instance";
@@ -123,15 +152,7 @@
       }
       leaf event {
         description "The event";
-        type enumeration {
-          rwpb:enum-type "VdurOperationalEvent";
-          enum instantiate-rcvd;
-          enum vm-allocation-requested;
-          enum running;
-          enum terminate-rcvd;
-          enum vm-terminate-requested;
-          enum terminated;
-        }
+        type vdur-operational-event-types;
       }
       leaf description {
         description
@@ -141,25 +162,14 @@
     }
   }
 
-  augment /vnfr:vnfr-catalog/vnfr:vnfr {
+  augment /rw-project:project/vnfr:vnfr-catalog/vnfr:vnfr {
     uses manotypes:action-param;
     uses manotypes:control-param;
 
-    leaf cloud-account {
+    leaf datacenter {
       description
-        "The cloud account to use when requesting resources for
-         this vnf";
-      type leafref {
-        path "/rw-cloud:cloud/rw-cloud:account/rw-cloud:name";
-      }
-    }
-
-    leaf om-datacenter {
-      description
-          "Openmano datacenter name to use when instantiating
-          the network service.  This is only used when openmano
-          is selected as the cloud account.  This should be superceded
-          by multiple cloud accounts when that becomes available.";
+          "Datacenter name to use when instantiating
+          the network service.";
       type string;
     }
 
@@ -184,48 +194,9 @@
           type uint64;
         }
       }
-      
+
       uses manotypes:nfvi-metrics;
     }
-
-    list component {
-      description
-          "This section defines the RIFT.ware
-           virtual components";
-      key "component-name";
-      rwpb:msg-new VcsComponentOp;
-      rwpb:application-request-point;
-
-      leaf component-name {
-        description "";
-        type string;
-      }
-
-      leaf component-type {
-        description "";
-        type rwvcstypes:component_type;
-        mandatory true;
-      }
-
-      choice component {
-        case rwvcs-rwcollection {
-          uses rwvcstypes:rwvcs-rwcollection;
-        }
-        case rwvcs-rwvm {
-          uses rwvcstypes:rwvcs-rwvm;
-        }
-        case rwvcs-rwproc {
-          uses rwvcstypes:rwvcs-rwproc;
-        }
-        case native-proc {
-          uses rwvcstypes:native-proc;
-        }
-        case rwvcs-rwtasklet {
-          uses rwvcstypes:rwvcs-rwtasklet;
-        }
-      }
-    } // list component
-
     uses vnfr-operational-events;
 
     leaf operational-status-details {
@@ -235,7 +206,7 @@
     }
   }
 
-  augment /vnfr:vnfr-catalog/vnfr:vnfr/vnfr:vdur {
+  augment /rw-project:project/vnfr:vnfr-catalog/vnfr:vnfr/vnfr:vdur {
     leaf vm-pool {
       description
         "The pool from which this vm was allocated from";
@@ -246,21 +217,6 @@
       uses manotypes:nfvi-metrics;
     }
 
-    leaf vcs-component-ref {
-      description
-          "This defines the software components using the
-           RIFT.ware Virtual Component System (VCS). This
-           also allows specifying a state machine during
-           the VM startup.
-           NOTE: This is an significant addition to MANO,
-           since MANO doesn't clearly specify a method to
-           identify various software components in a VM.
-           Also using a state machine is not something that
-           is well described in MANO.";
-      type leafref {
-        path "/vnfr:vnfr-catalog/vnfr:vnfr/rw-vnfr:component/rw-vnfr:component-name";
-      }
-    }
 
     uses vdur-operational-events;
 
@@ -270,6 +226,7 @@
       type string;
     }
   }
+
   grouping vnfd-ref-count {
     list vnfd-ref-count {
       key "vnfd-id-ref";
@@ -278,7 +235,7 @@
       leaf vnfd-id-ref {
         description "Reference to VNFD";
         type leafref {
-          path "/vnfd:vnfd-catalog/vnfd:vnfd/vnfd:id";
+          path "../../../project-vnfd:vnfd-catalog/project-vnfd:vnfd/project-vnfd:id";
         }
       }
       leaf instance-ref-count {
@@ -292,28 +249,323 @@
       }
     }
   }
-  augment /vnfr:vnfr-catalog {
+
+  grouping vnfd-config-parameter {
+    container config-parameter {
+      description
+        "List of VNF config parameter requests and sources";
+      list config-parameter-source {
+        description "The list of parameters exposed by this VNF";
+        key "name";
+
+        leaf name {
+          description "Name of the source";
+          type string {
+            length "1..128";
+          }
+        }
+
+        leaf description {
+          description " Description of the source";
+          type string;
+        }
+
+        choice source {
+          case descriptor {
+            leaf descriptor {
+              description
+                "Location of this source as an xpath.
+                 For example:
+                   ../../../mgmt-interface/port";
+              type string;
+            }
+          }
+
+          case attribute {
+            leaf attribute {
+              description
+                "Location of this source as runtime attribute.
+                 The value is <xpath>, <attribute_name>
+                 For example:
+                   ../../../mgmt-interface, ip-address
+                   which retruns the ip-address assigned to the
+                   mgmt-interface after VNF instantiation.";
+              type string;
+            }
+          }
+
+          case primitive-ref {
+            leaf config-primitive-name-ref {
+              description
+                "A leafref to configuration primitive.
+                 This refers to a config parameter whose
+                 output parameter is referred in out-parameter.";
+              type leafref {
+                path "../../../vnfr:vnf-configuration/vnfr:config-primitive/vnfr:name";
+              }
+            }
+
+            leaf parameter-ref {
+              description
+                "Name of the output parameter in the config primitiive";
+              type leafref {
+                path
+                  "../../../vnfr:vnf-configuration/vnfr:config-primitive[vnfr:name=current()/../config-primitive-name-ref]/vnfr:parameter/vnfr:name";
+              }
+            }
+          }
+
+          case value {
+            leaf value {
+              description
+                "Pre-defined value to be used for this source";
+              type string;
+            }
+          }
+        }
+
+        list parameter {
+          key "config-primitive-name-ref";
+
+          leaf config-primitive-name-ref {
+            description
+              "Name of the configuration primitive where this
+             request will used";
+            type leafref {
+              path "../../../../vnfr:vnf-configuration/vnfr:config-primitive/vnfr:name";
+            }
+          }
+
+          leaf config-primitive-parameter-ref {
+            description
+              "Parameter name of the config primitive";
+            type leafref {
+              path "../../../../vnfr:vnf-configuration/vnfr:config-primitive[vnfr:name=current()/../config-primitive-name-ref]/vnfr:parameter/vnfr:name";
+            }
+          }
+        }
+      }
+
+      list config-parameter-request {
+        description "The list of requests for this VNF";
+        key "name";
+
+        leaf name {
+          description "Name of this parameter request";
+          type string {
+            length "1..128";
+          }
+        }
+
+        leaf description {
+          description "Description of this request";
+          type string;
+        }
+
+        list parameter {
+          key "config-primitive-name-ref";
+
+          leaf config-primitive-name-ref {
+            description
+              "Name of the configuration primitive where this
+             request will used";
+            type leafref {
+              path "../../../../vnfr:vnf-configuration/vnfr:config-primitive/vnfr:name";
+            }
+          }
+
+          leaf config-primitive-parameter-ref {
+            description
+              "Parameter name of the config primitive";
+            type leafref {
+              path "../../../../vnfr:vnf-configuration/vnfr:config-primitive[vnfr:name=current()/../config-primitive-name-ref]/vnfr:parameter/vnfr:name";
+            }
+          }
+        }
+      }
+    }
+  }
+
+  augment /rw-project:project/vnfr:vnfr-catalog {
     uses vnfd-ref-count;
   }
 
-  container vnfr-console {
-    config false;
-    list vnfr {
-      key "id";
-      leaf id {
-        description "Identifier for the VNFR.";
-        type yang:uuid;
-      }
-      list vdur {
-        description "List of Virtual Deployment Units";
+  augment /rw-project:project/vnfr:vnfr-catalog/vnfr:vnfr/vnfr:vnfd/vnfr:mgmt-interface {
+    leaf ssh-key {
+      description
+        "Whether SSH keys need to be generated and passed
+             to the RO and VCA during instantiation.";
+      type boolean;
+    }
+  }
+
+  augment /rw-project:project/vnfr:vnfr-catalog/vnfr:vnfr/vnfr:vnfd/vnfr:vdu/vnfr:vm-flavor {
+		uses manotypes:vm-flavor-name;
+  }
+
+  augment /rw-project:project/vnfr:vnfr-catalog/vnfr:vnfr/vnfr:vnfd/vnfr:vdu/vnfr:interface {
+    leaf static-ip-address {
+      description "Static IP address for the connection point";
+      type inet:ip-address;
+    }
+
+    leaf floating-ip-needed{
+      type boolean;
+      default "false";
+      description 
+        "Sole purpose of this field is to facilitate translation of VNFD 
+              to other VNFMs";
+    }
+  }
+
+  augment /rw-project:project/vnfr:vnfr-catalog/vnfr:vnfr/vnfr:vdur/vnfr:interface {
+    leaf static-ip-address {
+      description "Static IP address for the connection point";
+      type inet:ip-address;
+    }
+
+    leaf floating-ip-needed{
+      type boolean;
+      default "false";
+      description 
+        "Sole purpose of this field is to facilitate translation of VNFD 
+              to other VNFMs";
+    }
+  }
+
+  augment /rw-project:project/vnfr:vnfr-catalog/vnfr:vnfr/vnfr:vdur/vnfr:vm-flavor {
+		uses manotypes:vm-flavor-name;
+  }
+
+  augment /rw-project:project/vnfr:vnfr-catalog/vnfr:vnfr/vnfr:vnfd {
+    leaf meta {
+      description
+        "Any meta-data needed by the UI";
+      type string;
+    }
+
+    uses vnfd-config-parameter;
+  }
+
+  augment /rw-project:project {
+    container vnfr-console {
+      config false;
+      list vnfr {
         key "id";
         leaf id {
-          description "Unique id for the VDU";
+          description "Identifier for the VNFR.";
           type yang:uuid;
         }
-        leaf console-url {
-          description "Console URL for this VDU, if available";
-          type inet:uri;
+        list vdur {
+          description "List of Virtual Deployment Units";
+          key "id";
+          leaf id {
+            description "Unique id for the VDU";
+            type yang:uuid;
+          }
+          leaf console-url {
+            description "Console URL for this VDU, if available";
+            type inet:uri;
+          }
+        }
+      }
+    }
+  }
+
+  augment /rw-project:project/vnfr:vnfr-catalog/vnfr:vnfr/vnfr:vnfd/vnfr:http-endpoint {
+    uses mano-rift:http-end-point-additions;
+  }
+
+  augment /rw-project:project/vnfr:vnfr-catalog/vnfr:vnfr/vnfr:http-endpoint {
+    uses mano-rift:http-end-point-additions;
+  }
+
+  augment /rw-project:project/vnfr:vnfr-catalog/vnfr:vnfr/vnfr:vnfd/vnfr:vdu/vnfr:supplemental-boot-data {
+    uses mano-rift:custom-meta-data;
+  }
+
+  augment /rw-project:project/vnfr:vnfr-catalog/vnfr:vnfr/vnfr:vdur/vnfr:supplemental-boot-data {
+    uses mano-rift:custom-meta-data;
+  }
+
+  augment /rw-project:project/vnfr:vnfr-catalog/vnfr:vnfr/vnfr:vnfd/vnfr:vdu/vnfr:volumes {
+    uses mano-rift:volume-info-additions;
+    uses mano-rift:custom-meta-data;
+  }
+
+  augment /rw-project:project/vnfr:vnfr-catalog/vnfr:vnfr/vnfr:vnfd/vnfr:vdu/vnfr:volumes/vnfr:volume-source {
+    case volume {
+      leaf volume-ref {
+        description "Reference for pre-existing volume in VIM";
+        type string;
+      }
+    }
+  }
+
+  augment /rw-project:project/vnfr:vnfr-catalog/vnfr:vnfr/vnfr:vnf-configuration/vnfr:config-primitive/vnfr:parameter {
+    leaf out {
+      description "If this is an output of the primitive execution";
+      type boolean;
+      default false;
+    }
+  }
+
+  augment /rw-project:project/vnfr:vnfr-catalog/vnfr:vnfr/vnfr:vnfd/vnfr:vnf-configuration/vnfr:config-primitive/vnfr:parameter {
+    leaf out {
+      description "If this is an output of the primitive execution";
+      type boolean;
+      default false;
+    }
+  }
+
+  augment /rw-project:project/vnfr:vnfr-catalog/vnfr:vnfr/vnfr:vnf-configuration/vnfr:initial-config-primitive/vnfr:primitive-type {
+    case primitive-ref {
+      leaf config-primitive-ref {
+        description
+          "Reference to a config primitive name.
+           NOTE: The config primitive referred should have
+                 all the input parameters predefined either
+                 with default values or dependency references.";
+        type leafref {
+          path "../../vnfr:config-primitive/vnfr:name";
+        }
+      }
+    }
+  }
+
+  augment /rw-project:project/vnfr:vnfr-catalog/vnfr:vnfr/vnfr:vnfd/vnfr:vnf-configuration/vnfr:initial-config-primitive/vnfr:primitive-type {
+    case primitive-ref {
+      leaf config-primitive-ref {
+        description
+          "Reference to a config primitive name.
+           NOTE: The config primitive referred should have
+                 all the input parameters predefined either
+                 with default values or dependency references.";
+        type leafref {
+          path "../../vnfr:config-primitive/vnfr:name";
+        }
+      }
+    }
+  }
+
+  augment /rw-project:project/vnfr:vnfr-catalog/vnfr:vnfr/vnfr:vdur/vnfr:volumes {
+    uses mano-rift:volume-info-additions;
+    uses mano-rift:custom-meta-data;
+  }
+
+  augment /rw-project:project/vnfr:vnfr-catalog/vnfr:vnfr/vnfr:vnfd/vnfr:internal-vld {
+    list virtual-connection-points {
+      description
+          "A list of virtual-connection points associated with Virtual Link.
+         These connection points are not directly associated with any VDUs";
+      key name;
+      uses vnfd-base:common-connection-point;
+
+      leaf-list associated-cps {
+        description
+            "A List of connection points associated with virtual connection point";
+        type leafref {
+          path "../../vnfr:internal-connection-point/vnfr:id-ref";
         }
       }
     }
diff --git a/models/plugins/yang/vld.yang b/models/plugins/yang/vld.yang
index 2747887..925a70d 100644
--- a/models/plugins/yang/vld.yang
+++ b/models/plugins/yang/vld.yang
@@ -1,7 +1,7 @@
 
 /*
  * 
- *   Copyright 2016 RIFT.IO Inc
+ *   Copyright 2016-2017 RIFT.IO Inc
  *
  *   Licensed under the Apache License, Version 2.0 (the "License");
  *   you may not use this file except in compliance with the License.
@@ -23,12 +23,8 @@
   namespace "urn:ietf:params:xml:ns:yang:nfvo:vld";
   prefix "vld";
 
-  import rw-pb-ext {
-    prefix "rwpb";
-  }
-
-  import vnfd {
-    prefix "vnfd";
+  import project-vnfd {
+    prefix "project-vnfd";
   }
 
   import ietf-inet-types {
@@ -43,6 +39,15 @@
     prefix "manotypes";
   }
 
+  import rw-project {
+    prefix "rw-project";
+  }
+
+  revision 2017-02-08 {
+    description
+      "Update model to support projects.";
+  }
+
   revision 2015-09-10 {
     description
       "Initial revision. This YANG file defines
@@ -51,91 +56,93 @@
       "Derived from earlier versions of base YANG files";
   }
 
-  container vld-catalog {
+  augment "/rw-project:project" {
+    container vld-catalog {
 
-    list vld {
-      key "id";
+      list vld {
+        key "id";
 
-      leaf id {
-        description "Identifier for the VLD.";
-        type yang:uuid;
-      }
-
-      leaf name {
-        description "Virtual Link Descriptor (VLD) name.";
-        type string;
-      }
-
-      leaf short-name {
-        description "Short name for VLD for UI";
-        type string;
-      }
-
-      leaf vendor {
-        description "Provider of the VLD.";
-        type string;
-      }
-
-      leaf description {
-        description "Description of the VLD.";
-        type string;
-      }
-
-      leaf version {
-        description "Version of the VLD";
-        type string;
-      }
-
-      leaf type {
-        type manotypes:virtual-link-type;
-      }
-
-      leaf root-bandwidth {
-        description
-            "For ELAN this is the aggregate bandwidth.";
-        type uint64;
-      }
-
-      leaf leaf-bandwidth {
-        description
-            "For ELAN this is the bandwidth of branches.";
-        type uint64;
-      }
-
-      list vnfd-connection-point-ref {
-        description
-            "A list of references to connection points.";
-        key "vnfd-ref member-vnf-index-ref";
-
-        leaf vnfd-ref {
-          description "A reference to a vnfd";
-          type leafref {
-            path "/vnfd:vnfd-catalog/vnfd:vnfd/vnfd:id";
-          }
+        leaf id {
+          description "Identifier for the VLD.";
+          type yang:uuid;
         }
 
-        leaf member-vnf-index-ref {
-          description 
+        leaf name {
+          description "Virtual Link Descriptor (VLD) name.";
+          type string;
+        }
+
+        leaf short-name {
+          description "Short name for VLD for UI";
+          type string;
+        }
+
+        leaf vendor {
+          description "Provider of the VLD.";
+          type string;
+        }
+
+        leaf description {
+          description "Description of the VLD.";
+          type string;
+        }
+
+        leaf version {
+          description "Version of the VLD";
+          type string;
+        }
+
+        leaf type {
+          type manotypes:virtual-link-type;
+        }
+
+        leaf root-bandwidth {
+          description
+            "For ELAN this is the aggregate bandwidth.";
+          type uint64;
+        }
+
+        leaf leaf-bandwidth {
+          description
+            "For ELAN this is the bandwidth of branches.";
+          type uint64;
+        }
+
+        list vnfd-connection-point-ref {
+          description
+            "A list of references to connection points.";
+          key "vnfd-ref member-vnf-index-ref";
+
+          leaf vnfd-ref {
+            description "A reference to a vnfd";
+            type leafref {
+              path "../../../../project-vnfd:vnfd-catalog/project-vnfd:vnfd/project-vnfd:id";
+            }
+          }
+
+          leaf member-vnf-index-ref {
+            description
               "A reference to the consituent-vnfd id in nsd. 
               Should have been a leafref to:
-                '/nsd:nsd-catalog:/nsd:nsd/constituent-vnfd/member-vnf-index-ref'. 
+                '/rw-project:project/project-nsd:nsd-catalog:/nsd/constituent-vnfd/member-vnf-index-ref'.
               Instead using direct leaf to avoid circular reference.";
-          type uint64; 
-        }
+            type uint64;
+          }
 
-        leaf vnfd-connection-point-ref {
-          description 
+          leaf vnfd-connection-point-ref {
+            description
               "A reference to a connection point name in a vnfd";
-          type leafref {
-            path "/vnfd:vnfd-catalog/vnfd:vnfd" 
-               + "[vnfd:id = current()/../vld:vnfd-ref]"
-               + "/vnfd:connection-point/vnfd:name";
+            type leafref {
+              path "../../../../project-vnfd:vnfd-catalog/project-vnfd:vnfd"
+                + "[project-vnfd:id = current()/../vld:vnfd-ref]"
+                + "/project-vnfd:connection-point/project-vnfd:name";
+            }
           }
         }
-      }
 
-      // replicate for pnfd container here
-      uses manotypes:provider-network;
+        // replicate for pnfd container here
+        uses manotypes:provider-network;
+      }
     }
   }
 }
diff --git a/models/plugins/yang/vlr.role.xml b/models/plugins/yang/vlr.role.xml
new file mode 100644
index 0000000..cb6f9ee
--- /dev/null
+++ b/models/plugins/yang/vlr.role.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" ?>
+<config xmlns="http://riftio.com/ns/riftware-1.0/rw-rbac-role-def">
+  <key-definition>
+    <role>rw-project-mano:vlr-role</role>
+    <key-set>
+      <name>project-name</name>
+      <path>/rw-project:project/rw-project:name</path>
+    </key-set>
+  </key-definition>
+
+  <role-definition>
+    <role>rw-project-mano:lcm-oper</role>
+    <keys-role>rw-project-mano:vlr-role</keys-role>
+    <authorize>
+      <permissions>read execute</permissions>
+      <path>/rw-project:project/vlr:vlr-catalog</path>
+    </authorize>
+  </role-definition>
+
+  <role-definition>
+    <role>rw-project-mano:lcm-admin</role>
+    <keys-role>rw-project-mano:vlr-role</keys-role>
+    <authorize>
+      <permissions>create read update delete execute</permissions>
+      <path>/rw-project:project/vlr:vlr-catalog</path>
+    </authorize>
+  </role-definition>
+</config>
diff --git a/models/plugins/yang/vlr.tailf.yang b/models/plugins/yang/vlr.tailf.yang
index 4bed1d2..f773de6 100644
--- a/models/plugins/yang/vlr.tailf.yang
+++ b/models/plugins/yang/vlr.tailf.yang
@@ -1,7 +1,7 @@
 
 /*
  * 
- *   Copyright 2016 RIFT.IO Inc
+ *   Copyright 2016-2017 RIFT.IO Inc
  *
  *   Licensed under the Apache License, Version 2.0 (the "License");
  *   you may not use this file except in compliance with the License.
@@ -31,7 +31,11 @@
     prefix vlr;
   }
 
-  tailf:annotate "/vlr:vlr-catalog" {
+  import rw-project {
+    prefix "rw-project";
+  }
+
+  tailf:annotate "/rw-project:project/vlr:vlr-catalog" {
     tailf:callpoint rw_callpoint;
   }
 }
diff --git a/models/plugins/yang/vlr.yang b/models/plugins/yang/vlr.yang
index e30aa5b..6b8139f 100644
--- a/models/plugins/yang/vlr.yang
+++ b/models/plugins/yang/vlr.yang
@@ -1,7 +1,7 @@
 
 /*
  * 
- *   Copyright 2016 RIFT.IO Inc
+ *   Copyright 2016-2017 RIFT.IO Inc
  *
  *   Licensed under the Apache License, Version 2.0 (the "License");
  *   you may not use this file except in compliance with the License.
@@ -23,10 +23,6 @@
   namespace "urn:ietf:params:xml:ns:yang:nfvo:vlr";
   prefix "vlr";
 
-  import rw-pb-ext {
-    prefix "rwpb";
-  }
-
   import ietf-inet-types {
     prefix "inet";
   }
@@ -43,6 +39,19 @@
     prefix "vld";
   }
 
+  import vnfd-base {
+    prefix "vnfd-base";
+  }
+
+  import rw-project {
+    prefix "rw-project";
+  }
+
+  revision 2017-02-08 {
+    description
+      "Update model to support projects.";
+  }
+
   revision 2015-09-10 {
     description
       "Initial revision. This YANG file defines
@@ -51,125 +60,127 @@
       "Derived from earlier versions of base YANG files";
   }
 
-  container vlr-catalog {
-    config false;
+  augment "/rw-project:project" {
+    container vlr-catalog {
+      config false;
 
-    list vlr {
-      key "id";
-      unique "name";
+      list vlr {
+        key "id";
+        unique "name";
 
-      leaf id {
-        description "Identifier for the VLR.";
-        type yang:uuid;
-      }
+        leaf id {
+          description "Identifier for the VLR.";
+          type yang:uuid;
+        }
 
-      leaf name {
-        description "VLR name.";
-        type string;
-      }
+        leaf name {
+          description "VLR name.";
+          type string;
+        }
 
-      leaf nsr-id-ref {
-        description 
+        leaf nsr-id-ref {
+          description
             "NS instance identifier. 
-             This is a leafref /nsr:ns-instance-config/nsr:nsr/nsr:id";
-        type yang:uuid;
-      }
+             This is a leafref /rw-project:project/nsr:ns-instance-config/nsr:nsr/nsr:id";
+          type yang:uuid;
+        }
 
-      leaf vld-ref {
-        description
-          "Reference to VLD
-           /nsr:ns-instance-config/nsr:nsr[nsr:id=../nsr-id-ref]/nsd/vld:vld/vld:id";
-        type string;
-      }
+        leaf vld-ref {
+          description
+            "Reference to VLD
+           /rw-project:project/nsr:ns-instance-config/nsr:nsr[nsr:id=../nsr-id-ref]
+           /nsd/vld:vld/vld:id";
+          type string;
+        }
 
-      leaf res-id {
-        description "Identifier for resmgr id mapping";
-        type yang:uuid;
-      }
+        leaf res-id {
+          description "Identifier for resmgr id mapping";
+          type yang:uuid;
+        }
 
-      leaf short-name {
-        description "Short name to appear as label in the UI";
-        type string;
-      }
+        leaf short-name {
+          description "Short name to appear as label in the UI";
+          type string;
+        }
 
-      leaf vendor {
-        description "Provider of the VLR.";
-        type string;
-      }
+        leaf vendor {
+          description "Provider of the VLR.";
+          type string;
+        }
 
-      leaf description {
-        description "Description of the VLR.";
-        type string;
-      }
+        leaf description {
+          description "Description of the VLR.";
+          type string;
+        }
 
-      leaf version {
-        description "Version of the VLR";
-        type string;
-      }
+        leaf version {
+          description "Version of the VLR";
+          type string;
+        }
 
-      leaf type {
-        type manotypes:virtual-link-type;
-      }
+        leaf type {
+          type manotypes:virtual-link-type;
+        }
 
-      leaf root-bandwidth {
-        description
+        leaf root-bandwidth {
+          description
             "For ELAN this is the aggregate bandwidth.";
-        type uint64;
-      }
+          type uint64;
+        }
 
-      leaf leaf-bandwidth {
-        description
+        leaf leaf-bandwidth {
+          description
             "For ELAN this is the bandwidth of branches.";
-        type uint64;
-      }
+          type uint64;
+        }
 
-      leaf create-time {
-        description
-          "Creation timestamp of this Virtual Link.
+        leaf create-time {
+          description
+            "Creation timestamp of this Virtual Link.
           The timestamp is expressed as seconds 
           since unix epoch - 1970-01-01T00:00:00Z";
 
-        type uint32;
-      }
+          type uint32;
+        }
 
-      leaf uptime {
-        description
-          "Active period of this Virtual Link.
+        leaf uptime {
+          description
+            "Active period of this Virtual Link.
           Uptime is expressed in seconds";
 
-        type uint32;
-      }
+          type uint32;
+        }
 
-      leaf network-id {
-        description 
+        leaf network-id {
+          description
             "Identifier for the allocated network resource.";
-        type string;
-      }
+          type string;
+        }
 
-      leaf vim-network-name {
-        description
+        leaf vim-network-name {
+          description
             "Name of network in VIM account. This is used to indicate
             pre-provisioned network name in cloud account.";
-        type string;
-      }
-
-      // replicate for pnfd container here
-
-      uses manotypes:provider-network;
-      uses manotypes:ip-profile-info;
-      
-      leaf status {
-        description
-            "Status of the virtual link record.";
-        type enumeration {
-          enum LINK_UP;
-          enum DEGRADED;
-          enum LINK_DOWN;
+          type string;
         }
-      }
-      leaf operational-status {
-        description
-          "The operational status of the Virtual Link
+
+        // replicate for pnfd container here
+
+        uses manotypes:provider-network;
+        uses manotypes:ip-profile-info;
+      
+        leaf status {
+          description
+            "Status of the virtual link record.";
+          type enumeration {
+            enum LINK_UP;
+            enum DEGRADED;
+            enum LINK_DOWN;
+          }
+        }
+        leaf operational-status {
+          description
+            "The operational status of the Virtual Link
             init                 : The VL is in init stat.
             vl-alloc-pending     : The VL alloc is pending in VIM
             running              : The VL is up  and running in VM
@@ -178,14 +189,14 @@
             failed               : The VL instantiation failed in VIM.
           ";
 
-        type enumeration {
-          rwpb:enum-type "VlOperationalStatus";
-          enum init;
-          enum vl-alloc-pending;
-          enum running;
-          enum vl-terminate-pending;
-          enum terminated;
-          enum failed;
+          type enumeration {
+            enum init;
+            enum vl-alloc-pending;
+            enum running;
+            enum vl-terminate-pending;
+            enum terminated;
+            enum failed;
+          }
         }
       }
     }
diff --git a/models/plugins/yang/vnfd-base.yang b/models/plugins/yang/vnfd-base.yang
new file mode 100644
index 0000000..389bc69
--- /dev/null
+++ b/models/plugins/yang/vnfd-base.yang
@@ -0,0 +1,533 @@
+
+/*
+ *
+ *   Copyright 2017 RIFT.IO Inc
+ *
+ *   Licensed under the Apache License, Version 2.0 (the "License");
+ *   you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *       http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *   Unless required by applicable law or agreed to in writing, software
+ *   distributed under the License is distributed on an "AS IS" BASIS,
+ *   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *   See the License for the specific language governing permissions and
+ *   limitations under the License.
+ *
+ *
+ */
+
+module vnfd-base
+{
+  namespace "http://riftio.com/ns/riftware-1.0/vnfd-base";
+  prefix "vnfd-base";
+
+  import mano-types {
+    prefix "manotypes";
+  }
+
+  import ietf-inet-types {
+    prefix "inet";
+  }
+
+  revision 2017-02-28 {
+    description
+      "Initial revision. This YANG file defines
+       the common types for Virtual Network Function
+       (VNF) descriptor";
+    reference
+      "Derived from earlier versions of base YANG files";
+  }
+
+  grouping common-connection-point {
+    leaf name {
+      description "Name of the connection point";
+      type string;
+    }
+
+    leaf id {
+      description "Identifier for the internal connection points";
+      type string;
+    }
+
+    leaf short-name {
+      description "Short name to appear as label in the UI";
+      type string;
+    }
+
+    leaf type {
+      description "Type of the connection point.";
+      type manotypes:connection-point-type;
+    }
+
+    leaf port-security-enabled {
+      description "Enables the port security for the port";
+      type boolean;
+    }
+  }
+
+  typedef interface-type {
+    type enumeration {
+      enum INTERNAL;
+      enum EXTERNAL;
+    }
+  }
+
+  grouping virtual-interface {
+    container virtual-interface {
+      description
+          "Container for the virtual interface properties";
+
+      leaf type {
+        description
+            "Specifies the type of virtual interface
+             between VM and host.
+             VIRTIO          : Use the traditional VIRTIO interface.
+             PCI-PASSTHROUGH : Use PCI-PASSTHROUGH interface.
+             SR-IOV          : Use SR-IOV interface.
+             E1000           : Emulate E1000 interface.
+             RTL8139         : Emulate RTL8139 interface.
+             PCNET           : Emulate PCNET interface.
+             OM-MGMT         : Used to specify openmano mgmt external-connection type";
+
+        type enumeration {
+          enum OM-MGMT;
+          enum PCI-PASSTHROUGH;
+          enum SR-IOV;
+          enum VIRTIO;
+          enum E1000;
+          enum RTL8139;
+          enum PCNET;
+        }
+        default "VIRTIO";
+      }
+
+      leaf vpci {
+        description
+            "Specifies the virtual PCI address. Expressed in
+             the following format dddd:dd:dd.d. For example
+             0000:00:12.0. This information can be used to
+             pass as metadata during the VM creation.";
+        type string;
+      }
+
+      leaf bandwidth {
+        description
+            "Aggregate bandwidth of the NIC.";
+        type uint64;
+      }
+    }
+  }
+
+  grouping vnfd-descriptor {
+      leaf id {
+        description "Identifier for the VNFD.";
+        type string {
+          length "1..63";
+        }
+      }
+
+      leaf name {
+        description "VNFD name.";
+        mandatory true;
+        type string;
+      }
+
+      leaf short-name {
+        description "Short name to appear as label in the UI";
+        type string;
+      }
+
+      leaf vendor {
+        description "Vendor of the VNFD.";
+        type string;
+      }
+
+      leaf logo {
+        description
+            "Vendor logo for the Virtual Network Function";
+        type string;
+      }
+
+      leaf description {
+        description "Description of the VNFD.";
+        type string;
+      }
+
+      leaf version {
+        description "Version of the VNFD";
+        type string;
+      }
+
+      uses manotypes:vnf-configuration;
+
+      container mgmt-interface {
+        description
+            "Interface over which the VNF is managed.";
+
+        choice endpoint-type {
+          description
+              "Indicates the type of management endpoint.";
+
+          case ip {
+            description
+                "Specifies the static IP address for managing the VNF.";
+            leaf ip-address {
+              type inet:ip-address;
+            }
+          }
+
+          case vdu-id {
+            description
+                "Use the default management interface on this VDU.";
+            leaf vdu-id {
+              type leafref {
+                path "../../vdu/id";
+              }
+            }
+          }
+
+          case cp {
+            description
+                "Use the ip address associated with this connection point.";
+            leaf cp {
+              type leafref {
+                path "../../connection-point/name";
+              }
+            }
+          }
+        }
+
+        leaf port {
+          description
+              "Port for the management interface.";
+          type inet:port-number;
+        }
+
+        container dashboard-params {
+          description "Parameters for the VNF dashboard";
+
+          leaf path {
+            description "The HTTP path for the dashboard";
+            type string;
+          }
+
+          leaf https {
+            description "Pick HTTPS instead of HTTP , Default is false";
+            type boolean;
+          }
+
+          leaf port {
+            description "The HTTP port for the dashboard";
+            type inet:port-number;
+          }
+        }
+      }
+
+      list internal-vld {
+        key "id";
+        description
+          "List of Internal Virtual Link Descriptors (VLD).
+          The internal VLD describes the basic topology of
+          the connectivity such as E-LAN, E-Line, E-Tree.
+          between internal VNF components of the system.";
+
+        leaf id {
+          description "Identifier for the VLD";
+          type string;
+        }
+
+        leaf name {
+          description "Name of the internal VLD";
+          type string;
+        }
+
+        leaf short-name {
+          description "Short name to appear as label in the UI";
+          type string;
+        }
+
+        leaf description {
+          type string;
+        }
+
+        leaf type {
+          type manotypes:virtual-link-type;
+        }
+
+        leaf root-bandwidth {
+          description
+              "For ELAN this is the aggregate bandwidth.";
+          type uint64;
+        }
+
+        leaf leaf-bandwidth {
+          description
+              "For ELAN this is the bandwidth of branches.";
+          type uint64;
+        }
+
+        list internal-connection-point {
+          key "id-ref";
+          description "List of internal connection points in this VLD";
+          leaf id-ref {
+            description "reference to the internal connection point id";
+            type leafref {
+              path "../../../vdu/internal-connection-point/id";
+            }
+          }
+        }
+
+        uses manotypes:provider-network;
+        choice init-params {
+          description "Extra parameters for VLD instantiation";
+
+          case vim-network-ref {
+            leaf vim-network-name {
+              description
+                  "Name of network in VIM account. This is used to indicate
+                    pre-provisioned network name in cloud account.";
+              type string;
+            }
+          }
+
+          case vim-network-profile {
+            leaf ip-profile-ref {
+              description "Named reference to IP-profile object";
+              type string;
+            }
+          }
+
+        }
+      }
+
+      uses manotypes:ip-profile-list;
+
+      list connection-point {
+        key "name";
+        description
+          "List for external connection points. Each VNF has one
+          or more external connection points that connect the VNF
+          to other VNFs or to external networks. Each VNF exposes
+          connection points to the orchestrator, which can construct
+          network services by connecting the connection points
+          between different VNFs. The NFVO will use VLDs and VNFFGs
+          at the network service level to construct network services.";
+
+        uses common-connection-point;
+      }
+
+      list vdu {
+        description "List of Virtual Deployment Units";
+        key "id";
+
+        leaf id {
+          description "Unique id for the VDU";
+          type string;
+        }
+
+        leaf name {
+          description "Unique name for the VDU";
+          type string;
+        }
+
+        leaf description {
+            description "Description of the VDU.";
+            type string;
+        }
+
+        leaf count {
+          description "Number of instances of VDU";
+          type uint64;
+        }
+
+        leaf mgmt-vpci {
+          description
+              "Specifies the virtual PCI address. Expressed in
+             the following format dddd:dd:dd.d. For example
+             0000:00:12.0. This information can be used to
+             pass as metadata during the VM creation.";
+          type string;
+        }
+
+        uses manotypes:vm-flavor;
+        uses manotypes:guest-epa;
+        uses manotypes:vswitch-epa;
+        uses manotypes:hypervisor-epa;
+        uses manotypes:host-epa;
+        uses manotypes:image-properties;
+
+        choice cloud-init-input {
+          description
+            "Indicates how the contents of cloud-init script are provided.
+             There are 2 choices - inline or in a file";
+
+          case inline {
+            leaf cloud-init {
+              description
+                "Contents of cloud-init script, provided inline, in cloud-config format";
+              type string;
+            }
+          }
+
+          case filename {
+            leaf cloud-init-file {
+              description
+                "Name of file with contents of cloud-init script in cloud-config format";
+                type string;
+            }
+          }
+        }
+
+        uses manotypes:supplemental-boot-data;
+
+        list internal-connection-point {
+          key "id";
+          description
+            "List for internal connection points. Each VNFC
+            has zero or more internal connection points.
+            Internal connection points are used for connecting
+            the VNF with components internal to the VNF. If a VNF
+            has only one VNFC, it may not have any internal
+            connection points.";
+
+          uses common-connection-point;
+
+          leaf internal-vld-ref {
+            type leafref {
+              path "../../../internal-vld/id";
+            }
+          }
+        }
+
+        list interface {
+          description
+              "List of Interfaces (external and internal) for the VNF";
+          key name;
+
+          leaf name {
+            description
+                "Name of the interface. Note that this
+                name has only local significance to the VDU.";
+            type string;
+          }
+
+          leaf position {
+            description
+                "Explicit Position of the interface within the list";
+            type uint32;
+          }
+
+          leaf type {
+            description
+                "Type of the Interface";
+            type interface-type;
+
+            default "EXTERNAL";
+          }
+
+          choice connection-point-type {
+            case internal {
+              leaf internal-connection-point-ref {
+                description
+                    "Leaf Ref to the particular internal connection point";
+                type leafref {
+                   path "../../internal-connection-point/id";
+                 }
+              }
+            }
+            case external {
+              leaf external-connection-point-ref {
+                description
+                    "Leaf Ref to the particular external connection point";
+                type leafref {
+                   path "../../../connection-point/name";
+                 }
+              }
+            }
+          }
+
+          uses virtual-interface;
+        }
+
+
+        list volumes {
+          key "name";
+
+          leaf name {
+            description "Name of the disk-volumes, e.g. vda, vdb etc";
+            type string;
+          }
+
+          uses manotypes:volume-info;
+        }
+      }
+
+      list vdu-dependency {
+        description
+            "List of VDU dependencies.";
+
+        key vdu-source-ref;
+        leaf vdu-source-ref {
+          type leafref {
+            path "../../vdu/id";
+          }
+        }
+
+        leaf vdu-depends-on-ref {
+          description
+            "Reference to the VDU on which
+            the source VDU depends.";
+          type leafref {
+            path "../../vdu/id";
+          }
+        }
+      }
+
+      leaf service-function-chain {
+        description "Type of node in Service Function Chaining Architecture";
+
+        type enumeration {
+          enum UNAWARE;
+          enum CLASSIFIER;
+          enum SF;
+          enum SFF;
+        }
+        default "UNAWARE";
+      }
+
+      leaf service-function-type {
+        description
+          "Type of Service Function.
+           NOTE: This needs to map with Service Function Type in ODL to
+           support VNFFG. Service Function Type is mandatory param in ODL
+           SFC. This is temporarily set to string for ease of use";
+        type string;
+      }
+
+      uses manotypes:monitoring-param;
+
+      list placement-groups {
+        description "List of placement groups at VNF level";
+
+        key "name";
+        uses manotypes:placement-group-info;
+
+        list member-vdus {
+
+          description
+              "List of VDUs that are part of this placement group";
+          key "member-vdu-ref";
+
+          leaf member-vdu-ref {
+            type leafref {
+              path "../../../vdu/id";
+            }
+          }
+        }
+      }
+  }
+}
+
+// vim: sw=2
diff --git a/models/plugins/yang/vnfd.yang b/models/plugins/yang/vnfd.yang
index 51bb9f7..7d487ca 100644
--- a/models/plugins/yang/vnfd.yang
+++ b/models/plugins/yang/vnfd.yang
@@ -1,7 +1,7 @@
 
 /*
  *
- *   Copyright 2016 RIFT.IO Inc
+ *   Copyright 2016-2017 RIFT.IO Inc
  *
  *   Licensed under the Apache License, Version 2.0 (the "License");
  *   you may not use this file except in compliance with the License.
@@ -23,20 +23,13 @@
   namespace "urn:ietf:params:xml:ns:yang:nfvo:vnfd";
   prefix "vnfd";
 
-  import mano-types {
-    prefix "manotypes";
+  import vnfd-base {
+    prefix "vnfd-base";
   }
 
-  import rw-pb-ext {
-    prefix "rwpb";
-  }
-
-  import ietf-yang-types {
-    prefix "yang";
-  }
-
-  import ietf-inet-types {
-    prefix "inet";
+  revision 2017-02-28 {
+    description
+      "Update model to support projects.";
   }
 
   revision 2015-09-10 {
@@ -47,490 +40,15 @@
       "Derived from earlier versions of base YANG files";
   }
 
-  grouping common-connection-point {
-    leaf name {
-      description "Name of the connection point";
-      type string;
-    }
-
-    leaf id {
-      description "Identifier for the internal connection points";
-      type string;
-    }
-
-    leaf short-name {
-      description "Short name to appear as label in the UI";
-      type string;
-    }
-
-    leaf type {
-      description "Type of the connection point.";
-      type manotypes:connection-point-type;
-    }
-    leaf port-security-enabled {
-      description "Enables the port security for the port";
-      type boolean;
-    }
-  }
-
-  grouping virtual-interface {
-    container virtual-interface {
-      description
-          "Container for the virtual interface properties";
-
-      leaf type {
-        description
-            "Specifies the type of virtual interface
-             between VM and host.
-             VIRTIO          : Use the traditional VIRTIO interface.
-             PCI-PASSTHROUGH : Use PCI-PASSTHROUGH interface.
-             SR-IOV          : Use SR-IOV interface.
-             E1000           : Emulate E1000 interface.
-             RTL8139         : Emulate RTL8139 interface.
-             PCNET           : Emulate PCNET interface.
-             OM-MGMT         : Used to specify openmano mgmt external-connection type";
-
-        type enumeration {
-          enum OM-MGMT;
-          enum PCI-PASSTHROUGH;
-          enum SR-IOV;
-          enum VIRTIO;
-          enum E1000;
-          enum RTL8139;
-          enum PCNET;
-        }
-        default "VIRTIO";
-      }
-
-      leaf vpci {
-        description
-            "Specifies the virtual PCI address. Expressed in
-             the following format dddd:dd:dd.d. For example
-             0000:00:12.0. This information can be used to
-             pass as metadata during the VM creation.";
-        type string;
-      }
-
-      leaf bandwidth {
-        description
-            "Aggregate bandwidth of the NIC.";
-        type uint64;
-      }
-    }
-  }
-
-  grouping vnfd-descriptor {
-      leaf id {
-        description "Identifier for the VNFD.";
-        type string;
-      }
-
-      leaf name {
-        description "VNFD name.";
-        mandatory true;
-        type string;
-      }
-
-      leaf short-name {
-        description "Short name to appear as label in the UI";
-        type string;
-      }
-
-      leaf vendor {
-        description "Vendor of the VNFD.";
-        type string;
-      }
-
-      leaf logo {
-        description
-            "Vendor logo for the Virtual Network Function";
-        type string;
-      }
-
-      leaf description {
-        description "Description of the VNFD.";
-        type string;
-      }
-
-      leaf version {
-        description "Version of the VNFD";
-        type string;
-      }
-
-      uses manotypes:vnf-configuration;
-
-      container mgmt-interface {
-        description
-            "Interface over which the VNF is managed.";
-
-        choice endpoint-type {
-          description
-              "Indicates the type of management endpoint.";
-
-          case ip {
-            description
-                "Specifies the static IP address for managing the VNF.";
-            leaf ip-address {
-              type inet:ip-address;
-            }
-          }
-
-          case vdu-id {
-            description
-                "Use the default management interface on this VDU.";
-            leaf vdu-id {
-              type leafref {
-                path "../../vdu/id";
-              }
-            }
-          }
-
-          case cp {
-            description
-                "Use the ip address associated with this connection point.";
-            leaf cp {
-              type leafref {
-                path "../../connection-point/name";
-              }
-            }
-          }
-        }
-
-        leaf port {
-          description
-              "Port for the management interface.";
-          type inet:port-number;
-        }
-
-        container dashboard-params {
-          description "Parameters for the VNF dashboard";
-
-          leaf path {
-            description "The HTTP path for the dashboard";
-            type string;
-          }
-
-          leaf https {
-            description "Pick HTTPS instead of HTTP , Default is false";
-            type boolean;
-          }
-
-          leaf port {
-            description "The HTTP port for the dashboard";
-            type inet:port-number;
-          }
-        }
-      }
-
-      list internal-vld {
-        key "id";
-        description
-            "List of Internal Virtual Link Descriptors (VLD).
-            The internal VLD describes the basic topology of
-            the connectivity such as E-LAN, E-Line, E-Tree.
-            between internal VNF components of the system.";
-
-        leaf id {
-          description "Identifier for the VLD";
-          type string;
-        }
-
-        leaf name {
-          description "Name of the internal VLD";
-          type string;
-        }
-
-        leaf short-name {
-          description "Short name to appear as label in the UI";
-          type string;
-        }
-
-        leaf description {
-          description "Description of internal VLD.";
-          type string;
-        }
-
-        leaf type {
-          type manotypes:virtual-link-type;
-        }
-
-        leaf root-bandwidth {
-          description
-              "For ELAN this is the aggregate bandwidth.";
-          type uint64;
-        }
-
-        leaf leaf-bandwidth {
-          description
-              "For ELAN this is the bandwidth of branches.";
-          type uint64;
-        }
-
-        list internal-connection-point {
-          key "id-ref";
-          description "List of internal connection points in this VLD";
-          leaf id-ref {
-            description "reference to the internal connection point id";
-            type leafref {
-              path "../../../vdu/internal-connection-point/id";
-            }
-          }
-        }
-        uses manotypes:provider-network;
-        choice init-params {
-          description "Extra parameters for VLD instantiation";
-
-          case vim-network-ref {
-            leaf vim-network-name {
-              description
-                  "Name of network in VIM account. This is used to indicate
-                    pre-provisioned network name in cloud account.";
-              type string;
-            }
-          }
-
-          case vim-network-profile {
-            leaf ip-profile-ref {
-              description "Named reference to IP-profile object";
-              type leafref {
-                path "../../ip-profiles/name";
-              }
-            }
-          }
-        }
-      }
-
-      uses manotypes:ip-profile-list;
-
-      list connection-point {
-        key "name";
-        description
-            "List for external connection points. Each VNF has one
-            or more external connection points that connect the VNF
-            to other VNFs or to external networks. Each VNF exposes
-            connection points to the orchestrator, which can construct
-            network services by connecting the connection points
-            between different VNFs. The NFVO will use VLDs and VNFFGs
-            at the network service level to construct network services.";
-
-        uses common-connection-point;
-      }
-
-      list vdu {
-        description "List of Virtual Deployment Units";
-        key "id";
-
-        leaf id {
-          description "Unique id for the VDU";
-          type string;
-        }
-
-        leaf name {
-          description "Unique name for the VDU";
-          type string;
-        }
-
-        leaf description {
-            description "Description of the VDU.";
-            type string;
-        }
-
-        leaf count {
-          description "Number of instances of VDU";
-          type uint64;
-        }
-
-        leaf mgmt-vpci {
-          description
-              "Specifies the virtual PCI address. Expressed in
-             the following format dddd:dd:dd.d. For example
-             0000:00:12.0. This information can be used to
-             pass as metadata during the VM creation.";
-          type string;
-        }
-
-        uses manotypes:vm-flavor;
-        uses manotypes:guest-epa;
-        uses manotypes:vswitch-epa;
-        uses manotypes:hypervisor-epa;
-        uses manotypes:host-epa;
-
-        list alarm {
-          key "alarm-id";
-
-          uses manotypes:alarm;
-        }
-
-        uses manotypes:image-properties;
-
-        choice cloud-init-input {
-          description
-              "Indicates how the contents of cloud-init script are provided.
-              There are 2 choices - inline or in a file";
-
-          case inline {
-            leaf cloud-init {
-              description
-                  "Contents of cloud-init script, provided inline, in cloud-config format";
-              type string;
-            }
-          }
-
-          case filename {
-            leaf cloud-init-file {
-              description
-                  "Name of file with contents of cloud-init script in cloud-config format";
-              type string;
-            }
-          }
-        }
-
-        uses manotypes:supplemental-boot-data;
-
-        list internal-connection-point {
-          key "id";
-          description
-              "List for internal connection points. Each VNFC
-              has zero or more internal connection points.
-              Internal connection points are used for connecting
-              the VNF with components internal to the VNF. If a VNF
-              has only one VNFC, it may not have any internal
-              connection points.";
-
-          uses common-connection-point;
-        }
-
-        list internal-interface {
-          description
-              "List of internal interfaces for the VNF";
-          key name;
-
-          leaf name {
-            description
-                "Name of internal interface. Note that this
-                name has only local significance to the VDU.";
-            type string;
-          }
-
-          leaf vdu-internal-connection-point-ref {
-            type leafref {
-              path "../../internal-connection-point/id";
-            }
-          }
-          uses virtual-interface;
-        }
-
-        list external-interface {
-          description
-              "List of external interfaces for the VNF.
-              The external interfaces enable sending
-              traffic to and from VNF.";
-          key name;
-
-          leaf name {
-            description
-                "Name of the external interface. Note that
-                this name has only local significance to
-                the VDU.";
-            type string;
-          }
-
-          leaf vnfd-connection-point-ref {
-            description
-              "Name of the external connection point.";
-            type leafref {
-              path "../../../connection-point/name";
-            }
-          }
-          uses virtual-interface;
-        }
-
-        list volumes {
-          key "name";
-
-          leaf name {
-            description "Name of the disk-volumes, e.g. vda, vdb etc";
-            type string;
-          }
-
-          uses manotypes:volume-info;
-        }
-      }
-
-      list vdu-dependency {
-        description
-            "List of VDU dependencies.";
-
-        key vdu-source-ref;
-        leaf vdu-source-ref {
-          type leafref {
-            path "../../vdu/id";
-          }
-        }
-
-        leaf vdu-depends-on-ref {
-          description
-              "Reference to the VDU on which
-              the source VDU depends.";
-          type leafref {
-            path "../../vdu/id";
-          }
-        }
-      }
-
-      leaf service-function-chain {
-        description "Type of node in Service Function Chaining Architecture";
-
-        type enumeration {
-          enum UNAWARE;
-          enum CLASSIFIER;
-          enum SF;
-          enum SFF;
-        }
-        default "UNAWARE";
-      }
-
-      leaf service-function-type {
-        description
-            "Type of Service Function.
-             NOTE: This needs to map with Service Function Type in ODL to
-             support VNFFG. Service Function Type is mandatory param in ODL
-             SFC. This is temporarily set to string for ease of use";
-            type string;
-      }
-
-      uses manotypes:monitoring-param;
-
-      list placement-groups {
-        description "List of placement groups at VNF level";
-
-        key "name";
-        uses manotypes:placement-group-info;
-
-        list member-vdus {
-
-          description
-              "List of VDUs that are part of this placement group";
-          key "member-vdu-ref";
-
-          leaf member-vdu-ref {
-            type leafref {
-              path "../../../vdu/id";
-            }
-          }
-        }
-      }
-  }
-
   container vnfd-catalog {
     description
-        "Virtual Network Function Descriptor (VNFD).";
+      "Virtual Network Function Descriptor (VNFD).";
 
     list vnfd {
       key "id";
 
-      uses vnfd-descriptor;
-     }
+        uses vnfd-base:vnfd-descriptor;
+    }
   }
 }
 
diff --git a/models/plugins/yang/vnffgd.yang b/models/plugins/yang/vnffgd.yang
index 99347ae..254bca2 100644
--- a/models/plugins/yang/vnffgd.yang
+++ b/models/plugins/yang/vnffgd.yang
@@ -1,7 +1,7 @@
 
 /*
  * 
- *   Copyright 2016 RIFT.IO Inc
+ *   Copyright 2016-2017 RIFT.IO Inc
  *
  *   Licensed under the Apache License, Version 2.0 (the "License");
  *   you may not use this file except in compliance with the License.
@@ -23,10 +23,6 @@
   namespace "urn:ietf:params:xml:ns:yang:nfvo:vnffgd";
   prefix "vnffgd";
 
-  import rw-pb-ext {
-    prefix "rwpb";
-  }
-
   import ietf-inet-types {
     prefix "inet";
   }
@@ -39,6 +35,15 @@
     prefix "manotypes";
   }
 
+  import rw-project {
+    prefix "rw-project";
+  }
+
+  revision 2017-02-08 {
+    description
+      "Update model to support projects.";
+  }
+
   revision 2014-10-27 {
     description
       "Initial revision. This YANG file defines 
@@ -47,37 +52,39 @@
       "Derived from earlier versions of base YANG files";
   }
 
-  container vnffgd-catalog {
+  augment "/rw-project:project" {
+    container vnffgd-catalog {
 
-    list vnffgd {
-      key "id";
+      list vnffgd {
+        key "id";
 
-      leaf name {
-        description "VNF Forwarding Graph Descriptor name.";
-        type string;
+        leaf name {
+          description "VNF Forwarding Graph Descriptor name.";
+          type string;
+        }
+
+        leaf id {
+          description "Identifier for the VNFFGD.";
+          type yang:uuid;
+        }
+
+        leaf provider {
+          description "Provider of the VNFFGD.";
+          type string;
+        }
+
+        leaf description {
+          description "Description of the VNFFGD.";
+          type string;
+        }
+
+        leaf version {
+          description "Version of the VNFFGD";
+          type string;
+        }
+
+        //TODO: Add more content here
       }
-
-      leaf id {
-        description "Identifier for the VNFFGD.";
-        type yang:uuid;
-      }
-
-      leaf provider {
-        description "Provider of the VNFFGD.";
-        type string;
-      }
-
-      leaf description {
-        description "Description of the VNFFGD.";
-        type string;
-      }
-
-      leaf version {
-        description "Version of the VNFFGD";
-        type string;
-      }
-
-      //TODO: Add more content here
     }
   }
 }
diff --git a/models/plugins/yang/vnfr.role.xml b/models/plugins/yang/vnfr.role.xml
new file mode 100644
index 0000000..c61751f
--- /dev/null
+++ b/models/plugins/yang/vnfr.role.xml
@@ -0,0 +1,42 @@
+<?xml version="1.0" ?>
+<config xmlns="http://riftio.com/ns/riftware-1.0/rw-rbac-role-def">
+  <key-definition>
+    <role>rw-project-mano:vnfr-role</role>
+    <key-set>
+      <name>project-name</name>
+      <path>/rw-project:project/rw-project:name</path>
+      <path>/vnfr:create-alarm/vnfr:project-name</path>
+      <path>/vnfr:destroy-alarm/vnfr:project-name</path>
+    </key-set>
+  </key-definition>
+
+  <role-definition>
+    <role>rw-project-mano:lcm-oper</role>
+    <keys-role>rw-project-mano:vnfr-role</keys-role>
+    <authorize>
+      <permissions>read execute</permissions>
+      <path>/rw-project:project/vnfr:vnfr-catalog</path>
+    </authorize>
+  </role-definition>
+
+  <role-definition>
+    <role>rw-project-mano:lcm-admin</role>
+    <keys-role>rw-project-mano:vnfr-role</keys-role>
+    <authorize>
+      <permissions>create read update delete execute</permissions>
+      <path>/rw-project:project/vnfr:vnfr-catalog</path>
+      <path>/vnfr:create-alarm</path>
+      <path>/vnfr:destroy-alarm</path>
+    </authorize>
+  </role-definition>
+
+  <role-definition>
+    <role>rw-project:project-admin</role>
+    <keys-role>rw-project-mano:vnfr-role</keys-role>
+    <authorize>
+      <permissions>create read update delete execute</permissions>
+      <path>/vnfr:create-alarm</path>
+      <path>/vnfr:destroy-alarm</path>
+    </authorize>
+  </role-definition>
+</config>
diff --git a/models/plugins/yang/vnfr.tailf.yang b/models/plugins/yang/vnfr.tailf.yang
index 150dc9a..ef266a1 100644
--- a/models/plugins/yang/vnfr.tailf.yang
+++ b/models/plugins/yang/vnfr.tailf.yang
@@ -1,7 +1,7 @@
 
 /*
  * 
- *   Copyright 2016 RIFT.IO Inc
+ *   Copyright 2016-2017 RIFT.IO Inc
  *
  *   Licensed under the Apache License, Version 2.0 (the "License");
  *   you may not use this file except in compliance with the License.
@@ -31,7 +31,11 @@
     prefix vnfr;
   }
 
-  tailf:annotate "/vnfr:vnfr-catalog" {
+  import rw-project {
+    prefix "rw-project";
+  }
+
+  tailf:annotate "/rw-project:project/vnfr:vnfr-catalog" {
     tailf:callpoint rw_callpoint;
   }
 
diff --git a/models/plugins/yang/vnfr.yang b/models/plugins/yang/vnfr.yang
index f228f1d..9e12032 100644
--- a/models/plugins/yang/vnfr.yang
+++ b/models/plugins/yang/vnfr.yang
@@ -1,7 +1,7 @@
 
 /*
- * 
- *   Copyright 2016 RIFT.IO Inc
+ *
+ *   Copyright 2016-2017 RIFT.IO Inc
  *
  *   Licensed under the Apache License, Version 2.0 (the "License");
  *   you may not use this file except in compliance with the License.
@@ -27,16 +27,16 @@
     prefix "manotypes";
   }
 
-  import rw-pb-ext {
-    prefix "rwpb";
+  import vnfd-base {
+    prefix "vnfd-base";
   }
 
-  import vnfd {
-    prefix "vnfd";
+  import project-vnfd {
+    prefix "project-vnfd";
   }
 
-  import nsd {
-    prefix "nsd";
+  import project-nsd {
+    prefix "project-nsd";
   }
 
   import vlr {
@@ -51,6 +51,19 @@
     prefix "inet";
   }
 
+  import rw-project {
+    prefix "rw-project";
+  }
+
+  import rw-cloud {
+    prefix "rw-cloud";
+  }
+
+  revision 2017-02-28 {
+    description
+      "Update model to support projects.";
+  }
+
   revision 2015-09-10 {
     description
       "Initial revision. This YANG file defines
@@ -59,6 +72,34 @@
       "Derived from earlier versions of base YANG files";
   }
 
+  typedef vdu-operational-status {
+    type enumeration {
+      enum init;
+      enum vm-init-phase;
+      enum vm-alloc-pending;
+      enum running;
+      enum terminate;
+      enum vl-terminate-phase;
+      enum terminated;
+      enum failed;
+    }
+  }
+
+  typedef vnf-operational-status {
+    type enumeration {
+      enum pre-init;
+      enum init;
+      enum vl-init-phase;
+      enum vm-init-phase;
+      enum running;
+      enum terminate;
+      enum vm-terminate-phase;
+      enum vl-terminate-phase;
+      enum terminated;
+      enum failed;
+    }
+  }
+
   grouping placement-group-info {
     list placement-groups-info {
       description
@@ -69,10 +110,9 @@
       key "name";
       uses manotypes:placement-group-info;
       uses manotypes:placement-group-input;
-    }  
+    }
   }
-  
-  
+
   grouping virtual-interface {
     container virtual-interface {
       description
@@ -133,118 +173,164 @@
     }
   }
 
-  container vnfr-catalog {
-    config false;
-    list vnfr {
-      description
-          "Virtual Network Function Record (VNFR).";
-      key "id";
-      unique "name";
+  grouping associated-virtual-cps {
+    list virtual-cps {
+      key "name";
+      uses vnfd-base:common-connection-point;
 
-      leaf id {
-        description "Identifier for the VNFR.";
-        type yang:uuid;
+      leaf ip-address {
+        description
+            "IP address assigned to the virtual connection point";
+        type inet:ip-address;
       }
 
-      leaf nsr-id-ref {
+      leaf mac-address {
         description
+            "MAC address assigned to the virtual connection point";
+        type string;
+      }
+
+      leaf connection-point-id {
+        description "VIM identifier for connection point";
+        type string;
+      }
+    }
+  }
+
+  augment "/rw-project:project" {
+    container vnfr-catalog {
+      config false;
+      list vnfr {
+        description
+          "Virtual Network Function Record (VNFR).";
+        key "id";
+        unique "name";
+
+        leaf id {
+          description "Identifier for the VNFR.";
+          type yang:uuid;
+        }
+
+        leaf nsr-id-ref {
+          description
             "NS instance identifier.
              This is a leafref /nsr:ns-instance-config/nsr:nsr/nsr:id";
-        type yang:uuid;
-      }
-
-      leaf member-vnf-index-ref {
-        description "Reference to member VNF index in Network service.";
-        type leafref {
-          path "/nsd:nsd-catalog/nsd:nsd/nsd:constituent-vnfd/nsd:member-vnf-index";
+          type yang:uuid;
         }
-      }
 
-      leaf dashboard-url {
-        description "Dashboard URL";
-        type inet:uri;
-      }
+        leaf member-vnf-index-ref {
+          description "Reference to member VNF index in Network service.";
+          type leafref {
+            path "../../../project-nsd:nsd-catalog/project-nsd:nsd/project-nsd:constituent-vnfd/project-nsd:member-vnf-index";
+          }
+        }
 
-      leaf name {
-        description "VNFR name.";
-        type string;
-      }
+        leaf dashboard-url {
+          description "Dashboard URL";
+          type inet:uri;
+        }
 
-      leaf short-name {
-        description "VNFR short name.";
-        type string;
-      }
+        leaf name {
+          description "VNFR name.";
+          type string;
+        }
 
-      leaf vendor {
-        description "Vendor of the VNFR.";
-        type string;
-      }
+        leaf short-name {
+          description "VNFR short name.";
+          type string;
+        }
 
-      leaf description {
-        description "Description of the VNFR.";
-        type string;
-      }
+        leaf vendor {
+          description "Vendor of the VNFR.";
+          type string;
+        }
 
-      leaf version {
-        description "Version of the VNFR";
-        type string;
-      }
+        leaf description {
+          description "Description of the VNFR.";
+          type string;
+        }
 
-      leaf create-time {
-        description
-          "Creation timestamp of this Virtual Network 
-          Function.  The timestamp is expressed as 
+        leaf version {
+          description "Version of the VNFR";
+          type string;
+        }
+
+        leaf create-time {
+          description
+            "Creation timestamp of this Virtual Network
+          Function.  The timestamp is expressed as
           seconds since unix epoch - 1970-01-01T00:00:00Z";
 
-        type uint32;
-      }
+          type uint32;
+        }
 
-      leaf uptime {
-        description
-          "Active period of this Virtual Network Function.
+        leaf uptime {
+          description
+            "Active period of this Virtual Network Function.
           Uptime is expressed in seconds";
 
-        type uint32;
-      }
-
-      container vnfd {
-        description "VNF descriptor used to instantiate this VNF";
-        uses vnfd:vnfd-descriptor;
-      }
-
-      // Use parameters provided here to configure this VNF
-      uses manotypes:vnf-configuration;
-
-      // Mainly used by Mon-params & dashboard url
-      container mgmt-interface {
-        leaf ip-address {
-          type inet:ip-address;
+          type uint32;
         }
-        leaf port {
-          type inet:port-number;
+
+        container vnfd {
+          description "VNF descriptor used to instantiate this VNF";
+          uses vnfd-base:vnfd-descriptor;
         }
-      }
 
-      list internal-vlr {
-        key "vlr-ref";
-
-        leaf vlr-ref {
-          description "Reference to a VLR record in the VLR catalog";
+        leaf vnfd-ref {
+          description "Reference to VNFD";
           type leafref {
-            path "/vlr:vlr-catalog/vlr:vlr/vlr:id";
+            path "../../../project-vnfd:vnfd-catalog/project-vnfd:vnfd/project-vnfd:id";
           }
         }
 
-        leaf-list internal-connection-point-ref {
-          type leafref {
-            path "../../vdur/internal-connection-point/id";
+        // Use parameters provided here to configure this VNF
+        uses manotypes:vnf-configuration;
+
+        // Mainly used by Mon-params & dashboard url
+        container mgmt-interface {
+          leaf ip-address {
+            type inet:ip-address;
+          }
+
+          leaf port {
+            type inet:port-number;
+          }
+
+          container ssh-key {
+            description "SSH key pair used for this VNF";
+            leaf public-key {
+              description "Public key configured on this VNF";
+              type string;
+            }
+
+            leaf private-key-file {
+              description "Path to the private key file";
+              type string;
+            }
           }
         }
-      }
 
-      list connection-point {
-        key "name";
-        description
+        list internal-vlr {
+          key "vlr-ref";
+
+          leaf vlr-ref {
+            description "Reference to a VLR record in the VLR catalog";
+            type leafref {
+              path "../../../../vlr:vlr-catalog/vlr:vlr/vlr:id";
+            }
+          }
+
+          leaf-list internal-connection-point-ref {
+            type leafref {
+              path "../../vdur/internal-connection-point/id";
+            }
+          }
+        }
+
+        list connection-point {
+          key "name";
+          description
             "List for external connection points. Each VNF has one
              or more external connection points. As the name
              implies that external connection points are used for
@@ -255,129 +341,121 @@
              different VNFs. The NFVO will use VLDs and VNFFGs at
              the network service level to construct network services.";
 
-        uses vnfd:common-connection-point;
+          uses vnfd-base:common-connection-point;
 
-        leaf vlr-ref {
-          description
+          leaf vlr-ref {
+            description
               "Reference to the VLR associated with this connection point";
-          type  leafref {
-            path "/vlr:vlr-catalog/vlr:vlr/vlr:id";
+            type  leafref {
+              path "../../../../vlr:vlr-catalog/vlr:vlr/vlr:id";
+            }
           }
-        }
 
-        leaf ip-address {
-          description
+          leaf ip-address {
+            description
               "IP address assigned to the external connection point";
-          type inet:ip-address;
-        }
-        leaf mac-address {
-          description
-              "MAC address assigned to the external connection point";
-          // type inet:mac-address;
-          type string;
-        }
-        leaf connection-point-id {
-          rwpb:field-inline "true";
-          rwpb:field-string-max 64;
-          type string;
-        }
-      }
-
-      list vdur {
-        description "List of Virtual Deployment Units";
-        key "id";
-        unique "name";
-
-        leaf id {
-          description "Unique id for the VDU";
-          type yang:uuid;
-        }
-
-        leaf name {
-          description "name of the instantiated VDUR";
-          type string;
-        }
-
-        leaf unique-short-name {
-          description "Short Unique name of the VDU
-                This will be of the format NSR name-ShortnedString-VDUname
-                NSR name and VDU name shall be constrained to 10 characters";
-          rwpb:field-inline "true";
-          rwpb:field-string-max 64;
-          type string;
-        }
-
-        leaf vdu-id-ref {
-          type leafref {
-            path "../../vnfd/vdu/id";
+            type inet:ip-address;
           }
+
+          leaf mac-address {
+            description
+              "MAC address assigned to the external connection point";
+            // type inet:mac-address;
+            type string;
+          }
+
+          leaf connection-point-id {
+            type string;
+          }
+
+          uses associated-virtual-cps;
         }
 
-        leaf vim-id {
-          description "Allocated VM resource id";
-          type string;
-        }
+        list vdur {
+          description "List of Virtual Deployment Units";
+          key "id";
+          unique "name";
 
-        leaf flavor-id {
-          description "VIM assigned flavor id";
-          type string;
-        }
-
-        leaf image-id {
-          description "VIM assigned image id";
-          type string;
-        }
-
-        leaf management-ip {
-          description "Management IP address";
-          type inet:ip-address;
-        }
-
-        leaf vm-management-ip {
-          description "VM Private Management IP address";
-          type inet:ip-address;
-        }
-
-        leaf console-url {
-          description "Console URL for this VDU, if available";
-          type inet:uri;
-        }
-
-        uses manotypes:vm-flavor;
-        uses manotypes:guest-epa;
-        uses manotypes:vswitch-epa;
-        uses manotypes:hypervisor-epa;
-        uses manotypes:host-epa;
-
-        uses manotypes:supplemental-boot-data;
-
-        list volumes {
-          key "name";
+          leaf id {
+            description "Unique id for the VDU";
+            type yang:uuid;
+          }
 
           leaf name {
-            description "Name of the disk-volumes, e.g. vda, vdb etc";
+            description "name of the instantiated VDUR";
             type string;
           }
 
-          leaf volume-id {
-            description "VIM assigned volume id";
+          leaf unique-short-name {
+            description "Short Unique name of the VDU
+                  This will be of the format NSR name-ShortnedString-VDUname
+                  NSR name and VDU name shall be constrained to 10 characters";
             type string;
           }
 
-          uses manotypes:volume-info;
-        }
+          leaf vdu-id-ref {
+            type leafref {
+              path "../../vnfd/vdu/id";
+            }
+          }
 
-        list alarms {
-          description
-              "A list of the alarms that have been created for this VDU";
+          leaf vim-id {
+            description "Allocated VM resource id";
+            type string;
+          }
 
-          key "alarm-id";
-          uses manotypes:alarm;
-        }
+          leaf flavor-id {
+            description "VIM assigned flavor id";
+            type string;
+          }
 
-        list internal-connection-point {
-          key "id";
-          description
+          leaf image-id {
+            description "VIM assigned image id";
+            type string;
+          }
+
+          leaf management-ip {
+            description "Management IP address";
+            type inet:ip-address;
+          }
+
+          leaf vm-management-ip {
+            description "VM Private Management IP address";
+            type inet:ip-address;
+          }
+
+          leaf console-url {
+            description "Console URL for this VDU, if available";
+            type inet:uri;
+          }
+
+          uses manotypes:vm-flavor;
+          uses manotypes:guest-epa;
+          uses manotypes:vswitch-epa;
+          uses manotypes:hypervisor-epa;
+          uses manotypes:host-epa;
+
+          uses manotypes:supplemental-boot-data;
+
+          list volumes {
+            key "name";
+
+            leaf name {
+              description "Name of the disk-volumes, e.g. vda, vdb etc";
+              type string;
+            }
+
+            leaf volume-id {
+              description "VIM assigned volume id";
+              type string;
+            }
+
+            uses manotypes:volume-info;
+          }
+
+          list internal-connection-point {
+            key "id";
+            description
               "List for internal connection points. Each VNFC
                has zero or more internal connection points.
                Internal connection points are used for connecting
@@ -385,153 +463,156 @@
                has only one VNFC, it may not have any internal
                connection points.";
 
-          uses vnfd:common-connection-point;
+            uses vnfd-base:common-connection-point;
 
-          leaf ip-address {
-            description
+            leaf ip-address {
+              description
                 "IP address assigned to the internal connection point";
-            type inet:ip-address;
-          }
-          leaf mac-address {
-            description
+              type inet:ip-address;
+            }
+
+            leaf mac-address {
+              description
                 "MAC address assigned to the internal connection point";
-            // type inet:mac-address;
-            type string;
-          }
-        }
-
-        list internal-interface {
-          description
-              "List of internal interfaces for the VNF";
-          key name;
-
-          leaf name {
-            description
-                "Name of internal interface. Note that this
-                 name has only local significance to the VDU.";
-            type string;
-          }
-
-          leaf vdur-internal-connection-point-ref {
-            type leafref {
-              path "../../internal-connection-point/id";
+              // type inet:mac-address;
+              type string;
             }
-          }
-          uses virtual-interface;
-        }
 
-        list external-interface {
-          description
-              "List of external interfaces for the VNF.
-               The external interfaces enable sending
-               traffic to and from VNF.";
-          key name;
-
-          leaf name {
-            description
-                "Name of the external interface. Note that
-                 this name has only local significance.";
-            type string;
-          }
-
-          leaf vnfd-connection-point-ref {
-            description
-              "Name of the external connection point.";
-            type leafref {
-              path "../../../connection-point/name";
+            leaf connection-point-id {
+              type string;
             }
+
+            uses associated-virtual-cps;
           }
-          uses virtual-interface;
+
+          list interface {
+            description
+                "List of interfaces (internal and external) for the VNF";
+            key name;
+
+            leaf name {
+              description
+                  "Name of the interface. Note that this
+                  name has only local significance to the VDU.";
+              type string;
+            }
+
+            leaf position {
+              description
+                  "Explicit Position of the interface within the list";
+              type uint32;
+            }
+
+            leaf type {
+              description
+                  "Type of the Interface";
+
+              type vnfd-base:interface-type;
+
+              default "EXTERNAL";
+            }
+
+            choice connection-point-type {
+              case internal {
+                leaf internal-connection-point-ref {
+                  description
+                      "Leaf Ref to the particular internal connection point";
+                  type leafref {
+                    path "../../internal-connection-point/id";
+                  }
+                }
+              }
+              case external {
+                leaf external-connection-point-ref {
+                  description
+                      "Leaf Ref to the particular external connection point";
+                  type leafref {
+                    path "../../../connection-point/name";
+                  }
+                }
+              }
+            }
+            uses virtual-interface;
+          }
+
+          leaf operational-status {
+            description
+              "The operational status of the VDU
+                init                : The VDU has just started.
+                vm-init-phase       : The VDUs in the VNF is being created in VIM.
+                vm-alloc-pending    : The  VM alloc is pending in VIM
+                running             : The VDU is active in VM
+                terminate           : The VDU is being terminated
+                vm-terminate-phase  : The VDU in the VNF is being terminated in VIM.
+                terminated          : The VDU is in the terminated state.
+                failed              : The VDU  instantiation failed.
+              ";
+            type vdu-operational-status;
+          }
+          uses placement-group-info;
         }
+
+        uses manotypes:monitoring-param;
+
         leaf operational-status {
           description
-            "The operational status of the VDU 
-              init                : The VDU has just started.
-              vm-init-phase       : The VDUs in the VNF is being created in VIM.
-              vm-alloc-pending    : The  VM alloc is pending in VIM
-              running             : The VDU is active in VM
-              terminate           : The VDU is being terminated
-              vm-terminate-phase  : The VDU in the VNF is being terminated in VIM.
-              terminated          : The VDU is in the terminated state.
-              failed              : The VDU  instantiation failed.
+            "The operational status of the VNFR instance
+              pre-init            : The VNF before Input Param Substitution.
+              init                : The VNF has just started.
+              vl-init-phase       : The internal VLs in the VNF are being instantiated.
+              vm-init-phase       : The VMs for VDUs in the VNF are being instantiated.
+              running             : The VNF is in running state.
+              terminate           : The VNF is being terminated.
+              vm-terminate-phase  : The VMs in the VNF are being terminated.
+              vl-terminate-phase  : The internal VLs in the VNF are being terminated.
+              terminated          : The VNF is in the terminated state.
+              failed              : The VNF instantiation failed
             ";
-
-          type enumeration {
-            rwpb:enum-type "VduOperationalStatus";
-            enum init;
-            enum vm-init-phase;
-            enum vm-alloc-pending;
-            enum running;
-            enum terminate;
-            enum vl-terminate-phase;
-            enum terminated;
-            enum failed;
-          }
+          type vnf-operational-status;
         }
-        uses placement-group-info;
-      }
 
-      uses manotypes:monitoring-param;
-
-      leaf operational-status {
-        description
-          "The operational status of the VNFR instance
-            init                : The VNF has just started.
-            vl-init-phase       : The internal VLs in the VNF are being instantiated.
-            vm-init-phase       : The VMs for VDUs in the VNF are being instantiated.
-            running             : The VNF is in running state.
-            terminate           : The VNF is being terminated.
-            vm-terminate-phase  : The VMs in the VNF are being terminated.
-            vl-terminate-phase  : The internal VLs in the VNF are being terminated.
-            terminated          : The VNF is in the terminated state.
-            failed              : The VNF instantiation failed
-          ";
-
-        type enumeration {
-          rwpb:enum-type "VnfrOperationalStatus";
-          enum init;
-          enum vl-init-phase;
-          enum vm-init-phase;
-          enum running;
-          enum terminate;
-          enum vm-terminate-phase;
-          enum vl-terminate-phase;
-          enum terminated;
-          enum failed;
-        }
-      }
-      leaf config-status {
-        description
-          "The configuration status of the NS instance
+        leaf config-status {
+          description
+            "The configuration status of the NS instance
             configuring: At least one of the VNFs in this instance is in configuring state
             configured:  All the VNFs in this NS instance are configured or config-not-needed state
           ";
 
-        type enumeration {
-          enum configuring {
-            value 1;
-          }
-          enum configured {
-            value 2;
-          }
-          enum failed {
-            value 3;
-          }
-          enum config-not-needed {
-            value 4;
+          type enumeration {
+            enum configuring {
+              value 1;
+            }
+            enum configured {
+              value 2;
+            }
+            enum failed {
+              value 3;
+            }
+            enum config-not-needed {
+              value 4;
+            }
           }
         }
+        uses placement-group-info;
+
+        container cloud-config {
+          uses manotypes:cloud-config;
+        }
       }
-      uses placement-group-info;
     }
   }
 
   rpc create-alarm {
     description "Create an alert for a running VDU";
     input {
+      uses manotypes:rpc-project-name;
+
       leaf cloud-account {
         mandatory true;
-        type string;
+        type leafref {
+          path "/rw-project:project[rw-project:name=current()/../project-name]" +
+            "/rw-cloud:cloud/rw-cloud:account/rw-cloud:name";
+        }
       }
 
       leaf vdur-id {
@@ -554,9 +635,14 @@
   rpc destroy-alarm {
     description "Destroy an alert that is associated with a running VDU";
     input {
+      uses manotypes:rpc-project-name;
+
       leaf cloud-account {
         mandatory true;
-        type string;
+        type leafref {
+          path "/rw-project:project[rw-project:name=current()/../project-name]" +
+            "/rw-cloud:cloud/rw-cloud:account/rw-cloud:name";
+        }
       }
 
       leaf alarm-id {
@@ -566,4 +652,3 @@
     }
   }
 }
-