Skip to content

Commit

Permalink
More work on sonata-nfv#73 but the mandataory and min-elemnt fields s…
Browse files Browse the repository at this point in the history
…eem to be not

validated :-(

Signed-off-by: peusterm <[email protected]>
  • Loading branch information
peusterm committed Mar 5, 2019
1 parent 259a2dc commit a17e61d
Show file tree
Hide file tree
Showing 8 changed files with 553 additions and 496 deletions.
12 changes: 6 additions & 6 deletions models/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -31,19 +31,19 @@ PYBINDPLUGIN := $(shell python -c 'import pyangbind; import os; print("{}/plugin

validate:
# generate doc
pyang ietf-ped.yang -f tree -o "$(DOC_DIR)/ietf-ped.tree"
pyang ietf-ped.yang -f jstree -o "$(DOC_DIR)/ietf-ped.html"
pyang ietf-ped.yang -f uml -o "$(DOC_DIR)/ietf-ped.uml"
pyang ietf-ped-catalog.yang -f tree -o "$(DOC_DIR)/ietf-ped-catalog.tree"
pyang ietf-ped-catalog.yang -f jstree -o "$(DOC_DIR)/ietf-ped-catalog.html"
pyang ietf-ped-catalog.yang -f uml -o "$(DOC_DIR)/ietf-ped-catalog.uml"
# finally validate
pyang ietf-ped.yang --ietf
pyang ietf-ped-catalog.yang --ietf

build:
# generate / compile python model
pyang --plugindir $(PYBINDPLUGIN) -f pybind -o ietf_ped_model.py ietf-ped.yang
pyang --plugindir $(PYBINDPLUGIN) -f pybind -o ietf_ped_model.py ietf-ped-catalog.yang

test:
# test the example ped files against the model
pytest -v
pytest -s -v

all: validate build test

Expand Down
295 changes: 0 additions & 295 deletions models/doc/ietf-ped.html

This file was deleted.

8 changes: 0 additions & 8 deletions models/doc/ietf-ped.tree

This file was deleted.

31 changes: 0 additions & 31 deletions models/doc/ietf-ped.uml

This file was deleted.

49 changes: 42 additions & 7 deletions models/examples/basic-ped.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,45 @@
# Copyright (c) 2019 Manuel Peuster <[email protected]
# Copyright (c) 2019 SONATA-NFV, 5GTANGO, Paderborn University
# 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, Paderborn University
# 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 also 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 SONATA
# partner consortium (www.5gtango.eu).
---
ped:
descriptor-schema: "https://github.com/sonata-nfv/tng-sdk-benchmark/blob/master/models/"
vendor: "com.vendor"
name: "my_example_ped"
version: "0.1"
author: "Manuel Peuster <[email protected]>"
description: "Example PED."
ped-catalog: # we need this construct to build an IETF 6087 4.9 compatible data model which can even contain no PED.
peds: # a single file can specify multiple PEDs.
- id: "my_first_ped"
descriptor-schema: "https://github.com/sonata-nfv/tng-sdk-benchmark/blob/master/models/"
vendor: "com.vendor"
# name: "my_example_ped" # this should produce an error
version: "0.1"
author: "Manuel Peuster <[email protected]>"
description: "Example PED."
targets:
- id: "first_vnf"
name: "myvnf"
- id: "first_vnf2"
name: "myvnf"




72 changes: 0 additions & 72 deletions models/ietf-ped.yang

This file was deleted.

Loading

0 comments on commit a17e61d

Please sign in to comment.