|
| 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/flowspec-route-injector`` |
| 22 | +
|
| 23 | +GUI Path |
| 24 | + ``Security --> Option --> Network Firewall --> External Redirection |
| 25 | + --> Flowspec Route Injector`` |
| 26 | +
|
| 27 | +REST Kind |
| 28 | + ``tm:security:flowspec-route-injector:flowspec-route-injectorcollectionstate:*`` |
| 29 | +""" |
| 30 | + |
| 31 | +from f5.bigip.resource import Collection |
| 32 | +from f5.bigip.resource import OrganizingCollection |
| 33 | +from f5.bigip.resource import Resource |
| 34 | + |
| 35 | + |
| 36 | +class Flowspec_Route_Injector(OrganizingCollection): |
| 37 | + """BIG-IP® AFM® Flowspec Route Injector organizing collection.""" |
| 38 | + |
| 39 | + def __init__(self, security): |
| 40 | + super(Flowspec_Route_Injector, self).__init__(security) |
| 41 | + self._meta_data['allowed_lazy_attributes'] = [Profile_s] |
| 42 | + |
| 43 | + |
| 44 | +class Profile_s(Collection): |
| 45 | + """BIG-IP® AFM® Flowspec Route Injector Profile collection""" |
| 46 | + |
| 47 | + def __init__(self, flowspec_route_injector): |
| 48 | + super(Profile_s, self).__init__(flowspec_route_injector) |
| 49 | + self._meta_data['allowed_lazy_attributes'] = [Profile] |
| 50 | + self._meta_data['attribute_registry'] = \ |
| 51 | + {'tm:security:flowspec-route-injector:profile:profilestate': |
| 52 | + Profile} |
| 53 | + |
| 54 | + |
| 55 | +class Profile(Resource): |
| 56 | + """BIG-IP® AFM® Flowspec Route Injector Profile resource""" |
| 57 | + |
| 58 | + def __init__(self, profile_s): |
| 59 | + super(Profile, self).__init__(profile_s) |
| 60 | + self._meta_data['required_json_kind'] = \ |
| 61 | + 'tm:security:flowspec-route-injector:profile:profilestate' |
| 62 | + self._meta_data['required_creation_parameters'].update(('partition', 'name', 'routeDomain', 'neighbor')) |
| 63 | + self._meta_data['required_load_parameters'].update(('partition', 'name')) |
| 64 | + self._meta_data['allowed_lazy_attributes'] = [Neighbor_s] |
| 65 | + self._meta_data['attribute_registry'] = \ |
| 66 | + {'tm:security:flowspec-route-injector:profile:neighbor:neighborcollectionstate': |
| 67 | + Neighbor_s} |
| 68 | + |
| 69 | + |
| 70 | +class Neighbor_s(Collection): |
| 71 | + """BIG-IP® AFM® Flowspec Route Injector Neighbor collection""" |
| 72 | + |
| 73 | + def __init__(self, profile): |
| 74 | + super(Neighbor_s, self).__init__(profile) |
| 75 | + self._meta_data['required_json_kind'] = \ |
| 76 | + 'tm:security:flowspec-route-injector:profile:neighbor:neighborcollectionstate' |
| 77 | + self._meta_data['allowed_lazy_attributes'] = [Neighbor] |
| 78 | + self._meta_data['attribute_registry'] = \ |
| 79 | + {'tm:security:flowspec-route-injector:profile:neighbor:neighborstate': |
| 80 | + Neighbor} |
| 81 | + |
| 82 | + |
| 83 | +class Neighbor(Resource): |
| 84 | + """BIG-IP® AFM® Flowspec Route Injector Neighbor resource""" |
| 85 | + |
| 86 | + def __init__(self, neighbor_s): |
| 87 | + super(Neighbor, self).__init__(neighbor_s) |
| 88 | + self._meta_data['required_json_kind'] = \ |
| 89 | + 'tm:security:flowspec-route-injector:profile:neighbor:neighborstate' |
| 90 | + self._meta_data['required_creation_parameters'].update(('name', 'local-address', 'local-as', 'remote-as')) |
0 commit comments