6277: add default_empty_manifest before_validation filter and update the tests accord...
[arvados.git] / services / api / app / models / pipeline_instance.rb
index 752391862a3d2e25c9cfe26a85913496bd5145a6..77a0736b000d669d298abc93ad95d12417e8a3d1 100644 (file)
@@ -15,13 +15,12 @@ class PipelineInstance < ArvadosModel
 
   api_accessible :user, extend: :common do |t|
     t.add :pipeline_template_uuid
-    t.add :pipeline_template, :if => :pipeline_template
     t.add :name
     t.add :components
-    t.add :dependencies
     t.add :properties
     t.add :state
     t.add :components_summary
+    t.add :description
     t.add :started_at
     t.add :finished_at
   end
@@ -38,10 +37,6 @@ class PipelineInstance < ArvadosModel
      (Complete = 'Complete'),
     ]
 
-  def dependencies
-    dependency_search(self.components).keys
-  end
-
   # if all components have input, the pipeline is Ready
   def components_look_ready?
     if !self.components || self.components.empty?
@@ -117,30 +112,6 @@ class PipelineInstance < ArvadosModel
     end
   end
 
-  def dependency_search(haystack)
-    if haystack.is_a? String
-      if (re = haystack.match /^([0-9a-f]{32}(\+[^,]+)*)+/)
-        {re[1] => true}
-      else
-        {}
-      end
-    elsif haystack.is_a? Array
-      deps = {}
-      haystack.each do |value|
-        deps.merge! dependency_search(value)
-      end
-      deps
-    elsif haystack.respond_to? :keys
-      deps = {}
-      haystack.each do |key, value|
-        deps.merge! dependency_search(value)
-      end
-      deps
-    else
-      {}
-    end
-  end
-
   def verify_status
     changed_attributes = self.changed