Skip to content

Implement support for adding globalAssetId to Discovery Service#894

Merged
aaronzi merged 1 commit into
eclipse-basyx:mainfrom
Dekrate:feature/globalAssetIdforDiscoveryService
Oct 21, 2025
Merged

Implement support for adding globalAssetId to Discovery Service#894
aaronzi merged 1 commit into
eclipse-basyx:mainfrom
Dekrate:feature/globalAssetIdforDiscoveryService

Conversation

@Dekrate

@Dekrate Dekrate commented Oct 21, 2025

Copy link
Copy Markdown
Contributor

Description of Changes

This PR implements support for propagating globalAssetId to the Discovery Service alongside specificAssetIds when creating or updating AAS descriptors in the Digital Twin Registry.

Key changes:

  • Added collectAllAssetIds() private method that collects both specificAssetIds and globalAssetId from AAS descriptors
  • The globalAssetId is converted to a SpecificAssetId with the name "globalAssetId" before being sent to the Discovery Service
  • Updated insertAasDescriptor() to propagate globalAssetId when present
  • Updated replaceAasDescriptor() to propagate globalAssetId when present, ensuring it's always called even with empty asset ID lists
  • Added comprehensive unit tests covering all scenarios (globalAssetId with specificAssetIds, globalAssetId only, no globalAssetId, and replace operations)

Related Issue

Closes #893

BaSyx Configuration for Testing

No special configuration is required for testing these changes. The implementation uses Mockito for unit testing and does not require a running BaSyx instance.

All tests should pass successfully.

AAS Files Used for Testing

No external AAS files were required for testing. All test cases use programmatically created AssetAdministrationShellDescriptor objects with:

  • Test descriptors with both specificAssetIds and globalAssetId
  • Test descriptors with only globalAssetId
  • Test descriptors with only specificAssetIds (regression testing)
  • Test descriptors with empty asset ID lists

The test descriptors simulate realistic AAS configurations to verify the Discovery Service integration.

Additional Information

@Dekrate

Dekrate commented Oct 21, 2025

Copy link
Copy Markdown
Contributor Author

@aaronzi Is that okay? You assigned me :) It's my very first contribution in that repository.
All tests pass :)

@aaronzi

aaronzi commented Oct 21, 2025

Copy link
Copy Markdown
Member

Thanks for the PR. I will look into the code later today. What I can see from the checks is that you need to create an Eclipse Account and sign the Eclipse Contributor Agreement (ECA) with the same email that you used the sign your git commits

@Dekrate

Dekrate commented Oct 21, 2025

Copy link
Copy Markdown
Contributor Author

Sure, @aaronzi
If you do not mind, could you please blur more letters in my email? 😊
It would be harder for bots to parse it
Of course I know that still it can be visible via git log
I will create the account

@aaronzi

aaronzi commented Oct 21, 2025

Copy link
Copy Markdown
Member

I removed your mail from my comment :)

@Dekrate

Dekrate commented Oct 21, 2025

Copy link
Copy Markdown
Contributor Author

@aaronzi Done. Registered as a contributor. 😉

@aaronzi aaronzi merged commit 8d064e2 into eclipse-basyx:main Oct 21, 2025
45 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEATURE] Add globalAssetId to discovery integration

2 participants