Skip to content

Commit

Permalink
[mellanox] Remove validation for fw filenames with no extension (#8956)
Browse files Browse the repository at this point in the history
Why I did it
Currently the mellanox platform API is validating the file extensions of firmware packages to be installed for basic sanity checking. However, ONIE packages do not have an extension and as such if there is a "." in the name it is taken to be an extension and then fails the sanity check.

How I did it
I removed the check which ensures that ONIE images don't have a file extension.

How to verify it
Name the ONIE updater file 2021.onie and attempt to install it via fwutil install fw 2021.onie --yes
  • Loading branch information
alexrallen authored Oct 15, 2021
1 parent cefb9c1 commit e6e6f41
Showing 1 changed file with 0 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -405,10 +405,6 @@ def _check_file_validity(self, image_path):
if name_list[1] != self.image_ext_name:
print("ERROR: Extend name of file {} is wrong. Image for {} should have extend name {}".format(image_path, self.name, self.image_ext_name))
return False
else:
if name_list[1]:
print("ERROR: Extend name of file {} is wrong. Image for {} shouldn't have extension".format(image_path, self.name))
return False

return True

Expand Down

0 comments on commit e6e6f41

Please sign in to comment.