Bug 278 - Allow updating of NSD when there are instantiated network services
[osm/UI.git] / skyquake / plugins / composer / api / composer.js
index e9e4be1..93cc553 100644 (file)
@@ -125,8 +125,7 @@ Composer.get = function(req) {
                 response[0].descriptors = JSON.parse(result[0].body).collection['nsd:nsd'];
                 if (result[2].body) {
                     var data = JSON.parse(result[2].body);
-                    if (data && data["nsr:ns-instance-opdata"] && data["nsr:ns-instance-opdata"]["rw-nsr:nsd-ref-count"]) {
-                        var nsdRefCountCollection = data["nsr:ns-instance-opdata"]["rw-nsr:nsd-ref-count"];
+                    if (data && data["nsr:ns-instance-opdata"]) {
                         response[0].descriptors.map(function(nsd) {
                             if (!nsd["meta"]) {
                                 nsd["meta"] = {};
@@ -134,9 +133,6 @@ Composer.get = function(req) {
                             if (typeof nsd['meta'] == 'string') {
                                 nsd['meta'] = JSON.parse(nsd['meta']);
                             }
-                            nsd["meta"]["instance-ref-count"] = _.findWhere(nsdRefCountCollection, {
-                                "nsd-id-ref": nsd.id
-                            })["instance-ref-count"];
                         });
                     }
                 }
@@ -487,7 +483,7 @@ PackageManager.copy = function(req) {
 }
 
 /**
- * This methods retrieves the status of package operations. It takes an optional 
+ * This methods retrieves the status of package operations. It takes an optional
  * transaction id (id) this if present will return only that status otherwise
  * an array of status' will be response.
  */