first commit

Change-Id: I8a65ee5527dd16d81e87c8ac5d4bdb471e5e759d
Signed-off-by: lombardof <flombardo@cnit.it>
diff --git a/lib/TopologyModels/example/example.yaml b/lib/TopologyModels/example/example.yaml
new file mode 100644
index 0000000..04633f5
--- /dev/null
+++ b/lib/TopologyModels/example/example.yaml
@@ -0,0 +1,53 @@
+name: Example                              #Model name
+description: example                       #Model description
+version: 1.0                            #Model version
+designer: Pierluigi Greto               #Model designer
+nodes:                                   #List of nodes, with id and label used in the gui (We can add more fields)
+  examplenode1:
+    label: EXN1
+  examplenode2:
+    label: EXN2
+layer:                                  #List of Layers
+    exampleLayer:
+      nodes:                  #List of node to be visualized in the current layer
+        examplenode1:
+          addable:
+            callback: addNode
+          removable: true
+        examplenode1:
+          addable:
+            callback: addNode
+          removable: true
+      allowed_edges:                  #List of allowed edges between the layer's nodes
+        examplenode1:                        #Edge's source
+          destination:           #List of edge's destination with the list of controls callback id to call when there is a connections
+            examplenode1:
+              direct_edge: false
+              removable: true
+            examplenode2:
+              direct_edge: false
+              removable: true
+action:           #Action to show on rightclick on a node/link
+    rightclick:
+      node:
+        delete:
+          title: Delete
+          callback: deleteNode
+      link:
+        delete:
+          title: Delete
+          callback: deleteLink
+
+callback:                             #List of callbacks used
+  addNode:
+      file: example_controller.js
+      class: ExampleController
+  removeNode:
+      file: example_controller.js
+      class: ExampleController
+  addLink:
+      file: example_controller.js
+      class: ExampleController
+  removeLink:
+      file: example_controller.js
+      class: ExampleController
diff --git a/lib/TopologyModels/osm/osm.yaml b/lib/TopologyModels/osm/osm.yaml
new file mode 100644
index 0000000..59ac883
--- /dev/null
+++ b/lib/TopologyModels/osm/osm.yaml
@@ -0,0 +1,187 @@
+name: Osm                            #Model name
+description: Osm                    #Model description
+version: 1.0                            #Model version
+designer: Francesco Lombardo              #Model designer
+nodes:                                  #List of nodes, with id and label used in the gui (We can add more fields)
+    vnf:
+        label: VNF
+    ns_vl:
+        label: VL
+    ns_cp:
+        label: SAP
+    vnf_vl:
+        label: intVL
+    vnf_vdu:
+        label: VDU
+    vnf_ext_cp:
+        label: ExtCP
+    vnf_vdu_cp:
+        label: VduCP
+layer:                                  #List of Layers
+    ns:
+        nodes:                  #List of node to be visualized in the current layer
+            vnf:
+                addable:
+                    callback: addVnf
+                removable:
+                    callback: removeNode
+                expands : vnf
+            ns_vl:
+                addable:
+                    callback: addNode
+                removable:
+                    callback: removeNode
+            ns_cp:
+                addable:
+                    callback: addNode
+                removable:
+                    callback: removeNode
+        allowed_edges:                  #List of allowed edges between the layer's nodes
+            vnf:                        #Edge's source
+                destination:            #List of edge's destination with the list of controls callback id to call when there is a connections
+                    ns_vl:
+                        callback: linkVnftoNsVl
+                        direct_edge: false
+                        removable:
+                            callback: removeLink
+                    ns_cp:
+                        callback: linkVnftoNsCp
+                        direct_edge: false
+                        removable:
+                            callback: removeLink
+            ns_vl:
+                destination:
+                    vnf:
+                        callback: linkVnftoNsVl
+                        direct_edge: false
+                        removable:
+                            callback: removeLink
+                    ns_cp:
+                        callback: nsCpExclusiveConnection
+                        direct_edge: false
+                        removable:
+                            callback: removeLink
+
+            ns_cp:
+                destination:
+                    vnf:
+                        callback: linkVnftoNsCp
+                        direct_edge: false
+                        removable:
+                            callback: removeLink
+                    ns_vl:
+                        callback: nsCpExclusiveConnection
+                        direct_edge: false
+                        removable:
+                            callback: removeLink
+        action:           #Action to show on rightclick all types of node/link
+            node:
+                addToCurrentVNFFG:
+                    title: Add to current VNFFG
+                    callback: addToCurrentVNFFG
+            link:
+
+    vnf:
+        nodes:                  #List of node to be visualized in the current layer
+            vnf_vl:
+                addable:
+                    callback: addNode
+                removable:
+                    callback: removeNode
+            vnf_vdu:
+                addable:
+                    callback: addVnfVdu
+                removable:
+                    callback: removeVnfVdu
+            vnf_ext_cp:
+                addable:
+                    callback: addNode
+                removable:
+                    callback: removeNode
+            vnf_vdu_cp:
+                addable:
+                    callback: addVnfVduCp
+                removable:
+                    callback: removeVnfVduCp
+        allowed_edges:                  #List of allowed edges between the layer's nodes
+            vnf_vl:                        #Edge's source
+                destination:            #List of edge's destination with the list of controls callback id to call when there is a connections
+                    vnf_vdu_cp:
+                        callback: linkVltoVduCp
+                        direct_edge: false
+                        removable:
+                            callback: removeLink
+                    vnf_ext_cp:
+                        callback: linkVnfVltoExpCp
+                        direct_edge: false
+                        removable:
+                            callback: removeLink
+            vnf_ext_cp:
+                destination:
+                    vnf_vl:
+                        callback: linkVnfVltoExpCp
+                        direct_edge: false
+                        removable:
+                            callback: removeLink
+            vnf_vdu_cp:
+                destination:
+                    vnf_vl:
+                        callback: linkVltoVduCp
+                        direct_edge: false
+                        removable:
+                            callback: removeLink
+
+
+
+callback:                             #List of callbacks used
+  chooseVnfExp:
+      file: osm_controller.js
+      class: OSMController
+  nsCpExclusiveConnection:
+      file: osm_controller.js
+      class: OSMController
+  getVduConnectedToVduCp:
+      file: osm_controller.js
+      class: OSMController
+  addVnf:
+      file: osm_controller.js
+      class: OSMController
+  addNode:
+      file: osm_controller.js
+      class: OSMController
+  addVnfVdu:
+      file: osm_controller.js
+      class: OSMController
+  addVnfVduCp:
+      file: osm_controller.js
+      class: OSMController
+  addLink:
+      file: osm_controller.js
+      class: OSMController
+  linkVnftoNsCp:
+      file: osm_controller.js
+      class: OSMController
+  linkVnftoNsVl:
+      file: osm_controller.js
+      class: OSMController
+  linkVltoVduCp:
+      file: osm_controller.js
+      class: OSMController
+  linkVnfVltoExpCp:
+      file: osm_controller.js
+      class: OSMController
+  removeNode:
+      file: osm_controller.js
+      class: OSMController
+  removeVnfVdu:
+      file: osm_controller.js
+      class: OSMController
+  removeVnfVduCp:
+      file: osm_controller.js
+      class: OSMController
+  removeLink:
+      file: osm_controller.js
+      class: OSMController
+  addToCurrentVNFFG:
+      file: osm_controller.js
+      class: OSMController