Skip to content

Commit 76035ba

Browse files
Support Websocket profile
1 parent af71f17 commit 76035ba

2 files changed

Lines changed: 30 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
@@ -94,6 +94,7 @@ def __init__(self, ltm):
9494
Wa_Caches,
9595
Web_Accelerations,
9696
Web_Securitys,
97+
Websockets,
9798
Xmls]
9899

99100

@@ -1207,6 +1208,23 @@ def delete(self, **kwargs):
12071208
)
12081209

12091210

1211+
class Websockets(Collection):
1212+
"""BIG-IP® Websocket profile collection."""
1213+
def __init__(self, profile):
1214+
super(Websockets, self).__init__(profile)
1215+
self._meta_data['allowed_lazy_attributes'] = [Websocket]
1216+
self._meta_data['attribute_registry'] = \
1217+
{'tm:ltm:profile:websocket:websocketstate': Websocket}
1218+
1219+
1220+
class Websocket(Resource):
1221+
"""BIG-IP® Websocket profile resource."""
1222+
def __init__(self, Websockets):
1223+
super(Websocket, self).__init__(Websockets)
1224+
self._meta_data['required_json_kind'] = \
1225+
'tm:ltm:profile:websocket:websocketstate'
1226+
1227+
12101228
class Xmls(Collection):
12111229
"""BIG-IP® Xml profile collection."""
12121230
def __init__(self, profile):

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

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1166,6 +1166,18 @@ def test_load(self, request, mgmt_root):
11661166

11671167
# End Web Security tests
11681168

1169+
# Begin Websocket tests
1170+
1171+
1172+
class TestWebsocket(object):
1173+
def test_load(self, request, mgmt_root):
1174+
ws1 = mgmt_root.tm.ltm.profile.\
1175+
websockets.websocket.load(name='websocket')
1176+
assert ws1.name == 'websocket'
1177+
1178+
1179+
# End Websocket tests
1180+
11691181
# Begin Xml tests
11701182

11711183

0 commit comments

Comments
 (0)