XYZ network: Prefix length and threshold IP configuration

This change includes:
    GOOD PATH test cases:
    1. First, second, third and fourth octet threshold configuration.
    2. Verify default gateway.
    3. Verify hostname.
    BAD PATH test cases:
    4. Out-of-range prefix length.
    5. String value as prefix length.
    6. Negative value as prefix length.

This reolves openbmc/openbmc-test-automation#801

Change-Id: I974f480ab63ba9c624d856c068ec1ef2df973472
Signed-off-by: Prashanth Katti <prkatti1@in.ibm.com>
diff --git a/lib/bmc_network_utils.robot b/lib/bmc_network_utils.robot
index 9a7a12c..ffb066e 100644
--- a/lib/bmc_network_utils.robot
+++ b/lib/bmc_network_utils.robot
@@ -99,3 +99,19 @@
     ${cmd_output}=  Execute Command On BMC  /sbin/ip addr | grep ether
 
     [Return]  ${cmd_output}
+
+Get BMC Hostname
+    [Documentation]  Get BMC hostname.
+
+    # Sample output of  "hostnamectl":
+    #   Static hostname: xxyyxxyyxx
+    #         Icon name: computer
+    #        Machine ID: 6939927dc0db409ea09289d5b56eef08
+    #           Boot ID: bb806955fd904d47b6aa4bc7c34df482
+    #  Operating System: Phosphor OpenBMC (xxx xx xx) v1.xx.x-xx
+    #            Kernel: Linux 4.10.17-d6ae40dc4c4dff3265cc254d404ed6b03fcc2206
+    #      Architecture: arm
+
+    ${output}=  Execute Command on BMC  hostnamectl | grep hostname
+
+    [Return]  ${output}