def nat(): '''Нет Port Forwarding''' '''Маска в другом формате''' return sh_200x_json()['data']['nat_enable'], \ sh_200x_json()['data']['nat_external_ip'], \ sh_200x_json()['data']['nat_internal_network'], \ cidr_to_netmask(sh_200x_json()['data']['nat_internal_mask'])
def dhcp(): return sh_200x_json()['data'][ip_prot.dhcp[0]], \ sh_200x_json()['data'][ip_prot.dhcp[1]], \ sh_200x_json()['data'][ip_prot.dhcp[2]], \ sh_200x_json()['data'][ip_prot.dhcp[3]], \ cidr_to_netmask(sh_200x_json()['data'][ip_prot.dhcp[4]]), \ sh_200x_json()['data'][ip_prot.dhcp[5]], \ sh_200x_json()['data'][ip_prot.dhcp[6]], \ str(sh_200x_json()['data'][ip_prot.dhcp[7]])
def test_tdma_acm(self): if sh_200x_json()['data'][rf_setup.tdma_acm[1]] == '1': lst = list(sh_200x_rf.tdma_acm()[2:14]) for i, v in enumerate(lst): if v != '0': lst[i] = '1' cn = sh_200x_rf.tdma_acm()[14] self.assertEqual( list(sh_200x_rf.tdma_acm()[0:2]) + lst + cn.split(), star_200x.tdma_acm()) else: self.assertEqual(list(sh_200x_rf.tdma_acm()), star_200x.tdma_acm())
def tdma_rf(): return sh_200x_json()['data'][rf_setup.tdma_rf[1]], \ sh_200x_json()['data'][rf_setup.tdma_rf[2]], \ sh_200x_json()['data'][rf_setup.tdma_rf[3]], \ sh_200x_json()['data'][rf_setup.tdma_rf[4]], \ sh_200x_json()['data'][rf_setup.tdma_rf[5]], \ sh_200x_json()['data'][rf_setup.tdma_rf[6]]
def id(): return sh_200x_json()['data'][basic.id[0]], \ sh_200x_json()['data'][basic.id[1]]
def values_(params): values = list() for param in params: values.append(sh_200x_json()['data'][param]) return values
def tdma_acm(): if sh_200x_json()['data'][rf_setup.tdma_acm[1]] == '1': return sh_200x_json()['data'][rf_setup.tdma_acm[0]], \ sh_200x_json()['data'][rf_setup.tdma_acm[1]], \ sh_200x_json()['data'][rf_setup.tdma_acm[2]][rf_setup.tdma_acm_modcod[0]], \ sh_200x_json()['data'][rf_setup.tdma_acm[2]][rf_setup.tdma_acm_modcod[1]], \ sh_200x_json()['data'][rf_setup.tdma_acm[2]][rf_setup.tdma_acm_modcod[2]], \ sh_200x_json()['data'][rf_setup.tdma_acm[2]][rf_setup.tdma_acm_modcod[3]], \ sh_200x_json()['data'][rf_setup.tdma_acm[2]][rf_setup.tdma_acm_modcod[4]], \ sh_200x_json()['data'][rf_setup.tdma_acm[2]][rf_setup.tdma_acm_modcod[5]], \ sh_200x_json()['data'][rf_setup.tdma_acm[2]][rf_setup.tdma_acm_modcod[6]], \ sh_200x_json()['data'][rf_setup.tdma_acm[2]][rf_setup.tdma_acm_modcod[7]], \ sh_200x_json()['data'][rf_setup.tdma_acm[2]][rf_setup.tdma_acm_modcod[8]], \ sh_200x_json()['data'][rf_setup.tdma_acm[2]][rf_setup.tdma_acm_modcod[9]], \ sh_200x_json()['data'][rf_setup.tdma_acm[2]][rf_setup.tdma_acm_modcod[10]], \ sh_200x_json()['data'][rf_setup.tdma_acm[2]][rf_setup.tdma_acm_modcod[11]], \ sh_200x_json()['data'][rf_setup.tdma_acm[3]] else: return sh_200x_json()['data'][rf_setup.tdma_acm[0]], \ sh_200x_json()['data'][rf_setup.tdma_acm[1]], \ sh_200x_json()['data'][rf_setup.tdma_acm[3]]