Add tags to LB service update
Change-Id: Ic4e604883a7b1437af995110d2d684c0bd396a52
This commit is contained in:
parent
f91887541b
commit
00aa290c4a
@ -424,7 +424,8 @@ class Service(LoadBalancerBase):
|
|||||||
return self.client.update(object_url, body)
|
return self.client.update(object_url, body)
|
||||||
return do_update()
|
return do_update()
|
||||||
|
|
||||||
def update_service_with_attachment(self, service_id, logical_router_id):
|
def update_service_with_attachment(self, service_id, logical_router_id,
|
||||||
|
tags=None):
|
||||||
# Using internal method so we can access max_attempts in the decorator
|
# Using internal method so we can access max_attempts in the decorator
|
||||||
@utils.retry_upon_exception(
|
@utils.retry_upon_exception(
|
||||||
nsxlib_exc.StaleRevision,
|
nsxlib_exc.StaleRevision,
|
||||||
@ -434,6 +435,8 @@ class Service(LoadBalancerBase):
|
|||||||
body = self.client.get(object_url)
|
body = self.client.get(object_url)
|
||||||
body['attachment'] = {'target_id': logical_router_id,
|
body['attachment'] = {'target_id': logical_router_id,
|
||||||
'target_type': 'LogicalRouter'}
|
'target_type': 'LogicalRouter'}
|
||||||
|
if tags is not None:
|
||||||
|
body['tags'] = tags
|
||||||
return self.client.update(object_url, body)
|
return self.client.update(object_url, body)
|
||||||
return do_update()
|
return do_update()
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user