Skip to content

arunc-Refactored main.py with improved MCP task handling#1

Open
arunchandar0601 wants to merge 1 commit into
versa-networks:mainfrom
arunchandar0601:feature/arunc-refactor-main-py
Open

arunc-Refactored main.py with improved MCP task handling#1
arunchandar0601 wants to merge 1 commit into
versa-networks:mainfrom
arunchandar0601:feature/arunc-refactor-main-py

Conversation

@arunchandar0601

Copy link
Copy Markdown
  1. Live User Commands: Short-form Reference Support
    • Introduced LIVE_COMMAND_REFERENCES dictionary to map short command references.
    • Added helper: resolve_command_reference() to convert short form to encoded full command.
    • Added support for command_ref and org_name in:
    • get_appliance_live_status
    • get_live_users_by_org

  1. EIP (Endpoint Info Protection) Enhancements
    • Added EIP_COMMAND_REFERENCES for short-form references (e.g., "eip-cache-brief").
    • Added helper function: resolve_eip_command_reference().
    • Updated get_appliance_eip_details() to:
    • Support short-form command references.
    • Support auto_paginate for fetching all records.
    • Return enhanced _metadata and pagination info.

  1. New EIP Tooling
    • get_appliance_eip_data_by_mac()
    • Given a MAC address, pulls EIP data for a specific org and appliance.
    • extract_mac_addresses_from_eip_cache()
    • Extracts and returns MACs from the EIP cache result.
    • get_eip_system_analysis()
    • Complete EIP flow: get cache → extract MACs → fetch data for each MAC.
    • Summarizes success, error count, processing stats.

  1. Session Insights
    • get_appliance_sessions_summary()
    • Fetches session summary for a specific appliance and org.
    • get_appliance_session_extensive_details()
    • Detailed session dump via POST request, supports advanced fields.

  1. Convenience Utilities
    • get_live_users_by_org()
    • Abstracted function for getting live users via short form (brief/detail).
    • get_available_command_refs()
    • Lists all valid command_refs, org requirements, usage examples.
    • get_all_appliance_eip_details()
    • Wrapper for fetching all EIP records via batched auto-pagination.

  1. Improved Metadata & Traceability
    • Many functions now return _metadata including:
    • appliance_name
    • command_ref vs direct command
    • org_name
    • Pagination stats (records fetched, pages processed)
    • Errors (if any)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant