apcera 0.1.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.
- 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,117 @@
|
|
1
|
+
module Apcera
|
2
|
+
#
|
3
|
+
class AuditLogItem < BaseObject
|
4
|
+
attr_accessor :event_type, :event_type_int, :fqn, :localname, :namespace, :on_behalf_of, :payload, :principal_name, :resource_type, :timestamp, :uuid
|
5
|
+
# attribute mapping from ruby-style variable name to JSON key
|
6
|
+
def self.attribute_map
|
7
|
+
{
|
8
|
+
|
9
|
+
# Event type.
|
10
|
+
:'event_type' => :'event_type',
|
11
|
+
|
12
|
+
# Integer used as the index of an enumeration of human-readable event types (see `event_type`).
|
13
|
+
:'event_type_int' => :'event_type_int',
|
14
|
+
|
15
|
+
# Fully-qualified name of the resource on which the auditable action was attempted.
|
16
|
+
:'fqn' => :'fqn',
|
17
|
+
|
18
|
+
# Local name of the resource on which the auditable action was attempted.
|
19
|
+
:'localname' => :'localname',
|
20
|
+
|
21
|
+
# Namespace of the resource on which the auditable action was attempted.
|
22
|
+
:'namespace' => :'namespace',
|
23
|
+
|
24
|
+
# Username on whose behalf the auditable action was attempted by `principal_name`.
|
25
|
+
:'on_behalf_of' => :'on_behalf_of',
|
26
|
+
|
27
|
+
# Simple structured auditing data like JSON output.
|
28
|
+
:'payload' => :'payload',
|
29
|
+
|
30
|
+
# The actor (API Server or Health Manager, for example) or user that attempted the auditable action.
|
31
|
+
:'principal_name' => :'principal_name',
|
32
|
+
|
33
|
+
# The resource type on which the auditable action was attempted.
|
34
|
+
:'resource_type' => :'resource_type',
|
35
|
+
|
36
|
+
# UNIX timestamp that indicates when the event occurred.
|
37
|
+
:'timestamp' => :'timestamp',
|
38
|
+
|
39
|
+
# Unique identifier for the audit log entry.
|
40
|
+
:'uuid' => :'uuid'
|
41
|
+
|
42
|
+
}
|
43
|
+
end
|
44
|
+
|
45
|
+
# attribute type
|
46
|
+
def self.swagger_types
|
47
|
+
{
|
48
|
+
:'event_type' => :'String',
|
49
|
+
:'event_type_int' => :'Integer',
|
50
|
+
:'fqn' => :'String',
|
51
|
+
:'localname' => :'String',
|
52
|
+
:'namespace' => :'String',
|
53
|
+
:'on_behalf_of' => :'String',
|
54
|
+
:'payload' => :'String',
|
55
|
+
:'principal_name' => :'String',
|
56
|
+
:'resource_type' => :'String',
|
57
|
+
:'timestamp' => :'Float',
|
58
|
+
:'uuid' => :'String'
|
59
|
+
|
60
|
+
}
|
61
|
+
end
|
62
|
+
|
63
|
+
def initialize(attributes = {})
|
64
|
+
return if !attributes.is_a?(Hash) || attributes.empty?
|
65
|
+
|
66
|
+
# convert string to symbol for hash key
|
67
|
+
attributes = attributes.inject({}){|memo,(k,v)| memo[k.to_sym] = v; memo}
|
68
|
+
|
69
|
+
|
70
|
+
if attributes[:'event_type']
|
71
|
+
self.event_type = attributes[:'event_type']
|
72
|
+
end
|
73
|
+
|
74
|
+
if attributes[:'event_type_int']
|
75
|
+
self.event_type_int = attributes[:'event_type_int']
|
76
|
+
end
|
77
|
+
|
78
|
+
if attributes[:'fqn']
|
79
|
+
self.fqn = attributes[:'fqn']
|
80
|
+
end
|
81
|
+
|
82
|
+
if attributes[:'localname']
|
83
|
+
self.localname = attributes[:'localname']
|
84
|
+
end
|
85
|
+
|
86
|
+
if attributes[:'namespace']
|
87
|
+
self.namespace = attributes[:'namespace']
|
88
|
+
end
|
89
|
+
|
90
|
+
if attributes[:'on_behalf_of']
|
91
|
+
self.on_behalf_of = attributes[:'on_behalf_of']
|
92
|
+
end
|
93
|
+
|
94
|
+
if attributes[:'payload']
|
95
|
+
self.payload = attributes[:'payload']
|
96
|
+
end
|
97
|
+
|
98
|
+
if attributes[:'principal_name']
|
99
|
+
self.principal_name = attributes[:'principal_name']
|
100
|
+
end
|
101
|
+
|
102
|
+
if attributes[:'resource_type']
|
103
|
+
self.resource_type = attributes[:'resource_type']
|
104
|
+
end
|
105
|
+
|
106
|
+
if attributes[:'timestamp']
|
107
|
+
self.timestamp = attributes[:'timestamp']
|
108
|
+
end
|
109
|
+
|
110
|
+
if attributes[:'uuid']
|
111
|
+
self.uuid = attributes[:'uuid']
|
112
|
+
end
|
113
|
+
|
114
|
+
end
|
115
|
+
|
116
|
+
end
|
117
|
+
end
|
@@ -0,0 +1,85 @@
|
|
1
|
+
module Apcera
|
2
|
+
#
|
3
|
+
class AuditLogItemOld < BaseObject
|
4
|
+
attr_accessor :action, :allowed, :method, :requester_addr, :resp_msg, :response_time, :t
|
5
|
+
# attribute mapping from ruby-style variable name to JSON key
|
6
|
+
def self.attribute_map
|
7
|
+
{
|
8
|
+
|
9
|
+
# URL endpoint of action.
|
10
|
+
:'action' => :'action',
|
11
|
+
|
12
|
+
# Indicates if action was allowed (true) or not (false).
|
13
|
+
:'allowed' => :'allowed',
|
14
|
+
|
15
|
+
# HTTP method.
|
16
|
+
:'method' => :'method',
|
17
|
+
|
18
|
+
# IP address of client that made request.
|
19
|
+
:'requester_addr' => :'requester_addr',
|
20
|
+
|
21
|
+
# Response message, if any.
|
22
|
+
:'resp_msg' => :'resp_msg',
|
23
|
+
|
24
|
+
# Time it took to respond to the request in milliseconds.
|
25
|
+
:'response_time' => :'response_time',
|
26
|
+
|
27
|
+
# Date-time stamp of request.
|
28
|
+
:'t' => :'t'
|
29
|
+
|
30
|
+
}
|
31
|
+
end
|
32
|
+
|
33
|
+
# attribute type
|
34
|
+
def self.swagger_types
|
35
|
+
{
|
36
|
+
:'action' => :'String',
|
37
|
+
:'allowed' => :'BOOLEAN',
|
38
|
+
:'method' => :'String',
|
39
|
+
:'requester_addr' => :'String',
|
40
|
+
:'resp_msg' => :'String',
|
41
|
+
:'response_time' => :'Integer',
|
42
|
+
:'t' => :'DateTime'
|
43
|
+
|
44
|
+
}
|
45
|
+
end
|
46
|
+
|
47
|
+
def initialize(attributes = {})
|
48
|
+
return if !attributes.is_a?(Hash) || attributes.empty?
|
49
|
+
|
50
|
+
# convert string to symbol for hash key
|
51
|
+
attributes = attributes.inject({}){|memo,(k,v)| memo[k.to_sym] = v; memo}
|
52
|
+
|
53
|
+
|
54
|
+
if attributes[:'action']
|
55
|
+
self.action = attributes[:'action']
|
56
|
+
end
|
57
|
+
|
58
|
+
if attributes[:'allowed']
|
59
|
+
self.allowed = attributes[:'allowed']
|
60
|
+
end
|
61
|
+
|
62
|
+
if attributes[:'method']
|
63
|
+
self.method = attributes[:'method']
|
64
|
+
end
|
65
|
+
|
66
|
+
if attributes[:'requester_addr']
|
67
|
+
self.requester_addr = attributes[:'requester_addr']
|
68
|
+
end
|
69
|
+
|
70
|
+
if attributes[:'resp_msg']
|
71
|
+
self.resp_msg = attributes[:'resp_msg']
|
72
|
+
end
|
73
|
+
|
74
|
+
if attributes[:'response_time']
|
75
|
+
self.response_time = attributes[:'response_time']
|
76
|
+
end
|
77
|
+
|
78
|
+
if attributes[:'t']
|
79
|
+
self.t = attributes[:'t']
|
80
|
+
end
|
81
|
+
|
82
|
+
end
|
83
|
+
|
84
|
+
end
|
85
|
+
end
|
@@ -0,0 +1,96 @@
|
|
1
|
+
require 'date'
|
2
|
+
|
3
|
+
module Apcera
|
4
|
+
# base class containing fundamental method such as to_hash, build_from_hash and more
|
5
|
+
class BaseObject
|
6
|
+
|
7
|
+
# build the object from hash
|
8
|
+
def build_from_hash(attributes)
|
9
|
+
return nil unless attributes.is_a?(Hash)
|
10
|
+
self.class.swagger_types.each_pair do |key, type|
|
11
|
+
if type =~ /^Array<(.*)>/i
|
12
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
13
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
|
14
|
+
else
|
15
|
+
#TODO show warning in debug mode
|
16
|
+
end
|
17
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
18
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
19
|
+
else
|
20
|
+
# data not found in attributes(hash), not an issue as the data can be optional
|
21
|
+
end
|
22
|
+
end
|
23
|
+
|
24
|
+
self
|
25
|
+
end
|
26
|
+
|
27
|
+
def _deserialize(type, value)
|
28
|
+
case type.to_sym
|
29
|
+
when :DateTime
|
30
|
+
DateTime.parse(value)
|
31
|
+
when :Date
|
32
|
+
Date.parse(value)
|
33
|
+
when :String
|
34
|
+
value.to_s
|
35
|
+
when :Integer
|
36
|
+
value.to_i
|
37
|
+
when :Float
|
38
|
+
value.to_f
|
39
|
+
when :BOOLEAN
|
40
|
+
if value.to_s =~ /^(true|t|yes|y|1)$/i
|
41
|
+
true
|
42
|
+
else
|
43
|
+
false
|
44
|
+
end
|
45
|
+
else # model
|
46
|
+
# _model = Apcera.const_get(type).new
|
47
|
+
# _model.build_from_hash(value)
|
48
|
+
# JRS
|
49
|
+
#
|
50
|
+
if (type.to_s.start_with?("Hash"))
|
51
|
+
_model = JSON.parse(value.to_json)
|
52
|
+
_model
|
53
|
+
else
|
54
|
+
_model = Apcera.const_get(type).new
|
55
|
+
_model.build_from_hash(value)
|
56
|
+
end
|
57
|
+
end
|
58
|
+
end
|
59
|
+
|
60
|
+
def to_s
|
61
|
+
to_hash.to_s
|
62
|
+
end
|
63
|
+
|
64
|
+
# to_body is an alias to to_body (backward compatibility))
|
65
|
+
def to_body
|
66
|
+
to_hash
|
67
|
+
end
|
68
|
+
|
69
|
+
# return the object in the form of hash
|
70
|
+
def to_hash
|
71
|
+
hash = {}
|
72
|
+
self.class.attribute_map.each_pair do |key, value|
|
73
|
+
if self.send(key).is_a?(Array)
|
74
|
+
next if self.send(key).empty?
|
75
|
+
hash[value] = self.send(key).select{|v| !v.nil?}.map{ |v| _to_hash v} unless self.send(key).nil?
|
76
|
+
else
|
77
|
+
unless (_tmp_value = _to_hash self.send(key)).nil?
|
78
|
+
hash[value] = _tmp_value
|
79
|
+
end
|
80
|
+
end
|
81
|
+
end
|
82
|
+
hash
|
83
|
+
end
|
84
|
+
|
85
|
+
# Method to output non-array value in the form of hash
|
86
|
+
# For object, use to_hash. Otherwise, just return the value
|
87
|
+
def _to_hash(value)
|
88
|
+
if value.respond_to? :to_hash
|
89
|
+
value.to_hash
|
90
|
+
else
|
91
|
+
value
|
92
|
+
end
|
93
|
+
end
|
94
|
+
|
95
|
+
end
|
96
|
+
end
|
@@ -0,0 +1,137 @@
|
|
1
|
+
module Apcera
|
2
|
+
#
|
3
|
+
class Binding < BaseObject
|
4
|
+
attr_accessor :env_var, :fqn, :job_fqn, :name, :parameters, :provider_fqn, :service_fqn, :target_job_bound_ip, :target_job_bound_port, :target_job_fqn, :target_job_port, :target_job_uuid, :uuid
|
5
|
+
# attribute mapping from ruby-style variable name to JSON key
|
6
|
+
def self.attribute_map
|
7
|
+
{
|
8
|
+
|
9
|
+
# List of environment variables generated for the binding.
|
10
|
+
:'env_var' => :'env_var',
|
11
|
+
|
12
|
+
# The binding's fully-qualified name.
|
13
|
+
:'fqn' => :'fqn',
|
14
|
+
|
15
|
+
# Fully-qualified name of the job that is bound to another job or service.
|
16
|
+
:'job_fqn' => :'job_fqn',
|
17
|
+
|
18
|
+
# The base name of the binding.
|
19
|
+
:'name' => :'name',
|
20
|
+
|
21
|
+
# A map of custom binding parameter names to their values.
|
22
|
+
:'parameters' => :'parameters',
|
23
|
+
|
24
|
+
# Fully-qualified name of the provider used to create the service to which the source job is bound. Only relevant for job-to-service bindings.
|
25
|
+
:'provider_fqn' => :'provider_fqn',
|
26
|
+
|
27
|
+
# Fully-qualified name of a the service to which the source job is bound. Only relevant for for job-to-service bindings.
|
28
|
+
:'service_fqn' => :'service_fqn',
|
29
|
+
|
30
|
+
# IP address where the connection to the target job should be exposed.
|
31
|
+
:'target_job_bound_ip' => :'target_job_bound_ip',
|
32
|
+
|
33
|
+
# Port that the target job should be exposed at.
|
34
|
+
:'target_job_bound_port' => :'target_job_bound_port',
|
35
|
+
|
36
|
+
# Fully-qualified name of the job to which the source job wants to bind (input only).
|
37
|
+
:'target_job_fqn' => :'target_job_fqn',
|
38
|
+
|
39
|
+
# Port on the target job that the source job wants to bind to.
|
40
|
+
:'target_job_port' => :'target_job_port',
|
41
|
+
|
42
|
+
# UUID of the job to which the source job is bound (output only).
|
43
|
+
:'target_job_uuid' => :'target_job_uuid',
|
44
|
+
|
45
|
+
# The binding's unique identifier.
|
46
|
+
:'uuid' => :'uuid'
|
47
|
+
|
48
|
+
}
|
49
|
+
end
|
50
|
+
|
51
|
+
# attribute type
|
52
|
+
def self.swagger_types
|
53
|
+
{
|
54
|
+
:'env_var' => :'Array<String>',
|
55
|
+
:'fqn' => :'String',
|
56
|
+
:'job_fqn' => :'String',
|
57
|
+
:'name' => :'String',
|
58
|
+
:'parameters' => :'Hash<String, String>',
|
59
|
+
:'provider_fqn' => :'String',
|
60
|
+
:'service_fqn' => :'String',
|
61
|
+
:'target_job_bound_ip' => :'String',
|
62
|
+
:'target_job_bound_port' => :'String',
|
63
|
+
:'target_job_fqn' => :'String',
|
64
|
+
:'target_job_port' => :'String',
|
65
|
+
:'target_job_uuid' => :'String',
|
66
|
+
:'uuid' => :'String'
|
67
|
+
|
68
|
+
}
|
69
|
+
end
|
70
|
+
|
71
|
+
def initialize(attributes = {})
|
72
|
+
return if !attributes.is_a?(Hash) || attributes.empty?
|
73
|
+
|
74
|
+
# convert string to symbol for hash key
|
75
|
+
attributes = attributes.inject({}){|memo,(k,v)| memo[k.to_sym] = v; memo}
|
76
|
+
|
77
|
+
|
78
|
+
if attributes[:'env_var']
|
79
|
+
if (value = attributes[:'env_var']).is_a?(Array)
|
80
|
+
self.env_var = value
|
81
|
+
end
|
82
|
+
end
|
83
|
+
|
84
|
+
if attributes[:'fqn']
|
85
|
+
self.fqn = attributes[:'fqn']
|
86
|
+
end
|
87
|
+
|
88
|
+
if attributes[:'job_fqn']
|
89
|
+
self.job_fqn = attributes[:'job_fqn']
|
90
|
+
end
|
91
|
+
|
92
|
+
if attributes[:'name']
|
93
|
+
self.name = attributes[:'name']
|
94
|
+
end
|
95
|
+
|
96
|
+
if attributes[:'parameters']
|
97
|
+
if (value = attributes[:'parameters']).is_a?(Array)
|
98
|
+
self.parameters = value
|
99
|
+
end
|
100
|
+
end
|
101
|
+
|
102
|
+
if attributes[:'provider_fqn']
|
103
|
+
self.provider_fqn = attributes[:'provider_fqn']
|
104
|
+
end
|
105
|
+
|
106
|
+
if attributes[:'service_fqn']
|
107
|
+
self.service_fqn = attributes[:'service_fqn']
|
108
|
+
end
|
109
|
+
|
110
|
+
if attributes[:'target_job_bound_ip']
|
111
|
+
self.target_job_bound_ip = attributes[:'target_job_bound_ip']
|
112
|
+
end
|
113
|
+
|
114
|
+
if attributes[:'target_job_bound_port']
|
115
|
+
self.target_job_bound_port = attributes[:'target_job_bound_port']
|
116
|
+
end
|
117
|
+
|
118
|
+
if attributes[:'target_job_fqn']
|
119
|
+
self.target_job_fqn = attributes[:'target_job_fqn']
|
120
|
+
end
|
121
|
+
|
122
|
+
if attributes[:'target_job_port']
|
123
|
+
self.target_job_port = attributes[:'target_job_port']
|
124
|
+
end
|
125
|
+
|
126
|
+
if attributes[:'target_job_uuid']
|
127
|
+
self.target_job_uuid = attributes[:'target_job_uuid']
|
128
|
+
end
|
129
|
+
|
130
|
+
if attributes[:'uuid']
|
131
|
+
self.uuid = attributes[:'uuid']
|
132
|
+
end
|
133
|
+
|
134
|
+
end
|
135
|
+
|
136
|
+
end
|
137
|
+
end
|
@@ -0,0 +1,197 @@
|
|
1
|
+
module Apcera
|
2
|
+
#
|
3
|
+
class CreateDockerJobRequest < BaseObject
|
4
|
+
attr_accessor :allow_egress, :env, :exposed_ports, :group, :hard_scheduling_tags, :ignore_volumes, :image_url, :interactive, :job_fqn, :resources, :restart, :routes, :soft_scheduling_tags, :start, :start_command, :stop_command, :user, :volume_provider_fqn, :volumes
|
5
|
+
# attribute mapping from ruby-style variable name to JSON key
|
6
|
+
def self.attribute_map
|
7
|
+
{
|
8
|
+
|
9
|
+
# If `true`, the job is allowed outbound network connectivity.
|
10
|
+
:'allow_egress' => :'allow_egress',
|
11
|
+
|
12
|
+
# List of environment variables that are added to the job.
|
13
|
+
:'env' => :'env',
|
14
|
+
|
15
|
+
# An array of ports exposed on job instances.
|
16
|
+
:'exposed_ports' => :'exposed_ports',
|
17
|
+
|
18
|
+
# Group to run Docker image as (default: picked by Apcera).
|
19
|
+
:'group' => :'group',
|
20
|
+
|
21
|
+
# List of hard scheduling tags. See [Hard Tags](http://enterprise-docs.apcera.com/other/job-scheduling/#hard-tags) for more information.
|
22
|
+
:'hard_scheduling_tags' => :'hard_scheduling_tags',
|
23
|
+
|
24
|
+
# If `true`, volumes specified in the Docker image spec are ignored and no data will be persisted. If `false` or not specified, and the Docker image specifies volumes, then you must supply a provider FQN in the request object's `volume_provider_fqn` property.
|
25
|
+
:'ignore_volumes' => :'ignore_volumes',
|
26
|
+
|
27
|
+
# Docker image URL.
|
28
|
+
:'image_url' => :'image_url',
|
29
|
+
|
30
|
+
# If `true`, the start command is removed from the job definition. The start command string is saved to the `DOCKER_START_COMMAND` environment variable on the job's environment.
|
31
|
+
:'interactive' => :'interactive',
|
32
|
+
|
33
|
+
# The fully-qualified name of the job to create from the Docker image.
|
34
|
+
:'job_fqn' => :'job_fqn',
|
35
|
+
|
36
|
+
# A list of compute and network resources that the job can consume.
|
37
|
+
:'resources' => :'resources',
|
38
|
+
|
39
|
+
# Configuration related to restarting the job.
|
40
|
+
:'restart' => :'restart',
|
41
|
+
|
42
|
+
# A map of routes to the ports where the routes are available.
|
43
|
+
:'routes' => :'routes',
|
44
|
+
|
45
|
+
# List of soft scheduling tags. See [Soft Tags](http://enterprise-docs.apcera.com/other/job-scheduling/#soft-tags) for more information.
|
46
|
+
:'soft_scheduling_tags' => :'soft_scheduling_tags',
|
47
|
+
|
48
|
+
# If `true` the job is started after its created. Default is `false`.
|
49
|
+
:'start' => :'start',
|
50
|
+
|
51
|
+
# 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.
|
52
|
+
:'start_command' => :'start_command',
|
53
|
+
|
54
|
+
# 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.
|
55
|
+
:'stop_command' => :'stop_command',
|
56
|
+
|
57
|
+
# User to run Docker image as. Defaults to user in the Docker image configuration, or 'root' if image doesn't have a user configured.
|
58
|
+
:'user' => :'user',
|
59
|
+
|
60
|
+
# Volume provider's fully-qualified name. Required if `ignore_volumes` is not set to `true`.
|
61
|
+
:'volume_provider_fqn' => :'volume_provider_fqn',
|
62
|
+
|
63
|
+
# A list of volumes used by the Docker image for persistence.
|
64
|
+
:'volumes' => :'volumes'
|
65
|
+
|
66
|
+
}
|
67
|
+
end
|
68
|
+
|
69
|
+
# attribute type
|
70
|
+
def self.swagger_types
|
71
|
+
{
|
72
|
+
:'allow_egress' => :'BOOLEAN',
|
73
|
+
:'env' => :'Hash<String, String>',
|
74
|
+
:'exposed_ports' => :'Array<Integer>',
|
75
|
+
:'group' => :'String',
|
76
|
+
:'hard_scheduling_tags' => :'Hash<String, BOOLEAN>',
|
77
|
+
:'ignore_volumes' => :'BOOLEAN',
|
78
|
+
:'image_url' => :'String',
|
79
|
+
:'interactive' => :'BOOLEAN',
|
80
|
+
:'job_fqn' => :'String',
|
81
|
+
:'resources' => :'Resource',
|
82
|
+
:'restart' => :'RestartConfig',
|
83
|
+
:'routes' => :'Hash<String, Integer>',
|
84
|
+
:'soft_scheduling_tags' => :'Hash<String, BOOLEAN>',
|
85
|
+
:'start' => :'BOOLEAN',
|
86
|
+
:'start_command' => :'Array<String>',
|
87
|
+
:'stop_command' => :'Array<String>',
|
88
|
+
:'user' => :'String',
|
89
|
+
:'volume_provider_fqn' => :'String',
|
90
|
+
:'volumes' => :'Array<String>'
|
91
|
+
|
92
|
+
}
|
93
|
+
end
|
94
|
+
|
95
|
+
def initialize(attributes = {})
|
96
|
+
return if !attributes.is_a?(Hash) || attributes.empty?
|
97
|
+
|
98
|
+
# convert string to symbol for hash key
|
99
|
+
attributes = attributes.inject({}){|memo,(k,v)| memo[k.to_sym] = v; memo}
|
100
|
+
|
101
|
+
|
102
|
+
if attributes[:'allow_egress']
|
103
|
+
self.allow_egress = attributes[:'allow_egress']
|
104
|
+
end
|
105
|
+
|
106
|
+
if attributes[:'env']
|
107
|
+
if (value = attributes[:'env']).is_a?(Array)
|
108
|
+
self.env = value
|
109
|
+
end
|
110
|
+
end
|
111
|
+
|
112
|
+
if attributes[:'exposed_ports']
|
113
|
+
if (value = attributes[:'exposed_ports']).is_a?(Array)
|
114
|
+
self.exposed_ports = value
|
115
|
+
end
|
116
|
+
end
|
117
|
+
|
118
|
+
if attributes[:'group']
|
119
|
+
self.group = attributes[:'group']
|
120
|
+
end
|
121
|
+
|
122
|
+
if attributes[:'hard_scheduling_tags']
|
123
|
+
if (value = attributes[:'hard_scheduling_tags']).is_a?(Array)
|
124
|
+
self.hard_scheduling_tags = value
|
125
|
+
end
|
126
|
+
end
|
127
|
+
|
128
|
+
if attributes[:'ignore_volumes']
|
129
|
+
self.ignore_volumes = attributes[:'ignore_volumes']
|
130
|
+
end
|
131
|
+
|
132
|
+
if attributes[:'image_url']
|
133
|
+
self.image_url = attributes[:'image_url']
|
134
|
+
end
|
135
|
+
|
136
|
+
if attributes[:'interactive']
|
137
|
+
self.interactive = attributes[:'interactive']
|
138
|
+
end
|
139
|
+
|
140
|
+
if attributes[:'job_fqn']
|
141
|
+
self.job_fqn = attributes[:'job_fqn']
|
142
|
+
end
|
143
|
+
|
144
|
+
if attributes[:'resources']
|
145
|
+
self.resources = attributes[:'resources']
|
146
|
+
end
|
147
|
+
|
148
|
+
if attributes[:'restart']
|
149
|
+
self.restart = attributes[:'restart']
|
150
|
+
end
|
151
|
+
|
152
|
+
if attributes[:'routes']
|
153
|
+
if (value = attributes[:'routes']).is_a?(Array)
|
154
|
+
self.routes = value
|
155
|
+
end
|
156
|
+
end
|
157
|
+
|
158
|
+
if attributes[:'soft_scheduling_tags']
|
159
|
+
if (value = attributes[:'soft_scheduling_tags']).is_a?(Array)
|
160
|
+
self.soft_scheduling_tags = value
|
161
|
+
end
|
162
|
+
end
|
163
|
+
|
164
|
+
if attributes[:'start']
|
165
|
+
self.start = attributes[:'start']
|
166
|
+
end
|
167
|
+
|
168
|
+
if attributes[:'start_command']
|
169
|
+
if (value = attributes[:'start_command']).is_a?(Array)
|
170
|
+
self.start_command = value
|
171
|
+
end
|
172
|
+
end
|
173
|
+
|
174
|
+
if attributes[:'stop_command']
|
175
|
+
if (value = attributes[:'stop_command']).is_a?(Array)
|
176
|
+
self.stop_command = value
|
177
|
+
end
|
178
|
+
end
|
179
|
+
|
180
|
+
if attributes[:'user']
|
181
|
+
self.user = attributes[:'user']
|
182
|
+
end
|
183
|
+
|
184
|
+
if attributes[:'volume_provider_fqn']
|
185
|
+
self.volume_provider_fqn = attributes[:'volume_provider_fqn']
|
186
|
+
end
|
187
|
+
|
188
|
+
if attributes[:'volumes']
|
189
|
+
if (value = attributes[:'volumes']).is_a?(Array)
|
190
|
+
self.volumes = value
|
191
|
+
end
|
192
|
+
end
|
193
|
+
|
194
|
+
end
|
195
|
+
|
196
|
+
end
|
197
|
+
end
|
@@ -0,0 +1,37 @@
|
|
1
|
+
module Apcera
|
2
|
+
#
|
3
|
+
class CreateDockerJobResponse < BaseObject
|
4
|
+
attr_accessor :location
|
5
|
+
# attribute mapping from ruby-style variable name to JSON key
|
6
|
+
def self.attribute_map
|
7
|
+
{
|
8
|
+
|
9
|
+
# The location of the Task created for the Docker job creation request. A client can use the location to opt-in to subscribing to the task endpoint.
|
10
|
+
:'location' => :'location'
|
11
|
+
|
12
|
+
}
|
13
|
+
end
|
14
|
+
|
15
|
+
# attribute type
|
16
|
+
def self.swagger_types
|
17
|
+
{
|
18
|
+
:'location' => :'String'
|
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[:'location']
|
31
|
+
self.location = attributes[:'location']
|
32
|
+
end
|
33
|
+
|
34
|
+
end
|
35
|
+
|
36
|
+
end
|
37
|
+
end
|