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 1392919

Summary: [RFE] api/v2/discovered_hosts/facts does not return mac address
Product: Red Hat Satellite Reporter: Djebran Lezzoum <dlezzoum>
Component: Discovery PluginAssignee: Lukas Zapletal <lzap>
Status: CLOSED NOTABUG QA Contact: Katello QA List <katello-qa-list>
Severity: medium Docs Contact:
Priority: unspecified    
Version: UnspecifiedCC: abalakht, bbuckingham, bkearney, dlezzoum, jcallaha
Target Milestone: UnspecifiedKeywords: EasyFix, FutureFeature, Triaged
Target Release: Unused   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-04-11 13:04:50 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:

Description Djebran Lezzoum 2016-11-08 13:35:40 UTC
Description of problem:
 api/v2/discovered_hosts/facts does not return mac address

Version-Release number of selected component (if applicable):
6.2.z - 6.3 

How reproducible:
Always

Steps to Reproduce:
1. call /api/v2/discovered_hosts/facts providing all required parameters
2.
3.

Actual results:
the actual results does not contain mac address

Expected results:
mac address should be returned along side with other values

Additional info:

Comment 1 Lukas Zapletal 2017-03-06 13:50:40 UTC
Djebran,

I don't understand, can you specify what output you get and what exactly is missing? On my system, I can reach the endpoint and see all facts:

$ curl-foreman api/v2/discovered_hosts/41
{
    "facts_hash": {
        "discovery_version": "3.0.2",
        "interfaces": "fake1,fake2,fake3",
        "macaddress_fake1": "52:54:00:97:a0:25",
        "macaddress_fake2": "52:54:00:92:87:06",
        "macaddress_fake3": "52:54:00:16:04:29",
        "ipaddress_fake1": "10.228.235.145",
        "ipaddress_fake2": "192.168.122.239",
        "ipaddress_fake3": "10.180.132.199",
        "macaddress": "52:54:00:16:04:29",
        "ipaddress": "10.180.132.199",
        "discovery_bootif": "52:54:00:92:87:06",
        "ipmi_enabled": "true",
        "ipmi_1_gateway": "10.1.1.1",
        "ipmi_1_ipaddress": "10.60.184.232",
        "ipmi_1_ipaddress_source": "DHCP Address",
        "ipmi_1_macaddress": "52:54:00:53:dc:4c",
        "ipmi_1_subnet_mask": "255.0.0.0",
        "ipmi_gateway": "10.1.1.1",
        "ipmi_ipaddress": "10.60.184.232",
        "ipmi_ipaddress_source": "DHCP Address",
        "ipmi_macaddress": "52:54:00:53:dc:4c",
        "ipmi_subnet_mask": "255.0.0.0",
        "physicalprocessorcount": "3",
        "memorysize_mb": "900",
        "blockdevice.sda_size": "1234567890",
        "blockdevice.sdb_size": "123456700",
        "Xforeman_organization": "TestOrg1",
        "Xforeman_location": "Olomouc",
        "discovery_test_a": "A",
        "discovery_test_b": "B",
        "hardwaremodel": "Fake Host FH420"
    },
    "ip": "192.168.122.239",
    "mac": "52:54:00:92:87:06",
    "last_report": "2017-03-03 15:53:45 UTC",
    "subnet_id": null,
    "subnet_name": null,
    "hardware_model_name": null,
    "memory": 900,
    "disk_count": 2,
    "disks_size": 1296,
    "cpus": 3,
    "organization_id": 1,
    "organization_name": "MyOrg",
    "location_id": 2,
    "location_name": "MyLoc",
    "name": "mac525400928706",
    "id": 41
}

Comment 3 Lukas Zapletal 2017-04-11 13:04:50 UTC
Hey, you are making POST instead GET request. This is correct behavior. Please reopen if you think this is a bug.