#4774 Extend host-show to add the view attribute in set of default attributes
Closed: Fixed None Opened 9 years ago by pvoborni.

Ticket was cloned from Red Hat Bugzilla (product Red Hat Enterprise Linux 7): Bug 1168916

Description of problem:
No command shows if a view is applied to a host. host-show can be extended to
add the view attribute in set of default attributes to make it visible.

Version-Release number of selected component (if applicable):
ipa-server-4.1.0-10.el7.x86_64

Steps to Reproduce:
1. Add trust
2. create and view and apply it to a host

Actual results:

None of the below commands show if a view is applied
[root@ibm-x3620m3-01 ~]# ipa idview-apply hostview --hosts
gizmo.steeve2011.test
--------------------------
Applied ID View "hostview"
--------------------------
  hosts: gizmo.steeve2011.test
---------------------------------------------
Number of hosts the ID View was applied to: 1
---------------------------------------------

[root@ibm-x3620m3-01 ~]# ipa idview-show hostview
  ID View Name: hostview
  User object overrides: aduser2@adtest.qe

[root@ibm-x3620m3-01 ~]# ipa idview-find
------------------
2 ID Views matched
------------------
  ID View Name: Default Trust View
  Description: Default Trust View for AD users. Should not be deleted.

  ID View Name: hostview
----------------------------
Number of entries returned 2
----------------------------

[root@ibm-x3620m3-01 ~]# ipa host-show gizmo.steeve2011.test
  Host name: gizmo.steeve2011.test
  Principal name: host/gizmo.steeve2011.test@STEEVE2011.TEST
  Password: False
  Keytab: True
  Managed by: gizmo.steeve2011.test
  SSH public key fingerprint: A2:7B:EA:56:2E:B7:0D:26:5E:12:66:51:37:5C:1E:49
(ssh-rsa), 2A:49:8A:4C:82:2D:98:7A:EA:6D:13:99:B2:EB:97:71 (ssh-ed25519),
79:C2:74:85:CE:1C:EE:34:22:C9:57:AE:C6:2A:36:3B (ecdsa-
                              sha2-nistp256)

[root@ibm-x3620m3-01 ~]# ipa idoverrideuser-show hostview aduser2@adtest.qe
  Anchor to override: aduser2@adtest.qe
  User login: user1
  UID: 7777


Expected results:


Additional info:

from bz comment:

Actually there are two commands.

first:
{{{ipa idview-show viewname --show-hosts}}}

or
{{{ipa host-show host.name --all}}}

The latter has in output:
{{{<ipaassignedidview>: cn=viewname,cn=views,cn=accounts,dc=example,dc=com}}}
Which is suboptimal.

That said, this bug is still valid. The latter output should be normalized(show view name instead of dn), given a label and added to default attributes.

master:

  • d0a781b hosts: Display assigned ID view by default in host-find and show commands

ipa-4-1:

  • b986eb2 hosts: Display assigned ID view by default in host-find and show commands

Metadata Update from @pvoborni:
- Issue assigned to tbabej
- Issue set to the milestone: FreeIPA 4.1.3

7 years ago

Login to comment on this ticket.

Metadata