![]() dumps ( list_output )) # Add a new alias to the Opnsense device # This will return an object that represents the new alias. PORT # List all the aliases print ( "LIST ALIASES" ) list_output = alias. alias_controller # The values for the example alias example_alias_name = "foo_bar" example_alias_description = "This is the description for foo_bar" example_alias_type = AliasType. A Python library for the Opnsense API Getting Started Supported Controllers and ServicesĮxample Script import json from opnsense_api import Opnsense from opnsense_api.util import AliasType # Create an instance of the Opnsense class opnsense = Opnsense ( api_key = "my_opnsense_api_key", api_secret = "my_opnsense_api_secret", host = "192.168.1.1", ca_path = "/path/to/opnsense/ca/cert_bundle.pem" ) # Get the alias controller alias = opnsense.
0 Comments
Leave a Reply. |