Class: EzuevFun_2
- Inherits:
-
Object
- Object
- EzuevFun_2
- Defined in:
- lib/imperituroard/projects/autovpn/functions_ezuev.rb
Instance Method Summary collapse
Instance Method Details
#vpn_create_client ⇒ Object
7 8 9 10 11 12 13 |
# File 'lib/imperituroard/projects/autovpn/functions_ezuev.rb', line 7 def vpn_create_client command = "/usr/bin/python3.6 /projects/vpn_test/methods/create_client.py '{\"unp\": \"\", \"company_name\": \"MinskTrans\", \"full_name\":\"MinskTransTest\", \"info\": \"NewYork\", \"profile\": \"IoT\", \"net_type\": \"static\", \"number_sims\": 1024, \"msisdns\": [37529, 37528]}'" Net::SSH.start(Imperituroard::AUTOVPN_SERVER_IP, Imperituroard::AUTOVPN_SERVER_USERNAME, :password => "3g8Yh2Sl7Vz9Nbd358") do |ssh| result = ssh.exec!(command) p result end end |
#vpn_update_client ⇒ Object
15 16 17 18 19 20 21 |
# File 'lib/imperituroard/projects/autovpn/functions_ezuev.rb', line 15 def vpn_update_client command = "/usr/bin/python3.6 /projects/vpn_test/methods/update_client.py '{\"unp\": \"\", \"old_company_name\": \"MinskTrans\", \"new_company_name\": \"MinskTrans1\", \"new_full_name\": \"MinskTransTest1\", \"new_address\": \"NewYork\", \"new_contact_name\": \"1\", \"new_contact_number\": \"1\"}'" Net::SSH.start(Imperituroard::AUTOVPN_SERVER_IP, Imperituroard::AUTOVPN_SERVER_USERNAME, :password => '3g8Yh2Sl7Vz9Nbd358') do |ssh| result = ssh.exec!(command) p result end end |