Skip to content

Commit 5c7ec74

Browse files
Support LTM cipher
(cherry picked from commit 26b187b)
1 parent 1ed7164 commit 5c7ec74

File tree

2 files changed

+80
-0
lines changed

2 files changed

+80
-0
lines changed

f5/bigip/tm/ltm/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030

3131
from f5.bigip.resource import OrganizingCollection
3232
from f5.bigip.tm.ltm.auth import Auth
33+
from f5.bigip.tm.ltm.cipher import Cipher
3334
from f5.bigip.tm.ltm.data_group import Data_Group
3435
from f5.bigip.tm.ltm.default_node_monitor import Default_Node_Monitor
3536
from f5.bigip.tm.ltm.ifile import Ifiles
@@ -57,6 +58,7 @@ def __init__(self, tm):
5758
super(Ltm, self).__init__(tm)
5859
self._meta_data['allowed_lazy_attributes'] = [
5960
Auth,
61+
Cipher,
6062
Data_Group,
6163
Default_Node_Monitor,
6264
Ifiles,

f5/bigip/tm/ltm/cipher.py

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
# coding=utf-8
2+
#
3+
# Copyright 2021 F5 Networks Inc.
4+
#
5+
# Licensed under the Apache License, Version 2.0 (the "License");
6+
# you may not use this file except in compliance with the License.
7+
# You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing, software
12+
# distributed under the License is distributed on an "AS IS" BASIS,
13+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
# See the License for the specific language governing permissions and
15+
# limitations under the License.
16+
#
17+
18+
"""BIG-IP® Local Traffic Manager™ (LTM®) cipher module.
19+
20+
REST URI
21+
``http://localhost/mgmt/tm/ltm/cipher``
22+
23+
GUI Path
24+
``Local Traffic --> Ciphers``
25+
26+
REST Kind
27+
``tm:ltm:cipher:*``
28+
"""
29+
30+
from f5.bigip.resource import Collection
31+
from f5.bigip.resource import OrganizingCollection
32+
from f5.bigip.resource import Resource
33+
34+
35+
class Cipher(OrganizingCollection):
36+
"""BIG-IP® LTM cipher collection"""
37+
def __init__(self, ltm):
38+
super(Cipher, self).__init__(ltm)
39+
self._meta_data['allowed_lazy_attributes'] = [
40+
Rules,
41+
Groups
42+
]
43+
44+
45+
class Rules(Collection):
46+
"""BIG-IP® cipher rule sub-collection"""
47+
def __init__(self, cipher):
48+
super(Rules, self).__init__(cipher)
49+
self._meta_data['allowed_lazy_attributes'] = [Rule]
50+
self._meta_data['attribute_registry'] =\
51+
{'tm:ltm:cipher:rule:rulestate': Rule}
52+
53+
54+
class Rule(Resource):
55+
"""BIG-IP® cipher rule sub-collection resource"""
56+
def __init__(self, rule_s):
57+
super(Rule, self).__init__(rule_s)
58+
self._meta_data['required_creation_parameters'].update(('partition',))
59+
self._meta_data['required_json_kind'] =\
60+
'tm:ltm:cipher:rule:rulestate'
61+
62+
63+
class Groups(Collection):
64+
"""BIG-IP® cipher group sub-collection"""
65+
def __init__(self, cipher):
66+
super(Groups, self).__init__(cipher)
67+
self._meta_data['allowed_lazy_attributes'] = [Group]
68+
self._meta_data['attribute_registry'] =\
69+
{'tm:ltm:cipher:group:groupstate': Group}
70+
71+
72+
class Group(Resource):
73+
"""BIG-IP® cipher group sub-collection resource"""
74+
def __init__(self, group_s):
75+
super(Group, self).__init__(group_s)
76+
self._meta_data['required_creation_parameters'].update(('partition',))
77+
self._meta_data['required_json_kind'] =\
78+
'tm:ltm:cipher:group:groupstate'

0 commit comments

Comments
 (0)