Package: nautobot-plugin-chatops-panorama
Nautobot Panorama ChatOpsThe code in this repository has been migrated to theNautobot ChatOps Repositoryas an integration - read more about it in theChatOps Docs! As of July 2023 this repository has beenFROZEN- all development / issues / discussions for this integration are in theNautobot ChatOps Repositorygoing forward.This is a plugin forNautobotthat extends ChatOps support to Palo Alto Panorama systems. The plugin adds some useful commands into your ChatOps environment that enhances an administrator's and end user's day-to-day usage of Panorama. This framework allows for the quick extension of new ChatOps commands for Panorama.Note: While this plugin requires Nautobot and the base Nautobot ChatOps plugin, it doesnotrequire the Panorama or Palo Alto inventory to be in Nautobot. It is effectively Nautobot-independent, except for using it as a backend to run the chatbot itself.UsageThe supported commands are listed below. We welcome any new command or feature requests by submitting an issue or PR./panorama CommandDescriptionget-devicesGet information about connected devices from Panorama.get-devicegroupsGet information about DeviceGroups and their devices from Panorama.validate-rule-existsVerify that a specific ACL rule exists within a device, via Panorama.get-versionObtain software version information for Panorama.upload-softwareUpload software to specified Palo Alto device.install-softwareInstall software to specified Palo Alto device.get-device-rulesReturn a list of all firewall rules on a given device with details.export-device-rulesGenerate a downloadable list of firewall rules with details in CSV format.capture-trafficRun a packet capture on PANOS Device for specified IP traffic.PrerequisitesThis plugin requires theNautobot ChatOps Pluginto be installed and configured before using. You can find detailed setup and configuration instructionshere.InstallationThe plugin is available as a Python package in pypi and can be installed with pip:pipinstallnautobot-plugin-chatops-panoramaThe plugin is compatible with Nautobot 1.1.0 and higherTo ensure Nautobot Panorama ChatOps is automatically re-installed during future upgrades, create a file namedlocal_requirements.txt(if not already existing) in the Nautobot root directory (alongsiderequirements.txt) and list thenautobot-plugin-chatops-panoramapackage:# echo nautobot-plugin-chatops-panorama >> local_requirements.txtOnce installed, the plugin needs to be enabled in yournautobot_config.py# In your configuration.pyPLUGINS=["nautobot_chatops","nautobot_plugin_chatops_panorama"]In addition, add/update the belowPLUGINS_CONFIGsection tonautobot_config.py.It is only necessary to add the sections from the below snippet for the chat platform you will be using (Slack, Webex, etc.).# Also in nautobot_config.pyPLUGINS_CONFIG={"nautobot_chatops":{# Slack"enable_slack":os.environ.get("ENABLE_SLACK",False),"slack_api_token":os.environ.get("SLACK_API_TOKEN"),"slack_signing_secret":os.environ.get("SLACK_SIGNING_SECRET"),"slack_slash_command_prefix":os.environ.get("SLACK_SLASH_COMMAND_PREFIX","/"),# Webex"enable_webex":os.environ.get("ENABLE_WEBEX",False),"webex_token":os.environ.get("WEBEX_TOKEN"),"webex_signing_secret":os.environ.get("WEBEX_SIGNING_SECRET"),# Mattermost"enable_mattermost":os.environ.get("ENABLE_MATTERMOST",False),"mattermost_api_token":os.environ.get("MATTERMOST_API_TOKEN"),"mattermost_url":os.environ.get("MATTERMOST_URL"),# MS Teams"enable_ms_teams":os.environ.get("ENABLE_MS_TEAMS",False),"microsoft_app_id":os.environ.get("MICROSOFT_APP_ID"),"microsoft_app_password":os.environ.get("MICROSOFT_APP_PASSWORD"),},"nautobot_plugin_chatops_panorama":{"panorama_host":os.environ.get("PANORAMA_HOST"),"panorama_user":os.environ.get("PANORAMA_USER"),"panorama_password":os.environ.get("PANORAMA_PASSWORD"),},}Environment VariablesYou will need to set the following environment variables for your Nautobot instance, then restart the services for them to take effect.PANORAMA_HOST - This is the management DNS/IP address used to reach your Panorama instance.PANORAMA_USER - A user account with API access to Panorama.PANORAMA_PASSWORD - The password that goes with the above user account.exportPANORAMA_HOST="{{ Panorama DNS/URL }}"exportPANORAMA_USER="{{ Panorama account username }}"exportPANORAMA_PASSWORD="{{ Panorama account password }}"If the base Nautobot Chatops plugin is not already installed, the following environment variables are required for the chat platform in use. ThePlatform-specific Setupdocument describes how to retrieve the tokens and secrets for each chat platform that will need to be used in the environment variables.It is only necessary to create the environment variables shown below for the chat platform you will be using. To make the environment variables persistent, add them to the ~/.bash_profile for the user running Nautobot.# SlackexportENABLE_SLACK="true"exportSLACK_API_TOKEN="foobar"exportSLACK_SIGNING_SECRET="foobar"# WebexexportENABLE_WEBEX="true"exportWEBEX_TOKEN="foobar"exportWEBEX_SIGNING_SECRET="foobar"# MattermostexportENABLE_MATTERMOST="false"exportMATTERMOST_API_TOKEN="foobar"exportMATTERMOST_URL="foobar"# Microsoft TeamsexportENABLE_MS_TEAMS="false"exportMICROSOFT_APP_ID="foobar"exportMICROSOFT_APP_PASSWORD="foobar"When deploying as Docker containers, all of the above environment variables should be defined in the filedevelopment/creds.env. An example credentials filecreds.env.exampleis available in thedevelopmentfolder.Access ControlJust like with the regular/nautobotcommand from the base Nautobot ChatOps plugin, the/panoramacommand supports access control through the Access Grants menu in Nautobot. See sectionGrant Access to the Chatbotin the installation guide for the base Nautobot ChatOps plugin for setting this up.QuestionsFor any questions or comments, please check theFAQfirst and feel free to swing by theNetwork to Code slack channel(channel #networktocode).
Sign uphereScreenshots