[PATCH 1/2] virDomainDeviceDefParse: Separate code for parsing type