New feature: Model changes for project support 17/1217/1
authorPhilip Joseph <philip.joseph@riftio.com>
Thu, 2 Mar 2017 20:24:51 +0000 (01:54 +0530)
committerPhilip Joseph <philip.joseph@riftio.com>
Thu, 2 Mar 2017 20:24:51 +0000 (01:54 +0530)
Signed-off-by: Philip Joseph <philip.joseph@riftio.com>
66 files changed:
common/plugins/yang/CMakeLists.txt
common/plugins/yang/rw-cloud.tailf.yang
common/plugins/yang/rw-cloud.yang
common/plugins/yang/rw-config-agent.tailf.yang
common/plugins/yang/rw-config-agent.yang
common/plugins/yang/rw-sdn.tailf.yang
common/plugins/yang/rw-sdn.yang
common/python/CMakeLists.txt
common/python/rift/mano/cloud/config.py
common/python/rift/mano/cloud/operdata.py
common/python/rift/mano/utils/project.py [new file with mode: 0644]
examples/ping_pong_ns/rift/mano/examples/ping_pong_nsd.py
models/openmano/src/openmano2rift.py
models/plugins/yang/CMakeLists.txt
models/plugins/yang/mano-types.yang
models/plugins/yang/nsd.yang
models/plugins/yang/nsr.tailf.yang
models/plugins/yang/nsr.yang
models/plugins/yang/pnfd.yang
models/plugins/yang/rw-nsd.yang
models/plugins/yang/rw-nsr.tailf.yang
models/plugins/yang/rw-nsr.yang
models/plugins/yang/rw-project.yang [new file with mode: 0644]
models/plugins/yang/rw-vlr.yang
models/plugins/yang/rw-vnfd.yang
models/plugins/yang/rw-vnfr.tailf.yang
models/plugins/yang/rw-vnfr.yang
models/plugins/yang/vld.yang
models/plugins/yang/vlr.tailf.yang
models/plugins/yang/vlr.yang
models/plugins/yang/vnfd.yang
models/plugins/yang/vnffgd.yang
models/plugins/yang/vnfr.tailf.yang
models/plugins/yang/vnfr.yang
rwcal/plugins/vala/CMakeLists.txt
rwcal/plugins/yang/CMakeLists.txt
rwcal/plugins/yang/rwcal.yang
rwcm/plugins/yang/rw-conman.tailf.yang
rwcm/plugins/yang/rw-conman.yang
rwlaunchpad/plugins/cli/cli_launchpad_schema_listing.txt
rwlaunchpad/plugins/rwnsm/rift/tasklets/rwnsmtasklet/rwvnffgmgr.py
rwlaunchpad/plugins/rwresmgr/test/rmmgr_test.py
rwlaunchpad/plugins/rwvns/rift/tasklets/rwvnstasklet/rwvnstasklet.py
rwlaunchpad/plugins/rwvns/vala/CMakeLists.txt
rwlaunchpad/plugins/rwvns/yang/CMakeLists.txt
rwlaunchpad/plugins/rwvns/yang/rwsdn.yang
rwlaunchpad/plugins/yang/CMakeLists.txt
rwlaunchpad/plugins/yang/rw-image-mgmt.tailf.yang
rwlaunchpad/plugins/yang/rw-image-mgmt.yang
rwlaunchpad/plugins/yang/rw-launchpad.tailf.yang
rwlaunchpad/plugins/yang/rw-launchpad.yang
rwlaunchpad/plugins/yang/rw-nsm.yang
rwlaunchpad/plugins/yang/rw-pkg-mgmt.tailf.yang
rwlaunchpad/plugins/yang/rw-pkg-mgmt.yang
rwlaunchpad/plugins/yang/rw-resource-mgr.tailf.yang
rwlaunchpad/plugins/yang/rw-resource-mgr.yang
rwlaunchpad/plugins/yang/rw-staging-mgmt.tailf.yang
rwlaunchpad/plugins/yang/rw-staging-mgmt.yang
rwlaunchpad/test/mano_ut.py
rwlaunchpad/test/pytest/lp_kt_utm_wims_test.py
rwlaunchpad/test/pytest/lp_tg_2vrouter_ts_epa_test.py
rwlaunchpad/test/pytest/lp_tg_2vrouter_ts_test.py
rwlaunchpad/test/pytest/lp_tg_vrouter_ts_epa_sriov_test.py
rwmon/plugins/vala/CMakeLists.txt
rwmon/plugins/yang/rwmon.yang
rwso/plugins/cli/cli_so_schema_listing.txt

index be583ed..69b2f99 100644 (file)
@@ -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.
 #
 #   Licensed under the Apache License, Version 2.0 (the "License");
 #   you may not use this file except in compliance with the License.
@@ -20,6 +20,7 @@
 ##
 # Yang targets
 ##
 ##
 # Yang targets
 ##
+
 rift_add_yang_target(
   TARGET rwcloud_yang
   YANG_FILES rw-cloud.yang rw-sdn.yang
 rift_add_yang_target(
   TARGET rwcloud_yang
   YANG_FILES rw-cloud.yang rw-sdn.yang
@@ -27,8 +28,13 @@ rift_add_yang_target(
   LIBRARIES
     rwsdn_yang_gen
     rwcal_yang_gen
   LIBRARIES
     rwsdn_yang_gen
     rwcal_yang_gen
+    rwproject_yang_gen
+    mano-types_yang_gen
   DEPENDS
     rwcal_yang
   DEPENDS
     rwcal_yang
+    rwsdn_yang
+    rwproject_yang
+    mano-types_yang
 )
 
 rift_add_yang_target(
 )
 
 rift_add_yang_target(
@@ -37,6 +43,8 @@ rift_add_yang_target(
   COMPONENT ${PKG_LONG_NAME}
   LIBRARIES
     rwcal_yang_gen
   COMPONENT ${PKG_LONG_NAME}
   LIBRARIES
     rwcal_yang_gen
+    rwproject_yang_gen
   DEPENDS
     rwcal_yang
   DEPENDS
     rwcal_yang
+    rwproject_yang
 )
 )
index 2d65325..0f21670 100644 (file)
@@ -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.
  *
  *   Licensed under the Apache License, Version 2.0 (the "License");
  *   you may not use this file except in compliance with the License.
@@ -27,11 +27,15 @@ module rw-cloud-annotation
     prefix rw-cloud;
   }
 
     prefix rw-cloud;
   }
 
+  import rw-project {
+    prefix "rw-project";
+  }
+
   import tailf-common {
     prefix tailf-common;
   }
 
   import tailf-common {
     prefix tailf-common;
   }
 
-  tailf-common:annotate "/rw-cloud:cloud/rw-cloud:account/rw-cloud:connection-status" {
+  tailf-common:annotate "/rw-project:project/rw-cloud:cloud/rw-cloud:account/rw-cloud:connection-status" {
     tailf-common:callpoint rw_callpoint;
   }
 
     tailf-common:callpoint rw_callpoint;
   }
 
index 2c7ce6f..4287110 100644 (file)
@@ -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.
  *
  *   Licensed under the Apache License, Version 2.0 (the "License");
  *   you may not use this file except in compliance with the License.
@@ -36,36 +36,51 @@ module rw-cloud
     prefix "rw-sdn";
   }
 
     prefix "rw-sdn";
   }
 
+  import mano-types {
+    prefix "manotypes";
+  }
+
+  import rw-project {
+    prefix "rw-project";
+  }
+
+  revision 2017-02-08 {
+    description
+      "Update model to support projects.";
+  }
+
   revision 2015-09-14 {
     description
       "Initial revision.";
   }
 
   revision 2015-09-14 {
     description
       "Initial revision.";
   }
 
-  container cloud {
-    rw-pb-ext:msg-new CloudConfig;
-    list account {
-      rw-pb-ext:msg-new CloudAccount;
-      description "Configure Cloud Accounts";
+  augment "/rw-project:project" {
+    container cloud {
+      rw-pb-ext:msg-new CloudConfig;
+      list account {
+        rw-pb-ext:msg-new CloudAcc;
+        description "Configure Cloud Accounts";
 
 
-      max-elements 16;
-      key "name";
+        max-elements 16;
+        key "name";
 
 
-      leaf name {
-        mandatory true;
-        type string {
+        leaf name {
+          mandatory true;
+          type string {
             length "1..255";
             length "1..255";
+          }
         }
         }
-      }
 
 
-      leaf sdn-account {
-        description "Configured SDN account associated with this cloud account";
-        type leafref {
-          path "/rw-sdn:sdn/rw-sdn:account/rw-sdn:name";
+        leaf sdn-account {
+          description "Configured SDN account associated with this cloud account";
+          type leafref {
+            path "../../../rw-sdn:sdn/rw-sdn:account/rw-sdn:name";
+          }
         }
         }
-      }
 
 
-      uses rwcal:provider-auth;
-      uses rwcal:connection-status;
+        uses rwcal:provider-auth;
+        uses rwcal:connection-status;
+      }
     }
   }
 
     }
   }
 
@@ -78,6 +93,8 @@ module rw-cloud
           "The cloud account name to update connection status for";
         type string;
       }
           "The cloud account name to update connection status for";
         type string;
       }
+
+      uses manotypes:rpc-project-name;
     }
   }
 
     }
   }
 
index 07f0d74..33e3a40 100644 (file)
@@ -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.
  *
  *   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,12 @@ module rw-config-agent-annotation
     prefix tailf-common;
   }
 
     prefix tailf-common;
   }
 
-  tailf-common:annotate "/rw-config-agent:config-agent/rw-config-agent:account/rw-config-agent:connection-status" {
+  import rw-project {
+    prefix "rw-project";
+  }
+
+  tailf-common:annotate "/rw-project:project/rw-config-agent:config-agent" +
+    "/rw-config-agent:account/rw-config-agent:connection-status" {
     tailf-common:callpoint rw_callpoint;
   }
 
     tailf-common:callpoint rw_callpoint;
   }
 
index 1740af3..4f69b8f 100644 (file)
@@ -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.
  *
  *   Licensed under the Apache License, Version 2.0 (the "License");
  *   you may not use this file except in compliance with the License.
@@ -35,6 +35,19 @@ module rw-config-agent
     prefix "rwcal";
   }
 
     prefix "rwcal";
   }
 
+  import rw-project {
+    prefix "rw-project";
+  }
+
+  import mano-types {
+    prefix "manotypes";
+  }
+
+  revision 2017-02-08 {
+    description
+      "Update model to support projects.";
+  }
+
   revision 2016-02-04 {
     description
       "Initial revision.";
   revision 2016-02-04 {
     description
       "Initial revision.";
@@ -48,57 +61,59 @@ module rw-config-agent
     }
   }
 
     }
   }
 
-  container config-agent {
-    rwpb:msg-new ConfigAgent;
+  augment "/rw-project:project" {
+    container config-agent {
+      rwpb:msg-new ConfigAgent;
 
 
-    list account {
-      rwpb:msg-new ConfigAgentAccount;
-      key "name";
+      list account {
+        rwpb:msg-new ConfigAgentAccount;
+        key "name";
 
 
-      description "List of configuration agent accounts";
+        description "List of configuration agent accounts";
 
 
-      leaf name {
-        description "Name of this config agent account";
-        type string;
-      }
+        leaf name {
+          description "Name of this config agent account";
+          type string;
+        }
 
 
-      leaf account-type {
-        description
+        leaf account-type {
+          description
             "Default account type is Rift Configuration Agent (RiftCA)";
             "Default account type is Rift Configuration Agent (RiftCA)";
-        type config-agent-account-type;
-        default "riftca";
-      }
+          type config-agent-account-type;
+          default "riftca";
+        }
 
 
-      choice config-agent-account-type {
-        case juju {
-          description
-            "Configure the VNF through Juju.";
-          container juju {
-            leaf ip-address {
+        choice config-agent-account-type {
+          case juju {
+            description
+              "Configure the VNF through Juju.";
+            container juju {
+              leaf ip-address {
                 description "Juju host IP address.";
                 type inet:ip-address;
                 description "Juju host IP address.";
                 type inet:ip-address;
-            }
-            leaf port {
+              }
+              leaf port {
                 description 
                 description 
-                    "Juju host port number. Default 17070.";
+                  "Juju host port number. Default 17070.";
                 type inet:port-number;
                 default 17070;
                 type inet:port-number;
                 default 17070;
-            }
-            leaf user {
+              }
+              leaf user {
                 description 
                 description 
-                    "User name to connect to Juju host. Default user-admin.";
+                  "User name to connect to Juju host. Default user-admin.";
                 type string;
                 default "user-admin" ;
                 type string;
                 default "user-admin" ;
-            }
-            leaf secret {
+              }
+              leaf secret {
                 description 
                 description 
-                    "Admin secret or password for Juju host.";
+                  "Admin secret or password for Juju host.";
                 type string;
                 type string;
+              }
             }
           }
         }
             }
           }
         }
+        uses rwcal:connection-status;
       }
       }
-      uses rwcal:connection-status;
     }
   }
 
     }
   }
 
@@ -111,6 +126,8 @@ module rw-config-agent
           "The config agent account name to update connection status for";
         type string;
       }
           "The config agent account name to update connection status for";
         type string;
       }
+
+      uses manotypes:rpc-project-name;
     }
   }
 }
     }
   }
 }
index 3f63883..b7ddaab 100644 (file)
@@ -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.
  *
  *   Licensed under the Apache License, Version 2.0 (the "License");
  *   you may not use this file except in compliance with the License.
@@ -26,11 +26,16 @@ module rw-sdn-annotation
   import rw-sdn {
     prefix rw-sdn;
   }
   import rw-sdn {
     prefix rw-sdn;
   }
+
+  import rw-project {
+    prefix "rw-project";
+  }
+
   import tailf-common {
     prefix tailf-common;
   }
 
   import tailf-common {
     prefix tailf-common;
   }
 
-  tailf:annotate "/rw-sdn:sdn/rw-sdn:account/rw-sdn:connection-status" {
+  tailf:annotate "/rw-project:project/rw-sdn:sdn/rw-sdn:account/rw-sdn:connection-status" {
     tailf-common:callpoint rw_callpoint;
   }
 
     tailf-common:callpoint rw_callpoint;
   }
 
index 6475cc5..b4e0d9e 100644 (file)
@@ -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.
  *
  *   Licensed under the Apache License, Version 2.0 (the "License");
  *   you may not use this file except in compliance with the License.
@@ -28,25 +28,40 @@ module rw-sdn
     prefix "rwpb";
   }
 
     prefix "rwpb";
   }
 
+  import mano-types {
+    prefix "manotypes";
+  }
+
+  import rw-project {
+    prefix "rw-project";
+  }
+
   import rwsdn {
     prefix "rwsdn";
   }
 
   import rwsdn {
     prefix "rwsdn";
   }
 
+  revision 2017-02-08 {
+    description
+      "Update model to support projects.";
+  }
+
   revision 2015-09-14 {
     description
       "Initial revision.";
   }
 
   revision 2015-09-14 {
     description
       "Initial revision.";
   }
 
-  container sdn {
-    list account {
-      rwpb:msg-new SDNAccountConfig;
-      key "name";
-      leaf name {
-       type string;
-      }
+  augment "/rw-project:project" {
+    container sdn {
+      list account {
+        rwpb:msg-new SDNAccountConfig;
+        key "name";
+        leaf name {
+          type string;
+        }
 
 
-      uses rwsdn:sdn-provider-auth;
-      uses rwsdn:connection-status;
+        uses rwsdn:sdn-provider-auth;
+        uses rwsdn:connection-status;
+      }
     }
   }
 
     }
   }
 
@@ -59,6 +74,8 @@ module rw-sdn
           "The sdn account name to update connection status for";
         type string;
       }
           "The sdn account name to update connection status for";
         type string;
       }
+
+      uses manotypes:rpc-project-name;
     }
   }
 }
     }
   }
 }
index 8925885..dcef461 100644 (file)
@@ -129,6 +129,7 @@ rift_python_install_tree(
     rift/mano/utils/__init.py__
     rift/mano/utils/compare_desc.py
     rift/mano/utils/juju_api.py
     rift/mano/utils/__init.py__
     rift/mano/utils/compare_desc.py
     rift/mano/utils/juju_api.py
+    rift/mano/utils/project.py
   COMPONENT ${PKG_LONG_NAME}
   PYTHON3_ONLY
   )
   COMPONENT ${PKG_LONG_NAME}
   PYTHON3_ONLY
   )
index 1b1847c..c62f129 100644 (file)
@@ -1,6 +1,6 @@
 
 # 
 
 # 
-#   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.
 #
 #   Licensed under the Apache License, Version 2.0 (the "License");
 #   you may not use this file except in compliance with the License.
@@ -101,7 +101,7 @@ class CloudAccountConfigCallbacks(object):
 
 
 class CloudAccountConfigSubscriber(object):
 
 
 class CloudAccountConfigSubscriber(object):
-    XPATH = "C,/rw-cloud:cloud/rw-cloud:account"
+    XPATH = "C,/rw-project:project/rw-cloud:cloud/rw-cloud:account"
 
     def __init__(self, dts, log, rwlog_hdl, cloud_callbacks):
         self._dts = dts
 
     def __init__(self, dts, log, rwlog_hdl, cloud_callbacks):
         self._dts = dts
index 4878691..12ab801 100644 (file)
@@ -1,6 +1,6 @@
 
 # 
 
 # 
-#   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.
 #
 #   Licensed under the Apache License, Version 2.0 (the "License");
 #   you may not use this file except in compliance with the License.
@@ -71,7 +71,7 @@ class CloudAccountDtsOperdataHandler(object):
 
     def _register_show_status(self):
         def get_xpath(cloud_name=None):
 
     def _register_show_status(self):
         def get_xpath(cloud_name=None):
-            return "D,/rw-cloud:cloud/account{}/connection-status".format(
+            return "D,/rw-project:project/rw-cloud:cloud/account{}/connection-status".format(
                     "[name='%s']" % cloud_name if cloud_name is not None else ''
                     )
 
                     "[name='%s']" % cloud_name if cloud_name is not None else ''
                     )
 
diff --git a/common/python/rift/mano/utils/project.py b/common/python/rift/mano/utils/project.py
new file mode 100644 (file)
index 0000000..9c303f9
--- /dev/null
@@ -0,0 +1,126 @@
+#!/usr/bin/env python3
+
+#
+#   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.
+#
+
+
+class ManoProjectError(Exception):
+    pass
+
+
+class ManoProjNameSetErr(ManoProjectError):
+    pass
+
+
+class ManoProjXpathNoProjErr(ManoProjectError):
+    pass
+
+
+class ManoProjXpathKeyErr(ManoProjectError):
+    pass
+
+
+class ManoProject(object):
+    '''Class to handle the project name'''
+
+    NS = 'rw-project'
+    XPATH = '/{}:project'.format(NS)
+    XPATH_LEN = len(XPATH)
+
+    NAME = 'name'
+    NAME_LEN = len(NAME)
+    NS_NAME = '{}:{}'.format(NS, NAME)
+
+    @classmethod
+    def create_from_xpath(cls, xpath, log):
+        name = cls.from_xpath(xpath, log)
+        if name is None:
+            return None
+
+        proj = ManoProject(log, name=name)
+        return proj
+
+    @classmethod
+    def from_xpath(cls, xpath, log):
+        log.debug("Get project name from {}".format(xpath));
+
+        if cls.XPATH in xpath:
+            idx = xpath.find(cls.XPATH) + cls.XPATH_LEN
+            if idx == -1:
+                msg = "Project not found in XPATH: {}".format(xpath)
+                log.error(msg)
+                raise ManoProjXpathNoProjErr(msg)
+
+            sub = xpath[idx:]
+            sub = sub.strip()
+            if (len(sub) < cls.NAME_LEN) or (sub[0] != '['):
+                msg = "Project name not found in XPath: {}".format(xpath)
+                log.error(msg)
+                raise ManoProjXpathKeyErr(msg)
+
+            sub = sub[1:].strip()
+            idx = sub.find(cls.NS_NAME)
+            if idx == -1:
+                idx = sub.find(cls.NAME)
+            if idx != 0:
+                msg = "Project name not found in XPath: {}".format(xpath)
+                log.error(msg)
+                raise ManoProjXpathKeyErr(msg)
+
+            idx = sub.find(']')
+            if idx == -1:
+                msg = "XPath is invalid: {}".format(xpath)
+                log.error(msg)
+                raise ManoProjXpathKeyErr(msg)
+
+            sub = sub[:idx-1].strip()
+            try:
+                k, n = sub.split("=", 2)
+                name = n.strip()
+                if name is None:
+                    msg = "Project name is empty in XPath".format(xpath)
+                    log.error(msg)
+                    raise ManoProjXpathKeyErr (msg)
+
+                log.debug("Found project name {} from XPath {}".
+                          format(name, xpath))
+                return name
+
+            except ValueError as e:
+                msg = "Project name not found in XPath: {}, exception: {}" \
+                      .format(xpath, e)
+                log.exception(msg)
+                raise ManoProjXpathKeyErr(msg)
+
+    def __init__(self, log, name=None):
+        self._log = log
+        self._name = name
+
+    @property
+    def name(self):
+        return self._name
+
+    @name.setter
+    def name(self, value):
+        if self._name is None:
+            self._name = value
+        else:
+            msg = "Project name already set to {}".format(self._name)
+            self._log.error(msg)
+            raise ManoProjNameSetErr(msg)
+
+    def set_from_xpath(self, xpath):
+        self.name = ManoProject.get_from_xpath(xpath, self._log)
index ef2dd90..b18deb7 100755 (executable)
@@ -1,7 +1,7 @@
 #!/usr/bin/env python3
 
 #
 #!/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.
 #
 #   Licensed under the Apache License, Version 2.0 (the "License");
 #   you may not use this file except in compliance with the License.
 
 
 import argparse
 
 
 import argparse
+import simplejson
 import os
 import os
+import yaml
 import shutil
 import sys
 import uuid
 
 import shutil
 import sys
 import uuid
 
+from xml.dom.minidom import parseString
+
 import gi
 gi.require_version('RwYang', '1.0')
 import gi
 gi.require_version('RwYang', '1.0')
+gi.require_version('RwProjectYang', '1.0')
 gi.require_version('RwVnfdYang', '1.0')
 gi.require_version('VnfdYang', '1.0')
 gi.require_version('RwNsdYang', '1.0')
 gi.require_version('RwVnfdYang', '1.0')
 gi.require_version('VnfdYang', '1.0')
 gi.require_version('RwNsdYang', '1.0')
