Revert "Fix port command for SDK >0.9.10"

This reverts commit 8e277c64fb.

After [1] merged in osc-lib, we can Avoid 'NoneType' error
when format conversion now, So [2] in no longer needed,
we can clean it up.

Hold this until [1] released and included in the requirement
in OSC.

[1] https://review.openstack.org/#/c/434768/
[2] https://review.openstack.org/#/c/420420/

Depend-On: I649b4fc65ef7c19b8193b07f3bd59f00e6095f9f
Change-Id: I2783713102d5e6164d9617f130c2f595bd6d939e
This commit is contained in:
Huanxuan Ao 2017-03-09 19:28:51 +08:00
parent a93440023b
commit 35dc85823d

View File

@ -35,10 +35,6 @@ def _format_admin_state(state):
return 'UP' if state else 'DOWN'
def _format_dns_assignment(dns_assignment):
return utils.format_list_of_dicts(dns_assignment) \
if dns_assignment else None
_formatters = {
'admin_state_up': _format_admin_state,
'is_admin_state_up': _format_admin_state,
@ -47,7 +43,7 @@ _formatters = {
'binding_vif_details': utils.format_dict,
'binding:profile': utils.format_dict,
'binding:vif_details': utils.format_dict,
'dns_assignment': _format_dns_assignment,
'dns_assignment': utils.format_list_of_dicts,
'extra_dhcp_opts': utils.format_list_of_dicts,
'fixed_ips': utils.format_list_of_dicts,
'security_group_ids': utils.format_list,