Using a variable instead of hardcoding the docker host ip

Change-Id: I32a74b136be55a65c4c60268c053e8edfe9054f1
diff --git a/templates/load-mib-template.sh b/templates/load-mib-template.sh
index ff4aea5..5862c0a 100755
--- a/templates/load-mib-template.sh
+++ b/templates/load-mib-template.sh
@@ -14,11 +14,14 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 #
+# Example usage on Mac OS: DOCKER_HOST_IP=127.0.0.1 bash load_mib_template.sh
+
+ETCD_IP=${DOCKER_HOST_IP:=172.17.0.1}
 
 set -x
-cat ALCL-BVMGR00BRAXS020XA-3FE47059BFHB52-v2.json | etcdctl --endpoints=172.17.0.1:2379 put service/voltha/omci_mibs/templates/ALCL/BVMGR00BRAXS020XA/3FE47059BFHB52
-cat ALCL-BVMGR00BRAXS020XA-3FE47059BFHB21-v2.json | etcdctl --endpoints=172.17.0.1:2379 put service/voltha/omci_mibs/templates/ALCL/BVMGR00BRAXS020XA/3FE47059BFHB21
-cat BRCM-BVM4K00BRA0915-0083-5023_020O02414-v2.json | etcdctl --endpoints=172.17.0.1:2379 put service/voltha/omci_mibs/templates/BRCM/BVM4K00BRA0915-0083/5023_020O02414
-cat BRCM-BVM4K00BRA0915-0083-5023_003GWOV36-VEIP-v1.json | etcdctl --endpoints=172.17.0.1:2379 put service/voltha/omci_mibs/templates/BRCM/BVM4K00BRA0915-0083/5023_003GWOV36
-cat BBSM-12345123451234512345-00000000000001-v1.json | etcdctl --endpoints=172.17.0.1:2379 put service/voltha/omci_mibs/templates/BBSM/12345123451234512345/00000000000001
+cat ALCL-BVMGR00BRAXS020XA-3FE47059BFHB52-v2.json | ETCDCTL_API=3 etcdctl --endpoints=$ETCD_IP:2379 put service/voltha/omci_mibs/templates/ALCL/BVMGR00BRAXS020XA/3FE47059BFHB52
+cat ALCL-BVMGR00BRAXS020XA-3FE47059BFHB21-v2.json | ETCDCTL_API=3 etcdctl --endpoints=$ETCD_IP:2379 put service/voltha/omci_mibs/templates/ALCL/BVMGR00BRAXS020XA/3FE47059BFHB21
+cat BRCM-BVM4K00BRA0915-0083-5023_020O02414-v2.json | ETCDCTL_API=3 etcdctl --endpoints=$ETCD_IP:2379 put service/voltha/omci_mibs/templates/BRCM/BVM4K00BRA0915-0083/5023_020O02414
+cat BRCM-BVM4K00BRA0915-0083-5023_003GWOV36-VEIP-v1.json | ETCDCTL_API=3 etcdctl --endpoints=$ETCD_IP:2379 put service/voltha/omci_mibs/templates/BRCM/BVM4K00BRA0915-0083/5023_003GWOV36
+cat BBSM-12345123451234512345-00000000000001-v1.json | ETCDCTL_API=3 etcdctl --endpoints=$ETCD_IP:2379 put service/voltha/omci_mibs/templates/BBSM/12345123451234512345/00000000000001