IpPools: pass tags on create/update operations
Change-Id: I65b77dce0a8acc99b9adcca8a0edf0cde83985c1
This commit is contained in:
parent
31b962f814
commit
dc12c1af6b
|
@ -620,7 +620,8 @@ class IpPool(AbstractRESTResource):
|
|||
"end": str(r[-1])} for r in ip_set.iter_ipranges()]
|
||||
|
||||
def create(self, cidr, allocation_ranges=None, display_name=None,
|
||||
description=None, gateway_ip=None, dns_nameservers=None):
|
||||
description=None, gateway_ip=None, dns_nameservers=None,
|
||||
tags=None):
|
||||
"""Create an IpPool.
|
||||
|
||||
Arguments:
|
||||
|
@ -653,6 +654,8 @@ class IpPool(AbstractRESTResource):
|
|||
body["description"] = description
|
||||
if display_name:
|
||||
body["display_name"] = display_name
|
||||
if tags:
|
||||
body['tags'] = tags
|
||||
|
||||
return self._client.create(body=body)
|
||||
|
||||
|
@ -680,6 +683,7 @@ class IpPool(AbstractRESTResource):
|
|||
# update only the attributes in kwargs
|
||||
self._update_param_in_pool(kwargs, 'display_name', pool)
|
||||
self._update_param_in_pool(kwargs, 'description', pool)
|
||||
self._update_param_in_pool(kwargs, 'tags', pool)
|
||||
self._update_param_in_pool(kwargs, 'gateway_ip',
|
||||
pool["subnets"][0])
|
||||
self._update_param_in_pool(kwargs, 'dns_nameservers',
|
||||
|
|
Loading…
Reference in New Issue