aas_client3_2.aas_registry
Implement the operations of the Asset Administration Shell Registry API.
The module also implements the Async Bulk Asset Administration Shell Registry API.
The status and the result of the bulk operations are in
aas_client3_2.async_bulk, since both registries share them.
Every public function implements exactly one operation of the specification. The
private functions _build_* and _parse_* build the request and parse
the response of the operation. They do no I/O, and constitute a semi-public
interface for the testing client, which is released in lockstep with this client.
- aas_client3_2.aas_registry.get_all_asset_administration_shell_descriptors(server: Server, *, asset_kind: AssetKind | None = None, asset_type: str | None = None, asset_ids: Sequence[SpecificAssetID] | None = None, created_from: datetime | None = None, updated_from: datetime | None = None, limit: int | None = None, cursor: str | None = None) GetAssetAdministrationShellDescriptorsResult[source]
List a page of the descriptors of the Asset Administration Shells in the registry.
The filters are combined with “and”.
- Parameters:
server¶ – where to send the request
asset_kind¶ – if set, only the descriptors of the assets of this kind
asset_type¶ – if set, only the descriptors of the assets of this type
asset_ids¶ – if set, only the descriptors with all these specific asset IDs
created_from¶ – if set, only the descriptors created at or after this time
updated_from¶ – if set, only the descriptors updated at or after this time
limit¶ – maximum number of the descriptors in the page
cursor¶ – where to continue the listing from
- Returns:
a page of the descriptors
- Raises:
ValueErrorbefore sending anything if a time has no time zone- Implements:
GetAllAssetAdministrationShellDescriptors –
GET /shell-descriptors
- aas_client3_2.aas_registry.post_asset_administration_shell_descriptor(server: Server, asset_administration_shell_descriptor: AssetAdministrationShellDescriptor) AssetAdministrationShellDescriptor[source]
Register an Asset Administration Shell with a new descriptor.
- aas_client3_2.aas_registry.get_asset_administration_shell_descriptor_by_id(server: Server, aas_identifier: str) AssetAdministrationShellDescriptor[source]
Get the descriptor of the Asset Administration Shell with the given identifier.
- aas_client3_2.aas_registry.put_asset_administration_shell_descriptor_by_id(server: Server, aas_identifier: str, asset_administration_shell_descriptor: AssetAdministrationShellDescriptor) None[source]
Create or replace the descriptor of the Asset Administration Shell.
- aas_client3_2.aas_registry.delete_asset_administration_shell_descriptor_by_id(server: Server, aas_identifier: str) None[source]
De-register the Asset Administration Shell by deleting its descriptor.
- aas_client3_2.aas_registry.get_all_submodel_descriptors_through_superpath(server: Server, aas_identifier: str, *, limit: int | None = None, cursor: str | None = None) GetSubmodelDescriptorsResult[source]
List a page of the submodel descriptors in the descriptor of the shell.
- Parameters:
- Returns:
a page of the submodel descriptors
- Implements:
GetAllSubmodelDescriptorsThroughSuperpath –
GET /shell-descriptors/{aasIdentifier}/submodel-descriptors
- aas_client3_2.aas_registry.post_submodel_descriptor_through_superpath(server: Server, aas_identifier: str, submodel_descriptor: SubmodelDescriptor) SubmodelDescriptor[source]
Add a new submodel descriptor to the descriptor of the shell.
- Parameters:
- Returns:
the created submodel descriptor, as stored by the server
- Implements:
PostSubmodelDescriptor-ThroughSuperpath –
POST /shell-descriptors/{aasIdentifier}/submodel-descriptors
- aas_client3_2.aas_registry.get_submodel_descriptor_by_id_through_superpath(server: Server, aas_identifier: str, submodel_identifier: str) SubmodelDescriptor[source]
Get the submodel descriptor with the given identifier from the descriptor of the shell.
- Parameters:
- Returns:
the submodel descriptor
- Implements:
GetSubmodelDescriptorByIdThroughSuperpath –
GET /shell-descriptors/{aasIdentifier}/submodel-descriptors/{submodelIdentifier}
- aas_client3_2.aas_registry.put_submodel_descriptor_by_id_through_superpath(server: Server, aas_identifier: str, submodel_identifier: str, submodel_descriptor: SubmodelDescriptor) None[source]
Create or replace the submodel descriptor in the descriptor of the shell.
- Parameters:
- Implements:
PutSubmodelDescriptorByIdThroughSuperpath –
PUT /shell-descriptors/{aasIdentifier}/submodel-descriptors/{submodelIdentifier}
- aas_client3_2.aas_registry.delete_submodel_descriptor_by_id_through_superpath(server: Server, aas_identifier: str, submodel_identifier: str) None[source]
Delete the submodel descriptor from the descriptor of the shell.
- Parameters:
- Implements:
DeleteSubmodelDescriptorByIdThroughSuperpath –
DELETE /shell-descriptors/{aasIdentifier}/submodel-descriptors/{submodelIdentifier}
- aas_client3_2.aas_registry.query_asset_administration_shell_descriptors(server: Server, query: Query, *, limit: int | None = None, cursor: str | None = None) GetAssetAdministrationShellDescriptorsResult[source]
List a page of the descriptors of the shells which match
query.The
querymust not select the identifiers ("$select": "id"); usequery_asset_administration_shell_descriptor_ids()for that. Both functions implement the same operation, but give different results.- Parameters:
- Returns:
a page of the matching descriptors
- Raises:
ValueErrorbefore sending anything ifqueryselects the identifiers, or can not be serialized to JSON (e.g., a number literal is not finite)- Implements:
QueryAssetAdministrationShellDescriptors –
POST /query/shell-descriptors
- aas_client3_2.aas_registry.query_asset_administration_shell_descriptor_ids(server: Server, query: Query, *, limit: int | None = None, cursor: str | None = None) IdsResult[source]
List a page of the identifiers of the shells whose descriptors match
query.The
querymust select the identifiers ("$select": "id"); usequery_asset_administration_shell_descriptors()for the descriptors. Both functions implement the same operation, but give different results.- Parameters:
- Returns:
a page of the identifiers of the matching shells
- Raises:
ValueErrorbefore sending anything ifquerydoes not select the identifiers, or can not be serialized to JSON (e.g., a number literal is not finite)- Implements:
QueryAssetAdministrationShellDescriptors –
POST /query/shell-descriptors
- aas_client3_2.aas_registry.bulk_post_asset_administration_shell_descriptor(server: Server, asset_administration_shell_descriptors: Sequence[AssetAdministrationShellDescriptor]) OperationHandle[source]
Start registering the Asset Administration Shells with new descriptors at once.
The server processes the bulk request asynchronously. Follow its progress with
aas_client3_2.async_bulk.bulk_get_async_status(), and fetch its result withaas_client3_2.async_bulk.bulk_get_async_result(). The server may accept a bulk request which it later finds invalid; only the result tells.- Parameters:
- Returns:
the handle of the bulk operation
- Raises:
ValueErrorbefore sending anything ifasset_administration_shell_descriptorsis empty- Implements:
BulkPostAssetAdministrationShellDescriptor –
POST /bulk/shell-descriptors
- aas_client3_2.aas_registry.bulk_put_asset_administration_shell_descriptor_by_id(server: Server, asset_administration_shell_descriptors: Sequence[AssetAdministrationShellDescriptor]) OperationHandle[source]
Start creating or replacing the descriptors of the shells at once.
The descriptors are matched to the stored ones by their
id. Seebulk_post_asset_administration_shell_descriptor()for how to follow the bulk operation.- Parameters:
- Returns:
the handle of the bulk operation
- Raises:
ValueErrorbefore sending anything ifasset_administration_shell_descriptorsis empty- Implements:
BulkPutAssetAdministrationShellDescriptorById –
PUT /bulk/shell-descriptors
- aas_client3_2.aas_registry.bulk_delete_asset_administration_shell_descriptor_by_id(server: Server, aas_identifiers: Sequence[str]) OperationHandle[source]
Start de-registering the Asset Administration Shells at once.
See
bulk_post_asset_administration_shell_descriptor()for how to follow the bulk operation.- Parameters:
- Returns:
the handle of the bulk operation
- Raises:
ValueErrorbefore sending anything ifaas_identifiersis empty- Implements:
BulkDeleteAssetAdministrationShellDescriptorById –
DELETE /bulk/shell-descriptors