Commit faaadace by Sunil Kumar Veerappa

Changes done in FPGA reprogram code

parent af191eab
......@@ -55,8 +55,8 @@ class M2DCFPGADriver(FPGADriver):
device_details = Device.get_by_id(self, device_id)
LOG.error("board ip is " + str(device_details.std_board_info))
SSH_USERNAME = "rahul"
SSH_COMMAND = "cat " + image
SSH_USERNAME = "root"
SSH_COMMAND = "aocl program " + image
#paramiko.Transport._preferred_ciphers = ('aes256-ctr',)
......
......@@ -115,12 +115,12 @@ def _generate_controlpath_id(item):
return driver_cpid
def _generate_driver_device(item,device_data):
def _generate_driver_device(item,ip_item, device_data):
driver_device_obj = driver_device.DriverDevice()
driver_device_obj.vendor = "stratix 10 "+device_data["vendorName"]
driver_device_obj.model = device_data["physicalName"]
driver_device_obj.std_board_info = device_data["deviceName"]
driver_device_obj.vendor_board_info = device_data["vendorName"]
driver_device_obj.std_board_info = ip_item
driver_device_obj.vendor_board_info = device_data["deviceName"]
driver_device_obj.type = constants.DEVICE_FPGA
driver_device_obj.controlpath_id = _generate_controlpath_id(item)
driver_device_obj.deployable_list = _generate_dep_list(item)
......@@ -170,26 +170,24 @@ def discover_boards():
# out, err = p.communicate()
# for ssh using ip
SSH_USERNAME = "rahul"
SSH_COMMAND = "cat board.txt"
SSH_USERNAME = "root"
SSH_COMMAND = "aocl diagnose"
ssh = paramiko.SSHClient()
ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy())
ssh_stdin = ssh_stdout = ssh_stderr = None
ip = "192.168.2.159"
try:
ssh.connect(ip, username=SSH_USERNAME)
ssh.connect(ip_item, username=SSH_USERNAME)
ssh_stdin, ssh_stdout, ssh_stderr = ssh.exec_command(SSH_COMMAND)
except Exception as e:
sys.stderr.write("SSH connection error: {0}".format(e))
if ssh_stdout:
data_1 = str(ssh_stdout.read())
print("I am here : " + data_1)
print("ssh output " + data_1)
ssh.close()
device_data = extractData(Data)
print("Hello ")
devs.append(_generate_driver_device(item,device_data))
devs.append(_generate_driver_device(item, ip_item, device_data))
return devs
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment