Skip to content

v7.0.0

Compare
Choose a tag to compare
@Pack3tL0ss Pack3tL0ss released this 06 Sep 18:22
· 528 commits to master since this release

πŸŽ‰πŸ”– v7.0.0 πŸ’₯πŸ’₯ breaking changes

Breaking Changes

  • πŸ’₯ πŸŽ‰ MAJOR overhaul. Breaking Changes!!
  • πŸ’₯ re-named a number of CentralApi methods (for consistency)
  • πŸ’₯ made parameters consistent. device_type, from_time, to_time, mac, serial, serials...
  • πŸ§‘β€πŸ’» device_type should always accept common centralcli library device_types not the various API endpoint device_types.
  • ⚰️ Removed a number of comments, and unused or redundant methods.
  • πŸ§‘β€πŸ’» replaced *args, **kwargs in a few places, with full arg/kwarg typed definitions.
  • ✨ various minor improvements, additional options.
  • 🚚 get_audit_log_events renamed to get_audit_event_logs

Bug Fixes

  • πŸ› Update/fix url for get_dhcp_servers which is renamed to get_dhcp_pools
  • πŸ› fix batch add/delete labels. Needed update after switch to common import file parser.
  • πŸ› fix potential for sub expiration to be None (no sub)
  • πŸ› fix errant logic throwing cache error when one didn't occur
  • βœ… Fix potential for caption to be undefined, corner-case, pytest, or user using hidden -U option
  • πŸ‘½ refactor RateLimit.ok to accomodate accounts with per sec rate-limit disabled.
  • πŸ› Handle scenario where cleaner includes filter that results in no results. (i.e. show inventory --no-sub when all devices have a subscription). This filtering is done in the cleaner.
  • πŸ› cencli upgrade swarm | group fix issue with --at option
    • ✨ add new --in option.
  • πŸ› fix cache update after batch move when only one of site/group move is performed
  • πŸ› fix potential IndexError while cleaning event log output
  • πŸ› fix issue where cencli show acp-logs would exit with an error when -a or -n flag was used.
  • πŸ› fix issue causing cache to update each time test method is ran.
  • πŸ—ƒοΈ πŸ› fix potential rate-limit issue in full cache refresh
  • πŸ› accept datetime object for time params in get_audit_logs and get_audit_logs_events
  • πŸ› Various other minor bug fixes
  • πŸ—ƒοΈ fix potential rate-limit issue in full cache refresh
  • πŸ› refactor cache logging... now done in cache update methods
  • πŸ› Fix issue where show <dev_type | all> --inv stripped MAC address for devices only in the inventory.
  • πŸ› fix common yes options
  • πŸ› fix cli disable auto-sub
  • πŸ› Fix corner-case issue where outdated cache causes exception in client list cleaner
  • πŸ› fix minor bug in batch examples. tablib not honoring booleans in import data

Enhancements

  • ✨ Add support for APs in cencli show interfaces
  • ✨ show inventory now shows colorized subscription expiration for each device.
  • :adjust verbosity options for show inventory and show all
  • ✨ Show inventory now shows subscription expiration
  • 🎨 overhaul show alerts use common time parser.
  • ✨ πŸŽ‰ 🎨 major overhaul of cencli show logs Uses consistent timerange options, supports all available filtering options, completion for level...
  • πŸ—ƒοΈ Update inventory cache after device add
  • ✨ allow delete label or delete labels (singular/plural)
  • πŸ› cencli upgrade device fix issue with --at option
    • 🚩 cencli upgrade device add --in option works similar to common --past option but yiedls time in future.
    • 🎨 simplify iden / iden_meta
  • πŸ—ƒοΈ update cache after site removal
  • ♻️ refactor show audit logs and show audit acp-logs
    🚚 rename sub-command: show audit system-logs is not show audit acp-logs
    πŸ› fix bug related to default start in show audit acp-logs
  • 🎨 simplify start/end accepted format options. Remove seconds
  • 🚩 Add flags for retain config on batch move
  • ✨ πŸŽ‰ Use CLI options/arguments from common clioption.py
  • ✨ show audit logs and show audit acp-logs will accept serial for --dev without doing cache lookup.
  • ✨ Add cencli cancel (upgrade)
  • ✨ improve site completion
  • πŸ—ƒοΈ Use pydantic model for site cache updates
  • πŸ’¬ CombinedResponse ensure RateLimit string is from most recent API call
    πŸ› If CombinedResponse partially failed due to exception it could pull the rate_limit string from the Exception Response which did not perform an API call.
  • πŸ—ƒοΈ Update inv cache after unassigning license from device(s)
  • πŸ’¬ Confirmation prompts and most other messages outside of the actual rendered output are now sent to stderr. (This reduces the amount of other stuff if user redirects stdout)
    • πŸ’‘ --out flag is still the preferred method for redirecting output to a file.
  • πŸ—ƒοΈ model for Labels in cache, improve label completion
  • πŸ—ƒοΈ πŸŽ‰ move and batch move now update the cache after move.
  • ✨ Filter non central licenses, improve get_x_identifier messaging when not found
  • ✨ Add support for license_type and device_type filters to get_subscriptions
  • πŸ—ƒοΈ Improve cache update after label add
  • 🎨 improve sort_by logic (accomodate % in key). restore full response output for failed responses.
  • πŸ’¬ Some minor improvements to assign label <devs>, use error_console for confirmation prompt.
  • ✨ cencli add labels now supports multiple labels,
  • ✨ Update cencli batch delete Allow unnecessary sub-command devices Add -k option to preserve the config for CX switches during group move.
  • ✨ Add cencli check firmware-available...

