airavata 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (82) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +15 -0
  3. data/.rspec +3 -0
  4. data/.travis.yml +6 -0
  5. data/CODE_OF_CONDUCT.md +74 -0
  6. data/Gemfile +11 -0
  7. data/README.md +61 -0
  8. data/Rakefile +6 -0
  9. data/airavata.gemspec +26 -0
  10. data/bin/console +14 -0
  11. data/bin/setup +8 -0
  12. data/lib/account_provisioning_model_constants.rb +9 -0
  13. data/lib/account_provisioning_model_types.rb +69 -0
  14. data/lib/airavata.rb +15774 -0
  15. data/lib/airavata_api_constants.rb +11 -0
  16. data/lib/airavata_api_types.rb +34 -0
  17. data/lib/airavata_commons_constants.rb +11 -0
  18. data/lib/airavata_commons_types.rb +79 -0
  19. data/lib/airavata_data_models_constants.rb +9 -0
  20. data/lib/airavata_data_models_types.rb +28 -0
  21. data/lib/airavata_errors_constants.rb +9 -0
  22. data/lib/airavata_errors_types.rb +317 -0
  23. data/lib/airavata_workflow_model_constants.rb +9 -0
  24. data/lib/airavata_workflow_model_types.rb +335 -0
  25. data/lib/application_deployment_model_constants.rb +9 -0
  26. data/lib/application_deployment_model_types.rb +186 -0
  27. data/lib/application_interface_model_constants.rb +9 -0
  28. data/lib/application_interface_model_types.rb +54 -0
  29. data/lib/application_io_models_constants.rb +9 -0
  30. data/lib/application_io_models_types.rb +160 -0
  31. data/lib/base_a_p_i.rb +77 -0
  32. data/lib/base_api_constants.rb +9 -0
  33. data/lib/base_api_types.rb +8 -0
  34. data/lib/compute_resource_model_constants.rb +9 -0
  35. data/lib/compute_resource_model_types.rb +470 -0
  36. data/lib/credential_store_data_models_constants.rb +11 -0
  37. data/lib/credential_store_data_models_types.rb +172 -0
  38. data/lib/data_movement_models_constants.rb +9 -0
  39. data/lib/data_movement_models_types.rb +199 -0
  40. data/lib/db_event_model_constants.rb +9 -0
  41. data/lib/db_event_model_types.rb +155 -0
  42. data/lib/experiment_model_constants.rb +9 -0
  43. data/lib/experiment_model_types.rb +246 -0
  44. data/lib/gateway_groups_model_constants.rb +9 -0
  45. data/lib/gateway_groups_model_types.rb +34 -0
  46. data/lib/gateway_resource_profile_model_constants.rb +9 -0
  47. data/lib/gateway_resource_profile_model_types.rb +165 -0
  48. data/lib/group_manager_model_constants.rb +9 -0
  49. data/lib/group_manager_model_types.rb +58 -0
  50. data/lib/group_resource_profile_model_constants.rb +9 -0
  51. data/lib/group_resource_profile_model_types.rb +230 -0
  52. data/lib/job_model_constants.rb +9 -0
  53. data/lib/job_model_types.rb +52 -0
  54. data/lib/messaging_events_constants.rb +9 -0
  55. data/lib/messaging_events_types.rb +399 -0
  56. data/lib/parallelism_model_constants.rb +9 -0
  57. data/lib/parallelism_model_types.rb +19 -0
  58. data/lib/parser_model_constants.rb +9 -0
  59. data/lib/parser_model_types.rb +229 -0
  60. data/lib/process_model_constants.rb +9 -0
  61. data/lib/process_model_types.rb +113 -0
  62. data/lib/replica_catalog_models_constants.rb +9 -0
  63. data/lib/replica_catalog_models_types.rb +116 -0
  64. data/lib/scheduling_model_constants.rb +9 -0
  65. data/lib/scheduling_model_types.rb +49 -0
  66. data/lib/security_model_constants.rb +9 -0
  67. data/lib/security_model_types.rb +27 -0
  68. data/lib/status_models_constants.rb +9 -0
  69. data/lib/status_models_types.rb +212 -0
  70. data/lib/storage_resource_model_constants.rb +9 -0
  71. data/lib/storage_resource_model_types.rb +56 -0
  72. data/lib/task_model_constants.rb +9 -0
  73. data/lib/task_model_types.rb +197 -0
  74. data/lib/tenant_profile_model_constants.rb +9 -0
  75. data/lib/tenant_profile_model_types.rb +108 -0
  76. data/lib/user_profile_model_constants.rb +11 -0
  77. data/lib/user_profile_model_types.rb +300 -0
  78. data/lib/user_resource_profile_model_constants.rb +9 -0
  79. data/lib/user_resource_profile_model_types.rb +150 -0
  80. data/lib/workspace_model_constants.rb +9 -0
  81. data/lib/workspace_model_types.rb +230 -0
  82. metadata +128 -0
