Update ip_protocol during loadbalancer app profile updates
Application profiles are of type TCP, UDP or HTTP. In case the application profile is being updated with a new type, the virtual server must also be updated with the new IP Protocol. Additionally, it should not be necessary to update both the persistence profile and application profile simultaneously. Change-Id: I4953dcefa6b168406276851c59b89c3ddaa2f9ad
This commit is contained in:
parent
a8e260516e
commit
9f38953c00
|
@ -286,12 +286,20 @@ class VirtualServer(LoadBalancerBase):
|
|||
return self.client.update(object_url, body)
|
||||
|
||||
def update_virtual_server_with_profiles(self, virtual_server_id,
|
||||
application_profile_id,
|
||||
persistence_profile_id):
|
||||
application_profile_id=None,
|
||||
persistence_profile_id=None,
|
||||
ip_protocol=None):
|
||||
object_url = self.resource + '/' + virtual_server_id
|
||||
body = self.client.get(object_url)
|
||||
body['application_profile_id'] = application_profile_id
|
||||
body['persistence_profile_id'] = persistence_profile_id
|
||||
if application_profile_id:
|
||||
body['application_profile_id'] = application_profile_id
|
||||
if persistence_profile_id:
|
||||
body['persistence_profile_id'] = persistence_profile_id
|
||||
# In case the application profile is updated and its protocol
|
||||
# is updated as well, backend requires us to pass the new
|
||||
# protocol in the virtual server body.
|
||||
if ip_protocol:
|
||||
body['ip_protocol'] = ip_protocol
|
||||
return self.client.update(object_url, body)
|
||||
|
||||
def update_virtual_server_with_vip(self, virtual_server_id, vip):
|
||||
|
|
Loading…
Reference in New Issue