Revision 2fd1c362

View differences:

nepa_test.py
153 153
    net.start()
154 154
    net.enableForwarding()
155 155
    enableShortestRoutes = C.getConfigurations("enableShortestRoutes")
156
    if not enableShortestRoutes or enableShortestRoutes.lower() == "true":
157
        net.setShortestRoutes()
156
    shortestPathComputation = C.getConfigurations("shortestPathComputation")
157
    if enableShortestRoutes or shortestPathComputation:
158
        if enableShortestRoutes.lower() == "true" or \
159
           shortestPathComputation.lower() == "true":
160
            net.setShortestPaths()
161
    else:
162
        net.setShortestPaths()
163

  
158 164
    # CLI(net)
159 165
    graphname = networkGraph.split('/')[-1].split('.')[0]
160 166
    testPath = testName + "_" + graphname + "_" + str(int(time()))
network_builder.py
180 180
                     params1=dict([('ip', addr1)] + quality_params.items()),
181 181
                     params2=dict([('ip', addr2)] + quality_params.items()))
182 182

  
183
    def setShortestRoutes(self):
183
    def setShortestPaths(self):
184 184
        paths = dict(nx.all_pairs_dijkstra_path(self.gg, weight='weight'))
185 185
        for node1 in paths.keys():
186 186
            host1 = self.get(node1)

Also available in: Unified diff