diff --git a/CHANGELOG.md b/CHANGELOG.md index eff1214..edf3eba 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,11 +1,63 @@ -# 1.0.6 [2020-04-01] +# 1.0.7 [2021-07-25] + +## New + +* Added support for FMC 7.0.0 api calls + * GET integration.fmchastatus + * GET integration.securexconfig + * GET object.anyconnectcustomattribute + * GET object.anyconnectpackage + * GET object.anyconnectprofile + * CREATE, UPDATE, DELETE object.applicationfilter + * GET object.certificatemap + * CREATE, UPDATE, DELETE object.dnsservergroup + * CREATE, GET, UPDATE, DELETE object.dynamicobject + * CREATE, UPDATE, DELETE object.geolocation + * GET object.grouppolicy + * GET object.hostscanpackage + * CREATE, GET, UPDATE, DELETE object.intrusionrule + * CREATE, GET, UPDATE, DELETE object.intrusionrulegroup + * GET object.ipv4addresspool + * GET object.ipv6addresspool + * CREATE, GET, UPDATE, DELETE object.localrealmuser + * GET object.radiusservergroup + * CREATE, GET, UPDATE, DELETE object.realm + * GET object.sidnsfeed + * GET object.sidnslist + * GET object.sinetworkfeed + * GET object.sinetworklist + * GET object.sinkhole + * GET object.ssoserver + * GET bject.usage + * GET policy.accesspolicy.securityintelligencepolicy + * GET policy.dnspolicy + * GET policy.dnspolicy.allowdnsrule + * GET policy.dnspolicy.blockdnsrule + * GET policy.dynamicaccesspolicy + * GET policy.identitypolicy + * CREATE, UPDATE, DELETE policy.intrusionpolicy + * GET, UPDATE policy.intrusionpolicy.intrusionrulegroup + * GET, UPDATE policy.intrusionpolicy.intrusionrule + * CREATE, GET, UPDATE, DELETE policy.networkanalysispolicy + * GET, UPDATE, DELETE policy.networkanalysispolicy.inspectorconfig + * GET, UPDATE, DELETE policy.networkanalysispolicy.inspectoroverrideconfig + * GET policy.ravpn + * GET policy.ravpn.addressassignmensettings + * GET policy.ravpn.certificatemapsettings + * GET policy.ravpn.connectionprofile + +## Fixed + +* Authentication refresh failed due to incorrect object reference in utils.py + +# 1.0.6 [2021-04-01] ## Fixed * Bulk create/update failed due to bulk param not being set automatically for some resources * RateLimiter error was not handled correctly leading to retry operations not being tried -# 1.0.5 [2020-03-19] +# 1.0.5 [2021-03-19] ## Fixed diff --git a/fireREST/fmc/integration/__init__.py b/fireREST/fmc/integration/__init__.py index 6c776a7..5fd7003 100644 --- a/fireREST/fmc/integration/__init__.py +++ b/fireREST/fmc/integration/__init__.py @@ -3,6 +3,8 @@ from fireREST.fmc.integration.cloudregion import CloudRegion from fireREST.fmc.integration.externallookup import ExternalLookup from fireREST.fmc.integration.externalstorage import ExternalStorage +from fireREST.fmc.integration.fmchastatus import FmcHaStatus +from fireREST.fmc.integration.securexconfig import SecurexConfig class Integration: @@ -11,3 +13,5 @@ def __init__(self, conn: Connection): self.cloudregion = CloudRegion(conn) self.externallookup = ExternalLookup(conn) self.externalstorage = ExternalStorage(conn) + self.fmchastatus = FmcHaStatus(conn) + self.securexconfig = SecurexConfig(conn) diff --git a/fireREST/fmc/integration/fmchastatus/__init__.py b/fireREST/fmc/integration/fmchastatus/__init__.py new file mode 100644 index 0000000..95bdee3 --- /dev/null +++ b/fireREST/fmc/integration/fmchastatus/__init__.py @@ -0,0 +1,6 @@ +from fireREST.fmc import Resource + + +class FmcHaStatus(Resource): + PATH = '/integration/fmchastatuses/{uuid}' + MINIMUM_VERSION_REQUIRED_GET = '7.0.0' diff --git a/fireREST/fmc/integration/securexconfig/__init__.py b/fireREST/fmc/integration/securexconfig/__init__.py new file mode 100644 index 0000000..693188e --- /dev/null +++ b/fireREST/fmc/integration/securexconfig/__init__.py @@ -0,0 +1,8 @@ +from fireREST.fmc import Resource + + +class SecurexConfig(Resource): + PATH = '/integration/securexconfigs/{uuid}' + MINIMUM_VERSION_REQUIRED_GET = '7.0.0' + MINIMUM_VERSION_REQUIRED_UPDATE = '7.0.0' + diff --git a/fireREST/fmc/object/__init__.py b/fireREST/fmc/object/__init__.py index e20df9c..a13ce5a 100644 --- a/fireREST/fmc/object/__init__.py +++ b/fireREST/fmc/object/__init__.py @@ -1,5 +1,8 @@ from fireREST.fmc import Connection, Resource from fireREST.fmc.object.anyprotocolportobject import AnyProtocolPortObject +from fireREST.fmc.object.anyconnectcustomattribute import AnyconnectCustomAttribute +from fireREST.fmc.object.anyconnectpackage import AnyconnectPackage +from fireREST.fmc.object.anyconnectprofile import AnyconnectProfile from fireREST.fmc.object.application import Application from fireREST.fmc.object.applicationcategory import ApplicationCategory from fireREST.fmc.object.applicationfilter import ApplicationFilter @@ -9,17 +12,23 @@ from fireREST.fmc.object.applicationtype import ApplicationType from fireREST.fmc.object.aspathlist import AsPathList from fireREST.fmc.object.certenrollment import CertEnrollment +from fireREST.fmc.object.certificatemap import CertificateMap from fireREST.fmc.object.communitylist import CommunityList from fireREST.fmc.object.continent import Continent from fireREST.fmc.object.country import Country from fireREST.fmc.object.dnsservergroup import DnsServerGroup +from fireREST.fmc.object.dynamicobject import DynamicObject from fireREST.fmc.object.endpointdevicetype import EndpointDeviceType from fireREST.fmc.object.expandedcommunitylist import ExpandedCommunityList from fireREST.fmc.object.extendedaccesslist import ExtendedAccessList from fireREST.fmc.object.fqdn import Fqdn from fireREST.fmc.object.geolocation import GeoLocation from fireREST.fmc.object.globaltimezone import GlobalTimeZone +from fireREST.fmc.object.grouppolicy import GroupPolicy from fireREST.fmc.object.host import Host +from fireREST.fmc.object.hostscanpackage import HostscanPackage +from fireREST.fmc.object.intrusionrule import IntrusionRule +from fireREST.fmc.object.intrusionrulegroup import IntrusionRuleGroup from fireREST.fmc.object.icmpv4object import Icmpv4Object from fireREST.fmc.object.icmpv6object import Icmpv6Object from fireREST.fmc.object.ikev1ipsecproposal import Ikev1IpsecProposal @@ -28,26 +37,37 @@ from fireREST.fmc.object.ikev2policy import Ikev2Policy from fireREST.fmc.object.interface import Interface from fireREST.fmc.object.interfacegroup import InterfaceGroup +from fireREST.fmc.object.ipv4addresspool import Ipv4AddressPool from fireREST.fmc.object.ipv4prefixlist import Ipv4PrefixList +from fireREST.fmc.object.ipv6addresspool import Ipv6AddressPool from fireREST.fmc.object.ipv6prefixlist import Ipv6PrefixList from fireREST.fmc.object.isesecuritygrouptag import IseSecurityGroupTag from fireREST.fmc.object.keychain import KeyChain from fireREST.fmc.object.network import Network from fireREST.fmc.object.networkaddress import NetworkAddress from fireREST.fmc.object.networkgroup import NetworkGroup +from fireREST.fmc.object.operational import Operational from fireREST.fmc.object.policylist import PolicyList from fireREST.fmc.object.port import Port from fireREST.fmc.object.portobjectgroup import PortObjectGroup from fireREST.fmc.object.protocolportobject import ProtocolPortObject from fireREST.fmc.object.range import Range +from fireREST.fmc.object.radiusservergroup import RadiusServerGroup +from fireREST.fmc.object.realm import Realm from fireREST.fmc.object.realmuser import RealmUser from fireREST.fmc.object.realmusergroup import RealmUserGroup from fireREST.fmc.object.routemap import RouteMap from fireREST.fmc.object.securitygrouptag import SecurityGroupTag from fireREST.fmc.object.securityzone import SecurityZone +from fireREST.fmc.object.sidnsfeed import SiDnsFeed +from fireREST.fmc.object.sidnslist import SiDnsList +from fireREST.fmc.object.sinetworkfeed import SiNetworkFeed +from fireREST.fmc.object.sinetworklist import SiNetworkList from fireREST.fmc.object.siurlfeed import SiUrlFeed from fireREST.fmc.object.siurllist import SiUrlList +from fireREST.fmc.object.sinkhole import Sinkhole from fireREST.fmc.object.slamonitor import SlaMonitor +from fireREST.fmc.object.ssoserver import SsoServer from fireREST.fmc.object.standardaccesslist import StandardAccessList from fireREST.fmc.object.standardcommunitylist import StandardCommunityList from fireREST.fmc.object.timerange import Timerange @@ -64,6 +84,9 @@ class Object: def __init__(self, conn: Connection): self.anyprotocolportobject = AnyProtocolPortObject(conn) + self.anyconnectcustomattribute = AnyconnectCustomAttribute(conn) + self.anyconnectpackage = AnyconnectPackage(conn) + self.anyconnectprofile = AnyconnectProfile(conn) self.application = Application(conn) self.applicationcategory = ApplicationCategory(conn) self.applicationfilter = ApplicationFilter(conn) @@ -73,17 +96,21 @@ def __init__(self, conn: Connection): self.applicationtype = ApplicationType(conn) self.aspathlist = AsPathList(conn) self.certenrollment = CertEnrollment(conn) + self.certificatemap = CertificateMap(conn) self.communitylist = CommunityList(conn) self.continent = Continent(conn) self.country = Country(conn) self.dnsservergroup = DnsServerGroup(conn) + self.dynamicobject = DynamicObject(conn) self.endpointdevicetype = EndpointDeviceType(conn) self.expandedcommunitylist = ExpandedCommunityList(conn) self.extendedaccesslist = ExtendedAccessList(conn) self.fqdn = Fqdn(conn) self.geolocation = GeoLocation(conn) self.globaltimezone = GlobalTimeZone(conn) + self.grouppolicy = GroupPolicy(conn) self.host = Host(conn) + self.hostscanpackage = HostscanPackage(conn) self.icmpv4object = Icmpv4Object(conn) self.icmpv6object = Icmpv6Object(conn) self.ikev1ipsecproposal = Ikev1IpsecProposal(conn) @@ -92,26 +119,39 @@ def __init__(self, conn: Connection): self.ikev2policy = Ikev2Policy(conn) self.interface = Interface(conn) self.interfacegroup = InterfaceGroup(conn) + self.intrusionrule = IntrusionRule(conn) + self.intrusionrulegroup = IntrusionRuleGroup(conn) + self.ipv4addresspool = Ipv4AddressPool(conn) self.ipv4prefixlist = Ipv4PrefixList(conn) + self.ipv6addresspool = Ipv6AddressPool(conn) self.ipv6prefixlist = Ipv6PrefixList(conn) self.isesecuritygrouptag = IseSecurityGroupTag(conn) self.keychain = KeyChain(conn) self.network = Network(conn) self.networkaddress = NetworkAddress(conn) self.networkgroup = NetworkGroup(conn) + self.operational = Operational(conn) self.policylist = PolicyList(conn) self.port = Port(conn) self.portobjectgroup = PortObjectGroup(conn) self.protocolportobject = ProtocolPortObject(conn) + self.radiusservergroup = RadiusServerGroup(conn) self.range = Range(conn) + self.realm = Realm(conn) self.realmuser = RealmUser(conn) self.realmusergroup = RealmUserGroup(conn) self.routemap = RouteMap(conn) self.securitygrouptag = SecurityGroupTag(conn) self.securityzone = SecurityZone(conn) + self.sidnsfeed = SiDnsFeed(conn) + self.sidnslist = SiDnsList(conn) + self.sinetworkfeed = SiNetworkFeed(conn) + self.sinetworklist = SiNetworkList(conn) + self.sinkhole = Sinkhole(conn) self.siurlfeed = SiUrlFeed(conn) self.siurllist = SiUrlList(conn) self.slamonitor = SlaMonitor(conn) + self.ssoserver = SsoServer(conn) self.standardaccesslist = StandardAccessList(conn) self.standardcommunitylist = StandardCommunityList(conn) self.timerange = Timerange(conn) diff --git a/fireREST/fmc/object/anyconnectcustomattribute/__init__.py b/fireREST/fmc/object/anyconnectcustomattribute/__init__.py new file mode 100644 index 0000000..f91ae47 --- /dev/null +++ b/fireREST/fmc/object/anyconnectcustomattribute/__init__.py @@ -0,0 +1,19 @@ +from fireREST import utils +from fireREST.fmc import Resource, Connection +from fireREST.fmc.object.anyconnectcustomattribute.override import Override + + +class AnyconnectCustomAttribute(Resource): + PATH = '/object/anyconnectcustomattributes/{uuid}' + MINIMUM_VERSION_REQUIRED_GET = '7.0.0' + + SUPPORTED_FILTERS = ['name_or_value', 'unused_only'] + SUPPORTED_PARAMS = ['override_target_id'] + + def __init__(self, conn: Connection): + super().__init__(conn) + self.override = Override(conn) + + @utils.support_params + def get(self, uuid=None, name=None, name_or_value=None, unused_only=None, override_target_id=None, params=None): + return super().get(uuid=uuid, name=name, params=params) diff --git a/fireREST/fmc/object/anyconnectcustomattribute/override/__init__.py b/fireREST/fmc/object/anyconnectcustomattribute/override/__init__.py new file mode 100644 index 0000000..d4c2f2e --- /dev/null +++ b/fireREST/fmc/object/anyconnectcustomattribute/override/__init__.py @@ -0,0 +1,8 @@ +from fireREST.fmc import ChildResource + + +class Override(ChildResource): + CONTAINER_NAME = 'AnyconnectCustomAttribute' + CONTAINER_PATH = '/object/anyconnectcustomattributes/{uuid}' + PATH = '/object/anyconnectcustomattributes/{container_uuid}/overrides/{uuid}' + MINIMUM_VERSION_REQUIRED_GET = '7.0.0' diff --git a/fireREST/fmc/object/anyconnectpackage/__init__.py b/fireREST/fmc/object/anyconnectpackage/__init__.py new file mode 100644 index 0000000..9f0d9b2 --- /dev/null +++ b/fireREST/fmc/object/anyconnectpackage/__init__.py @@ -0,0 +1,16 @@ +from fireREST import utils +from fireREST.fmc import Resource, Connection + + +class AnyconnectPackage(Resource): + PATH = '/object/anyconnectpackages/{uuid}' + MINIMUM_VERSION_REQUIRED_GET = '7.0.0' + + SUPPORTED_FILTERS = ['name_or_value', 'unused_only'] + + def __init__(self, conn: Connection): + super().__init__(conn) + + @utils.support_params + def get(self, uuid=None, name=None, name_or_value=None, unused_only=None, params=None): + return super().get(uuid=uuid, name=name, params=params) diff --git a/fireREST/fmc/object/anyconnectprofile/__init__.py b/fireREST/fmc/object/anyconnectprofile/__init__.py new file mode 100644 index 0000000..3a1815d --- /dev/null +++ b/fireREST/fmc/object/anyconnectprofile/__init__.py @@ -0,0 +1,16 @@ +from fireREST import utils +from fireREST.fmc import Resource, Connection + + +class AnyconnectProfile(Resource): + PATH = '/object/anyconnectprofiles/{uuid}' + MINIMUM_VERSION_REQUIRED_GET = '7.0.0' + + SUPPORTED_FILTERS = ['name_or_value', 'unused_only'] + + def __init__(self, conn: Connection): + super().__init__(conn) + + @utils.support_params + def get(self, uuid=None, name=None, name_or_value=None, unused_only=None, params=None): + return super().get(uuid=uuid, name=name, params=params) diff --git a/fireREST/fmc/object/applicationfilter/__init__.py b/fireREST/fmc/object/applicationfilter/__init__.py index 1619f28..f8d0505 100644 --- a/fireREST/fmc/object/applicationfilter/__init__.py +++ b/fireREST/fmc/object/applicationfilter/__init__.py @@ -3,4 +3,7 @@ class ApplicationFilter(Resource): PATH = '/object/applicationfilters/{uuid}' + MINIMUM_VERSION_REQUIRED_CREATE = '7.0.0' MINIMUM_VERSION_REQUIRED_GET = '6.1.0' + MINIMUM_VERSION_REQUIRED_UPDATE = '7.0.0' + MINIMUM_VERSION_REQUIRED_DELETE = '7.0.0' diff --git a/fireREST/fmc/object/certificatemap/__init__.py b/fireREST/fmc/object/certificatemap/__init__.py new file mode 100644 index 0000000..211af37 --- /dev/null +++ b/fireREST/fmc/object/certificatemap/__init__.py @@ -0,0 +1,6 @@ +from fireREST.fmc import Resource + + +class CertificateMap(Resource): + PATH = '/object/certificatemaps/{uuid}' + MINIMUM_VERSION_REQUIRED_GET = '7.0.0' diff --git a/fireREST/fmc/object/dnsservergroup/__init__.py b/fireREST/fmc/object/dnsservergroup/__init__.py index 051ac53..34d880d 100644 --- a/fireREST/fmc/object/dnsservergroup/__init__.py +++ b/fireREST/fmc/object/dnsservergroup/__init__.py @@ -1,4 +1,6 @@ -from fireREST.fmc import Resource +from fireREST import utils +from fireREST.fmc import Resource, Connection +from fireREST.fmc.object.dnsservergroup.override import Override class DnsServerGroup(Resource): @@ -7,3 +9,14 @@ class DnsServerGroup(Resource): MINIMUM_VERSION_REQUIRED_GET = '6.3.0' MINIMUM_VERSION_REQUIRED_UPDATE = '6.3.0' MINIMUM_VERSION_REQUIRED_DELETE = '6.3.0' + + SUPPORTED_PARAMS = ['override_target_id'] + + def __init__(self, conn: Connection): + super().__init__(conn) + self.override = Override(conn) + + @utils.support_params + def get(self, uuid=None, name=None, override_target_id=None, params=None): + return super().get(uuid=uuid, name=name, params=params) + diff --git a/fireREST/fmc/object/dnsservergroup/override/__init__.py b/fireREST/fmc/object/dnsservergroup/override/__init__.py new file mode 100644 index 0000000..03acd60 --- /dev/null +++ b/fireREST/fmc/object/dnsservergroup/override/__init__.py @@ -0,0 +1,8 @@ +from fireREST.fmc import ChildResource + + +class Override(ChildResource): + CONTAINER_NAME = 'DnsServerGroup' + CONTAINER_PATH = '/object/dnsservergroups/{uuid}' + PATH = '/object/dnsservergroups/{container_uuid}/overrides/{uuid}' + MINIMUM_VERSION_REQUIRED_GET = '7.0.0' diff --git a/fireREST/fmc/object/dynamicobject/__init__.py b/fireREST/fmc/object/dynamicobject/__init__.py new file mode 100644 index 0000000..24f1259 --- /dev/null +++ b/fireREST/fmc/object/dynamicobject/__init__.py @@ -0,0 +1,15 @@ +from fireREST import utils +from fireREST.fmc import Resource, Connection +from fireREST.fmc.object.dynamicobject.mapping import Mapping + + +class DynamicObject(Resource): + PATH = '/object/dynamicobjects/{uuid}' + MINIMUM_VERSION_REQUIRED_CREATE = '7.0.0' + MINIMUM_VERSION_REQUIRED_GET = '7.0.0' + MINIMUM_VERSION_REQUIRED_UPDATE = '7.0.0' + MINIMUM_VERSION_REQUIRED_DELETE = '7.0.0' + + def __init__(self, conn: Connection): + super().__init__(conn) + self.mapping = Mapping(conn) diff --git a/fireREST/fmc/object/dynamicobject/mapping/__init__.py b/fireREST/fmc/object/dynamicobject/mapping/__init__.py new file mode 100644 index 0000000..ec39e45 --- /dev/null +++ b/fireREST/fmc/object/dynamicobject/mapping/__init__.py @@ -0,0 +1,11 @@ +from fireREST.fmc import ChildResource + + +class Mapping(ChildResource): + CONTAINER_NAME = 'DynamicObject' + CONTAINER_PATH = '/object/dynamicobjects/{uuid}' + PATH = '/object/dynamicobjects/{container_uuid}/overrides/{uuid}' + MINIMUM_VERSION_REQUIRED_GET = '7.0.0' + MINIMUM_VERSION_REQUIRED_UPDATE = '7.0.0' + MINIMUM_VERSION_REQUIRED_DELETE = '7.0.0' + diff --git a/fireREST/fmc/object/geolocation/__init__.py b/fireREST/fmc/object/geolocation/__init__.py index 11f6aac..6c2468f 100644 --- a/fireREST/fmc/object/geolocation/__init__.py +++ b/fireREST/fmc/object/geolocation/__init__.py @@ -3,4 +3,7 @@ class GeoLocation(Resource): PATH = '/object/geolocations/{uuid}' + MINIMUM_VERSION_REQUIRED_CREATE = '7.0.0' MINIMUM_VERSION_REQUIRED_GET = '6.1.0' + MINIMUM_VERSION_REQUIRED_UPDATE = '7.0.0' + MINIMUM_VERSION_REQUIRED_DELETE = '7.0.0' diff --git a/fireREST/fmc/object/grouppolicy/__init__.py b/fireREST/fmc/object/grouppolicy/__init__.py new file mode 100644 index 0000000..85708fc --- /dev/null +++ b/fireREST/fmc/object/grouppolicy/__init__.py @@ -0,0 +1,6 @@ +from fireREST.fmc import Resource + + +class GroupPolicy(Resource): + PATH = '/object/grouppolicies/{uuid}' + MINIMUM_VERSION_REQUIRED_GET = '7.0.0' diff --git a/fireREST/fmc/object/hostscanpackage/__init__.py b/fireREST/fmc/object/hostscanpackage/__init__.py new file mode 100644 index 0000000..9c1b963 --- /dev/null +++ b/fireREST/fmc/object/hostscanpackage/__init__.py @@ -0,0 +1,6 @@ +from fireREST.fmc import Resource + + +class HostscanPackage(Resource): + PATH = '/object/hostscanpackages/{uuid}' + MINIMUM_VERSION_REQUIRED_GET = '7.0.0' diff --git a/fireREST/fmc/object/intrusionrule/__init__.py b/fireREST/fmc/object/intrusionrule/__init__.py new file mode 100644 index 0000000..19b6aa6 --- /dev/null +++ b/fireREST/fmc/object/intrusionrule/__init__.py @@ -0,0 +1,18 @@ +from fireREST import utils +from fireREST.fmc import Resource, Connection +from fireREST.fmc.object.host.override import Override + + +class IntrusionRule(Resource): + PATH = '/object/intrusionrules/{uuid}' + MINIMUM_VERSION_REQUIRED_CREATE = '7.0.0' + MINIMUM_VERSION_REQUIRED_GET = '7.0.0' + MINIMUM_VERSION_REQUIRED_UPDATE = '7.0.0' + MINIMUM_VERSION_REQUIRED_DELETE = '7.0.0' + + SUPPORTED_FILTERS = ['gid', 'sid', 'overrides', 'ips_policy', 'fts'] + + @utils.support_params + def get(self, uuid=None, name=None, gid=None, sid=None, + overrides=None, ips_policy=None, fts=None, params=None): + return super().get(uuid=uuid, name=name, params=params) diff --git a/fireREST/fmc/object/intrusionrulegroup/__init__.py b/fireREST/fmc/object/intrusionrulegroup/__init__.py new file mode 100644 index 0000000..52f10d8 --- /dev/null +++ b/fireREST/fmc/object/intrusionrulegroup/__init__.py @@ -0,0 +1,17 @@ +from fireREST import utils +from fireREST.fmc import Resource + + +class IntrusionRuleGroup(Resource): + PATH = '/object/intrusionrulegroups/{uuid}' + MINIMUM_VERSION_REQUIRED_CREATE = '7.0.0' + MINIMUM_VERSION_REQUIRED_GET = '7.0.0' + MINIMUM_VERSION_REQUIRED_UPDATE = '7.0.0' + MINIMUM_VERSION_REQUIRED_DELETE = '7.0.0' + + SUPPORTED_FILTERS = ['name', 'current_security_level', 'show_only_parents', 'include_count'] + + @utils.support_params + def get(self, uuid=None, name=None, current_security_level=None, + show_only_parents=None, include_count=None, params=None): + return super().get(uuid=uuid, name=name, params=params) diff --git a/fireREST/fmc/object/ipv4addresspool/__init__.py b/fireREST/fmc/object/ipv4addresspool/__init__.py new file mode 100644 index 0000000..681b15a --- /dev/null +++ b/fireREST/fmc/object/ipv4addresspool/__init__.py @@ -0,0 +1,18 @@ +from fireREST import utils +from fireREST.fmc import Resource, Connection +from fireREST.fmc.object.ipv4addresspool.override import Override + + +class Ipv4AddressPool(Resource): + PATH = '/object/ipv4addresspools/{uuid}' + MINIMUM_VERSION_REQUIRED_GET = '7.0.0' + + SUPPORTED_PARAMS = ['override_target_id'] + + def __init__(self, conn: Connection): + super().__init__(conn) + self.override = Override(conn) + + @utils.support_params + def get(self, uuid=None, name=None, override_target_id=None, params=None): + return super().get(uuid=uuid, name=name, params=params) diff --git a/fireREST/fmc/object/ipv4addresspool/override/__init__.py b/fireREST/fmc/object/ipv4addresspool/override/__init__.py new file mode 100644 index 0000000..a14460b --- /dev/null +++ b/fireREST/fmc/object/ipv4addresspool/override/__init__.py @@ -0,0 +1,8 @@ +from fireREST.fmc import ChildResource + + +class Override(ChildResource): + CONTAINER_NAME = 'Ipv4AddressPool' + CONTAINER_PATH = '/object/ipv4addresspools/{uuid}' + PATH = '/object/ipv4addresspools/{container_uuid}/overrides/{uuid}' + MINIMUM_VERSION_REQUIRED_GET = '7.0.0' diff --git a/fireREST/fmc/object/ipv6addresspool/__init__.py b/fireREST/fmc/object/ipv6addresspool/__init__.py new file mode 100644 index 0000000..b267a05 --- /dev/null +++ b/fireREST/fmc/object/ipv6addresspool/__init__.py @@ -0,0 +1,18 @@ +from fireREST import utils +from fireREST.fmc import Resource, Connection +from fireREST.fmc.object.ipv6addresspool.override import Override + + +class Ipv6AddressPool(Resource): + PATH = '/object/ipv6addresspools/{uuid}' + MINIMUM_VERSION_REQUIRED_GET = '7.0.0' + + SUPPORTED_PARAMS = ['override_target_id'] + + def __init__(self, conn: Connection): + super().__init__(conn) + self.override = Override(conn) + + @utils.support_params + def get(self, uuid=None, name=None, override_target_id=None, params=None): + return super().get(uuid=uuid, name=name, params=params) diff --git a/fireREST/fmc/object/ipv6addresspool/override/__init__.py b/fireREST/fmc/object/ipv6addresspool/override/__init__.py new file mode 100644 index 0000000..cb58709 --- /dev/null +++ b/fireREST/fmc/object/ipv6addresspool/override/__init__.py @@ -0,0 +1,8 @@ +from fireREST.fmc import ChildResource + + +class Override(ChildResource): + CONTAINER_NAME = 'Ipv6AddressPool' + CONTAINER_PATH = '/object/ipv6addresspools/{uuid}' + PATH = '/object/ipv6addresspools/{container_uuid}/overrides/{uuid}' + MINIMUM_VERSION_REQUIRED_GET = '7.0.0' diff --git a/fireREST/fmc/object/operational/__init__.py b/fireREST/fmc/object/operational/__init__.py new file mode 100644 index 0000000..8b83535 --- /dev/null +++ b/fireREST/fmc/object/operational/__init__.py @@ -0,0 +1,7 @@ +from fireREST.fmc import Connection +from fireREST.fmc.object.operational.usage import Usage + + +class Operational: + def __init__(self, conn: Connection): + self.usage = Usage(conn) diff --git a/fireREST/fmc/object/operational/usage/__init__.py b/fireREST/fmc/object/operational/usage/__init__.py new file mode 100644 index 0000000..e9c631d --- /dev/null +++ b/fireREST/fmc/object/operational/usage/__init__.py @@ -0,0 +1,12 @@ +from fireREST import utils +from fireREST.fmc import Resource + + +class Usage(Resource): + PATH = '/objects/operational/usage' + MINIMUM_VERSION_REQUIRED_GET = '7.0.0' + SUPPORTED_FILTERS = ['uuid', 'obj_type'] + + @utils.support_params + def get(self, uuid: str, obj_type: str, params=None): + return super().get(params=params) diff --git a/fireREST/fmc/object/radiusservergroup/__init__.py b/fireREST/fmc/object/radiusservergroup/__init__.py new file mode 100644 index 0000000..cfe1f61 --- /dev/null +++ b/fireREST/fmc/object/radiusservergroup/__init__.py @@ -0,0 +1,6 @@ +from fireREST.fmc import Resource + + +class RadiusServerGroup(Resource): + PATH = '/object/radiusservergroups/{uuid}' + MINIMUM_VERSION_REQUIRED_GET = '7.0.0' diff --git a/fireREST/fmc/object/realm/__init__.py b/fireREST/fmc/object/realm/__init__.py new file mode 100644 index 0000000..c7cfb21 --- /dev/null +++ b/fireREST/fmc/object/realm/__init__.py @@ -0,0 +1,9 @@ +from fireREST.fmc import Resource + + +class Realm(Resource): + PATH = '/object/realms/{uuid}' + MINIMUM_VERSION_REQUIRED_CREATE = '7.0.0' + MINIMUM_VERSION_REQUIRED_GET = '7.0.0' + MINIMUM_VERSION_REQUIRED_UPDATE = '7.0.0' + MINIMUM_VERSION_REQUIRED_DELETE = '7.0.0' diff --git a/fireREST/fmc/object/sidnsfeed/__init__.py b/fireREST/fmc/object/sidnsfeed/__init__.py new file mode 100644 index 0000000..fc7d790 --- /dev/null +++ b/fireREST/fmc/object/sidnsfeed/__init__.py @@ -0,0 +1,6 @@ +from fireREST.fmc import Resource + + +class SiDnsFeed(Resource): + PATH = '/object/sidnsfeeds/{uuid}' + MINIMUM_VERSION_REQUIRED_GET = '7.0.0' diff --git a/fireREST/fmc/object/sidnslist/__init__.py b/fireREST/fmc/object/sidnslist/__init__.py new file mode 100644 index 0000000..7f38b66 --- /dev/null +++ b/fireREST/fmc/object/sidnslist/__init__.py @@ -0,0 +1,6 @@ +from fireREST.fmc import Resource + + +class SiDnsList(Resource): + PATH = '/object/sidnslists/{uuid}' + MINIMUM_VERSION_REQUIRED_GET = '7.0.0' diff --git a/fireREST/fmc/object/sinetworkfeed/__init__.py b/fireREST/fmc/object/sinetworkfeed/__init__.py new file mode 100644 index 0000000..5182ebb --- /dev/null +++ b/fireREST/fmc/object/sinetworkfeed/__init__.py @@ -0,0 +1,6 @@ +from fireREST.fmc import Resource + + +class SiNetworkFeed(Resource): + PATH = '/object/sinetworkfeeds/{uuid}' + MINIMUM_VERSION_REQUIRED_GET = '7.0.0' diff --git a/fireREST/fmc/object/sinetworklist/__init__.py b/fireREST/fmc/object/sinetworklist/__init__.py new file mode 100644 index 0000000..3e810b3 --- /dev/null +++ b/fireREST/fmc/object/sinetworklist/__init__.py @@ -0,0 +1,6 @@ +from fireREST.fmc import Resource + + +class SiNetworkList(Resource): + PATH = '/object/sinetworklists/{uuid}' + MINIMUM_VERSION_REQUIRED_GET = '7.0.0' diff --git a/fireREST/fmc/object/sinkhole/__init__.py b/fireREST/fmc/object/sinkhole/__init__.py new file mode 100644 index 0000000..b1292c5 --- /dev/null +++ b/fireREST/fmc/object/sinkhole/__init__.py @@ -0,0 +1,6 @@ +from fireREST.fmc import Resource + + +class Sinkhole(Resource): + PATH = '/object/sinkholes/{uuid}' + MINIMUM_VERSION_REQUIRED_GET = '7.0.0' diff --git a/fireREST/fmc/object/ssoserver/__init__.py b/fireREST/fmc/object/ssoserver/__init__.py new file mode 100644 index 0000000..df45a7e --- /dev/null +++ b/fireREST/fmc/object/ssoserver/__init__.py @@ -0,0 +1,18 @@ +from fireREST import utils +from fireREST.fmc import Resource, Connection +from fireREST.fmc.object.ssoserver.override import Override + + +class SsoServer(Resource): + PATH = '/object/ssoservers/{uuid}' + MINIMUM_VERSION_REQUIRED_GET = '7.0.0' + + SUPPORTED_PARAMS = ['override_target_id'] + + def __init__(self, conn: Connection): + super().__init__(conn) + self.override = Override(conn) + + @utils.support_params + def get(self, uuid=None, name=None, override_target_id=None, params=None): + return super().get(uuid=uuid, name=name, params=params) diff --git a/fireREST/fmc/object/ssoserver/override/__init__.py b/fireREST/fmc/object/ssoserver/override/__init__.py new file mode 100644 index 0000000..1bdece5 --- /dev/null +++ b/fireREST/fmc/object/ssoserver/override/__init__.py @@ -0,0 +1,8 @@ +from fireREST.fmc import ChildResource + + +class Override(ChildResource): + CONTAINER_NAME = 'SsoServer' + CONTAINER_PATH = '/object/ssoservers/{uuid}' + PATH = '/object/ssoservers/{container_uuid}/overrides/{uuid}' + MINIMUM_VERSION_REQUIRED_GET = '7.0.0' diff --git a/fireREST/fmc/object/timezone/__init__.py b/fireREST/fmc/object/timezone/__init__.py index a90f17c..cbb7092 100644 --- a/fireREST/fmc/object/timezone/__init__.py +++ b/fireREST/fmc/object/timezone/__init__.py @@ -1,5 +1,6 @@ +from fireREST import utils from fireREST.fmc import Resource, Connection -from fireREST.fmc.object.fqdn.override import Override +from fireREST.fmc.object.timezone.override import Override class Timezone(Resource): @@ -9,6 +10,12 @@ class Timezone(Resource): MINIMUM_VERSION_REQUIRED_UPDATE = '6.6.0' MINIMUM_VERSION_REQUIRED_DELETE = '6.6.0' + SUPPORTED_PARAMS = ['override_target_id'] + def __init__(self, conn: Connection): super().__init__(conn) self.override = Override(conn) + + @utils.support_params + def get(self, uuid=None, name=None, override_target_id=None, params=None): + return super().get(uuid=uuid, name=name, params=params) diff --git a/fireREST/fmc/object/timezone/override/__init__.py b/fireREST/fmc/object/timezone/override/__init__.py index aa4a05c..98695a9 100644 --- a/fireREST/fmc/object/timezone/override/__init__.py +++ b/fireREST/fmc/object/timezone/override/__init__.py @@ -2,7 +2,7 @@ class Override(ChildResource): - CONTAINER_NAME = 'TimeZone' + CONTAINER_NAME = 'Timezone' CONTAINER_PATH = '/object/timezoneobjects/{uuid}' PATH = '/object/timezoneobjects/{container_uuid}/overrides/{uuid}' MINIMUM_VERSION_REQUIRED_GET = '6.6.0' diff --git a/fireREST/fmc/policy/__init__.py b/fireREST/fmc/policy/__init__.py index 5b0f28e..a75c454 100644 --- a/fireREST/fmc/policy/__init__.py +++ b/fireREST/fmc/policy/__init__.py @@ -1,11 +1,14 @@ from fireREST.fmc import Connection from fireREST.fmc.policy.accesspolicy import AccessPolicy +from fireREST.fmc.policy.dynamicaccesspolicy import DynamicAccessPolicy +from fireREST.fmc.policy.dnspolicy import DnsPolicy from fireREST.fmc.policy.filepolicy import FilePolicy - from fireREST.fmc.policy.ftdnatpolicy import FtdNatPolicy from fireREST.fmc.policy.ftds2svpn import FtdS2sVpn from fireREST.fmc.policy.intrusionpolicy import IntrusionPolicy +from fireREST.fmc.policy.networkanalysispolicy import NetworkAnalysisPolicy from fireREST.fmc.policy.prefilterpolicy import PrefilterPolicy +from fireREST.fmc.policy.ravpn import RaVpn from fireREST.fmc.policy.snmpalert import SnmpAlert from fireREST.fmc.policy.syslogalert import SyslogAlert @@ -13,10 +16,13 @@ class Policy: def __init__(self, conn: Connection): self.accesspolicy = AccessPolicy(conn) + self.dnspolicy = DnsPolicy(conn) + self.dynamicaccesspolicy = DynamicAccessPolicy(conn) self.filepolicy = FilePolicy(conn) self.ftdnatpolicy = FtdNatPolicy(conn) self.ftds2svpn = FtdS2sVpn(conn) self.intrusionpolicy = IntrusionPolicy(conn) + self.networkanalysispolicy = NetworkAnalysisPolicy(conn) self.prefilterpolicy = PrefilterPolicy(conn) self.snmpalert = SnmpAlert(conn) self.syslogalert = SyslogAlert(conn) diff --git a/fireREST/fmc/policy/accesspolicy/__init__.py b/fireREST/fmc/policy/accesspolicy/__init__.py index 08359f6..6c65240 100644 --- a/fireREST/fmc/policy/accesspolicy/__init__.py +++ b/fireREST/fmc/policy/accesspolicy/__init__.py @@ -5,6 +5,7 @@ from fireREST.fmc.policy.accesspolicy.defaultaction import DefaultAction from fireREST.fmc.policy.accesspolicy.inheritancesettings import InheritanceSettings from fireREST.fmc.policy.accesspolicy.operational import Operational +from fireREST.fmc.policy.accesspolicy.securityintelligencepolicy import SecurityIntelligencePolicy class AccessPolicy(Resource): @@ -24,6 +25,7 @@ def __init__(self, conn: Connection): self.defaultaction = DefaultAction(conn) self.inheritancesettings = InheritanceSettings(conn) self.operational = Operational(conn) + self.securityintelligencepolicy = SecurityIntelligencePolicy(conn) @utils.support_params def get(self, uuid=None, name=None, params=None): diff --git a/fireREST/fmc/policy/accesspolicy/securityintelligencepolicy/__init__.py b/fireREST/fmc/policy/accesspolicy/securityintelligencepolicy/__init__.py new file mode 100644 index 0000000..dc02912 --- /dev/null +++ b/fireREST/fmc/policy/accesspolicy/securityintelligencepolicy/__init__.py @@ -0,0 +1,8 @@ +from fireREST.fmc import ChildResource + + +class SecurityIntelligencePolicy(ChildResource): + CONTAINER_NAME = 'AccessPolicy' + CONTAINER_PATH = '/policy/accesspolicies/{uuid}' + PATH = '/policy/accesspolicies/{container_uuid}/securityintelligencepolicies/{uuid}' + MINIMUM_VERSION_REQUIRED_GET = '7.0.0' diff --git a/fireREST/fmc/policy/dnspolicy/__init__.py b/fireREST/fmc/policy/dnspolicy/__init__.py new file mode 100644 index 0000000..d8f2fb3 --- /dev/null +++ b/fireREST/fmc/policy/dnspolicy/__init__.py @@ -0,0 +1,14 @@ +from fireREST.fmc import Connection, Resource +from fireREST.fmc.policy.dnspolicy.allowdnsrule import AllowDnsRule +from fireREST.fmc.policy.dnspolicy.blockdnsrule import BlockDnsRule + + +class DnsPolicy(Resource): + PATH = '/policy/dnspolicies/{uuid}' + MINIMUM_VERSION_REQUIRED_GET = '7.0.0' + + def __init__(self, conn: Connection): + super().__init__(conn) + + self.allowdnsrule = AllowDnsRule(conn) + self.blockdnsrule = BlockDnsRule(conn) diff --git a/fireREST/fmc/policy/dnspolicy/allowdnsrule/__init__.py b/fireREST/fmc/policy/dnspolicy/allowdnsrule/__init__.py new file mode 100644 index 0000000..4cdc1ec --- /dev/null +++ b/fireREST/fmc/policy/dnspolicy/allowdnsrule/__init__.py @@ -0,0 +1,8 @@ +from fireREST.fmc import ChildResource + + +class AllowDnsRule(ChildResource): + CONTAINER_NAME = 'DnsPolicy' + CONTAINER_PATH = '/policy/dnspolicies/{uuid}' + PATH = '/policy/dnspolicies/{container_uuid}/allowdnsrule/{uuid}' + MINIMUM_VERSION_REQUIRED_GET = '7.0.0' diff --git a/fireREST/fmc/policy/dnspolicy/blockdnsrule/__init__.py b/fireREST/fmc/policy/dnspolicy/blockdnsrule/__init__.py new file mode 100644 index 0000000..fd03fd1 --- /dev/null +++ b/fireREST/fmc/policy/dnspolicy/blockdnsrule/__init__.py @@ -0,0 +1,8 @@ +from fireREST.fmc import ChildResource + + +class BlockDnsRule(ChildResource): + CONTAINER_NAME = 'DnsPolicy' + CONTAINER_PATH = '/policy/dnspolicies/{uuid}' + PATH = '/policy/dnspolicies/{container_uuid}/blockdnsrule/{uuid}' + MINIMUM_VERSION_REQUIRED_GET = '7.0.0' diff --git a/fireREST/fmc/policy/dynamicaccesspolicy/__init__.py b/fireREST/fmc/policy/dynamicaccesspolicy/__init__.py new file mode 100644 index 0000000..63f2d72 --- /dev/null +++ b/fireREST/fmc/policy/dynamicaccesspolicy/__init__.py @@ -0,0 +1,9 @@ +from fireREST.fmc import Resource + + +class DynamicAccessPolicy(Resource): + PATH = '/policy/dynamicaccesspolicies/{uuid}' + MINIMUM_VERSION_REQUIRED_CREATE = '7.0.0' + MINIMUM_VERSION_REQUIRED_GET = '7.0.0' + MINIMUM_VERSION_REQUIRED_UPDATE = '7.0.0' + MINIMUM_VERSION_REQUIRED_DELETE = '7.0.0' diff --git a/fireREST/fmc/policy/identitypolicy/__init__.py b/fireREST/fmc/policy/identitypolicy/__init__.py new file mode 100644 index 0000000..b7f5895 --- /dev/null +++ b/fireREST/fmc/policy/identitypolicy/__init__.py @@ -0,0 +1,6 @@ +from fireREST.fmc import Resource + + +class IdentityPolicy(Resource): + PATH = '/policy/identitypolicies/{uuid}' + MINIMUM_VERSION_REQUIRED_GET = '7.0.0' diff --git a/fireREST/fmc/policy/intrusionpolicy/__init__.py b/fireREST/fmc/policy/intrusionpolicy/__init__.py index cff9019..ac552cc 100644 --- a/fireREST/fmc/policy/intrusionpolicy/__init__.py +++ b/fireREST/fmc/policy/intrusionpolicy/__init__.py @@ -1,6 +1,6 @@ -from fireREST import utils from fireREST.fmc import Connection, Resource from fireREST.fmc.policy.intrusionpolicy.intrusionrule import IntrusionRule +from fireREST.fmc.policy.intrusionpolicy.intrusionrulegroup import IntrusionRuleGroup class IntrusionPolicy(Resource): @@ -15,3 +15,4 @@ def __init__(self, conn: Connection): super().__init__(conn) self.intrusionrule = IntrusionRule(conn) + self.intrusionrulegroup = IntrusionRuleGroup(conn) diff --git a/fireREST/fmc/policy/intrusionpolicy/intrusionrulegroup/__init__.py b/fireREST/fmc/policy/intrusionpolicy/intrusionrulegroup/__init__.py new file mode 100644 index 0000000..7a8d1fd --- /dev/null +++ b/fireREST/fmc/policy/intrusionpolicy/intrusionrulegroup/__init__.py @@ -0,0 +1,9 @@ +from fireREST.fmc import ChildResource + + +class IntrusionRuleGroup(ChildResource): + CONTAINER_NAME = 'IntrusionPolicy' + CONTAINER_PATH = '/policy/intrusionpolicies/{uuid}' + PATH = '/policy/intrusionpolicies/{container_uuid}/intrusionrulegroups/{uuid}' + MINIMUM_VERSION_REQUIRED_GET = '7.0.0' + MINIMUM_VERSION_REQUIRED_UPDATE = '7.0.0' diff --git a/fireREST/fmc/policy/networkanalysispolicy/__init__.py b/fireREST/fmc/policy/networkanalysispolicy/__init__.py new file mode 100644 index 0000000..6181bcd --- /dev/null +++ b/fireREST/fmc/policy/networkanalysispolicy/__init__.py @@ -0,0 +1,19 @@ +import fireREST.fmc.policy.networkanalysispolicy.inspectorconfig +from fireREST.fmc import Connection, Resource +from fireREST.fmc.policy.networkanalysispolicy.inspectorconfig import InspectorConfig +from fireREST.fmc.policy.networkanalysispolicy.inspectoroverrideconfig import InspectorOverrideConfig + + +class NetworkAnalysisPolicy(Resource): + PATH = '/policy/networkanalysispolicies/{uuid}' + IGNORE_FOR_UPDATE = ['rules'] + MINIMUM_VERSION_REQUIRED_CREATE = '7.0.0' + MINIMUM_VERSION_REQUIRED_GET = '7.0.0' + MINIMUM_VERSION_REQUIRED_UPDATE = '7.0.0' + MINIMUM_VERSION_REQUIRED_DELETE = '7.0.0' + + def __init__(self, conn: Connection): + super().__init__(conn) + + self.inspectorconfig = InspectorConfig(conn) + self.inspectoroverrideconfig = InspectorOverrideConfig(conn) diff --git a/fireREST/fmc/policy/networkanalysispolicy/inspectorconfig/__init__.py b/fireREST/fmc/policy/networkanalysispolicy/inspectorconfig/__init__.py new file mode 100644 index 0000000..4fe79cd --- /dev/null +++ b/fireREST/fmc/policy/networkanalysispolicy/inspectorconfig/__init__.py @@ -0,0 +1,9 @@ +from fireREST.fmc import ChildResource + + +class InspectorConfig(ChildResource): + CONTAINER_NAME = 'NetworkAnalysisPolicy' + CONTAINER_PATH = '/policy/intrusionpolicies/{uuid}' + PATH = '/policy/networkanalysispolicies/{container_uuid}/inspectorconfigs/{uuid}' + MINIMUM_VERSION_REQUIRED_GET = '7.0.0' + MINIMUM_VERSION_REQUIRED_UPDATE = '7.0.0' diff --git a/fireREST/fmc/policy/networkanalysispolicy/inspectoroverrideconfig/__init__.py b/fireREST/fmc/policy/networkanalysispolicy/inspectoroverrideconfig/__init__.py new file mode 100644 index 0000000..9825089 --- /dev/null +++ b/fireREST/fmc/policy/networkanalysispolicy/inspectoroverrideconfig/__init__.py @@ -0,0 +1,9 @@ +from fireREST.fmc import ChildResource + + +class InspectorOverrideConfig(ChildResource): + CONTAINER_NAME = 'NetworkAnalysisPolicy' + CONTAINER_PATH = '/policy/networkanalysispolicies/{uuid}' + PATH = '/policy/networkanalysispolicies/{container_uuid}/inspectoroverrideconfigs/{uuid}' + MINIMUM_VERSION_REQUIRED_GET = '7.0.0' + MINIMUM_VERSION_REQUIRED_UPDATE = '7.0.0' diff --git a/fireREST/fmc/policy/ravpn/__init__.py b/fireREST/fmc/policy/ravpn/__init__.py new file mode 100644 index 0000000..384a854 --- /dev/null +++ b/fireREST/fmc/policy/ravpn/__init__.py @@ -0,0 +1,16 @@ +from fireREST.fmc import Connection, Resource +from fireREST.fmc.policy.ravpn.addressassignmentsettings import AddressAssignmentSettings +from fireREST.fmc.policy.ravpn.certificatemapsettings import CertificateMapSettings +from fireREST.fmc.policy.ravpn.connectionprofile import ConnectionProfile + + +class RaVpn(Resource): + PATH = '/policy/ravpns/{uuid}' + MINIMUM_VERSION_REQUIRED_GET = '7.0.0' + + def __init__(self, conn: Connection): + super().__init__(conn) + + self.addressassignmentsettings = AddressAssignmentSettings(conn) + self.certificatemapsettings = CertificateMapSettings(conn) + self.connectionprofile = ConnectionProfile(conn) diff --git a/fireREST/fmc/policy/ravpn/addressassignmentsettings/__init__.py b/fireREST/fmc/policy/ravpn/addressassignmentsettings/__init__.py new file mode 100644 index 0000000..a705c8b --- /dev/null +++ b/fireREST/fmc/policy/ravpn/addressassignmentsettings/__init__.py @@ -0,0 +1,8 @@ +from fireREST.fmc import ChildResource + + +class AddressAssignmentSettings(ChildResource): + CONTAINER_NAME = 'RaVpn' + CONTAINER_PATH = '/policy/ravpns/{uuid}' + PATH = '/policy/ravpns/{container_uuid}/addressassignmentsettings/{uuid}' + MINIMUM_VERSION_REQUIRED_GET = '7.0.0' diff --git a/fireREST/fmc/policy/ravpn/certificatemapsettings/__init__.py b/fireREST/fmc/policy/ravpn/certificatemapsettings/__init__.py new file mode 100644 index 0000000..738cde7 --- /dev/null +++ b/fireREST/fmc/policy/ravpn/certificatemapsettings/__init__.py @@ -0,0 +1,8 @@ +from fireREST.fmc import ChildResource + + +class CertificateMapSettings(ChildResource): + CONTAINER_NAME = 'RaVpn' + CONTAINER_PATH = '/policy/ravpns/{uuid}' + PATH = '/policy/ravpns/{container_uuid}/certificatemapsettings/{uuid}' + MINIMUM_VERSION_REQUIRED_GET = '7.0.0' diff --git a/fireREST/fmc/policy/ravpn/connectionprofile/__init__.py b/fireREST/fmc/policy/ravpn/connectionprofile/__init__.py new file mode 100644 index 0000000..330f11b --- /dev/null +++ b/fireREST/fmc/policy/ravpn/connectionprofile/__init__.py @@ -0,0 +1,8 @@ +from fireREST.fmc import ChildResource + + +class ConnectionProfile(ChildResource): + CONTAINER_NAME = 'RaVpn' + CONTAINER_PATH = '/policy/ravpns/{uuid}' + PATH = '/policy/ravpns/{container_uuid}/connectionprofiles/{uuid}' + MINIMUM_VERSION_REQUIRED_GET = '7.0.0' diff --git a/fireREST/mapping.py b/fireREST/mapping.py index 4da2f07..4fdb0ee 100644 --- a/fireREST/mapping.py +++ b/fireREST/mapping.py @@ -205,8 +205,18 @@ } FILTERS = { + 'current_security_level': 'currentSecurityLevel', + 'show_only_parents': 'showonlyparents', + 'include_count': 'includeCount', + 'gid': 'gid', + 'sid': 'sid', + 'overrides': 'overrides', + 'ips_policy': 'ipspolicy', + 'fts': 'fts', + 'realm': 'realm', 'name': 'name', 'name_or_value': 'nameOrValue', + 'obj_type': 'type', 'unused_only': 'unusedOnly', 'rule_ids': 'ids', 'device_id': 'deviceId', diff --git a/fireREST/utils.py b/fireREST/utils.py index b1dc732..38164ac 100644 --- a/fireREST/utils.py +++ b/fireREST/utils.py @@ -176,7 +176,7 @@ def handle_errors(f): @wraps(f) @retry(exceptions=exc.RateLimitException, tries=6, delay=10, logger=logger) def wrapper(*args, **kwargs): - fmc = args[0] + conn = args[0] try: validate_data(kwargs.get('method', args[1]), kwargs.get('data', args[-1])) response = f(*args, **kwargs) @@ -186,7 +186,7 @@ def wrapper(*args, **kwargs): except HTTPError: if response.status_code == 401 and 'Access token invalid' in response.text: # Invalid access token detected. Refresh authorization token - fmc.conn.refresh() + conn.refresh() else: raise_for_status(response) return response diff --git a/fireREST/version.py b/fireREST/version.py index da2182f..887a342 100644 --- a/fireREST/version.py +++ b/fireREST/version.py @@ -1 +1 @@ -__version__ = '1.0.6' +__version__ = '1.0.7'