X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=src%2Fnepi%2Fresources%2Fns3%2Fns3node.py;h=c1587282ce7a17c87e782eef68b47c72631386dc;hb=e55924b6886bd7382a28e1ae235c4810f852e163;hp=2d14b85635bb4e2020678b9253a0a2c209fccd57;hpb=741b99fe027fe6b54846a0703d26510d9b40a135;p=nepi.git diff --git a/src/nepi/resources/ns3/ns3node.py b/src/nepi/resources/ns3/ns3node.py index 2d14b856..c1587282 100644 --- a/src/nepi/resources/ns3/ns3node.py +++ b/src/nepi/resources/ns3/ns3node.py @@ -3,9 +3,8 @@ # Copyright (C) 2014 INRIA # # This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. +# it under the terms of the GNU General Public License version 2 as +# published by the Free Software Foundation; # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -121,20 +120,16 @@ class NS3BaseNode(NS3Base): @property def _rms_to_wait(self): - rms = set() - rms.add(self.simulation) + rms = set([self.simulation]) - ipv4 = self.ipv4 - if ipv4: - rms.add(ipv4) + if self.ipv4: + rms.add(self.ipv4) - arp = self.arp - if arp: - rms.add(arp) + if self.arp: + rms.add(self.arp) - mobility = self.mobility - if mobility: - rms.add(mobility) + if self.mobility: + rms.add(self.mobility) return rms @@ -189,7 +184,11 @@ class NS3BaseNode(NS3Base): container_uuid = self.simulation.create("NodeContainer") self.simulation.invoke(container_uuid, "Add", self.uuid) - with dceapp.dce_manager_lock: - self.simulation.invoke(dceapp.dce_manager_helper_uuid, - "Install", container_uuid) + + dce_helper = self.simulation.dce_helper + + with dce_helper.dce_manager_lock: + dce_manager_uuid = dce_helper.dce_manager_uuid + + self.simulation.invoke(dce_manager_uuid, "Install", container_uuid)