|
| 1 | +# coding=utf-8 |
| 2 | +# |
| 3 | +# Copyright 2015-2017 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® Advanced Firewall Manager™ (AFM®) module. |
| 19 | +
|
| 20 | +REST URI |
| 21 | + ``http://localhost/mgmt/tm/security/ip-intelligence`` |
| 22 | +
|
| 23 | +GUI Path |
| 24 | + ``Security --> Network Firewall --> IP Intelligence`` |
| 25 | +
|
| 26 | +REST Kind |
| 27 | + ``tm:security:ip-intelligence:*`` |
| 28 | +""" |
| 29 | +from f5.bigip.resource import Collection |
| 30 | +from f5.bigip.resource import OrganizingCollection |
| 31 | +from f5.bigip.resource import Resource |
| 32 | +from f5.bigip.resource import UnnamedResource |
| 33 | + |
| 34 | + |
| 35 | +class Ip_Intelligence(OrganizingCollection): |
| 36 | + """BIG-IP® AFM® Firewall IP Intelligence organizing collection.""" |
| 37 | + |
| 38 | + def __init__(self, security): |
| 39 | + super(Ip_Intelligence, self).__init__(security) |
| 40 | + self._meta_data['allowed_lazy_attributes'] = [ |
| 41 | + Feed_list_s, |
| 42 | + Policy_s, |
| 43 | + Blacklist_Categorys, |
| 44 | + Global_Policy] |
| 45 | + |
| 46 | + |
| 47 | +class Feed_list_s(Collection): |
| 48 | + """BIG-IP® AFM® IP Intelligence Feedlist collection""" |
| 49 | + |
| 50 | + def __init__(self, policy): |
| 51 | + super(Feed_list_s, self).__init__(policy) |
| 52 | + self._meta_data['allowed_lazy_attributes'] = [Feed_list] |
| 53 | + self._meta_data['attribute_registry'] = \ |
| 54 | + {'tm:security:ip-intelligence:feed-list:feed-liststate': |
| 55 | + Feed_list} |
| 56 | + |
| 57 | + |
| 58 | +class Feed_list(Resource): |
| 59 | + """BIG-IP® AFM® IP-INtelligence Feedlist resource""" |
| 60 | + |
| 61 | + def __init__(self, feed_list_s): |
| 62 | + super(Feed_list, self).__init__(feed_list_s) |
| 63 | + self._meta_data['required_json_kind'] = \ |
| 64 | + 'tm:security:ip-intelligence:feed-list:feed-liststate' |
| 65 | + self._meta_data['required_creation_parameters'].update(('partition',)) |
| 66 | + self._meta_data['required_load_parameters'].update(('partition',)) |
| 67 | + |
| 68 | + |
| 69 | +class Policy_s(Collection): |
| 70 | + """BIG-IP® AFM® IP-Intelligence Policy collection""" |
| 71 | + |
| 72 | + def __init__(self, ip_intelligence): |
| 73 | + super(Policy_s, self).__init__(ip_intelligence) |
| 74 | + self._meta_data['allowed_lazy_attributes'] = [Policy] |
| 75 | + self._meta_data['attribute_registry'] = \ |
| 76 | + {'tm:security:ip-intelligence:policy:policystate': |
| 77 | + Policy} |
| 78 | + |
| 79 | + |
| 80 | +class Policy(Resource): |
| 81 | + """BIG-IP® AFM® IP-Intelligence Policy resource""" |
| 82 | + |
| 83 | + def __init__(self, policy_s): |
| 84 | + super(Policy, self).__init__(policy_s) |
| 85 | + self._meta_data['required_json_kind'] = \ |
| 86 | + 'tm:security:ip-intelligence:policy:policystate' |
| 87 | + self._meta_data['allowed_lazy_attributes'] = [Feed_list_s] |
| 88 | + self._meta_data['required_creation_parameters'].update(('partition',)) |
| 89 | + self._meta_data['required_load_parameters'].update(('partition',)) |
| 90 | + self._meta_data['attribute_registry'] = \ |
| 91 | + {'tm:security:ip-intelligence:feed-list:feed-listcollectionstate': |
| 92 | + Feed_list_s} |
| 93 | + |
| 94 | + |
| 95 | +class Blacklist_Categorys(Collection): |
| 96 | + """BIG-IP® AFM® IP-Intelligence Blacklist Categories collection""" |
| 97 | + |
| 98 | + def __init__(self, ip_intelligence): |
| 99 | + super(Blacklist_Categorys, self).__init__(ip_intelligence) |
| 100 | + self._meta_data['allowed_lazy_attributes'] = [Blacklist_Category] |
| 101 | + self._meta_data['attribute_registry'] = \ |
| 102 | + {'tm:security:ip-intelligence:blacklist-category:blacklist-categorystate': |
| 103 | + Blacklist_Category} |
| 104 | + |
| 105 | + |
| 106 | +class Blacklist_Category(Resource): |
| 107 | + """BIG-IP® AFM® IP-Intelligence Blacklist Category resource""" |
| 108 | + |
| 109 | + def __init__(self, blacklist_categorys): |
| 110 | + super(Blacklist_Category, self).__init__(blacklist_categorys) |
| 111 | + self._meta_data['required_json_kind'] = \ |
| 112 | + 'tm:security:ip-intelligence:blacklist-category:blacklist-categorystate' |
| 113 | + self._meta_data['required_creation_parameters'].update(('partition',)) |
| 114 | + self._meta_data['required_load_parameters'].update(('partition',)) |
| 115 | + |
| 116 | + |
| 117 | +class Global_Policy(UnnamedResource): |
| 118 | + """BIG-IP® AFM® Global Rules resource""" |
| 119 | + def __init__(self, global_policy): |
| 120 | + super(Global_Policy, self).__init__(global_policy) |
| 121 | + self._meta_data['required_json_kind'] = \ |
| 122 | + 'tm:security:ip-intelligence:global-policy:global-policystate' |
0 commit comments