Exemple #1
0
    def __init__(self, dbname, rounds):

        isp = dbname[3:7]
        self.isp = isp
        self.ISP_edges_file = os.getcwd() + '/ISP_topo/' + str(
            isp) + '_edges.txt'
        self.ISP_nodes_file = os.getcwd() + '/ISP_topo/' + str(
            isp) + '_nodes.txt'
        self.rib_prefixes_file = os.getcwd(
        ) + '/rib_feeds/' + "rib20011204_prefixes.txt"
        self.rib_peerIPs_file = os.getcwd(
        ) + '/rib_feeds/' + "rib20011204_nodes.txt"

        print "for database " + dbname + "--------------------"
        create_db(dbname, Batch.username)  # add comments

        if database_exists == 0:
            add_pgrouting_plpy_plsh_extension(dbname, Batch.username)
            load_schema(dbname, Batch.username,
                        "/home/mininet/ravel/sql_scripts/primitive.sql")
            Batch_isp.init_ISP_topo(self, dbname)

        Batch.__init__(self, dbname, rounds)
        remove_profile_schema(self.cur)

        rib_feeds_all = os.getcwd() + '/rib_feeds/rib20011204_edges.txt'
        feeds = dbname[8:]
        self.rib_edges_file = os.getcwd(
        ) + '/rib_feeds/rib20011204_edges_' + str(feeds) + '.txt'
        os.system("head -n " + str(feeds) + " " + rib_feeds_all + " > " +
                  self.rib_edges_file)

        Batch_isp.init_rib(self)
Exemple #2
0
    def __init__(self, dbname, rounds):

        isp = dbname[3:7]
        self.isp = isp
        self.ISP_edges_file = os.getcwd () + '/ISP_topo/'+str (isp) +'_edges.txt'
        self.ISP_nodes_file = os.getcwd () + '/ISP_topo/'+str (isp)+'_nodes.txt'
        self.rib_prefixes_file = os.getcwd() + '/rib_feeds/' + "rib20011204_prefixes.txt"
        self.rib_peerIPs_file = os.getcwd() + '/rib_feeds/' + "rib20011204_nodes.txt"

        print "for database " + dbname + "--------------------"
        create_db (dbname, Batch.username) # add comments

        if database_exists == 0:
            add_pgrouting_plpy_plsh_extension (dbname, Batch.username)
            load_schema (dbname, Batch.username, "/home/mininet/ravel/sql_scripts/primitive.sql")
            Batch_isp.init_ISP_topo (self, dbname)

        Batch.__init__(self,dbname, rounds)
        remove_profile_schema (self.cur)

        rib_feeds_all = os.getcwd() + '/rib_feeds/rib20011204_edges.txt'
        feeds = dbname[8:]
        self.rib_edges_file = os.getcwd() + '/rib_feeds/rib20011204_edges_' + str (feeds) + '.txt'
        os.system ("head -n " + str(feeds) + " " + rib_feeds_all + " > " + self.rib_edges_file)

        Batch_isp.init_rib (self)
Exemple #3
0
    def __init__(self,dbname, rounds):
	sql_script = "/home/mininet/ravel/sql_scripts/primitive.sql"
        #topology = 'toy'
	topology = 'fat'
	
        self.dbname = dbname
        self.create_db (sql_script)
        Batch.connect (self)

        self.load_schema (sql_script)
        self.load_sig_example_schema ()
        self.load_topo ()

        Batch.__init__(self, dbname, rounds, sql_script, topology)

        self.profile = False
Exemple #4
0
    def __init__(self, dbname, rounds):
        sql_script = "/home/mininet/ravel/sql_scripts/primitive.sql"
        #topology = 'toy'
        topology = 'fat'

        self.dbname = dbname
        self.create_db(sql_script)
        Batch.connect(self)

        self.load_schema(sql_script)
        self.load_sig_example_schema()
        self.load_topo()

        Batch.__init__(self, dbname, rounds, sql_script, topology)

        self.profile = False
Exemple #5
0
 def __init__(self,
              name,
              command,
              containerID=None,
              working_dir=None,
              image=None,
              endpoint=None):
     Batch.__init__(self, name, command, working_dir=working_dir)
     self.command = command
     self.containerID = containerID
     self.working_dir = working_dir
     self.image = image
     self.endpoint = endpoint
     self.docker_client = DockerClient()
     self.transfer = DataTransfer.inferDataTransportation(
         "127.0.0.1", self.endpoint)
     self.ssh_connection = None
Exemple #6
0
 def __init__(self,
              name,
              ssh_username,
              keypath,
              command,
              ip=None,
              working_dir=None,
              local_working_dir=None,
              endpoint=None):
     Batch.__init__(self, name, command, working_dir=working_dir)
     self.ip = ip
     self.keypath = keypath
     self.command = command
     self.endpoint = endpoint
     self.working_dir = working_dir
     self.ssh_username = ssh_username
     self.local_working_dir = local_working_dir
    def __init__(self,dbname, rounds):
        gdb ([dbname], "/home/mininet/ravel/sql_scripts/primitive.sql")
        Batch.__init__(self,dbname, rounds)

        remove_profile_schema (self.cur)
    def __init__(self, dbname, rounds):
        gdb ([dbname], "/home/mininet/ravel/sql_scripts/primitive.sql")

        Batch.__init__(self, dbname, rounds)
Exemple #9
0
    def __init__(self, dbname, rounds):
        gdb([dbname], "/home/mininet/ravel/sql_scripts/primitive.sql")

        Batch.__init__(self, dbname, rounds)
Exemple #10
0
    def __init__(self, dbname, rounds):
        gdb([dbname], "/home/mininet/ravel/sql_scripts/primitive.sql")
        Batch.__init__(self, dbname, rounds)

        remove_profile_schema(self.cur)