diff --git a/doc/source/model.rst b/doc/source/model.rst index 508d4a54f..0f5f2aff9 100644 --- a/doc/source/model.rst +++ b/doc/source/model.rst @@ -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 diff --git a/releasenotes/notes/new-floating-attributes-213cdf5681d337e1.yaml b/releasenotes/notes/new-floating-attributes-213cdf5681d337e1.yaml new file mode 100644 index 000000000..61f4ec1db --- /dev/null +++ b/releasenotes/notes/new-floating-attributes-213cdf5681d337e1.yaml @@ -0,0 +1,4 @@ +--- +features: + - Added support for created_at, updated_at, description + and revision_number attributes for floating ips. diff --git a/shade/_normalize.py b/shade/_normalize.py index 944df2d52..95b00bf12 100644 --- a/shade/_normalize.py +++ b/shade/_normalize.py @@ -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