Description of what this PR accomplishes and why it's needed
Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change.
Added a mechanism to ensure that when using a mutliple bar url configuration that have the same name, they get saved as different files.
When multiple bar files, first check if the full filepath is available. If not then iterate a counter and re-attempt (i.e barName-1.bar, barName-2.bar etc). Therefore each bar file will have a unique path.
How Has This Been Tested?
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration
Unit tested the specific case
Tested built image on a cluster:
2021-09-20T10:47:06.452Z No existing file on that path so continuing <<### -- First file downloads and saves as normal
2021-09-20T10:47:06.452Z Will saving bar as: /home/aceuser/initial-config/bars/CustomerDatabaseV1.bar
2021-09-20T10:47:06.452Z Getting configuration from content server
2021-09-20T10:47:06.452Z Using the following url: https://db-01-quickstart-dash:3443/v1/directories/CustomerDatabaseV1?archive=true
2021-09-20T10:47:06.452Z Using ca file /home/aceuser/ssl/cacert.pem
2021-09-20T10:47:06.485Z Configuration pulled from content server successfully
2021-09-20T10:47:06.485Z Previous path already in use. Testing filename: /home/aceuser/initial-config/bars/CustomerDatabaseV1-1.bar <<### -- Second file downloads and adjusts the name and retests the path
2021-09-20T10:47:06.485Z No existing file on that path so continuing
2021-09-20T10:47:06.485Z Will saving bar as: /home/aceuser/initial-config/bars/CustomerDatabaseV1-1.bar
Relevant issue, Epic or stories.
Description of what this PR accomplishes and why it's needed
Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change.
How Has This Been Tested?
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration
Link to ot4i-ace-docker test build: