Skip to content
This repository has been archived by the owner on Dec 13, 2022. It is now read-only.

Commit

Permalink
feat(api): manage acknowledgements (#7907)
Browse files Browse the repository at this point in the history
New API to allow the sending of host and service acknowledgements
  • Loading branch information
callapa authored Oct 9, 2019
1 parent b7bd612 commit 892d308
Show file tree
Hide file tree
Showing 44 changed files with 4,121 additions and 1,262 deletions.
31 changes: 23 additions & 8 deletions config/Modules/Centreon.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,21 +45,36 @@ services:
Centreon\Domain\Security\Interfaces\AuthenticationServiceInterface:
class: Centreon\Domain\Security\AuthenticationService

Centreon\Domain\Monitoring\Interfaces\MonitoringServiceInterface:
class: Centreon\Domain\Monitoring\MonitoringService

Centreon\Domain\Security\Interfaces\AccessGroupRepositoryInterface:
class: Centreon\Infrastructure\Security\AccessGroupRepositoryRDB

Centreon\Domain\RequestParameters\Interfaces\RequestParametersInterface:
class: Centreon\Domain\RequestParameters\RequestParameters

Centreon\Domain\Monitoring\Interfaces\MonitoringRepositoryInterface:
alias: 'monitoring.repository'
# Real time monitoring
sqlRequestTranslator:
class: Centreon\Infrastructure\RequestParameters\SqlRequestParametersTranslator

monitoring.repository:
public: true
Centreon\Domain\Monitoring\Interfaces\MonitoringServiceInterface:
class: Centreon\Domain\Monitoring\MonitoringService

Centreon\Domain\Monitoring\Interfaces\MonitoringRepositoryInterface:
class: Centreon\Infrastructure\Monitoring\MonitoringRepositoryRDB
calls:
- method: setSqlRequestTranslator
arguments: ['@Centreon\Infrastructure\Repository\SqlRequestParametersTranslator']
arguments: ['@sqlRequestTranslator']

# Engine
Centreon\Domain\Engine\Interfaces\EngineRepositoryInterface:
class: Centreon\Infrastructure\Engine\EngineRepositoryFile
arguments: ['%centreon_var_lib%/centcore.cmd']

Centreon\Domain\Engine\Interfaces\EngineServiceInterface:
class: Centreon\Domain\Engine\EngineService

# API Acknowledgement
Centreon\Domain\Acknowledgement\Interfaces\AcknowledgementRepositoryInterface:
class: Centreon\Infrastructure\Acknowledgement\AcknowledgmentRepositoryRDB

Centreon\Domain\Acknowledgement\Interfaces\AcknowledgementServiceInterface:
class: Centreon\Domain\Acknowledgement\AcknowledgementService
49 changes: 49 additions & 0 deletions config/packages/validator/validation.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
Centreon\Domain\Acknowledgement\Acknowledgement:
properties:
authorId:
- Type:
type: integer
- NotNull: ~
comment:
- Type:
type: string
groups: [Default, add_host_ack, add_service_ack]
- NotNull:
groups: [Default, add_host_ack, add_service_ack]
entryTime:
- Type:
type: integer
hostId:
- Type:
type: integer
groups: [Default, add_host_ack, add_service_ack]
- NotNull:
groups: [Default, add_host_ack, add_service_ack]
pollerId:
- Type:
type: integer
- NotNull: ~
isNotifyContacts:
- Type:
type: boolean
groups: [Default, add_host_ack, add_service_ack]
- NotNull:
groups: [Default, add_host_ack, add_service_ack]
isPersistentComment:
- Type:
type: boolean
groups: [Default, add_host_ack, add_service_ack]
- NotNull:
groups: [Default, add_host_ack, add_service_ack]
isSticky:
- Type:
type: boolean
groups: [Default, add_host_ack, add_service_ack]
- NotNull:
groups: [Default, add_host_ack, add_service_ack]
serviceId:
- Type:
type: integer
groups: [Default, add_service_ack]
- NotNull:
groups: [add_service_ack]
6 changes: 4 additions & 2 deletions config/services.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ parameters:
database_dbstg: "%env(dbcstg)%"
database_user: "%env(user)%"
database_password: "%env(password)%"
centreon_var_lib: "%env(_CENTREON_VARLIB_)%"
validation_path: "%env(_CENTREON_PATH_)%config/packages/validator/validation.yaml"

services:
# Default configuration for services in *this* file
Expand All @@ -36,7 +38,7 @@ services:

Centreon\Domain\Entity\EntityValidator:
class: Centreon\Domain\Entity\EntityValidator
arguments: ["%env(_CENTREON_PATH_)%config/packages/validator/validation.yaml"]
arguments: ['%validation_path%']

imports:
resource: './Modules/*.yaml'
resource: './Modules/*.yaml'
81 changes: 65 additions & 16 deletions doc/API/centreon-api-v2.html

Large diffs are not rendered by default.

Loading

0 comments on commit 892d308

Please sign in to comment.