X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=ntsimulator%2Fntsim-ng%2Fcore%2Fdatastore%2Fpopulate.h;h=da15e0f4fb792fb5d034270f8e58ddb74856972e;hb=caec2fcb18e829420672509fe5e356b48d0c3840;hp=3df3693c03ebb240d3b42238f6e9aa21ebf2cfbf;hpb=f1d5c9198acde7a7ce296490087cad37e008f688;p=sim%2Fo1-interface.git diff --git a/ntsimulator/ntsim-ng/core/datastore/populate.h b/ntsimulator/ntsim-ng/core/datastore/populate.h index 3df3693..da15e0f 100644 --- a/ntsimulator/ntsim-ng/core/datastore/populate.h +++ b/ntsimulator/ntsim-ng/core/datastore/populate.h @@ -1,6 +1,6 @@ /************************************************************************* * -* Copyright 2020 highstreet technologies GmbH and others +* Copyright 2021 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. @@ -17,38 +17,9 @@ #pragma once -#include -#include -#include -#include +#include -typedef struct { - int init; +int datastore_populate_all(); //fresh populate of all modules; handles late-resolving and validation over own-created job; should only be ran once +int datastore_populate_update_operational(const char **xpath, int xpath_len); - char *xpath; - - const struct lys_module **modules; - int mod_count; - - struct lyd_node *operational; - struct lyd_node *running; -} populate_instance_t; - -typedef struct { - struct lyd_node *operational; - struct lyd_node *running; - bool late_resolving; - - int late_resolve_count; - struct lys_node **late_resolve_schema; - struct lyd_node **late_resolve_parent_o; - struct lyd_node **late_resolve_parent_r; - populate_instance_t **late_resolve_instance; -} populate_job_t; - -//populate.c -int schema_populate(void); //populate all available root nodes (taking into consideration excluded, deprecated and unimplemented) - -//populate_rec.c -int schema_populate_recursive(populate_job_t *job, populate_instance_t *instance, struct lys_node *schema, struct lyd_node *parent_o, struct lyd_node *parent_r); -int schema_populate_add_leaf(populate_job_t *job, populate_instance_t *instance, struct lys_node *schema, struct lyd_node *parent_o, struct lyd_node *parent_r); +int datastore_dynamic_operational_auto_callback(sr_session_ctx_t *session, const char *module_name, const char *xpath, sr_event_t event, uint32_t request_id, void *private_data);