1 class ContainerRequest < ArvadosModel
4 include CommonApiTemplate
6 serialize :properties, Hash
7 serialize :environment, Hash
8 serialize :mounts, Hash
9 serialize :runtime_constraints, Hash
10 serialize :command, Array
12 before_create :set_state_before_save
14 api_accessible :user, extend: :common do |t|
16 t.add :container_count_max
17 t.add :container_image
29 t.add :requesting_container_uuid
30 t.add :runtime_constraints
34 # Supported states for a container request
37 (Uncommitted = 'Uncommitted'),
38 (Committed = 'Committed'),
42 def set_state_before_save
43 self.state ||= Uncommitted