model.aas: Initializing an AssetAdministrationShell does not add the submodel to the proper Namespace
When initializing an AssetAdministrationShell (like in the examples):
submodel = model.Submodel(
identification=model.Identifier(
id_="https://example.com/resources/sm/testSubmodel",
id_type=model.IdentifierType.IRI
),
id_short="SimulationModels"
)
aas = model.AssetAdministrationShell(
asset=model.AASReference.from_referable(model.Asset(
kind=model.AssetKind.INSTANCE,
identification=model.Identifier(
id_="https://example.com/resources/asset/{}".format(id_short),
id_type=model.IdentifierType.IRI
)
)),
identification=model.Identifier(
id_="https://example.com/resources/aas/{}".format(id_short),
id_type=model.IdentifierType.IRI
),
submodel={model.AASReference.from_referable(submodel)}
)
the submodel is not added to the AAS namespace:
s = aas.get_referable(id_short="SimulationModels")
>> KeyError: 'Referable with id_short SimulationModels not found in this namespace'