Build Tools for VMware Aria provides development and release management tools for implementing automation solutions based on the VMware Aria Suite and VMware Cloud Director. The solution enables Virtual Infrastructure Administrators and Automation Developers to use standard DevOps practices for managing and deploying content.
Other
48
stars
24
forks
source link
Content Sharing Policy not pulled if the scope (project) is different than the configured in maven settings.xml #279
When pulling the content sharing policies from vRA there are no files created under policies/content-sharing folder
Steps to Reproduce
Create projects proj1 and proj2
Create blueprint under proj1 shared with all projects
Create templates content source for proj1 (ex. proj1CS)
Create content sharing policy (proj2CSP) with scope proj2 and content source from step 3 (proj1CS)
Add the policy in the content.yaml
policy:
content-sharing:
- proj2CSP
Set proj1</vrang.project.name> in maven settings.xml
Execute mvn vra-ng:pull
Preconditions:
Expected behavior:
File proj2CSP.json created under policies/content-sharing
Actual behavior:
File proj2CSP.json is not created (no "Storing contentSharingPolicy 'proj2CSP'" line in the log)
Reproduces how often:
100%
Component/s:
maven/plugins/vra-ng
Affects Build/s:
2.38.1
Environment
vRA8.16.0
Client
Build Tools for VMware Aria Version: 2.38.1
Visual Studio Code Version: 1.89.1
OS Version: Windows 11 Enterprise 23H2
Server
vRealize Automation Version: 8.16.0
Failure Logs
Related issues and PRs
Additional Context
When I change the project name in maven setting to proj2 (and empty all else in content.yaml so there is no errors fetching other items) the file is created. After this when you put back the proj1 in maven settings and push vra code - there is additional policy with scope proj1 created (expected but not correct)
Discussed with development team:
In the response from vRA for the policies there is a field projectId. It should be populated in the policy file (as projectName) on pull so it can be looked up on push for the proper projectId (CATALOG_SOURCE_IDENTIFIER is done similarly). If it's missing in the file then the configured on maven settings could be used for backward compatibility
Current API response:
The documentation should be updated with a detailed description
Should be checked also the case when there are more than one Content Sharing Policy with the same name as currently a file with index is created for each additional one
Description
When pulling the content sharing policies from vRA there are no files created under policies/content-sharing folder
Steps to Reproduce
Preconditions:
Expected behavior: File proj2CSP.json created under policies/content-sharing
Actual behavior: File proj2CSP.json is not created (no "Storing contentSharingPolicy 'proj2CSP'" line in the log)
Reproduces how often: 100%
Component/s: maven/plugins/vra-ng
Affects Build/s: 2.38.1
Environment
vRA8.16.0
Client
Server
Failure Logs
Related issues and PRs
Additional Context
When I change the project name in maven setting to proj2 (and empty all else in content.yaml so there is no errors fetching other items) the file is created. After this when you put back the proj1 in maven settings and push vra code - there is additional policy with scope proj1 created (expected but not correct)
Discussed with development team: In the response from vRA for the policies there is a field projectId. It should be populated in the policy file (as projectName) on pull so it can be looked up on push for the proper projectId (CATALOG_SOURCE_IDENTIFIER is done similarly). If it's missing in the file then the configured on maven settings could be used for backward compatibility Current API response:
The documentation should be updated with a detailed description Should be checked also the case when there are more than one Content Sharing Policy with the same name as currently a file with index is created for each additional one