# See the License for the specific language governing permissions and
# limitations under the License.
-from jsonschema import validate as js_v, exceptions as js_e
from http import HTTPStatus
+from jsonschema import exceptions as js_e, validate as js_v
+
__author__ = "Alfonso Tierno <alfonso.tiernosepulveda@telefonica.com>"
__version__ = "0.1"
version_date = "Jun 2020"
},
"image": deploy_item_list,
"flavor": deploy_item_list,
+ "shared-volumes": deploy_item_list,
"ns": {
"type": "object",
"properties": {
"vld": deploy_item_list,
},
},
+ "affinity-or-anti-affinity-group": deploy_item_list,
},
"additionalProperties": False,
}
+rebuild_schema = {
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "vm_rebuild": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "vdu-id": id_schema,
+ "vim_name": name_schema,
+ "member-vnf-index": name_schema,
+ },
+ },
+ "additionalProperties": True,
+ },
+}
+
class ValidationError(Exception):
def __init__(self, message, http_code=HTTPStatus.UNPROCESSABLE_ENTITY):