Example #1
0
    def __init__(self, tenant, **kwargs):

        self.__lvap_addr = None
        self.__wtp_addrs = []
        self.idx = 0

        EmpowerApp.__init__(self, tenant, **kwargs)
Example #2
0
    def __init__(self, tenant, **kwargs):

        self.last = time.time()
        self.__polling = DEFAULT_POLLING
        self.filepath = "./",

        EmpowerApp.__init__(self, tenant, **kwargs)
Example #3
0
    def __init__(self, tenant, **kwargs):

        self.__lvap_addr = None
        self.__wtp_addrs = []
        self.idx = 0

        EmpowerApp.__init__(self, tenant, **kwargs)
Example #4
0
    def __init__(self, tenant, **kwargs):

        self.last = time.time()
        self.__polling = DEFAULT_POLLING
        self.filepath = "./",

        EmpowerApp.__init__(self, tenant, **kwargs)
Example #5
0
    def __init__(self, tenant, addrs, primary_link_dl, link_dl, rates, payload,
                 pk_rate, period):

        EmpowerApp.__init__(self, tenant, period)

        self.primary_link_dl = float(primary_link_dl)
        self.link_dl = float(link_dl)
        self.rates = [int(x) for x in rates.split(",")]
        self.payload = int(payload)
        self.pk_rate = int(pk_rate)
        self.addrs = addrs
        self.alpha = 0.6
        self.pkt_couters = {}
        self.unique = {}
        self.stats = {}
        self.period_us = 500000
        self.last_valid = {}
        self.suffix = "%0.2f_%0.2f_%s_%u_%u" % \
            (self.primary_link_dl,
             self.link_dl,
             "_".join([str(x) for x in self.rates]),
             self.payload,
             self.pk_rate)

        summary(lvaps=self.addrs,
                tenant_id=self.tenant.tenant_id,
                every=2000,
                rates=self.rates,
                callback=self.summary_callback)
Example #6
0
    def __init__(self, **kwargs):

        self.stats = {}
        self.prev_bins_tx = {}
        self.prev_bins_rx = {}
        self.power = {}
        self.created = datetime.now().strftime("%Y-%m-%dT%H:%M:%S.%fZ")
        self.updated = datetime.now().strftime("%Y-%m-%dT%H:%M:%S.%fZ")
        self.profile = None

        EmpowerApp.__init__(self, **kwargs)

        # load joule profile
        with open(os.path.expanduser(self.profile)) as json_data:
            self.profile = json.load(json_data)

        bins_with_eth = [x + 14 + 20 + 8 for x in self.profile['bins']]
        self.bins = sorted(bins_with_eth)

        # register a trigger of all lvaps, in this way as soon a new lvap
        # joins the pool this module will be promptly notified.
        self.lvapjoin(tenant_id=self.tenant.tenant_id,
                      callback=self.lvap_join_callback)

        self.last = time.time()
    def __init__(self, **kwargs):

        # Flag to enable or disable load balacing algorithm
        self.__load_balance = True
        # Source cell downlink utilization threshold in percentage
        self.__s_dl_thr = 10
        # Source cell uplink utilization threshold in percentage
        self.__s_ul_thr = 10
        # Target cell downlink utilization threshold in percentage
        self.__t_dl_thr = 30
        # Target cell downlink utilization threshold in percentage
        self.__t_ul_thr = 30
        # RSRQ threshold to be handed over to a cell
        self.__rsrq_thr = -20
        # Maximum number of handovers that can performed from a cell at
        # each evaluation period
        self.__max_ho_from = 1
        # Maximum number of handovers that can performed to a cell at
        # each evaluation period
        self.__max_ho_to = 1

        EmpowerApp.__init__(self, **kwargs)

        self.vbsup(callback=self.vbs_up_callback)
        self.uejoin(callback=self.ue_join_callback)
Example #8
0
    def __init__(self, tenant, **kwargs):

        self.stats = {}
        self.prev_bins_tx = {}
        self.prev_bins_rx = {}
        self.power = {}
        self.created = datetime.now().strftime("%Y-%m-%dT%H:%M:%S.%fZ")
        self.updated = datetime.now().strftime("%Y-%m-%dT%H:%M:%S.%fZ")
        self.profile = None

        EmpowerApp.__init__(self, tenant, **kwargs)

        # load joule profile
        with open(os.path.expanduser(self.profile)) as json_data:
            self.profile = json.load(json_data)

        bins_with_eth = [x + 14 + 20 + 8 for x in self.profile['bins']]
        self.bins = sorted(bins_with_eth)

        # register a trigger of all lvaps, in this way as soon a new lvap
        # joins the pool this module will be promptly notified.
        lvapjoin(tenant_id=self.tenant.tenant_id,
                 callback=self.lvap_join_callback)

        self.last = time.time()
