from .....Internal.Core import Core
from .....Internal.CommandsGroup import CommandsGroup
from .....Internal import Conversions
from .....Internal.Utilities import trim_str_response
# noinspection PyPep8Naming,PyAttributeOutsideInit,SpellCheckingInspection
class SnmpCls:
"""
| Commands in total: 7
| Subgroups: 2
| Direct child commands: 1
"""
def __init__(self, core: Core, parent):
self._core = core
self._cmd_group = CommandsGroup("snmp", core, parent)
@property
def community(self):
"""
| Commands in total: 2
| Subgroups: 0
| Direct child commands: 2
"""
if not hasattr(self, '_community'):
from .Community import CommunityCls
self._community = CommunityCls(self._core, self._cmd_group)
return self._community
@property
def usm(self):
"""
| Commands in total: 4
| Subgroups: 1
| Direct child commands: 0
"""
if not hasattr(self, '_usm'):
from .Usm import UsmCls
self._usm = UsmCls(self._core, self._cmd_group)
return self._usm
[docs]
def get_location(self) -> str:
"""
``SYSTem:COMMunicate:SNMP:LOCation`` \n
Snippet: ``value: str = driver.system.communicate.snmp.get_location()`` \n
No help available
"""
response = self._core.io.query_str('SYSTem:COMMunicate:SNMP:LOCation?')
return trim_str_response(response)
[docs]
def set_location(self, location: str) -> None:
"""
``SYSTem:COMMunicate:SNMP:LOCation`` \n
Snippet: ``driver.system.communicate.snmp.set_location(location = 'abc')`` \n
No help available
"""
param = Conversions.value_to_quoted_str(location)
self._core.io.write(f'SYSTem:COMMunicate:SNMP:LOCation {param}')
def clone(self) -> 'SnmpCls':
"""
Clones the group by creating new object from it and its whole existing subgroups.
Also copies all the existing default Repeated Capabilities setting,
which you can change independently without affecting the original group.
"""
new_group = SnmpCls(self._core, self._cmd_group.parent)
self._cmd_group.synchronize_repcaps(new_group)
return new_group