Esempio n. 1
0
    def trigger(self):

        for nc in self.network_configurations:
            print "network_configuration:", nc

            nc.setup_network_graph(mininet_setup_gap=1, synthesis_setup_gap=1)
            nc.init_flow_specs()
            nc.calibrate_delay(self.base_delay_budget)

            # mhasan: MCP code will go there
            # mcph.print_delay_budget(nc)

            mcph.find_path_by_mcp(nc)  # update the path in 'path' variable of FlowSpecification

            if not mcph.test_all_flow_is_schedulable(nc):
                print "Network configuration is NOT feasible (no path found)!"
                nc.isFeasible = False
                continue

            # mcph.print_path(nc)
            # with only RT_flows
            # mcph.synthesize_flow_specifications(nc)

            # usues default queue (no delay-guarantee)
            #mcph.synthesize_flow_specifications_default_queue(nc)

            # Synthesize flows (may have both RT and BE
            mcph.synthesize_flow_specifications_with_best_effort(nc)

            # nc.mininet_obj.pingAll('1')
            self.measure_flow_rates(nc)

        self.parse_flow_measurement_output()
        print "Experiment Done!"
Esempio n. 2
0
    def trigger(self):

        for nc in self.network_configurations:
            print "network_configuration:", nc

            nc.setup_network_graph(mininet_setup_gap=1, synthesis_setup_gap=1)
            nc.init_flow_specs()

            # mhasan: MCP code probably will go there
            # nc.calculate_path_by_mcp()
            # mcp_helper = MCP_Helper(nc, 100)

            #path = mcph.find_path_by_mcp(nc)
            mcph.find_path_by_mcp(nc)
            '''
            if not path:
                print "No path found!"
            else:
                print path
            '''

            # mcp_helper.random_print()
            # mcp_helper.calculate_path_by_mcp()

            nc.synthesis.synthesize_flow_specifications(nc.flow_specs)
            self.measure_flow_rates(nc)

        print "here"
Esempio n. 3
0
    def trigger(self):

        for nc in self.network_configurations:
            print "network_configuration:", nc

            nc.setup_network_graph(mininet_setup_gap=1, synthesis_setup_gap=1)
            nc.init_flow_specs()

            # mhasan: MCP code will go there
            mcph.find_path_by_mcp(nc)  # update the path in 'path' variable of FlowSpecification
            mcph.synthesize_flow_specifications(nc)
            # nc.mininet_obj.pingAll('1')
            self.measure_flow_rates(nc)

        print "here"
Esempio n. 4
0
    def trigger(self):

        self.init_output_result_dictonary()
        time.sleep(5) # sleep for a while if ryu or anything needs some time
        os.system("pkill ryu-manager")  # cleanup

        print "Experiment starting..."

        for nc in self.network_configurations:
            #print "network_configuration:", nc
            print "######################################"
            print "#of flow: {}, delay: {}, iteration: {}".format(nc.number_of_RT_flows,
                                                                  nc.min_delay_budget_for_all_flows, nc.test_case_id)
            print "######################################"

            #nc.setup_network_graph(mininet_setup_gap=1, synthesis_setup_gap=1)
            nc.setup_network_graph_without_mininet()

            # nc.init_flow_specs()
            nc.calibrate_delay(nc.min_delay_budget_for_all_flows)

            # mhasan: MCP code will go there
            # mcph.print_delay_budget(nc)

            mcph.find_path_by_mcp(nc)  # update the path in 'path' variable of FlowSpecification

            if not mcph.test_all_flow_is_schedulable(nc):
                print "Network configuration is NOT feasible (no path found)!"
                nc.isFeasible = False
                #continue
            else:
                print "Network configuration is feasible (path found for all flows)!"
                nc.isFeasible = True

                # increase schedulability count
                self.shed_count[nc.number_of_RT_flows][nc.min_delay_budget_for_all_flows] += 1
                # nc.cleanup_mininet()
                # os.system("pkill mn")  # cleanup
                # os.system("pkill ryu-manager")  # cleanup


        self.write_data_to_file('schedulability_traces.pickle')
        #print self.shed_count
        print "Experiment Done!"