@@ -0,0 +1,9 @@
1
+ #
2
+ # Autogenerated by Thrift Compiler (0.10.0)
3
+ #
4
+ # DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
5
+ #
6
+
7
+ require 'thrift'
8
+ require 'scheduling_model_types'
9
+
@@ -0,0 +1,49 @@
1
+ #
2
+ # Autogenerated by Thrift Compiler (0.10.0)
3
+ #
4
+ # DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
5
+ #
6
+
7
+ require 'thrift'
8
+
9
+ # ComputationalResourceSchedulingModel:
10
+ #
11
+ #
12
+ class ComputationalResourceSchedulingModel
13
+ include ::Thrift::Struct, ::Thrift::Struct_Union
14
+ RESOURCEHOSTID = 1
15
+ TOTALCPUCOUNT = 2
16
+ NODECOUNT = 3
17
+ NUMBEROFTHREADS = 4
18
+ QUEUENAME = 5
19
+ WALLTIMELIMIT = 6
20
+ TOTALPHYSICALMEMORY = 7
21
+ CHESSISNUMBER = 8
22
+ STATICWORKINGDIR = 9
23
+ OVERRIDELOGINUSERNAME = 10
24
+ OVERRIDESCRATCHLOCATION = 11
25
+ OVERRIDEALLOCATIONPROJECTNUMBER = 12
26
+
27
+ FIELDS = {
28
+ RESOURCEHOSTID => {:type => ::Thrift::Types::STRING, :name => 'resourceHostId', :optional => true},
29
+ TOTALCPUCOUNT => {:type => ::Thrift::Types::I32, :name => 'totalCPUCount', :optional => true},
30
+ NODECOUNT => {:type => ::Thrift::Types::I32, :name => 'nodeCount', :optional => true},
31
+ NUMBEROFTHREADS => {:type => ::Thrift::Types::I32, :name => 'numberOfThreads', :optional => true},
32
+ QUEUENAME => {:type => ::Thrift::Types::STRING, :name => 'queueName', :optional => true},
33
+ WALLTIMELIMIT => {:type => ::Thrift::Types::I32, :name => 'wallTimeLimit', :optional => true},
34
+ TOTALPHYSICALMEMORY => {:type => ::Thrift::Types::I32, :name => 'totalPhysicalMemory', :optional => true},
35
+ CHESSISNUMBER => {:type => ::Thrift::Types::STRING, :name => 'chessisNumber', :optional => true},
36
+ STATICWORKINGDIR => {:type => ::Thrift::Types::STRING, :name => 'staticWorkingDir', :optional => true},
37
+ OVERRIDELOGINUSERNAME => {:type => ::Thrift::Types::STRING, :name => 'overrideLoginUserName', :optional => true},
38
+ OVERRIDESCRATCHLOCATION => {:type => ::Thrift::Types::STRING, :name => 'overrideScratchLocation', :optional => true},
39
+ OVERRIDEALLOCATIONPROJECTNUMBER => {:type => ::Thrift::Types::STRING, :name => 'overrideAllocationProjectNumber', :optional => true}
40
+ }
41
+
42
+ def struct_fields; FIELDS; end
43
+
44
+ def validate
45
+ end
46
+
47
+ ::Thrift::Struct.generate_accessors self
48
+ end
49
+
@@ -0,0 +1,9 @@
1
+ #
2
+ # Autogenerated by Thrift Compiler (0.10.0)
3
+ #
4
+ # DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
5
+ #
6
+
7
+ require 'thrift'
8
+ require 'security_model_types'
9
+
@@ -0,0 +1,27 @@
1
+ #
2
+ # Autogenerated by Thrift Compiler (0.10.0)
3
+ #
4
+ # DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
5
+ #
6
+
7
+ require 'thrift'
8
+
9
+ class AuthzToken
10
+ include ::Thrift::Struct, ::Thrift::Struct_Union
11
+ ACCESSTOKEN = 1
12
+ CLAIMSMAP = 2
13
+
14
+ FIELDS = {
15
+ ACCESSTOKEN => {:type => ::Thrift::Types::STRING, :name => 'accessToken'},
16
+ CLAIMSMAP => {:type => ::Thrift::Types::MAP, :name => 'claimsMap', :key => {:type => ::Thrift::Types::STRING}, :value => {:type => ::Thrift::Types::STRING}, :optional => true}
17
+ }
18
+
19
+ def struct_fields; FIELDS; end
20
+
21
+ def validate
22
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field accessToken is unset!') unless @accessToken
23
+ end
24
+
25
+ ::Thrift::Struct.generate_accessors self
26
+ end
27
+
@@ -0,0 +1,9 @@
1
+ #
2
+ # Autogenerated by Thrift Compiler (0.10.0)
3
+ #
4
+ # DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
5
+ #
6
+
7
+ require 'thrift'
8
+ require 'status_models_types'
9
+
@@ -0,0 +1,212 @@
1
+ #
2
+ # Autogenerated by Thrift Compiler (0.10.0)
3
+ #
4
+ # DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
5
+ #
6
+
7
+ require 'thrift'
8
+
9
+ module ExperimentState
10
+ CREATED = 0
11
+ VALIDATED = 1
12
+ SCHEDULED = 2
13
+ LAUNCHED = 3
14
+ EXECUTING = 4
15
+ CANCELING = 5
16
+ CANCELED = 6
17
+ COMPLETED = 7
18
+ FAILED = 8
19
+ VALUE_MAP = {0 => "CREATED", 1 => "VALIDATED", 2 => "SCHEDULED", 3 => "LAUNCHED", 4 => "EXECUTING", 5 => "CANCELING", 6 => "CANCELED", 7 => "COMPLETED", 8 => "FAILED"}
20
+ VALID_VALUES = Set.new([CREATED, VALIDATED, SCHEDULED, LAUNCHED, EXECUTING, CANCELING, CANCELED, COMPLETED, FAILED]).freeze
21
+ end
22
+
23
+ module TaskState
24
+ CREATED = 0
25
+ EXECUTING = 1
26
+ COMPLETED = 2
27
+ FAILED = 3
28
+ CANCELED = 4
29
+ VALUE_MAP = {0 => "CREATED", 1 => "EXECUTING", 2 => "COMPLETED", 3 => "FAILED", 4 => "CANCELED"}
30
+ VALID_VALUES = Set.new([CREATED, EXECUTING, COMPLETED, FAILED, CANCELED]).freeze
31
+ end
32
+
33
+ module ProcessState
34
+ CREATED = 0
35
+ VALIDATED = 1
36
+ STARTED = 2
37
+ PRE_PROCESSING = 3
38
+ CONFIGURING_WORKSPACE = 4
39
+ INPUT_DATA_STAGING = 5
40
+ EXECUTING = 6
41
+ MONITORING = 7
42
+ OUTPUT_DATA_STAGING = 8
43
+ POST_PROCESSING = 9
44
+ COMPLETED = 10
45
+ FAILED = 11
46
+ CANCELLING = 12
47
+ CANCELED = 13
48
+ VALUE_MAP = {0 => "CREATED", 1 => "VALIDATED", 2 => "STARTED", 3 => "PRE_PROCESSING", 4 => "CONFIGURING_WORKSPACE", 5 => "INPUT_DATA_STAGING", 6 => "EXECUTING", 7 => "MONITORING", 8 => "OUTPUT_DATA_STAGING", 9 => "POST_PROCESSING", 10 => "COMPLETED", 11 => "FAILED", 12 => "CANCELLING", 13 => "CANCELED"}
49
+ VALID_VALUES = Set.new([CREATED, VALIDATED, STARTED, PRE_PROCESSING, CONFIGURING_WORKSPACE, INPUT_DATA_STAGING, EXECUTING, MONITORING, OUTPUT_DATA_STAGING, POST_PROCESSING, COMPLETED, FAILED, CANCELLING, CANCELED]).freeze
50
+ end
51
+
52
+ module JobState
53
+ SUBMITTED = 0
54
+ QUEUED = 1
55
+ ACTIVE = 2
56
+ COMPLETE = 3
57
+ CANCELED = 4
58
+ FAILED = 5
59
+ SUSPENDED = 6
60
+ UNKNOWN = 7
61
+ NON_CRITICAL_FAIL = 8
62
+ VALUE_MAP = {0 => "SUBMITTED", 1 => "QUEUED", 2 => "ACTIVE", 3 => "COMPLETE", 4 => "CANCELED", 5 => "FAILED", 6 => "SUSPENDED", 7 => "UNKNOWN", 8 => "NON_CRITICAL_FAIL"}
63
+ VALID_VALUES = Set.new([SUBMITTED, QUEUED, ACTIVE, COMPLETE, CANCELED, FAILED, SUSPENDED, UNKNOWN, NON_CRITICAL_FAIL]).freeze
64
+ end
65
+
66
+ # Status: A generic status object.
67
+ #
68
+ # state:
69
+ # State .
70
+ #
71
+ # timeOfStateChange:
72
+ # time the status was last updated.
73
+ #
74
+ # reason:
75
+ # User friendly reason on how the state is inferred.
76
+ #
77
+ class ExperimentStatus
78
+ include ::Thrift::Struct, ::Thrift::Struct_Union
79
+ STATE = 1
80
+ TIMEOFSTATECHANGE = 2
81
+ REASON = 3
82
+ STATUSID = 4
83
+
84
+ FIELDS = {
85
+ STATE => {:type => ::Thrift::Types::I32, :name => 'state', :enum_class => ::ExperimentState},
86
+ TIMEOFSTATECHANGE => {:type => ::Thrift::Types::I64, :name => 'timeOfStateChange', :optional => true},
87
+ REASON => {:type => ::Thrift::Types::STRING, :name => 'reason', :optional => true},
88
+ STATUSID => {:type => ::Thrift::Types::STRING, :name => 'statusId', :optional => true}
89
+ }
90
+
91
+ def struct_fields; FIELDS; end
92
+
93
+ def validate
94
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field state is unset!') unless @state
95
+ unless @state.nil? || ::ExperimentState::VALID_VALUES.include?(@state)
96
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field state!')
97
+ end
98
+ end
99
+
100
+ ::Thrift::Struct.generate_accessors self
101
+ end
102
+
103
+ class ProcessStatus
104
+ include ::Thrift::Struct, ::Thrift::Struct_Union
105
+ STATE = 1
106
+ TIMEOFSTATECHANGE = 2
107
+ REASON = 3
108
+ STATUSID = 4
109
+
110
+ FIELDS = {
111
+ STATE => {:type => ::Thrift::Types::I32, :name => 'state', :enum_class => ::ProcessState},
112
+ TIMEOFSTATECHANGE => {:type => ::Thrift::Types::I64, :name => 'timeOfStateChange', :optional => true},
113
+ REASON => {:type => ::Thrift::Types::STRING, :name => 'reason', :optional => true},
114
+ STATUSID => {:type => ::Thrift::Types::STRING, :name => 'statusId', :optional => true}
115
+ }
116
+
117
+ def struct_fields; FIELDS; end
118
+
119
+ def validate
120
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field state is unset!') unless @state
121
+ unless @state.nil? || ::ProcessState::VALID_VALUES.include?(@state)
122
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field state!')
123
+ end
124
+ end
125
+
126
+ ::Thrift::Struct.generate_accessors self
127
+ end
128
+
129
+ class TaskStatus
130
+ include ::Thrift::Struct, ::Thrift::Struct_Union
131
+ STATE = 1
132
+ TIMEOFSTATECHANGE = 2
133
+ REASON = 3
134
+ STATUSID = 4
135
+
136
+ FIELDS = {
137
+ STATE => {:type => ::Thrift::Types::I32, :name => 'state', :enum_class => ::TaskState},
138
+ TIMEOFSTATECHANGE => {:type => ::Thrift::Types::I64, :name => 'timeOfStateChange', :optional => true},
139
+ REASON => {:type => ::Thrift::Types::STRING, :name => 'reason', :optional => true},
140
+ STATUSID => {:type => ::Thrift::Types::STRING, :name => 'statusId', :optional => true}
141
+ }
142
+
143
+ def struct_fields; FIELDS; end
144
+
145
+ def validate
146
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field state is unset!') unless @state
147
+ unless @state.nil? || ::TaskState::VALID_VALUES.include?(@state)
148
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field state!')
149
+ end
150
+ end
151
+
152
+ ::Thrift::Struct.generate_accessors self
153
+ end
154
+
155
+ class JobStatus
156
+ include ::Thrift::Struct, ::Thrift::Struct_Union
157
+ JOBSTATE = 1
158
+ TIMEOFSTATECHANGE = 2
159
+ REASON = 3
160
+ STATUSID = 4
161
+
162
+ FIELDS = {
163
+ JOBSTATE => {:type => ::Thrift::Types::I32, :name => 'jobState', :enum_class => ::JobState},
164
+ TIMEOFSTATECHANGE => {:type => ::Thrift::Types::I64, :name => 'timeOfStateChange', :optional => true},
165
+ REASON => {:type => ::Thrift::Types::STRING, :name => 'reason', :optional => true},
166
+ STATUSID => {:type => ::Thrift::Types::STRING, :name => 'statusId', :optional => true}
167
+ }
168
+
169
+ def struct_fields; FIELDS; end
170
+
171
+ def validate
172
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field jobState is unset!') unless @jobState
173
+ unless @jobState.nil? || ::JobState::VALID_VALUES.include?(@jobState)
174
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field jobState!')
175
+ end
176
+ end
177
+
178
+ ::Thrift::Struct.generate_accessors self
179
+ end
180
+
181
+ class QueueStatusModel
182
+ include ::Thrift::Struct, ::Thrift::Struct_Union
183
+ HOSTNAME = 1
184
+ QUEUENAME = 2
185
+ QUEUEUP = 3
186
+ RUNNINGJOBS = 4
187
+ QUEUEDJOBS = 5
188
+ TIME = 6
189
+
190
+ FIELDS = {
191
+ HOSTNAME => {:type => ::Thrift::Types::STRING, :name => 'hostName'},
192
+ QUEUENAME => {:type => ::Thrift::Types::STRING, :name => 'queueName'},
193
+ QUEUEUP => {:type => ::Thrift::Types::BOOL, :name => 'queueUp'},
194
+ RUNNINGJOBS => {:type => ::Thrift::Types::I32, :name => 'runningJobs'},
195
+ QUEUEDJOBS => {:type => ::Thrift::Types::I32, :name => 'queuedJobs'},
196
+ TIME => {:type => ::Thrift::Types::I64, :name => 'time'}
197
+ }
198
+
199
+ def struct_fields; FIELDS; end
200
+
201
+ def validate
202
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field hostName is unset!') unless @hostName
203
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field queueName is unset!') unless @queueName
204
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field queueUp is unset!') if @queueUp.nil?
205
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field runningJobs is unset!') unless @runningJobs
206
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field queuedJobs is unset!') unless @queuedJobs
207
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field time is unset!') unless @time
208
+ end
209
+
210
+ ::Thrift::Struct.generate_accessors self
211
+ end
212
+
@@ -0,0 +1,9 @@
1
+ #
2
+ # Autogenerated by Thrift Compiler (0.10.0)
3
+ #
4
+ # DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
5
+ #
6
+
7
+ require 'thrift'
8
+ require 'storage_resource_model_types'
9
+
@@ -0,0 +1,56 @@
1
+ #
2
+ # Autogenerated by Thrift Compiler (0.10.0)
3
+ #
4
+ # DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
5
+ #
6
+
7
+ require 'thrift'
8
+ require 'airavata_commons_types'
9
+ require 'data_movement_models_types'
10
+
11
+
12
+ # Storage Resource Description
13
+ #
14
+ # storageResourceId: Airavata Internal Unique Identifier to distinguish Compute Resource.
15
+ #
16
+ # hostName:
17
+ # Fully Qualified Host Name.
18
+ #
19
+ # storageResourceDescription:
20
+ # A user friendly description of the resource.
21
+ #
22
+ #
23
+ # DataMovementProtocol:
24
+ # Option to specify a prefered data movement mechanism of the available options.
25
+ #
26
+ #
27
+ class StorageResourceDescription
28
+ include ::Thrift::Struct, ::Thrift::Struct_Union
29
+ STORAGERESOURCEID = 1
30
+ HOSTNAME = 2
31
+ STORAGERESOURCEDESCRIPTION = 3
32
+ ENABLED = 4
33
+ DATAMOVEMENTINTERFACES = 5
34
+ CREATIONTIME = 6
35
+ UPDATETIME = 7
36
+
37
+ FIELDS = {
38
+ STORAGERESOURCEID => {:type => ::Thrift::Types::STRING, :name => 'storageResourceId', :default => %q"DO_NOT_SET_AT_CLIENTS"},
39
+ HOSTNAME => {:type => ::Thrift::Types::STRING, :name => 'hostName'},
40
+ STORAGERESOURCEDESCRIPTION => {:type => ::Thrift::Types::STRING, :name => 'storageResourceDescription', :optional => true},
41
+ ENABLED => {:type => ::Thrift::Types::BOOL, :name => 'enabled', :optional => true},
42
+ DATAMOVEMENTINTERFACES => {:type => ::Thrift::Types::LIST, :name => 'dataMovementInterfaces', :element => {:type => ::Thrift::Types::STRUCT, :class => ::DataMovementInterface}, :optional => true},
43
+ CREATIONTIME => {:type => ::Thrift::Types::I64, :name => 'creationTime', :optional => true},
44
+ UPDATETIME => {:type => ::Thrift::Types::I64, :name => 'updateTime', :optional => true}
45
+ }
46
+
47
+ def struct_fields; FIELDS; end
48
+
49
+ def validate
50
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field storageResourceId is unset!') unless @storageResourceId
51
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field hostName is unset!') unless @hostName
52
+ end
53
+
54
+ ::Thrift::Struct.generate_accessors self
55
+ end
56
+
@@ -0,0 +1,9 @@
1
+ #
2
+ # Autogenerated by Thrift Compiler (0.10.0)
3
+ #
4
+ # DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
5
+ #
6
+
7
+ require 'thrift'
8
+ require 'task_model_types'
9
+
@@ -0,0 +1,197 @@
1
+ #
2
+ # Autogenerated by Thrift Compiler (0.10.0)
3
+ #
4
+ # DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
5
+ #
6
+
7
+ require 'thrift'
8
+ require 'airavata_commons_types'
9
+ require 'compute_resource_model_types'
10
+ require 'data_movement_models_types'
11
+ require 'application_io_models_types'
12
+ require 'status_models_types'
13
+ require 'job_model_types'
14
+
15
+
16
+ module TaskTypes
17
+ ENV_SETUP = 0
18
+ DATA_STAGING = 1
19
+ JOB_SUBMISSION = 2
20
+ ENV_CLEANUP = 3
21
+ MONITORING = 4
22
+ OUTPUT_FETCHING = 5
23
+ VALUE_MAP = {0 => "ENV_SETUP", 1 => "DATA_STAGING", 2 => "JOB_SUBMISSION", 3 => "ENV_CLEANUP", 4 => "MONITORING", 5 => "OUTPUT_FETCHING"}
24
+ VALID_VALUES = Set.new([ENV_SETUP, DATA_STAGING, JOB_SUBMISSION, ENV_CLEANUP, MONITORING, OUTPUT_FETCHING]).freeze
25
+ end
26
+
27
+ module DataStageType
28
+ INPUT = 0
29
+ OUPUT = 1
30
+ ARCHIVE_OUTPUT = 2
31
+ VALUE_MAP = {0 => "INPUT", 1 => "OUPUT", 2 => "ARCHIVE_OUTPUT"}
32
+ VALID_VALUES = Set.new([INPUT, OUPUT, ARCHIVE_OUTPUT]).freeze
33
+ end
34
+
35
+ # TaskModel: A structure holding the generic task details.
36
+ #
37
+ # taskDetail:
38
+ # A friendly description of the task, usally used to communicate information to users.
39
+ #
40
+ # subTaskModel:
41
+ # A generic byte object for the Task developer to store internal serialized data into registry catalogs.
42
+ class TaskModel
43
+ include ::Thrift::Struct, ::Thrift::Struct_Union
44
+ TASKID = 1
45
+ TASKTYPE = 2
46
+ PARENTPROCESSID = 3
47
+ CREATIONTIME = 4
48
+ LASTUPDATETIME = 5
49
+ TASKSTATUSES = 6
50
+ TASKDETAIL = 7
51
+ SUBTASKMODEL = 8
52
+ TASKERRORS = 9
53
+ JOBS = 10
54
+ MAXRETRY = 11
55
+ CURRENTRETRY = 12
56
+
57
+ FIELDS = {
58
+ TASKID => {:type => ::Thrift::Types::STRING, :name => 'taskId', :default => %q"DO_NOT_SET_AT_CLIENTS"},
59
+ TASKTYPE => {:type => ::Thrift::Types::I32, :name => 'taskType', :enum_class => ::TaskTypes},
60
+ PARENTPROCESSID => {:type => ::Thrift::Types::STRING, :name => 'parentProcessId'},
61
+ CREATIONTIME => {:type => ::Thrift::Types::I64, :name => 'creationTime'},
62
+ LASTUPDATETIME => {:type => ::Thrift::Types::I64, :name => 'lastUpdateTime'},
63
+ TASKSTATUSES => {:type => ::Thrift::Types::LIST, :name => 'taskStatuses', :element => {:type => ::Thrift::Types::STRUCT, :class => ::TaskStatus}},
64
+ TASKDETAIL => {:type => ::Thrift::Types::STRING, :name => 'taskDetail', :optional => true},
65
+ SUBTASKMODEL => {:type => ::Thrift::Types::STRING, :name => 'subTaskModel', :binary => true, :optional => true},
66
+ TASKERRORS => {:type => ::Thrift::Types::LIST, :name => 'taskErrors', :element => {:type => ::Thrift::Types::STRUCT, :class => ::ErrorModel}, :optional => true},
67
+ JOBS => {:type => ::Thrift::Types::LIST, :name => 'jobs', :element => {:type => ::Thrift::Types::STRUCT, :class => ::JobModel}, :optional => true},
68
+ MAXRETRY => {:type => ::Thrift::Types::I32, :name => 'maxRetry', :optional => true},
69
+ CURRENTRETRY => {:type => ::Thrift::Types::I32, :name => 'currentRetry', :optional => true}
70
+ }
71
+
72
+ def struct_fields; FIELDS; end
73
+
74
+ def validate
75
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field taskId is unset!') unless @taskId
76
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field taskType is unset!') unless @taskType
77
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field parentProcessId is unset!') unless @parentProcessId
78
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field creationTime is unset!') unless @creationTime
79
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field lastUpdateTime is unset!') unless @lastUpdateTime
80
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field taskStatuses is unset!') unless @taskStatuses
81
+ unless @taskType.nil? || ::TaskTypes::VALID_VALUES.include?(@taskType)
82
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field taskType!')
83
+ end
84
+ end
85
+
86
+ ::Thrift::Struct.generate_accessors self
87
+ end
88
+
89
+ class DataStagingTaskModel
90
+ include ::Thrift::Struct, ::Thrift::Struct_Union
91
+ SOURCE = 1
92
+ DESTINATION = 2
93
+ TYPE = 3
94
+ TRANSFERSTARTTIME = 4
95
+ TRANSFERENDTIME = 5
96
+ TRANSFERRATE = 6
97
+ PROCESSINPUT = 7
98
+ PROCESSOUTPUT = 8
99
+
100
+ FIELDS = {
101
+ SOURCE => {:type => ::Thrift::Types::STRING, :name => 'source'},
102
+ DESTINATION => {:type => ::Thrift::Types::STRING, :name => 'destination'},
103
+ TYPE => {:type => ::Thrift::Types::I32, :name => 'type', :enum_class => ::DataStageType},
104
+ TRANSFERSTARTTIME => {:type => ::Thrift::Types::I64, :name => 'transferStartTime', :optional => true},
105
+ TRANSFERENDTIME => {:type => ::Thrift::Types::I64, :name => 'transferEndTime', :optional => true},
106
+ TRANSFERRATE => {:type => ::Thrift::Types::STRING, :name => 'transferRate', :optional => true},
107
+ PROCESSINPUT => {:type => ::Thrift::Types::STRUCT, :name => 'processInput', :class => ::InputDataObjectType, :optional => true},
108
+ PROCESSOUTPUT => {:type => ::Thrift::Types::STRUCT, :name => 'processOutput', :class => ::OutputDataObjectType, :optional => true}
109
+ }
110
+
111
+ def struct_fields; FIELDS; end
112
+
113
+ def validate
114
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field source is unset!') unless @source
115
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field destination is unset!') unless @destination
116
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field type is unset!') unless @type
117
+ unless @type.nil? || ::DataStageType::VALID_VALUES.include?(@type)
118
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field type!')
119
+ end
120
+ end
121
+
122
+ ::Thrift::Struct.generate_accessors self
123
+ end
124
+
125
+ # EnvironmentSetupTaskModel: A structure holding the environment creation task details
126
+ #
127
+ class EnvironmentSetupTaskModel
128
+ include ::Thrift::Struct, ::Thrift::Struct_Union
129
+ LOCATION = 1
130
+ PROTOCOL = 2
131
+
132
+ FIELDS = {
133
+ LOCATION => {:type => ::Thrift::Types::STRING, :name => 'location'},
134
+ PROTOCOL => {:type => ::Thrift::Types::I32, :name => 'protocol', :enum_class => ::SecurityProtocol}
135
+ }
136
+
137
+ def struct_fields; FIELDS; end
138
+
139
+ def validate
140
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field location is unset!') unless @location
141
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field protocol is unset!') unless @protocol
142
+ unless @protocol.nil? || ::SecurityProtocol::VALID_VALUES.include?(@protocol)
143
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field protocol!')
144
+ end
145
+ end
146
+
147
+ ::Thrift::Struct.generate_accessors self
148
+ end
149
+
150
+ class JobSubmissionTaskModel
151
+ include ::Thrift::Struct, ::Thrift::Struct_Union
152
+ JOBSUBMISSIONPROTOCOL = 1
153
+ MONITORMODE = 2
154
+ WALLTIME = 3
155
+
156
+ FIELDS = {
157
+ JOBSUBMISSIONPROTOCOL => {:type => ::Thrift::Types::I32, :name => 'jobSubmissionProtocol', :enum_class => ::JobSubmissionProtocol},
158
+ MONITORMODE => {:type => ::Thrift::Types::I32, :name => 'monitorMode', :enum_class => ::MonitorMode},
159
+ WALLTIME => {:type => ::Thrift::Types::I32, :name => 'wallTime', :optional => true}
160
+ }
161
+
162
+ def struct_fields; FIELDS; end
163
+
164
+ def validate
165
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field jobSubmissionProtocol is unset!') unless @jobSubmissionProtocol
166
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field monitorMode is unset!') unless @monitorMode
167
+ unless @jobSubmissionProtocol.nil? || ::JobSubmissionProtocol::VALID_VALUES.include?(@jobSubmissionProtocol)
168
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field jobSubmissionProtocol!')
169
+ end
170
+ unless @monitorMode.nil? || ::MonitorMode::VALID_VALUES.include?(@monitorMode)
171
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field monitorMode!')
172
+ end
173
+ end
174
+
175
+ ::Thrift::Struct.generate_accessors self
176
+ end
177
+
178
+ class MonitorTaskModel
179
+ include ::Thrift::Struct, ::Thrift::Struct_Union
180
+ MONITORMODE = 1
181
+
182
+ FIELDS = {
183
+ MONITORMODE => {:type => ::Thrift::Types::I32, :name => 'monitorMode', :enum_class => ::MonitorMode}
184
+ }
185
+
186
+ def struct_fields; FIELDS; end
187
+
188
+ def validate
189
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field monitorMode is unset!') unless @monitorMode
190
+ unless @monitorMode.nil? || ::MonitorMode::VALID_VALUES.include?(@monitorMode)
191
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field monitorMode!')
192
+ end
193
+ end
194
+
195
+ ::Thrift::Struct.generate_accessors self
196
+ end
197
+