From f76e604ef2a1e05d8ef023d172bf878845b87743 Mon Sep 17 00:00:00 2001 From: MatthewHink Date: Tue, 30 Nov 2021 09:38:44 -0800 Subject: [PATCH] Functional verification for SNMPv3 with MD5/DES https://vaporio.atlassian.net/browse/VIO-1919 This already worked, here is functional verification. There will be CI side changes required to merge this. I still need to find out what those are. --- Makefile | 41 ++- emulator/README.md | 3 +- emulator/start_snmp_emulator.sh | 25 -- emulator/test_snmp.yml | 9 - emulator/{ => ups/pxgms_ups}/Dockerfile | 8 +- emulator/ups/pxgms_ups/README.md | 2 + .../{ => ups/pxgms_ups}/data/public.snmpwalk | 0 emulator/ups/pxgms_ups/start_snmp_emulator.sh | 43 +++ emulator/ups/pxgms_ups/test_snmp.yml | 10 + emulator/ups/tripplite_ups/Dockerfile | 38 ++ emulator/ups/tripplite_ups/README.md | 2 + .../ups/tripplite_ups/data/public.snmpwalk | 348 ++++++++++++++++++ .../ups/tripplite_ups/start_snmp_emulator.sh | 42 +++ emulator/ups/tripplite_ups/test_snmp.yml | 10 + go.mod | 23 +- go.sum | 92 +---- pkg/snmp/core/client_test.go | 50 ++- pkg/snmp/mibs/ups_mib/ups_input_table.go | 2 +- pkg/snmp/servers/tripplite_ups_test.go | 25 +- 19 files changed, 606 insertions(+), 167 deletions(-) delete mode 100755 emulator/start_snmp_emulator.sh delete mode 100644 emulator/test_snmp.yml rename emulator/{ => ups/pxgms_ups}/Dockerfile (84%) create mode 100644 emulator/ups/pxgms_ups/README.md rename emulator/{ => ups/pxgms_ups}/data/public.snmpwalk (100%) create mode 100755 emulator/ups/pxgms_ups/start_snmp_emulator.sh create mode 100644 emulator/ups/pxgms_ups/test_snmp.yml create mode 100644 emulator/ups/tripplite_ups/Dockerfile create mode 100644 emulator/ups/tripplite_ups/README.md create mode 100644 emulator/ups/tripplite_ups/data/public.snmpwalk create mode 100755 emulator/ups/tripplite_ups/start_snmp_emulator.sh create mode 100644 emulator/ups/tripplite_ups/test_snmp.yml diff --git a/Makefile b/Makefile index a95e3c8..2e22e7b 100644 --- a/Makefile +++ b/Makefile @@ -3,7 +3,7 @@ # PLUGIN_NAME := snmp -PLUGIN_VERSION := 2.2.2 +PLUGIN_VERSION := 2.2.3 IMAGE_NAME := vaporio/snmp-plugin BIN_NAME := synse-snmp-plugin @@ -78,24 +78,31 @@ help: ## Print usage information .DEFAULT_GOAL := help -# This test recipe probably is probably what ci is hooking into now? It's hard to tell. -# You can't run tests on a dev box like this anymore without standing up the emulator first. -.PHONY: test -test: ## Run all tests - go test -cover ./... || exit - .PHONY: integration-test unit-test: test +.PHONY: start-snmp-emulators +start-snmp-emulators: ## Start emulators for functional tests. + # Start the SNMP emulator for the pxgmsups (Eaton UPS) in a docker container in the background. + # Tests run on the local machine. + docker-compose -f ./emulator/ups/pxgms_ups/test_snmp.yml down || true + docker-compose -f ./emulator/ups/pxgms_ups/test_snmp.yml build + docker-compose -f ./emulator/ups/pxgms_ups/test_snmp.yml up -d + # Start the SNMP emulator for the pxgmsups (Eaton UPS) in a docker container in the background. + # Tests run on the local machine. + docker-compose -f ./emulator/ups/tripplite_ups/test_snmp.yml down || true + docker-compose -f ./emulator/ups/tripplite_ups/test_snmp.yml build + docker-compose -f ./emulator/ups/tripplite_ups/test_snmp.yml up -d -# FIXME: try to streamline the below +.PHONY: stop-snmp-emulators +stop-snmp-emulators: ## Shutdown the emulators. + docker-compose -f ./emulator/ups/tripplite_ups/test_snmp.yml down + docker-compose -f ./emulator/ups/pxgms_ups/test_snmp.yml down -.PHONY: test-dev-box -test-dev-box: ## Run all tests on a dev box. - # Start the SNMP emulator in a docker container in the background. - # Tests run on the local machine. - docker-compose -f ./emulator/test_snmp.yml down || true - docker-compose -f ./emulator/test_snmp.yml build - docker-compose -f ./emulator/test_snmp.yml up -d - go test -cover -v ./... || (echo TESTS FAILED $$?; docker-compose -f ./emulator/test_snmp.yml kill; exit 1) - docker-compose -f ./emulator/test_snmp.yml down +.PHONY: run-tests +run-tests: + # Run the tests. Requires the emulators. + go test -cover -v ./... || (echo TESTS FAILED $$?; docker-compose -f ./emulator/ups/pxgms_ups/test_snmp.yml kill; exit 1) + +.PHONY: test +test: start-snmp-emulators run-tests stop-snmp-emulators ## Start emulators, run all tests, stop emulators. diff --git a/emulator/README.md b/emulator/README.md index d639df2..baee912 100644 --- a/emulator/README.md +++ b/emulator/README.md @@ -1 +1,2 @@ -This directory contains what we need to run the SNMP emulator in a container for testing. +This directory contains what we need to run SNMP emulators in containers +for testing. diff --git a/emulator/start_snmp_emulator.sh b/emulator/start_snmp_emulator.sh deleted file mode 100755 index 49c2c1f..0000000 --- a/emulator/start_snmp_emulator.sh +++ /dev/null @@ -1,25 +0,0 @@ -#!/bin/bash - -# Start the snmp emulator. - -# Args are: -# data directory -# port -# log file name - -# The snmp emulator cannot run as root. -# Running a python file to load a configuration file will work, -# but then we don't have access to things like snmpsimd.py when we Popen. -# It is not a path issue. -# - -python `which snmpsimd.py` \ - --data-dir=$1 \ - --agent-udpv4-endpoint=0.0.0.0:$2 \ - --v3-user=simulator \ - --v3-auth-key=auctoritas \ - --v3-auth-proto=SHA \ - --v3-priv-key=privatus \ - --v3-priv-proto=AES \ - 2>&1 | tee /logs/$3 - diff --git a/emulator/test_snmp.yml b/emulator/test_snmp.yml deleted file mode 100644 index 0898195..0000000 --- a/emulator/test_snmp.yml +++ /dev/null @@ -1,9 +0,0 @@ -# This is the container running the SNMP emulator to test against. -snmp-emulator-ups: - container_name: snmp-emulator-ups - build: . - dockerfile: Dockerfile - # This command will override what is in the dockerfile. - command: ./start_snmp_emulator.sh ./data 1024 snmp-emulator-ups.log - ports: - - 1024:1024/udp diff --git a/emulator/Dockerfile b/emulator/ups/pxgms_ups/Dockerfile similarity index 84% rename from emulator/Dockerfile rename to emulator/ups/pxgms_ups/Dockerfile index af09274..b92fa73 100644 --- a/emulator/Dockerfile +++ b/emulator/ups/pxgms_ups/Dockerfile @@ -1,4 +1,4 @@ -# Ths dockerfile starts the SNMP emulator in a container for testing. +# Ths dockerfile starts the PXGMS UPS (Eaton UPS) SNMP emulator in a container for testing. FROM vaporio/vapor-endpoint-base-x64:1.0 RUN pip install -I \ @@ -7,6 +7,7 @@ RUN pip install -I \ pyasn1 # The emulator will not start as root, so we need to add a user. +# As root, the Error message is the following: # snmp-emulator | ERROR: cant drop priveleges: Must drop priveleges to a non-priveleged user&group (sic) # Create the user and ${HOME} RUN groupadd -r docker && useradd -r -g docker snmp @@ -31,6 +32,7 @@ EXPOSE 1024/udp # Args are: # data directory (typically /home/snmp/data) -# port (normally using 11011 for single emulator) +# port (normally using 1024 and up) # log file name (trying to keep these names unique) -CMD ["./start_snmp_emulator.sh","./data","1024","snmp-emulator-ups.log"] +# SNMP version, typically V3 +CMD ["./start_snmp_emulator.sh","./data","1024","snmp-emulator-ups-pxgms.log", "V3"] diff --git a/emulator/ups/pxgms_ups/README.md b/emulator/ups/pxgms_ups/README.md new file mode 100644 index 0000000..25b3ada --- /dev/null +++ b/emulator/ups/pxgms_ups/README.md @@ -0,0 +1,2 @@ +This directory contains the pxgms ups emulator for the Eaton UPS. The data +file is a snmpwalk from SNMP OID .1.3.6.1 diff --git a/emulator/data/public.snmpwalk b/emulator/ups/pxgms_ups/data/public.snmpwalk similarity index 100% rename from emulator/data/public.snmpwalk rename to emulator/ups/pxgms_ups/data/public.snmpwalk diff --git a/emulator/ups/pxgms_ups/start_snmp_emulator.sh b/emulator/ups/pxgms_ups/start_snmp_emulator.sh new file mode 100755 index 0000000..af9f6ca --- /dev/null +++ b/emulator/ups/pxgms_ups/start_snmp_emulator.sh @@ -0,0 +1,43 @@ +#!/bin/bash + +# Start the snmp emulator for the Pxgms (Eaton) UPS. + +# Args are: +# data directory +# port +# log file name +# SNMP Version. Only V3 is currently supported, but we can do more in the future. + +DATA_DIRECTORY=$1 +NETWORK_PORT=$2 +LOG_DIRECTORY=$3 +SNMP_VERSION=$4 + +# Enure SNMP_VERSION is set +if [ -z ${SNMP_VERSION+x} ]; then + echo "SNMP_VERSION is unset"; +else echo "SNMP_VERSION is set to '${SNMP_VERSION}'"; +fi + +# SNMP V3 only for this UPS. +if [[ ${SNMP_VERSION} -ne V3 ]] ; then + echo "SNMP_VERSION is not V3" + exit 1 +fi + +# The snmp emulator cannot run as root. +# Running a python file to load a configuration file will work, +# but then we don't have access to things like snmpsimd.py when we Popen. +# It is not a path issue. +# + +python `which snmpsimd.py` \ + --data-dir=${DATA_DIRECTORY} \ + --agent-udpv4-endpoint=0.0.0.0:${NETWORK_PORT} \ + --v3-user=simulator \ + --v3-auth-key=auctoritas \ + --v3-auth-proto=SHA \ + --v3-priv-key=privatus \ + --v3-priv-proto=AES \ + 2>&1 | tee /logs/${LOG_DIRECTORY} + diff --git a/emulator/ups/pxgms_ups/test_snmp.yml b/emulator/ups/pxgms_ups/test_snmp.yml new file mode 100644 index 0000000..fef44bc --- /dev/null +++ b/emulator/ups/pxgms_ups/test_snmp.yml @@ -0,0 +1,10 @@ +# This is the container running the PXGMS (Eaton) UPS SNMP emulator to test against. +# This emulator runs on port 1024. +snmp-emulator-pxgms-ups: + container_name: snmp-emulator-pxgms-ups + build: . + dockerfile: Dockerfile + # This command will override what is in the dockerfile. + command: ./start_snmp_emulator.sh ./data 1024 snmp-emulator-pxgms-ups.log V3 + ports: + - 1024:1024/udp diff --git a/emulator/ups/tripplite_ups/Dockerfile b/emulator/ups/tripplite_ups/Dockerfile new file mode 100644 index 0000000..9aa877d --- /dev/null +++ b/emulator/ups/tripplite_ups/Dockerfile @@ -0,0 +1,38 @@ +# Ths dockerfile starts the SNMP emulator for the tripplite ups in a container for testing. +# This emulator runs on port 1025. +FROM vaporio/vapor-endpoint-base-x64:1.0 + +RUN pip install -I \ + snmpsim \ + pysnmp \ + pyasn1 + +# The emulator will not start as root, so we need to add a user. +# As root, the Error message is the following: +# snmp-emulator | ERROR: cant drop priveleges: Must drop priveleges to a non-priveleged user&group (sic) +# Create the user and ${HOME} +RUN groupadd -r docker && useradd -r -g docker snmp +ADD . /home/snmp + +# These SNMP emulator files are specfic to the device being emulated. +# Data are just places in /home/snmp/data on the emulator to keep it simple. +ADD data/public.snmpwalk /home/snmp/data/public.snmpwalk + +# snmpsmi variation modules (like writecache) are getting installed to a location not in the search path, +# so copy where it will be found. +# snmp user owns /home/snmp and /logs. +RUN mkdir -p /home/snmp/.snmpsim/variation && \ + cp /usr/local/snmpsim/variation/* /home/snmp/.snmpsim/variation && \ + chown snmp:docker /home/snmp -R && \ + chown snmp:docker /logs -R +USER snmp +WORKDIR /home/snmp + +# Default emulator port is 1024. Expose it. +EXPOSE 1024/udp + +# data directory (typically /home/snmp/data) +# port (typically 1024 and up) +# log file name (trying to keep these names unique) +# SNMP version (V3) +CMD ["./start_snmp_emulator.sh","./data","1025","snmp-emulator-tripplite-ups.log", "V3"] diff --git a/emulator/ups/tripplite_ups/README.md b/emulator/ups/tripplite_ups/README.md new file mode 100644 index 0000000..3a24dc8 --- /dev/null +++ b/emulator/ups/tripplite_ups/README.md @@ -0,0 +1,2 @@ +This directory contains the pxgms ups emulator for the Tripplite UPS. The +data file is a snmpwalk from OID .1.3.6.1 diff --git a/emulator/ups/tripplite_ups/data/public.snmpwalk b/emulator/ups/tripplite_ups/data/public.snmpwalk new file mode 100644 index 0000000..9d80e23 --- /dev/null +++ b/emulator/ups/tripplite_ups/data/public.snmpwalk @@ -0,0 +1,348 @@ +.1.3.6.1.2.1.1.1.0 = STRING: UPS SNMP Agent +.1.3.6.1.2.1.1.2.0 = OID: .1.3.6.1.4.1.850.100.1 +.1.3.6.1.2.1.1.3.0 = Timeticks: (557779790) 64 days, 13:23:17.90 +.1.3.6.1.2.1.1.4.0 = STRING: +.1.3.6.1.2.1.1.5.0 = STRING: TLNET +.1.3.6.1.2.1.1.6.0 = STRING: +.1.3.6.1.2.1.1.7.0 = INTEGER: 0 +.1.3.6.1.2.1.2.1.0 = INTEGER: 5 +.1.3.6.1.2.1.2.2.1.1.1 = INTEGER: 1 +.1.3.6.1.2.1.2.2.1.1.2 = INTEGER: 2 +.1.3.6.1.2.1.2.2.1.1.3 = INTEGER: 3 +.1.3.6.1.2.1.2.2.1.1.4 = INTEGER: 4 +.1.3.6.1.2.1.2.2.1.1.5 = INTEGER: 5 +.1.3.6.1.2.1.2.2.1.2.1 = STRING: lo.............. +.1.3.6.1.2.1.2.2.1.2.2 = STRING: eth0............ +.1.3.6.1.2.1.2.2.1.2.3 = STRING: tunl0........... +.1.3.6.1.2.1.2.2.1.2.4 = STRING: gre0............ +.1.3.6.1.2.1.2.2.1.2.5 = STRING: sit0............ +.1.3.6.1.2.1.2.2.1.3.1 = INTEGER: softwareLoopback(24) +.1.3.6.1.2.1.2.2.1.3.2 = INTEGER: ethernetCsmacd(6) +.1.3.6.1.2.1.2.2.1.3.3 = INTEGER: tunnel(131) +.1.3.6.1.2.1.2.2.1.3.4 = INTEGER: tunnel(131) +.1.3.6.1.2.1.2.2.1.3.5 = INTEGER: tunnel(131) +.1.3.6.1.2.1.2.2.1.4.1 = INTEGER: 16436 +.1.3.6.1.2.1.2.2.1.4.2 = INTEGER: 1500 +.1.3.6.1.2.1.2.2.1.4.3 = INTEGER: 1480 +.1.3.6.1.2.1.2.2.1.4.4 = INTEGER: 1476 +.1.3.6.1.2.1.2.2.1.4.5 = INTEGER: 1480 +.1.3.6.1.2.1.2.2.1.5.1 = Gauge32: 0 +.1.3.6.1.2.1.2.2.1.5.2 = Gauge32: 100000000 +.1.3.6.1.2.1.2.2.1.5.3 = Gauge32: 0 +.1.3.6.1.2.1.2.2.1.5.4 = Gauge32: 0 +.1.3.6.1.2.1.2.2.1.5.5 = Gauge32: 0 +.1.3.6.1.2.1.2.2.1.6.1 = STRING: 0:0:0:0:0:0 +.1.3.6.1.2.1.2.2.1.6.2 = STRING: 0:6:67:6:19:f +.1.3.6.1.2.1.2.2.1.6.3 = STRING: 0:0:0:0:19:f +.1.3.6.1.2.1.2.2.1.6.4 = STRING: 0:0:0:0:19:f +.1.3.6.1.2.1.2.2.1.6.5 = STRING: 0:0:0:0:19:f +.1.3.6.1.2.1.2.2.1.7.1 = INTEGER: up(1) +.1.3.6.1.2.1.2.2.1.7.2 = INTEGER: up(1) +.1.3.6.1.2.1.2.2.1.7.3 = INTEGER: down(2) +.1.3.6.1.2.1.2.2.1.7.4 = INTEGER: down(2) +.1.3.6.1.2.1.2.2.1.7.5 = INTEGER: down(2) +.1.3.6.1.2.1.2.2.1.8.1 = INTEGER: up(1) +.1.3.6.1.2.1.2.2.1.8.2 = INTEGER: up(1) +.1.3.6.1.2.1.2.2.1.8.3 = INTEGER: down(2) +.1.3.6.1.2.1.2.2.1.8.4 = INTEGER: down(2) +.1.3.6.1.2.1.2.2.1.8.5 = INTEGER: down(2) +.1.3.6.1.2.1.2.2.1.9.1 = Timeticks: (0) 0:00:00.00 +.1.3.6.1.2.1.2.2.1.9.2 = Timeticks: (0) 0:00:00.00 +.1.3.6.1.2.1.2.2.1.9.3 = Timeticks: (0) 0:00:00.00 +.1.3.6.1.2.1.2.2.1.9.4 = Timeticks: (0) 0:00:00.00 +.1.3.6.1.2.1.2.2.1.9.5 = Timeticks: (0) 0:00:00.00 +.1.3.6.1.2.1.2.2.1.10.1 = Counter32: 9263 +.1.3.6.1.2.1.2.2.1.10.2 = Counter32: 1473666579 +.1.3.6.1.2.1.2.2.1.10.3 = Counter32: 0 +.1.3.6.1.2.1.2.2.1.10.4 = Counter32: 0 +.1.3.6.1.2.1.2.2.1.10.5 = Counter32: 0 +.1.3.6.1.2.1.2.2.1.11.1 = Counter32: 56 +.1.3.6.1.2.1.2.2.1.11.2 = Counter32: 9129691 +.1.3.6.1.2.1.2.2.1.11.3 = Counter32: 0 +.1.3.6.1.2.1.2.2.1.11.4 = Counter32: 0 +.1.3.6.1.2.1.2.2.1.11.5 = Counter32: 0 +.1.3.6.1.2.1.2.2.1.12.1 = Counter32: 0 +.1.3.6.1.2.1.2.2.1.12.2 = Counter32: 0 +.1.3.6.1.2.1.2.2.1.12.3 = Counter32: 0 +.1.3.6.1.2.1.2.2.1.12.4 = Counter32: 0 +.1.3.6.1.2.1.2.2.1.12.5 = Counter32: 0 +.1.3.6.1.2.1.2.2.1.13.1 = Counter32: 0 +.1.3.6.1.2.1.2.2.1.13.2 = Counter32: 0 +.1.3.6.1.2.1.2.2.1.13.3 = Counter32: 0 +.1.3.6.1.2.1.2.2.1.13.4 = Counter32: 0 +.1.3.6.1.2.1.2.2.1.13.5 = Counter32: 0 +.1.3.6.1.2.1.2.2.1.14.1 = Counter32: 0 +.1.3.6.1.2.1.2.2.1.14.2 = Counter32: 0 +.1.3.6.1.2.1.2.2.1.14.3 = Counter32: 0 +.1.3.6.1.2.1.2.2.1.14.4 = Counter32: 0 +.1.3.6.1.2.1.2.2.1.14.5 = Counter32: 0 +.1.3.6.1.2.1.2.2.1.15.1 = Counter32: 0 +.1.3.6.1.2.1.2.2.1.15.2 = Counter32: 0 +.1.3.6.1.2.1.2.2.1.15.3 = Counter32: 0 +.1.3.6.1.2.1.2.2.1.15.4 = Counter32: 0 +.1.3.6.1.2.1.2.2.1.15.5 = Counter32: 0 +.1.3.6.1.2.1.2.2.1.16.1 = Counter32: 9263 +.1.3.6.1.2.1.2.2.1.16.2 = Counter32: 49735799 +.1.3.6.1.2.1.2.2.1.16.3 = Counter32: 0 +.1.3.6.1.2.1.2.2.1.16.4 = Counter32: 0 +.1.3.6.1.2.1.2.2.1.16.5 = Counter32: 0 +.1.3.6.1.2.1.2.2.1.17.1 = Counter32: 56 +.1.3.6.1.2.1.2.2.1.17.2 = Counter32: 649215 +.1.3.6.1.2.1.2.2.1.17.3 = Counter32: 0 +.1.3.6.1.2.1.2.2.1.17.4 = Counter32: 0 +.1.3.6.1.2.1.2.2.1.17.5 = Counter32: 0 +.1.3.6.1.2.1.2.2.1.18.1 = Counter32: 0 +.1.3.6.1.2.1.2.2.1.18.2 = Counter32: 0 +.1.3.6.1.2.1.2.2.1.18.3 = Counter32: 0 +.1.3.6.1.2.1.2.2.1.18.4 = Counter32: 0 +.1.3.6.1.2.1.2.2.1.18.5 = Counter32: 0 +.1.3.6.1.2.1.2.2.1.19.1 = Counter32: 0 +.1.3.6.1.2.1.2.2.1.19.2 = Counter32: 0 +.1.3.6.1.2.1.2.2.1.19.3 = Counter32: 0 +.1.3.6.1.2.1.2.2.1.19.4 = Counter32: 0 +.1.3.6.1.2.1.2.2.1.19.5 = Counter32: 0 +.1.3.6.1.2.1.2.2.1.20.1 = Counter32: 0 +.1.3.6.1.2.1.2.2.1.20.2 = Counter32: 0 +.1.3.6.1.2.1.2.2.1.20.3 = Counter32: 0 +.1.3.6.1.2.1.2.2.1.20.4 = Counter32: 0 +.1.3.6.1.2.1.2.2.1.20.5 = Counter32: 0 +.1.3.6.1.2.1.2.2.1.21.1 = Gauge32: 0 +.1.3.6.1.2.1.2.2.1.21.2 = Gauge32: 32 +.1.3.6.1.2.1.2.2.1.21.3 = Gauge32: 0 +.1.3.6.1.2.1.2.2.1.21.4 = Gauge32: 0 +.1.3.6.1.2.1.2.2.1.21.5 = Gauge32: 0 +.1.3.6.1.2.1.2.2.1.22.1 = OID: .0.0 +.1.3.6.1.2.1.2.2.1.22.2 = OID: .0.0 +.1.3.6.1.2.1.2.2.1.22.3 = OID: .0.0 +.1.3.6.1.2.1.2.2.1.22.4 = OID: .0.0 +.1.3.6.1.2.1.2.2.1.22.5 = OID: .0.0 +.1.3.6.1.2.1.3.1.1.1.2.1.10.193.18.180 = INTEGER: 2 +.1.3.6.1.2.1.3.1.1.1.2.1.10.193.18.254 = INTEGER: 2 +.1.3.6.1.2.1.3.1.1.2.2.1.10.193.18.180 = STRING: "��!�'7" +.1.3.6.1.2.1.3.1.1.2.2.1.10.193.18.254 = Hex-STRING: F4 92 BF 78 67 7D +.1.3.6.1.2.1.3.1.1.3.2.1.10.193.18.180 = IpAddress: 10.193.18.180 +.1.3.6.1.2.1.3.1.1.3.2.1.10.193.18.254 = IpAddress: 10.193.18.254 +.1.3.6.1.2.1.4.1.0 = INTEGER: notForwarding(2) +.1.3.6.1.2.1.4.2.0 = INTEGER: 64 +.1.3.6.1.2.1.4.3.0 = Counter32: 2310865 +.1.3.6.1.2.1.4.4.0 = Counter32: 0 +.1.3.6.1.2.1.4.5.0 = Counter32: 43 +.1.3.6.1.2.1.4.6.0 = Counter32: 0 +.1.3.6.1.2.1.4.7.0 = Counter32: 0 +.1.3.6.1.2.1.4.8.0 = Counter32: 0 +.1.3.6.1.2.1.4.9.0 = Counter32: 520241 +.1.3.6.1.2.1.4.10.0 = Counter32: 438564 +.1.3.6.1.2.1.4.11.0 = Counter32: 0 +.1.3.6.1.2.1.4.12.0 = Counter32: 0 +.1.3.6.1.2.1.4.13.0 = INTEGER: 0 seconds +.1.3.6.1.2.1.4.14.0 = Counter32: 0 +.1.3.6.1.2.1.4.15.0 = Counter32: 0 +.1.3.6.1.2.1.4.16.0 = Counter32: 0 +.1.3.6.1.2.1.4.17.0 = Counter32: 0 +.1.3.6.1.2.1.4.18.0 = Counter32: 0 +.1.3.6.1.2.1.4.19.0 = Counter32: 0 +.1.3.6.1.2.1.4.20.1.1.10.193.18.110 = IpAddress: 10.193.18.110 +.1.3.6.1.2.1.4.20.1.1.127.0.0.1 = IpAddress: 127.0.0.1 +.1.3.6.1.2.1.4.20.1.2.10.193.18.110 = INTEGER: 2 +.1.3.6.1.2.1.4.20.1.2.127.0.0.1 = INTEGER: 1 +.1.3.6.1.2.1.4.20.1.3.10.193.18.110 = IpAddress: 255.255.255.0 +.1.3.6.1.2.1.4.20.1.3.127.0.0.1 = IpAddress: 255.0.0.0 +.1.3.6.1.2.1.4.20.1.4.10.193.18.110 = INTEGER: 1 +.1.3.6.1.2.1.4.20.1.4.127.0.0.1 = INTEGER: 1 +.1.3.6.1.2.1.4.20.1.5.10.193.18.110 = INTEGER: 0 +.1.3.6.1.2.1.4.20.1.5.127.0.0.1 = INTEGER: 0 +.1.3.6.1.2.1.4.21.1.1.0.0.0.0 = IpAddress: 0.0.0.0 +.1.3.6.1.2.1.4.21.1.1.10.193.18.0 = IpAddress: 10.193.18.0 +.1.3.6.1.2.1.4.21.1.1.127.0.0.0 = IpAddress: 127.0.0.0 +.1.3.6.1.2.1.4.21.1.2.0.0.0.0 = INTEGER: 2 +.1.3.6.1.2.1.4.21.1.2.10.193.18.0 = INTEGER: 2 +.1.3.6.1.2.1.4.21.1.2.127.0.0.0 = INTEGER: 1 +.1.3.6.1.2.1.4.21.1.3.0.0.0.0 = INTEGER: 0 +.1.3.6.1.2.1.4.21.1.3.10.193.18.0 = INTEGER: 0 +.1.3.6.1.2.1.4.21.1.3.127.0.0.0 = INTEGER: 0 +.1.3.6.1.2.1.4.21.1.4.0.0.0.0 = INTEGER: -1 +.1.3.6.1.2.1.4.21.1.4.10.193.18.0 = INTEGER: -1 +.1.3.6.1.2.1.4.21.1.4.127.0.0.0 = INTEGER: -1 +.1.3.6.1.2.1.4.21.1.5.0.0.0.0 = INTEGER: -1 +.1.3.6.1.2.1.4.21.1.5.10.193.18.0 = INTEGER: -1 +.1.3.6.1.2.1.4.21.1.5.127.0.0.0 = INTEGER: -1 +.1.3.6.1.2.1.4.21.1.6.0.0.0.0 = INTEGER: -1 +.1.3.6.1.2.1.4.21.1.6.10.193.18.0 = INTEGER: -1 +.1.3.6.1.2.1.4.21.1.6.127.0.0.0 = INTEGER: -1 +.1.3.6.1.2.1.4.21.1.7.0.0.0.0 = IpAddress: 10.193.18.254 +.1.3.6.1.2.1.4.21.1.7.10.193.18.0 = IpAddress: 0.0.0.0 +.1.3.6.1.2.1.4.21.1.7.127.0.0.0 = IpAddress: 0.0.0.0 +.1.3.6.1.2.1.4.21.1.8.0.0.0.0 = INTEGER: 4 +.1.3.6.1.2.1.4.21.1.8.10.193.18.0 = INTEGER: 3 +.1.3.6.1.2.1.4.21.1.8.127.0.0.0 = INTEGER: 3 +.1.3.6.1.2.1.4.21.1.9.0.0.0.0 = INTEGER: 2 +.1.3.6.1.2.1.4.21.1.9.10.193.18.0 = INTEGER: 2 +.1.3.6.1.2.1.4.21.1.9.127.0.0.0 = INTEGER: 2 +.1.3.6.1.2.1.4.21.1.10.0.0.0.0 = INTEGER: 0 +.1.3.6.1.2.1.4.21.1.10.10.193.18.0 = INTEGER: 0 +.1.3.6.1.2.1.4.21.1.10.127.0.0.0 = INTEGER: 0 +.1.3.6.1.2.1.4.21.1.11.0.0.0.0 = IpAddress: 0.0.0.0 +.1.3.6.1.2.1.4.21.1.11.10.193.18.0 = IpAddress: 255.255.255.0 +.1.3.6.1.2.1.4.21.1.11.127.0.0.0 = IpAddress: 255.0.0.0 +.1.3.6.1.2.1.4.21.1.12.0.0.0.0 = INTEGER: -1 +.1.3.6.1.2.1.4.21.1.12.10.193.18.0 = INTEGER: -1 +.1.3.6.1.2.1.4.21.1.12.127.0.0.0 = INTEGER: -1 +.1.3.6.1.2.1.4.21.1.13.0.0.0.0 = OID: .0.0 +.1.3.6.1.2.1.4.21.1.13.10.193.18.0 = OID: .0.0 +.1.3.6.1.2.1.4.21.1.13.127.0.0.0 = OID: .0.0 +.1.3.6.1.2.1.4.23.0 = Counter32: 0 +.1.3.6.1.2.1.5.1.0 = Counter32: 111 +.1.3.6.1.2.1.5.2.0 = Counter32: 0 +.1.3.6.1.2.1.5.3.0 = Counter32: 71 +.1.3.6.1.2.1.5.4.0 = Counter32: 0 +.1.3.6.1.2.1.5.5.0 = Counter32: 0 +.1.3.6.1.2.1.5.6.0 = Counter32: 0 +.1.3.6.1.2.1.5.7.0 = Counter32: 0 +.1.3.6.1.2.1.5.8.0 = Counter32: 40 +.1.3.6.1.2.1.5.9.0 = Counter32: 0 +.1.3.6.1.2.1.5.10.0 = Counter32: 0 +.1.3.6.1.2.1.5.11.0 = Counter32: 0 +.1.3.6.1.2.1.5.12.0 = Counter32: 0 +.1.3.6.1.2.1.5.13.0 = Counter32: 0 +.1.3.6.1.2.1.5.14.0 = Counter32: 110 +.1.3.6.1.2.1.5.15.0 = Counter32: 0 +.1.3.6.1.2.1.5.16.0 = Counter32: 70 +.1.3.6.1.2.1.5.17.0 = Counter32: 0 +.1.3.6.1.2.1.5.18.0 = Counter32: 0 +.1.3.6.1.2.1.5.19.0 = Counter32: 0 +.1.3.6.1.2.1.5.20.0 = Counter32: 0 +.1.3.6.1.2.1.5.21.0 = Counter32: 0 +.1.3.6.1.2.1.5.22.0 = Counter32: 40 +.1.3.6.1.2.1.5.23.0 = Counter32: 0 +.1.3.6.1.2.1.5.24.0 = Counter32: 0 +.1.3.6.1.2.1.5.25.0 = Counter32: 0 +.1.3.6.1.2.1.5.26.0 = Counter32: 0 +.1.3.6.1.2.1.6.1.0 = INTEGER: other(1) +.1.3.6.1.2.1.6.2.0 = INTEGER: 200 milliseconds +.1.3.6.1.2.1.6.3.0 = INTEGER: 120000 milliseconds +.1.3.6.1.2.1.6.4.0 = INTEGER: -1 +.1.3.6.1.2.1.6.5.0 = Counter32: 0 +.1.3.6.1.2.1.6.6.0 = Counter32: 75 +.1.3.6.1.2.1.6.7.0 = Counter32: 2 +.1.3.6.1.2.1.6.8.0 = Counter32: 2 +.1.3.6.1.2.1.6.9.0 = Gauge32: 0 +.1.3.6.1.2.1.6.10.0 = Counter32: 338021 +.1.3.6.1.2.1.6.11.0 = Counter32: 338371 +.1.3.6.1.2.1.6.12.0 = Counter32: 12 +.1.3.6.1.2.1.6.13.1.1.0.0.0.0.22.0.0.0.0.0 = INTEGER: closed(1) +.1.3.6.1.2.1.6.13.1.1.0.0.0.0.23.0.0.0.0.0 = INTEGER: closed(1) +.1.3.6.1.2.1.6.13.1.1.0.0.0.0.80.0.0.0.0.0 = INTEGER: closed(1) +.1.3.6.1.2.1.6.13.1.1.0.0.0.0.443.0.0.0.0.0 = INTEGER: closed(1) +.1.3.6.1.2.1.6.13.1.2.0.0.0.0.22.0.0.0.0.0 = IpAddress: 0.0.0.0 +.1.3.6.1.2.1.6.13.1.2.0.0.0.0.23.0.0.0.0.0 = IpAddress: 0.0.0.0 +.1.3.6.1.2.1.6.13.1.2.0.0.0.0.80.0.0.0.0.0 = IpAddress: 0.0.0.0 +.1.3.6.1.2.1.6.13.1.2.0.0.0.0.443.0.0.0.0.0 = IpAddress: 0.0.0.0 +.1.3.6.1.2.1.6.13.1.3.0.0.0.0.22.0.0.0.0.0 = INTEGER: 22 +.1.3.6.1.2.1.6.13.1.3.0.0.0.0.23.0.0.0.0.0 = INTEGER: 23 +.1.3.6.1.2.1.6.13.1.3.0.0.0.0.80.0.0.0.0.0 = INTEGER: 80 +.1.3.6.1.2.1.6.13.1.3.0.0.0.0.443.0.0.0.0.0 = INTEGER: 443 +.1.3.6.1.2.1.6.13.1.4.0.0.0.0.22.0.0.0.0.0 = IpAddress: 0.0.0.0 +.1.3.6.1.2.1.6.13.1.4.0.0.0.0.23.0.0.0.0.0 = IpAddress: 0.0.0.0 +.1.3.6.1.2.1.6.13.1.4.0.0.0.0.80.0.0.0.0.0 = IpAddress: 0.0.0.0 +.1.3.6.1.2.1.6.13.1.4.0.0.0.0.443.0.0.0.0.0 = IpAddress: 0.0.0.0 +.1.3.6.1.2.1.6.13.1.5.0.0.0.0.22.0.0.0.0.0 = INTEGER: 0 +.1.3.6.1.2.1.6.13.1.5.0.0.0.0.23.0.0.0.0.0 = INTEGER: 0 +.1.3.6.1.2.1.6.13.1.5.0.0.0.0.80.0.0.0.0.0 = INTEGER: 0 +.1.3.6.1.2.1.6.13.1.5.0.0.0.0.443.0.0.0.0.0 = INTEGER: 0 +.1.3.6.1.2.1.6.14.0 = Counter32: 0 +.1.3.6.1.2.1.6.15.0 = Counter32: 336144 +.1.3.6.1.2.1.7.1.0 = Counter32: 56342 +.1.3.6.1.2.1.7.2.0 = Counter32: 14 +.1.3.6.1.2.1.7.3.0 = Counter32: 8842 +.1.3.6.1.2.1.7.4.0 = Counter32: 100212 +.1.3.6.1.2.1.7.5.1.1.0.0.0.0.68 = IpAddress: 0.0.0.0 +.1.3.6.1.2.1.7.5.1.1.0.0.0.0.137 = IpAddress: 0.0.0.0 +.1.3.6.1.2.1.7.5.1.1.0.0.0.0.161 = IpAddress: 0.0.0.0 +.1.3.6.1.2.1.7.5.1.1.0.0.0.0.3456 = IpAddress: 0.0.0.0 +.1.3.6.1.2.1.7.5.1.1.0.0.0.0.7890 = IpAddress: 0.0.0.0 +.1.3.6.1.2.1.7.5.1.1.0.0.0.0.38352 = IpAddress: 0.0.0.0 +.1.3.6.1.2.1.7.5.1.2.0.0.0.0.68 = INTEGER: 68 +.1.3.6.1.2.1.7.5.1.2.0.0.0.0.137 = INTEGER: 137 +.1.3.6.1.2.1.7.5.1.2.0.0.0.0.161 = INTEGER: 161 +.1.3.6.1.2.1.7.5.1.2.0.0.0.0.3456 = INTEGER: 3456 +.1.3.6.1.2.1.7.5.1.2.0.0.0.0.7890 = INTEGER: 7890 +.1.3.6.1.2.1.7.5.1.2.0.0.0.0.38352 = INTEGER: 38352 +.1.3.6.1.2.1.10.0 = INTEGER: 0 +.1.3.6.1.2.1.11.1.0 = Counter32: 361 +.1.3.6.1.2.1.11.2.0 = Counter32: 361 +.1.3.6.1.2.1.11.3.0 = Counter32: 0 +.1.3.6.1.2.1.11.4.0 = Counter32: 0 +.1.3.6.1.2.1.11.5.0 = Counter32: 0 +.1.3.6.1.2.1.11.6.0 = Counter32: 0 +.1.3.6.1.2.1.11.8.0 = Counter32: 0 +.1.3.6.1.2.1.11.9.0 = Counter32: 0 +.1.3.6.1.2.1.11.10.0 = Counter32: 0 +.1.3.6.1.2.1.11.11.0 = Counter32: 0 +.1.3.6.1.2.1.11.12.0 = Counter32: 0 +.1.3.6.1.2.1.11.13.0 = Counter32: 371 +.1.3.6.1.2.1.11.14.0 = Counter32: 0 +.1.3.6.1.2.1.11.15.0 = Counter32: 1 +.1.3.6.1.2.1.11.16.0 = Counter32: 374 +.1.3.6.1.2.1.11.17.0 = Counter32: 0 +.1.3.6.1.2.1.11.18.0 = Counter32: 0 +.1.3.6.1.2.1.11.19.0 = Counter32: 0 +.1.3.6.1.2.1.11.20.0 = Counter32: 0 +.1.3.6.1.2.1.11.21.0 = Counter32: 0 +.1.3.6.1.2.1.11.22.0 = Counter32: 0 +.1.3.6.1.2.1.11.24.0 = Counter32: 0 +.1.3.6.1.2.1.11.25.0 = Counter32: 0 +.1.3.6.1.2.1.11.26.0 = Counter32: 0 +.1.3.6.1.2.1.11.27.0 = Counter32: 0 +.1.3.6.1.2.1.11.28.0 = Counter32: 386 +.1.3.6.1.2.1.11.29.0 = Counter32: 0 +.1.3.6.1.2.1.11.30.0 = INTEGER: enabled(1) +.1.3.6.1.2.1.33.1.1.1 = STRING: "TrippLite" +.1.3.6.1.2.1.33.1.1.2 = "" +.1.3.6.1.2.1.33.1.1.3 = "" +.1.3.6.1.2.1.33.1.1.4 = STRING: "01.12.05c" +.1.3.6.1.2.1.33.1.1.5 = "" +.1.3.6.1.2.1.33.1.1.6 = "" +.1.3.6.1.2.1.33.1.2.1 = INTEGER: 2 +.1.3.6.1.2.1.33.1.2.2 = INTEGER: 0 +.1.3.6.1.2.1.33.1.3.1 = INTEGER: 0 +.1.3.6.1.2.1.33.1.3.3.1.1.1 = INTEGER: 1 +.1.3.6.1.2.1.33.1.3.3.1.1.2 = INTEGER: 2 +.1.3.6.1.2.1.33.1.3.3.1.1.3 = INTEGER: 3 +.1.3.6.1.2.1.33.1.4.1 = INTEGER: 3 +.1.3.6.1.2.1.33.1.4.4.1.1.1 = INTEGER: 1 +.1.3.6.1.2.1.33.1.4.4.1.1.2 = INTEGER: 2 +.1.3.6.1.2.1.33.1.4.4.1.1.3 = INTEGER: 3 +.1.3.6.1.2.1.33.1.6.1 = INTEGER: 0 +.1.3.6.1.2.1.33.1.7.1 = OID: .1.3.6.1.2.1.33.1.7.7.1 +.1.3.6.1.2.1.33.1.7.3 = INTEGER: 1 +.1.3.6.1.2.1.33.1.8.2 = INTEGER: 0 +.1.3.6.1.2.1.33.1.8.3 = INTEGER: -1 +.1.3.6.1.2.1.33.1.8.4 = INTEGER: 0 +.1.3.6.1.2.1.33.1.9.1 = INTEGER: -1 +.1.3.6.1.4.1.850.100.1.1.2 = "" +.1.3.6.1.4.1.850.100.1.1.4 = STRING: "2843CLCAC897C00111" +.1.3.6.1.4.1.850.100.1.1.6 = "" +.1.3.6.1.4.1.850.100.1.3.2.1.1.1 = INTEGER: 1 +.1.3.6.1.4.1.850.100.1.3.2.1.1.2 = INTEGER: 2 +.1.3.6.1.4.1.850.100.1.3.2.1.1.3 = INTEGER: 3 +.1.3.6.1.4.1.850.100.1.4.7.1.1.1 = INTEGER: 1 +.1.3.6.1.4.1.850.100.1.4.7.1.1.2 = INTEGER: 2 +.1.3.6.1.4.1.850.100.1.4.7.1.1.3 = INTEGER: 3 +.1.3.6.1.4.1.850.100.1.4.7.1.2.1 = INTEGER: 1 +.1.3.6.1.4.1.850.100.1.4.7.1.2.2 = INTEGER: 1 +.1.3.6.1.4.1.850.100.1.4.7.1.2.3 = INTEGER: 1 +.1.3.6.1.4.1.850.100.1.6.1 = INTEGER: 0 +.1.3.6.1.4.1.850.100.1.6.7 = "" +.1.3.6.1.4.1.850.100.1.6.8 = "" +.1.3.6.1.4.1.850.100.1.7.1 = "" +.1.3.6.1.4.1.850.100.1.8.3.1 = INTEGER: 2 +.1.3.6.1.4.1.850.100.1.8.3.4 = INTEGER: 2 +.1.3.6.1.4.1.850.100.1.8.3.5 = INTEGER: 2 +.1.3.6.1.4.1.850.100.1.10.1 = INTEGER: 0 +.1.3.6.1.4.1.850.100.1.12.1 = INTEGER: 2 +.1.3.6.1.4.1.850.100.1.12.2 = INTEGER: 2 +.1.3.6.1.6.3.10.2.1.1.0 = Hex-STRING: 80 00 03 52 03 00 06 67 06 19 0F +.1.3.6.1.6.3.10.2.1.2.0 = INTEGER: 168 +.1.3.6.1.6.3.10.2.1.3.0 = INTEGER: 14900 seconds +.1.3.6.1.6.3.10.2.1.4.0 = INTEGER: 81920 + diff --git a/emulator/ups/tripplite_ups/start_snmp_emulator.sh b/emulator/ups/tripplite_ups/start_snmp_emulator.sh new file mode 100755 index 0000000..9bd75fc --- /dev/null +++ b/emulator/ups/tripplite_ups/start_snmp_emulator.sh @@ -0,0 +1,42 @@ +#!/bin/bash + +# Start the snmp emulator for the Tripplite UPS. + +# Args are: +# data directory +# port +# log file name +# SNMP version, which is currently only V3 for this UPS. + +DATA_DIRECTORY=$1 +NETWORK_PORT=$2 +LOG_DIRECTORY=$3 +SNMP_VERSION=$4 + +# Enure SNMP_VERSION is set +if [ -z ${SNMP_VERSION+x} ]; then + echo "SNMP_VERSION is unset"; +else echo "SNMP_VERSION is set to '${SNMP_VERSION}'"; +fi + +# SNMP V3 only for this UPS. +if [[ ${SNMP_VERSION} -ne V3 ]] ; then + echo "SNMP_VERSION is not V3" + exit 1 +fi + +# The snmp emulator cannot run as root. +# Running a python file to load a configuration file will work, +# but then we don't have access to things like snmpsimd.py when we Popen. +# It is not a path issue. +# + +python `which snmpsimd.py` \ + --data-dir=${DATA_DIRECTORY} \ + --agent-udpv4-endpoint=0.0.0.0:${NETWORK_PORT} \ + --v3-user=simulator \ + --v3-auth-key=auctoritas \ + --v3-auth-proto=MD5 \ + --v3-priv-key=privatus \ + --v3-priv-proto=DES \ + 2>&1 | tee /logs/${LOG_DIRECTORY} diff --git a/emulator/ups/tripplite_ups/test_snmp.yml b/emulator/ups/tripplite_ups/test_snmp.yml new file mode 100644 index 0000000..525a63d --- /dev/null +++ b/emulator/ups/tripplite_ups/test_snmp.yml @@ -0,0 +1,10 @@ +# This is the container running the Tripplite UPS SNMP emulator to test against. +# This emulator runs on port 1025. +snmp-emulator-tripplite-ups: + container_name: snmp-emulator-tripplite-ups + build: . + dockerfile: Dockerfile + # This command will override what is in the dockerfile. + command: ./start_snmp_emulator.sh ./data 1025 snmp-emulator-triplite-ups.log V3 + ports: + - 1025:1025/udp diff --git a/go.mod b/go.mod index 44bf291..959fdcd 100644 --- a/go.mod +++ b/go.mod @@ -3,24 +3,13 @@ module github.com/vapor-ware/synse-snmp-plugin go 1.16 require ( - github.com/cespare/xxhash/v2 v2.1.2 // indirect - github.com/creasty/defaults v1.5.2 // indirect - github.com/google/uuid v1.3.0 // indirect - github.com/gosnmp/gosnmp v1.33.0 - github.com/imdario/mergo v0.3.12 // indirect - github.com/mitchellh/mapstructure v1.4.2 // indirect - github.com/prometheus/common v0.32.1 // indirect - github.com/prometheus/procfs v0.7.3 // indirect + github.com/gosnmp/gosnmp v1.34.0 github.com/sirupsen/logrus v1.8.1 github.com/stretchr/testify v1.7.0 github.com/vapor-ware/synse-sdk v0.1.0-alpha.0.20211022200300-95f96541a99d - golang.org/x/lint v0.0.0-20210508222113-6edffad5e616 // indirect - golang.org/x/net v0.0.0-20211020060615-d418f374d309 // indirect - golang.org/x/sys v0.0.0-20211025201205-69cdffdb9359 // indirect - golang.org/x/text v0.3.7 // indirect - golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac // indirect - golang.org/x/tools v0.1.5 // indirect - google.golang.org/genproto v0.0.0-20211026145609-4688e4c4e024 // indirect - google.golang.org/grpc v1.41.0 // indirect - gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect + golang.org/x/net v0.0.0-20211123203042-d83791d6bcd9 // indirect + golang.org/x/sys v0.0.0-20211124211545-fe61309f8881 // indirect + golang.org/x/time v0.0.0-20211116232009-f0f3c7e86c11 // indirect + google.golang.org/genproto v0.0.0-20211129164237-f09f9a12af12 // indirect + google.golang.org/grpc v1.42.0 // indirect ) diff --git a/go.sum b/go.sum index 8939e4c..290860d 100644 --- a/go.sum +++ b/go.sum @@ -47,7 +47,6 @@ github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6r github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko= github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= -github.com/cespare/xxhash/v2 v2.1.1 h1:6MnRN8NT7+YBpUIWxHtefFZOKTAPgGjpQSxqLNn0+qY= github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/cespare/xxhash/v2 v2.1.2 h1:YRXhKfTDauu4ajMg1TPgFO5jnlC2HCbmLXMcTG5cbYE= github.com/cespare/xxhash/v2 v2.1.2/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= @@ -57,11 +56,11 @@ github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMn github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= +github.com/cncf/udpa/go v0.0.0-20210930031921-04548b0d99d4/go.mod h1:6pvJx4me5XPnfI9Z40ddWsdw2W/uZgQLFXToKeRcDiI= github.com/cncf/xds/go v0.0.0-20210312221358-fbca930ec8ed/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20210805033703-aa0b78936158/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/creasty/defaults v1.4.0/go.mod h1:9UWnPlI41ASz+YJswP5aK5S79d6QH60/Ioz52OXV9X8= -github.com/creasty/defaults v1.5.1 h1:j8WexcS3d/t4ZmllX4GEkl4wIB/trOr035ajcLHCISM= -github.com/creasty/defaults v1.5.1/go.mod h1:FPZ+Y0WNrbqOVw+c6av63eyHUAl6pMHZwqLPvXUZGfY= +github.com/cncf/xds/go v0.0.0-20210922020428-25de7278fc84/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/creasty/defaults v1.5.2 h1:/VfB6uxpyp6h0fr7SPp7n8WJBoV8jfxQXPCnkVSjyls= github.com/creasty/defaults v1.5.2/go.mod h1:FPZ+Y0WNrbqOVw+c6av63eyHUAl6pMHZwqLPvXUZGfY= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= @@ -73,7 +72,6 @@ github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymF github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= -github.com/envoyproxy/go-control-plane v0.9.9-0.20210217033140-668b12f5399d/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= github.com/envoyproxy/go-control-plane v0.9.9-0.20210512163311-63b5d3c536b0/go.mod h1:hliV/p42l8fGbc6Y9bQ70uLwIvmJyVE5k4iMKlh8wCQ= github.com/envoyproxy/go-control-plane v0.9.10-0.20210907150352-cf90f659a021/go.mod h1:AFq3mo9L8Lqqiid3OhADV3RfLJnjiw63cSpi+fDTRC0= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= @@ -143,23 +141,17 @@ github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hf github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= -github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/google/uuid v1.2.0 h1:qJYtXnJRWmpe7m/3XlyhrsLrEURqHRM2kxzoxXqyUDs= -github.com/google/uuid v1.2.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I= github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= -github.com/gosnmp/gosnmp v1.32.0 h1:gctewmZx5qFI0oHMzRnjETqIZ093d9NgZy9TQr3V0iA= -github.com/gosnmp/gosnmp v1.32.0/go.mod h1:EIp+qkEpXoVsyZxXKy0AmXQx0mCHMMcIhXXvNDMpgF0= -github.com/gosnmp/gosnmp v1.33.0 h1:WNwN5Rj/9Y70VplIKXuaUiYVxdcaXhfAuLElKx4lnpU= -github.com/gosnmp/gosnmp v1.33.0/go.mod h1:QWTRprXN9haHFof3P96XTDYc46boCGAh5IXp0DniEx4= +github.com/gosnmp/gosnmp v1.34.0 h1:p96iiNTTdL4ZYspPC3leSKXiHfE1NiIYffMu9100p5E= +github.com/gosnmp/gosnmp v1.34.0/go.mod h1:QWTRprXN9haHFof3P96XTDYc46boCGAh5IXp0DniEx4= github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= -github.com/imdario/mergo v0.3.10/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA= github.com/imdario/mergo v0.3.12 h1:b6R2BslTbIEToALKP7LxUvijTsNI9TAe80pLWN2g/HU= github.com/imdario/mergo v0.3.12/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA= github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= @@ -181,9 +173,6 @@ github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/matttproud/golang_protobuf_extensions v1.0.1 h1:4hp9jkHxhMHkqkrB3Ix0jegS5sx/RkqARlsWZ6pIwiU= github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= -github.com/mitchellh/mapstructure v1.3.3/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= -github.com/mitchellh/mapstructure v1.4.1 h1:CpVNEelQCZBooIPDn+AR3NpivK/TIKU8bDxdASFVQag= -github.com/mitchellh/mapstructure v1.4.1/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/mitchellh/mapstructure v1.4.2 h1:6h7AQ0yhTcIsmFmnAwQls75jp2Gzs4iB8W7pjMO+rqo= github.com/mitchellh/mapstructure v1.4.2/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= @@ -212,23 +201,12 @@ github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6T github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= github.com/prometheus/common v0.26.0/go.mod h1:M7rCNAaPfAosfx8veZJCuw84e35h3Cfd9VFqTh1DIvc= -github.com/prometheus/common v0.28.0 h1:vGVfV9KrDTvWt5boZO0I19g2E3CsWfpPPKZM9dt3mEw= -github.com/prometheus/common v0.28.0/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= -github.com/prometheus/common v0.29.0 h1:3jqPBvKT4OHAbje2Ql7KeaaSicDBCxMYwEJU1zRJceE= -github.com/prometheus/common v0.29.0/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= -github.com/prometheus/common v0.30.0 h1:JEkYlQnpzrzQFxi6gnukFPdQ+ac82oRhzMcIduJu/Ug= -github.com/prometheus/common v0.30.0/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= -github.com/prometheus/common v0.31.1 h1:d18hG4PkHnNAKNMOmFuXFaiY8Us0nird/2m60uS1AMs= -github.com/prometheus/common v0.31.1/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= github.com/prometheus/common v0.32.1 h1:hWIdL3N2HoUx3B8j3YN9mWor0qhY/NlEKZEaXxuIRh4= github.com/prometheus/common v0.32.1/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= -github.com/prometheus/procfs v0.6.0 h1:mxy4L2jP6qMonqmq+aTtOx1ifVWUgG/TAmntgbh3xv4= github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= -github.com/prometheus/procfs v0.7.0 h1:OQZ41sZU9XkRpzrz8/TD0EldH/Rwbddkdu5wDyUwzfE= -github.com/prometheus/procfs v0.7.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= github.com/prometheus/procfs v0.7.3 h1:4jVXhlkAyzOScmCkXBTOLRLTz8EeU+eyjrwB/EPq0VU= github.com/prometheus/procfs v0.7.3/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= @@ -247,8 +225,6 @@ github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81P github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/vapor-ware/synse-sdk v0.1.0-alpha.0.20210413152122-9d6dea743ebb h1:uzeiSuOy9M1uXvZtzzaVK4zOWaL0UWaz0L6nR7KiRog= -github.com/vapor-ware/synse-sdk v0.1.0-alpha.0.20210413152122-9d6dea743ebb/go.mod h1:WbxVnJA1M3mwGhXSP0EmYn1/bDNc+UcTSL89XsZaQCs= github.com/vapor-ware/synse-sdk v0.1.0-alpha.0.20211022200300-95f96541a99d h1:z11/PwM0nOylOIa0WbWflba6QjMa4gUNy32NBOkx5jo= github.com/vapor-ware/synse-sdk v0.1.0-alpha.0.20211022200300-95f96541a99d/go.mod h1:A/bj/1VFJQtNv2GTddZVuEJ9jBZp8ypjld/juHvHFVs= github.com/vapor-ware/synse-server-grpc v0.0.2-0.20210119190824-c4d4f681c30c h1:ttdkJAZsjfcz1UJjPV9kjCtqp7+H137Fj41bvAH9JzQ= @@ -291,7 +267,6 @@ golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHl golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs= golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/lint v0.0.0-20210508222113-6edffad5e616/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= @@ -330,16 +305,10 @@ golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81R golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= -golang.org/x/net v0.0.0-20210525063256-abc453219eb5 h1:wjuX4b5yYQnEQHzd+CBcrcC6OVR2J1CN6mUy0oSxIPo= golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20210614182718-04defd469f4e h1:XpT3nA5TvE525Ne3hInMh6+GETgn27Zfm9dxsThnX2Q= -golang.org/x/net v0.0.0-20210614182718-04defd469f4e/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20210913180222-943fd674d43e h1:+b/22bPvDYt4NPDcy4xAGCmON713ONAWFeY3Z7I3tR8= -golang.org/x/net v0.0.0-20210913180222-943fd674d43e/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20211006190231-62292e806868 h1:KlOXYy8wQWTUJYFgkUI40Lzr06ofg5IRXUK5C7qZt1k= -golang.org/x/net v0.0.0-20211006190231-62292e806868/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20211020060615-d418f374d309 h1:A0lJIi+hcTR6aajJH4YqKWwohY4aW9RO7oRMcdv+HKI= golang.org/x/net v0.0.0-20211020060615-d418f374d309/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20211123203042-d83791d6bcd9 h1:0qxwC5n+ttVOINCBeRHO0nq9X7uy8SDsPoi5OaCdIEI= +golang.org/x/net v0.0.0-20211123203042-d83791d6bcd9/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -387,7 +356,6 @@ golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200722175500-76b94024e4b6/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -395,17 +363,9 @@ golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210603081109-ebe580a85c40/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210608053332-aa57babbf139 h1:C+AwYEtBp/VQwoLntUmQ/yx3MS9vmZaKNdw5eOpoQe8= -golang.org/x/sys v0.0.0-20210608053332-aa57babbf139/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c h1:F1jZWGFhYfh0Ci55sIpILtKKK8p3i2/krTr0H1rg74I= -golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210910150752-751e447fb3d0 h1:xrCZDmdtoloIiooiA9q0OQb9r8HejIHYoHGhGCe1pGg= -golang.org/x/sys v0.0.0-20210910150752-751e447fb3d0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20211006194710-c8a6f5223071 h1:PjhxBct4MZii8FFR8+oeS7QOvxKOTZXgk63EU2XpfJE= -golang.org/x/sys v0.0.0-20211006194710-c8a6f5223071/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211020174200-9d6173849985/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20211025201205-69cdffdb9359 h1:2B5p2L5IfGiD7+b9BOoRMC6DgObAVZV+Fsp050NqXik= -golang.org/x/sys v0.0.0-20211025201205-69cdffdb9359/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211124211545-fe61309f8881 h1:TyHqChC80pFkXWraUUf6RuB5IqFdQieMLwwCJokV2pc= +golang.org/x/sys v0.0.0-20211124211545-fe61309f8881/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -413,20 +373,15 @@ golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3 golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.6 h1:aRYxNxv6iGQlyVaZmk6ZgYEDa+Jg18DxebPSrd6bg1M= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7 h1:olpwvP2KacW1ZWvsR7uQhoyTYvKAupfQrRGBFM352Gk= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20200630173020-3af7569d3a1e/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20210608053304-ed9ce3a009e4 h1:1asO3s7vR+9MvZSNRwUBBTjecxbGtfvmxjy2VWbFR5g= -golang.org/x/time v0.0.0-20210608053304-ed9ce3a009e4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20210611083556-38a9dc6acbc6 h1:Vv0JUPWTyeqUq42B2WJ1FeIDjjvGKoA2Ss+Ts0lAVbs= -golang.org/x/time v0.0.0-20210611083556-38a9dc6acbc6/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac h1:7zkz7BUtwNFFqcowJ+RIgu2MaV/MapERkDIy+mwPyjs= golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20211116232009-f0f3c7e86c11 h1:GZokNIeuVkl3aZHJchRrr13WCsols02MLUcz1U9is6M= +golang.org/x/time v0.0.0-20211116232009-f0f3c7e86c11/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= @@ -468,9 +423,6 @@ golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.1.1/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= -golang.org/x/tools v0.1.2/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= -golang.org/x/tools v0.1.4/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= -golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -525,21 +477,12 @@ google.golang.org/genproto v0.0.0-20200513103714-09dca8ec2884/go.mod h1:55QSHmfG google.golang.org/genproto v0.0.0-20200515170657-fc4c6c6a6587/go.mod h1:YsZOwe1myG/8QRHRsmBRE1LrgQY60beZKjly0O1fX9U= google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA= -google.golang.org/genproto v0.0.0-20200724131911-43cab4749ae7/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210608205507-b6d2f5bf0d7d h1:KzwjikDymrEmYYbdyfievTwjEeGlu+OM6oiKBkF3Jfg= -google.golang.org/genproto v0.0.0-20210608205507-b6d2f5bf0d7d/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= -google.golang.org/genproto v0.0.0-20210708141623-e76da96a951f h1:khwpF3oSk7GIab/7DDMDyE8cPQEO6FAfOcWHIRAhO20= -google.golang.org/genproto v0.0.0-20210708141623-e76da96a951f/go.mod h1:AxrInvYm1dci+enl5hChSFPOmmUF1+uAa/UsgNRWd7k= -google.golang.org/genproto v0.0.0-20210909211513-a8c4777a87af h1:aLMMXFYqw01RA6XJim5uaN+afqNNjc9P8HPAbnpnc5s= -google.golang.org/genproto v0.0.0-20210909211513-a8c4777a87af/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= -google.golang.org/genproto v0.0.0-20211005153810-c76a74d43a8e h1:Im71rbA1N3CbIag/PumYhQcNR8bLNmuOtRIyOnnLsT8= -google.golang.org/genproto v0.0.0-20211005153810-c76a74d43a8e/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= google.golang.org/genproto v0.0.0-20211021150943-2b146023228c/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/genproto v0.0.0-20211026145609-4688e4c4e024 h1:aePO4E0x+Urj9V5NQHjqOpaNG4oMeHQq0l2ob05z5tI= -google.golang.org/genproto v0.0.0-20211026145609-4688e4c4e024/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20211129164237-f09f9a12af12 h1:DN5b3HU13J4sMd/QjDx34U6afpaexKTDdop+26pdjdk= +google.golang.org/genproto v0.0.0-20211129164237-f09f9a12af12/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= @@ -554,14 +497,10 @@ google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0= google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= -google.golang.org/grpc v1.38.0 h1:/9BgsAsa5nWe26HqOlvlgJnqBuktYOLCgjCPqsa56W0= -google.golang.org/grpc v1.38.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= -google.golang.org/grpc v1.39.0 h1:Klz8I9kdtkIN6EpHHUOMLCYhTn/2WAe5a0s1hcBkdTI= -google.golang.org/grpc v1.39.0/go.mod h1:PImNr+rS9TWYb2O4/emRugxiyHZ5JyHW5F+RPnDzfrE= -google.golang.org/grpc v1.40.0 h1:AGJ0Ih4mHjSeibYkFGh1dD9KJ/eOtZ93I6hoHhukQ5Q= google.golang.org/grpc v1.40.0/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= -google.golang.org/grpc v1.41.0 h1:f+PlOh7QV4iIJkPrx5NQ7qaNGFQ3OTse67yaDHfju4E= google.golang.org/grpc v1.41.0/go.mod h1:U3l9uK9J0sini8mHphKoXyaqDA/8VyGnDee1zzIUK6k= +google.golang.org/grpc v1.42.0 h1:XT2/MFpuPFsEX2fWh3YQtHkZ+WYZFQRfaUgLZYj/p6A= +google.golang.org/grpc v1.42.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ590SU= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= @@ -573,7 +512,6 @@ google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpAD google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4= google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= -google.golang.org/protobuf v1.26.0 h1:bxAC2xTBsZGibn2RTntX0oH50xLsqy1OxA9tTL3p/lk= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.27.1 h1:SnqbnDw1V7RiZcXPx5MEeqPv2s79L9i7BJUlG/+RurQ= google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= diff --git a/pkg/snmp/core/client_test.go b/pkg/snmp/core/client_test.go index 6b5e00a..aadae9a 100644 --- a/pkg/snmp/core/client_test.go +++ b/pkg/snmp/core/client_test.go @@ -7,8 +7,9 @@ import ( "github.com/stretchr/testify/assert" ) -// TestClient is the initial positive test against the emulator. -func TestClient(t *testing.T) { +// TestClientPxgmsUps is the initial positive test against the emulator. +// Uses SNMPv3 with SHA/AES. +func TestClientPxgmsUps(t *testing.T) { // Create SecurityParameters for the config that should connect to the emulator. securityParameters, err := NewSecurityParameters( "simulator", // User Name @@ -34,7 +35,7 @@ func TestClient(t *testing.T) { client, err := NewSnmpClient(config) assert.NoError(t, err) - // Walk OID "1.3.6.1" and print results. + // Walk SNMP OID "1.3.6.1" and print results. results, err := client.Walk("1.3.6.1") assert.NoError(t, err) @@ -42,6 +43,8 @@ func TestClient(t *testing.T) { for i, result := range results { t.Logf("%d: OID: %v, Data: %v", i, result.Oid, result.Data) } + // Assert result set size. + assert.Equal(t, 709, len(results)) } // getExpectedConfigShaAes gets an expected valid device configuration. @@ -300,3 +303,44 @@ func TestDeviceConfigSerialization(t *testing.T) { // Compare. config is the expected (original), deserialized is actual. verifyConfig(t, config, deserialized) } + +// TestClientTrippliteUps is the initial positive test against the emulator. +// Uses SNMPv3 with MD5/DES. +func TestClientTrippliteUps(t *testing.T) { + // Create SecurityParameters for the config that should connect to the emulator. + securityParameters, err := NewSecurityParameters( + "simulator", // User Name + MD5, // Authentication Protocol + "auctoritas", // Authentication Passphrase + DES, // Privacy Protocol + "privatus", // Privacy Passphrase + ) + assert.NoError(t, err) + + // Create a config. + config, err := NewDeviceConfig( + "v3", // SNMP v3 + "127.0.0.1", // Endpoint + 1025, // Port + securityParameters, + "public", // Context name + []string{}, // tags (none) + ) + assert.NoError(t, err) + + // Create a client. + client, err := NewSnmpClient(config) + assert.NoError(t, err) + + // Walk SNMP OID "1.3.6.1" and print results. + results, err := client.Walk("1.3.6.1") + assert.NoError(t, err) + + // Log output. + for i, result := range results { + t.Logf("%d: OID: %v, Data: %v", i, result.Oid, result.Data) + } + // Assert result set size. + // This will be different from the PxgmsUps because the data are different. + assert.Equal(t, 347, len(results)) +} diff --git a/pkg/snmp/mibs/ups_mib/ups_input_table.go b/pkg/snmp/mibs/ups_mib/ups_input_table.go index 453f719..1456108 100644 --- a/pkg/snmp/mibs/ups_mib/ups_input_table.go +++ b/pkg/snmp/mibs/ups_mib/ups_input_table.go @@ -75,7 +75,7 @@ func (enumerator UpsInputTableDeviceEnumerator) DeviceEnumerator( // We will have "frequency", "voltage", "current", and "power" device kinds. // There is probably a better way of doing this, but this just gets things to // where they need to be for now. - // TODO: Shim in the tags here. + // Shimmed in the synse scan tags here. frequencyProto := &config.DeviceProto{ Type: "frequency", Context: map[string]string{ diff --git a/pkg/snmp/servers/tripplite_ups_test.go b/pkg/snmp/servers/tripplite_ups_test.go index 4eb855f..17771bb 100644 --- a/pkg/snmp/servers/tripplite_ups_test.go +++ b/pkg/snmp/servers/tripplite_ups_test.go @@ -9,6 +9,7 @@ import ( ) // TestTrippliteUps is the first TrippliteUps test. +// This UPS only supports MD5/DES and not SHA/AES. This test verfies that MD5/DES works. func TestTrippliteUps(t *testing.T) { t.Log("TestTrippliteUps start") t.Logf("t: %+v", t) @@ -17,10 +18,10 @@ func TestTrippliteUps(t *testing.T) { data["contextName"] = "public" data["endpoint"] = "127.0.0.1" data["userName"] = "simulator" - data["privacyProtocol"] = "AES" + data["privacyProtocol"] = "DES" data["privacyPassphrase"] = "privatus" - data["port"] = 1024 - data["authenticationProtocol"] = "SHA" + data["port"] = 1025 + data["authenticationProtocol"] = "MD5" data["authenticationPassphrase"] = "auctoritas" data["model"] = "SU10000RT3UPM" data["version"] = "v3" @@ -40,12 +41,12 @@ func TestTrippliteUps(t *testing.T) { thirtySeconds, _ := time.ParseDuration("30s") assert.Equal(t, clientDeviceConfig.Timeout, thirtySeconds) assert.NotNil(t, clientDeviceConfig.SecurityParameters) - assert.Equal(t, clientDeviceConfig.SecurityParameters.AuthenticationProtocol, core.AuthenticationProtocol(3)) - assert.Equal(t, clientDeviceConfig.SecurityParameters.PrivacyProtocol, core.PrivacyProtocol(3)) + assert.Equal(t, clientDeviceConfig.SecurityParameters.AuthenticationProtocol, core.AuthenticationProtocol(2)) + assert.Equal(t, clientDeviceConfig.SecurityParameters.PrivacyProtocol, core.PrivacyProtocol(2)) assert.Equal(t, clientDeviceConfig.SecurityParameters.UserName, "simulator") assert.Equal(t, clientDeviceConfig.SecurityParameters.AuthenticationPassphrase, "auctoritas") assert.Equal(t, clientDeviceConfig.SecurityParameters.PrivacyPassphrase, "privatus") - assert.Equal(t, clientDeviceConfig.Port, uint16(1024)) + assert.Equal(t, clientDeviceConfig.Port, uint16(1025)) assert.NotNil(t, trippliteUps.SnmpServer.SnmpServerBase.DeviceConfig) serverDeviceConfig := trippliteUps.SnmpServer.SnmpServerBase.SnmpClient.DeviceConfig @@ -54,16 +55,12 @@ func TestTrippliteUps(t *testing.T) { assert.Equal(t, serverDeviceConfig.ContextName, "public") assert.Equal(t, serverDeviceConfig.Timeout, thirtySeconds) assert.NotNil(t, serverDeviceConfig.SecurityParameters) - assert.Equal(t, serverDeviceConfig.SecurityParameters.AuthenticationProtocol, core.AuthenticationProtocol(3)) - assert.Equal(t, serverDeviceConfig.SecurityParameters.PrivacyProtocol, core.PrivacyProtocol(3)) + assert.Equal(t, serverDeviceConfig.SecurityParameters.AuthenticationProtocol, core.AuthenticationProtocol(2)) + assert.Equal(t, serverDeviceConfig.SecurityParameters.PrivacyProtocol, core.PrivacyProtocol(2)) assert.Equal(t, serverDeviceConfig.SecurityParameters.UserName, "simulator") assert.Equal(t, serverDeviceConfig.SecurityParameters.AuthenticationPassphrase, "auctoritas") assert.Equal(t, serverDeviceConfig.SecurityParameters.PrivacyPassphrase, "privatus") - assert.Equal(t, serverDeviceConfig.Port, uint16(1024)) - - // The verification here is done with emulator data from a different type of UPS. - // In the future we can use data from other UPSes and get different results, - // that just hasn't happened yet. + assert.Equal(t, serverDeviceConfig.Port, uint16(1025)) // Verify device handlers by type. deviceHandlersByType := map[string]int{} @@ -101,7 +98,7 @@ func TestTrippliteUpsInitializationFailure(t *testing.T) { data["contextName"] = "public" data["endpoint"] = "127.0.0.1" data["userName"] = "simulator" - data["privacyProtocol"] = "AES" + data["privacyProtocol"] = "DES" data["privacyPassphrase"] = "incorrect_password" data["port"] = 1024 data["authenticationProtocol"] = "SHA"