X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=ntsimulator%2Fntsim-ng%2Fcore%2Fapp%2Fmanager.h;fp=ntsimulator%2Fntsim-ng%2Fcore%2Fapp%2Fmanager.h;h=ad1f0a9c4cdf4b7dd6176f0d13349bc271a1b4d9;hb=f1d5c9198acde7a7ce296490087cad37e008f688;hp=0000000000000000000000000000000000000000;hpb=f2d8f1002fa93848c80a88e5658db4816cba3020;p=sim%2Fo1-interface.git diff --git a/ntsimulator/ntsim-ng/core/app/manager.h b/ntsimulator/ntsim-ng/core/app/manager.h new file mode 100644 index 0000000..ad1f0a9 --- /dev/null +++ b/ntsimulator/ntsim-ng/core/app/manager.h @@ -0,0 +1,70 @@ +/************************************************************************* +* +* Copyright 2020 highstreet technologies GmbH and others +* +* 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 +* +* http://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. +***************************************************************************/ + +#pragma once + +#include +#include +#include + +typedef struct { + //meta-data + char *docker_id; + bool is_configured; + bool is_mounted; + + //yang data + char *name; + char *mount_point_addressing_method; + char *docker_ip; + uint16_t docker_port; + char *host_ip; + uint16_t host_port; +} manager_network_function_instance_t; + +typedef struct { + //manager_docker data + manager_network_function_instance_t *instance; + bool data_changed; + + //meta-data, constant + struct lys_ident *function_type; + char *function_type_string; + const char *docker_image_name; + + //yang data + int started_instances; + int mounted_instances; + + char *docker_instance_name; + char *docker_version_tag; + char *docker_repository; + + char *mount_point_addressing_method; +} manager_network_function_type; + +//manager.c +int manager_run(void); + +//manager_operations.c +void manager_operations_init(void); + +int manager_start_instance(manager_network_function_type *function_type); +int manager_config_instance(manager_network_function_type *function_type, manager_network_function_instance_t *instance); +int manager_stop_instance(manager_network_function_type *function_type); +int manager_mount_instance(manager_network_function_type *function_type); +int manager_unmount_instance(manager_network_function_type *function_type);