apcera 0.1.7.0 → 0.1.7.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 +4 -4
- data/lib/apcera.rb +6 -5
- data/lib/apcera/api/instances_api.rb +0 -54
- data/lib/apcera/api/jobs_api.rb +66 -57
- data/lib/apcera/api/logs_api.rb +59 -0
- data/lib/apcera/api/services_and_bindings_api.rb +9 -7
- data/lib/apcera/api/utilities_api.rb +6 -114
- data/lib/apcera/api/virtual_networks_api.rb +230 -0
- data/lib/apcera/models/apc_download_url.rb +53 -0
- data/lib/apcera/models/runtime.rb +1 -1
- data/lib/apcera/models/semi_pipe_rule_action.rb +11 -11
- data/lib/apcera/models/service.rb +23 -15
- data/lib/apcera/models/service_request_object.rb +77 -0
- data/lib/apcera/models/version_info.rb +87 -0
- data/lib/apcera/models/virtual_network.rb +37 -37
- data/lib/apcera/models/virtual_network_endpoint.rb +13 -13
- data/lib/apcera/models/virtual_network_endpoint_interface.rb +11 -11
- data/lib/apcera/version.rb +1 -1
- data/lib/apcera_api_helper.rb +3 -2
- metadata +6 -2
@@ -0,0 +1,230 @@
|
|
1
|
+
require "uri"
|
2
|
+
|
3
|
+
module Apcera
|
4
|
+
class VirtualNetworksApi
|
5
|
+
attr_accessor :api_client
|
6
|
+
|
7
|
+
def initialize(api_client = nil)
|
8
|
+
@api_client = api_client || Configuration.api_client
|
9
|
+
end
|
10
|
+
|
11
|
+
# Returns a list of virtual networks.
|
12
|
+
# Returns a list of virtual networks.
|
13
|
+
# @param [Hash] opts the optional parameters
|
14
|
+
# @option opts [String] :authorization
|
15
|
+
# @return [Array<VirtualNetwork>]
|
16
|
+
def networks_get(opts = {})
|
17
|
+
|
18
|
+
if Configuration.debugging
|
19
|
+
Configuration.logger.debug "Calling API: VirtualNetworksApi#networks_get ..."
|
20
|
+
end
|
21
|
+
|
22
|
+
|
23
|
+
# resource path
|
24
|
+
path = "/networks".sub('{format}','json')
|
25
|
+
|
26
|
+
# query parameters
|
27
|
+
query_params = {}
|
28
|
+
|
29
|
+
# header parameters
|
30
|
+
header_params = {}
|
31
|
+
|
32
|
+
# HTTP header 'Accept' (if needed)
|
33
|
+
_header_accept = []
|
34
|
+
_header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result
|
35
|
+
|
36
|
+
# HTTP header 'Content-Type'
|
37
|
+
_header_content_type = []
|
38
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)
|
39
|
+
header_params[:'authorization'] = opts[:'authorization'] if opts[:'authorization']
|
40
|
+
|
41
|
+
# form parameters
|
42
|
+
form_params = {}
|
43
|
+
|
44
|
+
# http body (model)
|
45
|
+
post_body = nil
|
46
|
+
|
47
|
+
|
48
|
+
auth_names = ['authorization']
|
49
|
+
result = @api_client.call_api(:GET, path,
|
50
|
+
:header_params => header_params,
|
51
|
+
:query_params => query_params,
|
52
|
+
:form_params => form_params,
|
53
|
+
:body => post_body,
|
54
|
+
:auth_names => auth_names,
|
55
|
+
:return_type => 'Array<VirtualNetwork>')
|
56
|
+
if Configuration.debugging
|
57
|
+
Configuration.logger.debug "API called: VirtualNetworksApi#networks_get. Result: #{result.inspect}"
|
58
|
+
end
|
59
|
+
return result
|
60
|
+
end
|
61
|
+
|
62
|
+
# Creates a new virtual network.
|
63
|
+
# Creates a new virtual network.
|
64
|
+
# @param network An object that defines the properties of the new network.
|
65
|
+
# @param [Hash] opts the optional parameters
|
66
|
+
# @option opts [String] :authorization
|
67
|
+
# @return [Array<VirtualNetwork>]
|
68
|
+
def networks_post(network, opts = {})
|
69
|
+
|
70
|
+
if Configuration.debugging
|
71
|
+
Configuration.logger.debug "Calling API: VirtualNetworksApi#networks_post ..."
|
72
|
+
end
|
73
|
+
|
74
|
+
|
75
|
+
# verify the required parameter 'network' is set
|
76
|
+
fail "Missing the required parameter 'network' when calling networks_post" if network.nil?
|
77
|
+
|
78
|
+
# resource path
|
79
|
+
path = "/networks".sub('{format}','json')
|
80
|
+
|
81
|
+
# query parameters
|
82
|
+
query_params = {}
|
83
|
+
|
84
|
+
# header parameters
|
85
|
+
header_params = {}
|
86
|
+
|
87
|
+
# HTTP header 'Accept' (if needed)
|
88
|
+
_header_accept = []
|
89
|
+
_header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result
|
90
|
+
|
91
|
+
# HTTP header 'Content-Type'
|
92
|
+
_header_content_type = []
|
93
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)
|
94
|
+
header_params[:'authorization'] = opts[:'authorization'] if opts[:'authorization']
|
95
|
+
|
96
|
+
# form parameters
|
97
|
+
form_params = {}
|
98
|
+
|
99
|
+
# http body (model)
|
100
|
+
post_body = @api_client.object_to_http_body(network)
|
101
|
+
|
102
|
+
|
103
|
+
auth_names = ['authorization']
|
104
|
+
result = @api_client.call_api(:POST, path,
|
105
|
+
:header_params => header_params,
|
106
|
+
:query_params => query_params,
|
107
|
+
:form_params => form_params,
|
108
|
+
:body => post_body,
|
109
|
+
:auth_names => auth_names,
|
110
|
+
:return_type => 'Array<VirtualNetwork>')
|
111
|
+
if Configuration.debugging
|
112
|
+
Configuration.logger.debug "API called: VirtualNetworksApi#networks_post. Result: #{result.inspect}"
|
113
|
+
end
|
114
|
+
return result
|
115
|
+
end
|
116
|
+
|
117
|
+
# Returns information about the specified virtual network.
|
118
|
+
# Returns information for the specified virtual network.
|
119
|
+
# @param uuid UUID of the virtual network to describe.
|
120
|
+
# @param [Hash] opts the optional parameters
|
121
|
+
# @option opts [String] :authorization
|
122
|
+
# @return [Array<VirtualNetwork>]
|
123
|
+
def networks_uuid_get(uuid, opts = {})
|
124
|
+
|
125
|
+
if Configuration.debugging
|
126
|
+
Configuration.logger.debug "Calling API: VirtualNetworksApi#networks_uuid_get ..."
|
127
|
+
end
|
128
|
+
|
129
|
+
|
130
|
+
# verify the required parameter 'uuid' is set
|
131
|
+
fail "Missing the required parameter 'uuid' when calling networks_uuid_get" if uuid.nil?
|
132
|
+
|
133
|
+
# resource path
|
134
|
+
path = "/networks/{uuid}".sub('{format}','json').sub('{' + 'uuid' + '}', uuid.to_s)
|
135
|
+
|
136
|
+
# query parameters
|
137
|
+
query_params = {}
|
138
|
+
|
139
|
+
# header parameters
|
140
|
+
header_params = {}
|
141
|
+
|
142
|
+
# HTTP header 'Accept' (if needed)
|
143
|
+
_header_accept = []
|
144
|
+
_header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result
|
145
|
+
|
146
|
+
# HTTP header 'Content-Type'
|
147
|
+
_header_content_type = []
|
148
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)
|
149
|
+
header_params[:'authorization'] = opts[:'authorization'] if opts[:'authorization']
|
150
|
+
|
151
|
+
# form parameters
|
152
|
+
form_params = {}
|
153
|
+
|
154
|
+
# http body (model)
|
155
|
+
post_body = nil
|
156
|
+
|
157
|
+
|
158
|
+
auth_names = ['authorization']
|
159
|
+
result = @api_client.call_api(:GET, path,
|
160
|
+
:header_params => header_params,
|
161
|
+
:query_params => query_params,
|
162
|
+
:form_params => form_params,
|
163
|
+
:body => post_body,
|
164
|
+
:auth_names => auth_names,
|
165
|
+
:return_type => 'Array<VirtualNetwork>')
|
166
|
+
if Configuration.debugging
|
167
|
+
Configuration.logger.debug "API called: VirtualNetworksApi#networks_uuid_get. Result: #{result.inspect}"
|
168
|
+
end
|
169
|
+
return result
|
170
|
+
end
|
171
|
+
|
172
|
+
# Deletes the specified virtual network.
|
173
|
+
# Deletes the specified virtual network.
|
174
|
+
# @param uuid UUID of the virtual network to delete.
|
175
|
+
# @param [Hash] opts the optional parameters
|
176
|
+
# @option opts [String] :authorization
|
177
|
+
# @return [nil]
|
178
|
+
def networks_uuid_delete(uuid, opts = {})
|
179
|
+
|
180
|
+
if Configuration.debugging
|
181
|
+
Configuration.logger.debug "Calling API: VirtualNetworksApi#networks_uuid_delete ..."
|
182
|
+
end
|
183
|
+
|
184
|
+
|
185
|
+
# verify the required parameter 'uuid' is set
|
186
|
+
fail "Missing the required parameter 'uuid' when calling networks_uuid_delete" if uuid.nil?
|
187
|
+
|
188
|
+
# resource path
|
189
|
+
path = "/networks/{uuid}".sub('{format}','json').sub('{' + 'uuid' + '}', uuid.to_s)
|
190
|
+
|
191
|
+
# query parameters
|
192
|
+
query_params = {}
|
193
|
+
|
194
|
+
# header parameters
|
195
|
+
header_params = {}
|
196
|
+
|
197
|
+
# HTTP header 'Accept' (if needed)
|
198
|
+
_header_accept = []
|
199
|
+
_header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result
|
200
|
+
|
201
|
+
# HTTP header 'Content-Type'
|
202
|
+
_header_content_type = []
|
203
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)
|
204
|
+
header_params[:'authorization'] = opts[:'authorization'] if opts[:'authorization']
|
205
|
+
|
206
|
+
# form parameters
|
207
|
+
form_params = {}
|
208
|
+
|
209
|
+
# http body (model)
|
210
|
+
post_body = nil
|
211
|
+
|
212
|
+
|
213
|
+
auth_names = ['authorization']
|
214
|
+
@api_client.call_api(:DELETE, path,
|
215
|
+
:header_params => header_params,
|
216
|
+
:query_params => query_params,
|
217
|
+
:form_params => form_params,
|
218
|
+
:body => post_body,
|
219
|
+
:auth_names => auth_names)
|
220
|
+
if Configuration.debugging
|
221
|
+
Configuration.logger.debug "API called: VirtualNetworksApi#networks_uuid_delete"
|
222
|
+
end
|
223
|
+
return nil
|
224
|
+
end
|
225
|
+
end
|
226
|
+
end
|
227
|
+
|
228
|
+
|
229
|
+
|
230
|
+
|
@@ -0,0 +1,53 @@
|
|
1
|
+
module Apcera
|
2
|
+
#
|
3
|
+
class APCDownloadURL < BaseObject
|
4
|
+
attr_accessor :sha256, :size, :url
|
5
|
+
# attribute mapping from ruby-style variable name to JSON key
|
6
|
+
def self.attribute_map
|
7
|
+
{
|
8
|
+
|
9
|
+
# 256-byte hash of file.
|
10
|
+
:'sha256' => :'sha256',
|
11
|
+
|
12
|
+
# Size of the file in bytes.
|
13
|
+
:'size' => :'size',
|
14
|
+
|
15
|
+
# APC file download link.
|
16
|
+
:'url' => :'url'
|
17
|
+
|
18
|
+
}
|
19
|
+
end
|
20
|
+
|
21
|
+
# attribute type
|
22
|
+
def self.swagger_types
|
23
|
+
{
|
24
|
+
:'sha256' => :'String',
|
25
|
+
:'size' => :'Integer',
|
26
|
+
:'url' => :'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[:'sha256']
|
39
|
+
self.sha256 = attributes[:'sha256']
|
40
|
+
end
|
41
|
+
|
42
|
+
if attributes[:'size']
|
43
|
+
self.size = attributes[:'size']
|
44
|
+
end
|
45
|
+
|
46
|
+
if attributes[:'url']
|
47
|
+
self.url = attributes[:'url']
|
48
|
+
end
|
49
|
+
|
50
|
+
end
|
51
|
+
|
52
|
+
end
|
53
|
+
end
|
@@ -9,7 +9,7 @@ module Apcera
|
|
9
9
|
# An array of file names or patterns used to select the appropriate runtime.
|
10
10
|
:'patterns' => :'patterns',
|
11
11
|
|
12
|
-
#
|
12
|
+
# Identifies the runtime (for example, \"bash\", or \"perl\").
|
13
13
|
:'runtime' => :'runtime'
|
14
14
|
|
15
15
|
}
|
@@ -1,7 +1,7 @@
|
|
1
1
|
module Apcera
|
2
2
|
#
|
3
3
|
class SemiPipeRuleAction < BaseObject
|
4
|
-
attr_accessor :commands, :
|
4
|
+
attr_accessor :commands, :inline, :uri
|
5
5
|
# attribute mapping from ruby-style variable name to JSON key
|
6
6
|
def self.attribute_map
|
7
7
|
{
|
@@ -9,11 +9,11 @@ module Apcera
|
|
9
9
|
# Commands that will trigger the hook or notification.
|
10
10
|
:'commands' => :'commands',
|
11
11
|
|
12
|
-
# URL to receive the hook or notification request. Required for notifications, but optional for hooks.
|
13
|
-
:'uri' => :'uri',
|
14
|
-
|
15
12
|
# If no URL is given, you can specify an action directly. URL and action cannot be specified at the same time. Action can be 'allow' or 'deny'.
|
16
|
-
:'inline' => :'inline'
|
13
|
+
:'inline' => :'inline',
|
14
|
+
|
15
|
+
# URL to receive the hook or notification request. Required for notifications, but optional for hooks.
|
16
|
+
:'uri' => :'uri'
|
17
17
|
|
18
18
|
}
|
19
19
|
end
|
@@ -22,8 +22,8 @@ module Apcera
|
|
22
22
|
def self.swagger_types
|
23
23
|
{
|
24
24
|
:'commands' => :'Array<String>',
|
25
|
-
:'
|
26
|
-
:'
|
25
|
+
:'inline' => :'String',
|
26
|
+
:'uri' => :'String'
|
27
27
|
|
28
28
|
}
|
29
29
|
end
|
@@ -41,14 +41,14 @@ module Apcera
|
|
41
41
|
end
|
42
42
|
end
|
43
43
|
|
44
|
-
if attributes[:'uri']
|
45
|
-
self.uri = attributes[:'uri']
|
46
|
-
end
|
47
|
-
|
48
44
|
if attributes[:'inline']
|
49
45
|
self.inline = attributes[:'inline']
|
50
46
|
end
|
51
47
|
|
48
|
+
if attributes[:'uri']
|
49
|
+
self.uri = attributes[:'uri']
|
50
|
+
end
|
51
|
+
|
52
52
|
end
|
53
53
|
|
54
54
|
end
|
@@ -1,39 +1,42 @@
|
|
1
1
|
module Apcera
|
2
2
|
#
|
3
3
|
class Service < BaseObject
|
4
|
-
attr_accessor :created_at, :created_by, :
|
4
|
+
attr_accessor :created_at, :created_by, :description, :extended_status, :fqn, :name, :parameters, :provider_fqn, :status, :type, :uuid
|
5
5
|
# attribute mapping from ruby-style variable name to JSON key
|
6
6
|
def self.attribute_map
|
7
7
|
{
|
8
8
|
|
9
|
-
#
|
9
|
+
# UNIX timestamp when service was created.
|
10
10
|
:'created_at' => :'created_at',
|
11
11
|
|
12
|
-
# Principal name of the user who created the
|
12
|
+
# Principal name of the user who created the service.
|
13
13
|
:'created_by' => :'created_by',
|
14
14
|
|
15
|
+
# A human-readable description of the service.
|
16
|
+
:'description' => :'description',
|
17
|
+
|
15
18
|
# A map of custom binding parameter names to their values.
|
16
19
|
:'extended_status' => :'extended_status',
|
17
20
|
|
18
|
-
#
|
19
|
-
:'description' => :'description',
|
20
|
-
|
21
|
-
# The services's fully-qualified name.
|
21
|
+
# Service's fully-qualified name.
|
22
22
|
:'fqn' => :'fqn',
|
23
23
|
|
24
24
|
# The base name of the binding.
|
25
25
|
:'name' => :'name',
|
26
26
|
|
27
|
-
#
|
27
|
+
# A map of service parameter names to values.
|
28
|
+
:'parameters' => :'parameters',
|
29
|
+
|
30
|
+
# Fully-qualified name of provider used to create service.
|
28
31
|
:'provider_fqn' => :'provider_fqn',
|
29
32
|
|
30
33
|
# The status of service.
|
31
34
|
:'status' => :'status',
|
32
35
|
|
33
|
-
#
|
36
|
+
# A service type ('mysql', 'postgres', 'mongodb', etc.) that corresponds to a service gateway of that type.
|
34
37
|
:'type' => :'type',
|
35
38
|
|
36
|
-
#
|
39
|
+
# Service's unique identifer
|
37
40
|
:'uuid' => :'uuid'
|
38
41
|
|
39
42
|
}
|
@@ -44,10 +47,11 @@ module Apcera
|
|
44
47
|
{
|
45
48
|
:'created_at' => :'DateTime',
|
46
49
|
:'created_by' => :'String',
|
47
|
-
:'extended_status' => :'Hash<String, String>',
|
48
50
|
:'description' => :'String',
|
51
|
+
:'extended_status' => :'Hash<String, String>',
|
49
52
|
:'fqn' => :'String',
|
50
53
|
:'name' => :'String',
|
54
|
+
:'parameters' => :'Object',
|
51
55
|
:'provider_fqn' => :'String',
|
52
56
|
:'status' => :'String',
|
53
57
|
:'type' => :'String',
|
@@ -71,16 +75,16 @@ module Apcera
|
|
71
75
|
self.created_by = attributes[:'created_by']
|
72
76
|
end
|
73
77
|
|
78
|
+
if attributes[:'description']
|
79
|
+
self.description = attributes[:'description']
|
80
|
+
end
|
81
|
+
|
74
82
|
if attributes[:'extended_status']
|
75
83
|
if (value = attributes[:'extended_status']).is_a?(Array)
|
76
84
|
self.extended_status = value
|
77
85
|
end
|
78
86
|
end
|
79
87
|
|
80
|
-
if attributes[:'description']
|
81
|
-
self.description = attributes[:'description']
|
82
|
-
end
|
83
|
-
|
84
88
|
if attributes[:'fqn']
|
85
89
|
self.fqn = attributes[:'fqn']
|
86
90
|
end
|
@@ -89,6 +93,10 @@ module Apcera
|
|
89
93
|
self.name = attributes[:'name']
|
90
94
|
end
|
91
95
|
|
96
|
+
if attributes[:'parameters']
|
97
|
+
self.parameters = attributes[:'parameters']
|
98
|
+
end
|
99
|
+
|
92
100
|
if attributes[:'provider_fqn']
|
93
101
|
self.provider_fqn = attributes[:'provider_fqn']
|
94
102
|
end
|
@@ -0,0 +1,77 @@
|
|
1
|
+
module Apcera
|
2
|
+
#
|
3
|
+
class ServiceRequestObject < BaseObject
|
4
|
+
attr_accessor :description, :fqn, :name, :parameters, :provider_fqn, :type
|
5
|
+
# attribute mapping from ruby-style variable name to JSON key
|
6
|
+
def self.attribute_map
|
7
|
+
{
|
8
|
+
|
9
|
+
# A description of the service.
|
10
|
+
:'description' => :'description',
|
11
|
+
|
12
|
+
# The service's fully-qualified name.
|
13
|
+
:'fqn' => :'fqn',
|
14
|
+
|
15
|
+
# A human-readable description of the service.
|
16
|
+
:'name' => :'name',
|
17
|
+
|
18
|
+
# A map of service parameter names to values.
|
19
|
+
:'parameters' => :'parameters',
|
20
|
+
|
21
|
+
# The fully-qualified name of provider used to create service.
|
22
|
+
:'provider_fqn' => :'provider_fqn',
|
23
|
+
|
24
|
+
# A service type ('mysql', 'postgres', 'mongodb', etc.) that corresponds to a service gateway of that type.
|
25
|
+
:'type' => :'type'
|
26
|
+
|
27
|
+
}
|
28
|
+
end
|
29
|
+
|
30
|
+
# attribute type
|
31
|
+
def self.swagger_types
|
32
|
+
{
|
33
|
+
:'description' => :'String',
|
34
|
+
:'fqn' => :'String',
|
35
|
+
:'name' => :'String',
|
36
|
+
:'parameters' => :'Object',
|
37
|
+
:'provider_fqn' => :'String',
|
38
|
+
:'type' => :'String'
|
39
|
+
|
40
|
+
}
|
41
|
+
end
|
42
|
+
|
43
|
+
def initialize(attributes = {})
|
44
|
+
return if !attributes.is_a?(Hash) || attributes.empty?
|
45
|
+
|
46
|
+
# convert string to symbol for hash key
|
47
|
+
attributes = attributes.inject({}){|memo,(k,v)| memo[k.to_sym] = v; memo}
|
48
|
+
|
49
|
+
|
50
|
+
if attributes[:'description']
|
51
|
+
self.description = attributes[:'description']
|
52
|
+
end
|
53
|
+
|
54
|
+
if attributes[:'fqn']
|
55
|
+
self.fqn = attributes[:'fqn']
|
56
|
+
end
|
57
|
+
|
58
|
+
if attributes[:'name']
|
59
|
+
self.name = attributes[:'name']
|
60
|
+
end
|
61
|
+
|
62
|
+
if attributes[:'parameters']
|
63
|
+
self.parameters = attributes[:'parameters']
|
64
|
+
end
|
65
|
+
|
66
|
+
if attributes[:'provider_fqn']
|
67
|
+
self.provider_fqn = attributes[:'provider_fqn']
|
68
|
+
end
|
69
|
+
|
70
|
+
if attributes[:'type']
|
71
|
+
self.type = attributes[:'type']
|
72
|
+
end
|
73
|
+
|
74
|
+
end
|
75
|
+
|
76
|
+
end
|
77
|
+
end
|