any2tosca 0.1.0__py3-none-any.whl

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.
@@ -0,0 +1,419 @@
1
+ Metadata-Version: 2.4
2
+ Name: any2tosca
3
+ Version: 0.1.0
4
+ Summary: Convert JSON Schema, OpenAPI, Redfish and YANG schemas to TOSCA 2.0 node types and data types
5
+ Author-email: "Ubicity Corp." <info@ubicity.com>
6
+ License-Expression: Apache-2.0
7
+ Project-URL: Homepage, https://github.com/ubicity-corp/any2tosca
8
+ Project-URL: Documentation, https://github.com/ubicity-corp/any2tosca/blob/master/README.md
9
+ Project-URL: Changelog, https://github.com/ubicity-corp/any2tosca/blob/master/CHANGELOG.md
10
+ Project-URL: Issues, https://github.com/ubicity-corp/any2tosca/issues
11
+ Keywords: tosca,json-schema,openapi,redfish,yang,converter
12
+ Classifier: Development Status :: 3 - Alpha
13
+ Classifier: Intended Audience :: Developers
14
+ Classifier: Programming Language :: Python :: 3
15
+ Classifier: Programming Language :: Python :: 3.10
16
+ Classifier: Programming Language :: Python :: 3.11
17
+ Classifier: Programming Language :: Python :: 3.12
18
+ Classifier: Programming Language :: Python :: 3.13
19
+ Classifier: Topic :: Software Development :: Code Generators
20
+ Classifier: Topic :: System :: Systems Administration
21
+ Requires-Python: >=3.10
22
+ Description-Content-Type: text/markdown
23
+ License-File: LICENSE
24
+ Requires-Dist: pyyaml>=6.0
25
+ Requires-Dist: referencing>=0.28.0
26
+ Requires-Dist: pyang>=2.6
27
+ Provides-Extra: dev
28
+ Requires-Dist: pytest>=7.0; extra == "dev"
29
+ Requires-Dist: pytest-cov>=4.0; extra == "dev"
30
+ Requires-Dist: build; extra == "dev"
31
+ Requires-Dist: twine; extra == "dev"
32
+ Dynamic: license-file
33
+
34
+ # any2tosca
35
+
36
+ any2tosca turns the schemas you already have into
37
+ [TOSCA 2.0](https://docs.oasis-open.org/tosca/TOSCA/) types. API definitions,
38
+ hardware models and network data models already describe the resources a
39
+ system is built from; any2tosca converts them into TOSCA data types and node
40
+ types, so the types a TOSCA profile needs are generated from the source of
41
+ truth rather than written by hand. The generated types can then be checked
42
+ with [tosca-core](https://github.com/ubicity-corp/tosca-core), the open-source
43
+ TOSCA parser and validator.
44
+
45
+ | Command | Input format |
46
+ |---|---|
47
+ | `any2tosca` | [JSON Schema](https://json-schema.org/) |
48
+ | `oas2tosca` | [OpenAPI](https://www.openapis.org/) 2.0 / 3.x |
49
+ | `redfish2tosca` | [Redfish](https://www.dmtf.org/standards/redfish) JSON Schema |
50
+ | `yang2tosca` | [YANG](https://datatracker.ietf.org/doc/html/rfc7950) modules |
51
+
52
+ ## A quick example
53
+
54
+ Given `server.json`:
55
+
56
+ ```json
57
+ {
58
+ "title": "Server",
59
+ "type": "object",
60
+ "properties": {
61
+ "name": {"type": "string"},
62
+ "cpus": {"type": "integer", "minimum": 1, "maximum": 64},
63
+ "disk": {"type": "string", "enum": ["ssd", "hdd"]}
64
+ },
65
+ "required": ["name", "cpus"]
66
+ }
67
+ ```
68
+
69
+ `any2tosca server.json` writes `tosca/server.yaml`:
70
+
71
+ ```yaml
72
+ tosca_definitions_version: tosca_2_0
73
+ description: >-
74
+ Types generated from JSON Schema by any2tosca
75
+ data_types:
76
+ Server:
77
+ description: >-
78
+ Server
79
+ properties:
80
+ name:
81
+ type: string
82
+ required: true
83
+ cpus:
84
+ type: integer
85
+ required: true
86
+ validation:
87
+ $and:
88
+ - $greater_or_equal:
89
+ - $value
90
+ - 1
91
+ - $less_or_equal:
92
+ - $value
93
+ - 64
94
+ disk:
95
+ type: string
96
+ required: false
97
+ validation:
98
+ $valid_values:
99
+ - $value
100
+ - - ssd
101
+ - hdd
102
+ ```
103
+
104
+ ## Installation
105
+
106
+ any2tosca needs Python 3.10 or later and is installed from a checkout:
107
+
108
+ ```bash
109
+ git clone https://github.com/ubicity-corp/any2tosca
110
+ cd any2tosca
111
+ pip install .
112
+ ```
113
+
114
+ For development, with the test tools, use `pip install -e ".[dev]"` instead.
115
+
116
+ ## Usage
117
+
118
+ Each command takes input files or directories and writes one TOSCA file per
119
+ input file, with the same base name, into the output directory:
120
+
121
+ ```bash
122
+ any2tosca my_schema.json # writes tosca/my_schema.yaml
123
+ any2tosca schemas/ -o tosca/ # every schema in a directory
124
+ oas2tosca openapi.yaml -o tosca/
125
+ redfish2tosca ComputerSystem.v1_20_0.json -I /path/to/DMTF/json-schema -o tosca/
126
+ yang2tosca server.yang -o tosca/
127
+ ```
128
+
129
+ | Option | |
130
+ |---|---|
131
+ | `-o DIR`, `--output DIR` | the output directory (default: `tosca/`) |
132
+ | `-I DIR`, `--include-dir DIR` | another directory to search for referenced schema files; repeatable |
133
+ | `-v`, `--verbose` | list the types as they are converted |
134
+
135
+ A schema that references another file becomes a TOSCA file that imports the
136
+ other one's output, by `url` and with a `namespace`. Referenced files are
137
+ looked for beside the input file first, then in each `-I` directory. TOSCA does
138
+ not allow circular imports, so reference cycles between files are broken
139
+ during conversion ([docs/circular-import-algorithm.md](docs/circular-import-algorithm.md)).
140
+
141
+ ## What it generates
142
+
143
+ - **Data types** for objects, enumerations and constrained scalars. Object
144
+ types are derived from a parent only where the schema names one (a single
145
+ `$ref` in `allOf`, `anyOf` or `oneOf`); scalars derive from their TOSCA
146
+ primitive type.
147
+ - **Node types** for the schemas that describe resources, as each format
148
+ identifies them: OpenAPI request bodies of `POST` operations, the Redfish
149
+ resource a schema file defines, and top-level YANG containers and lists.
150
+ Plain JSON Schema produces data types only.
151
+ - **Capabilities and requirements** that let node types be connected. Every
152
+ node type gets a `feature` and a `containable` capability, whose types are
153
+ written to a companion file, `<name>_caps.yaml`, so that other files can
154
+ target the node type without importing it. A property whose value is another
155
+ node type becomes a requirement, with a `Contains` or `DependsOn`
156
+ relationship.
157
+
158
+ For example, an OpenAPI document whose `POST /servers` takes a `Server` produces:
159
+
160
+ ```yaml
161
+ imports:
162
+ - url: Core.yaml
163
+ namespace: core
164
+ - url: servers_caps.yaml
165
+ namespace: srvrscps
166
+ node_types:
167
+ Server:
168
+ properties:
169
+ name:
170
+ type: string
171
+ required: true
172
+ cpus:
173
+ type: integer
174
+ required: false
175
+ validation:
176
+ $greater_or_equal:
177
+ - $value
178
+ - 1
179
+ capabilities:
180
+ feature:
181
+ type: srvrscps:ServerFeature
182
+ containable:
183
+ type: srvrscps:ServerContainable
184
+ ```
185
+
186
+ ### The base types: `Core.yaml`
187
+
188
+ Node types build on four base types that any2tosca does not generate: the
189
+ `Feature` and `Containable` capability types and the `Contains` and
190
+ `DependsOn` relationship types. Output with node types imports them from a
191
+ `Core.yaml` beside it, which you provide:
192
+
193
+ ```yaml
194
+ tosca_definitions_version: tosca_2_0
195
+ relationship_types:
196
+ Contains: {}
197
+ DependsOn: {}
198
+ capability_types:
199
+ Containable: {}
200
+ Feature: {}
201
+ ```
202
+
203
+ Importing these types from a named profile instead, with an option to choose
204
+ the profile, is planned.
205
+
206
+ ## Using the output
207
+
208
+ The generated files are TOSCA type definitions. They declare no `profile:`
209
+ name, so they are used in one of two ways:
210
+
211
+ - **Imported** by a profile or service template of your own, through an
212
+ `imports` entry with the file's `url`.
213
+ - **As a profile of their own:** add a `profile:` line naming it (for
214
+ example `profile: com.example.servers:1.0`) to the main file, and it can be
215
+ validated and onboarded as a profile.
216
+
217
+ [tosca-core](https://github.com/ubicity-corp/tosca-core) checks the result
218
+ against TOSCA's rules. A single file with a `profile:` line is validated
219
+ directly:
220
+
221
+ ```bash
222
+ pip install tosca-core
223
+ tosca-validate tosca/server.yaml
224
+ ```
225
+
226
+ Output of several files (node types, their `_caps.yaml` and `Core.yaml`) is
227
+ validated as a directory holding them, with a `TOSCA.meta` that names the main
228
+ file:
229
+
230
+ ```
231
+ TOSCA-Meta-File-Version: 1.1
232
+ CSAR-Version: 2.0
233
+ Created-By: any2tosca
234
+ Entry-Definitions: servers.yaml
235
+ ```
236
+
237
+ An option that writes the `profile:` line, and packages the output as a CSAR,
238
+ is planned.
239
+
240
+ ## Conversion reference
241
+
242
+ ### JSON Schema → TOSCA
243
+
244
+ | JSON Schema | TOSCA |
245
+ |---|---|
246
+ | `type: string` | `type: string` |
247
+ | `type: integer` | `type: integer` |
248
+ | `type: number` | `type: float` |
249
+ | `type: boolean` | `type: boolean` |
250
+ | `type: object` | `data_type` with `properties` |
251
+ | `type: array` | `type: list` with `entry_schema` |
252
+ | `properties` | `properties` |
253
+ | `required` | `required: true/false` per property |
254
+ | `default` | `default` |
255
+ | `description` / `title` | `description` (folded block style) |
256
+ | `minimum` / `maximum` | `$greater_or_equal` / `$less_or_equal` |
257
+ | `exclusiveMinimum/Maximum` | `$greater_than` / `$less_than` |
258
+ | `minLength` / `maxLength` | `$min_length` / `$max_length` |
259
+ | `enum` | `$valid_values` |
260
+ | `pattern` | `$pattern` |
261
+ | `items` | `entry_schema` |
262
+ | `additionalProperties` | `entry_schema` |
263
+ | `$ref` (local) | resolved inline |
264
+ | `$ref` (external file) | `namespace:TypeName` + `imports` entry |
265
+ | `allOf` with single `$ref` | `derived_from` |
266
+ | `allOf` with mixed schemas | merged properties |
267
+ | `anyOf` / `oneOf` with null alternative | flattened to non-null member |
268
+ | `anyOf` / `oneOf` with single `$ref` | `derived_from` |
269
+ | `anyOf` / `oneOf` with versioned `$refs` (same base name) | highest version → `derived_from` |
270
+ | `anyOf` / `oneOf` with versioned + unversioned `$refs` | highest versioned → `derived_from`, unversioned properties merged |
271
+ | `anyOf` / `oneOf` with multiple unversioned `$refs` | first `$ref` → `derived_from`, rest merged |
272
+ | `definitions` / `$defs` | top-level `data_types` entries |
273
+
274
+ [docs/jsonschema.md](docs/jsonschema.md) is a reference to the JSON Schema
275
+ keywords themselves.
276
+
277
+ ### OpenAPI → TOSCA
278
+
279
+ `oas2tosca` converts the schemas of an OpenAPI 2.0 (`definitions`) or 3.x
280
+ (`components.schemas`) document with the JSON Schema rules above. A schema
281
+ used as the request body of a `POST` operation, the thing the API creates,
282
+ becomes a node type; the rest become data types.
283
+
284
+ ### Redfish → TOSCA
285
+
286
+ `redfish2tosca` first normalizes a Redfish schema into plain JSON Schema,
287
+ dropping OData annotations and flattening nullable alternatives, then converts
288
+ it. The resource a schema file defines becomes a node type; a family of
289
+ versioned schemas (`Drive.v1_13_0.json`, `Drive.v1_14_0.json`, ...) becomes a
290
+ chain of `derived_from` types; `Links` become `DependsOn` requirements; and
291
+ `Actions` become an interface type.
292
+ [docs/redfish-conversion.md](docs/redfish-conversion.md) describes every step.
293
+
294
+ ### YANG → TOSCA
295
+
296
+ | YANG | TOSCA |
297
+ |---|---|
298
+ | `typedef` | `data_type` |
299
+ | `container` (top-level) | `node_type` |
300
+ | `list` (top-level) | `node_type` |
301
+ | `container` (nested) | inline `data_type` |
302
+ | `list` (nested) | `list` property with `entry_schema` |
303
+ | `leaf` | scalar property |
304
+ | `leaf-list` | `list` property |
305
+ | `grouping` / `uses` | inlined by pyang before conversion |
306
+ | `enumeration` | `$valid_values` constraint |
307
+ | `range` | `$greater_or_equal` / `$less_or_equal` |
308
+ | `length` | `$min_length` / `$max_length` |
309
+ | `pattern` | `$pattern` |
310
+ | `mandatory true` | `required: true` |
311
+ | Named typedef ref | `$ref` → resolved `data_type` |
312
+
313
+ YANG integer types (`int8`–`int64`, `uint8`–`uint64`) map to TOSCA `integer`;
314
+ `decimal64` maps to `float`; all string-like types map to `string`.
315
+
316
+ ## Limitations
317
+
318
+ - **JSON Schema keywords left out of the conversion:** `const`, `format`,
319
+ `multipleOf`, `minItems` / `maxItems`, `uniqueItems`, `patternProperties`,
320
+ `if` / `then` / `else`, `not`, `readOnly` / `writeOnly`, and OpenAPI's
321
+ `discriminator`. The values they constrain are converted; the constraints
322
+ they add are not.
323
+ - **Kubernetes:** the Kubernetes OpenAPI definitions convert like any other
324
+ OpenAPI document, into one set of types. Splitting them into one profile per
325
+ API group, as
326
+ [oas2tosca](https://github.com/ubicity-corp/oas2tosca) does for the
327
+ Kubernetes profiles, is not yet supported.
328
+
329
+ ## Python API
330
+
331
+ Each command is also available from Python. These functions and classes are
332
+ not yet a stable API: they may change in any release before 1.0.
333
+
334
+ ### JSON Schema
335
+
336
+ ```python
337
+ import json
338
+ from pathlib import Path
339
+ from any2tosca import convert_schema, build_tosca_document
340
+ from any2tosca.yaml_utils import dump_tosca_yaml
341
+
342
+ with open("my_schema.json") as f:
343
+ root_schema = json.load(f)
344
+
345
+ result = convert_schema(root_schema, top_name="MyType",
346
+ base_path=Path("my_schema.json").parent)
347
+ tosca_doc = build_tosca_document(result.data_types, result.node_types,
348
+ result.imports or None)
349
+ print(dump_tosca_yaml(tosca_doc))
350
+ ```
351
+
352
+ ### OpenAPI
353
+
354
+ ```python
355
+ import json
356
+ from any2tosca.openapi import OpenAPIExtractor
357
+ from any2tosca import convert_schema, build_tosca_document
358
+ from any2tosca.yaml_utils import dump_tosca_yaml
359
+
360
+ with open("openapi.json") as f:
361
+ doc = json.load(f)
362
+
363
+ root_schema, node_type_names = OpenAPIExtractor().extract(doc)
364
+ result = convert_schema(root_schema, "api", node_type_names)
365
+ print(dump_tosca_yaml(build_tosca_document(result.data_types, result.node_types)))
366
+ ```
367
+
368
+ ### Redfish
369
+
370
+ ```python
371
+ import json
372
+ from pathlib import Path
373
+ from any2tosca.redfish import RedfishNormalizer
374
+ from any2tosca import convert_schema, build_tosca_document
375
+ from any2tosca.yaml_utils import dump_tosca_yaml
376
+
377
+ with open("SimpleServer.v1_0_1.json") as f:
378
+ schema = json.load(f)
379
+
380
+ root_schema, node_type_names = RedfishNormalizer().normalize(schema)
381
+ result = convert_schema(root_schema, "SimpleServer", node_type_names,
382
+ base_path=Path("SimpleServer.v1_0_1.json").parent)
383
+ print(dump_tosca_yaml(build_tosca_document(result.data_types, result.node_types,
384
+ result.imports or None)))
385
+ ```
386
+
387
+ ### YANG
388
+
389
+ ```python
390
+ from pathlib import Path
391
+ from any2tosca.yang import YANGNormalizer
392
+ from any2tosca import convert_schema, build_tosca_document
393
+ from any2tosca.yaml_utils import dump_tosca_yaml
394
+
395
+ yang_path = Path("server.yang")
396
+ normalizer = YANGNormalizer()
397
+ root_schema, node_type_names = normalizer.normalize(yang_path)
398
+ result = convert_schema(root_schema, normalizer.module_name, node_type_names,
399
+ base_path=yang_path.parent)
400
+ print(dump_tosca_yaml(build_tosca_document(result.data_types, result.node_types)))
401
+ ```
402
+
403
+ ## Running tests
404
+
405
+ ```bash
406
+ pip install -e ".[dev]"
407
+ pytest
408
+ ```
409
+
410
+ ## Contributing
411
+
412
+ Report a problem or ask a question by opening an issue. Changes come as pull
413
+ requests, with a test that pins what they fix and `pytest` passing. Report a
414
+ security vulnerability privately, through the repository's Security tab,
415
+ rather than in an issue.
416
+
417
+ ## License
418
+
419
+ Apache License 2.0; see [LICENSE](LICENSE).
@@ -0,0 +1,13 @@
1
+ any2tosca/__init__.py,sha256=mb6KzPFEymNT_sTSnstytL4rz8VzmJsdAy5I7N3ldl4,720
2
+ any2tosca/cli.py,sha256=IEpru7PhdKeKkHqnGLSjRRSuD5RTOZBwsN4ymllocxM,13879
3
+ any2tosca/converter.py,sha256=Yq7dtrJ4TfEqDOpLBEusVCcato06tvdt5s8r3o_54_w,101716
4
+ any2tosca/openapi.py,sha256=FWmcLIX4fshk-kZgBfZAeB-X302bO7z_4U-BIjuYQJo,6032
5
+ any2tosca/redfish.py,sha256=i-ruOwuXhme-TJ1qqHxEO02H7iWBADMlAThrLdzBVik,7158
6
+ any2tosca/yaml_utils.py,sha256=j4tU7SmNBQHgoZ7uTut3LEoiZ-d7FGAJKQv3LLoL9q8,2754
7
+ any2tosca/yang.py,sha256=K9YIbG5EhX46Cny0N0GrAYKQJrncY_I2_HOIDWHTPT4,8588
8
+ any2tosca-0.1.0.dist-info/licenses/LICENSE,sha256=IpI65Jrbs9jOA3eODFjw89ZK0s9Jq8iUAkQLNA8eit0,11349
9
+ any2tosca-0.1.0.dist-info/METADATA,sha256=Y-Bn2tuBfLUxLslq7xtdtlL7UicaY5rzTLW9XoKo4aE,14361
10
+ any2tosca-0.1.0.dist-info/WHEEL,sha256=mOdXR9C3wMVov7cSY8PY-XCzo3SmmWCHvGQr5csJoao,91
11
+ any2tosca-0.1.0.dist-info/entry_points.txt,sha256=X9euSP_EzEAqRY9LSm9bqqpFsagBTcREDkk3DLW6wm0,172
12
+ any2tosca-0.1.0.dist-info/top_level.txt,sha256=WIrksDB6bhY4I5tMS4GgiPIkXb7InOYSQM8ip-S5swk,10
13
+ any2tosca-0.1.0.dist-info/RECORD,,
@@ -0,0 +1,5 @@
1
+ Wheel-Version: 1.0
2
+ Generator: setuptools (84.2.1)
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
5
+
@@ -0,0 +1,5 @@
1
+ [console_scripts]
2
+ any2tosca = any2tosca.cli:cli_entry
3
+ oas2tosca = any2tosca.cli:oas_entry
4
+ redfish2tosca = any2tosca.cli:redfish_entry
5
+ yang2tosca = any2tosca.cli:yang_entry
@@ -0,0 +1,202 @@
1
+
2
+ Apache License
3
+ Version 2.0, January 2004
4
+ http://www.apache.org/licenses/
5
+
6
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
7
+
8
+ 1. Definitions.
9
+
10
+ "License" shall mean the terms and conditions for use, reproduction,
11
+ and distribution as defined by Sections 1 through 9 of this document.
12
+
13
+ "Licensor" shall mean the copyright owner or entity authorized by
14
+ the copyright owner that is granting the License.
15
+
16
+ "Legal Entity" shall mean the union of the acting entity and all
17
+ other entities that control, are controlled by, or are under common
18
+ control with that entity. For the purposes of this definition,
19
+ "control" means (i) the power, direct or indirect, to cause the
20
+ direction or management of such entity, whether by contract or
21
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
22
+ outstanding shares, or (iii) beneficial ownership of such entity.
23
+
24
+ "You" (or "Your") shall mean an individual or Legal Entity
25
+ exercising permissions granted by this License.
26
+
27
+ "Source" form shall mean the preferred form for making modifications,
28
+ including but not limited to software source code, documentation
29
+ source, and configuration files.
30
+
31
+ "Object" form shall mean any form resulting from mechanical
32
+ transformation or translation of a Source form, including but
33
+ not limited to compiled object code, generated documentation,
34
+ and conversions to other media types.
35
+
36
+ "Work" shall mean the work of authorship, whether in Source or
37
+ Object form, made available under the License, as indicated by a
38
+ copyright notice that is included in or attached to the work
39
+ (an example is provided in the Appendix below).
40
+
41
+ "Derivative Works" shall mean any work, whether in Source or Object
42
+ form, that is based on (or derived from) the Work and for which the
43
+ editorial revisions, annotations, elaborations, or other modifications
44
+ represent, as a whole, an original work of authorship. For the purposes
45
+ of this License, Derivative Works shall not include works that remain
46
+ separable from, or merely link (or bind by name) to the interfaces of,
47
+ the Work and Derivative Works thereof.
48
+
49
+ "Contribution" shall mean any work of authorship, including
50
+ the original version of the Work and any modifications or additions
51
+ to that Work or Derivative Works thereof, that is intentionally
52
+ submitted to Licensor for inclusion in the Work by the copyright owner
53
+ or by an individual or Legal Entity authorized to submit on behalf of
54
+ the copyright owner. For the purposes of this definition, "submitted"
55
+ means any form of electronic, verbal, or written communication sent
56
+ to the Licensor or its representatives, including but not limited to
57
+ communication on electronic mailing lists, source code control systems,
58
+ and issue tracking systems that are managed by, or on behalf of, the
59
+ Licensor for the purpose of discussing and improving the Work, but
60
+ excluding communication that is conspicuously marked or otherwise
61
+ designated in writing by the copyright owner as "Not a Contribution."
62
+
63
+ "Contributor" shall mean Licensor and any individual or Legal Entity
64
+ on behalf of whom a Contribution has been received by Licensor and
65
+ subsequently incorporated within the Work.
66
+
67
+ 2. Grant of Copyright License. Subject to the terms and conditions of
68
+ this License, each Contributor hereby grants to You a perpetual,
69
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70
+ copyright license to reproduce, prepare Derivative Works of,
71
+ publicly display, publicly perform, sublicense, and distribute the
72
+ Work and such Derivative Works in Source or Object form.
73
+
74
+ 3. Grant of Patent License. Subject to the terms and conditions of
75
+ this License, each Contributor hereby grants to You a perpetual,
76
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77
+ (except as stated in this section) patent license to make, have made,
78
+ use, offer to sell, sell, import, and otherwise transfer the Work,
79
+ where such license applies only to those patent claims licensable
80
+ by such Contributor that are necessarily infringed by their
81
+ Contribution(s) alone or by combination of their Contribution(s)
82
+ with the Work to which such Contribution(s) was submitted. If You
83
+ institute patent litigation against any entity (including a
84
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
85
+ or a Contribution incorporated within the Work constitutes direct
86
+ or contributory patent infringement, then any patent licenses
87
+ granted to You under this License for that Work shall terminate
88
+ as of the date such litigation is filed.
89
+
90
+ 4. Redistribution. You may reproduce and distribute copies of the
91
+ Work or Derivative Works thereof in any medium, with or without
92
+ modifications, and in Source or Object form, provided that You
93
+ meet the following conditions:
94
+
95
+ (a) You must give any other recipients of the Work or
96
+ Derivative Works a copy of this License; and
97
+
98
+ (b) You must cause any modified files to carry prominent notices
99
+ stating that You changed the files; and
100
+
101
+ (c) You must retain, in the Source form of any Derivative Works
102
+ that You distribute, all copyright, patent, trademark, and
103
+ attribution notices from the Source form of the Work,
104
+ excluding those notices that do not pertain to any part of
105
+ the Derivative Works; and
106
+
107
+ (d) If the Work includes a "NOTICE" text file as part of its
108
+ distribution, then any Derivative Works that You distribute must
109
+ include a readable copy of the attribution notices contained
110
+ within such NOTICE file, excluding those notices that do not
111
+ pertain to any part of the Derivative Works, in at least one
112
+ of the following places: within a NOTICE text file distributed
113
+ as part of the Derivative Works; within the Source form or
114
+ documentation, if provided along with the Derivative Works; or,
115
+ within a display generated by the Derivative Works, if and
116
+ wherever such third-party notices normally appear. The contents
117
+ of the NOTICE file are for informational purposes only and
118
+ do not modify the License. You may add Your own attribution
119
+ notices within Derivative Works that You distribute, alongside
120
+ or as an addendum to the NOTICE text from the Work, provided
121
+ that such additional attribution notices cannot be construed
122
+ as modifying the License.
123
+
124
+ You may add Your own copyright statement to Your modifications and
125
+ may provide additional or different license terms and conditions
126
+ for use, reproduction, or distribution of Your modifications, or
127
+ for any such Derivative Works as a whole, provided Your use,
128
+ reproduction, and distribution of the Work otherwise complies with
129
+ the conditions stated in this License.
130
+
131
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
132
+ any Contribution intentionally submitted for inclusion in the Work
133
+ by You to the Licensor shall be under the terms and conditions of
134
+ this License, without any additional terms or conditions.
135
+ Notwithstanding the above, nothing herein shall supersede or modify
136
+ the terms of any separate license agreement you may have executed
137
+ with Licensor regarding such Contributions.
138
+
139
+ 6. Trademarks. This License does not grant permission to use the trade
140
+ names, trademarks, service marks, or product names of the Licensor,
141
+ except as required for reasonable and customary use in describing the
142
+ origin of the Work and reproducing the content of the NOTICE file.
143
+
144
+ 7. Disclaimer of Warranty. Unless required by applicable law or
145
+ agreed to in writing, Licensor provides the Work (and each
146
+ Contributor provides its Contributions) on an "AS IS" BASIS,
147
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
148
+ implied, including, without limitation, any warranties or conditions
149
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
150
+ PARTICULAR PURPOSE. You are solely responsible for determining the
151
+ appropriateness of using or redistributing the Work and assume any
152
+ risks associated with Your exercise of permissions under this License.
153
+
154
+ 8. Limitation of Liability. In no event and under no legal theory,
155
+ whether in tort (including negligence), contract, or otherwise,
156
+ unless required by applicable law (such as deliberate and grossly
157
+ negligent acts) or agreed to in writing, shall any Contributor be
158
+ liable to You for damages, including any direct, indirect, special,
159
+ incidental, or consequential damages of any character arising as a
160
+ result of this License or out of the use or inability to use the
161
+ Work (including but not limited to damages for loss of goodwill,
162
+ work stoppage, computer failure or malfunction, or any and all
163
+ other commercial damages or losses), even if such Contributor
164
+ has been advised of the possibility of such damages.
165
+
166
+ 9. Accepting Warranty or Additional Liability. While redistributing
167
+ the Work or Derivative Works thereof, You may choose to offer,
168
+ and charge a fee for, acceptance of support, warranty, indemnity,
169
+ or other liability obligations and/or rights consistent with this
170
+ License. However, in accepting such obligations, You may act only
171
+ on Your own behalf and on Your sole responsibility, not on behalf
172
+ of any other Contributor, and only if You agree to indemnify,
173
+ defend, and hold each Contributor harmless for any liability
174
+ incurred by, or claims asserted against, such Contributor by reason
175
+ of your accepting any such warranty or additional liability.
176
+
177
+ END OF TERMS AND CONDITIONS
178
+
179
+ APPENDIX: How to apply the Apache License to your work.
180
+
181
+ To apply the Apache License to your work, attach the following
182
+ boilerplate notice, with the fields enclosed by brackets "[]"
183
+ replaced with your own identifying information. (Don't include
184
+ the brackets!) The text should be enclosed in the appropriate
185
+ comment syntax for the file format. We also recommend that a
186
+ file or class name and description of purpose be included on the
187
+ same "printed page" as the copyright notice for easier
188
+ identification within third-party archives.
189
+
190
+ Copyright 2015-2026 Ubicity Corp.
191
+
192
+ Licensed under the Apache License, Version 2.0 (the "License");
193
+ you may not use this file except in compliance with the License.
194
+ You may obtain a copy of the License at
195
+
196
+ http://www.apache.org/licenses/LICENSE-2.0
197
+
198
+ Unless required by applicable law or agreed to in writing, software
199
+ distributed under the License is distributed on an "AS IS" BASIS,
200
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
201
+ See the License for the specific language governing permissions and
202
+ limitations under the License.
@@ -0,0 +1 @@
1
+ any2tosca