Dev Improvements

  • ♻️ Improve get_multiline_input
  • βœ… rename rate limit test so it's skipped.
    • This test has to be ran solo, or other tests running in parallel will cause it to fail.
  • ♻️ Move Empty response message to Response object str method
  • 🎨 Improve batch verify logic re subscription/license
  • 🎨 break up show_devices into multiple functions.
  • 🏷️ Improve Inventory model, it is now used as the validator/cleaner for Inventory cache updates.
  • ✨ DateTime constructor now supports format_expiration will colorize associated string representation based on remaining expiration (< 6 months = orange, < 3 months = red).
  • πŸŽ‰ Finish last remaining DateTime bits, add original attribute
  • πŸ“ Added docstr to a few methods that lacked them.
  • ✨ add more common arguments/options
  • πŸ§‘β€πŸ’» Add sep parameter to utils.color. To customize the seperator used to join a list of strings.
  • 🏷️ Add all params and typing params passed to get_*_device methods
  • πŸ§‘β€πŸ’» Add table attribute to Response object. Will return List[dict] where each dict only contains keys common to all other dicts.
  • ♻️ Inventory model will accept pre-cleaned keys from cache
  • πŸ§‘β€πŸ’» Add cache_file_ok property
  • βœ… Add test for show audit acp-logs
  • πŸ§‘β€πŸ’» Add len method to RateLimit object (returns length of the resulting str), may be useful in determining sizing for caption to display nicely.
  • 🚚 move verify_time_range into clicommon
  • 🎨 rename isserial to is_serial for consistency
  • ♻️ rename and adapt delta_to_start() to provide time in past or future.
  • πŸ’¬ Selective colorization for Response string, add __rich__method to Response.
  • 🚚 Move batch_move_devices and get_import_file from clibatch to clicommon. cencli batch delete and cencli delete will both use common funcs
  • βž– remove Halo dependency
  • πŸ’¬ Allow set_width_cols to only include a min value
  • 🚚 Move cencli delete device logic to use common funcs in clicommon (also used be batch delete)
  • πŸ§‘β€πŸ’» helper function when updating dict with values in a list. Either adds key with value as first entry in list, or appends to existing if key already exists.
  • πŸ’¬ πŸŽ‰ ✨ New common confirm method / econsole / console

Output/Display Enhancements

  • πŸ’¬ Filter additional non Central Licenses from show subscription names output.
  • πŸ’¬ show subscription names set min width on subscription name column in rich output
  • ✨ build out output options for show archived
  • πŸ’¬ Remove duplicate display when r.output is None and format is action
  • ✨ Add support for sorting when there is a mix of DateTime and NoneType
  • πŸ’¬ Numerous help text improvements.
  • πŸ’¬ πŸŽ‰ Major spinner overhaul. More details, color, emoji...
  • πŸ’¬ support markup in inner_dict text.
  • πŸ’¬ Adjust format of get_multipline_input prompt
  • πŸ’¬ Add All import types to example for batch delete devices
  • πŸ’¬ sort devices by name in ambiguous device selection menu
  • πŸ’¬ flip default order so newest is on bottom of listing in show logs
  • πŸ’¬ remove potential for duplicate caption display. Make abort=True default for cli.confirm
  • πŸ’¬ for csv output swap in original value for date (epoch timestamp)
    This was the case already in most scenarios, but show firmware list sends an ISO date string. Added original attribute to DateTime object, given ts attribute is not always what was originally sent