ONOS-6327: Implement details panel for host view.
ONOS-6326: Add friendly names to hosts.
- PLENTY more YakShaving:
  * some cleanup of the device view handler
  * introduce navPath field to PropertyPanel
  * introduce "-" name annotation to represent "use default"
  * (and more...)

Change-Id: I2afc0f1f29c726b90e97e492527edde2d1345ece
diff --git a/core/api/src/main/java/org/onosproject/net/config/basics/BasicHostConfig.java b/core/api/src/main/java/org/onosproject/net/config/basics/BasicHostConfig.java
index 7b870b4..1a8db33 100644
--- a/core/api/src/main/java/org/onosproject/net/config/basics/BasicHostConfig.java
+++ b/core/api/src/main/java/org/onosproject/net/config/basics/BasicHostConfig.java
@@ -31,6 +31,7 @@
 
     private static final String IPS = "ips";
     private static final String LOCATIONS = "locations";
+    private static final String DASH = "-";
 
     @Override
     public boolean isValid() {
@@ -41,6 +42,17 @@
                 GRID_Y, GRID_Y, UI_TYPE, RACK_ADDRESS, OWNER, IPS, LOCATIONS);
     }
 
+    @Override
+    public String name() {
+        // NOTE:
+        // We don't want to default to host ID if friendly name is not set;
+        // (it isn't particularly friendly, e.g. "00:00:00:00:00:01/None").
+        // We'd prefer to clear the annotation, but if we pass null, then the
+        // value won't get set (see BasicElementOperator). So, instead we will
+        // return a DASH to signify "use the default friendly name".
+        return get(NAME, DASH);
+    }
+
     /**
      * Returns the location of the host.
      *