Dev/andres/master req #152
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request updates the VM name sanitization logic in the OpenShift provider to align with OpenShift's allowed character set, and adjusts the related test cases accordingly. The main change is to simplify the sanitization rules to only replace unsupported characters with hyphens and ensure lowercase, which also affects the expected outputs of the tests.
Sanitization logic update:
sanitized_namemethod inserver/src/uds/services/OpenShift/provider.pyto only allow[a-zA-Z0-9_-]characters, replacing any unsupported character with a hyphen and converting the result to lowercase, limited to 63 characters.Test adjustments:
server/tests/services/openshift/test_provider.pyto reflect the new sanitization behavior, updating expected outputs to match the revised logic for handling unsupported characters and truncation.