Class: PortalFwifi_1
- Inherits:
-
Object
- Object
- PortalFwifi_1
- Defined in:
- lib/freewifi.rb
Instance Attribute Summary collapse
-
#additional_func_wifi_1 ⇒ Object
Returns the value of attribute additional_func_wifi_1.
-
#general_procedures ⇒ Object
Returns the value of attribute general_procedures.
-
#mongo_connector_wifi_1 ⇒ Object
Returns the value of attribute mongo_connector_wifi_1.
-
#mongo_database ⇒ Object
Returns the value of attribute mongo_database.
-
#mongo_ip ⇒ Object
Returns the value of attribute mongo_ip.
-
#mongo_port ⇒ Object
Returns the value of attribute mongo_port.
-
#mtik_control_ips_get ⇒ Object
Returns the value of attribute mtik_control_ips_get.
-
#mtik_password ⇒ Object
Returns the value of attribute mtik_password.
-
#mtik_user ⇒ Object
Returns the value of attribute mtik_user.
-
#telegram_api_url ⇒ Object
Returns the value of attribute telegram_api_url.
-
#telegram_chat_id ⇒ Object
Returns the value of attribute telegram_chat_id.
Instance Method Summary collapse
-
#initialize(apigw_wsdl, apigw_endpoint, apigw_namespace, apigw_wsse_aut_log, apigw_wsse_aut_pass, iwag1_host, iwag_username, iwag_password, mtik_control_ips_get, mtik_user, mtik_password, mongo_ip, mongo_port, mongo_database, hua_wlc_1_ip, hua_wlc_2_ip, hua_wlc_login, hua_wlc_password, telegram_api_url, telegram_chat_id, iwag2_host, iwag2_username, iwag2_password, iwag1_port = 22, iwag2_port = 22, protocol_mtik = 'api', mtik_capsman_list = ['172.24.247.15', '172.24.214.155', '172.24.214.140', '172.24.214.105', '172.24.223.105']) ⇒ PortalFwifi_1
constructor
A new instance of PortalFwifi_1.
- #wifi_get_subs_inf_ret_ssh_1(ipaddress, remote_ip, real_ip) ⇒ Object
- #wifi_get_subs_info_return_1(ipaddress, remote_ip, real_ip) ⇒ Object
Constructor Details
#initialize(apigw_wsdl, apigw_endpoint, apigw_namespace, apigw_wsse_aut_log, apigw_wsse_aut_pass, iwag1_host, iwag_username, iwag_password, mtik_control_ips_get, mtik_user, mtik_password, mongo_ip, mongo_port, mongo_database, hua_wlc_1_ip, hua_wlc_2_ip, hua_wlc_login, hua_wlc_password, telegram_api_url, telegram_chat_id, iwag2_host, iwag2_username, iwag2_password, iwag1_port = 22, iwag2_port = 22, protocol_mtik = 'api', mtik_capsman_list = ['172.24.247.15', '172.24.214.155', '172.24.214.140', '172.24.214.105', '172.24.223.105']) ⇒ PortalFwifi_1
Returns a new instance of PortalFwifi_1.
282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 |
# File 'lib/freewifi.rb', line 282 def initialize(apigw_wsdl, apigw_endpoint, apigw_namespace, apigw_wsse_aut_log, apigw_wsse_aut_pass, iwag1_host, iwag_username, iwag_password, mtik_control_ips_get, mtik_user, mtik_password, mongo_ip, mongo_port, mongo_database, hua_wlc_1_ip, hua_wlc_2_ip, hua_wlc_login, hua_wlc_password, telegram_api_url, telegram_chat_id, iwag2_host, iwag2_username, iwag2_password, iwag1_port=22, iwag2_port=22, protocol_mtik='api', mtik_capsman_list=['172.24.247.15', '172.24.214.155', '172.24.214.140', '172.24.214.105', '172.24.223.105'] ) @general_procedures = WiFiPortal_1.new(apigw_wsdl, apigw_endpoint, apigw_namespace, apigw_wsse_aut_log, apigw_wsse_aut_pass, iwag1_host, iwag_username, iwag_password, iwag1_port, mtik_control_ips_get, mtik_user, mtik_password, hua_wlc_1_ip, hua_wlc_2_ip, hua_wlc_login, hua_wlc_password, iwag2_host, iwag2_username, iwag2_password, iwag2_port, protocol_mtik, mtik_capsman_list ) @mtik_control_ips_get = mtik_control_ips_get @mtik_user = mtik_user @mtik_password = mtik_password @additional_func_wifi_1 = InternalFunc_1.new @telegram_api_url = telegram_api_url @telegram_chat_id = telegram_chat_id @mongo_ip = mongo_ip @mongo_port = mongo_port @mongo_database = mongo_database end |
Instance Attribute Details
#additional_func_wifi_1 ⇒ Object
Returns the value of attribute additional_func_wifi_1.
269 270 271 |
# File 'lib/freewifi.rb', line 269 def additional_func_wifi_1 @additional_func_wifi_1 end |
#general_procedures ⇒ Object
Returns the value of attribute general_procedures.
269 270 271 |
# File 'lib/freewifi.rb', line 269 def general_procedures @general_procedures end |
#mongo_connector_wifi_1 ⇒ Object
Returns the value of attribute mongo_connector_wifi_1.
269 270 271 |
# File 'lib/freewifi.rb', line 269 def mongo_connector_wifi_1 @mongo_connector_wifi_1 end |
#mongo_database ⇒ Object
Returns the value of attribute mongo_database.
269 270 271 |
# File 'lib/freewifi.rb', line 269 def mongo_database @mongo_database end |
#mongo_ip ⇒ Object
Returns the value of attribute mongo_ip.
269 270 271 |
# File 'lib/freewifi.rb', line 269 def mongo_ip @mongo_ip end |
#mongo_port ⇒ Object
Returns the value of attribute mongo_port.
269 270 271 |
# File 'lib/freewifi.rb', line 269 def mongo_port @mongo_port end |
#mtik_control_ips_get ⇒ Object
Returns the value of attribute mtik_control_ips_get.
269 270 271 |
# File 'lib/freewifi.rb', line 269 def mtik_control_ips_get @mtik_control_ips_get end |
#mtik_password ⇒ Object
Returns the value of attribute mtik_password.
269 270 271 |
# File 'lib/freewifi.rb', line 269 def mtik_password @mtik_password end |
#mtik_user ⇒ Object
Returns the value of attribute mtik_user.
269 270 271 |
# File 'lib/freewifi.rb', line 269 def mtik_user @mtik_user end |
#telegram_api_url ⇒ Object
Returns the value of attribute telegram_api_url.
269 270 271 |
# File 'lib/freewifi.rb', line 269 def telegram_api_url @telegram_api_url end |
#telegram_chat_id ⇒ Object
Returns the value of attribute telegram_chat_id.
269 270 271 |
# File 'lib/freewifi.rb', line 269 def telegram_chat_id @telegram_chat_id end |
Instance Method Details
#wifi_get_subs_inf_ret_ssh_1(ipaddress, remote_ip, real_ip) ⇒ Object
376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 |
# File 'lib/freewifi.rb', line 376 def wifi_get_subs_inf_ret_ssh_1(ipaddress, remote_ip, real_ip) input_params = {:ipaddress => ipaddress} output_params = {} subs_info_ret_1_thr1 = Thread.new do begin resp_procedure = general_procedures.get_subs_info_ret_ssh_1(ipaddress) output_params = resp_procedure rescue output_params = {:code => 507, :result => 'Unknown SDK error'} end end subs_info_ret_1_thr1.join subs_info_ret_1_thr2 = Thread.new do begin p "mongo" #mongo_connector_wifi_1 = MongoWifiCl_1.new(mongo_ip, mongo_port, mongo_database) #mongo_connector_wifi_1.audit_logger_wifi_portal_1("wifi_get_subs_info_return_1", remote_ip, input_params, output_params, real_ip) rescue additional_func_wifi_1.printer_texter_wifi_1({:input_params => input_params, :output_params => {:result => "mongo failed"}, :procedure => "wifi_get_subs_info_return_1", :file => 'freewifi.rb'}, "debug") additional_func_wifi_1.("{:function => \"wifi_get_subs_info_return_1\", :result => \"failed communicate with mongo database\", :sdk => \"freewifi\"}", telegram_api_url, telegram_chat_id) end end subs_info_ret_1_thr2.join output_params end |
#wifi_get_subs_info_return_1(ipaddress, remote_ip, real_ip) ⇒ Object
346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 |
# File 'lib/freewifi.rb', line 346 def wifi_get_subs_info_return_1(ipaddress, remote_ip, real_ip) input_params = {:ipaddress => ipaddress} output_params = {} subs_info_ret_1_thr1 = Thread.new do begin resp_procedure = general_procedures.get_subs_info_return_1(ipaddress) output_params = resp_procedure rescue output_params = {:code => 507, :result => 'Unknown SDK error'} end end subs_info_ret_1_thr1.join subs_info_ret_1_thr2 = Thread.new do begin p 'mongo' #mongo_connector_wifi_1 = MongoWifiCl_1.new(mongo_ip, mongo_port, mongo_database) #mongo_connector_wifi_1.audit_logger_wifi_portal_1("wifi_get_subs_info_return_1", remote_ip, input_params, output_params, real_ip) rescue additional_func_wifi_1.printer_texter_wifi_1({:input_params => input_params, :output_params => {:result => 'mongo failed'}, :procedure => 'wifi_get_subs_info_return_1', :file => 'freewifi.rb'}, 'debug') additional_func_wifi_1.("{:function => \"wifi_get_subs_info_return_1\", :result => \"failed communicate with mongo database\", :sdk => \"freewifi\"}", telegram_api_url, telegram_chat_id) end end subs_info_ret_1_thr2.join output_params end |