Skip to content

Commit fbd8ae7

Browse files
f5-rahmcaphrim007
authored andcommitted
Issue #1376 - Add ltm/profile/netflow endpoint support (#1472)
Problem: endpoint missing Solution: This PR adds the endpoint Files Changed: - f5/bigip/tm/ltm/profile.py (changed) - f5/bigip/tm/ltm/test/functional/test_profile.py (changed)
1 parent 950646c commit fbd8ae7

2 files changed

Lines changed: 31 additions & 0 deletions

File tree

f5/bigip/tm/ltm/profile.py

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ def __init__(self, ltm):
6464
Ipsecalgs,
6565
Mblbs,
6666
Mssqls,
67+
Netflows,
6768
Ntlms,
6869
Ocsp_Stapling_Params_s,
6970
One_Connects,
@@ -599,6 +600,23 @@ def __init__(self, Mssqls):
599600
'tm:ltm:profile:mssql:mssqlstate'
600601

601602

603+
class Netflows(Collection):
604+
"""BIG-IP® Netflow profile collection."""
605+
def __init__(self, profile):
606+
super(Netflows, self).__init__(profile)
607+
self._meta_data['allowed_lazy_attributes'] = [Netflow]
608+
self._meta_data['attribute_registry'] = \
609+
{'tm:ltm:profile:netflow:netflowstate': Netflow}
610+
611+
612+
class Netflow(Resource):
613+
"""BIG-IP® Netflow resource."""
614+
def __init__(self, Netflows):
615+
super(Netflow, self).__init__(Netflows)
616+
self._meta_data['required_json_kind'] = \
617+
'tm:ltm:profile:netflow:netflowstate'
618+
619+
602620
class Ntlms(Collection):
603621
"""BIG-IP® Ntlm profile collection."""
604622
def __init__(self, profile):

f5/bigip/tm/ltm/test/functional/test_profile.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -645,6 +645,19 @@ def test_MCURDL(self, request, mgmt_root):
645645

646646
# End Mssql tests
647647

648+
# Begin Netflow tests
649+
650+
@pytest.mark.skipif(pytest.config.getoption('--release')
651+
< LooseVersion('13.0.0'),
652+
reason='Needs minimum of v13 TMOS to pass')
653+
class TestNetflow(object):
654+
def test_netflow_MCURDL(self, request, mgmt_root):
655+
netflow = HelperTest('Netflows')
656+
netflow.test_MCURDL(request, mgmt_root)
657+
658+
659+
# End Netflow tests
660+
648661
# Begin Ntlm tests
649662

650663

0 commit comments

Comments
 (0)