Remove keypair ID from details table

Currently Horizon shows keypdair.id in
project->compute->access&security->keypairs
-> keypair details tab.
But python-novaclient always returns
keypair.id=keypair.name.

Right now Nova sends ID in its response and python-novaclient got it,
but python-novaclient does not pass that ID into the Horizon.
And keypair-id is also shown via nova-cli.
But Nova folks says that ID is a some kind of private atrtr in Nova,
and that fact it is shown via cli is a side-effect and should be fiexed.

So, Horizon should not use keypair-id and this patch removes it.

Change-Id: Idd13b8900342fb98675fc8c98fff016109d8161b
Closes-Bug: #1527257
This commit is contained in:
Paul Karikh 2015-12-17 19:09:27 +03:00
parent db89874a8d
commit 6164cd2f45
2 changed files with 1 additions and 3 deletions

View File

@ -120,7 +120,7 @@ class KeyPairViewTests(test.TestCase):
# Note(Itxaka): With breadcrumbs, the title is in a list as active
self.assertContains(res, '<li class="active">Key Pair Details</li>',
1, 200)
self.assertContains(res, "<dd>%s</dd>" % keypair.name, 2, 200)
self.assertContains(res, "<dd>%s</dd>" % keypair.name, 1, 200)
@test.create_stubs({api.nova: ("keypair_create", "keypair_delete")})
def test_regenerate_keypair_get(self):

View File

@ -13,8 +13,6 @@
<dl class="dl-horizontal">
<dt>{% trans "Name" %}</dt>
<dd>{{ keypair.name|default:_("None") }}</dd>
<dt>{% trans "ID" %}</dt>
<dd>{{ keypair.id|default:_("None") }}</dd>
<dt>{% trans "Fingerprint" %}</dt>
<dd>{{ keypair.fingerprint|default:_("None") }}</dd>
<dt>{% trans "Created" %}</dt>