nfv/mtce-guest/src/guestVimApi.h
Jim Gauld d2b3e22a4e 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

Depends-On: https://review.openstack.org/603435

Change-Id: I2ebaf07b94ee5b5abdf8f8db80536351ded22078
Signed-off-by: Jim Gauld <james.gauld@windriver.com>
2018-09-19 11:38:04 -04:00

48 lines
1.6 KiB
C++

#ifndef __INCLUDE_GUESTVIMAPI_H__
#define __INCLUDE_GUESTVIMAPI_H__
/*
* Copyright (c) 2013, 2015 Wind River Systems, Inc.
*
* SPDX-License-Identifier: Apache-2.0
*
*/
#include <iostream>
#include <string>
#include "guestHttpUtil.h"
/**
* @file
* Wind River CGTS Platform Guest Services Request Transmitter.
*
* This module is used by the guestAgent only and allows the guestAgent to
*
* 1. Transmit notification of an instance failure to the VIM
*
* guestVimApi_inst_failed
*
* 2. Get the instrance info for a specified host from the VIM
*
* guestVimApi_getHostState
*
* 3. Get the host level fault reporting state.
*
* guestVimApi_getHostInst
*
**************************************************************************/
int guestVimApi_init ( string ip, int port );
void guestVimApi_fini ( void );
int guestVimApi_inst_failed ( string hostname, string instance, unsigned int event, int retries );
int guestVimApi_inst_action ( string hostname, string instance_uuid, string action, string guest_response, string reason, int retries=0 );
int guestVimApi_svc_event ( string hostname, string instance_uuid, string state, string status, string timeout );
int guestVimApi_alarm_event ( string hostname, string instance_uuid );
int guestVimApi_getHostInst ( string hostname, string uuid, libEvent & event );
int guestVimApi_getHostState ( string hostname, string uuid, libEvent & event );
void guestVimApi_Handler ( struct evhttp_request *req, void *arg );
#endif /* __INCLUDE_GUESTVIMAPI_H__ */