Example #9
0
    def __init__(self, tenant, addrs, primary_link_dl,
                 link_dl, rates, payload, pk_rate, period):

        EmpowerApp.__init__(self, tenant, period)

        self.primary_link_dl = float(primary_link_dl)
        self.link_dl = float(link_dl)
        self.rates = [int(x) for x in rates.split(",")]
        self.payload = int(payload)
        self.pk_rate = int(pk_rate)
        self.addrs = addrs
        self.alpha = 0.6
        self.pkt_couters = {}
        self.unique = {}
        self.stats = {}
        self.period_us = 500000
        self.last_valid = {}
        self.suffix = "%0.2f_%0.2f_%s_%u_%u" % \
            (self.primary_link_dl,
             self.link_dl,
             "_".join([str(x) for x in self.rates]),
             self.payload,
             self.pk_rate)

        summary(lvaps=self.addrs,
                tenant_id=self.tenant.tenant_id,
                every=2000,
                rates=self.rates,
                callback=self.summary_callback)
Example #10
0
    def __init__(self, tenant, **kwargs):

        self.__addrs = EtherAddress(DEFAULT_ADDRS)
        self.conflicts = {'networks': [], 'stations': []}

        EmpowerApp.__init__(self, tenant, **kwargs)

        wtpup(tenant_id=self.tenant.tenant_id, callback=self.wtp_up_callback)
Example #11
0
    def __init__(self, tenant, **kwargs):

        self.__addrs = EtherAddress(DEFAULT_ADDRS)
        self.conflicts = {'networks': [], 'stations': []}

        EmpowerApp.__init__(self, tenant, **kwargs)

        wtpup(tenant_id=self.tenant.tenant_id, callback=self.wtp_up_callback)
    def __init__(self, **kwargs):
        self.__limit = DEFAULT_LIMIT
        EmpowerApp.__init__(self, **kwargs)

        # Register an wtp up event
        self.wtpup(callback=self.wtp_up_callback)

        # Register an lvap join event
        self.lvapjoin(callback=self.lvap_join_callback)
Example #13
0
    def __init__(self, **kwargs):
        self.__limit = DEFAULT_LIMIT
        EmpowerApp.__init__(self, **kwargs)

        # Register an wtp up event
        self.wtpup(callback=self.wtp_up_callback)

        # Register an lvap join event
        self.lvapjoin(callback=self.lvap_join_callback)
Example #14
0
    def __init__(self, tenant_id, period,server):

        EmpowerApp.__init__(self, tenant_id)        

        self._server=server
        self.i = 0
        self.wtp1 = None        
        self.scanreceived(callback=self.scanreceived_callback)
        self.wtpup(callback=self.wtp_up_callback)
Example #15
0
 def __init__(self, **kwargs):
     EmpowerApp.__init__(self, **kwargs)
     self.vbspup(callback=self.vbsp_up_callback)
     self.cppup(callback=self.cpp_up_callback)
     self.cppdown(callback=self.cpp_down_callback)
     self.wtpup(callback=self.wtp_up_callback)
     self.wtpdown(callback=self.wtp_down_callback)
     self.lvapjoin(callback=self.lvap_join_callback)
     self.lvapleave(callback=self.lvap_leave_callback)
     self.lvnfjoin(callback=self.lvnf_join_callback)
     self.lvnfleave(callback=self.lvnf_leave_callback)
Example #16
0
 def __init__(self, server, **kwargs):        
     EmpowerApp.__init__(self, **kwargs)
     self._server = server
     self.routers = []
     self.lvaps_cache = []        
     self.scanreceived(callback=self.scanreceived_callback)
     self.filename = 'scan_app.txt'
     with open(ALGORITHM_FILE, 'w') as algofile:
         algofile.write('---- SCAN_APP ----\n')
     with open(self.filename, 'w') as file_d:
         file_d.write('---- SCAN_APP ----\n')
Example #17
0
 def __init__(self, **kwargs):
     EmpowerApp.__init__(self, **kwargs)
     self.vbspup(callback=self.vbsp_up_callback)
     self.cppup(callback=self.cpp_up_callback)
     self.cppdown(callback=self.cpp_down_callback)
     self.wtpup(callback=self.wtp_up_callback)
     self.wtpdown(callback=self.wtp_down_callback)
     self.lvapjoin(callback=self.lvap_join_callback)
     self.lvapleave(callback=self.lvap_leave_callback)
     self.lvnfjoin(callback=self.lvnf_join_callback)
     self.lvnfleave(callback=self.lvnf_leave_callback)
    def __init__(self, tenant, **kwargs):

        self.__limit = DEFAULT_LIMIT

        EmpowerApp.__init__(self, tenant, **kwargs)

        # Register an RSSI trigger for all LVAPs
        rssi(lvaps="ff:ff:ff:ff:ff:ff",
             tenant_id=self.tenant.tenant_id,
             relation='LT',
             value=self.limit,
             callback=self.low_rssi)

        # Register an wtp up event
        wtpup(tenant_id=self.tenant.tenant_id, callback=self.wtp_up_callback)
    def __init__(self, **kwargs):

        EmpowerApp.__init__(self, **kwargs)
        self.graphData = {}

        self.vbses = []

        self.wtps = []
        self.wifi_data = {}

        self.coord = self.get_coordinates()

        self.vbsup(callback=self.vbs_up_callback)
        self.vbsdown(callback=self.vbs_down_callback)

        wtpup(tenant_id=self.tenant.tenant_id, callback=self.wtp_up_callback)
