apcera 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/apcera.gemspec +31 -0
- data/lib/apcera/api/default_api.rb +128 -0
- data/lib/apcera/api/instances_api.rb +280 -0
- data/lib/apcera/api/jobs_api.rb +1428 -0
- data/lib/apcera/api/logs_api.rb +120 -0
- data/lib/apcera/api/metrics_api.rb +280 -0
- data/lib/apcera/api/packages_api.rb +541 -0
- data/lib/apcera/api/providers_api.rb +175 -0
- data/lib/apcera/api/rules_api.rb +228 -0
- data/lib/apcera/api/services_and_bindings_api.rb +278 -0
- data/lib/apcera/api/staging_pipelines_api.rb +281 -0
- data/lib/apcera/api/utilities_api.rb +327 -0
- data/lib/apcera/api_client.rb +294 -0
- data/lib/apcera/api_error.rb +24 -0
- data/lib/apcera/configuration.rb +173 -0
- data/lib/apcera/models/apc_version_object.rb +37 -0
- data/lib/apcera/models/api_error.rb +143 -0
- data/lib/apcera/models/audit_log_item.rb +117 -0
- data/lib/apcera/models/audit_log_item_old.rb +85 -0
- data/lib/apcera/models/base_object.rb +96 -0
- data/lib/apcera/models/binding.rb +137 -0
- data/lib/apcera/models/create_docker_job_request.rb +197 -0
- data/lib/apcera/models/create_docker_job_response.rb +37 -0
- data/lib/apcera/models/dependency.rb +53 -0
- data/lib/apcera/models/dependency_resolve.rb +45 -0
- data/lib/apcera/models/docker_origin.rb +63 -0
- data/lib/apcera/models/drain.rb +61 -0
- data/lib/apcera/models/drain_config.rb +53 -0
- data/lib/apcera/models/file_listing.rb +45 -0
- data/lib/apcera/models/info.rb +53 -0
- data/lib/apcera/models/instance_manager.rb +105 -0
- data/lib/apcera/models/instance_state.rb +117 -0
- data/lib/apcera/models/instances.rb +109 -0
- data/lib/apcera/models/job.rb +243 -0
- data/lib/apcera/models/job_health.rb +63 -0
- data/lib/apcera/models/job_preferences.rb +37 -0
- data/lib/apcera/models/log.rb +53 -0
- data/lib/apcera/models/metric_series.rb +49 -0
- data/lib/apcera/models/metric_series_hash.rb +29 -0
- data/lib/apcera/models/metrics.rb +49 -0
- data/lib/apcera/models/namespace.rb +37 -0
- data/lib/apcera/models/package.rb +183 -0
- data/lib/apcera/models/package_depends_request.rb +47 -0
- data/lib/apcera/models/package_info.rb +69 -0
- data/lib/apcera/models/package_resource.rb +61 -0
- data/lib/apcera/models/policy_error.rb +63 -0
- data/lib/apcera/models/port.rb +55 -0
- data/lib/apcera/models/process.rb +37 -0
- data/lib/apcera/models/process_object.rb +115 -0
- data/lib/apcera/models/provide.rb +53 -0
- data/lib/apcera/models/provider.rb +85 -0
- data/lib/apcera/models/resource.rb +69 -0
- data/lib/apcera/models/restart_config.rb +53 -0
- data/lib/apcera/models/rollout_config.rb +69 -0
- data/lib/apcera/models/route.rb +53 -0
- data/lib/apcera/models/rule.rb +101 -0
- data/lib/apcera/models/runtime.rb +47 -0
- data/lib/apcera/models/semi_pipe_rule.rb +101 -0
- data/lib/apcera/models/semi_pipe_rule_action.rb +37 -0
- data/lib/apcera/models/stager_job.rb +37 -0
- data/lib/apcera/models/staging_pipeline.rb +103 -0
- data/lib/apcera/models/sub_task.rb +61 -0
- data/lib/apcera/models/task.rb +87 -0
- data/lib/apcera/models/task_event.rb +113 -0
- data/lib/apcera/models/task_progress.rb +45 -0
- data/lib/apcera/models/unbind_parameter_object.rb +53 -0
- data/lib/apcera/models/unlink_parameter_object.rb +53 -0
- data/lib/apcera/version.rb +3 -0
- data/lib/apcera.rb +90 -0
- metadata +293 -0
@@ -0,0 +1,183 @@
|
|
1
|
+
module Apcera
|
2
|
+
#
|
3
|
+
class Package < BaseObject
|
4
|
+
attr_accessor :created_at, :created_by, :dependencies, :environment, :error_message, :fqn, :name, :provides, :resource, :resources, :staging_pipeline, :staging_pipeline_fqn, :state, :tags, :updated_at, :updated_by, :uuid, :version_id
|
5
|
+
# attribute mapping from ruby-style variable name to JSON key
|
6
|
+
def self.attribute_map
|
7
|
+
{
|
8
|
+
|
9
|
+
# The date and time when the package was created.
|
10
|
+
:'created_at' => :'created_at',
|
11
|
+
|
12
|
+
# Principal name of the user who created the package.
|
13
|
+
:'created_by' => :'created_by',
|
14
|
+
|
15
|
+
# List of dependencies that the package has in order to be used. A dependency expresses a requirement that a package has on an other package.
|
16
|
+
:'dependencies' => :'dependencies',
|
17
|
+
|
18
|
+
# List of environment variables that are added to any process that uses the package.
|
19
|
+
:'environment' => :'environment',
|
20
|
+
|
21
|
+
# Error encountered during an asynchronous operation on the package. An example is a failure encountered during instance snapshot; the ErrorMessage field on the created snapshot package would contain more information.
|
22
|
+
:'error_message' => :'error_message',
|
23
|
+
|
24
|
+
# Package's fully-qualified name.
|
25
|
+
:'fqn' => :'fqn',
|
26
|
+
|
27
|
+
# Package name.
|
28
|
+
:'name' => :'name',
|
29
|
+
|
30
|
+
# List of 'provides' that the package provides for other packages to use. A 'provide' expresses a named resource that other packages or jobs can add as a dependency.
|
31
|
+
:'provides' => :'provides',
|
32
|
+
|
33
|
+
# Deprecated. Use `resources`. An object that describes the package's associated binary resource.
|
34
|
+
:'resource' => :'resource',
|
35
|
+
|
36
|
+
# An list of objects that describes the package's associated binary resources.
|
37
|
+
:'resources' => :'resources',
|
38
|
+
|
39
|
+
# The UUID of the staging pipeline used to stage this package into a runnable state.
|
40
|
+
:'staging_pipeline' => :'staging_pipeline',
|
41
|
+
|
42
|
+
# The fully-qualified name of the staging pipeline used to stage the package.
|
43
|
+
:'staging_pipeline_fqn' => :'staging_pipeline_fqn',
|
44
|
+
|
45
|
+
# Package state. Possible values are `uploading`, 'staging`, `failed`, `ready`, `deleted`, and `unknown`.
|
46
|
+
:'state' => :'state',
|
47
|
+
|
48
|
+
# Map of tags by tag name.
|
49
|
+
:'tags' => :'tags',
|
50
|
+
|
51
|
+
# The date and time when the package was most recently updated.
|
52
|
+
:'updated_at' => :'updated_at',
|
53
|
+
|
54
|
+
# Principal name of the last user to update the package.
|
55
|
+
:'updated_by' => :'updated_by',
|
56
|
+
|
57
|
+
# The package's unique identifier.
|
58
|
+
:'uuid' => :'uuid',
|
59
|
+
|
60
|
+
# Package's auto-incremented version number.
|
61
|
+
:'version_id' => :'version_id'
|
62
|
+
|
63
|
+
}
|
64
|
+
end
|
65
|
+
|
66
|
+
# attribute type
|
67
|
+
def self.swagger_types
|
68
|
+
{
|
69
|
+
:'created_at' => :'DateTime',
|
70
|
+
:'created_by' => :'String',
|
71
|
+
:'dependencies' => :'Array<Dependency>',
|
72
|
+
:'environment' => :'Hash<String, String>',
|
73
|
+
:'error_message' => :'String',
|
74
|
+
:'fqn' => :'String',
|
75
|
+
:'name' => :'String',
|
76
|
+
:'provides' => :'Array<Provide>',
|
77
|
+
:'resource' => :'PackageResource',
|
78
|
+
:'resources' => :'Array<PackageResource>',
|
79
|
+
:'staging_pipeline' => :'String',
|
80
|
+
:'staging_pipeline_fqn' => :'String',
|
81
|
+
:'state' => :'String',
|
82
|
+
:'tags' => :'Hash<String, String>',
|
83
|
+
:'updated_at' => :'DateTime',
|
84
|
+
:'updated_by' => :'String',
|
85
|
+
:'uuid' => :'String',
|
86
|
+
:'version_id' => :'Integer'
|
87
|
+
|
88
|
+
}
|
89
|
+
end
|
90
|
+
|
91
|
+
def initialize(attributes = {})
|
92
|
+
return if !attributes.is_a?(Hash) || attributes.empty?
|
93
|
+
|
94
|
+
# convert string to symbol for hash key
|
95
|
+
attributes = attributes.inject({}){|memo,(k,v)| memo[k.to_sym] = v; memo}
|
96
|
+
|
97
|
+
|
98
|
+
if attributes[:'created_at']
|
99
|
+
self.created_at = attributes[:'created_at']
|
100
|
+
end
|
101
|
+
|
102
|
+
if attributes[:'created_by']
|
103
|
+
self.created_by = attributes[:'created_by']
|
104
|
+
end
|
105
|
+
|
106
|
+
if attributes[:'dependencies']
|
107
|
+
if (value = attributes[:'dependencies']).is_a?(Array)
|
108
|
+
self.dependencies = value
|
109
|
+
end
|
110
|
+
end
|
111
|
+
|
112
|
+
if attributes[:'environment']
|
113
|
+
if (value = attributes[:'environment']).is_a?(Array)
|
114
|
+
self.environment = value
|
115
|
+
end
|
116
|
+
end
|
117
|
+
|
118
|
+
if attributes[:'error_message']
|
119
|
+
self.error_message = attributes[:'error_message']
|
120
|
+
end
|
121
|
+
|
122
|
+
if attributes[:'fqn']
|
123
|
+
self.fqn = attributes[:'fqn']
|
124
|
+
end
|
125
|
+
|
126
|
+
if attributes[:'name']
|
127
|
+
self.name = attributes[:'name']
|
128
|
+
end
|
129
|
+
|
130
|
+
if attributes[:'provides']
|
131
|
+
if (value = attributes[:'provides']).is_a?(Array)
|
132
|
+
self.provides = value
|
133
|
+
end
|
134
|
+
end
|
135
|
+
|
136
|
+
if attributes[:'resource']
|
137
|
+
self.resource = attributes[:'resource']
|
138
|
+
end
|
139
|
+
|
140
|
+
if attributes[:'resources']
|
141
|
+
if (value = attributes[:'resources']).is_a?(Array)
|
142
|
+
self.resources = value
|
143
|
+
end
|
144
|
+
end
|
145
|
+
|
146
|
+
if attributes[:'staging_pipeline']
|
147
|
+
self.staging_pipeline = attributes[:'staging_pipeline']
|
148
|
+
end
|
149
|
+
|
150
|
+
if attributes[:'staging_pipeline_fqn']
|
151
|
+
self.staging_pipeline_fqn = attributes[:'staging_pipeline_fqn']
|
152
|
+
end
|
153
|
+
|
154
|
+
if attributes[:'state']
|
155
|
+
self.state = attributes[:'state']
|
156
|
+
end
|
157
|
+
|
158
|
+
if attributes[:'tags']
|
159
|
+
if (value = attributes[:'tags']).is_a?(Array)
|
160
|
+
self.tags = value
|
161
|
+
end
|
162
|
+
end
|
163
|
+
|
164
|
+
if attributes[:'updated_at']
|
165
|
+
self.updated_at = attributes[:'updated_at']
|
166
|
+
end
|
167
|
+
|
168
|
+
if attributes[:'updated_by']
|
169
|
+
self.updated_by = attributes[:'updated_by']
|
170
|
+
end
|
171
|
+
|
172
|
+
if attributes[:'uuid']
|
173
|
+
self.uuid = attributes[:'uuid']
|
174
|
+
end
|
175
|
+
|
176
|
+
if attributes[:'version_id']
|
177
|
+
self.version_id = attributes[:'version_id']
|
178
|
+
end
|
179
|
+
|
180
|
+
end
|
181
|
+
|
182
|
+
end
|
183
|
+
end
|
@@ -0,0 +1,47 @@
|
|
1
|
+
module Apcera
|
2
|
+
#
|
3
|
+
class PackageDependsRequest < BaseObject
|
4
|
+
attr_accessor :dependencies, :job_target
|
5
|
+
# attribute mapping from ruby-style variable name to JSON key
|
6
|
+
def self.attribute_map
|
7
|
+
{
|
8
|
+
|
9
|
+
#
|
10
|
+
:'dependencies' => :'dependencies',
|
11
|
+
|
12
|
+
# Namespace in which dependencies will be resolved (e.g. the namespace of a job that is being staged, the namespace of the user requesting the resolution).
|
13
|
+
:'job_target' => :'job_target'
|
14
|
+
|
15
|
+
}
|
16
|
+
end
|
17
|
+
|
18
|
+
# attribute type
|
19
|
+
def self.swagger_types
|
20
|
+
{
|
21
|
+
:'dependencies' => :'Array<DependencyResolve>',
|
22
|
+
:'job_target' => :'String'
|
23
|
+
|
24
|
+
}
|
25
|
+
end
|
26
|
+
|
27
|
+
def initialize(attributes = {})
|
28
|
+
return if !attributes.is_a?(Hash) || attributes.empty?
|
29
|
+
|
30
|
+
# convert string to symbol for hash key
|
31
|
+
attributes = attributes.inject({}){|memo,(k,v)| memo[k.to_sym] = v; memo}
|
32
|
+
|
33
|
+
|
34
|
+
if attributes[:'dependencies']
|
35
|
+
if (value = attributes[:'dependencies']).is_a?(Array)
|
36
|
+
self.dependencies = value
|
37
|
+
end
|
38
|
+
end
|
39
|
+
|
40
|
+
if attributes[:'job_target']
|
41
|
+
self.job_target = attributes[:'job_target']
|
42
|
+
end
|
43
|
+
|
44
|
+
end
|
45
|
+
|
46
|
+
end
|
47
|
+
end
|
@@ -0,0 +1,69 @@
|
|
1
|
+
module Apcera
|
2
|
+
#
|
3
|
+
class PackageInfo < BaseObject
|
4
|
+
attr_accessor :source, :state, :uuid
|
5
|
+
# attribute mapping from ruby-style variable name to JSON key
|
6
|
+
def self.attribute_map
|
7
|
+
{
|
8
|
+
|
9
|
+
# The source of the package, whether it was provided by the user or calculated by the Package Manager.
|
10
|
+
:'source' => :'source',
|
11
|
+
|
12
|
+
# Represents the availability of the package.
|
13
|
+
:'state' => :'state',
|
14
|
+
|
15
|
+
# UUID of the package.
|
16
|
+
:'uuid' => :'uuid'
|
17
|
+
|
18
|
+
}
|
19
|
+
end
|
20
|
+
|
21
|
+
# attribute type
|
22
|
+
def self.swagger_types
|
23
|
+
{
|
24
|
+
:'source' => :'String',
|
25
|
+
:'state' => :'String',
|
26
|
+
:'uuid' => :'String'
|
27
|
+
|
28
|
+
}
|
29
|
+
end
|
30
|
+
|
31
|
+
def initialize(attributes = {})
|
32
|
+
return if !attributes.is_a?(Hash) || attributes.empty?
|
33
|
+
|
34
|
+
# convert string to symbol for hash key
|
35
|
+
attributes = attributes.inject({}){|memo,(k,v)| memo[k.to_sym] = v; memo}
|
36
|
+
|
37
|
+
|
38
|
+
if attributes[:'source']
|
39
|
+
self.source = attributes[:'source']
|
40
|
+
end
|
41
|
+
|
42
|
+
if attributes[:'state']
|
43
|
+
self.state = attributes[:'state']
|
44
|
+
end
|
45
|
+
|
46
|
+
if attributes[:'uuid']
|
47
|
+
self.uuid = attributes[:'uuid']
|
48
|
+
end
|
49
|
+
|
50
|
+
end
|
51
|
+
|
52
|
+
def source=(source)
|
53
|
+
allowed_values = ["user", "system"]
|
54
|
+
if source && !allowed_values.include?(source)
|
55
|
+
fail "invalid value for 'source', must be one of #{allowed_values}"
|
56
|
+
end
|
57
|
+
@source = source
|
58
|
+
end
|
59
|
+
|
60
|
+
def state=(state)
|
61
|
+
allowed_values = ["unknown", "uploading", "staging", "failed", "ready", "deleted"]
|
62
|
+
if state && !allowed_values.include?(state)
|
63
|
+
fail "invalid value for 'state', must be one of #{allowed_values}"
|
64
|
+
end
|
65
|
+
@state = state
|
66
|
+
end
|
67
|
+
|
68
|
+
end
|
69
|
+
end
|
@@ -0,0 +1,61 @@
|
|
1
|
+
module Apcera
|
2
|
+
#
|
3
|
+
class PackageResource < BaseObject
|
4
|
+
attr_accessor :digest, :length, :sha1, :uuid
|
5
|
+
# attribute mapping from ruby-style variable name to JSON key
|
6
|
+
def self.attribute_map
|
7
|
+
{
|
8
|
+
|
9
|
+
# A hash of the binary resource prefixed by its algorithm (e.g. 'sha1:abcd...').
|
10
|
+
:'digest' => :'digest',
|
11
|
+
|
12
|
+
# The length of the binary resource in bytes.
|
13
|
+
:'length' => :'length',
|
14
|
+
|
15
|
+
# A hash of the binary resource.
|
16
|
+
:'sha1' => :'sha1',
|
17
|
+
|
18
|
+
# The package resource's unique identifier.
|
19
|
+
:'uuid' => :'uuid'
|
20
|
+
|
21
|
+
}
|
22
|
+
end
|
23
|
+
|
24
|
+
# attribute type
|
25
|
+
def self.swagger_types
|
26
|
+
{
|
27
|
+
:'digest' => :'String',
|
28
|
+
:'length' => :'Integer',
|
29
|
+
:'sha1' => :'String',
|
30
|
+
:'uuid' => :'String'
|
31
|
+
|
32
|
+
}
|
33
|
+
end
|
34
|
+
|
35
|
+
def initialize(attributes = {})
|
36
|
+
return if !attributes.is_a?(Hash) || attributes.empty?
|
37
|
+
|
38
|
+
# convert string to symbol for hash key
|
39
|
+
attributes = attributes.inject({}){|memo,(k,v)| memo[k.to_sym] = v; memo}
|
40
|
+
|
41
|
+
|
42
|
+
if attributes[:'digest']
|
43
|
+
self.digest = attributes[:'digest']
|
44
|
+
end
|
45
|
+
|
46
|
+
if attributes[:'length']
|
47
|
+
self.length = attributes[:'length']
|
48
|
+
end
|
49
|
+
|
50
|
+
if attributes[:'sha1']
|
51
|
+
self.sha1 = attributes[:'sha1']
|
52
|
+
end
|
53
|
+
|
54
|
+
if attributes[:'uuid']
|
55
|
+
self.uuid = attributes[:'uuid']
|
56
|
+
end
|
57
|
+
|
58
|
+
end
|
59
|
+
|
60
|
+
end
|
61
|
+
end
|
@@ -0,0 +1,63 @@
|
|
1
|
+
module Apcera
|
2
|
+
#
|
3
|
+
class PolicyError < BaseObject
|
4
|
+
attr_accessor :errors, :job, :job_changed, :repairable
|
5
|
+
# attribute mapping from ruby-style variable name to JSON key
|
6
|
+
def self.attribute_map
|
7
|
+
{
|
8
|
+
|
9
|
+
# An array of specific policy errors that occurred.
|
10
|
+
:'errors' => :'errors',
|
11
|
+
|
12
|
+
# A reference to the job associated with the policy error.
|
13
|
+
:'job' => :'job',
|
14
|
+
|
15
|
+
# If `true`, the policy error was the result of changes to a job.
|
16
|
+
:'job_changed' => :'job_changed',
|
17
|
+
|
18
|
+
# If `true`, the error is repairable.
|
19
|
+
:'repairable' => :'repairable'
|
20
|
+
|
21
|
+
}
|
22
|
+
end
|
23
|
+
|
24
|
+
# attribute type
|
25
|
+
def self.swagger_types
|
26
|
+
{
|
27
|
+
:'errors' => :'Array<String>',
|
28
|
+
:'job' => :'Job',
|
29
|
+
:'job_changed' => :'BOOLEAN',
|
30
|
+
:'repairable' => :'BOOLEAN'
|
31
|
+
|
32
|
+
}
|
33
|
+
end
|
34
|
+
|
35
|
+
def initialize(attributes = {})
|
36
|
+
return if !attributes.is_a?(Hash) || attributes.empty?
|
37
|
+
|
38
|
+
# convert string to symbol for hash key
|
39
|
+
attributes = attributes.inject({}){|memo,(k,v)| memo[k.to_sym] = v; memo}
|
40
|
+
|
41
|
+
|
42
|
+
if attributes[:'errors']
|
43
|
+
if (value = attributes[:'errors']).is_a?(Array)
|
44
|
+
self.errors = value
|
45
|
+
end
|
46
|
+
end
|
47
|
+
|
48
|
+
if attributes[:'job']
|
49
|
+
self.job = attributes[:'job']
|
50
|
+
end
|
51
|
+
|
52
|
+
if attributes[:'job_changed']
|
53
|
+
self.job_changed = attributes[:'job_changed']
|
54
|
+
end
|
55
|
+
|
56
|
+
if attributes[:'repairable']
|
57
|
+
self.repairable = attributes[:'repairable']
|
58
|
+
end
|
59
|
+
|
60
|
+
end
|
61
|
+
|
62
|
+
end
|
63
|
+
end
|
@@ -0,0 +1,55 @@
|
|
1
|
+
module Apcera
|
2
|
+
#
|
3
|
+
class Port < BaseObject
|
4
|
+
attr_accessor :number, :optional, :routes
|
5
|
+
# attribute mapping from ruby-style variable name to JSON key
|
6
|
+
def self.attribute_map
|
7
|
+
{
|
8
|
+
|
9
|
+
# The numerical port exposed for connectivity.
|
10
|
+
:'number' => :'number',
|
11
|
+
|
12
|
+
# A value of `true` indicates that the instance manager (IM) should attempt to verify that connectivity has been established for this port; if `false`, no such verification occurs.
|
13
|
+
:'optional' => :'optional',
|
14
|
+
|
15
|
+
# An array of URLs to map to the port.
|
16
|
+
:'routes' => :'routes'
|
17
|
+
|
18
|
+
}
|
19
|
+
end
|
20
|
+
|
21
|
+
# attribute type
|
22
|
+
def self.swagger_types
|
23
|
+
{
|
24
|
+
:'number' => :'Integer',
|
25
|
+
:'optional' => :'BOOLEAN',
|
26
|
+
:'routes' => :'Array<Route>'
|
27
|
+
|
28
|
+
}
|
29
|
+
end
|
30
|
+
|
31
|
+
def initialize(attributes = {})
|
32
|
+
return if !attributes.is_a?(Hash) || attributes.empty?
|
33
|
+
|
34
|
+
# convert string to symbol for hash key
|
35
|
+
attributes = attributes.inject({}){|memo,(k,v)| memo[k.to_sym] = v; memo}
|
36
|
+
|
37
|
+
|
38
|
+
if attributes[:'number']
|
39
|
+
self.number = attributes[:'number']
|
40
|
+
end
|
41
|
+
|
42
|
+
if attributes[:'optional']
|
43
|
+
self.optional = attributes[:'optional']
|
44
|
+
end
|
45
|
+
|
46
|
+
if attributes[:'routes']
|
47
|
+
if (value = attributes[:'routes']).is_a?(Array)
|
48
|
+
self.routes = value
|
49
|
+
end
|
50
|
+
end
|
51
|
+
|
52
|
+
end
|
53
|
+
|
54
|
+
end
|
55
|
+
end
|
@@ -0,0 +1,37 @@
|
|
1
|
+
module Apcera
|
2
|
+
#
|
3
|
+
class Process < BaseObject
|
4
|
+
attr_accessor :app
|
5
|
+
# attribute mapping from ruby-style variable name to JSON key
|
6
|
+
def self.attribute_map
|
7
|
+
{
|
8
|
+
|
9
|
+
#
|
10
|
+
:'app' => :'app'
|
11
|
+
|
12
|
+
}
|
13
|
+
end
|
14
|
+
|
15
|
+
# attribute type
|
16
|
+
def self.swagger_types
|
17
|
+
{
|
18
|
+
:'app' => :'ProcessObject'
|
19
|
+
|
20
|
+
}
|
21
|
+
end
|
22
|
+
|
23
|
+
def initialize(attributes = {})
|
24
|
+
return if !attributes.is_a?(Hash) || attributes.empty?
|
25
|
+
|
26
|
+
# convert string to symbol for hash key
|
27
|
+
attributes = attributes.inject({}){|memo,(k,v)| memo[k.to_sym] = v; memo}
|
28
|
+
|
29
|
+
|
30
|
+
if attributes[:'app']
|
31
|
+
self.app = attributes[:'app']
|
32
|
+
end
|
33
|
+
|
34
|
+
end
|
35
|
+
|
36
|
+
end
|
37
|
+
end
|
@@ -0,0 +1,115 @@
|
|
1
|
+
module Apcera
|
2
|
+
#
|
3
|
+
class ProcessObject < BaseObject
|
4
|
+
attr_accessor :environment, :group, :heavy, :start_command, :start_command_raw, :start_command_timeout, :stop_command, :stop_command_raw, :stop_timeout, :user
|
5
|
+
# attribute mapping from ruby-style variable name to JSON key
|
6
|
+
def self.attribute_map
|
7
|
+
{
|
8
|
+
|
9
|
+
# An optional list of environment values to attach to the process within the job.
|
10
|
+
:'environment' => :'environment',
|
11
|
+
|
12
|
+
# Name of the group used to run the process within a container. An empty string lets the the instance manager choose a group.
|
13
|
+
:'group' => :'group',
|
14
|
+
|
15
|
+
# Start the process in \"heavy\" mode: giving it pid 1. Only one process within the job can set this flag to true.
|
16
|
+
:'heavy' => :'heavy',
|
17
|
+
|
18
|
+
# The command used to start the process within the container's isolation context.
|
19
|
+
:'start_command' => :'start_command',
|
20
|
+
|
21
|
+
# The command used to start the process, specified as an array. The first element in the array is the command/binary to execute, and subsequent array elements are command arguments. The expanded command string is passed directly to `exec()` without shell or template interpretation. If `start_command_raw` is provided then `start_command`, if specified, is ignored. This property is typically used with exact processes that have an extremely well-known start command.
|
22
|
+
:'start_command_raw' => :'start_command_raw',
|
23
|
+
|
24
|
+
# The number of seconds that the system will wait for startup to complete. This includes the time that it will take for ports to become available.
|
25
|
+
:'start_command_timeout' => :'start_command_timeout',
|
26
|
+
|
27
|
+
# The command used to stop the process within the container's isolation context. If not defined, OS-level signals (like `TERM`) may be used to shut down the process.
|
28
|
+
:'stop_command' => :'stop_command',
|
29
|
+
|
30
|
+
# The command used to stop the process, specified as an array. The first element in the array is the command/binary to execute, and subsequent array elements are command arguments. The expanded command string is passed directly to `exec()` without shell or template interpretation. If `stop_command_raw` is provided then `stop_command`, if specified, is ignored. This property is typically used with exact processes that have an extremely well-known start command.
|
31
|
+
:'stop_command_raw' => :'stop_command_raw',
|
32
|
+
|
33
|
+
# The number of seconds to give the process after `stop_command` has been run before forcing the command to shutdown via OS-level signals, such as `TERM`. If no `stop_command` is provided for the process, OS-level signals (like `TERM`) may be used to terminate the process.
|
34
|
+
:'stop_timeout' => :'stop_timeout',
|
35
|
+
|
36
|
+
# Name of the user used to run the process within a container. An empty string lets the the instance manager choose a user.
|
37
|
+
:'user' => :'user'
|
38
|
+
|
39
|
+
}
|
40
|
+
end
|
41
|
+
|
42
|
+
# attribute type
|
43
|
+
def self.swagger_types
|
44
|
+
{
|
45
|
+
:'environment' => :'Hash<String, String>',
|
46
|
+
:'group' => :'String',
|
47
|
+
:'heavy' => :'BOOLEAN',
|
48
|
+
:'start_command' => :'String',
|
49
|
+
:'start_command_raw' => :'Array<String>',
|
50
|
+
:'start_command_timeout' => :'Integer',
|
51
|
+
:'stop_command' => :'String',
|
52
|
+
:'stop_command_raw' => :'Array<String>',
|
53
|
+
:'stop_timeout' => :'Integer',
|
54
|
+
:'user' => :'String'
|
55
|
+
|
56
|
+
}
|
57
|
+
end
|
58
|
+
|
59
|
+
def initialize(attributes = {})
|
60
|
+
return if !attributes.is_a?(Hash) || attributes.empty?
|
61
|
+
|
62
|
+
# convert string to symbol for hash key
|
63
|
+
attributes = attributes.inject({}){|memo,(k,v)| memo[k.to_sym] = v; memo}
|
64
|
+
|
65
|
+
|
66
|
+
if attributes[:'environment']
|
67
|
+
if (value = attributes[:'environment']).is_a?(Array)
|
68
|
+
self.environment = value
|
69
|
+
end
|
70
|
+
end
|
71
|
+
|
72
|
+
if attributes[:'group']
|
73
|
+
self.group = attributes[:'group']
|
74
|
+
end
|
75
|
+
|
76
|
+
if attributes[:'heavy']
|
77
|
+
self.heavy = attributes[:'heavy']
|
78
|
+
end
|
79
|
+
|
80
|
+
if attributes[:'start_command']
|
81
|
+
self.start_command = attributes[:'start_command']
|
82
|
+
end
|
83
|
+
|
84
|
+
if attributes[:'start_command_raw']
|
85
|
+
if (value = attributes[:'start_command_raw']).is_a?(Array)
|
86
|
+
self.start_command_raw = value
|
87
|
+
end
|
88
|
+
end
|
89
|
+
|
90
|
+
if attributes[:'start_command_timeout']
|
91
|
+
self.start_command_timeout = attributes[:'start_command_timeout']
|
92
|
+
end
|
93
|
+
|
94
|
+
if attributes[:'stop_command']
|
95
|
+
self.stop_command = attributes[:'stop_command']
|
96
|
+
end
|
97
|
+
|
98
|
+
if attributes[:'stop_command_raw']
|
99
|
+
if (value = attributes[:'stop_command_raw']).is_a?(Array)
|
100
|
+
self.stop_command_raw = value
|
101
|
+
end
|
102
|
+
end
|
103
|
+
|
104
|
+
if attributes[:'stop_timeout']
|
105
|
+
self.stop_timeout = attributes[:'stop_timeout']
|
106
|
+
end
|
107
|
+
|
108
|
+
if attributes[:'user']
|
109
|
+
self.user = attributes[:'user']
|
110
|
+
end
|
111
|
+
|
112
|
+
end
|
113
|
+
|
114
|
+
end
|
115
|
+
end
|
@@ -0,0 +1,53 @@
|
|
1
|
+
module Apcera
|
2
|
+
#
|
3
|
+
class Provide < BaseObject
|
4
|
+
attr_accessor :name, :type
|
5
|
+
# attribute mapping from ruby-style variable name to JSON key
|
6
|
+
def self.attribute_map
|
7
|
+
{
|
8
|
+
|
9
|
+
# A string that describes the resource that can be provided (e.g., 'java', 'apache-2.2').
|
10
|
+
:'name' => :'name',
|
11
|
+
|
12
|
+
# The type of provide. Possible values are `file`, `package`, `runtime`, and `os`.
|
13
|
+
:'type' => :'type'
|
14
|
+
|
15
|
+
}
|
16
|
+
end
|
17
|
+
|
18
|
+
# attribute type
|
19
|
+
def self.swagger_types
|
20
|
+
{
|
21
|
+
:'name' => :'String',
|
22
|
+
:'type' => :'String'
|
23
|
+
|
24
|
+
}
|
25
|
+
end
|
26
|
+
|
27
|
+
def initialize(attributes = {})
|
28
|
+
return if !attributes.is_a?(Hash) || attributes.empty?
|
29
|
+
|
30
|
+
# convert string to symbol for hash key
|
31
|
+
attributes = attributes.inject({}){|memo,(k,v)| memo[k.to_sym] = v; memo}
|
32
|
+
|
33
|
+
|
34
|
+
if attributes[:'name']
|
35
|
+
self.name = attributes[:'name']
|
36
|
+
end
|
37
|
+
|
38
|
+
if attributes[:'type']
|
39
|
+
self.type = attributes[:'type']
|
40
|
+
end
|
41
|
+
|
42
|
+
end
|
43
|
+
|
44
|
+
def type=(type)
|
45
|
+
allowed_values = ["file", "package", "runtime", "os"]
|
46
|
+
if type && !allowed_values.include?(type)
|
47
|
+
fail "invalid value for 'type', must be one of #{allowed_values}"
|
48
|
+
end
|
49
|
+
@type = type
|
50
|
+
end
|
51
|
+
|
52
|
+
end
|
53
|
+
end
|