Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OpenXG-RAN
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
OpenXG
OpenXG-RAN
Commits
f22bc5ac
Commit
f22bc5ac
authored
Feb 03, 2025
by
Teodora
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add <commit> RPC for M-plane
parent
b478930a
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
29 additions
and
0 deletions
+29
-0
radio/fhi_72/mplane/config-mplane.c
radio/fhi_72/mplane/config-mplane.c
+24
-0
radio/fhi_72/mplane/config-mplane.h
radio/fhi_72/mplane/config-mplane.h
+2
-0
radio/fhi_72/mplane/init-mplane.c
radio/fhi_72/mplane/init-mplane.c
+3
-0
No files found.
radio/fhi_72/mplane/config-mplane.c
View file @
f22bc5ac
...
@@ -91,3 +91,27 @@ bool validate_config_mplane(ru_session_t *ru_session)
...
@@ -91,3 +91,27 @@ bool validate_config_mplane(ru_session_t *ru_session)
return
true
;
return
true
;
}
}
bool
commit_config_mplane
(
ru_session_t
*
ru_session
)
{
int
timeout
=
CLI_RPC_REPLY_TIMEOUT
;
struct
nc_rpc
*
rpc
;
NC_WD_MODE
wd
=
NC_WD_ALL
;
NC_PARAMTYPE
param
=
NC_PARAMTYPE_CONST
;
int
confirmed
=
0
;
int32_t
confirm_timeout
=
0
;
char
*
persist
=
NULL
,
*
persist_id
=
NULL
;
MP_LOG_I
(
"RPC request to RU
\"
%s
\"
= <commit> candidate datastore.
\n
"
,
ru_session
->
ru_ip_add
);
rpc
=
nc_rpc_commit
(
confirmed
,
confirm_timeout
,
persist
,
persist_id
,
param
);
AssertError
(
rpc
!=
NULL
,
return
false
,
"[MPLANE] <commit> RPC creation failed.
\n
"
);
bool
success
=
rpc_send_recv
((
struct
nc_session
*
)
ru_session
->
session
,
rpc
,
wd
,
timeout
,
NULL
);
AssertError
(
success
,
return
false
,
"[MPLANE] Failed to commit candidate datastore.
\n
"
);
MP_LOG_I
(
"Successfully commited CU-planes configuration into running datastore for RU
\"
%s
\"
.
\n
"
,
ru_session
->
ru_ip_add
);
nc_rpc_free
(
rpc
);
return
true
;
}
radio/fhi_72/mplane/config-mplane.h
View file @
f22bc5ac
...
@@ -29,4 +29,6 @@ bool edit_config_mplane(ru_session_t *ru_session, const char *buffer, const open
...
@@ -29,4 +29,6 @@ bool edit_config_mplane(ru_session_t *ru_session, const char *buffer, const open
bool
validate_config_mplane
(
ru_session_t
*
ru_session
);
bool
validate_config_mplane
(
ru_session_t
*
ru_session
);
bool
commit_config_mplane
(
ru_session_t
*
ru_session
);
#endif
/* CONFIGURE_MPLANE_H */
#endif
/* CONFIGURE_MPLANE_H */
radio/fhi_72/mplane/init-mplane.c
View file @
f22bc5ac
...
@@ -181,6 +181,9 @@ bool manage_ru(ru_session_t *ru_session, const openair0_config_t *oai, const siz
...
@@ -181,6 +181,9 @@ bool manage_ru(ru_session_t *ru_session, const openair0_config_t *oai, const siz
success
=
validate_config_mplane
(
ru_session
);
success
=
validate_config_mplane
(
ru_session
);
AssertError
(
success
,
return
false
,
"[MPLANE] Unable to validate the RU configuration.
\n
"
);
AssertError
(
success
,
return
false
,
"[MPLANE] Unable to validate the RU configuration.
\n
"
);
success
=
commit_config_mplane
(
ru_session
);
AssertError
(
success
,
return
false
,
"[MPLANE] Unable to commit the RU configuration.
\n
"
);
}
}
free
(
operational_ds
);
free
(
operational_ds
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment