Skip to content

Commit

Permalink
Merge pull request #866 from Phil-Friderici/housekeeping
Browse files Browse the repository at this point in the history
add documentation to satisfy linting
  • Loading branch information
evgeni authored Oct 5, 2023
2 parents c3898be + 9d00e8c commit 39bedae
Show file tree
Hide file tree
Showing 16 changed files with 56 additions and 35 deletions.
48 changes: 23 additions & 25 deletions REFERENCE.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,18 +40,18 @@

### Resource types

* [`zabbix_application`](#zabbix_application): %q(Manage zabbix applications zabbix_application{"app1": ensure => present, template => 'template1', } It Raise excep
* [`zabbix_host`](#zabbix_host): FQDN of the machine.
* [`zabbix_application`](#zabbix_application): Manage zabbix applications Example: zabbix_application{"app1": ensure => present, template => 'template1', } It Raise exceptio
* [`zabbix_host`](#zabbix_host): Manage zabbix hosts
* [`zabbix_hostgroup`](#zabbix_hostgroup): Manage zabbix hostgroups
* [`zabbix_proxy`](#zabbix_proxy): FQDN of the proxy.
* [`zabbix_template`](#zabbix_template): The name of template.
* [`zabbix_template_host`](#zabbix_template_host): Link or Unlink template to host. Only for Zabbix < 6.0! Example. Name should be in the format of "template_name@hostname" zabbix_template_ho
* [`zabbix_userparameters`](#zabbix_userparameters): An unique name for this define.
* [`zabbix_proxy`](#zabbix_proxy): Manage zabbix proxies
* [`zabbix_template`](#zabbix_template): Manage zabbix templates
* [`zabbix_template_host`](#zabbix_template_host): Link or Unlink template to host. Only for Zabbix < 6.0! Example: zabbix_template_host{ 'mysql_template@db1': ensure => present, } Na
* [`zabbix_userparameters`](#zabbix_userparameters): Manage zabbix user templates

### Data types

* [`Zabbix::Databases`](#Zabbix--Databases): Type for supported databases by the zabbix module
* [`Zabbix::Historyics`](#Zabbix--Historyics)
* [`Zabbix::Historyics`](#Zabbix--Historyics): Type for size values in bytes (also allows k/K and m/M as appendix)

## Classes

Expand Down Expand Up @@ -5927,17 +5927,15 @@ Default value: `'0644'`

### <a name="zabbix_application"></a>`zabbix_application`

%q(Manage zabbix applications

zabbix_application{"app1":
ensure => present,
template => 'template1',
}
Manage zabbix applications

Example:
zabbix_application{"app1":
ensure => present,
template => 'template1',
}
It Raise exception on deleting an application which is a part of used template.

)

#### Properties

The following properties are available in the `zabbix_application` type.
Expand Down Expand Up @@ -5975,7 +5973,7 @@ template to which the application is linked

### <a name="zabbix_host"></a>`zabbix_host`

FQDN of the machine.
Manage zabbix hosts

#### Properties

Expand Down Expand Up @@ -6114,7 +6112,7 @@ usually discover the appropriate provider for your platform.

### <a name="zabbix_proxy"></a>`zabbix_proxy`

FQDN of the proxy.
Manage zabbix proxies

#### Properties

Expand Down Expand Up @@ -6172,7 +6170,7 @@ usually discover the appropriate provider for your platform.

### <a name="zabbix_template"></a>`zabbix_template`

The name of template.
Manage zabbix templates

#### Properties

Expand Down Expand Up @@ -6250,12 +6248,12 @@ Zabbix version that the template will be installed on.
### <a name="zabbix_template_host"></a>`zabbix_template_host`

Link or Unlink template to host. Only for Zabbix < 6.0!
Example.
Name should be in the format of "template_name@hostname"

zabbix_template_host{ 'mysql_template@db1':
ensure => present,
}
Example:
zabbix_template_host{ 'mysql_template@db1':
ensure => present,
}
Name should be in the format of "template_name@hostname"

#### Properties

Expand Down Expand Up @@ -6291,7 +6289,7 @@ will usually discover the appropriate provider for your platform.

### <a name="zabbix_userparameters"></a>`zabbix_userparameters`

An unique name for this define.
Manage zabbix user templates

#### Properties

Expand Down Expand Up @@ -6343,7 +6341,7 @@ Alias of `Enum['postgresql', 'mysql', 'sqlite']`

### <a name="Zabbix--Historyics"></a>`Zabbix::Historyics`

The Zabbix::Historyics data type.
Type for size values in bytes (also allows k/K and m/M as appendix)

Alias of `Optional[Pattern[/^\d+[k|K|m|M]?$/]]`

1 change: 1 addition & 0 deletions lib/puppet/provider/zabbix_application/ruby.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

require_relative '../zabbix'
Puppet::Type.type(:zabbix_application).provide(:ruby, parent: Puppet::Provider::Zabbix) do
desc 'Puppet provider for Zabbix application using the Zabbix API.2'
confine feature: :zabbixapi

def template_id
Expand Down
1 change: 1 addition & 0 deletions lib/puppet/provider/zabbix_host/ruby.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

require_relative '../zabbix'
Puppet::Type.type(:zabbix_host).provide(:ruby, parent: Puppet::Provider::Zabbix) do
desc 'Puppet provider for managing Zabbix hosts. It uses the Zabbix API to create, read, update and delete hosts.'
confine feature: :zabbixapi

def self.instances
Expand Down
1 change: 1 addition & 0 deletions lib/puppet/provider/zabbix_hostgroup/ruby.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

require_relative '../zabbix'
Puppet::Type.type(:zabbix_hostgroup).provide(:ruby, parent: Puppet::Provider::Zabbix) do
desc 'Puppet provider for managing Zabbix hostgroups. It defines methods to create, check if exists, and destroy Zabbix hostgroups using the Zabbix API.'
confine feature: :zabbixapi

def self.instances
Expand Down
1 change: 1 addition & 0 deletions lib/puppet/provider/zabbix_proxy/ruby.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

require_relative '../zabbix'
Puppet::Type.type(:zabbix_proxy).provide(:ruby, parent: Puppet::Provider::Zabbix) do
desc 'Puppet provider for managing Zabbix proxies. It uses the Zabbix API to create, read, update and delete hosts, as well as changing them between active and passive modes.'
confine feature: :zabbixapi

def initialize(value = {})
Expand Down
1 change: 1 addition & 0 deletions lib/puppet/provider/zabbix_template/ruby.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

require_relative '../zabbix'
Puppet::Type.type(:zabbix_template).provide(:ruby, parent: Puppet::Provider::Zabbix) do
desc 'Puppet provider that manages Zabbix templates by importing and exporting them in XML format, and creating, updating, or deleting various Zabbix configuration objects. It includes conditional logic based on the Zabbix version being used.'
confine feature: :zabbixapi

def create
Expand Down
1 change: 1 addition & 0 deletions lib/puppet/provider/zabbix_template_host/ruby.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

require_relative '../zabbix'
Puppet::Type.type(:zabbix_template_host).provide(:ruby, parent: Puppet::Provider::Zabbix) do
desc 'Puppet provider that manages the association between Zabbix templates and hosts. It allows creating, checking the existence of, and deleting the association between a Zabbix template and a host, using the Zabbix API.'
confine feature: :zabbixapi
def template_name
@template_name ||= @resource[:name].split('@')[0]
Expand Down
1 change: 1 addition & 0 deletions lib/puppet/provider/zabbix_userparameters/ruby.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

require_relative '../zabbix'
Puppet::Type.type(:zabbix_userparameters).provide(:ruby, parent: Puppet::Provider::Zabbix) do
desc 'Puppet provider that manages Zabbix user parameters. It allows users to define custom monitoring parameters in Zabbix, and provides methods for creating and checking the existence of a user parameter. It also has a placeholder method for destroying the user parameter.'
confine feature: :zabbixapi

def create
Expand Down
11 changes: 6 additions & 5 deletions lib/puppet/type/zabbix_application.rb
Original file line number Diff line number Diff line change
@@ -1,18 +1,19 @@
# frozen_string_literal: true

Puppet::Type.newtype(:zabbix_application) do
@doc = %q(Manage zabbix applications
@doc = <<-DOC
Manage zabbix applications
Example:
zabbix_application{"app1":
ensure => present,
template => 'template1',
}
It Raise exception on deleting an application which is a part of used template.
)
It Raise exception on deleting an application which is a part of used template.
DOC

ensurable do
desc 'The basic property that the resource should be in.'
defaultvalues
defaultto :present
end
Expand Down
3 changes: 3 additions & 0 deletions lib/puppet/type/zabbix_host.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
# frozen_string_literal: true

Puppet::Type.newtype(:zabbix_host) do
@doc = 'Manage zabbix hosts'

ensurable do
desc 'The basic property that the resource should be in.'
defaultvalues
defaultto :present
end
Expand Down
1 change: 1 addition & 0 deletions lib/puppet/type/zabbix_hostgroup.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
@doc = 'Manage zabbix hostgroups'

ensurable do
desc 'The basic property that the resource should be in.'
defaultvalues
defaultto :present
end
Expand Down
3 changes: 3 additions & 0 deletions lib/puppet/type/zabbix_proxy.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
# frozen_string_literal: true

Puppet::Type.newtype(:zabbix_proxy) do
@doc = 'Manage zabbix proxies'

ensurable do
desc 'The basic property that the resource should be in.'
defaultvalues
defaultto :present
end
Expand Down
3 changes: 3 additions & 0 deletions lib/puppet/type/zabbix_template.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
# frozen_string_literal: true

Puppet::Type.newtype(:zabbix_template) do
@doc = 'Manage zabbix templates'

ensurable do
desc 'The basic property that the resource should be in.'
defaultvalues
defaultto :present

Expand Down
11 changes: 6 additions & 5 deletions lib/puppet/type/zabbix_template_host.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,16 @@
Puppet::Type.newtype(:zabbix_template_host) do
@doc = <<-DOC
Link or Unlink template to host. Only for Zabbix < 6.0!
Example.
Name should be in the format of "template_name@hostname"
zabbix_template_host{ 'mysql_template@db1':
ensure => present,
}
Example:
zabbix_template_host{ 'mysql_template@db1':
ensure => present,
}
Name should be in the format of "template_name@hostname"
DOC

ensurable do
desc 'The basic property that the resource should be in.'
defaultvalues
defaultto :present
end
Expand Down
3 changes: 3 additions & 0 deletions lib/puppet/type/zabbix_userparameters.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@

$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', '..'))
Puppet::Type.newtype(:zabbix_userparameters) do
@doc = 'Manage zabbix user templates'

ensurable do
desc 'The basic property that the resource should be in.'
defaultvalues
defaultto :present
end
Expand Down
1 change: 1 addition & 0 deletions types/historyics.pp
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
# @summary Type for size values in bytes (also allows k/K and m/M as appendix)
type Zabbix::Historyics = Optional[Pattern[/^\d+[k|K|m|M]?$/]]

0 comments on commit 39bedae

Please sign in to comment.