#!/usr/bin/python3
from tools.executor import Executor
from tools.dns import Dns
from toolInitializer import ToolInitializer 
from fwutech_enum import FwutechEnum

#taskName={
#          "taskName": "ros_download",
#          "server-code": "DUload_HTTP_Ros",
#          "taskPriority": 34,
#          "toolName": "httpUpDown",
#          "server-id": 3522,
#          "command": "download"
#        }
#taskName={
#          "toolName": "fping",
#          "command": "ping -q -c 10  -e -t 1000 -b 1400 8.8.8.8",
#          "taskName": "GW",
#          "taskPriority": 1
#        }
taskName={
         "taskPriority": 17,
         "toolName": "dns",
         "taskName": "DNS1",
         "command": "www.google.com @@addr"
       }
#taskName= {
#          "taskName": "ros_download",
#          "server-code": "DUload_HTTP_Ros",
#          "taskPriority": 34,
#          "toolName": "httpUpDown",
#          "server-id": 3522,
#          "command": "download"
#        }
#taskName= {
#          "url": "ftp://192.168.78.2/CentOS-8.2.2004-x86_64-dvd1.iso",
#          "country": "None",
#          "server-code": "Dload_FTP_SPT",
#          "taskPriority": 24,
#          "toolName": "ftpThroughput",
#          "host": "192.168.78.2",
#          "lon": 0,
#          "sponser": "self",
#          "password": "test",
#          "taskName": "speedTest",
#          "timeout": 15,
#          "username": "test",
#          "lat": 0,
#          "command": "download"
#        }
#taskName={
#          "url": "192.168.78.2",
#          "country": "None",
#          "server-code": "Upload_FTP_SPT",
#          "taskPriority": 24,
#          "toolName": "ftpThroughput",
#          "host": "speedtest.tele2.net",
#          "lon": 0,
#          "sponser": "speedtest",
#          "filename": "1000M",
#          "password": "test",
#          "taskName": "speedTest",
#          "timeout": 15,
#          "username": "test",
#          "lat": 0,
#          "command": "upload"
#         }
#taskName={
#           "command": "upload",
#           "taskPriority": 35,
#           "taskName": "upload",
#           "toolName": "httpUpDown",
#           "server_id":5656,
#           "server-code":"szaa"
#         }
#taskName={
#           "command": "https://www.linkedin.com",
#           "taskPriority": 25,
#           "taskName": "WS Linkedin",
#           "toolName": "webspeed",
#           "siteLocat": "noir"
#         }
#taskName={
#           "siteLocat": "noir",
#           "taskPriority": 19,
#           "toolName": "webspeed",
#           "taskName": "WS Instagram",
#           "command": "https://www.instagram.com/"
#         }
#taskName={
#           "command": "iperf3 -u -J -i 10 -c 127.0.0.1 -p 5201",
#           "taskPriority": 36,
#           "taskName": "udppacket",
#           "toolName": "udpTool",
#           "server": "iperf.eenet.ee",
#           "port": 5201
#         }
#taskName={
#           "command": "https://www.google.com",
#           "taskPriority": 36,
#           "taskName": "handshakeinfo",
#           "toolName": "sslHandshake"
#         }
#taskName={
#           "command": " -i 1 -V -b 1.4M ",
#           "taskPriority": 36,
#           "taskName": "udppacket",
#           "toolName": "udpTool",
#           "server": "192.168.15.85",
#           "port": 5201
#         }
#taskName={
#           "command": "download",
#           "taskPriority": 24,
#           "taskName": "speedTest",
#           "toolName": "ftpThroughput",
#           "timeout":15,
#           "username":"anonymous",
#           "password":"anonymous",
#           "url":"ftp://speedtest.tele2.net/1MB.zip"
#         }
#taskName={
#           "url": "speedtest.tele2.net/upload/",
#           "country": "None",
#           "server-code": "Upload_FTP_SPT",
#           "taskPriority": 24,
#           "toolName": "ftpThroughput",
#           "host": "speedtest.tele2.net",
#           "lon": 0,
#            "sponser": "speedtest",
#           "filename": "100M",
#           "password": "anonymous",
#           "taskName": "speedTest",
#           "timeout": 15,
#           "username": "anonymous",
#           "lat": 0,
#           "command": "upload"
#         }

# udpTool = HttpUpDown(taskName)
# sss = ToolInitializer()
# instances = sss.build('tools.dns', 'Dns', taskName)

instances = Dns(taskName)
instances.convetColonSytx(instances.executeTask())