Skip to main content

Interacting with Cisco FTD devices via the FDM REST API in Python

Project description

Firepyer

Firepyer provides a way of interacting with Cisco Firepower devices via their REST APIs in Python. Currently FTD devices using FDM (not FMC) are supported. The intended usage is to replace some of the tedious clicking tasks from the GUI, perform actions on a large number of devices or execute bulk imports of objects, rules etc.

The following versions have been used in development (others should work but YMMV):

  • Python 3.9 (3.8+ is required)
  • FTD 6.6.1-91

Please see the brief instructions below on installing and using Firepyer and visit the documentation for a more comprehensive guide and examples.

Installation

The latest release is available to download from PyPI, simply using pip install firepyer.

Alternatively, as this project is still in early development, the best place to get the most recent features is directly from the source GitHub repo.

Usage

All functionailty for interacting with an FTD device is contained within the Fdm class and it’s methods. Authentication is taken care of transparently when calling a method, so this doesn’t need to be done explicilty.

Import the Fdm class and instantiate an object, passing in your FTD hostname/IP, username and password (and ignoring SSL verification if using an untrusted/self-signed cert):

>>> from firepyer import Fdm
>>> fdm = Fdm(host='192.168.45.45', username='admin', password='Admin123', verify=False)

Then call any of the available methods to run against your FTD:

>>> fdm.get_hostname()
     'firepyer2120'

>>> fdm.get_net_objects('any-ipv4')
     {'description': None,
      'dnsResolution': None,
      'id': '00f7b297-4d44-11eb-9e04-13721b05d633',
      'isSystemDefined': True,
      'links': {'self': 'https://192.168.45.45/api/fdm/latest/object/networks/00f7b297-4d44-11eb-9e04-13721b05d633'},
      'name': 'any-ipv4',
      'subType': 'NETWORK',
      'type': 'networkobject',
      'value': '0.0.0.0/0',
      'version': 'kxd2dzxm2gtwn'}

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

firepyer-0.0.3.tar.gz (14.8 kB view details)

Uploaded Source

Built Distribution

firepyer-0.0.3-py3-none-any.whl (17.9 kB view details)

Uploaded Python 3

File details

Details for the file firepyer-0.0.3.tar.gz.

File metadata

  • Download URL: firepyer-0.0.3.tar.gz
  • Upload date:
  • Size: 14.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.58.0 CPython/3.9.1

File hashes

Hashes for firepyer-0.0.3.tar.gz
Algorithm Hash digest
SHA256 fb00dcdd9f1638bf70f65119591e98d627d8c129545fa905e5a826eec0f91d55
MD5 fbe89992ebc2445e225496aaffb16bc3
BLAKE2b-256 96aede11ecb1046494803c0a113333132453f230b840c490434ae3f8dba36c5b

See more details on using hashes here.

File details

Details for the file firepyer-0.0.3-py3-none-any.whl.

File metadata

  • Download URL: firepyer-0.0.3-py3-none-any.whl
  • Upload date:
  • Size: 17.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.58.0 CPython/3.9.1

File hashes

Hashes for firepyer-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 c47a96ad971698233925ee94f1721415f543d256318d88cf772a26d4e473954b
MD5 6ddc5ac784865bb6899d3a3241666144
BLAKE2b-256 34b5dc18eceec1674d3a9ef3178b8700008b503613b699d222a0eb3fa72a6313

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page