@@ -37,6 +42,7 @@ from gi.repository import (
     RwVnfdYang,
     VnfdYang,
     RwYang,
     RwVnfdYang,
     VnfdYang,
     RwYang,
+    RwProjectYang,
 )
 
 
 )
 
 
@@ -95,15 +101,31 @@ class ManoDescriptor(object):
         for module in module_list:
             model.load_module(module)
 
         for module in module_list:
             model.load_module(module)
 
-        if output_format == 'json':
-            with open('%s/%s.json' % (outdir, self.name), "w") as fh:
-                fh.write(self.descriptor.to_json(model))
+        # Need to extract the catalog part to dump as descriptor
+        if output_format in ['json', 'yaml']:
+            # Convert to yaml instead of directly using as_dict as
+            # this adds the namespaces correctly
+            ya = self.descriptor.to_yaml(model)
+            proj = yaml.load(ya)
+            desc = proj['rw-project:project'][0]
+
+            if output_format == 'json':
+                with open('%s/%s.json' % (outdir, self.name), "w") as fh:
+                    fh.write(simplejson.dumps(desc, indent=4))
+            elif output_format.strip() == 'yaml':
+                with open('%s/%s.yaml' % (outdir, self.name), "w") as fh:
+                    fh.write(yaml.dump(desc, default_flow_style=False))
         elif output_format.strip() == 'xml':
         elif output_format.strip() == 'xml':
+            # Converting from dict to xml does not provide the
+            # required output. So using the PBCM to_xml and then
+            # printing only from the catalog tag.
             with open('%s/%s.xml' % (outdir, self.name), "w") as fh:
             with open('%s/%s.xml' % (outdir, self.name), "w") as fh:
-                fh.write(self.descriptor.to_xml_v2(model))
-        elif output_format.strip() == 'yaml':
-            with open('%s/%s.yaml' % (outdir, self.name), "w") as fh:
-                fh.write(self.descriptor.to_yaml(model))
+                proj = self.descriptor.to_xml_v2(model)
+                dom = parseString(proj)
+                desc = dom.getElementsByTagName("vnfd:vnfd-catalog")
+                if not desc:
+                    desc = dom.getElementsByTagName("nsd:nsd-catalog")
+                fh.write(desc[0].toprettyxml())
         else:
             raise Exception("Invalid output format for the descriptor")
 
         else:
             raise Exception("Invalid output format for the descriptor")
 
@@ -129,7 +151,7 @@ class VirtualNetworkFunction(ManoDescriptor):
     def compose(self, image_name, cloud_init="", cloud_init_file="", endpoint=None, mon_params=[],
                 mon_port=8888, mgmt_port=8888, num_vlr_count=1, num_ivlr_count=1,
                 num_vms=1, image_md5sum=None, mano_ut=False):
     def compose(self, image_name, cloud_init="", cloud_init_file="", endpoint=None, mon_params=[],
                 mon_port=8888, mgmt_port=8888, num_vlr_count=1, num_ivlr_count=1,
                 num_vms=1, image_md5sum=None, mano_ut=False):
-        self.descriptor = RwVnfdYang.YangData_Vnfd_VnfdCatalog()
+        self.descriptor = RwVnfdYang.YangData_RwProject_Project_VnfdCatalog()
         self.id = str(uuid.uuid1())
         vnfd = self.descriptor.vnfd.add()
         vnfd.id = self.id
         self.id = str(uuid.uuid1())
         vnfd = self.descriptor.vnfd.add()
         vnfd.id = self.id
@@ -159,14 +181,14 @@ class VirtualNetworkFunction(ManoDescriptor):
             cp.name = '%s/cp%d' % (self.name, i)
 
         if endpoint is not None:
             cp.name = '%s/cp%d' % (self.name, i)
 
         if endpoint is not None:
-            endp = VnfdYang.YangData_Vnfd_VnfdCatalog_Vnfd_HttpEndpoint(
+            endp = VnfdYang.YangData_RwProject_Project_VnfdCatalog_Vnfd_HttpEndpoint(
                     path=endpoint, port=mon_port, polling_interval_secs=2
                     )
             vnfd.http_endpoint.append(endp)
 
         # Monitoring params
         for monp_dict in mon_params:
                     path=endpoint, port=mon_port, polling_interval_secs=2
                     )
             vnfd.http_endpoint.append(endp)
 
         # Monitoring params
         for monp_dict in mon_params:
-            monp = VnfdYang.YangData_Vnfd_VnfdCatalog_Vnfd_MonitoringParam.from_dict(monp_dict)
+            monp = VnfdYang.YangData_RwProject_Project_VnfdCatalog_Vnfd_MonitoringParam.from_dict(monp_dict)
             monp.http_endpoint_ref = endpoint
             vnfd.monitoring_param.append(monp)
 
             monp.http_endpoint_ref = endpoint
             vnfd.monitoring_param.append(monp)
 
@@ -302,7 +324,7 @@ class VirtualNetworkFunction(ManoDescriptor):
         dirpath = "%s/%s" % (outdir, self.name)
         if not os.path.exists(dirpath):
             os.makedirs(dirpath)
         dirpath = "%s/%s" % (outdir, self.name)
         if not os.path.exists(dirpath):
             os.makedirs(dirpath)
-        super(VirtualNetworkFunction, self).write_to_file(['vnfd', 'rw-vnfd'],
+        super(VirtualNetworkFunction, self).write_to_file(['rw-project', 'vnfd', 'rw-vnfd'],
                                                           dirpath,
                                                           output_format)
         self.add_scripts(outdir)
                                                           dirpath,
                                                           output_format)
         self.add_scripts(outdir)
@@ -633,7 +655,7 @@ exit 0
         self._placement_groups.append(placement_group)
 
     def create_mon_params(self, vnfds):
         self._placement_groups.append(placement_group)
 
     def create_mon_params(self, vnfds):
-        NsdMonParam = NsdYang.YangData_Nsd_NsdCatalog_Nsd_MonitoringParam
+        NsdMonParam = NsdYang.YangData_RwProject_Project_NsdCatalog_Nsd_MonitoringParam
         param_id = 1
         for vnfd_obj in vnfds:
             for mon_param in vnfd_obj.vnfd.monitoring_param:
         param_id = 1
         for vnfd_obj in vnfds:
             for mon_param in vnfd_obj.vnfd.monitoring_param:
@@ -662,7 +684,7 @@ exit 0
             use_ns_init_conf = False
             use_vnf_init_conf = False
 
             use_ns_init_conf = False
             use_vnf_init_conf = False
 
-        self.descriptor = RwNsdYang.YangData_Nsd_NsdCatalog()
+        self.descriptor = RwNsdYang.YangData_RwProject_Project_NsdCatalog()
         self.id = str(uuid.uuid1())
         nsd = self.descriptor.nsd.add()
         self.nsd = nsd
         self.id = str(uuid.uuid1())
         nsd = self.descriptor.nsd.add()
         self.nsd = nsd
@@ -674,7 +696,7 @@ exit 0
         nsd.description = 'Toy NS'
         nsd.version = '1.0'
         nsd.input_parameter_xpath.append(
         nsd.description = 'Toy NS'
         nsd.version = '1.0'
         nsd.input_parameter_xpath.append(
-                NsdYang.YangData_Nsd_NsdCatalog_Nsd_InputParameterXpath(
+                NsdYang.YangData_RwProject_Project_NsdCatalog_Nsd_InputParameterXpath(
                     xpath="/nsd:nsd-catalog/nsd:nsd/nsd:vendor",
                     )
                 )
                     xpath="/nsd:nsd-catalog/nsd:nsd/nsd:vendor",
                     )
                 )
@@ -700,7 +722,7 @@ exit 0
             vld.ip_profile_ref = 'InterVNFLink'
             for cp in cpgroup:
                 cpref = vld.vnfd_connection_point_ref.add()
             vld.ip_profile_ref = 'InterVNFLink'
             for cp in cpgroup:
                 cpref = vld.vnfd_connection_point_ref.add()
-                cpref.member_vnf_index_ref = cp[0]
+                cpref.member_vnf_index_ref = str(cp[0])
                 cpref.vnfd_id_ref = cp[1]
                 cpref.vnfd_connection_point_ref = cp[2]
 
                 cpref.vnfd_id_ref = cp[1]
                 cpref.vnfd_connection_point_ref = cp[2]
 
@@ -756,7 +778,7 @@ exit 0
             for member_vnfd in placement_group.vnfd_list:
                 member = group.member_vnfd.add()
                 member.vnfd_id_ref = member_vnfd.descriptor.vnfd[0].id
             for member_vnfd in placement_group.vnfd_list:
                 member = group.member_vnfd.add()
                 member.vnfd_id_ref = member_vnfd.descriptor.vnfd[0].id
-                member.member_vnf_index_ref = vnfd_index_map[member_vnfd]
+                member.member_vnf_index_ref = str(vnfd_index_map[member_vnfd])
 
         # self.create_mon_params(vnfd_list)
 
 
         # self.create_mon_params(vnfd_list)
 
@@ -801,7 +823,7 @@ exit 0
         if not os.path.exists(dirpath):
             os.makedirs(dirpath)
 
         if not os.path.exists(dirpath):
             os.makedirs(dirpath)
 
-        super(NetworkService, self).write_to_file(["nsd", "rw-nsd"],
+        super(NetworkService, self).write_to_file(["rw-project", "nsd", "rw-nsd"],
                                                   dirpath,
                                                   output_format)
 
                                                   dirpath,
                                                   output_format)
 
index 503ad89..88c549b 100755 (executable)
@@ -1,7 +1,7 @@
 #!/usr/bin/env python3
 
 # 
 #!/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.
 #
 #   Licensed under the Apache License, Version 2.0 (the "License");
 #   you may not use this file except in compliance with the License.
@@ -30,10 +30,12 @@ import gi
 gi.require_version('RwYang', '1.0')
 gi.require_version('RwVnfdYang', '1.0')
 gi.require_version('RwNsdYang', '1.0')
 gi.require_version('RwYang', '1.0')
 gi.require_version('RwVnfdYang', '1.0')
 gi.require_version('RwNsdYang', '1.0')
+gi.require_version('RwProjectYang', '1.0')
 from gi.repository import (
     RwYang,
     RwVnfdYang,
     RwNsdYang,
 from gi.repository import (
     RwYang,
     RwVnfdYang,
     RwNsdYang,
+    RwProjectYang,
     )
 
 logging.basicConfig(level=logging.WARNING)
     )
 
 logging.basicConfig(level=logging.WARNING)
@@ -115,7 +117,7 @@ class RiftNS(RiftManoDescriptor):
         return vnf_name
 
     def openmano2rift(self, vnf_list):
         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()
         openmano_nsd = self.openmano.dictionary
         self.name = openmano_nsd['name']
         nsd = self.descriptor.nsd.add()
@@ -167,7 +169,7 @@ class RiftNS(RiftManoDescriptor):
                         if topo_node['type'] == 'VNF':
                             cpref = vld.vnfd_connection_point_ref.add()
                             cpref.from_dict(dict(
                         if topo_node['type'] == 'VNF':
                             cpref = vld.vnfd_connection_point_ref.add()
                             cpref.from_dict(dict(
-                                member_vnf_index_ref=vnf_member_index_dict[node_key],
+                                member_vnf_index_ref=str(vnf_member_index_dict[node_key]),
                                 vnfd_id_ref=self.get_vnfd_id(vnf_list, topo_node['VNF model']),
                                 #vnfd_id_ref=topo_node['VNF model'],
                                 vnfd_connection_point_ref=node[node_key],
                                 vnfd_id_ref=self.get_vnfd_id(vnf_list, topo_node['VNF model']),
                                 #vnfd_id_ref=topo_node['VNF model'],
                                 vnfd_connection_point_ref=node[node_key],
@@ -203,7 +205,7 @@ class RiftVnfd(RiftManoDescriptor):
         return None
 
     def openmano2rift(self):
         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())
         vnfd = self.descriptor.vnfd.add()
         self.vnfd = vnfd
         vnfd.id = str(uuid.uuid1())
@@ -468,7 +470,7 @@ def main(argv=sys.argv[1:]):
     ns_list = create_ns_from_yaml_files(args.yaml_file_hdls, vnf_list)
 
     writer = DescriptorFileWriter(
     ns_list = create_ns_from_yaml_files(args.yaml_file_hdls, vnf_list)
 
     writer = DescriptorFileWriter(
-        module_list=['nsd', 'rw-nsd', 'vnfd', 'rw-vnfd'],
+        module_list=['rw-project', 'nsd', 'rw-nsd', 'vnfd', 'rw-vnfd'],
         output_dir=args.outdir,
         output_format=args.format,
         )
         output_dir=args.outdir,
         output_format=args.format,
         )
index 2f6e964..827ec2b 100644 (file)
@@ -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.
 #
 #   Licensed under the Apache License, Version 2.0 (the "License");
 #   you may not use this file except in compliance with the License.
@@ -33,11 +33,23 @@ set(source_yang_files
   vnffgd.yang
   )
 
   vnffgd.yang
   )
 
+rift_add_yang_target(
+  TARGET rwproject_yang
+  YANG_FILES
+    rw-project.yang
+  GIR_PATHS ${CMAKE_CURRENT_BINARY_DIR}
+  COMPONENT ${PKG_LONG_NAME}
+  )
+
 rift_add_yang_target(
   TARGET mano-types_yang
   YANG_FILES
     mano-types.yang
   COMPONENT ${PKG_LONG_NAME}
 rift_add_yang_target(
   TARGET mano-types_yang
   YANG_FILES
     mano-types.yang
   COMPONENT ${PKG_LONG_NAME}
+  LIBRARIES
+    rwproject_yang_gen
+  DEPENDS
+    rwproject_yang
   )
 
 rift_add_yang_target(
   )
 
 rift_add_yang_target(
@@ -51,9 +63,11 @@ rift_add_yang_target(
     rwcloud_yang_gen
     rwconfig_agent_yang_gen
     mano-types_yang_gen
     rwcloud_yang_gen
     rwconfig_agent_yang_gen
     mano-types_yang_gen
+    rwproject_yang_gen
   DEPENDS
     rwcloud_yang
     rwconfig_agent_yang
   DEPENDS
     rwcloud_yang
     rwconfig_agent_yang
+    rwproject_yang
   )
 
 #rift_gen_yang_tree(mano-pyang-trees
   )
 
 #rift_gen_yang_tree(mano-pyang-trees
index 9209dea..3fd0da2 100644 (file)
@@ -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.
  *
  *   Licensed under the Apache License, Version 2.0 (the "License");
  *   you may not use this file except in compliance with the License.
@@ -31,6 +31,15 @@ module mano-types
     prefix "rwpb";
   }
 
     prefix "rwpb";
   }
 
+  import rw-project {
+    prefix "rw-project";
+  }
+
+  revision 2017-02-08 {
+    description
+      "Update model to support projects.";
+  }
+
   revision 2015-04-23 {
     description
       "Initial revision. This YANG file defines
   revision 2015-04-23 {
     description
       "Initial revision. This YANG file defines
@@ -2126,4 +2135,15 @@ module mano-types
     }
 
   }
     }
 
   }
+
+  grouping rpc-project-name {
+    leaf project-name {
+      mandatory true;
+      description
+        "Project to which this belongs";
+      type leafref {
+        path "/rw-project:project/rw-project:name";
+      }
+    }
+  }
 }
 }
index 0cadca3..49bb9e6 100644 (file)
@@ -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.
  *
  *   Licensed under the Apache License, Version 2.0 (the "License");
  *   you may not use this file except in compliance with the License.
@@ -47,6 +47,15 @@ module nsd
     prefix "manotypes";
   }
 
     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
   revision 2014-10-27 {
     description
       "Initial revision. This YANG file defines
@@ -124,7 +133,7 @@ module nsd
     }
   }
 
     }
   }
 
-  grouping nsd-descriptor {
+  grouping nsd-descriptor-common {
     leaf id {
       description "Identifier for the NSD.";
       type string;
     leaf id {
       description "Identifier for the NSD.";
       type string;
@@ -190,167 +199,6 @@ module nsd
       }
     }
 
       }
     }
 
-    /* Still having issues modelling this,
-       see the comments under vnfd-connection-point-ref
-     */
-    list vld {
-      description
-          "List of Virtual Link Descriptors.";
-
-      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 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 "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 resovled this will switched to use
-               leafref";
-          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";
-          }
-        }
-      }
-
-      // 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 string;
-          } 
-        }
-
-      }
-    }
-
-    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 "/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;
-      }
-    }
-
     list scaling-group-descriptor {
       description
           "scaling group descriptor within this network service.
     list scaling-group-descriptor {
       description
           "scaling group descriptor within this network service.
@@ -390,7 +238,7 @@ module nsd
 
         leaf scale-in-operation-type {
           description
 
         leaf scale-in-operation-type {
           description
-              "Operation to be applied to check between scaling criterias to 
+              "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;
                check if the scale in threshold condition has been met.
                Defaults to AND";
           type scaling-criteria-operation;
@@ -399,7 +247,7 @@ module nsd
 
         leaf scale-out-operation-type {
           description
 
         leaf scale-out-operation-type {
           description
-              "Operation to be applied to check between scaling criterias to 
+              "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;
                check if the scale out threshold condition has been met.
                Defauls to OR";
           type scaling-criteria-operation;
@@ -444,7 +292,7 @@ module nsd
           }
 
           leaf ns-monitoring-param-ref {
           }
 
           leaf ns-monitoring-param-ref {
-            description 
+            description
                "Reference to the NS level monitoring parameter
                 that is aggregated";
             type leafref {
                "Reference to the NS level monitoring parameter
                 that is aggregated";
             type leafref {
@@ -512,56 +360,6 @@ module nsd
       }
     }
 
       }
     }
 
-    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 "../../../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 that sorce VNF depends.";
-        type leafref {
-          path "../../constituent-vnfd/vnfd-id-ref";
-        }
-      }
-    }
 
     list vnffgd {
       description
 
     list vnffgd {
       description
@@ -604,25 +402,25 @@ module nsd
 
       list rsp {
         description
 
       list rsp {
         description
-            "List of Rendered Service Paths (RSP).";
+          "List of Rendered Service Paths (RSP).";
 
         key "id";
 
         leaf id {
           description
 
         key "id";
 
         leaf id {
           description
-              "Identifier for the RSP.";
+            "Identifier for the RSP.";
           type string;
         }
 
         leaf name {
           description
           type string;
         }
 
         leaf name {
           description
-              "RSP name.";
+            "RSP name.";
           type string;
         }
 
         list vnfd-connection-point-ref {
           description
           type string;
         }
 
         list vnfd-connection-point-ref {
           description
-                "A list of references to connection points.";
+            "A list of references to connection points.";
           key "member-vnf-index-ref";
 
           leaf member-vnf-index-ref {
           key "member-vnf-index-ref";
 
           leaf member-vnf-index-ref {
@@ -635,12 +433,12 @@ module nsd
           leaf order {
             type uint8;
             description
           leaf order {
             type uint8;
             description
-                "A number that denotes the order of a VNF in a chain";
+              "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
+          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]
                   leafref to path:
                       ../../../../nsd:constituent-vnfd
                       + [nsd:id = current()/../nsd:id-ref]
@@ -657,9 +455,9 @@ module nsd
              }
            }
 
              }
            }
 
-           leaf vnfd-connection-point-ref {
-             description
-                 "A reference to a connection point name
+          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]
                   in a vnfd. This is a leafref to path:
                       /vnfd:vnfd-catalog/vnfd:vnfd
                       + [vnfd:id = current()/../nsd:vnfd-id-ref]
@@ -669,11 +467,15 @@ module nsd
                   to leafref, whose target is in a different module.
                   Once that is resovled this will switched to use
                   leafref";
                   to leafref, whose target is in a different module.
                   Once that is resovled this will switched to use
                   leafref";
-             type leafref {
-               path "/vnfd:vnfd-catalog/vnfd:vnfd" +
-                    "[vnfd:id = current()/../vnfd-id-ref]/" +
-                    "vnfd:connection-point/vnfd:name";
-             }
+            // 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
           }
         }
       } //rsp
@@ -742,11 +544,15 @@ module nsd
                   to leafref, whose target is in a different module.
                   Once that is resovled this will switched to use
                   leafref";
                   to leafref, whose target is in a different module.
                   Once that is resovled this will switched to use
                   leafref";
-          type leafref {
-              path "/vnfd:vnfd-catalog/vnfd:vnfd" +
-                   "[vnfd:id = current()/../vnfd-id-ref]/" +
-                   "vnfd:connection-point/vnfd:name";
-          }
+          // 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 {
         }
 
         list match-attributes {
@@ -795,65 +601,17 @@ module nsd
       } // classifier
     } // vnffgd
 
       } // classifier
     } // vnffgd
 
-    list monitoring-param {
-      description
-        "List of monitoring parameters from VNF's that should be
-        propogated up into NSR";
-      key "id";
-
-      leaf id {
-        type string;
-      }
-
-      leaf name {
-        type string;
-      }
-
-      uses manotypes:monitoring-param-value;
-      uses manotypes:monitoring-param-ui-data;
-      uses manotypes:monitoring-param-aggregation;
-
-      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";
+    uses manotypes:ip-profile-list;
 
 
-          type leafref {
-            path "../../../constituent-vnfd" +
-                 "[member-vnf-index = current()/../member-vnf-index-ref]" +
-                 "/vnfd-id-ref";
-          }
-        }
+    uses manotypes:ns-service-primitive;
 
 
-        leaf vnfd-monitoring-param-ref {
-          description "A reference to the VNFD monitoring param";
-          type leafref {
-            path "/vnfd:vnfd-catalog/vnfd:vnfd"
-              + "[vnfd:id = current()/../vnfd-id-ref]"
-              + "/vnfd:monitoring-param/vnfd:id";
-          }
-        }
+    list initial-config-primitive {
+      rwpb:msg-new NsdInitialConfigPrimitive;
+      description
+        "Initial set of configuration primitives for NSD.";
+      key "seq";
 
 
-        leaf member-vnf-index-ref {
-          description
-            "Mandatory reference to member-vnf within constituent-vnfds";
-          type leafref {
-            path "../../../constituent-vnfd/member-vnf-index";
-          }
-        }
-      }
+      uses manotypes:initial-config;
     }
 
     uses manotypes:input-parameter-xpath;
     }
 
     uses manotypes:input-parameter-xpath;
@@ -890,17 +648,6 @@ module nsd
       }
     }
 
       }
     }
 
-    uses manotypes:ns-service-primitive;
-
-    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
     list key-pair {
       key "name";
       description "Used to configure the list of public keys to be injected as part
@@ -949,14 +696,479 @@ module nsd
     }
   }
 
     }
   }
 
