#NEWLINE# def convert_vif_model( name ) : #NEWLINE# #INDENT# 'Converts standard VIF_MODEL types to the internal VMware ones.' #NEWLINE# if ( name == network_model . VIF_MODEL_E1000 ) : #NEWLINE# #INDENT# return 'VirtualE1000' #NEWLINE# #UNINDENT# if ( name == network_model . VIF_MODEL_E1000E ) : #NEWLINE# #INDENT# return 'VirtualE1000e' #NEWLINE# #UNINDENT# if ( name == network_model . VIF_MODEL_PCNET ) : #NEWLINE# #INDENT# return 'VirtualPCNet32' #NEWLINE# #UNINDENT# if ( name == network_model . VIF_MODEL_SRIOV ) : #NEWLINE# #INDENT# return 'VirtualSriovEthernetCard' #NEWLINE# #UNINDENT# if ( name == network_model . VIF_MODEL_VMXNET ) : #NEWLINE# #INDENT# return 'VirtualVmxnet' #NEWLINE# #UNINDENT# if ( name == network_model . VIF_MODEL_VMXNET3 ) : #NEWLINE# #INDENT# return 'VirtualVmxnet3' #NEWLINE# #UNINDENT# if ( name not in ALL_SUPPORTED_NETWORK_DEVICES ) : #NEWLINE# #INDENT# msg = ( _ ( '%s is not supported.' ) % name ) #NEWLINE# raise exception . Invalid ( msg ) #NEWLINE# #UNINDENT# return name