Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ajust a create_host.yaml and create_host.py #59

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
# Change Log
## 1.0.2

- change create_host.py host as a string
## 1.0.1

- change create_host.yaml host as a string

## 1.0.0

Expand Down
4 changes: 2 additions & 2 deletions actions/create_host.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ def get_interface_config_with_domain(self, domains, main_if):
return [self.get_interface_config(domain=x, is_main=(x == main_if)) for x in domains]

def get_interface_config_with_ipaddr(self, ipaddrs, main_if):
return [self.get_interface_config(ipaddr=x, is_main=(x == main_if)) for x in ipaddrs]
return [self.get_interface_config(ipaddrs)]

def set_proxy_for_host(self, proxy_name, new_hosts):
for proxy in self.client.proxy.get(filter={'host': proxy_name}):
Expand All @@ -28,7 +28,7 @@ def set_proxy_for_host(self, proxy_name, new_hosts):
'hosts': current_hosts + new_hosts,
})

def run(self, name, groups, ipaddrs=[], domains=[], proxy_host=None, token=None, main_if=''):
def run(self, name, groups, ipaddrs, domains=[], proxy_host=None, token=None, main_if=''):
# Initialize client object to connect Zabbix server
if token:
self.client = ZabbixAPI(url=self.config['zabbix']['url'])
Expand Down
3 changes: 1 addition & 2 deletions actions/create_host.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,8 @@ parameters:
description: HostGroups to be registered to creating host
required: True
ipaddrs:
type: array
type: string
description: IP addresses of the host in which ZabbixAgent is installed
default: []
domains:
type: array
description: Domain names of the host in which ZabbixAgent is installed
Expand Down
2 changes: 1 addition & 1 deletion pack.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ description: Zabbix Monitoring System
keywords:
- zabbix
- monitoring
version: 1.0.0
version: 1.0.2
author: Hiroyasu OHYAMA
email: [email protected]
python_versions:
Expand Down
Loading