OpenShift introduction#147
Closed
aschumann-virtualcable wants to merge 10 commits into
Closed
Conversation
…onality - Implemented unit tests for OpenShift client, provider, publication, and service functionalities. - Added serialization tests for user services and providers to ensure data integrity during serialization and deserialization. - Created tests for VM lifecycle operations, including creation, deletion, and state checks. - Enhanced test coverage for service availability and error handling scenarios. - Introduced fixed user service tests to validate assignment and operational methods. - Ensured all tests are structured to handle various edge cases and provide meaningful assertions.
…nto dev/janier/master
- Updated serialization tests for OpenshiftProvider to ensure correct method behavior after serialization. - Enhanced publication serialization tests, adding checks for autoserializable fields and marshaling. - Reorganized service tests to group by functionality, including configuration, utility methods, availability, VM operations, and exception handling. - Added detailed tests for VM creation, deletion, and cancellation operations in the deployment context. - Introduced fixed user service tests to validate lifecycle and operation behaviors. - Removed outdated user service fixed tests and consolidated relevant functionality into new structured tests. - Added serialization tests for fixed user service to ensure data integrity during serialization and deserialization.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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 refactors the OpenShift client in
openshift/client.pyto centralize and standardize HTTP request handling, improve error management, and simplify the code. Most direct uses of therequestslibrary and manual header construction have been replaced with a unifieddo_requestmethod. This change enhances maintainability, reduces code duplication, and ensures consistent authentication and error handling across all API interactions. Additionally, some unused code and redundant methods have been removed.Key changes include:
Refactoring HTTP Requests and API Calls
requests.get,requests.post,requests.patch, andrequests.deletecalls with thedo_requestmethod, ensuring consistent use of authentication, error handling, and SSL verification throughout the client (openshift/client.py). [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12]Error Handling Improvements
Code Cleanup and Simplification
tokenimport and theclone_vm_instanceandvalidate_vm_idmethods, to streamline the client class. [1] [2]Behavioral Adjustments
runStrategy, and perform aPUTrequest instead of a patch, aligning with the new request handling approach.Minor Enhancements
provider.pyfor better RFC 1123 compliance and clarity in documentation and implementation.