_meta_data : error = "There was an attempt to assign a new uri to this " \ _meta_data if LooseVersion ( tmos_v ) = LooseVersion ( '11.5.4' ) or LooseVersion ( tmos_v ) = LooseVersion ( '12.1.1' ): if 'uri' in self. def create ( self, ** kwargs ): """Custom _create method to accommodate for issue 11.5.4 and 12.1.1, Where creation of an object would return 404, despite the object being created. _meta_data, kwargs ) # Make new instance of self return self. get ( base_uri, ** kwargs ) except HTTPError as err : if err. _check_for_python_keywords ( kwargs ) try : response = refresh_session. _reduce_boolean_pair ( kwargs, key1, key2 ) kwargs = self. update ( requests_params ) for key1, key2 in self. _check_load_parameters ( ** kwargs ) kwargs = True refresh_session = self. _meta_data ) raise URICreationCollision ( error ) requests_params = self. "resource, the _meta_data is %s and it should" \ format ( kwargs ) raise NonExtantVirtualPolicy ( msg ) def _load_11_5_4 ( self, ** kwargs ): """Custom _load method to accommodate for issue in 11.5.4, where an existing object would return 404 HTTP response. _load ( ** kwargs ) msg = 'The Policy named,, does not exist on the device.'. _load_11_5_4 ( ** kwargs ) else : return self. _meta_data, kwargs ): if LooseVersion ( tmos_v ) = LooseVersion ( '11.5.4' ): return self. def load ( self, ** kwargs ): """Override load to retrieve object based on exists above.""" tmos_v = self. REST URI `` GUI Path ``Local Traffic -> Virtual Servers`` REST Kind ``tm:ltm:virtual:*`` """ from distutils.version import LooseVersion from f5.bigip.mixins import CheckExistenceMixin from f5.bigip.resource import Collection from f5.bigip.resource import Resource from f5.sdk_exception import NonExtantVirtualPolicy from f5.sdk_exception import UnregisteredKind from f5.sdk_exception import URICreationCollision from requests import HTTPError # """BIG-IPĀ® Local Traffic Manager (LTM) virtual module. # See the License for the specific language governing permissions and # limitations under the License. # You may obtain a copy of the License at # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # Licensed under the Apache License, Version 2.0 (the "License") # you may not use this file except in compliance with the License. # coding=utf-8 # Copyright 2014 F5 Networks Inc.
0 Comments
Leave a Reply. |