## Copyright (c) 2015 SONATA-NFV, 2017 5GTANGO ## ALL RIGHTS RESERVED. ## ## Licensed under the Apache License, Version 2.0 (the "License"); ## you may not use this file except in compliance with the License. ## You may obtain a copy of the License at ## ## http://www.apache.org/licenses/LICENSE-2.0 ## ## Unless required by applicable law or agreed to in writing, software ## distributed under the License is distributed on an "AS IS" BASIS, ## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ## See the License for the specific language governing permissions and ## limitations under the License. ## ## Neither the name of the SONATA-NFV, 5GTANGO ## nor the names of its contributors may be used to endorse or promote ## products derived from this software without specific prior written ## permission. ## ## This work has been performed in the framework of the SONATA project, ## funded by the European Commission under Grant number 671517 through ## the Horizon 2020 and 5G-PPP programmes. The authors would like to ## acknowledge the contributions of their colleagues of the SONATA ## partner consortium (www.sonata-nfv.eu). ## ## This work has been performed in the framework of the 5GTANGO project, ## funded by the European Commission under Grant number 761493 through ## the Horizon 2020 and 5G-PPP programmes. The authors would like to ## acknowledge the contributions of their colleagues of the 5GTANGO ## partner consortium (www.5gtango.eu). --- $schema: "http://json-schema.org/draft-04/schema#" #id: "http://www.sonata-nfv.eu/schema/napd-schema-01" title: "NFV Advanced Package Descriptor Schema" version: 0.9 description: | The NFV advanced package descriptor schema specifies the structure of the package descriptor. It makes sure the relevant information is provided to parse the package in a meaningful way. ## ## The actual document description. ## type: "object" properties: ## ## Some general information regarding the schema used to describe ## the package descriptor. ## descriptor_schema: description: "Reference to the schema corresponding to the descriptor (e.g., URL or local path)." type: "string" ## ## Some general information that describes the package as such. ## vendor: description: "The vendor id will identify the package uniquely across all package." type: "string" pattern: "^[a-z0-9\\-_.]+$" name: description: "The package name identifies the package without its version." type: "string" pattern: "^[a-z0-9\\-_.]+$" version: description: "The version allows to distinguish the same package at different times." type: "string" pattern: "^[0-9\\-_.]+$" package_type: description: "The MIME type of the package." type: "string" pattern: "^[A-Za-z0-9\\-_./]+$" release_date_time: description: "Package creation time." type: "string" pattern: "^[A-Z0-9\\.:+-]+$" maintainer: description: "The person or organization that created the package." type: "string" description: description: "An arbitrary description of the package." type: "string" logo: description: "Path to package logo." type: "string" pattern: "^[A-Za-z0-9\\-_./]+$" ## ## The description of the package content, such as service descriptors, ## virtual machine images, scripts, and any addition data and ## artifacts that are shipped with this package. ## package_content: description: "An array of artifacts contained in the package." type: "array" items: type: "object" properties: source: description: "The name of the artifact similar to the absolute path of the artifact in the package." type: "string" pattern: "^[A-Za-z0-9\\-_./]+$" algorithm: description: "Algorithm used to compute the checksum." type: "string" pattern: "^[A-Z0-9\\-]+$" hash: description: "The checksum of the artifact." type: "string" pattern: "^[A-Za-z0-9]+$" content-type: description: "The type of content of the artifact." type: "string" pattern: "^[A-Za-z0-9\\-_./]+$" tags: description: "List of tags assigned to this artifact." type: "array" items: type: "string" pattern: "^[A-Za-z0-9\\-_.:/]+$" testing_tags: description: "List of tags assigned to this artifact." type: "array" items: type: "string" pattern: "^[A-Za-z0-9\\-_.:/]+$" required: - "source" - "algorithm" - "hash" - "content-type" additionalProperties: false # Unique items makes sure that the items as a whole are # unique. However, it does not make sure that the item # names are unique, which is what we actually want. # Unfortunately, it is not possible to express that # using JSON schema. uniqueItems: true required: - "descriptor_schema" - "vendor" - "name" - "version" ## Prohibit any other key in the file. additionalProperties: false