Set the port type using real value of juniper switch's port type.

Currently, juniper port description is only set with hard coded copper type.
So, set the port type using real value of juniper switch's port type.

ONOS-7844

Change-Id: Ifdaca2fdc73ab0006a8d180e42f05831f9266f9a
diff --git a/drivers/juniper/src/main/java/org/onosproject/drivers/juniper/JuniperUtils.java b/drivers/juniper/src/main/java/org/onosproject/drivers/juniper/JuniperUtils.java
index d6a6f65..14fb38a 100644
--- a/drivers/juniper/src/main/java/org/onosproject/drivers/juniper/JuniperUtils.java
+++ b/drivers/juniper/src/main/java/org/onosproject/drivers/juniper/JuniperUtils.java
@@ -92,11 +92,15 @@
     private static final String IF_PHY = "physical-interface";
 
     private static final String IF_TYPE = "if-type";
+    private static final String IF_MEDIA_TYPE = "if-media-type";
     private static final String SPEED = "speed";
     private static final String NAME = "name";
     private static final String PORT = "port";
     private static final String PROTOCOL = "protocol";
 
+    private static final String FIBER = "fiber";
+    private static final String COPPER = "copper";
+
     private static final String TCP = "tcp";
 
     // seems to be unique index within device
@@ -356,11 +360,12 @@
         annotations.set(AK_ADMIN_STATUS, toUpDown(admUp));
 
         long portSpeed = toMbps(phyIntf.getString(SPEED));
+        Type portType = phyIntf.getString(IF_MEDIA_TYPE, COPPER).equalsIgnoreCase(FIBER) ? Type.FIBER : Type.COPPER;
 
         portDescriptions.add(DefaultPortDescription.builder()
                 .withPortNumber(portNumber)
                 .isEnabled(admUp && opUp)
-                .type(Type.COPPER)
+                .type(portType)
                 .portSpeed(portSpeed)
                 .annotations(annotations.build()).build());
 
@@ -408,7 +413,7 @@
             portDescriptions.add(DefaultPortDescription.builder()
                     .withPortNumber(lPortNumber)
                     .isEnabled(admUp && opUp && lEnabled)
-                    .type(Type.COPPER)
+                    .type(portType)
                     .portSpeed(portSpeed).annotations(lannotations.build())
                     .build());
         }