-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
38-add-commit-method #54
Merged
Merged
Conversation
This file contains 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
The detailed workflow examples in `address.md` and `address_group.md` have been removed to make the documentation more concise. Reference links to specific example scripts on GitHub have been added to guide users to the full examples, ensuring the documentation remains clear and focused.
Reorder try-except blocks to better manage exceptions and ensure proper cleanup even if errors occur. Moved address object initialization inside the main try block to handle potential authentication failures first. Updated tags in the create_data and ensured consistent function calls for address handling.
This commit introduces a new example script for creating, fetching, updating, and deleting address groups using the SCM client. It includes detailed logging and error handling for common exceptions such as authentication errors and name conflicts. The script demonstrates the process of setting up network objects and managing them efficiently.
This update enhances the BaseObject by introducing methods to check job status and commit configuration changes. The `get_job_status` method allows retrieval of job status using a job ID, while the `commit` method enables committing configuration changes with optional synchronization and timeout parameters. These additions improve interaction with the SCM service by providing more functionality and flexibility.
Introduce models for handling candidate push requests and responses, supporting commit operations in Palo Alto Networks' Strata Cloud Manager. Include job status details and responses to streamline job management and track commit operations effectively.
Implemented methods `get_job_status`, `wait_for_job`, and `commit` to enhance the SCM client with job status checking and configuration commit capabilities. The `commit` method now supports synchronous waiting for job completion with a specified timeout. These additions improve the client's ability to manage and monitor configuration changes more effectively.
This change adds noqa comments to the lines mounting HTTP adapters to suppress linting warnings. It ensures cleaner code by acknowledging the specific case where linting might otherwise flag these lines.
Introduce a `list_jobs` method to support fetching jobs with pagination and optional parent ID filtering. This enhances the module's ability to manage and retrieve job data efficiently. Updated imports to include `JobListResponse` for proper type annotation.
Include JobListItem and JobListResponse in the __init__.py to ensure these classes are available for import from the operations module. This change enhances module accessibility and organization by exposing additional components.
Introduce the JobListItem and JobListResponse models to handle job listing responses, which include pagination details. The JobListItem model includes fields for job details and a validator for timestamp fields, ensuring empty strings are converted to None for better consistency.
The list_jobs method provides functionality for listing jobs with pagination and optional parent ID filtering. It makes an API call to fetch job data and utilizes Pydantic models for response parsing. This enhancement allows users to effectively manage and retrieve job information from SCM.
Replaced json_encoders with field_serializer for datetime conversion to ISO format in JobDetails. This change ensures consistency and better code readability. Also, adjusted the model_config setup for datetime serialization and validation in JobStatusResponse.
Introducing comprehensive unit tests for CandidatePushRequestModel and Job-related models to ensure robustness and correctness. These tests cover validation mechanisms for input data, serialization of datetime objects, and API operations like job listing, status retrieval, and commit procedures. By adding these tests, we're enhancing the quality assurance of the codebase and monitoring critical functionalities.
Added detailed documentation for candidate push and job operations models in the SCM SDK. This includes new files explaining model attributes, exceptions, and usage examples. Updated the client and index documentation to reflect these changes, ensuring automatic token handling and improved error management.
The header comment in the candidate_push.py file was updated to correctly reflect its file path. This change ensures better alignment and reduces confusion for developers navigating the codebase.
This update introduces the ability to perform commits and to pull in job status, enhancing the functionality of the SDK. The release notes and pyproject.toml have been updated to reflect this version change.
Closed
Codecov ReportAll modified and coverable lines are covered by tests ✅
|
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.
Checklist for This Pull Request
🚨Please adhere to the guidelines for contributing to this repository.
Pull Request Description
Adding support for commits and the ability to pull in job status
What does this pull request accomplish?
Are there any breaking changes included?
Is there anything the reviewers should know?
Thank you for your contributions!