Skip to content

Commit

Permalink
v1.0.7 (#51)
Browse files Browse the repository at this point in the history
* v1.0.5

* v1.0.6

* v1.0.7

Co-authored-by: Oliver Kaiser <[email protected]>
  • Loading branch information
kaisero and Oliver Kaiser authored Jul 25, 2021
1 parent d42a5cf commit 69bef1a
Show file tree
Hide file tree
Showing 57 changed files with 592 additions and 10 deletions.
56 changes: 54 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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

Expand Down
4 changes: 4 additions & 0 deletions fireREST/fmc/integration/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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)
6 changes: 6 additions & 0 deletions fireREST/fmc/integration/fmchastatus/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
from fireREST.fmc import Resource


class FmcHaStatus(Resource):
PATH = '/integration/fmchastatuses/{uuid}'
MINIMUM_VERSION_REQUIRED_GET = '7.0.0'
8 changes: 8 additions & 0 deletions fireREST/fmc/integration/securexconfig/__init__.py
Original file line number Diff line number Diff line change
@@ -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'

40 changes: 40 additions & 0 deletions fireREST/fmc/object/__init__.py
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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)
Expand All @@ -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)
Expand All @@ -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)
Expand Down
19 changes: 19 additions & 0 deletions fireREST/fmc/object/anyconnectcustomattribute/__init__.py
Original file line number Diff line number Diff line change
@@ -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)
Original file line number Diff line number Diff line change
@@ -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'
16 changes: 16 additions & 0 deletions fireREST/fmc/object/anyconnectpackage/__init__.py
Original file line number Diff line number Diff line change
@@ -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)
16 changes: 16 additions & 0 deletions fireREST/fmc/object/anyconnectprofile/__init__.py
Original file line number Diff line number Diff line change
@@ -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)
3 changes: 3 additions & 0 deletions fireREST/fmc/object/applicationfilter/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'
6 changes: 6 additions & 0 deletions fireREST/fmc/object/certificatemap/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
from fireREST.fmc import Resource


class CertificateMap(Resource):
PATH = '/object/certificatemaps/{uuid}'
MINIMUM_VERSION_REQUIRED_GET = '7.0.0'
15 changes: 14 additions & 1 deletion fireREST/fmc/object/dnsservergroup/__init__.py
Original file line number Diff line number Diff line change
@@ -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):
Expand All @@ -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)

8 changes: 8 additions & 0 deletions fireREST/fmc/object/dnsservergroup/override/__init__.py
Original file line number Diff line number Diff line change
@@ -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'
15 changes: 15 additions & 0 deletions fireREST/fmc/object/dynamicobject/__init__.py
Original file line number Diff line number Diff line change
@@ -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)
11 changes: 11 additions & 0 deletions fireREST/fmc/object/dynamicobject/mapping/__init__.py
Original file line number Diff line number Diff line change
@@ -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'

3 changes: 3 additions & 0 deletions fireREST/fmc/object/geolocation/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'
6 changes: 6 additions & 0 deletions fireREST/fmc/object/grouppolicy/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
from fireREST.fmc import Resource


class GroupPolicy(Resource):
PATH = '/object/grouppolicies/{uuid}'
MINIMUM_VERSION_REQUIRED_GET = '7.0.0'
6 changes: 6 additions & 0 deletions fireREST/fmc/object/hostscanpackage/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
from fireREST.fmc import Resource


class HostscanPackage(Resource):
PATH = '/object/hostscanpackages/{uuid}'
MINIMUM_VERSION_REQUIRED_GET = '7.0.0'
Loading

0 comments on commit 69bef1a

Please sign in to comment.