Fix some problems for oplink netconf driver:
    1. Uses NETCONF get operation instead of get-config.
    2. Prevents reply-error log flooding in netconf session when polling port power range with protection switch, which does not support power range configuration retrieving.
    3. Some code optimization.

Change-Id: I5c4d0b0f6681dd1bf6b8c7450daf07db0104a758
diff --git a/drivers/oplink/src/main/java/org/onosproject/drivers/oplink/OplinkOpticalUtility.java b/drivers/oplink/src/main/java/org/onosproject/drivers/oplink/OplinkOpticalUtility.java
index 9785224..be372f3 100644
--- a/drivers/oplink/src/main/java/org/onosproject/drivers/oplink/OplinkOpticalUtility.java
+++ b/drivers/oplink/src/main/java/org/onosproject/drivers/oplink/OplinkOpticalUtility.java
@@ -16,6 +16,7 @@
 
 package org.onosproject.drivers.oplink;
 
+import com.google.common.collect.Range;
 import org.onlab.util.Frequency;
 import org.onosproject.core.CoreService;
 import org.onosproject.driver.extensions.OplinkAttenuation;
@@ -61,9 +62,10 @@
     // Power multiply factor, the power accuracy supported by device is 0.01dBm.
     // Transforms the double typed number to long typed power for ONOS.
     public static final int POWER_MULTIPLIER = 100;
-    // Attenuation range supported by device, [0, 25dB].
-    public static final long MIN_ATTENUATION = 0L;
-    public static final long MAX_ATTENUATION = 2500L;
+    // Attenuation range supported by device, [0, 25.5dB].
+    public static final Range<Long> RANGE_ATT = Range.closed(0L, 2550L);
+    // General power range for fiber switch, [-60dBm, 60dBm].
+    public static final Range<Long> RANGE_GENERAL = Range.closed(-6000L, 6000L);
 
     // Default attenuation value if the attenuation instruction is not found.
     private static final int DEFAULT_ATT = 0;