Check eth intf existence before creating VLAN

Request to create VLAN interface for non-existing interface causes
non-existing ethernet-interface object to be accessed which in turn
causes segmentation fault.Check for requested ethernet root intf and
allow the creation of VLAN interface for ethernet objects.

Tested:
 POSTMAN Request & Response
  Request: https://xx.xx.xx.xx/redfish/v1/Managers/bmc/EthernetInterfaces/abcd/VLANs
  Method: POST
  Body Parameters: {"VLANId": 1, "VLANEnable": true }
  Response:
   "error": {
         "@Message.ExtendedInfo": [
             {
                "@odata.type": "#Message.v1_1_1.Message",
                "Message": "The request failed due to an internal service error.  The service is still operational.",
                "MessageArgs": [],
                "MessageId": "Base.1.8.1.InternalError",
                "MessageSeverity": "Critical",
                "Resolution": "Resubmit the request.  If the problem persists, consider resetting the service."
             }
         ],
         "code": "Base.1.8.1.InternalError",
         "message": "The request failed due to an internal service error.  The service is still operational."
       }

Signed-off-by: sureshvijayv1 <suresh.vijayakumar@intel.com>
Change-Id: I38e5cf64935e120a14b6b91c631e7e20b58789a1
2 files changed
tree: 45d06ab8fb5a8c4d49cbb384e122afdbff4e0092
  1. docs/
  2. gen/
  3. src/
  4. subprojects/
  5. test/
  6. yaml/
  7. .clang-format
  8. .gitignore
  9. .shellcheck
  10. LICENSE
  11. MAINTAINERS
  12. meson.build
  13. meson_options.txt
  14. OWNERS
  15. README.md
  16. xyz.openbmc_project.Network.conf.in
  17. xyz.openbmc_project.Network.service.in
README.md

To Build

To build this package, do the following steps:

    1. meson build
    2. ninja -C build