Fix issue when handling vif_type other than hostdev.

Move attributes specific to hostdev into hostdev clause.