Skip to content

Commit

Permalink
osfv_cli/zabbix: import zabbix.yml from home dir
Browse files Browse the repository at this point in the history
Signed-off-by: Maciej Pijanowski <maciej.pijanowski@3mdeb.com>
  • Loading branch information
macpijan committed Nov 7, 2023
1 parent 89846ad commit dc64def
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions osfv_cli/osfv_cli/zabbix.py
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
#!/usr/bin/env python3

import json
import os

import requests
import yaml


class Zabbix:
CONFIG_FILENAME = "zabbix.yaml"
ZABBIX_CONFIG_FILE_PATH = os.path.expanduser("~/.osfv/zabbix.yml")

def __init__(self):
with open(Zabbix.CONFIG_FILENAME, "r") as config_file:
with open(self.ZABBIX_CONFIG_FILE_PATH, "r") as config_file:
config = yaml.safe_load(config_file)
self.api_url = config["api_url"]
self.api_username = config["username"]
Expand Down
File renamed without changes.

0 comments on commit dc64def

Please sign in to comment.