Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
Red Hat Satellite engineering is moving the tracking of its product development work on Satellite to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "Satellite project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs will be migrated starting at the end of May. If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "Satellite project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/SAT-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 1282539

Summary: Interfaces API output is missing 'identifier'
Product: Red Hat Satellite Reporter: Stephen Benjamin <stbenjam>
Component: APIAssignee: Katello Bug Bin <katello-bugs>
Status: CLOSED ERRATA QA Contact: Sachin Ghai <sghai>
Severity: medium Docs Contact:
Priority: medium    
Version: 6.1.3CC: cwelton, mmccune, sghai
Target Milestone: UnspecifiedKeywords: Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-02-15 15:52:07 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
proposed patch none

Description Stephen Benjamin 2015-11-16 17:12:03 UTC
Description of problem:
The API output for an interface shows:

[{"id":1,"name":"","ip":"172.17.42.1","mac":"56:84:7a:fe:97:99"}]

'identifier' is missing (e.g., eth0, docker0, etc)


Version-Release number of selected component (if applicable):
6.1.3

How reproducible:
Always

Steps to Reproduce:
1. Create a host with an interface
2. View the API Show output

Actual results:
Identifier key not present

Expected results:
Identifier key is present

Additional info:

Comment 2 Mike McCune 2015-11-16 17:32:03 UTC
Created attachment 1095039 [details]
proposed patch

Comment 6 Sachin Ghai 2016-02-03 16:12:05 UTC
Verified with Satellite 6.1.7 compose1

I can see interface identifier in api output now. I created a host with eth0:0 interface identifier. Here is the o/p:

{"name":"mac525400a591ae.idmqe.lab.eng.bos.redhat.com","id":4,"ip":"192.168.100.11","environment_id":3,"environment_name":"KT_Default_Organization_Dev_cv_rhel7_2","last_report":"2016-02-03T10:03:18Z","mac":"52:54:00:a5:91:ae","realm_id":null,"realm_name":null,"sp_mac":null,"sp_ip":null,"sp_name":null,"domain_id":1,"domain_name":"idmqe.lab.eng.bos.redhat.com","architecture_id":1,"architecture_name":"x86_64","operatingsystem_id":1,"operatingsystem_name":"RHEL Server 7.2","subnet_id":1,"subnet_name":"libvirt","sp_subnet_id":null,"ptable_id":7,"ptable_name":"Kickstart default","medium_id":8,"medium_name":"Default_Organization/Library/RHEL7/RHEL7_x86_64","build":true,"comment":"","disk":"","installed_at":null,"model_id":2,"model_name":"KVM","hostgroup_id":1,"hostgroup_name":"rhel7_hg","owner_id":3,"owner_type":"User","enabled":true,"puppet_ca_proxy_id":1,"managed":true,"use_image":null,"image_file":"","uuid":null,"compute_resource_id":null,"compute_resource_name":null,"compute_profile_id":null,"compute_profile_name":null,"capabilities":["build"],"provision_method":"build","puppet_proxy_id":1,"certname":"mac525400a591ae.idmqe.lab.eng.bos.redhat.com","image_id":null,"image_name":null,"created_at":"2016-02-03T10:03:18Z","updated_at":"2016-02-03T10:07:30Z","last_compile":null,"last_freshcheck":null,"serial":null,"source_file_id":null,"puppet_status":0,"organization_id":1,"organization_name":"Default Organization","location_id":2,"location_name":"Default Location","all_puppetclasses":[],"parameters":[],"interfaces":[{"id":5,"name":"","ip":"192.168.100.21","mac":"52:54:00:a5:91:ae","identifier":"eth0:0","type":"interface"}],"puppetclasses":[],"config_groups":[]}


Here I can see identifier as below:
"interfaces":[{"id":5,"name":"","ip":"192.168.100.21","mac":"52:54:00:a5:91:ae","identifier":"eth0:0","type":"interface"}]

On older version, output looks like:

"interfaces":[{"id":7,"name":"","ip":"192.168.100.2","mac":"52:54:00:3d:e7:8e","type":"interface"}]

Comment 7 Sachin Ghai 2016-02-03 16:12:53 UTC
Moving this bz to verified as per comment6. thanks for the fix.

Comment 9 errata-xmlrpc 2016-02-15 15:52:07 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2016:0174