def _get_snmpv3(self, oid):
        """
        Try to send an SNMP GET operation using SNMPv3 for the specified OID.

        Parameters
        ----------
        oid : str
            The SNMP OID that you want to get.

        Returns
        -------
        string : str
            The string as part of the value from the OID you are trying to retrieve.
        """
        snmp_target = (self.hostname, self.snmp_port)
        cmd_gen = cmdgen.CommandGenerator()

        (error_detected, error_status, error_index, snmp_data) = cmd_gen.getCmd(
            cmdgen.UsmUserData(
                self.user,
                self.auth_key,
                self.encrypt_key,
                authProtocol=self.auth_proto,
                privProtocol=self.encryp_proto,
            ),
            cmdgen.UdpTransportTarget(snmp_target, timeout=1.5, retries=2),
            oid,
            lookupNames=True,
            lookupValues=True,
        )

        if not error_detected and snmp_data[0][1]:
            return text_type(snmp_data[0][1])
        return ""
def _get_snmpv3 ( self , oid ) : snmp_target = ( self . hostname , self . snmp_port ) cmd_gen = cmdgen . CommandGenerator ( ) ( error_detected , error_status , error_index , snmp_data ) = cmd_gen . getCmd ( cmdgen . UsmUserData ( self . user , self . auth_key , self . encrypt_key , authProtocol = self . auth_proto , privProtocol = self . encryp_proto , ) , cmdgen . UdpTransportTarget ( snmp_target , timeout = 1.5 , retries = 2 ) , oid , lookupNames = True , lookupValues = True , ) if not error_detected and snmp_data [ 0 ] [ 1 ] : return text_type ( snmp_data [ 0 ] [ 1 ] ) return ""
Try to send an SNMP GET operation using SNMPv3 for the specified OID.

        Parameters
        ----------
        oid : str
            The SNMP OID that you want to get.

        Returns
        -------
        string : str
            The string as part of the value from the OID you are trying to retrieve.