From fa91cf2172cfdddc74e76a49a47404f81c83e049 Mon Sep 17 00:00:00 2001 From: stevenvanrossem Date: Thu, 4 May 2017 23:45:15 +0200 Subject: [PATCH] small updates in dashboard + E-LAN deployment --- src/emuvim/api/sonata/dummygatekeeper.py | 17 ++++++++--------- src/emuvim/dashboard/css/main.css | 6 +++--- src/emuvim/dashboard/js/main.js | 3 ++- src/emuvim/dcemulator/net.py | 1 - 4 files changed, 13 insertions(+), 14 deletions(-) diff --git a/src/emuvim/api/sonata/dummygatekeeper.py b/src/emuvim/api/sonata/dummygatekeeper.py index a57a6b9..151e5b3 100755 --- a/src/emuvim/api/sonata/dummygatekeeper.py +++ b/src/emuvim/api/sonata/dummygatekeeper.py @@ -679,15 +679,14 @@ class Service(object): "Setting up E-LAN interface. (%s:%s) -> %s" % ( vnf_id, intf_name, ip_address)) - if vnf_id in self.vnfds: - # re-configure the VNFs IP assignment and ensure that a new subnet is used for each E-LAN - # E-LAN relies on the learning switch capability of Ryu which has to be turned on in the topology - # (DCNetwork(controller=RemoteController, enable_learning=True)), so no explicit chaining is necessary. - vnfi = self._get_vnf_instance(instance_uuid, vnf_id) - if vnfi is not None: - self._vnf_reconfigure_network(vnfi, intf_name, ip_address) - # add this vnf and interface to the E-LAN for tagging - elan_vnf_list.append({'name': src_docker_name, 'interface': intf_name}) + # re-configure the VNFs IP assignment and ensure that a new subnet is used for each E-LAN + # E-LAN relies on the learning switch capability of Ryu which has to be turned on in the topology + # (DCNetwork(controller=RemoteController, enable_learning=True)), so no explicit chaining is necessary. + vnfi = self._get_vnf_instance(instance_uuid, vnf_id) + if vnfi is not None: + self._vnf_reconfigure_network(vnfi, intf_name, ip_address) + # add this vnf and interface to the E-LAN for tagging + elan_vnf_list.append({'name': src_docker_name, 'interface': intf_name}) # install the VLAN tags for this E-LAN GK.net.setLAN(elan_vnf_list) diff --git a/src/emuvim/dashboard/css/main.css b/src/emuvim/dashboard/css/main.css index a518f28..5e9162c 100755 --- a/src/emuvim/dashboard/css/main.css +++ b/src/emuvim/dashboard/css/main.css @@ -36,16 +36,16 @@ body { } .interface_table { - width: 350px; + width: 420px; } .interface_port { - width: 150px; + width: 120px; } .interface_name { - width: 150px; + width: 200px; } .interface_ip { diff --git a/src/emuvim/dashboard/js/main.js b/src/emuvim/dashboard/js/main.js index 1fcdf4c..c8d65ea 100755 --- a/src/emuvim/dashboard/js/main.js +++ b/src/emuvim/dashboard/js/main.js @@ -66,7 +66,7 @@ function update_table_container(data) // clear table $("#table_container").empty(); // header - $("#table_container").append('DatacenterContainerImagedocker0Networking [datacenter port | interface | ip]'); + $("#table_container").append('DatacenterContainerImagedocker0--Networking--
'); // fill table $.each(data, function(i, item) { var row_str = ""; @@ -83,6 +83,7 @@ function update_table_container(data) build_network_table(item[1].network, item[0]); }); $("#lbl_container_count").text(data.length); + $("#table_network").append('
datacenter portinterfaceip
') // update lateness counter LAST_UPDATE_TIMESTAMP_CONTAINER = Date.now(); } diff --git a/src/emuvim/dcemulator/net.py b/src/emuvim/dcemulator/net.py index 8973bb9..9dfef36 100755 --- a/src/emuvim/dcemulator/net.py +++ b/src/emuvim/dcemulator/net.py @@ -274,7 +274,6 @@ class DCNetwork(Containernet): # add this switch to the global topology overview if add_to_graph: self.DCNetwork_graph.add_node(name, type=params.get('type','switch')) - LOG.info('*** **** *** add switch: {0} type: {1}'.format(name, params.get('type'))) # set the learning switch behavior if 'failMode' in params : -- 2.25.1