This repository has been archived by the owner on Nov 21, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
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
sbasan
changed the title
api and endpoints containers as cached properties
fix session load time
May 3, 2024
sbasan
force-pushed
the
fix/session-load-time
branch
from
May 3, 2024 08:09
fda8f1f
to
67a3c0b
Compare
sbasan
force-pushed
the
fix/session-load-time
branch
from
May 6, 2024 13:13
67a3c0b
to
e265fce
Compare
jpkrajewski
approved these changes
May 7, 2024
sbasan
force-pushed
the
fix/session-load-time
branch
from
May 17, 2024 08:33
e265fce
to
54720f0
Compare
sbasan
force-pushed
the
fix/session-load-time
branch
from
May 17, 2024 08:52
54720f0
to
dc286af
Compare
bboot2
reviewed
May 17, 2024
self._platform_version: str = "" | ||
self._api_version: Version | ||
self._state: ManagerSessionState = ManagerSessionState.OPERATIVE | ||
self.restart_timeout: int = 1200 | ||
self.polling_requests_timeout: int = 10 | ||
self._validate_responses = validate_responses | ||
|
||
@cached_property |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cool
bboot2
approved these changes
May 17, 2024
sbasan
added a commit
that referenced
this pull request
May 17, 2024
sbasan
added a commit
that referenced
this pull request
May 20, 2024
* fix model_validators with before mode * remove print statement * skip not validated policy definitions and lists during collect * fix literal default value * add version field in UX1/UX2Config models * fix bgp parcel enveloping alias path * use UX2ConfigPushResult as push return value for push_ux2_config * allow disabling of response validation against pydantic model * include original cause and info from server in ManagerHTTPError * fix: request and response must be provided as kwargs * introduce find method for DataSequence (#627) * api and endpoints containers as cached properties (#629) * fix typo * hotfix ManagerErrorInfo model * do not collect templates for specific device types * bump version, generate ENDPOINTS.md * fix OspfArea model
sbasan
added a commit
that referenced
this pull request
Jun 11, 2024
* Revert "Dev/rebase migration" (#513) * Fix find_template_values when vipValue not present (#520) * clear cookies on login, bump minor (#532) * [Fix] validation software timeout (#534) * clear cookies on login, bump minor * fix validation value --------- Co-authored-by: sbasan <[email protected]> * fix log message level for request exceptions * bump patch version * disable relogin flag during logout (#537) * fix typo (#542) * update deprecated github actions (#544) * update deprecated github actions * fix type error * Simplify conditional logic. Add comments. Create new field in cisco vpn feature template model. (new in 20.14) * Transfer to cisco-open repository (#1) * use new uri, add missing copyright, bump version, regenerate ENDPOINTS.md * regenerate endpoints after rebase * define codeowners * .github codeowners * usernames in codeowners * remove pydantic v1 models (#10) * remove pydantic v1 models * fix problems * bump minor version * Fix DeviceData types (#13) * Fix DeviceData types * Bump sdk version * Update README.md * Update README.md * Update README.md * Update README.md * Add default None values to the Tier model (#16) * Fix: admintech wait (#17) * version check and model update for user * admin tech - wait for file ready * get token * correct logic * Add default None values to the Tier model (#16) --------- Co-authored-by: Nikhil <[email protected]> Co-authored-by: PrzeG <[email protected]> * fix admintech, generate endpoints md for new release (#18) * generate endpoints md * fix admintech api and unittests * Update README.md * Update versions_utils.py ``` -------------------------------------------------- nExpress_mtt.test_nExpress_mtt_verify_provider_software_upgrade_data -------------------------------------------------- verify_provider_software_upgrade_vmanage(PROVIDER) [PASS] "All VManages updated correctly." verify_provider_software_upgrade_vbond(PROVIDER) [PASS] "All VBonds updated correctly." verify_set_default_partition_for_vbond(PROVIDER) [PASS] "Successfully set the default version for partition." ``` * Update versions_utils.py * Update versions_utils.py * Update versions_utils.py * Release 0.33.3 * server_info * monitoring * monitoring * tests * fix tags field for DeviceDetailsResponse * unit-test * enhance modesl for configuration_settings * don't use Union * allow centralized cli policy creation * fix for groupId for get_list_of_installed_devices * Release/0.33.4 * url_monitoring initial commit * GET Monitoring Security Policy Device List (#45) * GET Monitoring Security Policy Device List * Update security_policy.py * Update security_policy.py * Update test_monitoring_security_policy.py * Add files via upload * Delete endpoints/endpoints_container.py * Delete endpoints/monitoring/security_policy.py * Delete models/security_policy.py * Delete tests/test_monitoring_security_policy.py * Add files via upload * Add files via upload * Update security_policy.py * Delete catalystwan/models/security_policy.py * Update endpoints_container.py * Update endpoints_container.py * Update security_policy.py * Update security_policy.py * Update test_monitoring_security_policy.py * Update security_policy.py * Update security_policy.py * Adding api support for Lxc virutal image Upgrade,Activate and Delete action * Ran black and flake8 on change files * Fixing poetry check error from pre-commit * Fixing errors from pre-commit * Release/0.33.5 * fix pre-commit for python 3.12 (#614) * Update README.md * Update README.md * allow disabling of response validation against pydantic model * rename property, remove print from tests * unit tests added for url_monitoring * updated the imports * updated import sort * Fix sequence creation when payload is None. Use Field instead of conint * Revert breaking change * Fix value for field examples * include original cause and info from server in ManagerHTTPError * fix: request and response must be provided as kwargs * Bump version to 0.33.6 * introduce find method for DataSequence (#627) * api and endpoints containers as cached properties (#629) * hotfix ManagerErrorInfo model * Fix find_template_values to return device variables in correct structure * Delete if condition with pass * Fix Issue646 Not content in response * restore tenant model validate during login * bump release version * alarms-20.15 * 0.33.8 * Validate XSRF token returned by server In same case this token can be login page and raise incorrect error in future login flow. * Add copy and deepcopy * Remove 2023 license * merge and fix confilcts --------- Co-authored-by: PrzeG <[email protected]> Co-authored-by: cicharka <[email protected]> Co-authored-by: JimOverholt <[email protected]> Co-authored-by: Jakub Krajewski <[email protected]> Co-authored-by: Nikhil <[email protected]> Co-authored-by: Piotr Smialkowski <[email protected]> Co-authored-by: Jim Overholt <[email protected]> Co-authored-by: acichon <[email protected]> Co-authored-by: nikhilkp93 <[email protected]> Co-authored-by: Renuka Mohan Channapatna (rchannap) <[email protected]> Co-authored-by: Robert Mooy <[email protected]> Co-authored-by: Surendran Palanimuthu <[email protected]> Co-authored-by: renukavinay <[email protected]> Co-authored-by: Jakub Krajewski <[email protected]>
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Pull Request summary:
Use
cached_property
forapi
andendpoints
containers inManagerSession
class.Import required modules on-demand.
This PR needs follow up:
APIContainer
andAPIEndpointContainer
classes properties also needs to utilize this trick so items are imported only when first used to further optimize load time.Description of changes:
Because
APIContainer
andAPIEndpointContainer
incorporate large number of pydantic models it could take long time before everything is imported for first time.Before:
After:
Checklist: