Skip to content

Commit

Permalink
Merge branch 'develop' into MON-81801
Browse files Browse the repository at this point in the history
  • Loading branch information
Noha-ElAbrouki committed May 27, 2024
2 parents ed61e27 + bcc80dc commit 65c86bf
Show file tree
Hide file tree
Showing 91 changed files with 3,114 additions and 1,024 deletions.
389 changes: 264 additions & 125 deletions centreon-gorgone/gorgone/modules/centreon/mbi/libs/centreon/Host.pm

Large diffs are not rendered by default.

13 changes: 0 additions & 13 deletions centreon/config/routes/Centreon/monitoring/category.yaml

This file was deleted.

2 changes: 1 addition & 1 deletion centreon/config/services.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ parameters:
validation_path: "%env(_CENTREON_PATH_)%config/packages/validator"
centreon_path: "%env(_CENTREON_PATH_)%"
centreon_etc_path: "%env(_CENTREON_ETC_)%"
vault_conf_path: "%env(_CENTREON_PATH_)%config/vault/vault.yaml"
vault_conf_path: "%centreon_var_lib%/vault/vault.yaml"
centreon_install_path: "%centreon_path%/www/install"
translation_path: "%centreon_path%/www/locale"
log_path: "%env(_CENTREON_LOG_)%"
Expand Down
21 changes: 21 additions & 0 deletions centreon/doc/API/centreon-api.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ info:
+
# Updated features
+ Added host_category filter to /monitoring/hostgroups endpoint
+ Added new filters for the /monitoring/hosts/categories endpoint
+ Added new filters for the /monitoring/services/categories endpoint
+
# Information
All dates are in **ISO 8601** format
Expand Down Expand Up @@ -483,6 +485,18 @@ paths:
summary: "List all real-time service categories"
description: |
List of all service categories in real-time context
The available parameters to **search** / **sort_by** are:
* id
* name
* host.id
* host.name
* host_group.id
* host_group.name
* host_category.id
* host_category.name
* service_group.id
* service_group.name
responses:
"200":
description: "OK"
Expand Down Expand Up @@ -2159,6 +2173,13 @@ paths:
summary: "List all real-time host categories"
description: |
List of all host categories in real-time context
The available parameters to **search** / **sort_by** are:
* id
* name
* host_group.id
* host_group.name
responses:
"200":
description: "OK"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,6 @@ properties:
description: "Host template alias"
example: "generic-active-host"
nullable: true
snmp_community:
type: string
nullable: true
description: "Community of the SNMP agent"
snmp_version:
type: string
nullable: true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ get:
result:
type: array
items:
$ref: 'Schema/HostTemplate.yaml'
$ref: 'Schema/FindHostTemplateResponse.yaml'
meta:
$ref: '../../Common/Schema/Meta.yaml'
'403':
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,6 @@ properties:
type: string
description: "Host template alias"
example: "generic-active-host"
snmp_community:
type: string
nullable: true
description: "Community of the SNMP agent"
snmp_version:
type: string
nullable: true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,6 @@ properties:
type: string
description: "Host template alias"
example: "generic-active-host"
snmp_community:
type: string
nullable: true
description: "Community of the SNMP agent"
snmp_version:
type: string
nullable: true
Expand Down
15 changes: 8 additions & 7 deletions centreon/packaging/centreon-web.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -260,13 +260,6 @@ contents:
file_info:
mode: 0664

- dst: "/usr/share/centreon/config/vault"
type: dir
file_info:
owner: "centreon"
group: "centreon"
mode: 0775

- src: "../cron"
dst: "/usr/share/centreon/cron"
file_info:
Expand Down Expand Up @@ -340,6 +333,14 @@ contents:
owner: "centreon-broker"
group: "centreon-broker"


- dst: "/var/lib/centreon/vault"
type: dir
file_info:
owner: "centreon"
group: "centreon"
mode: 0775

- dst: "/var/lib/centreon/installs"
type: dir
file_info:
Expand Down

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,22 @@

declare(strict_types=1);

namespace Core\Category\RealTime\Application\UseCase\FindHostCategory;
namespace Core\Common\Application\Repository;

use Core\Application\Common\UseCase\PresenterInterface;

interface FindHostCategoryPresenterInterface extends PresenterInterface
interface ReadVaultRepositoryInterface
{
public function isVaultConfigured(): bool;

public function setCustomPath(string $customPath): void;

/**
* Get vaul content given path.
*
* @param string $path
*
* @throws \Throwable
*
* @return array<string,string>
*/
public function findFromPath(string $path): array;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
<?php

/*
* Copyright 2005 - 2023 Centreon (https://www.centreon.com/)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* For more information : contact@centreon.com
*
*/

declare(strict_types=1);

namespace Core\Common\Application\Repository;

interface WriteVaultRepositoryInterface
{
public function isVaultConfigured(): bool;

public function setCustomPath(string $customPath): void;

/**
* Update or save secrets and return vault path.
*
* @param string|null $uuid
* @param array<string, int|string> $inserts
* @param array<string, int|string> $deletes
*
* @throws \Throwable
*
* @return string
*/
public function upsert(?string $uuid = null, array $inserts = [], array $deletes = []): string;

/**
* Delete secrets.
*
* @param string $uuid
*
* @throws \Throwable
*/
public function delete(string $uuid): void;
}
Loading

0 comments on commit 65c86bf

Please sign in to comment.