diff --git a/sdk/basyx/tutorial/tutorial_create_simple_aas.py b/sdk/basyx/tutorial/tutorial_create_simple_aas.py index 43b8995..b0eef9f 100644 --- a/sdk/basyx/tutorial/tutorial_create_simple_aas.py +++ b/sdk/basyx/tutorial/tutorial_create_simple_aas.py @@ -8,6 +8,7 @@ # Import all type classes from the aas-core3.0-python SDK import aas_core3.types as aas_types +from aas_core3 import verification # In this tutorial, you'll get a step-by-step guide on how to create an Asset Administration Shell (AAS) and all # required objects within. First, you need an AssetInformation object for which you want to create an AAS. After that, @@ -132,3 +133,17 @@ ) ] ) + +########################################################################## +# Step 4: Verify the Asset Administration Shell (AAS) and its components # +########################################################################## +# This step ensures that the AAS conforms to the rules and constraints defined by the AAS metamodel. The fields +# themselves do not underlie any restriction. + +# We can use aas_core3.verification.verify(). This method returns an Iterator that we can collect into a list and +# for demonstration reasons assert it to be empty. Each item in this iterator represents a violation of the AAS +# meta-model rules or constraints (e.g. Missing required fields, Invalid types of fields, ...). + +# For more information refer to the official aas-core documentation. + +assert len(list(verification.verify(aas))) == 0