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
b478930a
Commit
b478930a
authored
Feb 03, 2025
by
Teodora
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add <validate> RPC for M-plane
parent
e79c79b8
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
28 additions
and
0 deletions
+28
-0
radio/fhi_72/mplane/config-mplane.c
radio/fhi_72/mplane/config-mplane.c
+23
-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 @
b478930a
...
...
@@ -68,3 +68,26 @@ bool edit_config_mplane(ru_session_t *ru_session, const char *buffer, const open
return
true
;
}
bool
validate_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
;
char
*
src_start
=
NULL
;
NC_DATASTORE
source
=
NC_DATASTORE_CANDIDATE
;
MP_LOG_I
(
"RPC request to RU
\"
%s
\"
= <validate> candidate datastore.
\n
"
,
ru_session
->
ru_ip_add
);
rpc
=
nc_rpc_validate
(
source
,
src_start
,
param
);
AssertError
(
rpc
!=
NULL
,
return
false
,
"[MPLANE] <validate> 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 validate candidate datastore.
\n
"
);
MP_LOG_I
(
"Successfully validated candidate 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 @
b478930a
...
...
@@ -27,4 +27,6 @@
bool
edit_config_mplane
(
ru_session_t
*
ru_session
,
const
char
*
buffer
,
const
openair0_config_t
*
oai
,
const
size_t
num_rus
);
bool
validate_config_mplane
(
ru_session_t
*
ru_session
);
#endif
/* CONFIGURE_MPLANE_H */
radio/fhi_72/mplane/init-mplane.c
View file @
b478930a
...
...
@@ -178,6 +178,9 @@ bool manage_ru(ru_session_t *ru_session, const openair0_config_t *oai, const siz
if
(
ru_session
->
ru_notif
.
ptp_state
)
{
success
=
edit_config_mplane
(
ru_session
,
operational_ds
,
oai
,
num_rus
);
AssertError
(
success
,
return
false
,
"[MPLANE] Unable to edit the RU configuration.
\n
"
);
success
=
validate_config_mplane
(
ru_session
);
AssertError
(
success
,
return
false
,
"[MPLANE] Unable to validate the RU configuration.
\n
"
);
}
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