You need to do a factory reset on Huawei switch? Follow the steps below :
Delete configuration
reset saved-configuration
delete /unreserved "conf.zip"
reboot fast
Remove stack configuration
reset stack configuration
Remove password history
aaa
reset local-user password history record