3232from f5 .bigip .resource import OrganizingCollection
3333from f5 .bigip .resource import Resource
3434from f5 .sdk_exception import NonExtantApplication
35+ from f5 .sdk_exception import UnsupportedOperation
36+
3537
3638from distutils .version import LooseVersion
3739
@@ -41,7 +43,9 @@ class Dos(OrganizingCollection):
4143
4244 def __init__ (self , security ):
4345 super (Dos , self ).__init__ (security )
44- self ._meta_data ['allowed_lazy_attributes' ] = [Profiles ]
46+ self ._meta_data ['allowed_lazy_attributes' ] = [
47+ Profiles ,
48+ Device_Configs ]
4549
4650
4751class Profiles (Collection ):
@@ -297,3 +301,38 @@ def _exists_11_6(self, **kwargs):
297301
298302 return self ._check_existence_by_collection (
299303 self ._meta_data ['container' ], kwargs ['name' ])
304+
305+
306+ class Device_Configs (Collection ):
307+ """BIG-IP® Dos Device collection"""
308+ def __init__ (self , dos ):
309+ super (Device_Configs , self ).__init__ (dos )
310+ self ._meta_data ['allowed_lazy_attributes' ] = [Device_Config ]
311+ self ._meta_data ['attribute_registry' ] = \
312+ {'tm:security:dos:device-config:device-configstate' : Device_Config }
313+
314+
315+ class Device_Config (Resource ):
316+ """BIG-IP® Dos Device resource"""
317+ def __init__ (self , device_configs ):
318+ super (Device_Config , self ).__init__ (device_configs )
319+ self ._meta_data ['required_json_kind' ] = \
320+ 'tm:security:dos:device-config:device-configstate'
321+
322+ def create (self , ** kwargs ):
323+ """Create is not supported for Device_Config
324+
325+ :raises: UnsupportedOperation
326+ """
327+ raise UnsupportedOperation (
328+ "%s does not support the update method" % self .__class__ .__name__
329+ )
330+
331+ def delete (self , ** kwargs ):
332+ """Delete is not supported for Device_Config
333+
334+ :raises: UnsupportedOperation
335+ """
336+ raise UnsupportedOperation (
337+ "%s does not support the delete method" % self .__class__ .__name__
338+ )
0 commit comments