Add new attributes to floating ips
There are four attributes that show up by default in devstack installs. They come from the timestamp and standard attributes extensions, so it's possible they may not always be present. But we can make them always be present. Change-Id: I1a05ef735c24600821856c6ec36df11e981b3d36
This commit is contained in:
parent
a868c0a81b
commit
65f3d49cf7
@ -202,6 +202,7 @@ A Floating IP from Neutron or Nova
|
||||
FloatingIP = dict(
|
||||
location=Location(),
|
||||
id=str(),
|
||||
description=str(),
|
||||
attached=bool(),
|
||||
fixed_ip_address=str() or None,
|
||||
floating_ip_address=str() or None,
|
||||
@ -209,6 +210,9 @@ A Floating IP from Neutron or Nova
|
||||
port=str() or None,
|
||||
router=str(),
|
||||
status=str(),
|
||||
created_at=str() or None,
|
||||
updated_at=str() or None,
|
||||
revision_number=int() or None,
|
||||
properties=dict())
|
||||
|
||||
Project
|
||||
|
@ -0,0 +1,4 @@
|
||||
---
|
||||
features:
|
||||
- Added support for created_at, updated_at, description
|
||||
and revision_number attributes for floating ips.
|
@ -468,6 +468,13 @@ class Normalizer(object):
|
||||
router_id = ip.pop('router_id', None)
|
||||
id = ip.pop('id')
|
||||
port_id = ip.pop('port_id', None)
|
||||
created_at = ip.pop('created_at', None)
|
||||
updated_at = ip.pop('updated_at', None)
|
||||
# Note - description may not always be on the underlying cloud.
|
||||
# Normalizing it here is easy - what do we do when people want to
|
||||
# set a description?
|
||||
description = ip.pop('description', '')
|
||||
revision_number = ip.pop('revision_number', None)
|
||||
|
||||
if self._use_neutron_floating():
|
||||
attached = bool(port_id)
|
||||
@ -487,6 +494,10 @@ class Normalizer(object):
|
||||
port=port_id,
|
||||
router=router_id,
|
||||
status=status,
|
||||
created_at=created_at,
|
||||
updated_at=updated_at,
|
||||
description=description,
|
||||
revision_number=revision_number,
|
||||
properties=ip.copy(),
|
||||
)
|
||||
# Backwards compat
|
||||
|
Loading…
Reference in New Issue
Block a user