DMTF/Redfish-Mockup-Creator

Warning: Uri attribute is case-sensitive, found: uri

samerhaj opened this issue · 1 comments

Running the latest code with the -M (scrape CSDL from the server) on multiple implementations is resulting in these warning messages.

# Creating /redfish/v1/$metadata resource
   redfishMockupCreate: Warning: Uri attribute is case-sensitive, found: uri
# Start Creating service xml: /redfish/v1/metadata/RedfishExtensions_v1.xml
   redfishMockupCreate: Warning: Uri attribute is case-sensitive, found: uri
# Start Creating service xml: /redfish/v1/metadata/AccountService_v1.xml
   redfishMockupCreate: Warning: Uri attribute is case-sensitive, found: uri
...

This seem to come from:

redfishMockupCreate.py, there are below codes caused to these warning message:

if scrapeMetadata:
...

  for tag in ['uri', 'Uri', 'URI']:
    if tag != 'Uri':
      rft.printErr("Warning: Uri attribute is case-sensitive, found: {}".format(str(tag)))
      uri = ref.attrib.get(tag)
      if uri is not None:
        break

But the Uri tag in all of these XML files is proper case "Uri", not "uri"

Strange, seems the order of those commands is wrong, it should only print if the tag is found but it was of the wrong case. Will fix.