Skip to content

Commit

Permalink
Merge pull request #106 from v-zhuravlev/case_sensitive_user
Browse files Browse the repository at this point in the history
renamed user 'admin'  in docs and tests
  • Loading branch information
adubkov authored Feb 18, 2019
2 parents 5f3ea7f + 3119560 commit a26aadc
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ ZabbixAPI
from pyzabbix.api import ZabbixAPI
# Create ZabbixAPI class instance
zapi = ZabbixAPI(url='https://localhost/zabbix/', user='admin', password='zabbix')
zapi = ZabbixAPI(url='https://localhost/zabbix/', user='Admin', password='zabbix')
# Get all monitored hosts
result1 = zapi.host.get(monitored_hosts=1, output='extend')
Expand All @@ -52,7 +52,7 @@ Or use 'with' statement to logout automatically:
from pyzabbix.api import ZabbixAPI
# Create ZabbixAPI class instance
with ZabbixAPI(url='https://localhost/zabbix/', user='admin', password='zabbix') as zapi:
with ZabbixAPI(url='https://localhost/zabbix/', user='Admin', password='zabbix') as zapi:
# Get all monitored hosts
result1 = zapi.host.get(monitored_hosts=1, output='extend')
Expand Down
2 changes: 1 addition & 1 deletion docs/source/quickstart_guide.rst
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ Get list of not monitored hosts from zabbix
from pyzabbix import ZabbixAPI

# Create ZabbixAPI class instance
zapi = ZabbixAPI(url='https://localhost/zabbix/', user='admin', password='zabbix')
zapi = ZabbixAPI(url='https://localhost/zabbix/', user='Admin', password='zabbix')

# Get all disabled hosts
result1 = zapi.host.get(status=1)
Expand Down
2 changes: 1 addition & 1 deletion pyzabbix/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ class ZabbixAPI(object):
`user.login`.
:type user: str
:param user: Zabbix user name. Default: `ZABBIX_USER` or `admin`.
:param user: Zabbix user name. Default: `ZABBIX_USER` or `'Admin'`.
:type password: str
:param password: Zabbix user password. Default `ZABBIX_PASSWORD` or
Expand Down
2 changes: 1 addition & 1 deletion tests/test_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ def test_api_version(self):
self.assertEqual(res, '2.2.5')

def test_login(self):
req = {'user': 'admin', 'password': 'zabbix'}
req = {'user': 'Admin', 'password': 'zabbix'}
ret = {
'jsonrpc': '2.0',
'result': '0424bd59b807674191e7d77572075f33',
Expand Down

0 comments on commit a26aadc

Please sign in to comment.