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

C2 API - Add and List downtimes #5623

Closed
wants to merge 16 commits into from
Closed

C2 API - Add and List downtimes #5623

wants to merge 16 commits into from

Conversation

Guillaume28
Copy link
Contributor

@Guillaume28 Guillaume28 commented Sep 4, 2017

Now we have the capacity to add a realtime downtime with CLAPI commands for the hosts, services, hostgroups, servicegroups and instances.
In addition newman acceptance tests are included.

@Guillaume28 Guillaume28 changed the title C2 API - Liste des downtimes (ADEO)Rt downtime C2 API - Add and List downtimes Sep 4, 2017
@Guillaume28 Guillaume28 added this to the 2.8.13 milestone Sep 4, 2017
@Guillaume28 Guillaume28 self-assigned this Sep 4, 2017
@lpinsivy
Copy link
Contributor

lpinsivy commented Sep 6, 2017

@Guillaume28 dans tes fonction GetObjectByName or ByInstance, tu n'as pas de filtre pour sélectionner uniquement les ressources actives

@MatthieuMan
Copy link
Contributor

Comments format are not as expected

@lpinsivy lpinsivy modified the milestones: 2.8.14, 2.8.13 Sep 11, 2017
@kduret kduret self-requested a review September 20, 2017 08:10
Copy link
Contributor

@kduret kduret left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing clapi documentation

@@ -1,8 +1,3 @@
{
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do not remove these lines

@ganoze
Copy link
Contributor

ganoze commented Sep 20, 2017

@Guillaume28 also could you rebase against 2.8.x and resolve conflicts ?

"postman.setGlobalVariable(\"fixed\", \"1\");",
"",
"var date = new Date();",
"var datetime_start = date.getFullYear() + \"/\" + ('0' + (date.getMonth()+1)).slice(-2) + \"/\" + ('0' + date.getDate()).slice(-2) + \" \" + ('0' + dateEnd.getHours()).slice(-2) + \":\" + ",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

make a function.

],
"body": {
"mode": "raw",
"raw": "{\n \"action\": \"add\",\n \"object\": \"RTDOWNTIME\",\n \"values\": \"HOST;esx-alger-01;{{actual_start_time}};{{end_time}};1;3600;0;Faut pas renifler de la confiture sinon ça fait tousser\"\n}\n"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use a better comment

require_once realpath(dirname(__FILE__) . '/../centreonHostgroups.class.php');
require_once realpath(dirname(__FILE__) . '/../centreonServicegroups.class.php');
require_once realpath(dirname(__FILE__) . '/../centreonInstance.class.php');
require_once realpath(dirname(__FILE__).'/../centreonExternalCommand.class.php');
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

style, add space

@kduret kduret closed this Sep 29, 2017
@ganoze ganoze deleted the RtDowntime branch May 3, 2019 08:22
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants