metal/mtce/src/maintenance/mtcSmgrApi.h
Jim Gauld 6a5e10492c Decouple Guest-server/agent from stx-metal
This decouples the build and packaging of guest-server, guest-agent from
mtce, by splitting guest component into stx-nfv repo.

This leaves existing C++ code, scripts, and resource files untouched,
so there is no functional change. Code refactoring is beyond the scope
of this update.

Makefiles were modified to include devel headers directories
/usr/include/mtce-common and /usr/include/mtce-daemon.
This ensures there is no contamination with other system headers.

The cgts-mtce-common package is renamed and split into:
- repo stx-metal: mtce-common, mtce-common-dev
- repo stx-metal: mtce
- repo stx-nfv: mtce-guest
- repo stx-ha: updates package dependencies to mtce-pmon for
  service-mgmt, sm, and sm-api

mtce-common:
- contains common and daemon shared source utility code

mtce-common-dev:
- based on mtce-common, contains devel package required to build
  mtce-guest and mtce
- contains common library archives and headers

mtce:
- contains components: alarm, fsmon, fsync, heartbeat, hostw, hwmon,
  maintenance, mtclog, pmon, public, rmon

mtce-guest:
- contains guest component guest-server, guest-agent

Story: 2002829
Task: 22748

Change-Id: I9c7a9b846fd69fd566b31aa3f12a043c08f19f1f
Signed-off-by: Jim Gauld <james.gauld@windriver.com>
2018-09-18 17:15:08 -04:00

52 lines
1.4 KiB
C++

#ifndef __INCLUDE_MTCSMHAAPI_H__
#define __INCLUDE_MTCSMHAAPI_H__
/*
* Copyright (c) 2013, 2015 Wind River Systems, Inc.
*
* SPDX-License-Identifier: Apache-2.0
*
*/
#include <iostream>
#include <string>
// #include "mtcHttpUtil.h"
#include "httpUtil.h"
/**
* @file
* Wind River CGTS Platform Controller Maintenance
*
* Service Manager HA API Header
*
* This module offers init and cleanup utils along with
* a single request based utility
*
* int mtcSmhaApi_request ( hostname, operation, retries )
*
* Operations:
*
* HA Service Manager - Command Descriptions
* ------------------ ------------------------------
* CONTROLLER_LOCKED - specified controller is locked
* CONTROLLER_UNLOCKED - specified controller is unlocked
* CONTROLLER_DISABLED - specified controller is unlocked-disabled
* CONTROLLER_ENABLED - specified controller is unlocked-enabled
* CONTROLLER_SWACT - swact services away from specified controller
* CONTROLLER_QUERY - query active services on specified controller
*
*/
#define MTC_SMGR_LABEL "/v1/servicenode/"
#define MTC_SMGR_ADDR "localhost"
/** Initializes the module */
int mtcSmgrApi_init ( string ip, int port );
/** Frees the module's dynamically allocated resources */
void mtcSmgrApi_fini ( void );
int mtcSmgrApi_service_state ( libEvent & event, bool & active_services );
#endif /* __INCLUDE_MTCSMHAAPI_H__ */