From a3d0057da9d97b6ad9d533e0af464898658b780d Mon Sep 17 00:00:00 2001
From: Dirk Mueller <dirk@dmllr.de>
Date: Fri, 30 May 2014 12:29:09 +0200
Subject: [PATCH] Fix listing of Server in floating-ip-list

Add a translation from instance_id to server_id to accommodate
for the adjusted user output.

Closes-Bug: #1324857

Change-Id: Ifaa15f6907b5efae7431eb1741b7fae4b3540a8c
---
 novaclient/v1_1/shell.py | 3 +++
 novaclient/v3/shell.py   | 3 +++
 2 files changed, 6 insertions(+)

diff --git a/novaclient/v1_1/shell.py b/novaclient/v1_1/shell.py
index 928da577c..69335d7f5 100644
--- a/novaclient/v1_1/shell.py
+++ b/novaclient/v1_1/shell.py
@@ -1958,6 +1958,9 @@ def do_clear_password(cs, args):
 
 
 def _print_floating_ip_list(floating_ips):
+    convert = [('instance_id', 'server_id')]
+    _translate_keys(floating_ips, convert)
+
     utils.print_list(floating_ips, ['Ip', 'Server Id', 'Fixed Ip', 'Pool'])
 
 
diff --git a/novaclient/v3/shell.py b/novaclient/v3/shell.py
index f206f9263..d0407e344 100644
--- a/novaclient/v3/shell.py
+++ b/novaclient/v3/shell.py
@@ -1543,6 +1543,9 @@ def do_clear_password(cs, args):
 
 
 def _print_floating_ip_list(floating_ips):
+    convert = [('instance_id', 'server_id')]
+    _translate_keys(floating_ips, convert)
+
     utils.print_list(floating_ips, ['Ip', 'Server Id', 'Fixed Ip', 'Pool'])