apache_felix_webconsole_client 0.0.1 → 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 +4 -4
- data/README.md +15 -10
- data/docs/BundleApi.md +285 -0
- data/docs/BundleState.md +9 -0
- data/lib/apache_felix_webconsole_client.rb +2 -1
- data/lib/apache_felix_webconsole_client/api/bundle_api.rb +347 -0
- data/lib/apache_felix_webconsole_client/api_client.rb +7 -16
- data/lib/apache_felix_webconsole_client/api_error.rb +5 -7
- data/lib/apache_felix_webconsole_client/models/bundle.rb +4 -4
- data/lib/apache_felix_webconsole_client/models/bundle_list.rb +4 -4
- data/lib/apache_felix_webconsole_client/models/bundle_props.rb +3 -3
- data/lib/apache_felix_webconsole_client/models/bundle_state.rb +208 -0
- data/lib/apache_felix_webconsole_client/version.rb +1 -1
- data/spec/api/bundle_api_spec.rb +110 -0
- data/spec/api_client_spec.rb +14 -2
- data/spec/configuration_spec.rb +14 -2
- data/spec/models/bundle_list_spec.rb +14 -2
- data/spec/models/bundle_props_spec.rb +14 -2
- data/spec/models/bundle_spec.rb +14 -2
- data/spec/models/bundle_state_spec.rb +59 -0
- data/spec/spec_helper.rb +14 -2
- metadata +10 -6
- data/docs/DefaultApi.md +0 -110
- data/lib/apache_felix_webconsole_client/api/default_api.rb +0 -132
- data/spec/api/default_api_spec.rb +0 -57
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bec23587a2a52f728e6fa7f619ce9c0f475dd33d
|
4
|
+
data.tar.gz: c41d20eb842d7ee508174dfcbaaad0510ef150ce
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 90eea16959e0ffcb69ccf10f0ec9fe80d220c9e9200d4787377190644d5d2d11f2eebed39e53370f82704d6ed60ba0f7ecc36bfe10b823317c884c1265ab267b
|
7
|
+
data.tar.gz: d42a4e50a537b446cb1cabe186ebcbfbd8a8b8467c1d6ed6e40ea060f305a00ebeb74cdf0e8449cd8576859fa10b4ff9b59db701c8e1e326870aedee0abace2f
|
data/README.md
CHANGED
@@ -7,8 +7,9 @@ Client for Apache Felix Web Console API. List bundles, configure services, etc.
|
|
7
7
|
This SDK is automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project:
|
8
8
|
|
9
9
|
- API version: 4.3.0
|
10
|
-
- Package version: 0.
|
11
|
-
- Build
|
10
|
+
- Package version: 0.1.1
|
11
|
+
- Build date: 2017-07-17T15:27:32.631-05:00
|
12
|
+
- Build package: class io.swagger.codegen.languages.RubyClientCodegen
|
12
13
|
|
13
14
|
## Installation
|
14
15
|
|
@@ -23,15 +24,15 @@ gem build apache_felix_webconsole_client.gemspec
|
|
23
24
|
Then either install the gem locally:
|
24
25
|
|
25
26
|
```shell
|
26
|
-
gem install ./apache_felix_webconsole_client-0.
|
27
|
+
gem install ./apache_felix_webconsole_client-0.1.1.gem
|
27
28
|
```
|
28
|
-
(for development, run `gem install --dev ./apache_felix_webconsole_client-0.
|
29
|
+
(for development, run `gem install --dev ./apache_felix_webconsole_client-0.1.1.gem` to install the development dependencies)
|
29
30
|
|
30
31
|
or publish the gem to a gem hosting service, e.g. [RubyGems](https://rubygems.org/).
|
31
32
|
|
32
33
|
Finally add this to the Gemfile:
|
33
34
|
|
34
|
-
gem 'apache_felix_webconsole_client', '~> 0.
|
35
|
+
gem 'apache_felix_webconsole_client', '~> 0.1.1'
|
35
36
|
|
36
37
|
### Install from Git
|
37
38
|
|
@@ -61,17 +62,17 @@ ApacheFelix.configure do |config|
|
|
61
62
|
config.password = 'YOUR PASSWORD'
|
62
63
|
end
|
63
64
|
|
64
|
-
api_instance = ApacheFelix::
|
65
|
+
api_instance = ApacheFelix::BundleApi.new
|
65
66
|
|
66
67
|
bundle_id = "bundle_id_example" # String | The symbolic name or id of the bundle.
|
67
68
|
|
68
69
|
|
69
70
|
begin
|
70
71
|
#Bundle Info
|
71
|
-
result = api_instance.
|
72
|
+
result = api_instance.info(bundle_id)
|
72
73
|
p result
|
73
74
|
rescue ApacheFelix::ApiError => e
|
74
|
-
puts "Exception when calling
|
75
|
+
puts "Exception when calling BundleApi->info: #{e}"
|
75
76
|
end
|
76
77
|
|
77
78
|
```
|
@@ -82,8 +83,11 @@ All URIs are relative to *http://localhost:8080/system/console*
|
|
82
83
|
|
83
84
|
Class | Method | HTTP request | Description
|
84
85
|
------------ | ------------- | ------------- | -------------
|
85
|
-
*ApacheFelix::
|
86
|
-
*ApacheFelix::
|
86
|
+
*ApacheFelix::BundleApi* | [**info**](docs/BundleApi.md#info) | **GET** /bundles/{bundleId}.json | Bundle Info
|
87
|
+
*ApacheFelix::BundleApi* | [**install**](docs/BundleApi.md#install) | **POST** /bundles/install | Upload a bundle.
|
88
|
+
*ApacheFelix::BundleApi* | [**list**](docs/BundleApi.md#list) | **GET** /bundles.json | List bundles
|
89
|
+
*ApacheFelix::BundleApi* | [**modify**](docs/BundleApi.md#modify) | **POST** /bundles/{bundleSymbolicName} | Modify bundles operation.
|
90
|
+
*ApacheFelix::BundleApi* | [**refresh_packages**](docs/BundleApi.md#refresh_packages) | **POST** /bundles | Modify bundles operation.
|
87
91
|
|
88
92
|
|
89
93
|
## Documentation for Models
|
@@ -91,6 +95,7 @@ Class | Method | HTTP request | Description
|
|
91
95
|
- [ApacheFelix::Bundle](docs/Bundle.md)
|
92
96
|
- [ApacheFelix::BundleList](docs/BundleList.md)
|
93
97
|
- [ApacheFelix::BundleProps](docs/BundleProps.md)
|
98
|
+
- [ApacheFelix::BundleState](docs/BundleState.md)
|
94
99
|
|
95
100
|
|
96
101
|
## Documentation for Authorization
|
data/docs/BundleApi.md
ADDED
@@ -0,0 +1,285 @@
|
|
1
|
+
# ApacheFelix::BundleApi
|
2
|
+
|
3
|
+
All URIs are relative to *http://localhost:8080/system/console*
|
4
|
+
|
5
|
+
Method | HTTP request | Description
|
6
|
+
------------- | ------------- | -------------
|
7
|
+
[**info**](BundleApi.md#info) | **GET** /bundles/{bundleId}.json | Bundle Info
|
8
|
+
[**install**](BundleApi.md#install) | **POST** /bundles/install | Upload a bundle.
|
9
|
+
[**list**](BundleApi.md#list) | **GET** /bundles.json | List bundles
|
10
|
+
[**modify**](BundleApi.md#modify) | **POST** /bundles/{bundleSymbolicName} | Modify bundles operation.
|
11
|
+
[**refresh_packages**](BundleApi.md#refresh_packages) | **POST** /bundles | Modify bundles operation.
|
12
|
+
|
13
|
+
|
14
|
+
# **info**
|
15
|
+
> BundleList info(bundle_id)
|
16
|
+
|
17
|
+
Bundle Info
|
18
|
+
|
19
|
+
Display all information about a bundle, including properties. The returned list will contain one entry, the requested bundle. (See org.apache.felix.webconsole.internal.core.BundlesServlet.java)
|
20
|
+
|
21
|
+
### Example
|
22
|
+
```ruby
|
23
|
+
# load the gem
|
24
|
+
require 'apache_felix_webconsole_client'
|
25
|
+
# setup authorization
|
26
|
+
ApacheFelix.configure do |config|
|
27
|
+
# Configure HTTP basic authorization: basic
|
28
|
+
config.username = 'YOUR USERNAME'
|
29
|
+
config.password = 'YOUR PASSWORD'
|
30
|
+
end
|
31
|
+
|
32
|
+
api_instance = ApacheFelix::BundleApi.new
|
33
|
+
|
34
|
+
bundle_id = "bundle_id_example" # String | The symbolic name or id of the bundle.
|
35
|
+
|
36
|
+
|
37
|
+
begin
|
38
|
+
#Bundle Info
|
39
|
+
result = api_instance.info(bundle_id)
|
40
|
+
p result
|
41
|
+
rescue ApacheFelix::ApiError => e
|
42
|
+
puts "Exception when calling BundleApi->info: #{e}"
|
43
|
+
end
|
44
|
+
```
|
45
|
+
|
46
|
+
### Parameters
|
47
|
+
|
48
|
+
Name | Type | Description | Notes
|
49
|
+
------------- | ------------- | ------------- | -------------
|
50
|
+
**bundle_id** | **String**| The symbolic name or id of the bundle. |
|
51
|
+
|
52
|
+
### Return type
|
53
|
+
|
54
|
+
[**BundleList**](BundleList.md)
|
55
|
+
|
56
|
+
### Authorization
|
57
|
+
|
58
|
+
[basic](../README.md#basic)
|
59
|
+
|
60
|
+
### HTTP request headers
|
61
|
+
|
62
|
+
- **Content-Type**: Not defined
|
63
|
+
- **Accept**: application/json
|
64
|
+
|
65
|
+
|
66
|
+
|
67
|
+
# **install**
|
68
|
+
> install(bundlefile, action, opts)
|
69
|
+
|
70
|
+
Upload a bundle.
|
71
|
+
|
72
|
+
Install the provided bundle. (See org.apache.felix.webconsole.internal.core.BundlesServlet.java)
|
73
|
+
|
74
|
+
### Example
|
75
|
+
```ruby
|
76
|
+
# load the gem
|
77
|
+
require 'apache_felix_webconsole_client'
|
78
|
+
# setup authorization
|
79
|
+
ApacheFelix.configure do |config|
|
80
|
+
# Configure HTTP basic authorization: basic
|
81
|
+
config.username = 'YOUR USERNAME'
|
82
|
+
config.password = 'YOUR PASSWORD'
|
83
|
+
end
|
84
|
+
|
85
|
+
api_instance = ApacheFelix::BundleApi.new
|
86
|
+
|
87
|
+
bundlefile = File.new("/path/to/file.txt") # File | The bundle to upload.
|
88
|
+
|
89
|
+
action = "action_example" # String | The action to execute. Only allowed value is 'install', must be provided. Limitation of Swagger.
|
90
|
+
|
91
|
+
opts = {
|
92
|
+
bundlestart: true, # BOOLEAN | Flag to indicate whether or not bundle should be started.
|
93
|
+
bundlestartlevel: 56, # Integer | The start level of the provided bundle.
|
94
|
+
refresh_packages: true # BOOLEAN | Flag to indicate whether or not to refresh all pacakges once installed.
|
95
|
+
}
|
96
|
+
|
97
|
+
begin
|
98
|
+
#Upload a bundle.
|
99
|
+
api_instance.install(bundlefile, action, opts)
|
100
|
+
rescue ApacheFelix::ApiError => e
|
101
|
+
puts "Exception when calling BundleApi->install: #{e}"
|
102
|
+
end
|
103
|
+
```
|
104
|
+
|
105
|
+
### Parameters
|
106
|
+
|
107
|
+
Name | Type | Description | Notes
|
108
|
+
------------- | ------------- | ------------- | -------------
|
109
|
+
**bundlefile** | **File**| The bundle to upload. |
|
110
|
+
**action** | **String**| The action to execute. Only allowed value is 'install', must be provided. Limitation of Swagger. |
|
111
|
+
**bundlestart** | **BOOLEAN**| Flag to indicate whether or not bundle should be started. | [optional]
|
112
|
+
**bundlestartlevel** | **Integer**| The start level of the provided bundle. | [optional]
|
113
|
+
**refresh_packages** | **BOOLEAN**| Flag to indicate whether or not to refresh all pacakges once installed. | [optional]
|
114
|
+
|
115
|
+
### Return type
|
116
|
+
|
117
|
+
nil (empty response body)
|
118
|
+
|
119
|
+
### Authorization
|
120
|
+
|
121
|
+
[basic](../README.md#basic)
|
122
|
+
|
123
|
+
### HTTP request headers
|
124
|
+
|
125
|
+
- **Content-Type**: multipart/form-data
|
126
|
+
- **Accept**: Not defined
|
127
|
+
|
128
|
+
|
129
|
+
|
130
|
+
# **list**
|
131
|
+
> BundleList list
|
132
|
+
|
133
|
+
List bundles
|
134
|
+
|
135
|
+
List all the bundles in the Felix system. Properties for a bundle will not be populated. (See org.apache.felix.webconsole.internal.core.BundlesServlet.java)
|
136
|
+
|
137
|
+
### Example
|
138
|
+
```ruby
|
139
|
+
# load the gem
|
140
|
+
require 'apache_felix_webconsole_client'
|
141
|
+
# setup authorization
|
142
|
+
ApacheFelix.configure do |config|
|
143
|
+
# Configure HTTP basic authorization: basic
|
144
|
+
config.username = 'YOUR USERNAME'
|
145
|
+
config.password = 'YOUR PASSWORD'
|
146
|
+
end
|
147
|
+
|
148
|
+
api_instance = ApacheFelix::BundleApi.new
|
149
|
+
|
150
|
+
begin
|
151
|
+
#List bundles
|
152
|
+
result = api_instance.list
|
153
|
+
p result
|
154
|
+
rescue ApacheFelix::ApiError => e
|
155
|
+
puts "Exception when calling BundleApi->list: #{e}"
|
156
|
+
end
|
157
|
+
```
|
158
|
+
|
159
|
+
### Parameters
|
160
|
+
This endpoint does not need any parameter.
|
161
|
+
|
162
|
+
### Return type
|
163
|
+
|
164
|
+
[**BundleList**](BundleList.md)
|
165
|
+
|
166
|
+
### Authorization
|
167
|
+
|
168
|
+
[basic](../README.md#basic)
|
169
|
+
|
170
|
+
### HTTP request headers
|
171
|
+
|
172
|
+
- **Content-Type**: Not defined
|
173
|
+
- **Accept**: application/json
|
174
|
+
|
175
|
+
|
176
|
+
|
177
|
+
# **modify**
|
178
|
+
> BundleState modify(bundle_symbolic_name, action)
|
179
|
+
|
180
|
+
Modify bundles operation.
|
181
|
+
|
182
|
+
Take action on a bundle; start, stop, update, refresh, uninstall. (See org.apache.felix.webconsole.internal.core.BundlesServlet.java)
|
183
|
+
|
184
|
+
### Example
|
185
|
+
```ruby
|
186
|
+
# load the gem
|
187
|
+
require 'apache_felix_webconsole_client'
|
188
|
+
# setup authorization
|
189
|
+
ApacheFelix.configure do |config|
|
190
|
+
# Configure HTTP basic authorization: basic
|
191
|
+
config.username = 'YOUR USERNAME'
|
192
|
+
config.password = 'YOUR PASSWORD'
|
193
|
+
end
|
194
|
+
|
195
|
+
api_instance = ApacheFelix::BundleApi.new
|
196
|
+
|
197
|
+
bundle_symbolic_name = "bundle_symbolic_name_example" # String | The OSGi Symbolic name of the bundle.
|
198
|
+
|
199
|
+
action = "action_example" # String | The action to execute.
|
200
|
+
|
201
|
+
|
202
|
+
begin
|
203
|
+
#Modify bundles operation.
|
204
|
+
result = api_instance.modify(bundle_symbolic_name, action)
|
205
|
+
p result
|
206
|
+
rescue ApacheFelix::ApiError => e
|
207
|
+
puts "Exception when calling BundleApi->modify: #{e}"
|
208
|
+
end
|
209
|
+
```
|
210
|
+
|
211
|
+
### Parameters
|
212
|
+
|
213
|
+
Name | Type | Description | Notes
|
214
|
+
------------- | ------------- | ------------- | -------------
|
215
|
+
**bundle_symbolic_name** | **String**| The OSGi Symbolic name of the bundle. |
|
216
|
+
**action** | **String**| The action to execute. |
|
217
|
+
|
218
|
+
### Return type
|
219
|
+
|
220
|
+
[**BundleState**](BundleState.md)
|
221
|
+
|
222
|
+
### Authorization
|
223
|
+
|
224
|
+
[basic](../README.md#basic)
|
225
|
+
|
226
|
+
### HTTP request headers
|
227
|
+
|
228
|
+
- **Content-Type**: application/x-www-form-urlencoded
|
229
|
+
- **Accept**: Not defined
|
230
|
+
|
231
|
+
|
232
|
+
|
233
|
+
# **refresh_packages**
|
234
|
+
> BundleList refresh_packages(action)
|
235
|
+
|
236
|
+
Modify bundles operation.
|
237
|
+
|
238
|
+
Take action on all bundles - refresh packages. (See org.apache.felix.webconsole.internal.core.BundlesServlet.java)
|
239
|
+
|
240
|
+
### Example
|
241
|
+
```ruby
|
242
|
+
# load the gem
|
243
|
+
require 'apache_felix_webconsole_client'
|
244
|
+
# setup authorization
|
245
|
+
ApacheFelix.configure do |config|
|
246
|
+
# Configure HTTP basic authorization: basic
|
247
|
+
config.username = 'YOUR USERNAME'
|
248
|
+
config.password = 'YOUR PASSWORD'
|
249
|
+
end
|
250
|
+
|
251
|
+
api_instance = ApacheFelix::BundleApi.new
|
252
|
+
|
253
|
+
action = "action_example" # String | The action to execute. Only allowed value is 'refreshPackages', must be provided. Limitation of Swagger.
|
254
|
+
|
255
|
+
|
256
|
+
begin
|
257
|
+
#Modify bundles operation.
|
258
|
+
result = api_instance.refresh_packages(action)
|
259
|
+
p result
|
260
|
+
rescue ApacheFelix::ApiError => e
|
261
|
+
puts "Exception when calling BundleApi->refresh_packages: #{e}"
|
262
|
+
end
|
263
|
+
```
|
264
|
+
|
265
|
+
### Parameters
|
266
|
+
|
267
|
+
Name | Type | Description | Notes
|
268
|
+
------------- | ------------- | ------------- | -------------
|
269
|
+
**action** | **String**| The action to execute. Only allowed value is 'refreshPackages', must be provided. Limitation of Swagger. |
|
270
|
+
|
271
|
+
### Return type
|
272
|
+
|
273
|
+
[**BundleList**](BundleList.md)
|
274
|
+
|
275
|
+
### Authorization
|
276
|
+
|
277
|
+
[basic](../README.md#basic)
|
278
|
+
|
279
|
+
### HTTP request headers
|
280
|
+
|
281
|
+
- **Content-Type**: application/x-www-form-urlencoded
|
282
|
+
- **Accept**: Not defined
|
283
|
+
|
284
|
+
|
285
|
+
|
data/docs/BundleState.md
ADDED
@@ -31,9 +31,10 @@ require 'apache_felix_webconsole_client/configuration'
|
|
31
31
|
require 'apache_felix_webconsole_client/models/bundle'
|
32
32
|
require 'apache_felix_webconsole_client/models/bundle_list'
|
33
33
|
require 'apache_felix_webconsole_client/models/bundle_props'
|
34
|
+
require 'apache_felix_webconsole_client/models/bundle_state'
|
34
35
|
|
35
36
|
# APIs
|
36
|
-
require 'apache_felix_webconsole_client/api/
|
37
|
+
require 'apache_felix_webconsole_client/api/bundle_api'
|
37
38
|
|
38
39
|
module ApacheFelix
|
39
40
|
class << self
|
@@ -0,0 +1,347 @@
|
|
1
|
+
=begin
|
2
|
+
Apache Felix WebConsole
|
3
|
+
|
4
|
+
Client for Apache Felix Web Console API. List bundles, configure services, etc.
|
5
|
+
|
6
|
+
OpenAPI spec version: 4.3.0
|
7
|
+
Contact: bryan.stopp@gmail.com
|
8
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
+
|
10
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
11
|
+
you may not use this file except in compliance with the License.
|
12
|
+
You may obtain a copy of the License at
|
13
|
+
|
14
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
15
|
+
|
16
|
+
Unless required by applicable law or agreed to in writing, software
|
17
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
18
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
19
|
+
See the License for the specific language governing permissions and
|
20
|
+
limitations under the License.
|
21
|
+
|
22
|
+
=end
|
23
|
+
|
24
|
+
require "uri"
|
25
|
+
|
26
|
+
module ApacheFelix
|
27
|
+
class BundleApi
|
28
|
+
attr_accessor :api_client
|
29
|
+
|
30
|
+
def initialize(api_client = ApiClient.default)
|
31
|
+
@api_client = api_client
|
32
|
+
end
|
33
|
+
|
34
|
+
# Bundle Info
|
35
|
+
# Display all information about a bundle, including properties. The returned list will contain one entry, the requested bundle. (See org.apache.felix.webconsole.internal.core.BundlesServlet.java)
|
36
|
+
# @param bundle_id The symbolic name or id of the bundle.
|
37
|
+
# @param [Hash] opts the optional parameters
|
38
|
+
# @return [BundleList]
|
39
|
+
def info(bundle_id, opts = {})
|
40
|
+
data, _status_code, _headers = info_with_http_info(bundle_id, opts)
|
41
|
+
return data
|
42
|
+
end
|
43
|
+
|
44
|
+
# Bundle Info
|
45
|
+
# Display all information about a bundle, including properties. The returned list will contain one entry, the requested bundle. (See org.apache.felix.webconsole.internal.core.BundlesServlet.java)
|
46
|
+
# @param bundle_id The symbolic name or id of the bundle.
|
47
|
+
# @param [Hash] opts the optional parameters
|
48
|
+
# @return [Array<(BundleList, Fixnum, Hash)>] BundleList data, response status code and response headers
|
49
|
+
def info_with_http_info(bundle_id, opts = {})
|
50
|
+
if @api_client.config.debugging
|
51
|
+
@api_client.config.logger.debug "Calling API: BundleApi.info ..."
|
52
|
+
end
|
53
|
+
# verify the required parameter 'bundle_id' is set
|
54
|
+
fail ArgumentError, "Missing the required parameter 'bundle_id' when calling BundleApi.info" if bundle_id.nil?
|
55
|
+
# resource path
|
56
|
+
local_var_path = "/bundles/{bundleId}.json".sub('{format}','json').sub('{' + 'bundleId' + '}', bundle_id.to_s)
|
57
|
+
|
58
|
+
# query parameters
|
59
|
+
query_params = {}
|
60
|
+
|
61
|
+
# header parameters
|
62
|
+
header_params = {}
|
63
|
+
|
64
|
+
# HTTP header 'Accept' (if needed)
|
65
|
+
local_header_accept = ['application/json']
|
66
|
+
local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
|
67
|
+
|
68
|
+
# HTTP header 'Content-Type'
|
69
|
+
local_header_content_type = []
|
70
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
|
71
|
+
|
72
|
+
# form parameters
|
73
|
+
form_params = {}
|
74
|
+
|
75
|
+
# http body (model)
|
76
|
+
post_body = nil
|
77
|
+
auth_names = ['basic']
|
78
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
79
|
+
:header_params => header_params,
|
80
|
+
:query_params => query_params,
|
81
|
+
:form_params => form_params,
|
82
|
+
:body => post_body,
|
83
|
+
:auth_names => auth_names,
|
84
|
+
:return_type => 'BundleList')
|
85
|
+
if @api_client.config.debugging
|
86
|
+
@api_client.config.logger.debug "API called: BundleApi#info\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
87
|
+
end
|
88
|
+
return data, status_code, headers
|
89
|
+
end
|
90
|
+
|
91
|
+
# Upload a bundle.
|
92
|
+
# Install the provided bundle. (See org.apache.felix.webconsole.internal.core.BundlesServlet.java)
|
93
|
+
# @param bundlefile The bundle to upload.
|
94
|
+
# @param action The action to execute. Only allowed value is 'install', must be provided. Limitation of Swagger.
|
95
|
+
# @param [Hash] opts the optional parameters
|
96
|
+
# @option opts [BOOLEAN] :bundlestart Flag to indicate whether or not bundle should be started.
|
97
|
+
# @option opts [Integer] :bundlestartlevel The start level of the provided bundle.
|
98
|
+
# @option opts [BOOLEAN] :refresh_packages Flag to indicate whether or not to refresh all pacakges once installed.
|
99
|
+
# @return [nil]
|
100
|
+
def install(bundlefile, action, opts = {})
|
101
|
+
install_with_http_info(bundlefile, action, opts)
|
102
|
+
return nil
|
103
|
+
end
|
104
|
+
|
105
|
+
# Upload a bundle.
|
106
|
+
# Install the provided bundle. (See org.apache.felix.webconsole.internal.core.BundlesServlet.java)
|
107
|
+
# @param bundlefile The bundle to upload.
|
108
|
+
# @param action The action to execute. Only allowed value is 'install', must be provided. Limitation of Swagger.
|
109
|
+
# @param [Hash] opts the optional parameters
|
110
|
+
# @option opts [BOOLEAN] :bundlestart Flag to indicate whether or not bundle should be started.
|
111
|
+
# @option opts [Integer] :bundlestartlevel The start level of the provided bundle.
|
112
|
+
# @option opts [BOOLEAN] :refresh_packages Flag to indicate whether or not to refresh all pacakges once installed.
|
113
|
+
# @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
|
114
|
+
def install_with_http_info(bundlefile, action, opts = {})
|
115
|
+
if @api_client.config.debugging
|
116
|
+
@api_client.config.logger.debug "Calling API: BundleApi.install ..."
|
117
|
+
end
|
118
|
+
# verify the required parameter 'bundlefile' is set
|
119
|
+
fail ArgumentError, "Missing the required parameter 'bundlefile' when calling BundleApi.install" if bundlefile.nil?
|
120
|
+
# verify the required parameter 'action' is set
|
121
|
+
fail ArgumentError, "Missing the required parameter 'action' when calling BundleApi.install" if action.nil?
|
122
|
+
# verify enum value
|
123
|
+
unless ['install'].include?(action)
|
124
|
+
fail ArgumentError, "invalid value for 'action', must be one of install"
|
125
|
+
end
|
126
|
+
# resource path
|
127
|
+
local_var_path = "/bundles/install".sub('{format}','json')
|
128
|
+
|
129
|
+
# query parameters
|
130
|
+
query_params = {}
|
131
|
+
|
132
|
+
# header parameters
|
133
|
+
header_params = {}
|
134
|
+
|
135
|
+
# HTTP header 'Accept' (if needed)
|
136
|
+
local_header_accept = []
|
137
|
+
local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
|
138
|
+
|
139
|
+
# HTTP header 'Content-Type'
|
140
|
+
local_header_content_type = ['multipart/form-data']
|
141
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
|
142
|
+
|
143
|
+
# form parameters
|
144
|
+
form_params = {}
|
145
|
+
form_params["bundlefile"] = bundlefile
|
146
|
+
form_params["action"] = action
|
147
|
+
form_params["bundlestart"] = opts[:'bundlestart'] if !opts[:'bundlestart'].nil?
|
148
|
+
form_params["bundlestartlevel"] = opts[:'bundlestartlevel'] if !opts[:'bundlestartlevel'].nil?
|
149
|
+
form_params["refreshPackages"] = opts[:'refresh_packages'] if !opts[:'refresh_packages'].nil?
|
150
|
+
|
151
|
+
# http body (model)
|
152
|
+
post_body = nil
|
153
|
+
auth_names = ['basic']
|
154
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
155
|
+
:header_params => header_params,
|
156
|
+
:query_params => query_params,
|
157
|
+
:form_params => form_params,
|
158
|
+
:body => post_body,
|
159
|
+
:auth_names => auth_names)
|
160
|
+
if @api_client.config.debugging
|
161
|
+
@api_client.config.logger.debug "API called: BundleApi#install\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
162
|
+
end
|
163
|
+
return data, status_code, headers
|
164
|
+
end
|
165
|
+
|
166
|
+
# List bundles
|
167
|
+
# List all the bundles in the Felix system. Properties for a bundle will not be populated. (See org.apache.felix.webconsole.internal.core.BundlesServlet.java)
|
168
|
+
# @param [Hash] opts the optional parameters
|
169
|
+
# @return [BundleList]
|
170
|
+
def list(opts = {})
|
171
|
+
data, _status_code, _headers = list_with_http_info(opts)
|
172
|
+
return data
|
173
|
+
end
|
174
|
+
|
175
|
+
# List bundles
|
176
|
+
# List all the bundles in the Felix system. Properties for a bundle will not be populated. (See org.apache.felix.webconsole.internal.core.BundlesServlet.java)
|
177
|
+
# @param [Hash] opts the optional parameters
|
178
|
+
# @return [Array<(BundleList, Fixnum, Hash)>] BundleList data, response status code and response headers
|
179
|
+
def list_with_http_info(opts = {})
|
180
|
+
if @api_client.config.debugging
|
181
|
+
@api_client.config.logger.debug "Calling API: BundleApi.list ..."
|
182
|
+
end
|
183
|
+
# resource path
|
184
|
+
local_var_path = "/bundles.json".sub('{format}','json')
|
185
|
+
|
186
|
+
# query parameters
|
187
|
+
query_params = {}
|
188
|
+
|
189
|
+
# header parameters
|
190
|
+
header_params = {}
|
191
|
+
|
192
|
+
# HTTP header 'Accept' (if needed)
|
193
|
+
local_header_accept = ['application/json']
|
194
|
+
local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
|
195
|
+
|
196
|
+
# HTTP header 'Content-Type'
|
197
|
+
local_header_content_type = []
|
198
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
|
199
|
+
|
200
|
+
# form parameters
|
201
|
+
form_params = {}
|
202
|
+
|
203
|
+
# http body (model)
|
204
|
+
post_body = nil
|
205
|
+
auth_names = ['basic']
|
206
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
207
|
+
:header_params => header_params,
|
208
|
+
:query_params => query_params,
|
209
|
+
:form_params => form_params,
|
210
|
+
:body => post_body,
|
211
|
+
:auth_names => auth_names,
|
212
|
+
:return_type => 'BundleList')
|
213
|
+
if @api_client.config.debugging
|
214
|
+
@api_client.config.logger.debug "API called: BundleApi#list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
215
|
+
end
|
216
|
+
return data, status_code, headers
|
217
|
+
end
|
218
|
+
|
219
|
+
# Modify bundles operation.
|
220
|
+
# Take action on a bundle; start, stop, update, refresh, uninstall. (See org.apache.felix.webconsole.internal.core.BundlesServlet.java)
|
221
|
+
# @param bundle_symbolic_name The OSGi Symbolic name of the bundle.
|
222
|
+
# @param action The action to execute.
|
223
|
+
# @param [Hash] opts the optional parameters
|
224
|
+
# @return [BundleState]
|
225
|
+
def modify(bundle_symbolic_name, action, opts = {})
|
226
|
+
data, _status_code, _headers = modify_with_http_info(bundle_symbolic_name, action, opts)
|
227
|
+
return data
|
228
|
+
end
|
229
|
+
|
230
|
+
# Modify bundles operation.
|
231
|
+
# Take action on a bundle; start, stop, update, refresh, uninstall. (See org.apache.felix.webconsole.internal.core.BundlesServlet.java)
|
232
|
+
# @param bundle_symbolic_name The OSGi Symbolic name of the bundle.
|
233
|
+
# @param action The action to execute.
|
234
|
+
# @param [Hash] opts the optional parameters
|
235
|
+
# @return [Array<(BundleState, Fixnum, Hash)>] BundleState data, response status code and response headers
|
236
|
+
def modify_with_http_info(bundle_symbolic_name, action, opts = {})
|
237
|
+
if @api_client.config.debugging
|
238
|
+
@api_client.config.logger.debug "Calling API: BundleApi.modify ..."
|
239
|
+
end
|
240
|
+
# verify the required parameter 'bundle_symbolic_name' is set
|
241
|
+
fail ArgumentError, "Missing the required parameter 'bundle_symbolic_name' when calling BundleApi.modify" if bundle_symbolic_name.nil?
|
242
|
+
# verify the required parameter 'action' is set
|
243
|
+
fail ArgumentError, "Missing the required parameter 'action' when calling BundleApi.modify" if action.nil?
|
244
|
+
# verify enum value
|
245
|
+
unless ['start', 'stop', 'update', 'refresh', 'uninstall'].include?(action)
|
246
|
+
fail ArgumentError, "invalid value for 'action', must be one of start, stop, update, refresh, uninstall"
|
247
|
+
end
|
248
|
+
# resource path
|
249
|
+
local_var_path = "/bundles/{bundleSymbolicName}".sub('{format}','json').sub('{' + 'bundleSymbolicName' + '}', bundle_symbolic_name.to_s)
|
250
|
+
|
251
|
+
# query parameters
|
252
|
+
query_params = {}
|
253
|
+
|
254
|
+
# header parameters
|
255
|
+
header_params = {}
|
256
|
+
|
257
|
+
# HTTP header 'Accept' (if needed)
|
258
|
+
local_header_accept = []
|
259
|
+
local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
|
260
|
+
|
261
|
+
# HTTP header 'Content-Type'
|
262
|
+
local_header_content_type = ['application/x-www-form-urlencoded']
|
263
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
|
264
|
+
|
265
|
+
# form parameters
|
266
|
+
form_params = {}
|
267
|
+
form_params["action"] = action
|
268
|
+
|
269
|
+
# http body (model)
|
270
|
+
post_body = nil
|
271
|
+
auth_names = ['basic']
|
272
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
273
|
+
:header_params => header_params,
|
274
|
+
:query_params => query_params,
|
275
|
+
:form_params => form_params,
|
276
|
+
:body => post_body,
|
277
|
+
:auth_names => auth_names,
|
278
|
+
:return_type => 'BundleState')
|
279
|
+
if @api_client.config.debugging
|
280
|
+
@api_client.config.logger.debug "API called: BundleApi#modify\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
281
|
+
end
|
282
|
+
return data, status_code, headers
|
283
|
+
end
|
284
|
+
|
285
|
+
# Modify bundles operation.
|
286
|
+
# Take action on all bundles - refresh packages. (See org.apache.felix.webconsole.internal.core.BundlesServlet.java)
|
287
|
+
# @param action The action to execute. Only allowed value is 'refreshPackages', must be provided. Limitation of Swagger.
|
288
|
+
# @param [Hash] opts the optional parameters
|
289
|
+
# @return [BundleList]
|
290
|
+
def refresh_packages(action, opts = {})
|
291
|
+
data, _status_code, _headers = refresh_packages_with_http_info(action, opts)
|
292
|
+
return data
|
293
|
+
end
|
294
|
+
|
295
|
+
# Modify bundles operation.
|
296
|
+
# Take action on all bundles - refresh packages. (See org.apache.felix.webconsole.internal.core.BundlesServlet.java)
|
297
|
+
# @param action The action to execute. Only allowed value is 'refreshPackages', must be provided. Limitation of Swagger.
|
298
|
+
# @param [Hash] opts the optional parameters
|
299
|
+
# @return [Array<(BundleList, Fixnum, Hash)>] BundleList data, response status code and response headers
|
300
|
+
def refresh_packages_with_http_info(action, opts = {})
|
301
|
+
if @api_client.config.debugging
|
302
|
+
@api_client.config.logger.debug "Calling API: BundleApi.refresh_packages ..."
|
303
|
+
end
|
304
|
+
# verify the required parameter 'action' is set
|
305
|
+
fail ArgumentError, "Missing the required parameter 'action' when calling BundleApi.refresh_packages" if action.nil?
|
306
|
+
# verify enum value
|
307
|
+
unless ['refreshPackages'].include?(action)
|
308
|
+
fail ArgumentError, "invalid value for 'action', must be one of refreshPackages"
|
309
|
+
end
|
310
|
+
# resource path
|
311
|
+
local_var_path = "/bundles".sub('{format}','json')
|
312
|
+
|
313
|
+
# query parameters
|
314
|
+
query_params = {}
|
315
|
+
|
316
|
+
# header parameters
|
317
|
+
header_params = {}
|
318
|
+
|
319
|
+
# HTTP header 'Accept' (if needed)
|
320
|
+
local_header_accept = []
|
321
|
+
local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
|
322
|
+
|
323
|
+
# HTTP header 'Content-Type'
|
324
|
+
local_header_content_type = ['application/x-www-form-urlencoded']
|
325
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
|
326
|
+
|
327
|
+
# form parameters
|
328
|
+
form_params = {}
|
329
|
+
form_params["action"] = action
|
330
|
+
|
331
|
+
# http body (model)
|
332
|
+
post_body = nil
|
333
|
+
auth_names = ['basic']
|
334
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
335
|
+
:header_params => header_params,
|
336
|
+
:query_params => query_params,
|
337
|
+
:form_params => form_params,
|
338
|
+
:body => post_body,
|
339
|
+
:auth_names => auth_names,
|
340
|
+
:return_type => 'BundleList')
|
341
|
+
if @api_client.config.debugging
|
342
|
+
@api_client.config.logger.debug "API called: BundleApi#refresh_packages\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
343
|
+
end
|
344
|
+
return data, status_code, headers
|
345
|
+
end
|
346
|
+
end
|
347
|
+
end
|