Example #20
0
    def __init__(self, tenant, **kwargs):

        EmpowerApp.__init__(self, tenant, **kwargs)

        cppup(tenant_id=self.tenant.tenant_id, callback=self.cpp_up_callback)

        cppdown(tenant_id=self.tenant.tenant_id,
                callback=self.cpp_down_callback)

        wtpup(tenant_id=self.tenant.tenant_id, callback=self.wtp_up_callback)

        wtpdown(tenant_id=self.tenant.tenant_id,
                callback=self.wtp_down_callback)

        lvapjoin(tenant_id=self.tenant.tenant_id,
                 callback=self.lvap_join_callback)

        lvapleave(tenant_id=self.tenant.tenant_id,
                  callback=self.lvap_leave_callback)
Example #21
0
    def __init__(self, tenant, **kwargs):

        EmpowerApp.__init__(self, tenant, **kwargs)

        cppup(tenant_id=self.tenant.tenant_id,
              callback=self.cpp_up_callback)

        cppdown(tenant_id=self.tenant.tenant_id,
                callback=self.cpp_down_callback)

        wtpup(tenant_id=self.tenant.tenant_id,
              callback=self.wtp_up_callback)

        wtpdown(tenant_id=self.tenant.tenant_id,
                callback=self.wtp_down_callback)

        lvapjoin(tenant_id=self.tenant.tenant_id,
                 callback=self.lvap_join_callback)

        lvapleave(tenant_id=self.tenant.tenant_id,
                  callback=self.lvap_leave_callback)
Example #22
0
    def __init__(self, **kwargs):

        EmpowerApp.__init__(self, **kwargs)

        self.graphData = {}
        self.wifi_data = {}

        # List of VBSes active
        self.vbses = []
        # List of WTPs active
        self.wtps = []

        # Populate exsiting VBSes
        for vbs in self.tenant.vbses.values():
            if vbs.connection:
                self.vbses.append(vbs)

        # Populate exsiting WTPs and trigger UCQM for existing WTPs
        for wtp in self.tenant.wtps.values():
            if wtp.connection:
                self.wtps.append(wtp.addr.to_str())

                for block in wtp.supports:
                    ucqm(block=block,
                         tenant_id=self.tenant.tenant_id,
                         every=5000,
                         callback=self.ucqm_callback)

        # Generating inital coordinates for the graph nodes
        self.coord = self.get_coordinates()

        vbsup(tenant_id=self.tenant.tenant_id, callback=self.vbs_up_callback)
        vbsdown(tenant_id=self.tenant.tenant_id, callback=self.vbs_down_callback)

        uejoin(tenant_id=self.tenant.tenant_id, callback=self.ue_join_callback)
        ueleave(tenant_id=self.tenant.tenant_id, callback=self.ue_leave_callback)

        wtpup(tenant_id=self.tenant.tenant_id, callback=self.wtp_up_callback)
        wtpdown(tenant_id=self.tenant.tenant_id, callback=self.wtp_up_callback)
Example #23
0
    def __init__(self, **kwargs):

        EmpowerApp.__init__(self, **kwargs)

        self.graphData = {}
        self.wifi_data = {}

        # List of VBSes active
        self.vbses = []
        # List of WTPs active
        self.wtps = []

        # Populate existing VBSes
        for vbs in self.tenant.vbses.values():
            if vbs.connection:
                self.vbses.append(vbs)

        # Populate existing WTPs and trigger UCQM for existing WTPs
        for wtp in self.tenant.wtps.values():
            if wtp.connection:
                self.wtps.append(wtp)

                for block in wtp.supports:
                    ucqm(block=block,
                         tenant_id=self.tenant.tenant_id,
                         every=5000,
                         callback=self.ucqm_callback)

        # Generating inital coordinates for the graph nodes
        self.coord = self.get_coordinates()

        vbsup(tenant_id=self.tenant.tenant_id, callback=self.vbs_up_callback)
        vbsdown(tenant_id=self.tenant.tenant_id,
                callback=self.vbs_down_callback)

        wtpup(tenant_id=self.tenant.tenant_id, callback=self.wtp_up_callback)
        wtpdown(tenant_id=self.tenant.tenant_id, callback=self.wtp_up_callback)