-
-  container nsd-catalog {
-
-    list nsd {
+  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 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;
+    }
+
+    // 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 string;
+        }
+      }
+
+    }
+  }
+
+  grouping nsd-vld {
+    list vld {
+
+      key "id";
+
+      uses 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 resovled this will switched to use
+               leafref";
+          type string;
+        }
+
+        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";
+          }
+        }
+      }
+    }
+  }
+
+  grouping nsr-nsd-vld {
+    list vld {
+
+      key "id";
+
+      uses 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 resovled this will switched to use
+               leafref";
+          type string;
+        }
+
+        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";
+          }
+        }
+      }
+    }
+  }
+
+  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 "../../../../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;
+      }
+    }
+  }
+
+  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 "../../../../../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;
+      }
+    }
+  }
+
+  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 "../../../../../vnfd:vnfd-catalog/vnfd:vnfd/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 "../../../../../../vnfd:vnfd-catalog/vnfd:vnfd/vnfd:id";
+          }
+        }
+      }
+    }
+  }
+
+  grouping nsd-vnf-dependency {
+    list vnf-dependency {
+      description
+          "List of VNF dependencies.";
+      key vnf-source-ref;
+      leaf vnf-source-ref {
+        type leafref {
+          path "../../../../vnfd:vnfd-catalog/vnfd:vnfd/vnfd:id";
+        }
+      }
+      leaf vnf-depends-on-ref {
+        description
+            "Reference to VNF that sorce VNF depends.";
+        type leafref {
+          path "../../../../vnfd:vnfd-catalog/vnfd:vnfd/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 "../../../../../vnfd:vnfd-catalog/vnfd:vnfd/vnfd:id";
+        }
+      }
+      leaf vnf-depends-on-ref {
+        description
+            "Reference to VNF that sorce VNF depends.";
+        type leafref {
+          path "../../../../../vnfd:vnfd-catalog/vnfd:vnfd/vnfd:id";
+        }
+      }
+    }
+  }
+
+  grouping monitoring-param-common {
+    // list monitoring-param {
+    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;
+  }
+
+  grouping nsd-monitoring-param {
+
+    list monitoring-param {
       key "id";
 
       key "id";
 
-      uses nsd-descriptor;
+      uses monitoring-param-common;
+
+      list vnfd-monitoring-param {
+        description "A list of VNFD monitoring params";
+        key "vnfd-id-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 yang:uuid;
+        }
+
+        leaf vnfd-monitoring-param-ref {
+          description "A reference to the VNFD monitoring param";
+          type leafref {
+            path "../../../../../vnfd:vnfd-catalog/vnfd:vnfd"
+              + "[vnfd:id = current()/../vnfd-id-ref]"
+              + "/vnfd:monitoring-param/vnfd:id";
+          }
+        }
+
+        leaf-list member-vnf-index-ref {
+          description
+            "Optional reference to member-vnf within constituent-vnfds";
+          type uint64;
+        }
+      }
+    }
+  }
+
+  grouping nsr-nsd-monitoring-param {
+    list monitoring-param {
+      key "id";
+
+      uses monitoring-param-common;
+
+      list vnfd-monitoring-param {
+        description "A list of VNFD monitoring params";
+        key "vnfd-id-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 yang:uuid;
+        }
+
+        leaf vnfd-monitoring-param-ref {
+          description "A reference to the VNFD monitoring param";
+          type leafref {
+            path "../../../../../../vnfd:vnfd-catalog/vnfd:vnfd"
+              + "[vnfd:id = current()/../vnfd-id-ref]"
+              + "/vnfd:monitoring-param/vnfd:id";
+          }
+        }
+
+        leaf-list member-vnf-index-ref {
+          description
+            "Optional reference to member-vnf within constituent-vnfds";
+          type uint64;
+        }
+      }
     }
   }
 
     }
   }
 
+
+  augment "/rw-project:project" {
+    container nsd-catalog {
+
+      list nsd {
+        key "id";
+
+        uses nsd-descriptor-common;
+
+        uses nsd-vld;
+
+        uses nsd-constituent-vnfd;
+
+        uses nsd-placement-groups;
+
+        uses nsd-vnf-dependency;
+
+        uses nsd-monitoring-param;
+      }
+    }
+  }
 }
 }
index b68872e..331cef7 100644 (file)
@@ -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.
  *
  *   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 @@ module nsr-annotation
     prefix nsr;
   }
 
     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:callpoint rw_callpoint;
   }
   tailf:annotate "/nsr:exec-ns-service-primitive" {
index e8b65ae..0917928 100644 (file)
@@ -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.
  *
  *   Licensed under the Apache License, Version 2.0 (the "License");
  *   you may not use this file except in compliance with the License.
@@ -60,7 +60,16 @@ module nsr
   }
 
   import rw-sdn {
   }
 
   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 {
   }
 
   revision 2015-09-10 {
@@ -88,138 +97,82 @@ module nsr
     }
   }
 
     }
   }
 
-  grouping cloud-config {
-    description "List of cloud config parameters";
-
-    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 "/nsr:key-pair/nsr:name";
-        }
-      }
-    }
-    list user {
+  augment "/rw-project:project" {
+    list key-pair {
       key "name";
       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 {
       leaf name {
-        description "Name of the user ";
-        type string;
-      }
-      leaf user-info {
-        description "The user name's real name";
+        description "Name of this key pair";
         type string;
       }
         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 "/nsr:key-pair/nsr:name";
-          }
-        }
+      leaf key {
+        description "Key associated with this key pair";
+        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;
-    }
+  augment "/rw-project:project" {
+    container ns-instance-config {
 
 
-    leaf key {
-      description "Key associated with this key pair";
-      type string;
-    }
-  }
+      list nsr {
+        key "id";
+        unique "name";
 
 
-  rpc start-network-service {
-    description "Start the network service";
-    input {
-      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";
+        leaf id {
+          description "Identifier for the NSR.";
+          type yang:uuid;
         }
         }
-      }
-      uses ns-instance-config-params;
-    }
 
 
-    output {
-      leaf nsr-id {
-        description "Automatically generated parameter";
-        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;
+        }
 
 
-  container ns-instance-config {
+        leaf admin-status {
+          description
+            "This is the administrative status of the NS instance";
 
 
-    list nsr {
-      key "id";
-      unique "name";
+          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";
 
 
-      leaf name {
-        description "NSR name.";
-        type string;
-      }
+          uses nsd:nsd-descriptor-common;
 
 
-      leaf short-name {
-        description "NSR short name.";
-        type string;
-      }
+          uses nsd:nsr-nsd-vld;
 
 
-      leaf description {
-        description "NSR description.";
-        type string;
-      }
+          uses nsd:nsr-nsd-constituent-vnfd;
 
 
-      leaf admin-status {
-        description
-          "This is the administrative status of the NS instance";
+          uses nsd:nsr-nsd-placement-groups;
 
 
-        type enumeration {
-          enum ENABLED;
-          enum DISABLED;
+          uses nsd:nsr-nsd-vnf-dependency;
+
+          uses nsd:nsr-nsd-monitoring-param;
         }
         }
-      }
 
 
-      container nsd {
-        description "NS descriptor used to instantiate this NS";
-        uses nsd:nsd-descriptor;
+        uses ns-instance-config-params;
       }
       }
-
-      uses ns-instance-config-params;
     }
   }
 
     }
   }
 
-  grouping ns-instance-config-params {
+  grouping ns-instance-config-params-common {
     uses manotypes:input-parameter;
 
     list scaling-group {
     uses manotypes:input-parameter;
 
     list scaling-group {
@@ -256,41 +209,85 @@ module nsr
       }
       uses manotypes:placement-group-input;
     }
       }
       uses manotypes:placement-group-input;
     }
+  }
+
+  grouping ns-instance-config-params {
+    uses ns-instance-config-params-common;
 
 
-   list vnfd-placement-group-maps {
+    list vnfd-placement-group-maps {
       description
       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";
 
           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
           "A reference to a vnfd. This is a
           leafref to path:
           ../../../../nsd:constituent-vnfd
-          + [nsr:id = current()/../nsd:id-ref]
+          + [id = current()/../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";
           + /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;
-    }
+        type yang:uuid;
+      }
 
 
-    leaf placement-group-ref {
-      description
+      leaf placement-group-ref {
+        description
           "A reference to VNFD placement group";
           "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";
+        type leafref {
+          path "../../../../vnfd:vnfd-catalog/vnfd:vnfd[vnfd:id = " +
+            "current()/../vnfd-id-ref]/vnfd:placement-groups/vnfd:name";
+        }
       }
       }
+
+      uses manotypes:placement-group-input;
     }
 
     }
 
-    uses manotypes:placement-group-input;
-   }
-   uses cloud-config;
+    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 "../../../../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 "../../../../../key-pair/name";
+          }
+        }
+      }
+    }
   }
 
   grouping vnffgr {
   }
 
   grouping vnffgr {
@@ -306,18 +303,21 @@ module nsr
       leaf vnffgd-id-ref {
         description "VNFFG descriptor id reference";
         type leafref {
       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";
+          // TODO: Fix leafref
+          path "../../../../ns-instance-config/nsr"
+            // + "[id=current()/../../ns-instance-config-ref]"
+            + "/nsd/vnffgd/id";
         }
       }
 
       leaf vnffgd-name-ref {
         description "VNFFG descriptor name reference";
         }
       }
 
       leaf vnffgd-name-ref {
         description "VNFFG descriptor name reference";
+        // TODO: Fix leafref
         type leafref {
         type leafref {
-            path "/ns-instance-config/nsr"
-              + "[id=current()/../../ns-instance-config-ref]"
-              + "/nsd/vnffgd[nsr:id = current()/../vnffgd-id-ref]"
+            path "../../../../ns-instance-config/nsr"
+              // + "[id=current()/../../ns-instance-config-ref]"
+              + "/nsd/vnffgd"
+              // + "[id=current()/../vnffgd-id-ref]"
               + "/name";
         }
       }
               + "/name";
         }
       }
@@ -327,7 +327,7 @@ module nsr
             "The SDN account to use when requesting resources for
             this vnffgr";
         type leafref {
             "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";
         }
       }
 
         }
       }
 
@@ -369,11 +369,12 @@ module nsr
         leaf vnffgd-rsp-id-ref {
           description
               "Identifier for the VNFFG Descriptor RSP reference";
         leaf vnffgd-rsp-id-ref {
           description
               "Identifier for the VNFFG Descriptor RSP reference";
+          // TODO: Fix leafref
           type leafref {
           type leafref {
-            path "/ns-instance-config/nsr"
-              + "[id=current()/../../../ns-instance-config-ref]"
+            path "../../../../../ns-instance-config/nsr"
+              // + "[id=current()/../../../ns-instance-config-ref]"
               + "/nsd/vnffgd"
               + "/nsd/vnffgd"
-              + "[id=current()/../../vnffgd-id-ref]"
+              // + "[id=current()/../../vnffgd-id-ref]"
               + "/rsp/id";
           }
         }
               + "/rsp/id";
           }
         }
@@ -381,12 +382,14 @@ module nsr
         leaf vnffgd-rsp-name-ref {
           description
               "Name for the VNFFG Descriptor RSP reference";
         leaf vnffgd-rsp-name-ref {
           description
               "Name for the VNFFG Descriptor RSP reference";
+          // TODO: Fix leafref
           type leafref {
           type leafref {
-            path "/ns-instance-config/nsr:nsr"
-              + "[id=current()/../../../ns-instance-config-ref]"
+            path "../../../../../ns-instance-config/nsr"
+              // + "[id=current()/../../../ns-instance-config-ref]"
               + "/nsd/vnffgd"
               + "/nsd/vnffgd"
-              + "[id=current()/../../vnffgd-id-ref]"
-              + "/rsp[id=current()/../vnffgd-rsp-id-ref]"
+              // + "[id=current()/../../vnffgd-id-ref]"
+              + "/rsp"
+              // + "[id=current()/../vnffgd-rsp-id-ref]"
               + "/name";
           }
         }
               + "/name";
           }
         }
@@ -430,22 +433,22 @@ module nsr
             description
                 "A reference to a vnfr id";
                 type leafref {
             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 {
                 }
           }
           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 {
                 }
           }
           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";
             }
           }
                  + "/vnfr:connection-point/vnfr:name";
             }
           }
@@ -516,7 +519,7 @@ module nsr
             description
                 "A reference to the RSP.";
             type leafref {
             description
                 "A reference to the RSP.";
             type leafref {
-              path "../../nsr:rsp/nsr:id";
+              path "../../rsp/id";
             }
           }
           leaf rsp-name {
             }
           }
           leaf rsp-name {
@@ -528,22 +531,22 @@ module nsr
             description
                 "A reference to a vnfr id";
                 type leafref {
             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 {
                 }
           }
           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 {
                 }
           }
           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";
             }
           }
                  + "/vnfr:connection-point/vnfr:name";
             }
           }
@@ -567,62 +570,69 @@ module nsr
     }
   }
 
     }
   }
 
-  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 {
+            // TODO: Fix 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 {
+            // TODO: fix 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";
+          // TODO: Fix leafref
+          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";
 
           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";
 
           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
             "List for external connection points.
             Each NS has one or more external connection points.
             As the name implies that external connection points
@@ -632,101 +642,101 @@ module nsr
             construct network service chains by connecting the
             connection points between different NS.";
 
             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.";
               "Name of the NS connection point.";
-          type string;
-        }
+            type string;
+          }
 
 
-        leaf type {
-          description
+          leaf type {
+            description
               "Type of the connection point.";
               "Type of the connection point.";
-          type manotypes:connection-point-type;
+            type manotypes:connection-point-type;
+          }
         }
         }
-      }
 
 
-      list vlr {
-        key "vlr-ref";
-        leaf vlr-ref {
-          description
+        list vlr {
+          key "vlr-ref";
+          leaf vlr-ref {
+            description
               "Reference to a VLR record in the VLR catalog";
               "Reference to a VLR record in the VLR catalog";
-          type leafref {
-            path "/vlr:vlr-catalog/vlr:vlr/vlr:id";
+            type leafref {
+              path "../../../../vlr:vlr-catalog/vlr:vlr/vlr:id";
+            }
           }
           }
-        }
 
 
 
 
-        list vnfr-connection-point-ref {
-          description
-            "A list of references to connection points.";
-          key "vnfr-id";
+          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 vnfr-id {
+              description "A reference to a vnfr";
+              type leafref {
+                path "../../../../../vnfr:vnfr-catalog/vnfr:vnfr/vnfr:id";
+              }
             }
             }
-          }
 
 
-          leaf connection-point {
-            description
+            leaf connection-point {
+              description
                 "A reference to a connection point name in a vnfr";
                 "A reference to a connection point name in a vnfr";
-            type leafref {
-              path "/vnfr:vnfr-catalog/vnfr:vnfr"
-                 + "[vnfr:id = current()/../nsr:vnfr-id]"
-                 + "/vnfr:connection-point/vnfr:name";
+              type leafref {
+                path "../../../../../vnfr:vnfr-catalog/vnfr:vnfr"
+                  + "[vnfr:id = current()/../vnfr-id]"
+                  + "/vnfr:connection-point/vnfr:name";
+              }
             }
           }
         }
             }
           }
         }
-      }
 
 
-      list constituent-vnfr-ref {
-        description
+        list constituent-vnfr-ref {
+          description
             "List of VNFRs that are part of this
              network service.";
             "List of VNFRs that are part of this
              network service.";
-        key "vnfr-id";
+          key "vnfr-id";
 
 
-        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;
+          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";
+        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";
+          leaf scaling-group-name-ref {
+            description "name of the scaling group";
+            // TODO: Fix leafref
+            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;
-          }
+          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)";
                 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.
                 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.
@@ -736,58 +746,58 @@ module nsr
                 failed              : The scaling group instantiation failed.
               ";
 
                 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
               ";
                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;
               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.
             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.
@@ -803,226 +813,229 @@ module nsr
             vl-terminate        : The NS is terminating a VL
           ";
 
             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 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;
+          }
         }
         }
-      }
 
 
-      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
           ";
             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;
+        }
 
 
-      uses manotypes:ns-service-primitive;
+        uses manotypes:ns-service-primitive;
 
 
-      list initial-config-primitive {
-        rwpb:msg-new NsrInitialConfigPrimitive;
-        description
-            "Initial set of configuration primitives for NSD.";
-        key "seq";
-        leaf seq {
+        list initial-config-primitive {
+          rwpb:msg-new NsrInitialConfigPrimitive;
           description
           description
+            "Initial set of configuration primitives for NSD.";
+          key "seq";
+          leaf seq {
+            description
               "Sequence number for the configuration primitive.";
               "Sequence number for the configuration primitive.";
-          type uint64;
-        }
+            type uint64;
+          }
 
 
-        leaf name {
-          description
+          leaf name {
+            description
               "Name of the configuration primitive.";
               "Name of the configuration primitive.";
-          type string;
-          mandatory "true";
-        }
+            type string;
+            mandatory "true";
+          }
 
 
-        leaf user-defined-script {
-          description
+          leaf user-defined-script {
+            description
               "A user defined script.";
               "A user defined script.";
-          type string;
-        }
-
-        list parameter {
-          key "name";
-          leaf name {
             type string;
           }
 
             type string;
           }
 
-          leaf value {
-            type string;
+          list parameter {
+            key "name";
+            leaf name {
+              type string;
+            }
+
+            leaf value {
+              type string;
+            }
           }
         }
           }
         }
-      }
 
 
 
 
-      list monitoring-param {
-        description
-          "List of NS level params.";
-        key "id";
+        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;
+          uses manotypes:monitoring-param-value;
+          uses manotypes:monitoring-param-ui-data;
+          uses manotypes:monitoring-param-aggregation;
 
 
-        leaf id {
-          type string;
-        }
+          leaf id {
+            type string;
+          }
 
 
-        leaf name {
-          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";
                        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 "../../../../nsd:nsd-catalog/nsd:nsd" +
+                "[nsd:id = current()/../../nsd-ref]" +
+                "/nsd:monitoring-param/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";
 
                 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";
               "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;
+            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 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.
+          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";
 
             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;
+            type uint32;
+          }
 
 
-        list parameter-group {
-          description
-              "List of NS Primitive parameter groups";
-          key "name";
-          leaf name {
-            description
-                "Name of the parameter.";
+          leaf job-status-details {
+            description "Config agent job status details, in case of errors";
             type string;
           }
 
           uses manotypes:primitive-parameter-value;
             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 {
+          list parameter-group {
             description
             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;
-            }
-          }
-
-          list primitive {
+              "List of NS Primitive parameter groups";
             key "name";
             leaf name {
             key "name";
             leaf name {
-              description "the name of the primitive";
+              description
+                "Name of the parameter.";
               type string;
             }
 
             uses manotypes:primitive-parameter-value;
               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;
               }
             }
               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;
+              }
             }
           }
         }
             }
           }
         }
@@ -1030,22 +1043,29 @@ module nsr
     }
   }
 
     }
   }
 
+  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()/.." +
+          "/project-name]/ns-instance-config/nsr/id";
+      }
+    }
+  }
+
   rpc get-ns-service-primitive-values {
     description "Get the service primitive parameter values";
   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;
       }
       leaf name {
         description "Name of the NS service primitive group";
         mandatory true;
         type string;
       }
+
+      uses rpc-common;
     }
 
     output {
     }
 
     output {
@@ -1151,12 +1171,7 @@ module nsr
         type string;
       }
 
         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";
 
       leaf triggered-by {
         description "The primitive is triggered from NS or VNF level";
@@ -1233,12 +1248,7 @@ module nsr
         type string;
       }
 
         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";
 
       leaf triggered-by {
         description "The primitive is triggered from NS or VNF level";
@@ -1333,13 +1343,7 @@ module nsr
     description "Executes scale out request";
 
     input {
     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";
 
       leaf scaling-group-name-ref {
         description "name of the scaling group";
@@ -1365,13 +1369,7 @@ module nsr
     description "Executes scale out request";
 
     input {
     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";
 
       leaf scaling-group-name-ref {
         description "name of the scaling group";
@@ -1382,8 +1380,8 @@ module nsr
         description "id of the scaling group";
         type uint64;
       }
         description "id of the scaling group";
         type uint64;
       }
-
     }
     }
+
     output {
      leaf instance-id {
         description "id of the scaling group";
     output {
      leaf instance-id {
         description "id of the scaling group";
@@ -1392,4 +1390,103 @@ module nsr
     }
   }
 
     }
   }
 
+  rpc start-network-service {
+    description "Start the network service";
+    input {
+      leaf name {
+        mandatory true;
+        description "Name of the Network Service";
+        type string;
+      }
+
+      uses rpc-common;
+
+      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:
+          ../../../../nsd:constituent-vnfd
+          + [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 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]/vnfd:vnfd-catalog/vnfd:vnfd[vnfd:id = " +
+              "current()/../vnfd-id-ref]/vnfd:placement-groups/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;
+      }
+    }
+  }
+
 }
 }
index e1f39a7..f48f75d 100644 (file)
@@ -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.
  *
  *   Licensed under the Apache License, Version 2.0 (the "License");
  *   you may not use this file except in compliance with the License.
@@ -39,6 +39,15 @@ module pnfd
     prefix "manotypes";
   }
 
     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 
   revision 2015-09-10 {
     description
       "Initial revision. This YANG file defines 
@@ -47,56 +56,58 @@ module pnfd
       "Derived from earlier versions of base YANG files";
   }
 
       "Derived from earlier versions of base YANG files";
   }
 
