def nova_to_osvif_instance(instance):
 info = objects.instance_info.InstanceInfo(uuid=instance.uuid, name=instance.name)
 if (instance.obj_attr_is_set('project_id') and (instance.project_id is not None)):
  info.project_id = instance.project_id
 return info

def nova_to_osvif_instance ( instance ) : info = objects . instance_info . InstanceInfo ( uuid = instance . uuid , name = instance . name ) if ( instance . obj_attr_is_set ( 'project_id' ) and ( instance . project_id is not None ) ) : info . project_id = instance . project_id return info
convert a nova instance object to an os-vif instance object .