Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
28210cd
common: tools: add identifier pool
mlohvynenko Jun 30, 2025
ad29106
common: cloudprotocol: add state structures
mlohvynenko Jun 30, 2025
62f1545
cm: storagestate: add storage state interfaces
mlohvynenko Jun 26, 2025
e020fb1
common: types: add less operator for instance ident
mlohvynenko Jul 1, 2025
32f035d
common: crypto: support SHA3-224 hash algorithm
mlohvynenko Jul 1, 2025
d2783f4
common: tools: enhance fs platform interface with set user quota
mlohvynenko Jul 2, 2025
b4eb07c
common: config: remove redundant sha1 digest size definition
mlohvynenko Jul 2, 2025
a5fd070
cm: communication: add communication interface
mlohvynenko Jul 3, 2025
2049308
sm: common: move types common to cm & sm to common folder
mykola-kobets-epam Jul 3, 2025
fb51304
cm: add networkmanager interface
mykola-kobets-epam Jul 3, 2025
4352d1b
cm: add imageprovider interface
mykola-kobets-epam Jul 3, 2025
ed30d38
cm: add nodeinfoprovider interface
mykola-kobets-epam Jul 3, 2025
cb57da3
cm: add nodemanager interface
mykola-kobets-epam Jul 3, 2025
22411af
cm: add resourcemanager interface
mykola-kobets-epam Jul 3, 2025
beb0a3b
cm: add storage interface
mykola-kobets-epam Jul 3, 2025
6730f67
cm: networkmanager: extend allow con size
Jul 23, 2025
53091b3
iam: common: Move cNodeMaxNum const to common types
mykola-kobets-epam Jul 18, 2025
318485e
common: default initialize values of builtin types
mykola-kobets-epam Jul 18, 2025
5ef316f
common: add allowed connections to oci::ServiceConfig
mykola-kobets-epam Jul 18, 2025
3fab591
common: add exist method to algorithms
mykola-kobets-epam Jul 18, 2025
fba7fd6
common: tools: add Clear method to IdentifierPool
mykola-kobets-epam Jul 18, 2025
aafdd55
common: add run service request to common/types.hpp
mykola-kobets-epam Jul 18, 2025
a320c8f
common: fix sorting of instance identifiers
mykola-kobets-epam Jul 18, 2025
310cf80
cm: launcher: add launcher implementation
mykola-kobets-epam Jul 18, 2025
ad33223
cm: launcher: add unit tests for launcher
mykola-kobets-epam Jul 18, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ include_directories(include)
# Targets
# ######################################################################################################################

add_subdirectory(src/cm)
add_subdirectory(src/common)
add_subdirectory(src/sm)
add_subdirectory(src/iam)
Expand Down
48 changes: 48 additions & 0 deletions include/aos/cm/communication/communication.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
/*
* Copyright (C) 2025 EPAM Systems, Inc.
*
* SPDX-License-Identifier: Apache-2.0
*/

#ifndef AOS_CM_COMMUNICATION_HPP_
#define AOS_CM_COMMUNICATION_HPP_

#include "aos/common/cloudprotocol/state.hpp"
#include "aos/common/types.hpp"

namespace aos::cm::communication {

/** @addtogroup cm Communication Manager
* @{
*/

/**
* Communication interface.
*/
class CommunicationItf {
public:
/**
* Sends instances new state.
*
* @param newState new state to send.
* @return Error.
*/
virtual Error SendInstanceNewState(const cloudprotocol::NewState& newState) = 0;

/**
* Sends instances update state.
*
* @param updateState update state to send.
* @return Error.
*/
virtual Error SendInstanceStateRequest(const cloudprotocol::StateRequest& stateRequest) = 0;

/**
* Destructor.
*/
virtual ~CommunicationItf() = default;
};

} // namespace aos::cm::communication

#endif
151 changes: 151 additions & 0 deletions include/aos/cm/imageprovider.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,151 @@
/*
* Copyright (C) 2025 EPAM Systems, Inc.
*
* SPDX-License-Identifier: Apache-2.0
*/

#ifndef AOS_CM_IMAGEPROVIDER_HPP_
#define AOS_CM_IMAGEPROVIDER_HPP_

#include <aos/common/ocispec/serviceconfig.hpp>
#include <aos/common/types.hpp>

namespace aos::cm::imageprovider {

/** @addtogroup CM ImageProvider
* @{
*/

/**
* Structure providing extended service information.
*/
struct ServiceInfo : public aos::ServiceInfo {
/**
* Remote URL from which the service can be retrieved.
*/
StaticString<cURLLen> mRemoteURL;

/**
* Filesystem path where the service is stored.
*/
StaticString<cFilePathLen> mPath;

/**
* Service installation time.
*/
Time mTimestamp;

/**
* Service state.
*/
ServiceState mState;

/**
* Configuration parameters specific to the service.
*/
oci::ServiceConfig mConfig;

/**
* List of layer digests used by the service.
*/
StaticArray<StaticString<cLayerDigestLen>, cMaxNumLayers> mLayerDigests;

/**
* List of ports exposed by this service.
*/
StaticArray<StaticString<cExposedPortLen>, cMaxNumExposedPorts> mExposedPorts;
};

/**
* Information about a service layer.
*/
struct LayerInfo : public aos::LayerInfo {
/**
* Remote URL to download the layer from.
*/
StaticString<cURLLen> mRemoteURL;

/**
* Local file system path to the layer.
*/
StaticString<cFilePathLen> mPath;

/**
* Timestamp of the layer's last update.
*/
Time mTimestamp;

/**
* Layer state.
*/
LayerState mState;
};

/**
* Listener receiving notifications when services are removed.
*/
class ServiceListenerItf {
public:
/**
* Destructor.
*/
virtual ~ServiceListenerItf() = default;

/**
* Callback triggered when a service is removed.
*
* @param serviceID identifier of the removed service.
*/
virtual void OnServiceRemoved(const String& serviceID) = 0;
};

/**
* Interface that retrieves service information from its image.
*/
class ImageProviderItf {
public:
/**
* Destructor.
*/
virtual ~ImageProviderItf() = default;

/**
* Retrieves information about specified service.
*
* @param serviceID identifier of the service.
* @param[out] serviceInfo service information.
* @return Error.
*/
virtual Error GetServiceInfo(const String& serviceID, ServiceInfo& serviceInfo) = 0;

/**
* Retrieves metadata about an image layer.
*
* @param digest layer digest.
* @param[out] layerInfo layer info.
* @return Error.
*/
virtual Error GetLayerInfo(const String& digest, LayerInfo& layerInfo) = 0;

/**
* Subscribes listener on service information updates.
*
* @param listener service listener.
* @return Error.
*/
virtual Error SubscribeListener(ServiceListenerItf& listener) = 0;

/**
* Unsubscribes service information listener.
*
* @param listener service listener.
* @return Error.
*/
virtual Error UnsubscribeListener(ServiceListenerItf& listener) = 0;
};

/** @}*/

} // namespace aos::cm::imageprovider

#endif
Loading
Loading