-  container pnfd-catalog {
+  augment "/rw-project:project" {
+    container pnfd-catalog {
 
 
-    list pnfd {
-      key "id";
+      list pnfd {
+        key "id";
 
 
-      leaf id {
-        description "Identifier for the PNFD.";
-        type yang:uuid;
-      }
+        leaf id {
+          description "Identifier for the PNFD.";
+          type yang:uuid;
+        }
 
 
-      leaf name {
-        description "PNFD name.";
-        type string;
-      }
+        leaf name {
+          description "PNFD name.";
+          type string;
+        }
 
 
-      leaf short-name {
-        description "PNFD short name.";
-        type string;
-      }
+        leaf short-name {
+          description "PNFD short name.";
+          type string;
+        }
 
 
-      leaf vendor {
-        description "Vendor of the PNFD.";
-        type string;
-      }
+        leaf vendor {
+          description "Vendor of the PNFD.";
+          type string;
+        }
 
 
-      leaf description {
-        description "Description of the PNFD.";
-        type string;
-      }
+        leaf description {
+          description "Description of the PNFD.";
+          type string;
+        }
 
 
-      leaf version {
-        description "Version of the PNFD";
-        type string;
-      }
+        leaf version {
+          description "Version of the PNFD";
+          type string;
+        }
 
 
-      list connection-point {
-        description
+        list connection-point {
+          description
             "List for external connection points. Each PNF has one or more external
             connection points.";
             "List for external connection points. Each PNF has one or more external
             connection points.";
-        key "id";
-        leaf id {
-          description
+          key "id";
+          leaf id {
+            description
               "Identifier for the external connection points";
               "Identifier for the external connection points";
-          type uint64;
-        }
+            type uint64;
+          }
 
 
-        leaf cp-type {
-          description
+          leaf cp-type {
+            description
               "Type of the connection point.";
               "Type of the connection point.";
-          type manotypes:connection-point-type;
+            type manotypes:connection-point-type;
+          }
         }
       }
     }
         }
       }
     }
index 4475928..73aab73 100644 (file)
@@ -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.
  *
  *   Licensed under the Apache License, Version 2.0 (the "License");
  *   you may not use this file except in compliance with the License.
@@ -35,6 +35,15 @@ module rw-nsd
     prefix "manotypes";
   }
 
     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 augments
   revision 2015-09-10 {
     description
       "Initial revision. This YANG file augments
@@ -43,7 +52,7 @@ module rw-nsd
       "Derived from earlier versions of base YANG files";
   }
 
       "Derived from earlier versions of base YANG files";
   }
 
-  augment /nsd:nsd-catalog/nsd:nsd {
+  augment /rw-project:project/nsd:nsd-catalog/nsd:nsd {
     uses manotypes:control-param;
     uses manotypes:action-param;
     leaf meta {
     uses manotypes:control-param;
     uses manotypes:action-param;
     leaf meta {
index 3b7588a..37e1402 100644 (file)
@@ -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.
  *
  *   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,15 @@ module rw-nsr-annotation
     prefix nsr;
   }
 
     prefix nsr;
   }
 
-  tailf:annotate "/nsr:ns-instance-opdata/nsr:nsr/rw-nsr:operational-events" {
+  import rw-project {
+    prefix "rw-project";
+  }
+
+  tailf:annotate "/rw-project:project/nsr:ns-instance-opdata/nsr:nsr/rw-nsr:operational-events" {
     tailf:callpoint rw_callpoint;
   }
 
     tailf:callpoint rw_callpoint;
   }
 
-  tailf:annotate "/nsr:ns-instance-opdata/rw-nsr:nsd-ref-count" {
+  tailf:annotate "/rw-project:project/nsr:ns-instance-opdata/rw-nsr:nsd-ref-count" {
     tailf:callpoint rw_callpoint;
   }
 }
     tailf:callpoint rw_callpoint;
   }
 }
index 805ed00..b77af37 100644 (file)
@@ -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.
  *
  *   Licensed under the Apache License, Version 2.0 (the "License");
  *   you may not use this file except in compliance with the License.
@@ -47,10 +47,19 @@ module rw-nsr
     prefix "rw-sdn";
   }
 
     prefix "rw-sdn";
   }
 
+  import rw-project {
+    prefix "rw-project";
+  }
+
   import ietf-yang-types {
     prefix "yang";
   }
 
   import ietf-yang-types {
     prefix "yang";
   }
 
+  revision 2017-02-08 {
+    description
+      "Update model to support projects.";
+  }
+
   revision 2015-09-10 {
     description
       "Initial revision. This YANG file augments
   revision 2015-09-10 {
     description
       "Initial revision. This YANG file augments
@@ -103,7 +112,7 @@ module rw-nsr
       leaf nsd-id-ref {
         description "Reference to NSD";
         type leafref {
       leaf nsd-id-ref {
         description "Reference to NSD";
         type leafref {
-          path "/nsd:nsd-catalog/nsd:nsd/nsd:id";
+          path "../../../nsd:nsd-catalog/nsd:nsd/nsd:id";
         }
       }
       leaf instance-ref-count {
         }
       }
       leaf instance-ref-count {
@@ -125,7 +134,7 @@ module rw-nsr
          All VDU's, Virtual Links, and provider networks will be requested
          using the cloud-account's associated CAL instance";
       type leafref {
          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";
+        path "../../../rw-cloud:cloud/rw-cloud:account/rw-cloud:name";
       }
     }
 
       }
     }
 
@@ -153,7 +162,7 @@ module rw-nsr
             All VDU's, Virtual Links, and provider networks will be requested
             using the cloud-account's associated CAL instance";
         type leafref {
             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";
+          path "../../../../rw-cloud:cloud/rw-cloud:account/rw-cloud:name";
         }
       }
 
         }
       }
 
@@ -172,7 +181,8 @@ module rw-nsr
           The configuration for this VNF will be driven using the specified config
           agent account";
         type leafref {
           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";
         }
       }
     }
         }
       }
     }
@@ -196,7 +206,7 @@ module rw-nsr
             All VDU's, Virtual Links, and provider networks will be requested
             using the cloud-account's associated CAL instance";
         type leafref {
             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";
+          path "../../../../rw-cloud:cloud/rw-cloud:account/rw-cloud:name";
         }
       }
 
         }
       }
 
@@ -212,15 +222,112 @@ module rw-nsr
   }
 
 
   }
 
 
-  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:start-network-service/nsr:input{
-    uses 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-project:project[rw-project:name=current()/../" +
+          "nsr:project-name]/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 {
+      description
+          "Mapping VNF to Cloud Account where VNF will be instantiated";
+
+      key "member-vnf-index-ref";
+      leaf member-vnf-index-ref {
+        type uint64;
+      }
+
+      leaf cloud-account {
+        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-project:project[rw-project:name=current()/../../" +
+            "nsr:project-name]/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;
+      }
+
+      leaf config-agent-account {
+        description
+          "The configured config agent account to use for instantiating this VNF.
+          The configuration for this VNF will be driven using the specified config
+          agent account";
+        type leafref {
+          path "/rw-project:project[rw-project:name=current()/../.." +
+            "/nsr:project-name]/rw-config-agent:config-agent/" +
+            "rw-config-agent:account/rw-config-agent:name";
+        }
+      }
+    }
+
+    list vl-cloud-account-map {
+      description
+          "Mapping VL to Cloud Account where VL will be instantiated";
+
+      key "vld-id-ref";
+
+      leaf vld-id-ref {
+        description
+            "A reference to a vld.
+            leafref path ../../nsd/vld/id";
+        type string;
+      }
+
+      leaf-list cloud-accounts {
+        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-project:project[rw-project:name=current()/../../" +
+            "nsr:project-name]/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.";
+        type string;
+      }
+    }
   }
 
   }
 
-  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;
 
     uses manotypes:action-param;
     uses manotypes:control-param;
 
@@ -229,7 +336,7 @@ module rw-nsr
         "The SDN account associted with the cloud account using which an
          NS was instantiated.";
       type leafref {
         "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";
       }
     }
 
       }
     }
 
@@ -381,11 +488,11 @@ module rw-nsr
     uses operational-events;
   }
 
     uses operational-events;
   }
 
-  augment /nsr:ns-instance-opdata {
+  augment /rw-project:project/nsr:ns-instance-opdata {
     uses nsd-ref-count;
   }
 
     uses nsd-ref-count;
   }
 
-  augment /nsr:ns-instance-opdata/nsr:nsr/nsr:vlr {
+  augment /rw-project:project/nsr:ns-instance-opdata/nsr:nsr/nsr:vlr {
     leaf assigned-subnet {
       description "Subnet added for the VL";
       type string;
     leaf assigned-subnet {
       description "Subnet added for the VL";
       type string;
@@ -394,7 +501,7 @@ module rw-nsr
       description
         "The configured cloud account in which the VL is instantiated within.";
       type leafref {
       description
         "The configured cloud account in which the VL is instantiated within.";
       type leafref {
-        path "/rw-cloud:cloud/rw-cloud:account/rw-cloud:name";
+        path "../../../../rw-cloud:cloud/rw-cloud:account/rw-cloud:name";
       }
     }
     leaf om-datacenter {
       }
     }
     leaf om-datacenter {
@@ -407,14 +514,14 @@ module rw-nsr
     }
   }
 
     }
   }
 
-  augment /nsr:ns-instance-opdata/nsr:nsr/nsr:constituent-vnfr-ref {
+  augment /rw-project:project/nsr:ns-instance-opdata/nsr:nsr/nsr:constituent-vnfr-ref {
     leaf cloud-account {
       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 {
     leaf cloud-account {
       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";
+        path "../../../../rw-cloud:cloud/rw-cloud:account/rw-cloud:name";
       }
     }
     leaf om-datacenter {
       }
     }
     leaf om-datacenter {
@@ -427,7 +534,7 @@ module rw-nsr
     }
   }
 
     }
   }
 