Example #24
0
 def __init__(self, **kwargs):
     EmpowerApp.__init__(self, **kwargs)
     self.filepath = "./"
Example #25
0
 def __init__(self, **kwargs):
     self.__idle_cycles = {}
     EmpowerApp.__init__(self, **kwargs)
Example #26
0
 def __init__(self, **kwargs):
     self.__addr = None
     EmpowerApp.__init__(self, **kwargs)
     self.links = {}
     self.wtpup(callback=self.wtp_up_callback)
Example #27
0
 def __init__(self, **kwargs):
     self.__addrs = None
     EmpowerApp.__init__(self, **kwargs)
     wtpup(tenant_id=self.tenant.tenant_id, callback=self.wtp_up_callback)
 def __init__(self, **kwargs):
     EmpowerApp.__init__(self, **kwargs)
     self.lvapjoin(callback=self.lvap_join_callback)
Example #29
0
 def __init__(self, **kwargs):
     self.__lvap_addr = None
     EmpowerApp.__init__(self, **kwargs)
Example #30
0
    def __init__(self, **kwargs):
        EmpowerApp.__init__(self, **kwargs)

        # Register an wtp up event
        self.wtpup(callback=self.wtp_up_callback)
Example #31
0
 def __init__(self, **kwargs):
     self.__addrs = None
     EmpowerApp.__init__(self, **kwargs)
     self.wtpup(callback=self.wtp_up_callback)
 def __init__(self, **kwargs):
     EmpowerApp.__init__(self, **kwargs)
     self.conflicts = {'networks': [], 'stations': []}
     self.wtpup(callback=self.wtp_up_callback)
Example #33
0
 def __init__(self, **kwargs):
     self.__idle_cycles = {}
     EmpowerApp.__init__(self, **kwargs)
 def __init__(self, **kwargs):
     EmpowerApp.__init__(self, **kwargs)
     self.cppup(callback=self.cpp_up_callback)
     self.lvnfjoin(callback=self.lvnf_join_callback)
     self.lvnfleave(callback=self.lvnf_leave_callback)
Example #35
0
    def __init__(self, tenant, **kwargs):

        self.__max_lvaps_per_wtp = 2
        self.idle_cycles = {}

        EmpowerApp.__init__(self, tenant, **kwargs)
Example #36
0
    def __init__(self, tenant, **kwargs):

        EmpowerApp.__init__(self, tenant, **kwargs)
 def __init__(self, **kwargs):
     EmpowerApp.__init__(self, **kwargs)
     self.lvapjoin(callback=self.lvap_join_callback)
Example #38
0
 def __init__(self, **kwargs):
     EmpowerApp.__init__(self, **kwargs)
     self.conflicts = {'networks': [], 'stations': []}
     self.wtpup(callback=self.wtp_up_callback)
Example #39
0
 def __init__(self, **kwargs):
     EmpowerApp.__init__(self, **kwargs)
     self.filename = "./powertracker.csv"
Example #40
0
 def __init__(self, **kwargs):
     EmpowerApp.__init__(self, **kwargs)
     self.cppup(callback=self.cpp_up_callback)
     self.wtpup(callback=self.wtp_up_callback)
     self.lvnfjoin(callback=self.lvnf_join_callback)
     self.lvnf = None
Example #41
0
    def __init__(self, tenant, **kwargs):

        self.filename = "./powertracker.csv"
        EmpowerApp.__init__(self, tenant, **kwargs)
Example #42
0
 def __init__(self, **kwargs):
     EmpowerApp.__init__(self, **kwargs)
     self.filepath = "./"
Example #43
0
 def __init__(self, server, **kwargs):        
     EmpowerApp.__init__(self, **kwargs)
     self._server = server
     self.scanreceived(callback=self.scanreceived_callback)
Example #44
0
 def __init__(self, **kwargs):
     EmpowerApp.__init__(self, **kwargs)
     self.uejoin(callback=self.ue_join_callback)
     self.wtpup(callback=self.wtp_up_callback)
     self.lvapjoin(callback=self.lvap_join_callback)
Example #45
0
 def __init__(self, **kwargs):
     EmpowerApp.__init__(self, **kwargs)
     self.wtpup(callback=self.wtp_up_callback)
 def __init__(self, **kwargs):
     EmpowerApp.__init__(self, **kwargs)
     self.filename = "./powertracker.csv"
 def __init__(self, **kwargs):
     EmpowerApp.__init__(self, **kwargs)
Example #48
0
    def __init__(self, tenant, **kwargs):

        self.filename = "./powertracker.csv"
        EmpowerApp.__init__(self, tenant, **kwargs)