def get_network_attach_config_spec(client_factory, vif_info, index, vif_limits=None):
 config_spec = client_factory.create('ns0:VirtualMachineConfigSpec')
 vif_spec = _create_vif_spec(client_factory, vif_info, vif_limits)
 config_spec.deviceChange = [vif_spec]
 if (vif_info['iface_id'] is not None):
  config_spec.extraConfig = [_iface_id_option_value(client_factory, vif_info['iface_id'], index)]
 return config_spec

def get_network_attach_config_spec ( client_factory , vif_info , index , vif_limits = None ) : config_spec = client_factory . create ( 'ns0:VirtualMachineConfigSpec' ) vif_spec = _create_vif_spec ( client_factory , vif_info , vif_limits ) config_spec . deviceChange = [ vif_spec ] if ( vif_info [ 'iface_id' ] is not None ) : config_spec . extraConfig = [ _iface_id_option_value ( client_factory , vif_info [ 'iface_id' ] , index ) ] return config_spec
builds the vif attach config spec .