-  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";
     leaf nfvi-polling-period {
       description
         "Defines the period (secons) that the NFVI metrics are polled at";
diff --git a/models/plugins/yang/rw-project.yang b/models/plugins/yang/rw-project.yang
new file mode 100644 (file)
index 0000000..2f34c92
--- /dev/null
@@ -0,0 +1,88 @@
+/*
+ *
+ *   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
+{
+  namespace "http://riftio.com/ns/riftware-1.0/rw-project";
+  prefix "rw-project";
+
+  revision 2017-02-08 {
+    description
+      "Initial revision. This YANG file defines the
+       projects fo MANO to support Role Based Access
+       Control (RBAC)";
+    reference
+      "Derived from earlier versions of base YANG files";
+  }
+
+  list project {
+    description
+        "Configuration for individual Projects.  RIFT.ware applications
+        and Projects are expected to augment this list in order to add
+        configuration for Projects that is specific to the product or
+        application.  As such, this list contains minimal data defined
+        in this yang module.  When augmenting this element, other yang
+        modules should prefer to define containers with the same name
+        as the augmenting module.  (Augmenting RIFT.ware modules should
+        prefer to augment without the rw prefix [for new features], or
+        should prefer to augment the augmented container of an existing
+        augment.";
+
+    key name;
+    leaf name {
+      description "Name of the Project.";
+      type string {
+        length "1..255";
+      }
+    }
+
+    leaf description {
+      description "Information about Project";
+      type string;
+    }
+
+    container project-config {
+
+      description "Project management related configuration.";
+
+      // list user {
+      //   description
+      //     "The list of Users who have been assigned Roles within this
+      //     Project.";
+
+      //   key user-name user-domain;
+      //   uses rw-rbac-base:user-key;
+
+      //   list role {
+      //     description
+      //       "The list of Roles the User has been assigned.";
+
+      //     key role key;
+      //     uses rw-rbac-base:role-instance;
+      //   }
+      // }
+    }
+
+    container project-state {
+
+      config false;
+
+      description "Project management operational data";
+    }
+  }
+}
index 755bb81..88e8e43 100644 (file)
@@ -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.
  *
  *   Licensed under the Apache License, Version 2.0 (the "License");
  *   you may not use this file except in compliance with the License.
@@ -39,6 +39,15 @@ module rw-vlr
     prefix "yang";
   }
 
     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
   revision 2015-09-30 {
     description
       "Initial revision. This YANG file augments
@@ -47,13 +56,13 @@ module rw-vlr
       "Derived from earlier versions of base YANG files";
   }
 
       "Derived from earlier versions of base YANG files";
   }
 
-  augment /vlr:vlr-catalog/vlr:vlr {
+  augment /rw-project:project/vlr:vlr-catalog/vlr:vlr {
     leaf cloud-account {
       description
         "The cloud account to use when requesting resources for
          this vlr";
       type leafref {
     leaf cloud-account {
       description
         "The cloud account to use when requesting resources for
          this vlr";
       type leafref {
-        path "/rw-cloud:cloud/rw-cloud:account/rw-cloud:name";
+        path "../../../rw-cloud:cloud/rw-cloud:account/rw-cloud:name";
       }
     }
     leaf om-datacenter {
       }
     }
     leaf om-datacenter {
index 29eb852..7e2e8e7 100644 (file)
@@ -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.
  *
  *   Licensed under the Apache License, Version 2.0 (the "License");
  *   you may not use this file except in compliance with the License.
@@ -41,6 +41,15 @@ module rw-vnfd
     prefix "manotypes";
   }
 
     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 augments
   revision 2015-09-10 {
     description
       "Initial revision. This YANG file augments
@@ -49,7 +58,7 @@ module rw-vnfd
       "Derived from earlier versions of base YANG files";
   }
 
       "Derived from earlier versions of base YANG files";
   }
 
-  augment /vnfd:vnfd-catalog/vnfd:vnfd {
+  augment /rw-project:project/vnfd:vnfd-catalog/vnfd:vnfd {
     uses manotypes:control-param;
     uses manotypes:action-param;
     leaf meta {
     uses manotypes:control-param;
     uses manotypes:action-param;
     leaf meta {
@@ -96,7 +105,7 @@ module rw-vnfd
     } // list component
   }
 
     } // list component
   }
 
-  augment /vnfd:vnfd-catalog/vnfd:vnfd/vnfd:vdu {
+  augment /rw-project:project/vnfd:vnfd-catalog/vnfd:vnfd/vnfd:vdu {
     leaf vcs-component-ref {
       description
           "This defines the software components using the
     leaf vcs-component-ref {
       description
           "This defines the software components using the
@@ -109,7 +118,7 @@ module rw-vnfd
            Also using a state machine is not something that
            is well described in MANO.";
       type leafref {
            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";
+        path "../../rw-vnfd:component/rw-vnfd:component-name";
       }
     }
   }
       }
     }
   }
index 6090fcf..da9bdbf 100644 (file)
@@ -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.
  *
  *   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 @@ module rw-vnfr-annotation
     prefix vnfr;
   }
 
     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: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:callpoint rw_callpoint;
   }
 
-  tailf:annotate "/rw-vnfr:vnfr-console" {
+  tailf:annotate "/rw-project:project/rw-vnfr:vnfr-console" {
     tailf:callpoint rw_callpoint;
   }
 
     tailf:callpoint rw_callpoint;
   }
 
index be8acb4..6337cad 100644 (file)
@@ -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.
  *
  *   Licensed under the Apache License, Version 2.0 (the "License");
  *   you may not use this file except in compliance with the License.
@@ -53,6 +53,15 @@ module rw-vnfr
     prefix "inet";
   }
 
     prefix "inet";
   }
 
+  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 augments
   revision 2015-09-10 {
     description
       "Initial revision. This YANG file augments
@@ -141,7 +150,7 @@ module rw-vnfr
     }
   }
 
     }
   }
 
-  augment /vnfr:vnfr-catalog/vnfr:vnfr {
+  augment /rw-project:project/vnfr:vnfr-catalog/vnfr:vnfr {
     uses manotypes:action-param;
     uses manotypes:control-param;
 
     uses manotypes:action-param;
     uses manotypes:control-param;
 
@@ -150,7 +159,7 @@ module rw-vnfr
         "The cloud account to use when requesting resources for
          this vnf";
       type leafref {
         "The cloud account to use when requesting resources for
          this vnf";
       type leafref {
-        path "/rw-cloud:cloud/rw-cloud:account/rw-cloud:name";
+        path "../../../rw-cloud:cloud/rw-cloud:account/rw-cloud:name";
       }
     }
 
       }
     }
 
@@ -235,7 +244,7 @@ module rw-vnfr
     }
   }
 
     }
   }
 
-  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";
     leaf vm-pool {
       description
         "The pool from which this vm was allocated from";
@@ -258,7 +267,7 @@ module rw-vnfr
            Also using a state machine is not something that
            is well described in MANO.";
       type leafref {
            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";
+        path "../../rw-vnfr:component/rw-vnfr:component-name";
       }
     }
 
       }
     }
 
@@ -270,6 +279,7 @@ module rw-vnfr
       type string;
     }
   }
       type string;
     }
   }
+
   grouping vnfd-ref-count {
     list vnfd-ref-count {
       key "vnfd-id-ref";
   grouping vnfd-ref-count {
     list vnfd-ref-count {
       key "vnfd-id-ref";
@@ -278,7 +288,7 @@ module rw-vnfr
       leaf vnfd-id-ref {
         description "Reference to VNFD";
         type leafref {
       leaf vnfd-id-ref {
         description "Reference to VNFD";
         type leafref {
-          path "/vnfd:vnfd-catalog/vnfd:vnfd/vnfd:id";
+          path "../../../vnfd:vnfd-catalog/vnfd:vnfd/vnfd:id";
         }
       }
       leaf instance-ref-count {
         }
       }
       leaf instance-ref-count {
@@ -292,28 +302,31 @@ module rw-vnfr
       }
     }
   }
       }
     }
   }
-  augment /vnfr:vnfr-catalog {
+
+  augment /rw-project:project/vnfr:vnfr-catalog {
     uses vnfd-ref-count;
   }
 
     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 {
+    container vnfr-console {
+      config false;
+      list vnfr {
         key "id";
         leaf id {
         key "id";
         leaf id {
-          description "Unique id for the VDU";
+          description "Identifier for the VNFR.";
           type yang:uuid;
         }
           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;
+          }
         }
       }
     }
         }
       }
     }
index 2747887..9f26dba 100644 (file)
@@ -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.
  *
  *   Licensed under the Apache License, Version 2.0 (the "License");
  *   you may not use this file except in compliance with the License.
@@ -43,6 +43,15 @@ module vld
     prefix "manotypes";
   }
 
     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
   revision 2015-09-10 {
     description
       "Initial revision. This YANG file defines
@@ -51,91 +60,93 @@ module vld
       "Derived from earlier versions of base YANG files";
   }
 
       "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 id {
+          description "Identifier for the VLD.";
+          type yang:uuid;
+        }
 
 
-      leaf name {
-        description "Virtual Link Descriptor (VLD) name.";
-        type string;
-      }
+        leaf name {
+          description "Virtual Link Descriptor (VLD) name.";
+          type string;
+        }
 
 
-      leaf short-name {
-        description "Short name for VLD for UI";
-        type string;
-      }
+        leaf short-name {
+          description "Short name for VLD for UI";
+          type string;
+        }
 
 
-      leaf vendor {
-        description "Provider of the VLD.";
-        type string;
-      }
+        leaf vendor {
+          description "Provider of the VLD.";
+          type string;
+        }
 
 
-      leaf description {
-        description "Description of the VLD.";
-        type string;
-      }
+        leaf description {
+          description "Description of the VLD.";
+          type string;
+        }
 
 
-      leaf version {
-        description "Version of the VLD";
-        type string;
-      }
+        leaf version {
+          description "Version of the VLD";
+          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.";
             "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.";
             "For ELAN this is the bandwidth of branches.";
-        type uint64;
-      }
+          type uint64;
+        }
 
 
-      list vnfd-connection-point-ref {
-        description
+        list vnfd-connection-point-ref {
+          description
             "A list of references to connection points.";
             "A list of references to connection points.";
-        key "vnfd-ref member-vnf-index-ref";
+          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 vnfd-ref {
+            description "A reference to a vnfd";
+            type leafref {
+              path "../../../../vnfd:vnfd-catalog/vnfd:vnfd/vnfd:id";
+            }
           }
           }
-        }
 
 
-        leaf member-vnf-index-ref {
-          description 
+          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'. 
               Instead using direct leaf to avoid circular reference.";
               "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'. 
               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";
               "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 "../../../../vnfd:vnfd-catalog/vnfd:vnfd"
+                + "[vnfd:id = current()/../vld:vnfd-ref]"
+                + "/vnfd:connection-point/vnfd:name";
+            }
           }
         }
           }
         }
-      }
 
 
-      // replicate for pnfd container here
-      uses manotypes:provider-network;
+        // replicate for pnfd container here
+        uses manotypes:provider-network;
+      }
     }
   }
 }
     }
   }
 }
index 4bed1d2..f773de6 100644 (file)
@@ -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.
  *
  *   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 @@ module vlr-annotation
     prefix vlr;
   }
 
     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;
   }
 }
     tailf:callpoint rw_callpoint;
   }
 }
index 20ba6f7..ca98671 100644 (file)
@@ -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.
  *
  *   Licensed under the Apache License, Version 2.0 (the "License");
  *   you may not use this file except in compliance with the License.
@@ -43,6 +43,15 @@ module vlr
     prefix "vld";
   }
 
     prefix "vld";
   }
 
+  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
   revision 2015-09-10 {
     description
       "Initial revision. This YANG file defines
@@ -51,125 +60,127 @@ module vlr
       "Derived from earlier versions of base YANG files";
   }
 
       "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. 
             "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 for VLR for UI";
-        type string;
-      }
+        leaf short-name {
+          description "Short name for VLR for 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.";
             "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.";
             "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";
 
           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";
 
           Uptime is expressed in seconds";
 
-        type uint32;
-      }
+          type uint32;
+        }
 
 
-      leaf network-id {
-        description 
+        leaf network-id {
+          description
             "Identifier for the allocated network resource.";
             "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.";
             "Name of network in VIM account. This is used to indicate
             pre-provisioned network name in cloud account.";
-        type string;
-      }
+          type string;
+        }
 
 
-      // replicate for pnfd container here
+        // replicate for pnfd container here
 
 
-      uses manotypes:provider-network;
-      uses manotypes:ip-profile-info;
+        uses manotypes:provider-network;
+        uses manotypes:ip-profile-info;
       
       
-      leaf status {
-        description
+        leaf status {
+          description
             "Status of the virtual link record.";
             "Status of the virtual link record.";
-        type enumeration {
-          enum LINK_UP;
-          enum DEGRADED;
-          enum LINK_DOWN;
+          type enumeration {
+            enum LINK_UP;
+            enum DEGRADED;
+            enum LINK_DOWN;
+          }
         }
         }
-      }
-      leaf operational-status {
-        description
-          "The operational status of the Virtual Link
+        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
             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,15 @@ module vlr
             failed               : The VL instantiation failed in VIM.
           ";
 
             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 {
+            rwpb:enum-type "VlOperationalStatus";
+            enum init;
+            enum vl-alloc-pending;
+            enum running;
+            enum vl-terminate-pending;
+            enum terminated;
+            enum failed;
+          }
         }
       }
     }
         }
       }
     }
index a825be1..0e5d5ae 100644 (file)
@@ -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.
  *
  *   Licensed under the Apache License, Version 2.0 (the "License");
  *   you may not use this file except in compliance with the License.
@@ -39,6 +39,15 @@ module vnfd
     prefix "inet";
   }
 
     prefix "inet";
   }
 
+  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
   revision 2015-09-10 {
     description
       "Initial revision. This YANG file defines
@@ -527,15 +536,17 @@ module vnfd
       }
   }
 
       }
   }
 
-  container vnfd-catalog {
-    description
+  augment "/rw-project:project" {
+    container vnfd-catalog {
+      description
         "Virtual Network Function Descriptor (VNFD).";
 
         "Virtual Network Function Descriptor (VNFD).";
 
-    list vnfd {
-      key "id";
+      list vnfd {
+        key "id";
 
 
-      uses vnfd-descriptor;
-     }
+        uses vnfd-descriptor;
+      }
+    }
   }
 }
 
   }
 }
 
index 99347ae..3220113 100644 (file)
@@ -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.
  *
  *   Licensed under the Apache License, Version 2.0 (the "License");
  *   you may not use this file except in compliance with the License.
@@ -39,6 +39,15 @@ module vnffgd
     prefix "manotypes";
   }
 
     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 
   revision 2014-10-27 {
     description
       "Initial revision. This YANG file defines 
@@ -47,37 +56,39 @@ module vnffgd
       "Derived from earlier versions of base YANG files";
   }
 
       "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 id {
+          description "Identifier for the VNFFGD.";
+          type yang:uuid;
+        }
 
 
-      leaf provider {
-        description "Provider of the VNFFGD.";
-        type string;
-      }
+        leaf provider {
+          description "Provider of the VNFFGD.";
+          type string;
+        }
 
 
-      leaf description {
-        description "Description of the VNFFGD.";
-        type string;
-      }
+        leaf description {
+          description "Description of the VNFFGD.";
+          type string;
+        }
 
 
-      leaf version {
-        description "Version of the VNFFGD";
-        type string;
-      }
+        leaf version {
+          description "Version of the VNFFGD";
+          type string;
+        }
 
 
-      //TODO: Add more content here
+        //TODO: Add more content here
+      }
     }
   }
 }
     }
   }
 }
index 150dc9a..ef266a1 100644 (file)
@@ -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.
  *
  *   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 @@ module vnfr-annotation
     prefix vnfr;
   }
 
     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;
   }
 
     tailf:callpoint rw_callpoint;
   }
 
index c0a6237..13d9600 100644 (file)
@@ -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.
  *
  *   Licensed under the Apache License, Version 2.0 (the "License");
  *   you may not use this file except in compliance with the License.
@@ -51,6 +51,19 @@ module vnfr
     prefix "inet";
   }
 
     prefix "inet";
   }
 
+  import rw-project {
+    prefix "rw-project";
+  }
+
+  import rw-cloud {
+    prefix "rw-cloud";
+  }
+
+  revision 2017-02-08 {
+    description
+      "Update model to support projects.";
+  }
+
   revision 2015-09-10 {
     description
       "Initial revision. This YANG file defines
   revision 2015-09-10 {
     description
       "Initial revision. This YANG file defines
@@ -133,118 +146,119 @@ module vnfr
     }
   }
 
     }
   }
 
-  container vnfr-catalog {
-    config false;
-    list vnfr {
-      description
+  augment "/rw-project:project" {
+    container vnfr-catalog {
+      config false;
+      list vnfr {
+        description
           "Virtual Network Function Record (VNFR).";
           "Virtual Network Function Record (VNFR).";
-      key "id";
-      unique "name";
+        key "id";
+        unique "name";
 
 
-      leaf id {
-        description "Identifier for the VNFR.";
-        type yang:uuid;
-      }
+        leaf id {
+          description "Identifier for the VNFR.";
+          type yang:uuid;
+        }
 
 
-      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";
             "NS instance identifier.
              This is a leafref /nsr:ns-instance-config/nsr:nsr/nsr:id";
-        type yang:uuid;
-      }
+          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";
+        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";
+          }
         }
         }
-      }
 
 
-      leaf dashboard-url {
-        description "Dashboard URL";
-        type inet:uri;
-      }
+        leaf dashboard-url {
+          description "Dashboard URL";
+          type inet:uri;
+        }
 
 
-      leaf name {
-        description "VNFR name.";
-        type string;
-      }
+        leaf name {
+          description "VNFR name.";
+          type string;
+        }
 
 
-      leaf short-name {
-        description "VNFR short name.";
-        type string;
-      }
+        leaf short-name {
+          description "VNFR short name.";
+          type string;
+        }
 
 
-      leaf vendor {
-        description "Vendor of the VNFR.";
-        type string;
-      }
+        leaf vendor {
+          description "Vendor of the VNFR.";
+          type string;
+        }
 
 
-      leaf description {
-        description "Description of the VNFR.";
-        type string;
-      }
+        leaf description {
+          description "Description of the VNFR.";
+          type string;
+        }
 
 
-      leaf version {
-        description "Version of the VNFR";
-        type string;
-      }
+        leaf version {
+          description "Version of the VNFR";
+          type string;
+        }
 
 
-      leaf create-time {
-        description
-          "Creation timestamp of this Virtual Network 
+        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";
 
           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";
 
           Uptime is expressed in seconds";
 
-        type uint32;
-      }
+          type uint32;
+        }
 
 
-      container vnfd {
-        description "VNF descriptor used to instantiate this VNF";
-        uses vnfd:vnfd-descriptor;
-      }
+        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;
+        // 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;
+        // Mainly used by Mon-params & dashboard url
+        container mgmt-interface {
+          leaf ip-address {
+            type inet:ip-address;
+          }
+          leaf port {
+            type inet:port-number;
+          }
         }
         }
-      }
 
 
-      list internal-vlr {
-        key "vlr-ref";
+        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 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";
+          leaf-list internal-connection-point-ref {
+            type leafref {
+              path "../../vdur/internal-connection-point/id";
+            }
           }
         }
           }
         }
-      }
 
 
-      list connection-point {
-        key "name";
-        description
+        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
             "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,120 +269,120 @@ module vnfr
              different VNFs. The NFVO will use VLDs and VNFFGs at
              the network service level to construct network services.";
 
              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:common-connection-point;
 
 
-        leaf vlr-ref {
-          description
+          leaf vlr-ref {
+            description
               "Reference to the VLR associated with this connection point";
               "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";
               "IP address assigned to the external connection point";
-          type inet:ip-address;
-        }
-        leaf mac-address {
-          description
+            type inet:ip-address;
+          }
+          leaf mac-address {
+            description
               "MAC address assigned to the external connection point";
               "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;
+            // 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";
+        list vdur {
+          description "List of Virtual Deployment Units";
+          key "id";
+          unique "name";
 
 
-        leaf id {
-          description "Unique id for the VDU";
-          type yang:uuid;
-        }
+          leaf id {
+            description "Unique id for the VDU";
+            type yang:uuid;
+          }
 
 
-        leaf name {
-          description "name of the instantiated VDUR";
-          type string;
-        }
+          leaf name {
+            description "name of the instantiated VDUR";
+            type string;
+          }
 
 
-        leaf vdu-id-ref {
-          type leafref {
-            path "../../vnfd/vdu/id";
+          leaf vdu-id-ref {
+            type leafref {
+              path "../../vnfd/vdu/id";
+            }
           }
           }
-        }
 
 
-        leaf vim-id {
-          description "Allocated VM resource id";
-          type string;
-        }
+          leaf vim-id {
+            description "Allocated VM resource id";
+            type string;
+          }
 
 
-        leaf flavor-id {
-          description "VIM assigned flavor id";
-          type string;
-        }
+          leaf flavor-id {
+            description "VIM assigned flavor id";
+            type string;
+          }
 
 
-        leaf image-id {
-          description "VIM assigned image 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 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 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;
-        }
+          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:vm-flavor;
+          uses manotypes:guest-epa;
+          uses manotypes:vswitch-epa;
+          uses manotypes:hypervisor-epa;
+          uses manotypes:host-epa;
 
 
-        uses manotypes:supplemental-boot-data;
+          uses manotypes:supplemental-boot-data;
 
 
-        list volumes {
-          key "name";
+          list volumes {
+            key "name";
 
 
-          leaf name {
-            description "Name of the disk-volumes, e.g. vda, vdb etc";
-            type string;
-          }
+            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;
-          }
+            leaf volume-id {
+              description "VIM assigned volume id";
+              type string;
+            }
 
 
-          uses manotypes:volume-info;
-        }
+            uses manotypes:volume-info;
+          }
 
 
-        list alarms {
-          description
+          list alarms {
+            description
               "A list of the alarms that have been created for this VDU";
 
               "A list of the alarms that have been created for this VDU";
 
-          key "alarm-id";
-          uses manotypes:alarm;
-        }
+            key "alarm-id";
+            uses manotypes:alarm;
+          }
 
 
-        list internal-connection-point {
-          key "id";
-          description
+          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
               "List for internal connection points. Each VNFC
                has zero or more internal connection points.
                Internal connection points are used for connecting
@@ -376,67 +390,67 @@ module vnfr
                has only one VNFC, it may not have any internal
                connection points.";
 
                has only one VNFC, it may not have any internal
                connection points.";
 
-          uses vnfd:common-connection-point;
+            uses vnfd:common-connection-point;
 
 
-          leaf ip-address {
-            description
+            leaf ip-address {
+              description
                 "IP address assigned to the internal connection point";
                 "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";
                 "MAC address assigned to the internal connection point";
-            // type inet:mac-address;
-            type string;
+              // type inet:mac-address;
+              type string;
+            }
           }
           }
-        }
 
 
-        list internal-interface {
-          description
+          list internal-interface {
+            description
               "List of internal interfaces for the VNF";
               "List of internal interfaces for the VNF";
-          key name;
+            key name;
 
 
-          leaf name {
-            description
+            leaf name {
+              description
                 "Name of internal interface. Note that this
                  name has only local significance to the VDU.";
                 "Name of internal interface. Note that this
                  name has only local significance to the VDU.";
-            type string;
-          }
+              type string;
+            }
 
 
-          leaf vdur-internal-connection-point-ref {
-            type leafref {
-              path "../../internal-connection-point/id";
+            leaf vdur-internal-connection-point-ref {
+              type leafref {
+                path "../../internal-connection-point/id";
+              }
             }
             }
+            uses virtual-interface;
           }
           }
-          uses virtual-interface;
-        }
 
 
-        list external-interface {
-          description
+          list external-interface {
+            description
               "List of external interfaces for the VNF.
                The external interfaces enable sending
                traffic to and from VNF.";
               "List of external interfaces for the VNF.
                The external interfaces enable sending
                traffic to and from VNF.";
-          key name;
+            key name;
 
 
-          leaf name {
-            description
+            leaf name {
+              description
                 "Name of the external interface. Note that
                  this name has only local significance.";
                 "Name of the external interface. Note that
                  this name has only local significance.";
-            type string;
-          }
+              type string;
+            }
 
 
-          leaf vnfd-connection-point-ref {
-            description
-              "Name of the external connection point.";
-            type leafref {
-              path "../../../connection-point/name";
+            leaf vnfd-connection-point-ref {
+              description
+                "Name of the external connection point.";
+              type leafref {
+                path "../../../connection-point/name";
+              }
             }
             }
+            uses virtual-interface;
           }
           }
-          uses virtual-interface;
-        }
-        leaf operational-status {
-          description
-            "The operational status of the VDU 
+          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
               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
@@ -447,26 +461,26 @@ module vnfr
               failed              : The VDU  instantiation failed.
             ";
 
               failed              : The VDU  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 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;
+            }
           }
           }
+          uses placement-group-info;
         }
         }
-        uses placement-group-info;
-      }
 
 
-      uses manotypes:monitoring-param;
+        uses manotypes:monitoring-param;
 
 
-      leaf operational-status {
-        description
-          "The operational status of the VNFR instance
+        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.
             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.
@@ -478,51 +492,57 @@ module vnfr
             failed              : The VNF instantiation failed
           ";
 
             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;
+          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
           ";
 
             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;
       }
       }
-      uses placement-group-info;
     }
   }
 
   rpc create-alarm {
     description "Create an alert for a running VDU";
     input {
     }
   }
 
   rpc create-alarm {
     description "Create an alert for a running VDU";
     input {
+      uses manotypes:rpc-project-name;
+
       leaf cloud-account {
         mandatory true;
       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 {
       }
 
       leaf vdur-id {
@@ -545,9 +565,14 @@ module vnfr
   rpc destroy-alarm {
     description "Destroy an alert that is associated with a running VDU";
     input {
   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;
       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 {
       }
 
       leaf alarm-id {
index 3482277..7ef9879 100644 (file)
@@ -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.
 #
 #   Licensed under the Apache License, Version 2.0 (the "License");
 #   you may not use this file except in compliance with the License.
@@ -35,7 +35,7 @@ rift_add_vala(
   VALA_PACKAGES
     rw_types-1.0 rw_yang-1.0 rw_keyspec-1.0 rw_yang_pb-1.0 rw_schema_proto-1.0
     rw_log_yang-1.0 rw_base_yang-1.0 rwcal_yang-1.0 rw_manifest_yang-1.0 protobuf_c-1.0 ietf_netconf_yang-1.0
   VALA_PACKAGES
     rw_types-1.0 rw_yang-1.0 rw_keyspec-1.0 rw_yang_pb-1.0 rw_schema_proto-1.0
     rw_log_yang-1.0 rw_base_yang-1.0 rwcal_yang-1.0 rw_manifest_yang-1.0 protobuf_c-1.0 ietf_netconf_yang-1.0
-    rw_log-1.0
+    rw_log-1.0 rw_project_yang-1.0
   VAPI_DIRS ${RIFT_SUBMODULE_BINARY_ROOT}/rwcal/plugins/yang
             ${RIFT_SUBMODULE_BINARY_ROOT}/models/plugins/yang
             ${RIFT_SUBMODULE_BINARY_ROOT}/rwvcs/plugins/yang
   VAPI_DIRS ${RIFT_SUBMODULE_BINARY_ROOT}/rwcal/plugins/yang
             ${RIFT_SUBMODULE_BINARY_ROOT}/models/plugins/yang
             ${RIFT_SUBMODULE_BINARY_ROOT}/rwvcs/plugins/yang
@@ -49,7 +49,7 @@ rift_add_vala(
   GENERATE_VAPI_FILE ${VALA_LONG_NAME}.vapi
   GENERATE_GIR_FILE ${VALA_TYPELIB_PREFIX}.gir
   GENERATE_TYPELIB_FILE ${VALA_TYPELIB_PREFIX}.typelib
   GENERATE_VAPI_FILE ${VALA_LONG_NAME}.vapi
   GENERATE_GIR_FILE ${VALA_TYPELIB_PREFIX}.gir
   GENERATE_TYPELIB_FILE ${VALA_TYPELIB_PREFIX}.typelib
-  DEPENDS rwcal_yang rwlog_gi rwschema_yang rwmanifest_yang
+  DEPENDS rwcal_yang rwlog_gi rwschema_yang rwmanifest_yang rwproject_yang
   )
 
 rift_install_vala_artifacts(
   )
 
 rift_install_vala_artifacts(
index a1b24fe..58c5cdb 100644 (file)
@@ -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.
 #
 #   Licensed under the Apache License, Version 2.0 (the "License");
 #   you may not use this file except in compliance with the License.
@@ -37,10 +37,12 @@ rift_add_yang_target(
   COMPONENT ${PKG_LONG_NAME}
   DEPENDS
     mano-types_yang
   COMPONENT ${PKG_LONG_NAME}
   DEPENDS
     mano-types_yang
+    rwproject_yang
   LIBRARIES
     rwschema_yang_gen
     rwyang
     rwlog
     rwlog-mgmt_yang_gen
     mano-types_yang_gen
   LIBRARIES
     rwschema_yang_gen
     rwyang
     rwlog
     rwlog-mgmt_yang_gen
     mano-types_yang_gen
+    rwproject_yang_gen
 )
 )
index 9daefb1..f2d5b08 100644 (file)
@@ -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.
  *
  *   Licensed under the Apache License, Version 2.0 (the "License");
  *   you may not use this file except in compliance with the License.
@@ -43,6 +43,15 @@ module rwcal
     prefix "manotypes";
   }
 
     prefix "manotypes";
   }
 
+  import rw-project {
+    prefix "rw-project";
+  }
+
+  revision 2017-02-08 {
+    description
+      "Update model to support projects.";
+  }
+
   revision 2014-12-30 {
     description
         "Initial revision.";
   revision 2014-12-30 {
     description
         "Initial revision.";
@@ -695,149 +704,153 @@ module rwcal
     }
   }
 
     }
   }
 
-  container cloud-accounts {
-    list cloud-account-list {
-      rwpb:msg-new CloudAccount;
-      key "name";
+  augment "/rw-project:project" {
+    container cloud-accounts {
+      list cloud-account-list {
+        rwpb:msg-new CloudAccount;
+        key "name";
 
 
-      leaf name {
-        type string;
+        leaf name {
+          type string;
+        }
+        uses provider-auth;
       }
       }
-      uses provider-auth;
     }
   }
 
     }
   }
 
-  container vim-resources {
-    rwpb:msg-new VimResources;
-    config false;
-
-    list vminfo-list {
-      rwpb:msg-new VMInfoItem;
+  augment "/rw-project:project" {
+    container vim-resources {
+      rwpb:msg-new VimResources;
       config false;
       config false;
-      key "vm-id";
 
 
-      uses vm-info-item;
-    }
+      list vminfo-list {
+        rwpb:msg-new VMInfoItem;
+        config false;
+        key "vm-id";
 
 
-    list imageinfo-list {
-      rwpb:msg-new ImageInfoItem;
-      config false;
-      key "id";
-
-      uses image-info-item;
-    }
+        uses vm-info-item;
+      }
 
 
-    list tenantinfo-list {
-      rwpb:msg-new TenantInfoItem;
-      config false;
-      key "tenant-id";
+      list imageinfo-list {
+        rwpb:msg-new ImageInfoItem;
+        config false;
+        key "id";
 
 
-      leaf tenant-name {
-        rwpb:field-inline "true";
-        rwpb:field-string-max 64;
-        type string;
+        uses image-info-item;
       }
 
       }
 
-      leaf tenant-id {
-        rwpb:field-inline "true";
-        rwpb:field-string-max 64;
-        type string;
-      }
-    }
+      list tenantinfo-list {
+        rwpb:msg-new TenantInfoItem;
+        config false;
+        key "tenant-id";
 
 
-    list userinfo-list {
-      rwpb:msg-new UserInfoItem;
-      config false;
-      key "user-id";
+        leaf tenant-name {
+          rwpb:field-inline "true";
+          rwpb:field-string-max 64;
+          type string;
+        }
 
 
-      leaf user-name{
-        rwpb:field-inline "true";
-        rwpb:field-string-max 64;
-        type string;
+        leaf tenant-id {
+          rwpb:field-inline "true";
+          rwpb:field-string-max 64;
+          type string;
+        }
       }
 
       }
 
-      leaf user-id {
-        rwpb:field-inline "true";
-        rwpb:field-string-max 64;
-        type string;
-      }
-    }
+      list userinfo-list {
+        rwpb:msg-new UserInfoItem;
+        config false;
+        key "user-id";
 
 
-    list roleinfo-list {
-      rwpb:msg-new RoleInfoItem;
-      config false;
-      key "role-id";
+        leaf user-name{
+          rwpb:field-inline "true";
+          rwpb:field-string-max 64;
+          type string;
+        }
 
 
-      leaf role-name {
-        rwpb:field-inline "true";
-        rwpb:field-string-max 64;
-        type string;
+        leaf user-id {
+          rwpb:field-inline "true";
+          rwpb:field-string-max 64;
+          type string;
+        }
       }
 
       }
 
-      leaf role-id {
-        rwpb:field-inline "true";
-        rwpb:field-string-max 64;
-        type string;
-      }
-    }
+      list roleinfo-list {
+        rwpb:msg-new RoleInfoItem;
+        config false;
+        key "role-id";
 
 
-    list hostinfo-list {
-      rwpb:msg-new HostInfoItem;
-      config false;
-      key "host-id";
+        leaf role-name {
+          rwpb:field-inline "true";
+          rwpb:field-string-max 64;
+          type string;
+        }
 
 
-      leaf host-name {
-        rwpb:field-inline "true";
-        rwpb:field-string-max 64;
-        type string;
+        leaf role-id {
+          rwpb:field-inline "true";
+          rwpb:field-string-max 64;
+          type string;
+        }
       }
 
       }
 
-      leaf host-id {
-        rwpb:field-inline "true";
-        rwpb:field-string-max 64;
-        type string;
-      }
-    }
+      list hostinfo-list {
+        rwpb:msg-new HostInfoItem;
+        config false;
+        key "host-id";
 
 
-    list networkinfo-list {
-      rwpb:msg-new NetworkInfoItem;
-      config false;
-      key "network-id";
+        leaf host-name {
+          rwpb:field-inline "true";
+          rwpb:field-string-max 64;
+          type string;
+        }
 
 
-      uses network-info-item;
-    }
+        leaf host-id {
+          rwpb:field-inline "true";
+          rwpb:field-string-max 64;
+          type string;
+        }
+      }
 
 
-    list portinfo-list {
-      rwpb:msg-new PortInfoItem;
-      config false;
-      key "port-id";
+      list networkinfo-list {
+        rwpb:msg-new NetworkInfoItem;
+        config false;
+        key "network-id";
 
 
-      uses port-info-item;
-    }
+        uses network-info-item;
+      }
 
 
-    list flavorinfo-list {
-      rwpb:msg-new FlavorInfoItem;
-      config false;
-      key "id";
+      list portinfo-list {
+        rwpb:msg-new PortInfoItem;
+        config false;
+        key "port-id";
 
 
-      leaf id {
-        rwpb:field-inline "true";
-        rwpb:field-string-max 64;
-        type string;
+        uses port-info-item;
       }
 
       }
 
-      leaf name {
-        rwpb:field-inline "true";
-        rwpb:field-string-max 255;
-        type string;
-      }
+      list flavorinfo-list {
+        rwpb:msg-new FlavorInfoItem;
+        config false;
+        key "id";
 
 
-      uses manotypes:vm-flavor;
-      uses manotypes:guest-epa;
-      uses manotypes:vswitch-epa;
-      uses manotypes:hypervisor-epa;
-      uses manotypes:host-epa;
-      uses manotypes:placement-group-input;
+        leaf id {
+          rwpb:field-inline "true";
+          rwpb:field-string-max 64;
+          type string;
+        }
+
+        leaf name {
+          rwpb:field-inline "true";
+          rwpb:field-string-max 255;
+          type string;
+        }
+
+        uses manotypes:vm-flavor;
+        uses manotypes:guest-epa;
+        uses manotypes:vswitch-epa;
+        uses manotypes:hypervisor-epa;
+        uses manotypes:host-epa;
+        uses manotypes:placement-group-input;
+      }
     }
   }
 
     }
   }
 
@@ -870,13 +883,14 @@ module rwcal
   }
 
 
   }
 
 
-  container virtual-link-req-params {
-    description "This object defines the parameters required to create a virtual-link";
-    rwpb:msg-new VirtualLinkReqParams;
-    uses virtual-link-create-params;
+  augment "/rw-project:project" {
+    container virtual-link-req-params {
+      description "This object defines the parameters required to create a virtual-link";
+      rwpb:msg-new VirtualLinkReqParams;
+      uses virtual-link-create-params;
+    }
   }
 
   }
 
-
   grouping connection-point-type {
     leaf type {
       description
   grouping connection-point-type {
     leaf type {
       description
@@ -1032,59 +1046,63 @@ module rwcal
     } 
   }
 
     } 
   }
 
-  container vdu-init-params {
-    description "This object defines the parameters required to create a VDU";
-    rwpb:msg-new VDUInitParams;
-    uses vdu-create-params;
+  augment "/rw-project:project" {
+    container vdu-init-params {
+      description "This object defines the parameters required to create a VDU";
+      rwpb:msg-new VDUInitParams;
+      uses vdu-create-params;
+    }
   }
 
   }
 
-  container vdu-modify-params {
-    description "This object defines the parameters required to modify VDU";
-    rwpb:msg-new VDUModifyParams;
-
-    leaf vdu-id {
-      description "CAL assigned id for VDU to which this connection point belongs";
-      rwpb:field-inline "true";
-      rwpb:field-string-max 64;
-      type string;
-    }
+  augment "/rw-project:project" {
+    container vdu-modify-params {
+      description "This object defines the parameters required to modify VDU";
+      rwpb:msg-new VDUModifyParams;
 
 
-    leaf image-id {
-      description "CAL assigned image-id for the VDU image";
-      rwpb:field-inline "true";
-      rwpb:field-string-max 64;
-      type string;
-    }
-
-    list connection-points-add {
-      key "name";
-      leaf name {
-        description "Name of the connection point";
-        type string;
-      }
-      leaf virtual-link-id {
-        description "CAL assigned resource Id for the Virtual Link";
+      leaf vdu-id {
+        description "CAL assigned id for VDU to which this connection point belongs";
+        rwpb:field-inline "true";
+        rwpb:field-string-max 64;
         type string;
       }
         type string;
       }
-      leaf associate-public-ip {
-        type boolean;
-        default false;
-      }
-      leaf port-security-enabled {
-        description "Enables the port security";
-        type boolean;
-      }
 
 
-      uses connection-point-type;
-    }
-
-    list connection-points-remove {
-      key "connection-point-id";
-      leaf connection-point-id {
+      leaf image-id {
+        description "CAL assigned image-id for the VDU image";
         rwpb:field-inline "true";
         rwpb:field-string-max 64;
         type string;
       }
         rwpb:field-inline "true";
         rwpb:field-string-max 64;
         type string;
       }
+
+      list connection-points-add {
+        key "name";
+        leaf name {
+          description "Name of the connection point";
+          type string;
+        }
+        leaf virtual-link-id {
+          description "CAL assigned resource Id for the Virtual Link";
+          type string;
+        }
+        leaf associate-public-ip {
+          type boolean;
+          default false;
+        }
+        leaf port-security-enabled {
+          description "Enables the port security";
+          type boolean;
+        }
+
+        uses connection-point-type;
+      }
+
+      list connection-points-remove {
+        key "connection-point-id";
+        leaf connection-point-id {
+          rwpb:field-inline "true";
+          rwpb:field-string-max 64;
+          type string;
+        }
+      }
     }
   }
 
     }
   }
 
@@ -1277,22 +1295,24 @@ module rwcal
   }
 
 
   }
 
 
-  container vnf-resources {
-    rwpb:msg-new VNFResources;
-    config false;
-
-    list virtual-link-info-list {
-      rwpb:msg-new VirtualLinkInfoParams;
+  augment "/rw-project:project" {
+    container vnf-resources {
+      rwpb:msg-new VNFResources;
       config false;
       config false;
-      key virtual-link-id;
-      uses virtual-link-info-params;
-    }
 
 
-    list vdu-info-list {
-      rwpb:msg-new VDUInfoParams;
-      config false;
-      key vdu-id;
-      uses vdu-info-params;
+      list virtual-link-info-list {
+        rwpb:msg-new VirtualLinkInfoParams;
+        config false;
+        key virtual-link-id;
+        uses virtual-link-info-params;
+      }
+
+      list vdu-info-list {
+        rwpb:msg-new VDUInfoParams;
+        config false;
+        key vdu-id;
+        uses vdu-info-params;
+      }
     }
   }
 }
     }
   }
 }
index aabbdd5..d4fd1a5 100644 (file)
@@ -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.
  *
  *   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 @@ module rw-conman-annotation
     prefix conman;
   }
 
     prefix conman;
   }
 
-  tailf:annotate "/conman:cm-state" {
+  import rw-project {
+    prefix "rw-project";
+  }
+
+  tailf:annotate "/rw-project:project/conman:cm-state" {
     tailf:callpoint rw_callpoint;
   }
   
     tailf:callpoint rw_callpoint;
   }
   
index bb1555d..006f11b 100644 (file)
@@ -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.
  *
  *   Licensed under the Apache License, Version 2.0 (the "License");
  *   you may not use this file except in compliance with the License.
@@ -75,6 +75,15 @@ module rw-conman
     prefix "rw-config-agent";
   }
 
     prefix "rw-config-agent";
   }
 
+  import rw-project {
+    prefix "rw-project";
+  }
+
+  revision 2017-02-08 {
+    description
+      "Update model to support projects.";
+  }
+
   revision 2015-10-27 {
     description
       "Initial revision.";
   revision 2015-10-27 {
     description
       "Initial revision.";
@@ -128,27 +137,29 @@ module rw-conman
     }
   }
   
     }
   }
   
-  container cm-config {
-    description "Service Orchestrator specific configuration";
-    rwpb:msg-new "SoConfig";
-    rwcli:new-mode "cm-config";
+  augment "/rw-project:project" {
+    container cm-config {
+      description "Service Orchestrator specific configuration";
+      rwpb:msg-new "SoConfig";
+      rwcli:new-mode "cm-config";
 
 
-    container ro-endpoint {
-      description "Resource Orchestrator endpoint ip address";
-      rwpb:msg-new "RoEndpoint";
-      uses ro-endpoint;
-    }
+      container ro-endpoint {
+        description "Resource Orchestrator endpoint ip address";
+        rwpb:msg-new "RoEndpoint";
+        uses ro-endpoint;
+      }
     
     
-    //uses vnf-cfg-items;
+      //uses vnf-cfg-items;
 
 
-    list nsr {
-      key "id";
-      leaf id {
-        description "Indicates NSR bringup complete, now initiate configuration of the NSR";
-        type yang:uuid;
+      list nsr {
+        key "id";
+        leaf id {
+          description "Indicates NSR bringup complete, now initiate configuration of the NSR";
+          type yang:uuid;
+        }
       }
       }
-    }
-  }// cm-config
+    }// cm-config
+  }
   
   // =================== SHOW ==================
   typedef record-state {
   
   // =================== SHOW ==================
   typedef record-state {
@@ -185,76 +196,78 @@ module rw-conman
 
   // This is also used by RO (Resource Orchestrator) to indicate NSR is ready
   // It will only fill in IDs
 
   // This is also used by RO (Resource Orchestrator) to indicate NSR is ready
   // It will only fill in IDs
-  container cm-state {
-    rwpb:msg-new "CmOpdata";
-    config false;
-    description "CM NS & VNF states";
+  augment "/rw-project:project" {
+    container cm-state {
+      rwpb:msg-new "CmOpdata";
+      config false;
+      description "CM NS & VNF states";
 
 
-    leaf states {
-      description "CM various states";
-      type string;
-    }
-    
-    list cm-nsr {
-      description "List of NS Records";
-      key "id";
-      leaf id {
-        type yang:uuid;
-      }
-      leaf name {
-        description "NSR name.";
+      leaf states {
+        description "CM various states";
         type string;
       }
         type string;
       }
-      leaf state {
-        description "State of NSR";
-        type record-state;
-      }
-      leaf state-details {
-        description "Details of the state of NSR, in case of errors";
-        type string;
-      }
-      
-      list cm-vnfr {
-        description "List of VNF Records within NS Record";
+    
+      list cm-nsr {
+        description "List of NS Records";
         key "id";
         leaf id {
           type yang:uuid;
         }
         leaf name {
         key "id";
         leaf id {
           type yang:uuid;
         }
         leaf name {
-          description "VNFR name.";
+          description "NSR name.";
           type string;
         }
         leaf state {
           type string;
         }
         leaf state {
-          description "Last known state of this VNFR";
+          description "State of NSR";
           type record-state;
         }
           type record-state;
         }
-        container mgmt-interface {
-          leaf ip-address {
-            type inet:ip-address;
-          }
-          leaf port {
-            type inet:port-number;
-          }
-        }
-        leaf cfg-type {
+        leaf state-details {
+          description "Details of the state of NSR, in case of errors";
           type string;
         }
           type string;
         }
-        leaf cfg-location {
-          type inet:uri;
-        }
-        list connection-point {
-          key "name";
+      
+        list cm-vnfr {
+          description "List of VNF Records within NS Record";
+          key "id";
+          leaf id {
+            type yang:uuid;
+          }
           leaf name {
           leaf name {
-            description "Connection Point name";
+            description "VNFR name.";
             type string;
           }
             type string;
           }
-          leaf ip-address {
-            description "IP address assigned to this connection point";
-            type inet:ip-address;
+          leaf state {
+            description "Last known state of this VNFR";
+            type record-state;
           }
           }
-        }
-      } // list VNFR
-    } // list NSR
-  } // cm-state
-  
+          container mgmt-interface {
+            leaf ip-address {
+              type inet:ip-address;
+            }
+            leaf port {
+              type inet:port-number;
+            }
+          }
+          leaf cfg-type {
+            type string;
+          }
+          leaf cfg-location {
+            type inet:uri;
+          }
+          list connection-point {
+            key "name";
+            leaf name {
+              description "Connection Point name";
+              type string;
+            }
+            leaf ip-address {
+              description "IP address assigned to this connection point";
+              type inet:ip-address;
+            }
+          }
+        } // list VNFR
+      } // list NSR
+    } // cm-state
+  }
+
 } // rw-conman
 } // rw-conman
index 4a2741d..8343154 100644 (file)
@@ -36,6 +36,7 @@ rw-nsd
 rw-nsm
 rw-nsr
 rw-pb-ext
 rw-nsm
 rw-nsr
 rw-pb-ext
+rw-project
 rw-resource-mgr
 rw-restportforward
 rwsdn
 rw-resource-mgr
 rw-restportforward
 rwsdn
index cf83612..1f4f4bc 100755 (executable)
@@ -1,6 +1,6 @@
 
 # 
 
 # 
-#   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.
 #
 #   Licensed under the Apache License, Version 2.0 (the "License");
 #   you may not use this file except in compliance with the License.
@@ -323,7 +323,7 @@ class VnffgMgr(object):
         del self._vnffgr_list[vnffgr_id]
 
 class SDNAccountDtsHandler(object):
         del self._vnffgr_list[vnffgr_id]
 
 class SDNAccountDtsHandler(object):
-    XPATH = "C,/rw-sdn:sdn/rw-sdn:account"
+    XPATH = "C,/rw-project:project/rw-sdn:sdn/rw-sdn:account"
 
     def __init__(self, dts, log, parent):
         self._dts = dts
 
     def __init__(self, dts, log, parent):
         self._dts = dts
index 87d11a2..17c5bf0 100755 (executable)
@@ -1,7 +1,7 @@
 #!/usr/bin/env python3
 
 # 
 #!/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.
 #
 #   Licensed under the Apache License, Version 2.0 (the "License");
 #   you may not use this file except in compliance with the License.
@@ -432,7 +432,7 @@ class RMMgrTestCase(rift.test.dts.AbstractDTSTest):
 
     @asyncio.coroutine
     def configure_cloud_account(self, dts, acct_type):
 
     @asyncio.coroutine
     def configure_cloud_account(self, dts, acct_type):
-        account_xpath = "C,/rw-cloud:cloud/account"
+        account_xpath = "C,/rw-project:project/rw-cloud:cloud/account"
         msg = self.get_cloud_account_msg(acct_type)
         self.log.info("Configuring cloud-account: %s",msg)
         yield from dts.query_create(account_xpath,
         msg = self.get_cloud_account_msg(acct_type)
         self.log.info("Configuring cloud-account: %s",msg)
         yield from dts.query_create(account_xpath,
index 0ced574..9ec6764 100755 (executable)
@@ -1,6 +1,6 @@
 
 # 
 
 # 
-#   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.
 #
 #   Licensed under the Apache License, Version 2.0 (the "License");
 #   you may not use this file except in compliance with the License.
@@ -82,7 +82,8 @@ class SDNAccountDtsOperdataHandler(object):
 
     def _register_show_status(self):
         def get_xpath(sdn_name=None):
 
     def _register_show_status(self):
         def get_xpath(sdn_name=None):
-            return "D,/rw-sdn:sdn/rw-sdn:account{}/rw-sdn:connection-status".format(
+            return "D,/rw-project:project/rw-sdn:sdn/rw-sdn:account{}" \
+                "/rw-sdn:connection-status".format(
                     "[name='%s']" % sdn_name if sdn_name is not None else ''
                    )
 
                     "[name='%s']" % sdn_name if sdn_name is not None else ''
                    )
 
@@ -152,7 +153,7 @@ class SDNAccountDtsOperdataHandler(object):
         yield from self._register_validate_rpc()
 
 class SDNAccountDtsHandler(object):
         yield from self._register_validate_rpc()
 
 class SDNAccountDtsHandler(object):
-    XPATH = "C,/rw-sdn:sdn/rw-sdn:account"
+    XPATH = "C,/rw-project:project/rw-sdn:sdn/rw-sdn:account"
 
     def __init__(self, dts, log, parent):
         self._dts = dts
 
     def __init__(self, dts, log, parent):
         self._dts = dts
index 895ee85..6058a4c 100644 (file)
@@ -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.
 #
 #   Licensed under the Apache License, Version 2.0 (the "License");
 #   you may not use this file except in compliance with the License.
@@ -36,7 +36,7 @@ rift_add_vala(
     rw_log_yang-1.0 rw_base_yang-1.0 rwcal_yang-1.0 rwsdn_yang-1.0 rw_manifest_yang-1.0 protobuf_c-1.0 ietf_netconf_yang-1.0
     ietf_network_yang-1.0 ietf_network_topology_yang-1.0
     ietf_l2_topology_yang-1.0 rw_topology_yang-1.0
     rw_log_yang-1.0 rw_base_yang-1.0 rwcal_yang-1.0 rwsdn_yang-1.0 rw_manifest_yang-1.0 protobuf_c-1.0 ietf_netconf_yang-1.0
     ietf_network_yang-1.0 ietf_network_topology_yang-1.0
     ietf_l2_topology_yang-1.0 rw_topology_yang-1.0
-    rw_log-1.0
+    rw_log-1.0 rw_project_yang-1.0
   VAPI_DIRS 
     ${RIFT_SUBMODULE_BINARY_ROOT}/models/plugins/yang
     ${RIFT_SUBMODULE_BINARY_ROOT}/rwcal/plugins/yang
   VAPI_DIRS 
     ${RIFT_SUBMODULE_BINARY_ROOT}/models/plugins/yang
     ${RIFT_SUBMODULE_BINARY_ROOT}/rwcal/plugins/yang
@@ -50,7 +50,7 @@ rift_add_vala(
   GENERATE_VAPI_FILE ${VALA_LONG_NAME}.vapi
   GENERATE_GIR_FILE ${VALA_TYPELIB_PREFIX}.gir
   GENERATE_TYPELIB_FILE ${VALA_TYPELIB_PREFIX}.typelib
   GENERATE_VAPI_FILE ${VALA_LONG_NAME}.vapi
   GENERATE_GIR_FILE ${VALA_TYPELIB_PREFIX}.gir
   GENERATE_TYPELIB_FILE ${VALA_TYPELIB_PREFIX}.typelib
-  DEPENDS rwcal_yang rwsdn_yang mano_yang rwlog_gi rwschema_yang
+  DEPENDS rwcal_yang rwsdn_yang mano_yang rwlog_gi rwschema_yang rwproject_yang
   )
 
 rift_install_vala_artifacts(
   )
 
 rift_install_vala_artifacts(
index 00cde0b..1c036b4 100644 (file)
@@ -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.
 #
 #   Licensed under the Apache License, Version 2.0 (the "License");
 #   you may not use this file except in compliance with the License.
@@ -28,10 +28,7 @@ rift_add_yang_target(
   YANG_FILES ${source_yang_files}
   COMPONENT ${PKG_LONG_NAME}
   LIBRARIES
   YANG_FILES ${source_yang_files}
   COMPONENT ${PKG_LONG_NAME}
   LIBRARIES
-    rwschema_yang_gen
-    rwyang
-    rwlog
-    rwlog-mgmt_yang_gen
     mano-types_yang_gen
     mano-types_yang_gen
+    rwproject_yang_gen
 )
 
 )
 
index 5ea2eb0..e590436 100644 (file)
@@ -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.
  *
  *   Licensed under the Apache License, Version 2.0 (the "License");
  *   you may not use this file except in compliance with the License.
@@ -51,6 +51,14 @@ module rwsdn
     prefix "yang";
   }
 
     prefix "yang";
   }
 
+  import rw-project {
+    prefix "rw-project";
+  }
+
+  revision 2017-02-08 {
+    description
+      "Update model to support projects.";
+  }
 
   revision 2014-12-30 {
     description
 
   revision 2014-12-30 {
     description
@@ -82,7 +90,7 @@ module rwsdn
     }
   }
 
     }
   }
 
-  uses connection-status;
+  // uses connection-status;
 
   typedef sdn-account-type {
     description "SDN account type";
 
   typedef sdn-account-type {
     description "SDN account type";
@@ -147,253 +155,260 @@ module rwsdn
     }
   }
 
     }
   }
 
-  container sdn-accounts {
-    list sdn-account-list {
-      rwpb:msg-new SDNAccount;
-      key "name";
+  augment "/rw-project:project" {
+    container sdn-accounts {
+      list sdn-account-list {
+        rwpb:msg-new SDNAccount;
+        key "name";
 
 
-      leaf name {
-        type string;
-      }
+        leaf name {
+          type string;
+        }
 
 
-      uses sdn-provider-auth;
-      uses connection-status;
+        uses sdn-provider-auth;
+        uses connection-status;
+      }
     }
   }
 
     }
   }
 
-  container vnffgs {
-    list vnffg-chain {
-      key "name";
-      rwpb:msg-new VNFFGChain;
-
-      leaf name {
-        type string;
-      }
+  augment "/rw-project:project" {
+    container vnffgs {
+      list vnffg-chain {
+        key "name";
+        rwpb:msg-new VNFFGChain;
 
 
-      list vnf-chain-path {
-        key "order";
-        leaf order {
-          type uint32;
-          description " Order of the VNF in VNFFG chain";
-        }
-        leaf service-function-type {
-          type string;
-        }
-        leaf nsh-aware {
-          type boolean;
-        }
-        leaf transport-type {
+        leaf name {
           type string;
         }
           type string;
         }
-        list vnfr-ids {
-          key "vnfr-id";
-          leaf vnfr-id {
-            type yang:uuid;
+
+        list vnf-chain-path {
+          key "order";
+          leaf order {
+            type uint32;
+            description " Order of the VNF in VNFFG chain";
           }
           }
-          leaf vnfr-name {
+          leaf service-function-type {
             type string;
           }
             type string;
           }
-          leaf mgmt-address {
-            type inet:ip-address;
+          leaf nsh-aware {
+            type boolean;
           }
           }
-          leaf mgmt-port {
-              type inet:port-number;
+          leaf transport-type {
+            type string;
           }
           }
-          list vdu-list {
-            key "vm-id port-id";
-            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;
+          list vnfr-ids {
+            key "vnfr-id";
+            leaf vnfr-id {
+              type yang:uuid;
             }
             }
-            leaf name {
+            leaf vnfr-name {
               type string;
             }
               type string;
             }
-            leaf address {
+            leaf mgmt-address {
               type inet:ip-address;
             }
               type inet:ip-address;
             }
-            leaf port {
+            leaf mgmt-port {
               type inet:port-number;
             }
               type inet:port-number;
             }
+            list vdu-list {
+              key "vm-id port-id";
+              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 name {
+                type string;
+              }
+              leaf address {
+                type inet:ip-address;
+              }
+              leaf port {
+                type inet:port-number;
+              }
+            }
+            leaf sff-name {
+              description "SFF name useful for non OVS based SFF";
+              type string;
+            }
           }
           }
-          leaf sff-name {
-            description "SFF name useful for non OVS based SFF";
-            type string;
-          } 
-        }
-      }
-      list sff {
-        rwpb:msg-new VNFFGSff;
-        key "name"; 
-        leaf name {
-          type string;
-        }
-        leaf function-type {
-          type string;
-        }
-        leaf mgmt-address {
-          type inet:ip-address;
         }
         }
-        leaf mgmt-port {
-          type inet:port-number;
-        }
-        list dp-endpoints {
+        list sff {
+          rwpb:msg-new VNFFGSff;
           key "name";
           leaf name {
           key "name";
           leaf name {
-           type string;
-          } 
-          leaf address {
+            type string;
+          }
+          leaf function-type {
+            type string;
+          }
+          leaf mgmt-address {
             type inet:ip-address;
           }
             type inet:ip-address;
           }
-          leaf port {
+          leaf mgmt-port {
             type inet:port-number;
           }
             type inet:port-number;
           }
-        }
-        list vnfr-list {
-          key "vnfr-name";
-          leaf vnfr-name {
-            type string;
+          list dp-endpoints {
+            key "name";
+            leaf name {
+              type string;
+            }
+            leaf address {
+              type inet:ip-address;
+            }
+            leaf port {
+              type inet:port-number;
+            }
+          }
+          list vnfr-list {
+            key "vnfr-name";
+            leaf vnfr-name {
+              type string;
+            }
           }
         }
           }
         }
-      }
-      leaf classifier-name {
-        type string;
+        leaf classifier-name {
+          type string;
+        }
       }
     }
   }
 
       }
     }
   }
 
-  container vnffg-rendered-paths {
-    rwpb:msg-new VNFFGRenderedPaths;
-    list vnffg-rendered-path {
-      key "name";
-      rwpb:msg-new VNFFGRenderedPath;
-      config false;
-      leaf name {
-        type string;
-      }
-      leaf path-id {
-          description
-              "Unique Identifier for the service path";
-        type uint32;
-      }
-      list rendered-path-hop {
-        key "hop-number";
-        leaf hop-number {
-          type uint8;
-        }
-        leaf service-index {
-            description
-                "Location within the service path";
-          type uint8;
-        }
-        leaf vnfr-name {
+  augment "/rw-project:project" {
+    container vnffg-rendered-paths {
+      rwpb:msg-new VNFFGRenderedPaths;
+      list vnffg-rendered-path {
+        key "name";
+        rwpb:msg-new VNFFGRenderedPath;
+        config false;
+        leaf name {
           type string;
         }
           type string;
         }
-        container service-function-forwarder {
-          leaf name { 
+        leaf path-id {
+          description
+            "Unique Identifier for the service path";
+          type uint32;
+        }
+        list rendered-path-hop {
+          key "hop-number";
+          leaf hop-number {
+            type uint8;
+          }
+          leaf service-index {
             description
             description
-                "Service Function Forwarder name";
+              "Location within the service path";
+            type uint8;
+          }
+          leaf vnfr-name {
             type string;
           }
             type string;
           }
-          leaf ip-address {
-            description
+          container service-function-forwarder {
+            leaf name {
+              description
+                "Service Function Forwarder name";
+              type string;
+            }
+            leaf ip-address {
+              description
                 "Service Function Forwarder Data Plane IP address";
                 "Service Function Forwarder Data Plane IP address";
-            type inet:ip-address;
-          }  
-          leaf port {
-            description
+              type inet:ip-address;
+            }
+            leaf port {
+              description
                 "Service Function Forwarder Data Plane port";
                 "Service Function Forwarder Data Plane port";
-            type inet:port-number;
-          }  
+              type inet:port-number;
+            }
+          }
         }
       }
     }
   }
 
         }
       }
     }
   }
 
+  augment "/rw-project:project" {
+    container vnffg-classifiers {
+      list vnffg-classifier {
+        key "name";
+        rwpb:msg-new VNFFGClassifier;
 
 
-  container vnffg-classifiers {
-    list vnffg-classifier {
-      key "name";
-      rwpb:msg-new VNFFGClassifier;
-
-      leaf name {
-        type string;
-      }
-      leaf rsp-name {
-        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 sff-name {
-        type string;
-      }
-      container vnffg-metadata {
-        leaf ctx1 {
+        leaf name {
           type string;
         }
           type string;
         }
-        leaf ctx2 {
+        leaf rsp-name {
           type string;
         }
           type string;
         }
-        leaf ctx3 {
+        leaf port-id {
+          rwpb:field-inline "true";
+          rwpb:field-string-max 64;
           type string;
         }
           type string;
         }
-        leaf ctx4 {
+        leaf vm-id {
+          rwpb:field-inline "true";
+          rwpb:field-string-max 64;
           type string;
         }
           type string;
         }
-      }
-      list match-attributes {
-        description
-            "List of match attributes.";
-        key "name";
-        leaf name {
+        leaf sff-name {
+          type string;
+        }
+        container vnffg-metadata {
+          leaf ctx1 {
+            type string;
+          }
+          leaf ctx2 {
+            type string;
+          }
+          leaf ctx3 {
+            type string;
+          }
+          leaf ctx4 {
+            type string;
+          }
+        }
+        list match-attributes {
           description
           description
+            "List of match attributes.";
+          key "name";
+          leaf name {
+            description
               "Name for the Access list";
               "Name for the Access list";
-          type string;  
-        }
+            type string;
+          }
 
 
-        leaf ip-proto {
-          description
+          leaf ip-proto {
+            description
               "IP Protocol.";
               "IP Protocol.";
-          type uint8;
-        }
+            type uint8;
+          }
 
 
-        leaf source-ip-address {
-          description
+          leaf source-ip-address {
+            description
               "Source IP address.";
               "Source IP address.";
-          type inet:ip-prefix;
-        }
+            type inet:ip-prefix;
+          }
 
 
-        leaf destination-ip-address {
-          description
+          leaf destination-ip-address {
+            description
               "Destination IP address.";
               "Destination IP address.";
-          type inet:ip-prefix;
-        }
+            type inet:ip-prefix;
+          }
 
 
-        leaf source-port {
-          description
+          leaf source-port {
+            description
               "Source port number.";
               "Source port number.";
-          type inet:port-number;
-        }
+            type inet:port-number;
+          }
 
 
-        leaf destination-port {
-          description
+          leaf destination-port {
+            description
               "Destination port number.";
               "Destination port number.";
-          type inet:port-number;
-        }
-      } //match-attributes
+            type inet:port-number;
+          }
+        } //match-attributes
+      }
     }
   }
 
     }
   }
 
index 43e87e1..2bfcc0d 100644 (file)
@@ -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.
 #
 #   Licensed under the Apache License, Version 2.0 (the "License");
 #   you may not use this file except in compliance with the License.
@@ -71,11 +71,13 @@ rift_add_yang_target(
     rw_conman_yang_gen
     rwconfig_agent_yang_gen
     mano-types_yang_gen
     rw_conman_yang_gen
     rwconfig_agent_yang_gen
     mano-types_yang_gen
+    rwproject_yang_gen
   DEPENDS
     mano_yang
     rwcloud_yang
     rw_conman_yang
     rwconfig_agent_yang
     mano-types_yang
   DEPENDS
     mano_yang
     rwcloud_yang
     rw_conman_yang
     rwconfig_agent_yang
     mano-types_yang
+    rwproject_yang
 )
 
 )
 
index 0184a9a..66bcdbf 100644 (file)
@@ -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.
  *
  *   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 @@ module rw-image-mgmt-annotation
     prefix tailf;
   }
 
     prefix tailf;
   }
 
-  tailf:annotate "/rw-image-mgmt:upload-jobs" {
+  import rw-project {
+    prefix "rw-project";
+  }
+
+  tailf:annotate "/rw-project:project/rw-image-mgmt:upload-jobs" {
     tailf:callpoint rw_callpoint;
   }
 
     tailf:callpoint rw_callpoint;
   }
 
index 833931f..27eab2e 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * 
 /*
  * 
- *   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.
  *
  *   Licensed under the Apache License, Version 2.0 (the "License");
  *   you may not use this file except in compliance with the License.
@@ -42,13 +42,26 @@ module rw-image-mgmt
   }
 
   import rw-cloud {
   }
 
   import rw-cloud {
-    prefix "rwcloud";
+    prefix "rw-cloud";
   }
 
   import rwcal {
     prefix "rwcal";
   }
 
   }
 
   import rwcal {
     prefix "rwcal";
   }
 
+  import rw-project {
+    prefix "rw-project";
+  }
+
+  import mano-types {
+    prefix "mano-types";
+  }
+
+  revision 2017-02-08 {
+    description
+      "Update model to support projects.";
+  }
+
   revision 2016-06-01 {
     description
       "Initial revision.";
   revision 2016-06-01 {
     description
       "Initial revision.";
@@ -145,7 +158,7 @@ module rw-image-mgmt
     leaf cloud-account {
       description "The cloud account to upload the image to";
       type leafref {
     leaf cloud-account {
       description "The cloud account to upload the image to";
       type leafref {
-        path "/rwcloud:cloud/rwcloud:account/rwcloud:name";
+        path "../../../../rw-cloud:cloud/rw-cloud:account/rw-cloud:name";
       }
     }
 
       }
     }
 
@@ -153,39 +166,41 @@ module rw-image-mgmt
     uses upload-task-status;
   }
 
     uses upload-task-status;
   }
 
-  container upload-jobs {
-    rwpb:msg-new UploadJobs;
-    description "Image upload jobs";
-    config false;
+  augment "/rw-project:project" {
+    container upload-jobs {
+      rwpb:msg-new UploadJobs;
+      description "Image upload jobs";
+      config false;
 
 
-    list job {
-      rwpb:msg-new UploadJob;
-      key "id";
+      list job {
+        rwpb:msg-new UploadJob;
+        key "id";
 
 
-      leaf id {
-        description "Unique image upload job-id";
-        type uint32;
-      }
+        leaf id {
+          description "Unique image upload job-id";
+          type uint32;
+        }
 
 
-      leaf status {
-        description "Current job status";
-        type job-status;
-      }
+        leaf status {
+          description "Current job status";
+          type job-status;
+        }
 
 
-      leaf start-time {
-        description "The job start time (unix epoch)";
-        type uint32;
-      }
+        leaf start-time {
+          description "The job start time (unix epoch)";
+          type uint32;
+        }
 
 
-      leaf stop-time {
-        description "The job stop time (unix epoch)";
-        type uint32;
-      }
+        leaf stop-time {
+          description "The job stop time (unix epoch)";
+          type uint32;
+        }
 
 
-      list upload-tasks {
-        rwpb:msg-new UploadTask;
-        description "The upload tasks that are part of this job";
-        uses upload-task;
+        list upload-tasks {
+          rwpb:msg-new UploadTask;
+          description "The upload tasks that are part of this job";
+          uses upload-task;
+        }
       }
     }
   }
       }
     }
   }
@@ -194,6 +209,8 @@ module rw-image-mgmt
     input {
       rwpb:msg-new CreateUploadJob;
 
     input {
       rwpb:msg-new CreateUploadJob;
 
+      uses mano-types:rpc-project-name;
+
       choice image-selection {
         case onboarded-image {
           description "Use an image previously onboarded in the image catalog";
       choice image-selection {
         case onboarded-image {
           description "Use an image previously onboarded in the image catalog";
@@ -230,7 +247,8 @@ module rw-image-mgmt
       leaf-list cloud-account {
         description "List of cloud accounts to upload the image to";
         type leafref {
       leaf-list cloud-account {
         description "List of cloud accounts to upload the image to";
         type leafref {
-          path "/rwcloud:cloud/rwcloud:account/rwcloud:name";
+          path "/rw-project:project[rw-project:name=current()/.." +
+            "/project-name]/rw-cloud:cloud/rw-cloud:account/rw-cloud:name";
         }
       }
     }
         }
       }
     }
@@ -247,9 +265,12 @@ module rw-image-mgmt
   rpc cancel-upload-job {
     input {
       rwpb:msg-new CancelUploadJob;
   rpc cancel-upload-job {
     input {
       rwpb:msg-new CancelUploadJob;
+
       leaf job-id {
         type uint32;
       }
       leaf job-id {
         type uint32;
       }
+
+      uses mano-types:rpc-project-name;
     }
   }
 }
     }
   }
 }
index 1fab791..27f40af 100644 (file)
@@ -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.
  *
  *   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 @@ module rw-launchpad-annotation
     prefix tailf;
   }
 
     prefix tailf;
   }
 
-  tailf:annotate "/rw-launchpad:datacenters" {
+  import rw-project {
+    prefix "rw-project";
+  }
+
+  tailf:annotate "/rw-project:project/rw-launchpad:datacenters" {
     tailf:callpoint rw_callpoint;
   }
 }
     tailf:callpoint rw_callpoint;
   }
 }
index 0adaee9..c12bf51 100644 (file)
@@ -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.
  *
  *   Licensed under the Apache License, Version 2.0 (the "License");
  *   you may not use this file except in compliance with the License.
@@ -102,42 +102,53 @@ module rw-launchpad
     prefix "manotypes";
   }
 
     prefix "manotypes";
   }
 
+  import rw-project {
+    prefix "rw-project";
+  }
+
+  revision 2017-02-08 {
+    description
+      "Update model to support projects.";
+  }
+
   revision 2015-09-14 {
     description
       "Initial revision.";
   }
 
   revision 2015-09-14 {
     description
       "Initial revision.";
   }
 
-  container datacenters {
-    description "OpenMano data centers";
+  augment "/rw-project:project" {
+    container datacenters {
+      description "OpenMano data centers";
 
 
-    rwpb:msg-new DataCenters;
-    config false;
+      rwpb:msg-new DataCenters;
+      config false;
 
 
-    list ro-accounts {
-      description
+      list ro-accounts {
+        description
           "A list of OpenMano cloud accounts that have data centers associated
           with them";
 
           "A list of OpenMano cloud accounts that have data centers associated
           with them";
 
-      rwpb:msg-new ROAccount;
-      key "name";
+        rwpb:msg-new ROAccount;
+        key "name";
 
 
-      leaf name {
-        description "The name of the cloud account";
-        type leafref {
-          path "/rw-launchpad:resource-orchestrator/rw-launchpad:name";
+        leaf name {
+          description "The name of the cloud account";
+          type leafref {
+            path "../../../rw-launchpad:resource-orchestrator/rw-launchpad:name";
+          }
         }
         }
-      }
 
 
-      list datacenters {
-        rwpb:msg-new DataCenter;
-        leaf uuid {
-          description "The UUID of the data center";
-          type yang:uuid;
-        }
+        list datacenters {
+          rwpb:msg-new DataCenter;
+          leaf uuid {
+            description "The UUID of the data center";
+            type yang:uuid;
+          }
 
 
-        leaf name {
-          description "The name of the data center";
-          type string;
+          leaf name {
+            description "The name of the data center";
+            type string;
+          }
         }
       }
     }
         }
       }
     }
@@ -151,66 +162,70 @@ module rw-launchpad
     }
   }
 
     }
   }
 
-  container resource-orchestrator {
-    rwpb:msg-new ResourceOrchestrator;
-
-    leaf name {
-       type string;
-    }
+  augment "/rw-project:project" {
+    container resource-orchestrator {
+      rwpb:msg-new ResourceOrchestrator;
 
 
-    leaf account-type {
-      type resource-orchestrator-account-type;
-    }
+      leaf name {
+        type string;
+      }
 
 
-    choice resource-orchestrator {
-      description
-        "The resource orchestrator to use by the Launchpad";
-      default rift-ro;
+      leaf account-type {
+        type resource-orchestrator-account-type;
+      }
 
 
-      case rift-ro {
+      choice resource-orchestrator {
         description
         description
-          "Use the RIFT.io resource orchestrator";
+          "The resource orchestrator to use by the Launchpad";
+        default rift-ro;
+
+        case rift-ro {
+          description
+            "Use the RIFT.io resource orchestrator";
 
 
-        container rift-ro {
-          leaf rift-ro {
-            type empty;
+          container rift-ro {
+            leaf rift-ro {
+              type empty;
+            }
           }
         }
           }
         }
-      }
 
 
-      case openmano {
-        description
-          "Use OpenMano as RO";
+        case openmano {
+          description
+            "Use OpenMano as RO";
 
 
-        container openmano {
-          leaf host {
-            type string;
-            default "localhost";
-          }
+          container openmano {
+            leaf host {
+              type string;
+              default "localhost";
+            }
 
 
-          leaf port {
-            type uint16;
-            default 9090;
-          }
+            leaf port {
+              type uint16;
+              default 9090;
+            }
 
 
-          leaf tenant-id {
-            type string {
-              length "36";
+            leaf tenant-id {
+              type string {
+                length "36";
+              }
+              mandatory true;
             }
             }
-            mandatory true;
           }
         }
       }
     }
   }
 
           }
         }
       }
     }
   }
 
-  container launchpad-config {
-    leaf public-ip {
-      description
+  augment "/rw-project:project" {
+    container launchpad-config {
+      leaf public-ip {
+        description
           "An IP address that can, at least, be reached by the host that the
           launchpad is running on. This is not a mandatory but is required for
           alarms to function correctly.";
           "An IP address that can, at least, be reached by the host that the
           launchpad is running on. This is not a mandatory but is required for
           alarms to function correctly.";
-      type string;
+        type string;
+      }
     }
   }
 }
     }
   }
 }
index 4e6d9aa..c07d200 100644 (file)
@@ -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.
  *
  *   Licensed under the Apache License, Version 2.0 (the "License");
  *   you may not use this file except in compliance with the License.
@@ -91,6 +91,15 @@ module rw-nsm
     prefix "rw-config-agent";
   }
 
     prefix "rw-config-agent";
   }
 
+  import rw-project {
+    prefix "rw-project";
+  }
+
+  revision 2017-02-08 {
+    description
+      "Update model to support projects.";
+  }
+
   revision 2015-10-07 {
     description
       "Initial revision.";
   revision 2015-10-07 {
     description
       "Initial revision.";
@@ -119,15 +128,17 @@ module rw-nsm
     }
   }
 
     }
   }
 
-  container ro-config {
-    description "Resource Orchestrator endpoint ip address";
-    rwpb:msg-new "roConfig";
-    rwcli:new-mode "ro-config";
+  augment "/rw-project:project" {
+    container ro-config {
+      description "Resource Orchestrator endpoint ip address";
+      rwpb:msg-new "roConfig";
+      rwcli:new-mode "ro-config";
 
 
-    container cm-endpoint {
-      description "Service Orchestrator endpoint ip address";
-      rwpb:msg-new "SoEndpoint";
-      uses cm-endpoint;
+      container cm-endpoint {
+        description "Service Orchestrator endpoint ip address";
+        rwpb:msg-new "SoEndpoint";
+        uses cm-endpoint;
+      }
     }
   }
 }
     }
   }
 }
index 13136c9..9e15181 100644 (file)
@@ -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.
  *
  *   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 @@ module rw-pkg-mgmt-annotation
     prefix tailf;
   }
 
     prefix tailf;
   }
 
-  tailf:annotate "/rw-pkg-mgmt:download-jobs" {
+  import rw-project {
+    prefix "rw-project";
+  }
+
+  tailf:annotate "/rw-project:project/rw-pkg-mgmt:download-jobs" {
     tailf:callpoint rw_callpoint;
   }
 
     tailf:callpoint rw_callpoint;
   }
 
index 8370c1b..5c68f00 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
 /*
  *
- *   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.
  *
  *   Licensed under the Apache License, Version 2.0 (the "License");
  *   you may not use this file except in compliance with the License.
@@ -53,6 +53,15 @@ module rw-pkg-mgmt
     prefix "manotypes";
   }
 
     prefix "manotypes";
   }
 
+  import rw-project {
+    prefix "rw-project";
+  }
+
+  revision 2017-02-08 {
+    description
+      "Update model to support projects.";
+  }
+
   revision 2016-06-01 {
     description
       "Initial revision.";
   revision 2016-06-01 {
     description
       "Initial revision.";
@@ -175,27 +184,29 @@ module rw-pkg-mgmt
     }
   }
 
     }
   }
 
-  container download-jobs {
-    rwpb:msg-new DownloadJobs;
-    description "Download jobs";
-    config false;
+  augment "/rw-project:project" {
+    container download-jobs {
+      rwpb:msg-new DownloadJobs;
+      description "Download jobs";
+      config false;
 
 
-    list job {
-      rwpb:msg-new DownloadJob;
-      key "download-id";
+      list job {
+        rwpb:msg-new DownloadJob;
+        key "download-id";
 
 
-      leaf download-id {
-        description "Unique UUID";
-        type string;
-      }
+        leaf download-id {
+          description "Unique UUID";
+          type string;
+        }
 
 
-      leaf url {
-        description "URL of the download";
-        type string;
-      }
+        leaf url {
+          description "URL of the download";
+          type string;
+        }
 
 
-      uses package-file-identifer;
-      uses download-task-status;
+        uses package-file-identifer;
+        uses download-task-status;
+      }
     }
   }
 
     }
   }
 
@@ -204,6 +215,7 @@ module rw-pkg-mgmt
 
     input {
       uses package-identifer;
 
     input {
       uses package-identifer;
+
     }
 
     output {
     }
 
     output {
@@ -222,6 +234,8 @@ module rw-pkg-mgmt
         description "Type of the package";
         type manotypes:package-type;
       }
         description "Type of the package";
         type manotypes:package-type;
       }
+
+      uses manotypes:rpc-project-name;
     }
 
     output {
     }
 
     output {
@@ -238,6 +252,7 @@ module rw-pkg-mgmt
     input {
       uses package-identifer;
       uses external-url-data;
     input {
       uses package-identifer;
       uses external-url-data;
+      uses manotypes:rpc-project-name;
     }
 
     output {
     }
 
     output {
@@ -254,6 +269,7 @@ module rw-pkg-mgmt
     input {
       uses package-identifer;
       uses external-url-data;
     input {
       uses package-identifer;
       uses external-url-data;
+      uses manotypes:rpc-project-name;
     }
 
     output {
     }
 
     output {
@@ -269,6 +285,7 @@ module rw-pkg-mgmt
 
     input {
       uses package-identifer;
 
     input {
       uses package-identifer;
+      uses manotypes:rpc-project-name;
 
       leaf export-schema {
         description "Schema to export";
 
       leaf export-schema {
         description "Schema to export";
@@ -287,7 +304,6 @@ module rw-pkg-mgmt
         type export-format;
         default YAML;
       }
         type export-format;
         default YAML;
       }
-
     }
 
     output {
     }
 
     output {
@@ -309,6 +325,7 @@ module rw-pkg-mgmt
     input {
       uses package-file-identifer;
       uses external-url-data;
     input {
       uses package-file-identifer;
       uses external-url-data;
+      uses manotypes:rpc-project-name;
     }
 
     output {
     }
 
     output {
@@ -324,6 +341,7 @@ module rw-pkg-mgmt
 
     input {
       uses package-file-identifer;
 
     input {
       uses package-file-identifer;
+      uses manotypes:rpc-project-name;
     }
 
     output {
     }
 
     output {
@@ -336,7 +354,6 @@ module rw-pkg-mgmt
         description "Trace in case of a failure";
         type string;
       }
         description "Trace in case of a failure";
         type string;
       }
-
     }
   }
 
     }
   }
 
index 6b6e8b1..a70088e 100644 (file)
@@ -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.
  *
  *   Licensed under the Apache License, Version 2.0 (the "License");
  *   you may not use this file except in compliance with the License.
@@ -32,11 +32,15 @@ module rw-resource-mgr-annotation
     prefix tailf;
   }
 
     prefix tailf;
   }
 
-  tailf:annotate "/rw-resource-mgr:resource-pool-records" {
+  import rw-project {
+    prefix "rw-project";
+  }
+
+  tailf:annotate "/rw-project:project/rw-resource-mgr:resource-pool-records" {
     tailf:callpoint rw_callpoint;
   }
 
     tailf:callpoint rw_callpoint;
   }
 
-  tailf:annotate "/rw-resource-mgr:resource-mgmt" {
+  tailf:annotate "/rw-project:project/rw-resource-mgr:resource-mgmt" {
     tailf:callpoint rw_callpoint;
   }
 }
     tailf:callpoint rw_callpoint;
   }
 }
index 9bf914a..0d56004 100644 (file)
@@ -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.
  *
  *   Licensed under the Apache License, Version 2.0 (the "License");
  *   you may not use this file except in compliance with the License.
@@ -52,6 +52,15 @@ module rw-resource-mgr
     prefix "manotypes";
   }
 
     prefix "manotypes";
   }
 
+  import rw-project {
+    prefix "rw-project";
+  }
+
+  revision 2017-02-08 {
+    description
+      "Update model to support projects.";
+  }
+
   revision 2015-10-16 {
     description
       "Initial revision.";
   revision 2015-10-16 {
     description
       "Initial revision.";
@@ -90,31 +99,33 @@ module rw-resource-mgr
 
   }
 
 
   }
 
-  container resource-mgr-config {
-    description "Data model for configuration of resource-mgr";
-    rwpb:msg-new ResourceManagerConfig;
-    config true;
-
-    container management-domain {
-      leaf name {
-        description "The management domain name this launchpad is associated with.";
-        rwpb:field-inline "true";
-        rwpb:field-string-max 64;
-        type string;
-        //mandatory true;
-      }
-    }
+  augment "/rw-project:project" {
+    container resource-mgr-config {
+      description "Data model for configuration of resource-mgr";
+      rwpb:msg-new ResourceManagerConfig;
+      config true;
 
 
-    container resource-pools {
-      description "Resource Pool configuration";
-      rwpb:msg-new ResourcePools;
-      list cloud-account {
-        key "name";
+      container management-domain {
         leaf name {
         leaf name {
-          description
-            "Resource pool for the configured cloud account";
-          type leafref {
-            path "/rwcloud:cloud/rwcloud:account/rwcloud:name";
+          description "The management domain name this launchpad is associated with.";
+          rwpb:field-inline "true";
+          rwpb:field-string-max 64;
+          type string;
+          //mandatory true;
+        }
+      }
+
+      container resource-pools {
+        description "Resource Pool configuration";
+        rwpb:msg-new ResourcePools;
+        list cloud-account {
+          key "name";
+          leaf name {
+            description
+              "Resource pool for the configured cloud account";
+            type leafref {
+              path "../../../../rwcloud:cloud/rwcloud:account/rwcloud:name";
+            }
           }
         }
       }
           }
         }
       }
@@ -136,171 +147,177 @@ module rw-resource-mgr
     }
   }
 
     }
   }
 
-  container resource-mgmt {
-    description "Resource management ";
-    config false;
+  augment "/rw-project:project" {
+    container resource-mgmt {
+      description "Resource management ";
+      config false;
 
 
-    container vdu-event {
-      description "Events for VDU Management";
-      rwpb:msg-new VDUEvent;
+      container vdu-event {
+        description "Events for VDU Management";
+        rwpb:msg-new VDUEvent;
 
 
-      list vdu-event-data {
-        rwpb:msg-new VDUEventData;
-        key "event-id";
+        list vdu-event-data {
+          rwpb:msg-new VDUEventData;
+          key "event-id";
 
 
-        leaf event-id {
-          description "Identifier associated with the VDU transaction";
-          type yang:uuid;
-        }
+          leaf event-id {
+            description "Identifier associated with the VDU transaction";
+            type yang:uuid;
+          }
 
 
-        leaf cloud-account {
-          description "The cloud account to use for this resource request";
-          type leafref {
-            path "/rwcloud:cloud/rwcloud:account/rwcloud:name";
+          leaf cloud-account {
+            description "The cloud account to use for this resource request";
+            type leafref {
+              path "../../../../rwcloud:cloud/rwcloud:account/rwcloud:name";
+            }
           }
           }
-        }
 
 
-        container request-info {
-          description "Information about required resource";
+          container request-info {
+            description "Information about required resource";
 
 
-          uses rwcal:vdu-create-params;
-        }
+            uses rwcal:vdu-create-params;
+          }
 
 
-        container resource-info {
-          description "Information about allocated resource";
-          leaf pool-name {
-            type string;
+          container resource-info {
+            description "Information about allocated resource";
+            leaf pool-name {
+              type string;
+            }
+            uses resource-state;
+            uses rwcal:vdu-info-params;
           }
           }
-          uses resource-state;
-          uses rwcal:vdu-info-params;
         }
       }
         }
       }
-    }
 
 
-    container vlink-event {
-      description "Events for Virtual Link management";
-      rwpb:msg-new VirtualLinkEvent;
+      container vlink-event {
+        description "Events for Virtual Link management";
+        rwpb:msg-new VirtualLinkEvent;
 
 
-      list vlink-event-data {
-        rwpb:msg-new VirtualLinkEventData;
+        list vlink-event-data {
+          rwpb:msg-new VirtualLinkEventData;
 
 
-        key "event-id";
+          key "event-id";
 
 
-        leaf event-id {
-          description "Identifier associated with the Virtual Link transaction";
-          type yang:uuid;
-        }
+          leaf event-id {
+            description "Identifier associated with the Virtual Link transaction";
+            type yang:uuid;
+          }
 
 
-        leaf cloud-account {
-          description "The cloud account to use for this resource request";
-          type leafref {
-            path "/rwcloud:cloud/rwcloud:account/rwcloud:name";
+          leaf cloud-account {
+            description "The cloud account to use for this resource request";
+            type leafref {
+              path "../../../../rwcloud:cloud/rwcloud:account/rwcloud:name";
+            }
           }
           }
-        }
 
 
-        container request-info {
-          description "Information about required resource";
+          container request-info {
+            description "Information about required resource";
 
 
-          uses rwcal:virtual-link-create-params;
-        }
+            uses rwcal:virtual-link-create-params;
+          }
 
 
-        container resource-info {
-          leaf pool-name {
-            type string;
+          container resource-info {
+            leaf pool-name {
+              type string;
+            }
+            uses resource-state;
+            uses rwcal:virtual-link-info-params;
           }
           }
-          uses resource-state;
-          uses rwcal:virtual-link-info-params;
         }
       }
     }
   }
 
 
         }
       }
     }
   }
 
 
-  container resource-pool-records {
-    description "Resource Pool Records";
-    rwpb:msg-new ResourcePoolRecords;
-    config false;
+  augment "/rw-project:project" {
+    container resource-pool-records {
+      description "Resource Pool Records";
+      rwpb:msg-new ResourcePoolRecords;
+      config false;
 
 
-    list cloud-account {
-      key "name";
-      leaf name {
-        description
-          "The configured cloud account's pool records.";
-        type leafref {
-          path "/rwcloud:cloud/rwcloud:account/rwcloud:name";
+      list cloud-account {
+        key "name";
+        leaf name {
+          description
+            "The configured cloud account's pool records.";
+          type leafref {
+            path "../../../rwcloud:cloud/rwcloud:account/rwcloud:name";
+          }
         }
         }
-      }
 
 
-      list records {
-        rwpb:msg-new ResourceRecordInfo;
-        key "name";
-        uses resource-pool-info;
+        list records {
+          rwpb:msg-new ResourceRecordInfo;
+          key "name";
+          uses resource-pool-info;
 
 
-        leaf pool-status {
-          type enumeration {
-            enum unknown;
-            enum locked;
-            enum unlocked;
+          leaf pool-status {
+            type enumeration {
+              enum unknown;
+              enum locked;
+              enum unlocked;
+            }
           }
           }
-        }
 
 
-        leaf total-resources {
-          type uint32;
-        }
+          leaf total-resources {
+            type uint32;
+          }
 
 
-        leaf free-resources {
-          type uint32;
-        }
+          leaf free-resources {
+            type uint32;
+          }
 
 
-        leaf allocated-resources {
-          type uint32;
+          leaf allocated-resources {
+            type uint32;
+          }
         }
       }
     }
   }
 
 
         }
       }
     }
   }
 
 
-  container resource-mgr-data{
-    description "Resource Manager operational data";
-    config false;
+  augment "/rw-project:project" {
+    container resource-mgr-data {
+      description "Resource Manager operational data";
+      config false;
 
 
-    container pool-record {
-      description "Resource Pool record";
+      container pool-record {
+        description "Resource Pool record";
 
 
-      list cloud {
-        key "name";
-        max-elements 16;
-        rwpb:msg-new "ResmgrCloudPoolRecords";
-        leaf name {
-          description
-            "The configured cloud account's pool records.";
-          type leafref {
-            path "/rwcloud:cloud/rwcloud:account/rwcloud:name";
+        list cloud {
+          key "name";
+          max-elements 16;
+          rwpb:msg-new "ResmgrCloudPoolRecords";
+          leaf name {
+            description
+              "The configured cloud account's pool records.";
+            type leafref {
+              path "../../../../rwcloud:cloud/rwcloud:account/rwcloud:name";
+            }
           }
           }
-        }
 
 
-        list records {
-          key "name";
-          uses resource-pool-info;
+          list records {
+            key "name";
+            uses resource-pool-info;
 
 
-          list free-vdu-list {
-            key vdu-id;
-            uses rwcal:vdu-info-params;
-          }
+            list free-vdu-list {
+              key vdu-id;
+              uses rwcal:vdu-info-params;
+            }
 
 
-          list in-use-vdu-list {
-            key vdu-id;
-            uses rwcal:vdu-info-params;
-          }
+            list in-use-vdu-list {
+              key vdu-id;
+              uses rwcal:vdu-info-params;
+            }
 
 
-          list free-vlink-list {
-            key virtual-link-id;
-            uses rwcal:virtual-link-info-params;
-          }
+            list free-vlink-list {
+              key virtual-link-id;
+              uses rwcal:virtual-link-info-params;
+            }
 
 
-          list in-use-vlink-list {
+            list in-use-vlink-list {
               key virtual-link-id;
               key virtual-link-id;
-            uses rwcal:virtual-link-info-params;
+              uses rwcal:virtual-link-info-params;
+            }
           }
         }
       }
           }
         }
       }
index 9b35ff4..382515f 100644 (file)
@@ -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.
  *
  *   Licensed under the Apache License, Version 2.0 (the "License");
  *   you may not use this file except in compliance with the License.
@@ -31,11 +31,15 @@ module rw-staging-mgmt-annotation
     prefix tailf;
   }
 
     prefix tailf;
   }
 
+  import rw-project {
+    prefix "rw-project";
+  }
+
   tailf:annotate "/rw-staging-mgmt:create-staging-area" {
      tailf:actionpoint rw_actionpoint;
   }
 
   tailf:annotate "/rw-staging-mgmt:create-staging-area" {
      tailf:actionpoint rw_actionpoint;
   }
 
-  tailf:annotate "/rw-staging-mgmt:staging-areas" {
+  tailf:annotate "/rw-project:project/rw-staging-mgmt:staging-areas" {
     tailf:callpoint rw_callpoint;
   }
 
     tailf:callpoint rw_callpoint;
   }
 
index d5722cd..8ae1f71 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
 /*
  *
- *   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.
  *
  *   Licensed under the Apache License, Version 2.0 (the "License");
  *   you may not use this file except in compliance with the License.
@@ -53,6 +53,15 @@ module rw-staging-mgmt
     prefix "manotypes";
   }
 
     prefix "manotypes";
   }
 
+  import rw-project {
+    prefix "rw-project";
+  }
+
+  revision 2017-02-08 {
+    description
+      "Update model to support projects.";
+  }
+
   revision 2016-06-01 {
     description
       "Initial revision.";
   revision 2016-06-01 {
     description
       "Initial revision.";
@@ -112,31 +121,33 @@ module rw-staging-mgmt
 
   }
 
 
   }
 
-  container staging-areas {
-    rwpb:msg-new StagingAreas;
-    description "Staging Areas";
-    config false;
+  augment "/rw-project:project" {
+    container staging-areas {
+      rwpb:msg-new StagingAreas;
+      description "Staging Areas";
+      config false;
 
 
-    list staging-area {
-      rwpb:msg-new StagingArea;
-      key "area-id";
+      list staging-area {
+        rwpb:msg-new StagingArea;
+        key "area-id";
 
 
-      leaf area-id {
-        description "Staging Area ID";
-        type string;
-      }
+        leaf area-id {
+          description "Staging Area ID";
+          type string;
+        }
 
 
-      uses staging-area-config;
-      uses staging-area-meta;
+        uses staging-area-config;
+        uses staging-area-meta;
+      }
     }
   }
 
     }
   }
 
-
   rpc create-staging-area {
     description "Creates a staging area for the upload.";
 
     input {
       uses staging-area-config;
   rpc create-staging-area {
     description "Creates a staging area for the upload.";
 
     input {
       uses staging-area-config;
+      uses manotypes:rpc-project-name;
     }
 
     output {
     }
 
     output {
index 69a0d40..1482ec3 100755 (executable)
@@ -1,7 +1,7 @@
 #!/usr/bin/env python3
 
 # 
 #!/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.
 #
 #   Licensed under the Apache License, Version 2.0 (the "License");
 #   you may not use this file except in compliance with the License.
@@ -775,7 +775,7 @@ class ManoTestCase(rift.test.dts.AbstractDTSTest):
     @asyncio.coroutine
     def configure_cloud_account(self, dts, cloud_type, cloud_name="cloud1"):
         account = self.get_cal_account(cloud_type, cloud_name)
     @asyncio.coroutine
     def configure_cloud_account(self, dts, cloud_type, cloud_name="cloud1"):
         account = self.get_cal_account(cloud_type, cloud_name)
-        account_xpath = "C,/rw-cloud:cloud/rw-cloud:account[rw-cloud:name='{}']".format(cloud_name)
+        account_xpath = "C,/rw-project:project/rw-cloud:cloud/rw-cloud:account[rw-cloud:name='{}']".format(cloud_name)
         self.log.info("Configuring cloud-account: %s", account)
         yield from dts.query_create(account_xpath,
                                     rwdts.XactFlag.ADVISE,
         self.log.info("Configuring cloud-account: %s", account)
         yield from dts.query_create(account_xpath,
                                     rwdts.XactFlag.ADVISE,
index 705565b..9dc9fe2 100644 (file)
@@ -1,7 +1,7 @@
 #!/usr/bin/env python
 """
 # 
 #!/usr/bin/env python
 """
 # 
-#   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.
 #
 #   Licensed under the Apache License, Version 2.0 (the "License");
 #   you may not use this file except in compliance with the License.
@@ -261,7 +261,7 @@ class TestLaunchpadStartStop(object):
         cloud_account.openstack.tenant = 'demo'
         cloud_account.openstack.mgmt_network = 'private'
 
         cloud_account.openstack.tenant = 'demo'
         cloud_account.openstack.mgmt_network = 'private'
 
-        cloud_proxy.merge_config("/rw-cloud:cloud-account", cloud_account)
+        cloud_proxy.merge_config("/rw-project:project/rw-cloud:cloud-account", cloud_account)
 
     def test_configure_pools(self, resource_mgr_proxy):
         pools = RwResourceMgrYang.ResourcePools.from_dict({
 
     def test_configure_pools(self, resource_mgr_proxy):
         pools = RwResourceMgrYang.ResourcePools.from_dict({
index 16a8990..8f7334b 100644 (file)
@@ -1,7 +1,7 @@
 #!/usr/bin/env python
 """
 # 
 #!/usr/bin/env python
 """
 # 
-#   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.
 #
 #   Licensed under the Apache License, Version 2.0 (the "License");
 #   you may not use this file except in compliance with the License.
@@ -240,7 +240,7 @@ class TestLaunchpadStartStop(object):
         cloud_account.openstack.tenant = 'demo'
         cloud_account.openstack.mgmt_network = 'private'
 
         cloud_account.openstack.tenant = 'demo'
         cloud_account.openstack.mgmt_network = 'private'
 
-        cloud_proxy.merge_config("/rw-cloud:cloud-account", cloud_account)
+        cloud_proxy.merge_config("/rw-project:project/rw-cloud:cloud-account", cloud_account)
 
     def test_configure_pools(self, resource_mgr_proxy):
         pools = RwResourceMgrYang.ResourcePools.from_dict({
 
     def test_configure_pools(self, resource_mgr_proxy):
         pools = RwResourceMgrYang.ResourcePools.from_dict({
index ed00a25..c2f27a7 100644 (file)
@@ -1,7 +1,7 @@
 #!/usr/bin/env python
 """
 # 
 #!/usr/bin/env python
 """
 # 
-#   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.
 #
 #   Licensed under the Apache License, Version 2.0 (the "License");
 #   you may not use this file except in compliance with the License.
@@ -240,7 +240,7 @@ class TestLaunchpadStartStop(object):
         cloud_account.openstack.tenant = 'demo'
         cloud_account.openstack.mgmt_network = 'private'
 
         cloud_account.openstack.tenant = 'demo'
         cloud_account.openstack.mgmt_network = 'private'
 
-        cloud_proxy.merge_config("/rw-cloud:cloud-account", cloud_account)
+        cloud_proxy.merge_config("/rw-project:project/rw-cloud:cloud-account", cloud_account)
 
     def test_configure_pools(self, resource_mgr_proxy):
         pools = RwResourceMgrYang.ResourcePools.from_dict({
 
     def test_configure_pools(self, resource_mgr_proxy):
         pools = RwResourceMgrYang.ResourcePools.from_dict({
index 4d6e345..c851847 100644 (file)
@@ -1,7 +1,7 @@
 #!/usr/bin/env python
 """
 # 
 #!/usr/bin/env python
 """
 # 
-#   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.
 #
 #   Licensed under the Apache License, Version 2.0 (the "License");
 #   you may not use this file except in compliance with the License.
@@ -239,7 +239,7 @@ class TestLaunchpadStartStop(object):
         cloud_account.openstack.tenant = 'demo'
         cloud_account.openstack.mgmt_network = 'private'
 
         cloud_account.openstack.tenant = 'demo'
         cloud_account.openstack.mgmt_network = 'private'
 
-        cloud_proxy.merge_config("/rw-cloud:cloud-account", cloud_account)
+        cloud_proxy.merge_config("/rw-project:project/rw-cloud:cloud-account", cloud_account)
 
     def test_configure_pools(self, resource_mgr_proxy):
         pools = RwResourceMgrYang.ResourcePools.from_dict({
 
     def test_configure_pools(self, resource_mgr_proxy):
         pools = RwResourceMgrYang.ResourcePools.from_dict({
index aa900de..5fd03fc 100644 (file)
@@ -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.
 #
 #   Licensed under the Apache License, Version 2.0 (the "License");
 #   you may not use this file except in compliance with the License.
@@ -35,7 +35,7 @@ rift_add_vala(
   VALA_PACKAGES
     rw_types-1.0 rw_yang-1.0 rw_keyspec-1.0 rw_yang_pb-1.0 rw_schema_proto-1.0
     rw_log_yang-1.0 rw_base_yang-1.0 rwmon_yang-1.0 rw_manifest_yang-1.0 protobuf_c-1.0 ietf_netconf_yang-1.0
   VALA_PACKAGES
     rw_types-1.0 rw_yang-1.0 rw_keyspec-1.0 rw_yang_pb-1.0 rw_schema_proto-1.0
     rw_log_yang-1.0 rw_base_yang-1.0 rwmon_yang-1.0 rw_manifest_yang-1.0 protobuf_c-1.0 ietf_netconf_yang-1.0
-    rw_log-1.0 rwcal_yang-1.0
+    rw_log-1.0 rwcal_yang-1.0 rw_project_yang-1.0
   VAPI_DIRS ${RIFT_SUBMODULE_BINARY_ROOT}/rwmon/plugins/yang
             ${RIFT_SUBMODULE_BINARY_ROOT}/rwcal/plugins/yang
             ${RIFT_SUBMODULE_BINARY_ROOT}/models/plugins/yang
   VAPI_DIRS ${RIFT_SUBMODULE_BINARY_ROOT}/rwmon/plugins/yang
             ${RIFT_SUBMODULE_BINARY_ROOT}/rwcal/plugins/yang
             ${RIFT_SUBMODULE_BINARY_ROOT}/models/plugins/yang
@@ -51,7 +51,7 @@ rift_add_vala(
   GENERATE_VAPI_FILE ${VALA_LONG_NAME}.vapi
   GENERATE_GIR_FILE ${VALA_TYPELIB_PREFIX}.gir
   GENERATE_TYPELIB_FILE ${VALA_TYPELIB_PREFIX}.typelib
   GENERATE_VAPI_FILE ${VALA_LONG_NAME}.vapi
   GENERATE_GIR_FILE ${VALA_TYPELIB_PREFIX}.gir
   GENERATE_TYPELIB_FILE ${VALA_TYPELIB_PREFIX}.typelib
-  DEPENDS rwmon_yang rwcal_yang rwlog_gi rwschema_yang
+  DEPENDS rwmon_yang rwcal_yang rwlog_gi rwschema_yang rwproject_yang
   )
 
 rift_install_vala_artifacts(
   )
 
 rift_install_vala_artifacts(
index 20c364d..4e1612d 100644 (file)
@@ -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.
  *
  *   Licensed under the Apache License, Version 2.0 (the "License");
  *   you may not use this file except in compliance with the License.
@@ -43,6 +43,15 @@ module rwmon
     prefix "manotypes";
   }
 
     prefix "manotypes";
   }
 
+  import rw-project {
+    prefix "rw-project";
+  }
+
+  revision 2017-02-08 {
+    description
+      "Update model to support projects.";
+  }
+
   revision 2015-10-28 {
     description
         "Initial revision.";
   revision 2015-10-28 {
     description
         "Initial revision.";
@@ -50,26 +59,28 @@ module rwmon
         "RIFT monitoring";
   }
 
         "RIFT monitoring";
   }
 
-  container nfvi-metrics {
-    rwpb:msg-new NfviMetrics;
+  augment "/rw-project:project" {
+    container nfvi-metrics {
+      rwpb:msg-new NfviMetrics;
 
 
-    leaf timestamp {
-      description
+      leaf timestamp {
+        description
           "This is the time when the metric was captured. The timestamp is
           represented as the number of seconds since the beginning of the Unix
           epoch.";
           "This is the time when the metric was captured. The timestamp is
           represented as the number of seconds since the beginning of the Unix
           epoch.";
-      type decimal64 {
-        fraction-digits 3;
+        type decimal64 {
+          fraction-digits 3;
+        }
       }
       }
-    }
 
 
-    uses manotypes:nfvi-metrics;
-  }
+      uses manotypes:nfvi-metrics;
+    }
 
 
-  container alarm {
-    rwpb:msg-new Alarm;
+    container alarm {
+      rwpb:msg-new Alarm;
 
 
-    uses manotypes:alarm;
+      uses manotypes:alarm;
+    }
   }
 }
 
   }
 }
 
index 3031b19..189acb6 100644 (file)
@@ -1,4 +1,5 @@
 rw-base
 rw-base
+rw-project
 rw-mgmtagt
 rw-manifest
 rw-vcs
 rw-mgmtagt
 rw-manifest
 rw-vcs