opsmanager_client 0.8.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 1026f1fa13896ffccfef0093ec8fac1953c5d8cd
4
+ data.tar.gz: fb18047c255dd0f3068a663485509c3484adcdad
5
+ SHA512:
6
+ metadata.gz: 543ad0b9ad6ae747a98a8164c80aced95e7702658e818a83d050075ff5dedae6668b1aca4113bf28630f48cee76cdd4602b633b16ab41005d7c9ae7c7cd065f2
7
+ data.tar.gz: 520de90354cd113c003ef18d5bce837fca191c44737638053563e93e0e5e4d729f6f128647d5abb8ea4b4a694f34a51c1d2a2322c971d62684e7012fd8ef99eb
data/LEGAL ADDED
@@ -0,0 +1,13 @@
1
+ Copyright (c) 2014-2015 Pivotal Software, Inc. All rights reserved.
2
+
3
+ Unauthorized use, copying or distribution of this source code via any
4
+ medium is strictly prohibited without the express written consent of
5
+ Pivotal Software, Inc.
6
+
7
+ THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND,
8
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
9
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
10
+ IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
11
+ CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
12
+ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
13
+ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,15 @@
1
+ # Copyright (c) 2014-2015 Pivotal Software, Inc.
2
+ # All rights reserved.
3
+ # THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
4
+ # INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
5
+ # PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
6
+ # LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
7
+ # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
8
+ # USE OR OTHER DEALINGS IN THE SOFTWARE.
9
+ #
10
+
11
+ module OpsmanagerClient
12
+ class Client
13
+ VERSION = "0.8.0"
14
+ end
15
+ end
@@ -0,0 +1,256 @@
1
+ # Copyright (c) 2014-2015 Pivotal Software, Inc.
2
+ # All rights reserved.
3
+ # THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
4
+ # INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
5
+ # PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
6
+ # LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
7
+ # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
8
+ # USE OR OTHER DEALINGS IN THE SOFTWARE.
9
+ #
10
+
11
+ require "opsmanager_client/client/version"
12
+ require "opsmanager_client/product"
13
+ require "opsmanager_client/http_client"
14
+
15
+ module OpsmanagerClient
16
+ class Client
17
+
18
+ module Internals
19
+ class Job
20
+ def initialize(opts={})
21
+ @type = opts.fetch('identifier')
22
+ @guid = opts.fetch('guid')
23
+ @properties = Hash[opts.fetch('properties', {}).map{|property| [property.fetch('identifier'), property.fetch('value',nil)] }]
24
+ @product = opts.fetch('product')
25
+ @partitions = opts.fetch('partitions', []).map{|p| JobPartition.new(p) }
26
+ end
27
+
28
+ attr_reader :type, :guid, :properties, :product, :partitions
29
+
30
+ def ips
31
+ product.ips.values_at(*partitions.map(&:guid)).flatten.compact.uniq
32
+ end
33
+ end
34
+
35
+ class JobPartition
36
+ def initialize(opts={})
37
+ @guid = "#{opts.fetch('job_reference')}-partition-#{opts.fetch('availability_zone_reference')}"
38
+ @installation_name = opts.fetch('installation_name')
39
+ @instance_count = opts.fetch('instance_count')
40
+ @availability_zone_reference = opts.fetch('availability_zone_reference')
41
+ end
42
+
43
+ attr_reader :guid, :installation_name, :instance_count, :availability_zone_reference
44
+ end
45
+
46
+ class Product
47
+ def initialize(opts={})
48
+ @jobs = opts.fetch('jobs').map{|job_details| Internals::Job.new(job_details.merge('product' => self)) }
49
+ @ips = opts.fetch('ips', {})
50
+ @type = opts.fetch('identifier')
51
+ @version = opts.fetch('product_version')
52
+ @guid = opts.fetch('guid')
53
+ @prepared = opts.fetch('prepared')
54
+ end
55
+
56
+ attr_reader :jobs, :ips, :type, :version, :guid, :prepared
57
+
58
+ def job_of_type(job_type)
59
+ jobs.find { |job| job.type == job_type }
60
+ end
61
+
62
+ def has_job_of_type?(job_type)
63
+ job_of_type(job_type) != nil
64
+ end
65
+ end
66
+ end
67
+
68
+ def initialize(url, username, password)
69
+ @http_client = HTTPClient.new(url, username, password)
70
+ end
71
+
72
+ def upload_product(product)
73
+ @http_client.upload_product_from_file(product.file) unless product_uploaded?(product)
74
+ end
75
+
76
+ def add_product(product)
77
+
78
+ if product_added_or_installed?(product)
79
+ return "Product #{product} has already been added to the installation"
80
+ end
81
+
82
+ @http_client.add_product(product)
83
+ end
84
+
85
+ def remove_product(product)
86
+
87
+ if !product_added?(product)
88
+ return "Product #{product} is not added to the installation"
89
+ end
90
+
91
+ guid = guid_for_currently_installed_product_of_type(product.name)
92
+ @http_client.remove_product_with_guid(guid)
93
+ end
94
+
95
+ def cf_installed?
96
+ !installed_products.find { |p| p.type == 'cf' }.nil?
97
+ end
98
+
99
+ def upgrade_product(product)
100
+ if !product_uploaded?(product)
101
+ raise "Unable to find available product"
102
+ end
103
+
104
+ if !different_version_installed?(product)
105
+ raise "No product available to upgrade from"
106
+ end
107
+
108
+ guid = guid_for_currently_installed_product_of_type(product.name)
109
+ @http_client.upgrade_product(product, guid)
110
+ end
111
+
112
+ def delete_unused_products
113
+ @http_client.delete_unused_products
114
+ end
115
+
116
+ def available_products
117
+ @http_client.available_products
118
+ end
119
+
120
+ def product_added_or_installed?(product)
121
+ installed_or_configured_products.any? { |installed_product|
122
+ installed_product.type == product.name &&
123
+ installed_product.version == product.version
124
+ }
125
+ end
126
+
127
+ def product_added?(product)
128
+ installed_or_configured_products.any? { |installed_product|
129
+ installed_product.type == product.name &&
130
+ installed_product.version == product.version &&
131
+ !installed_product.prepared
132
+ }
133
+ end
134
+
135
+ def product_installed?(product)
136
+ installed_or_configured_products.any? { |installed_product|
137
+ installed_product.type == product.name &&
138
+ installed_product.version == product.version &&
139
+ installed_product.prepared
140
+ }
141
+
142
+ end
143
+
144
+ def product_type_installed?(product)
145
+ installed_or_configured_products.any? { |installed_product|
146
+ installed_product.type == product.name
147
+ }
148
+ end
149
+
150
+ def product_uploaded?(product)
151
+ available_products.include?(
152
+ "name" => product.name,
153
+ "product_version" => product.version
154
+ )
155
+ end
156
+
157
+ def uninstall_product_and_apply_changes(product_to_uninstall)
158
+ installed_product = installed_or_configured_products.find { |product|
159
+ product.type == product_to_uninstall.name
160
+ }
161
+
162
+ if installed_product
163
+ @http_client.uninstall_product_with_guid(installed_product.guid)
164
+ apply_changes
165
+ else
166
+ "Product not installed"
167
+ end
168
+ end
169
+
170
+ def apply_changes
171
+ @http_client.apply_changes
172
+ end
173
+
174
+ def cf_admin_credentials
175
+ cf_admin = uaa_job.properties.fetch("admin_credentials")
176
+
177
+ OpenStruct.new(
178
+ :username => cf_admin.fetch("identity"),
179
+ :password => cf_admin.fetch("password")
180
+ )
181
+ end
182
+
183
+ def cf_admin_client_secret
184
+ uaa_job.properties.fetch("admin_client_credentials").fetch("password")
185
+ end
186
+
187
+ def first_ip_of_product_job(product_name, job_type)
188
+ product(product_name).job_of_type(job_type).ips.first
189
+ end
190
+
191
+ def system_domain
192
+ product("cf").job_of_type('cloud_controller').properties.fetch("system_domain")
193
+ end
194
+
195
+ def cc_client_credentials
196
+ OpenStruct.new(
197
+ :identity => "cloud_controller", #Bug in POM means it reports wrong identity cc_client.fetch("identity"),
198
+ :password => uaa_job.properties.fetch("cc_client_credentials").fetch("password")
199
+ )
200
+ end
201
+
202
+ def vms_for_job_type(job_type)
203
+ product = product_that_has_job_of_type(job_type)
204
+ job = product.job_of_type(job_type)
205
+ vm_credentials = job.properties.fetch('vm_credentials')
206
+
207
+ job.ips.map { |ip|
208
+ OpenStruct.new(
209
+ :hostname => ip,
210
+ :username => vm_credentials.fetch("identity"),
211
+ :password => vm_credentials.fetch("password")
212
+ )
213
+ }
214
+ end
215
+
216
+ private
217
+
218
+ def guid_for_currently_installed_product_of_type(type)
219
+ installed_or_configured_products.find { |installed_product|
220
+ installed_product.type == type
221
+ }.guid
222
+ end
223
+
224
+ def different_version_installed?(product)
225
+ installed_or_configured_products.select { |installed_product|
226
+ installed_product.type == product.name && installed_product.version != product.version
227
+ }.any?
228
+ end
229
+
230
+ def product_that_has_job_of_type(job_type)
231
+ installed_or_configured_products.find { |product| product.has_job_of_type?(job_type) }
232
+ end
233
+
234
+ def installed_or_configured_products
235
+ installation.fetch('products').map { |product_options| Internals::Product.new(product_options) }
236
+ end
237
+
238
+ def installed_products
239
+ installed_or_configured_products.reject { |product| product.ips.empty? }
240
+ end
241
+
242
+ def installation
243
+ @http_client.installation
244
+ end
245
+
246
+ def product(product_name)
247
+ installed_or_configured_products.find { |product|
248
+ product.type == product_name
249
+ }
250
+ end
251
+
252
+ def uaa_job
253
+ product("cf").job_of_type('uaa')
254
+ end
255
+ end
256
+ end
@@ -0,0 +1,121 @@
1
+ # Copyright (c) 2014-2015 Pivotal Software, Inc.
2
+ # All rights reserved.
3
+ # THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
4
+ # INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
5
+ # PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
6
+ # LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
7
+ # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
8
+ # USE OR OTHER DEALINGS IN THE SOFTWARE.
9
+ #
10
+
11
+ require "httmultiparty"
12
+
13
+ module OpsmanagerClient
14
+ class HTTPClient
15
+ include HTTMultiParty
16
+ read_timeout 300
17
+ open_timeout 5
18
+
19
+ def initialize(url, username, password)
20
+ HTTPClient.base_uri(url)
21
+ HTTPClient.basic_auth(username, password)
22
+ end
23
+
24
+ def installation
25
+ ensure_successful(
26
+ HTTPClient.get("/api/installation_settings", query)
27
+ )
28
+ end
29
+
30
+ def delete_unused_products
31
+ ensure_successful(
32
+ HTTPClient.delete("/api/products", query)
33
+ )
34
+ end
35
+
36
+ def available_products
37
+ ensure_successful(
38
+ HTTPClient.get("/api/products", query)
39
+ )
40
+ end
41
+
42
+ def upload_product_from_file(product_file)
43
+ retry_on_fail do
44
+ ensure_successful(
45
+ HTTPClient.post("/api/products", query(:product => {:file => product_file}))
46
+ )
47
+ end
48
+ end
49
+
50
+ def add_product(product)
51
+ query_params = {
52
+ 'name' => product.name,
53
+ 'product_version' => product.version
54
+ }
55
+ ensure_successful(
56
+ HTTPClient.post("/api/installation_settings/products", query(query_params))
57
+ )
58
+ end
59
+
60
+ def remove_product_with_guid(guid)
61
+ ensure_successful(
62
+ HTTPClient.delete("/api/installation_settings/products/#{guid}", query)
63
+ )
64
+ end
65
+
66
+ def upgrade_product(product, guid)
67
+ query_params = {
68
+ 'to_version' => product.version
69
+ }
70
+ ensure_successful(
71
+ HTTPClient.put("/api/installation_settings/products/#{guid}", query(query_params))
72
+ )
73
+ end
74
+
75
+ def uninstall_product_with_guid(guid)
76
+ ensure_successful(
77
+ HTTPClient.delete("/api/installation_settings/products/#{guid}", query)
78
+ )
79
+ end
80
+
81
+ def apply_changes
82
+ response = ensure_successful(HTTPClient.post("/api/installation", query))
83
+ task_id = response.fetch("install").fetch("id")
84
+ task_id
85
+ end
86
+
87
+ private
88
+
89
+ def retry_on_fail(max_attempts = 6, retryable_exceptions = [Net::ReadTimeout])
90
+ attempts = 0
91
+ begin
92
+ attempts += 1
93
+ yield
94
+ rescue *retryable_exceptions
95
+ if attempts < max_attempts
96
+ puts "Attempt #{attempts}/#{max_attempts} failed. Retrying"
97
+ retry
98
+ end
99
+ puts "All retries failed."
100
+ raise
101
+ end
102
+ end
103
+
104
+ def query(params = {})
105
+ {
106
+ :verify => false, # disable SSL verify
107
+ :query => params
108
+ }
109
+ end
110
+
111
+ def ensure_successful(http_response, permitted_status_codes=[200])
112
+ if permitted_status_codes.include?(http_response.code)
113
+ http_response
114
+ else
115
+ error_messages = http_response.fetch('errors'){ http_response.inspect }
116
+ error_message = Array(error_messages).join("\n")
117
+ fail(error_message)
118
+ end
119
+ end
120
+ end
121
+ end
@@ -0,0 +1,41 @@
1
+ # Copyright (c) 2014-2015 Pivotal Software, Inc.
2
+ # All rights reserved.
3
+ # THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
4
+ # INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
5
+ # PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
6
+ # LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
7
+ # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
8
+ # USE OR OTHER DEALINGS IN THE SOFTWARE.
9
+ #
10
+
11
+ module OpsmanagerClient
12
+ class Product
13
+ attr_reader :path
14
+
15
+ def initialize(path)
16
+ @path = path
17
+ end
18
+
19
+ def to_s
20
+ "#{name} v#{version}"
21
+ end
22
+
23
+ def name
24
+ filename_without_extension[/(p\-[a-z0-9]+)\-/i, 1]
25
+ end
26
+
27
+ def version
28
+ filename_without_extension[/#{name}\-(.+)$/, 1]
29
+ end
30
+
31
+ def file
32
+ File.open(path)
33
+ end
34
+
35
+ private
36
+
37
+ def filename_without_extension
38
+ File.basename(path, ".*")
39
+ end
40
+ end
41
+ end
metadata ADDED
@@ -0,0 +1,189 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: opsmanager_client
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.8.0
5
+ platform: ruby
6
+ authors:
7
+ - Chris Brown
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2015-12-09 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: bundler
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '1.6'
20
+ type: :development
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '1.6'
27
+ - !ruby/object:Gem::Dependency
28
+ name: gemfury
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: 0.4.25
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: 0.4.25
41
+ - !ruby/object:Gem::Dependency
42
+ name: guard-rspec
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: '4.2'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: '4.2'
55
+ - !ruby/object:Gem::Dependency
56
+ name: pry
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - "~>"
60
+ - !ruby/object:Gem::Version
61
+ version: 0.9.12.6
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - "~>"
67
+ - !ruby/object:Gem::Version
68
+ version: 0.9.12.6
69
+ - !ruby/object:Gem::Dependency
70
+ name: rake
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - ">="
74
+ - !ruby/object:Gem::Version
75
+ version: '0'
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - ">="
81
+ - !ruby/object:Gem::Version
82
+ version: '0'
83
+ - !ruby/object:Gem::Dependency
84
+ name: rspec
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - "~>"
88
+ - !ruby/object:Gem::Version
89
+ version: '3.1'
90
+ type: :development
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - "~>"
95
+ - !ruby/object:Gem::Version
96
+ version: '3.1'
97
+ - !ruby/object:Gem::Dependency
98
+ name: vcr
99
+ requirement: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - "~>"
102
+ - !ruby/object:Gem::Version
103
+ version: 2.9.0
104
+ type: :development
105
+ prerelease: false
106
+ version_requirements: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - "~>"
109
+ - !ruby/object:Gem::Version
110
+ version: 2.9.0
111
+ - !ruby/object:Gem::Dependency
112
+ name: webmock
113
+ requirement: !ruby/object:Gem::Requirement
114
+ requirements:
115
+ - - "~>"
116
+ - !ruby/object:Gem::Version
117
+ version: 1.17.4
118
+ type: :development
119
+ prerelease: false
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ requirements:
122
+ - - "~>"
123
+ - !ruby/object:Gem::Version
124
+ version: 1.17.4
125
+ - !ruby/object:Gem::Dependency
126
+ name: gem-release
127
+ requirement: !ruby/object:Gem::Requirement
128
+ requirements:
129
+ - - "~>"
130
+ - !ruby/object:Gem::Version
131
+ version: '0.7'
132
+ type: :development
133
+ prerelease: false
134
+ version_requirements: !ruby/object:Gem::Requirement
135
+ requirements:
136
+ - - "~>"
137
+ - !ruby/object:Gem::Version
138
+ version: '0.7'
139
+ - !ruby/object:Gem::Dependency
140
+ name: httmultiparty
141
+ requirement: !ruby/object:Gem::Requirement
142
+ requirements:
143
+ - - "~>"
144
+ - !ruby/object:Gem::Version
145
+ version: '0.3'
146
+ type: :runtime
147
+ prerelease: false
148
+ version_requirements: !ruby/object:Gem::Requirement
149
+ requirements:
150
+ - - "~>"
151
+ - !ruby/object:Gem::Version
152
+ version: '0.3'
153
+ description: Interact with the Pivotal Ops Manager from Ruby
154
+ email:
155
+ - cb@pivotallabs.com
156
+ executables: []
157
+ extensions: []
158
+ extra_rdoc_files: []
159
+ files:
160
+ - LEGAL
161
+ - lib/opsmanager_client/client.rb
162
+ - lib/opsmanager_client/client/version.rb
163
+ - lib/opsmanager_client/http_client.rb
164
+ - lib/opsmanager_client/product.rb
165
+ homepage: ''
166
+ licenses:
167
+ - Copyright (c) Pivotal Software, Inc.
168
+ metadata: {}
169
+ post_install_message:
170
+ rdoc_options: []
171
+ require_paths:
172
+ - lib
173
+ required_ruby_version: !ruby/object:Gem::Requirement
174
+ requirements:
175
+ - - ">="
176
+ - !ruby/object:Gem::Version
177
+ version: '0'
178
+ required_rubygems_version: !ruby/object:Gem::Requirement
179
+ requirements:
180
+ - - ">="
181
+ - !ruby/object:Gem::Version
182
+ version: '0'
183
+ requirements: []
184
+ rubyforge_project:
185
+ rubygems_version: 2.4.2
186
+ signing_key:
187
+ specification_version: 4
188
+ summary: DSL for Pivotal Ops Manager
189
+ test_files: []