1
+ from fmcapi .api_objects .apiclasstemplate import APIClassTemplate
2
+ import logging
3
+
4
+
5
+ class TunnelStatuses (APIClassTemplate ):
6
+ """The TunnelStatuses Object in the FMC."""
7
+
8
+ FIRST_SUPPORTED_FMC_VERSION = "7.3"
9
+ VALID_JSON_DATA = [
10
+ "id" ,
11
+ "type" ,
12
+ "state" ,
13
+ "lastChange" ,
14
+ "vpnTopology" ,
15
+ "peerA" ,
16
+ "peerB" ,
17
+ ]
18
+ VALID_GET_FILTERS = [
19
+ "vpnTopologyId" , # vpnTopologyId: uuid of vpn topo
20
+ "deviceId" , # deviceId: uuid of device
21
+ "status" , # status: TUNNEL_UP|TUNNEL_DOWN|UNKNOWN
22
+ "deployedStatus" , # deployedStatus: Deployed|Configured|Both
23
+ "sortBy" , # sortBy: :|<|> Topology|Device|Status|LastChange (sortBy<Device == sort by device in ascending order)
24
+ ]
25
+ VALID_FOR_KWARGS = VALID_JSON_DATA + VALID_GET_FILTERS + []
26
+
27
+ URL_SUFFIX = "/health/tunnelstatuses"
28
+
29
+ def __init__ (self , fmc , ** kwargs ):
30
+ """
31
+ Initialize TunnelStatuses object.
32
+
33
+ :param fmc (object): FMC object
34
+ :param **kwargs: Any other values passed during instantiation.
35
+ :return: requests response
36
+ """
37
+ super ().__init__ (fmc , ** kwargs )
38
+ logging .debug ("In __init__() for TunnelStatuses class." )
39
+ self .parse_kwargs (** kwargs )
40
+
41
+ def delete (self , ** kwargs ):
42
+ """DELETE method for API for TunnelStatuses not supported."""
43
+ logging .info ("DELETE method for API for TunnelStatuses not supported." )
44
+ pass
45
+
46
+ def put (self ):
47
+ """PUT method for API for TunnelStatuses not supported."""
48
+ logging .info ("PUT method for API for TunnelStatuses not supported." )
49
+ pass
50
+
51
+ def post (self , ** kwargs ):
52
+ """POST method for API for TunnelStatuses not supported."""
53
+ logging .info ("POST method for API for TunnelStatuses not supported." )
54
+ pass
0 commit comments