-
Notifications
You must be signed in to change notification settings - Fork 58
/
ravpns.py
56 lines (48 loc) · 1.71 KB
/
ravpns.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
"""RAVpn Class."""
from fmcapi.api_objects.apiclasstemplate import APIClassTemplate
import logging
class RAVpn(APIClassTemplate):
"""The RAVpn Object in the FMC."""
VALID_JSON_DATA = [
"id",
"name",
"type",
"connectionProfiles",
"groupPolicies",
"accessInterfaceSettings",
"ikev2Policies",
"addressAssignmentSettings",
"anyConnectClientImages",
"externalBrowserPackage",
"ipsecCryptoMaps",
"certificateMapSettings",
"ipsecAdvancedSettings",
"secureClientCustomizationSettings",
"dapPolicy",
"ldapAttributeMaps",
"loadBalanceSettings",
"configureSSL",
"configureIpsec",
]
VALID_FOR_KWARGS = VALID_JSON_DATA + []
URL_SUFFIX = "/policy/ravpns"
FIRST_SUPPORTED_FMC_VERSION = "7.2"
def __init__(self, fmc, **kwargs):
"""
Initialize RAVpn object.
:param fmc: (object) FMC object
:param kwargs: Any other values passed during instantiation.
:return: None
"""
super().__init__(fmc, **kwargs)
logging.debug("In __init__() for RAVPN class.")
self.type = "RAVpn"
self.parse_kwargs(**kwargs)
# POST, PUT and DELETE are valid endpoints in the api >7.2, however ravpn POST has a cycical dependency
# with serveral other api endpoints - connectionprofiles, addressassignments, etc.
# This is due to needing a container uuid of the RAVPN policy but also needing those objects to
# create the RAVPN policy in the first place.
def post(self):
"""POST method for API for RAVPN not supported."""
logging.info("POST method for API for RAVPN not supported.")
pass