Skip to content

Commit

Permalink
Merge pull request #2 from zabbix/release/1.0.1
Browse files Browse the repository at this point in the history
Release v1.0.1
  • Loading branch information
aiantsen authored Nov 27, 2023
2 parents 90dca47 + df7e0a2 commit e171482
Show file tree
Hide file tree
Showing 12 changed files with 38 additions and 28 deletions.
2 changes: 1 addition & 1 deletion .github/scripts/additional_api_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ def test_user_get(self):
users = None
if self.api:
users = self.api.user.get(
output=['userid', 'alias']
output=['userid', 'name']
)
self.assertEqual(type(users), list, "Request user.get was going wrong")

Expand Down
2 changes: 1 addition & 1 deletion .github/scripts/compatibility_api_test_5.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def test_classic_auth(self):
type(resp), dict, "Request user.checkAuthentication was going wrong")

users = self.zapi.user.get(
output=['userid', 'alias']
output=['userid', 'name']
)
self.assertEqual(type(users), list, "Request user.get was going wrong")

Expand Down
2 changes: 1 addition & 1 deletion .github/scripts/compatibility_api_test_latest.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ def test_token_auth(self):
type(resp), dict, "Request user.checkAuthentication was going wrong")

users = self.zapi.user.get(
output=['userid', 'alias']
output=['userid', 'name']
)
self.assertEqual(type(users), list, "Request user.get was going wrong")

Expand Down
2 changes: 1 addition & 1 deletion .github/scripts/integration_api_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ def test_user_get(self):
users = None
if self.zapi:
users = self.zapi.user.get(
output=['userid', 'alias']
output=['userid', 'name']
)
self.assertEqual(type(users), list, "Request user.getter was going wrong")

Expand Down
10 changes: 9 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
## [1.0.0](https://github.com/zabbix/python-zabbix-utils/tree/tag/v1.0.0) (2023-11-17)
## [1.0.1](https://github.com/zabbix/python-zabbix-utils/compare/v1.0.0...v1.0.1) (2023-11-27)

### Bug fixes:

- removed deprecated API fields from examples and README.
- removed "Get started" section from README for PyPI.
- fixed small flaws.

## [1.0.0](https://github.com/zabbix/python-zabbix-utils/tree/v1.0.0) (2023-11-17)

Initial release
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,11 @@ api = ZabbixAPI(url="127.0.0.1")
api.login(user="User", password="zabbix")

users = api.user.get(
output=['userid', 'alias']
output=['userid','name']
)

for user in users:
print(user['alias'])
print(user['name'])

api.logout()
```
Expand All @@ -71,11 +71,11 @@ api = ZabbixAPI(url="127.0.0.1")
api.login(token="xxxxxxxx")

users = api.user.get(
output=['userid', 'alias']
output=['userid','name']
)

for user in users:
print(user['alias'])
print(user['name'])

api.logout()
```
Expand Down
8 changes: 4 additions & 4 deletions examples/api/auth_by_token.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@
# Create an instance of the ZabbixAPI class with the specified authentication details
api = ZabbixAPI(**ZABBIX_AUTH)

# Retrieve a list of users, including their user ID and alias
# Retrieve a list of users, including their user ID and name
users = api.user.get(
output=['userid', 'alias']
output=['userid', 'name']
)

# Print the aliases of the retrieved users
# Print the names of the retrieved users
for user in users:
print(user['alias'])
print(user['name'])
8 changes: 4 additions & 4 deletions examples/api/disabling_validate_certs.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@
# Note: Ignoring SSL certificate validation may expose the connection to security risks.
api = ZabbixAPI(**ZABBIX_AUTH)

# Retrieve a list of users from the Zabbix server, including their user ID and alias
# Retrieve a list of users from the Zabbix server, including their user ID and name
users = api.user.get(
output=['userid', 'alias']
output=['userid', 'name']
)

# Print the aliases of the retrieved users
# Print the names of the retrieved users
for user in users:
print(user['alias'])
print(user['name'])

# Logout to release the Zabbix API session
api.logout()
8 changes: 4 additions & 4 deletions examples/api/token_auth_if_supported.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,14 @@
# If Zabbix API version is older than 5.4, use traditional username and password authentication
api.login(user=ZABBIX_USER, password=ZABBIX_PASSWORD)

# Retrieve a list of users from the Zabbix server, including their user ID and alias
# Retrieve a list of users from the Zabbix server, including their user ID and name
users = api.user.get(
output=['userid', 'alias']
output=['userid', 'name']
)

# Print the aliases of the retrieved users
# Print the names of the retrieved users
for user in users:
print(user['alias'])
print(user['name'])

# Logout to release the Zabbix API session
api.logout()
8 changes: 4 additions & 4 deletions examples/api/using_http_auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,14 @@
# Login to the Zabbix API using provided user credentials
api.login(user="Admin", password="zabbix")

# Retrieve a list of users from the Zabbix server, including their user ID and alias
# Retrieve a list of users from the Zabbix server, including their user ID and name
users = api.user.get(
output=['userid', 'alias']
output=['userid', 'name']
)

# Print the aliases of the retrieved users
# Print the names of the retrieved users
for user in users:
print(user['alias'])
print(user['name'])

# Logout to release the Zabbix API session
api.logout()
6 changes: 4 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
import re
import setuptools
from zabbix_utils.version import __version__

with open("README.md", "r", encoding="utf-8") as fh:
long_description = fh.read()
regexp = r'(?<=##)\s*Get started\n*(^\*.*\n){1,10}\n*##'
long_description = re.sub(regexp, '', fh.read(), flags=re.M)

setuptools.setup(
name="zabbix_utils",
Expand All @@ -28,7 +30,7 @@
'Bug Tracker': 'https://github.com/zabbix/python-zabbix-utils/issues'
},
classifiers=[
"Development Status :: 4 - Beta",
"Development Status :: 5 - Production/Stable",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"License :: OSI Approved :: MIT License",
Expand Down
2 changes: 1 addition & 1 deletion zabbix_utils/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
# OTHER DEALINGS IN THE SOFTWARE.

__version__ = "1.0.0"
__version__ = "1.0.1"

__min_supported__ = 5.0
__max_supported__ = 7.0

0 comments on commit e171482

Please sign in to comment.