finish OTHER_OPTIONS in webservice and config(s).py
This commit is contained in:
parent
88d4447bae
commit
6541aa61b6
14
config.py
14
config.py
@ -203,11 +203,13 @@ def build_config(_config_file):
|
||||
'SOFTWARE_ID': bytes(config.get(section, 'SOFTWARE_ID').ljust(40)[:40], 'utf-8'),
|
||||
'PACKAGE_ID': bytes(config.get(section, 'PACKAGE_ID').ljust(40)[:40], 'utf-8'),
|
||||
'GROUP_HANGTIME': config.getint(section, 'GROUP_HANGTIME'),
|
||||
'OPTIONS': b''.join([b'Type=HBlink;', bytes(config.get(section, 'OPTIONS'), 'utf-8')]),
|
||||
'OPTIONS': b''.join([b'Type=HBNet;', bytes(config.get(section, 'OPTIONS'), 'utf-8')]),
|
||||
'USE_ACL': config.getboolean(section, 'USE_ACL'),
|
||||
'SUB_ACL': config.get(section, 'SUB_ACL'),
|
||||
'TG1_ACL': config.get(section, 'TGID_TS1_ACL'),
|
||||
'TG2_ACL': config.get(section, 'TGID_TS2_ACL')
|
||||
'TG2_ACL': config.get(section, 'TGID_TS2_ACL'),
|
||||
'OTHER_OPTIONS': config.get(section, 'OTHER_OPTIONS'),
|
||||
|
||||
}})
|
||||
CONFIG['SYSTEMS'][section].update({'STATS': {
|
||||
'CONNECTION': 'NO', # NO, RTPL_SENT, AUTHENTICATED, CONFIG-SENT, YES
|
||||
@ -253,7 +255,9 @@ def build_config(_config_file):
|
||||
'USE_ACL': config.getboolean(section, 'USE_ACL'),
|
||||
'SUB_ACL': config.get(section, 'SUB_ACL'),
|
||||
'TG1_ACL': config.get(section, 'TGID_TS1_ACL'),
|
||||
'TG2_ACL': config.get(section, 'TGID_TS2_ACL')
|
||||
'TG2_ACL': config.get(section, 'TGID_TS2_ACL'),
|
||||
'OTHER_OPTIONS': config.get(section, 'OTHER_OPTIONS'),
|
||||
|
||||
}})
|
||||
CONFIG['SYSTEMS'][section].update({'XLXSTATS': {
|
||||
'CONNECTION': 'NO', # NO, RTPL_SENT, AUTHENTICATED, CONFIG-SENT, YES
|
||||
@ -281,7 +285,8 @@ def build_config(_config_file):
|
||||
'REG_ACL': config.get(section, 'REG_ACL'),
|
||||
'SUB_ACL': config.get(section, 'SUB_ACL'),
|
||||
'TG1_ACL': config.get(section, 'TGID_TS1_ACL'),
|
||||
'TG2_ACL': config.get(section, 'TGID_TS2_ACL')
|
||||
'TG2_ACL': config.get(section, 'TGID_TS2_ACL'),
|
||||
'OTHER_OPTIONS': config.get(section, 'OTHER_OPTIONS'),
|
||||
}})
|
||||
CONFIG['SYSTEMS'][section].update({'PEERS': {}})
|
||||
|
||||
@ -322,6 +327,7 @@ def build_config(_config_file):
|
||||
'SUB_ACL': config.get(section, 'SUB_ACL'),
|
||||
'TG1_ACL': config.get(section, 'TG1_ACL'),
|
||||
'TG2_ACL': config.get(section, 'TG2_ACL'),
|
||||
'OTHER_OPTIONS': config.get(section, 'OTHER_OPTIONS'),
|
||||
}})
|
||||
CONFIG['SYSTEMS'][section].update({'PEERS': {}})
|
||||
|
||||
|
@ -1167,6 +1167,15 @@ def data_received(self, _peer_id, _rf_src, _dst_id, _seq, _slot, _call_type, _fr
|
||||
|
||||
######
|
||||
|
||||
# Send data to all OBP connections that have an encryption key. Data such as subscribers are sent to other HBNet servers.
|
||||
def svrd_send_all(_svrd_data):
|
||||
_svrd_packet = SVRD
|
||||
for system in CONFIG['SYSTEMS']:
|
||||
if CONFIG['SYSTEMS'][system]['ENABLED']:
|
||||
if CONFIG['SYSTEMS'][system]['MODE'] == 'OPENBRIDGE':
|
||||
if CONFIG['SYSTEMS'][system]['ENCRYPTION_KEY'] != b'':
|
||||
systems[system].send_system(_svrd_packet + _svrd_data)
|
||||
|
||||
def rule_timer_loop():
|
||||
global UNIT_MAP
|
||||
logger.debug('(ROUTER) routerHBP Rule timer loop started')
|
||||
|
@ -160,19 +160,7 @@ def build_config(_config_file):
|
||||
'THIS_SERVER_NAME': config.get(section, 'THIS_SERVER_NAME'),
|
||||
'URL': config.get(section, 'URL'),
|
||||
'REMOTE_CONFIG_ENABLED': config.getboolean(section, 'REMOTE_CONFIG_ENABLED'),
|
||||
'APPEND_INT': config.getint(section, 'APPEND_INT'),
|
||||
'EXTRA_INT_1': config.getint(section, 'EXTRA_INT_1'),
|
||||
'EXTRA_INT_2': config.getint(section, 'EXTRA_INT_2'),
|
||||
'EXTRA_1': config.get(section, 'EXTRA_1'),
|
||||
'EXTRA_2': config.get(section, 'EXTRA_2'),
|
||||
'SHARED_SECRET': config.get(section, 'SHARED_SECRET'),
|
||||
'SHORTEN_PASSPHRASE': config.getboolean(section, 'SHORTEN_PASSPHRASE'),
|
||||
'SHORTEN_SAMPLE': config.get(section, 'SHORTEN_SAMPLE'),
|
||||
'SHORTEN_LENGTH': config.get(section, 'SHORTEN_LENGTH'),
|
||||
'BURN_FILE': config.get(section, 'BURN_FILE'),
|
||||
'BURN_INT': config.getint(section, 'BURN_INT'),
|
||||
|
||||
|
||||
})
|
||||
|
||||
elif section == 'DATA_CONFIG':
|
||||
@ -250,7 +238,8 @@ def build_config(_config_file):
|
||||
'USE_ACL': config.getboolean(section, 'USE_ACL'),
|
||||
'SUB_ACL': config.get(section, 'SUB_ACL'),
|
||||
'TG1_ACL': config.get(section, 'TGID_TS1_ACL'),
|
||||
'TG2_ACL': config.get(section, 'TGID_TS2_ACL')
|
||||
'TG2_ACL': config.get(section, 'TGID_TS2_ACL'),
|
||||
'OTHER_OPTIONS': config.get(section, 'OTHER_OPTIONS'),
|
||||
}})
|
||||
CONFIG['SYSTEMS'][section].update({'STATS': {
|
||||
'CONNECTION': 'NO', # NO, RTPL_SENT, AUTHENTICATED, CONFIG-SENT, YES
|
||||
@ -296,7 +285,8 @@ def build_config(_config_file):
|
||||
'USE_ACL': config.getboolean(section, 'USE_ACL'),
|
||||
'SUB_ACL': config.get(section, 'SUB_ACL'),
|
||||
'TG1_ACL': config.get(section, 'TGID_TS1_ACL'),
|
||||
'TG2_ACL': config.get(section, 'TGID_TS2_ACL')
|
||||
'TG2_ACL': config.get(section, 'TGID_TS2_ACL'),
|
||||
'OTHER_OPTIONS': config.get(section, 'OTHER_OPTIONS'),
|
||||
}})
|
||||
CONFIG['SYSTEMS'][section].update({'XLXSTATS': {
|
||||
'CONNECTION': 'NO', # NO, RTPL_SENT, AUTHENTICATED, CONFIG-SENT, YES
|
||||
@ -324,7 +314,8 @@ def build_config(_config_file):
|
||||
'REG_ACL': config.get(section, 'REG_ACL'),
|
||||
'SUB_ACL': config.get(section, 'SUB_ACL'),
|
||||
'TG1_ACL': config.get(section, 'TGID_TS1_ACL'),
|
||||
'TG2_ACL': config.get(section, 'TGID_TS2_ACL')
|
||||
'TG2_ACL': config.get(section, 'TGID_TS2_ACL'),
|
||||
'OTHER_OPTIONS': config.get(section, 'OTHER_OPTIONS'),
|
||||
}})
|
||||
CONFIG['SYSTEMS'][section].update({'PEERS': {}})
|
||||
|
||||
@ -346,6 +337,7 @@ def build_config(_config_file):
|
||||
'TG2_ACL': 'PERMIT:ALL',
|
||||
'USE_ENCRYPTION': config.getboolean(section, 'USE_ENCRYPTION'),
|
||||
'ENCRYPTION_KEY': bytes(config.get(section, 'ENCRYPTION_KEY'), 'utf-8'),
|
||||
'OTHER_OPTIONS': config.get(section, 'OTHER_OPTIONS'),
|
||||
}})
|
||||
elif config.get(section, 'MODE') == 'PROXY':
|
||||
CONFIG['SYSTEMS'].update({section: {
|
||||
@ -364,6 +356,7 @@ def build_config(_config_file):
|
||||
'SUB_ACL': config.get(section, 'SUB_ACL'),
|
||||
'TG1_ACL': config.get(section, 'TG1_ACL'),
|
||||
'TG2_ACL': config.get(section, 'TG2_ACL'),
|
||||
'OTHER_OPTIONS': config.get(section, 'OTHER_OPTIONS'),
|
||||
}})
|
||||
CONFIG['SYSTEMS'][section].update({'PEERS': {}})
|
||||
|
||||
|
12
web/app.py
12
web/app.py
@ -2361,7 +2361,8 @@ TG #: <strong> ''' + str(tg_d.tg) + '''</strong>
|
||||
'USE_ACL': i.use_acl,
|
||||
'SUB_ACL': i.sub_acl,
|
||||
'TG1_ACL': i.tg1_acl,
|
||||
'TG2_ACL': i.tg2_acl
|
||||
'TG2_ACL': i.tg2_acl,
|
||||
'OTHER_OPTIONS': i.other_options
|
||||
}})
|
||||
for i in xlx_pl:
|
||||
peer_config_list.update({i.name: {
|
||||
@ -2395,7 +2396,8 @@ TG #: <strong> ''' + str(tg_d.tg) + '''</strong>
|
||||
'USE_ACL': i.use_acl,
|
||||
'SUB_ACL': i.sub_acl,
|
||||
'TG1_ACL': i.tg1_acl,
|
||||
'TG2_ACL': i.tg2_acl
|
||||
'TG2_ACL': i.tg2_acl,
|
||||
'OTHER_OPTIONS': i.other_options
|
||||
}})
|
||||
#### print('peers')
|
||||
## print('----------------')
|
||||
@ -2779,7 +2781,8 @@ TG #: <strong> ''' + str(tg_d.tg) + '''</strong>
|
||||
'REG_ACL': m.reg_acl,
|
||||
'SUB_ACL': m.sub_acl,
|
||||
'TG1_ACL': m.tg1_acl,
|
||||
'TG2_ACL': m.tg2_acl
|
||||
'TG2_ACL': m.tg2_acl,
|
||||
'OTHER_OPTIONS': m.other_options
|
||||
}})
|
||||
master_config_list[m.name].update({'PEERS': {}})
|
||||
for obp in o:
|
||||
@ -2820,7 +2823,8 @@ TG #: <strong> ''' + str(tg_d.tg) + '''</strong>
|
||||
'REG_ACL': pr.reg_acl,
|
||||
'SUB_ACL': pr.sub_acl,
|
||||
'TG1_ACL': pr.tg1_acl,
|
||||
'TG2_ACL': pr.tg2_acl
|
||||
'TG2_ACL': pr.tg2_acl,
|
||||
'OTHER_OPTIONS': pr.other_options
|
||||
}})
|
||||
master_config_list[pr.name].update({'PEERS': {}})
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user