Merge "Multi-disk, Config-drive and meta-data translation"
authorvelandy <rajesh.velandy@riftio.com>
Thu, 22 Dec 2016 19:12:07 +0000 (20:12 +0100)
committerGerrit Code Review <root@osm.etsi.org>
Thu, 22 Dec 2016 19:12:07 +0000 (20:12 +0100)
BUILD.sh
models/plugins/yang/nsd.yang
rwlaunchpad/plugins/rwlaunchpadtasklet/rift/package/package.py

index a34202b..0443cc4 100755 (executable)
--- a/BUILD.sh
+++ b/BUILD.sh
@@ -126,6 +126,17 @@ fi
 ###############################################################################
 # Main block
 
+# Disable apt-daily.service and apt-daily.timer
+
+DAILY_TIMER='apt-daily.timer'
+DAILY_SERVICE='apt-daily.service'
+if [ $(systemctl is-active $DAILY_TIMER) = "active" ]
+then
+    systemctl stop $DAILY_TIMER
+    systemctl disable $DAILY_TIMER
+    systemctl disable $DAILY_SERVICE
+fi
+
 # must be run from the top of a workspace
 cd $(dirname $0)
 
index 31750ca..aa55f34 100644 (file)
@@ -292,34 +292,28 @@ module nsd
           }
         }
 
-         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
-                in a vnfd. This is a leafref to path:
-                    /vnfd:vnfd-catalog/vnfd:vnfd
-                    + [vnfd:id = current()/../nsd:vnfd-id-ref]
-                    + /vnfd:connection-point/vnfd:name
-                NOTE: An issue with confd is preventing the
-                use of xpath. Seems to be an issue with leafref
-                to leafref, whose target is in a different module.
-                Once that is resovled this will switched to use
-                leafref";
-            type string;
+        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";
+          }
         }
       }
 
index 355b23b..45d8ba8 100644 (file)
@@ -314,7 +314,14 @@ class DescriptorPackage(object):
                 continue
 
             # Copy the contents of the file to the correct path
-            dest_file_path = os.path.join(dest_root_dir, filename)
+            # Remove the common prefix and create the dest filename
+            if src_dir is not None:
+                fname = filename[len(src_dir):]
+                if fname[0] == '/':
+                    fname = fname[1:]
+            else:
+                fname = filename
+            dest_file_path = os.path.join(dest_root_dir, fname)
             dest_dir_path = os.path.dirname(dest_file_path)
             if not os.path.exists(dest_dir_path):
                 os.makedirs(dest_dir_path)