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
06486645
Commit
06486645
authored
2 months ago
by
Teodora
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add <get> RPC for M-plane
parent
93aaaef5
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
94 additions
and
0 deletions
+94
-0
radio/fhi_72/mplane/CMakeLists.txt
radio/fhi_72/mplane/CMakeLists.txt
+1
-0
radio/fhi_72/mplane/get-mplane.c
radio/fhi_72/mplane/get-mplane.c
+47
-0
radio/fhi_72/mplane/get-mplane.h
radio/fhi_72/mplane/get-mplane.h
+29
-0
radio/fhi_72/mplane/init-mplane.c
radio/fhi_72/mplane/init-mplane.c
+14
-0
radio/fhi_72/mplane/init-mplane.h
radio/fhi_72/mplane/init-mplane.h
+2
-0
radio/fhi_72/oran_isolate.c
radio/fhi_72/oran_isolate.c
+1
-0
No files found.
radio/fhi_72/mplane/CMakeLists.txt
View file @
06486645
...
...
@@ -28,6 +28,7 @@ target_sources(oran_fhlib_5g_mplane PRIVATE
init-mplane.c
connect-mplane.c
rpc-send-recv.c
get-mplane.c
)
pkg_check_modules
(
libyang REQUIRED libyang
)
...
...
This diff is collapsed.
Click to expand it.
radio/fhi_72/mplane/get-mplane.c
0 → 100644
View file @
06486645
/*
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under
* the OAI Public License, Version 1.1 (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.openairinterface.org/?page_id=698
*
* 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.
*-------------------------------------------------------------------------------
* For more information about the OpenAirInterface (OAI) Software Alliance:
* contact@openairinterface.org
*/
#include "get-mplane.h"
#include "rpc-send-recv.h"
#include "common/utils/assertions.h"
bool
get_mplane
(
ru_session_t
*
ru_session
,
char
**
answer
)
{
int
timeout
=
CLI_RPC_REPLY_TIMEOUT
;
struct
nc_rpc
*
rpc
;
char
*
filter
=
NULL
;
// e.g. "/o-ran-delay-management:delay-management";
NC_WD_MODE
wd
=
NC_WD_ALL
;
NC_PARAMTYPE
param
=
NC_PARAMTYPE_CONST
;
MP_LOG_I
(
"RPC request to RU
\"
%s
\"
= <get> operational datastore.
\n
"
,
ru_session
->
ru_ip_add
);
rpc
=
nc_rpc_get
(
filter
,
wd
,
param
);
AssertError
(
rpc
!=
NULL
,
return
false
,
"[MPLANE] <get> RPC creation failed.
\n
"
);
bool
success
=
rpc_send_recv
((
struct
nc_session
*
)
ru_session
->
session
,
rpc
,
wd
,
timeout
,
answer
);
AssertError
(
success
,
return
false
,
"[MPLANE] Unable to retrieve operational datastore.
\n
"
);
MP_LOG_I
(
"Successfully retrieved operational datastore from RU
\"
%s
\"
.
\n
"
,
ru_session
->
ru_ip_add
);
nc_rpc_free
(
rpc
);
return
true
;
}
This diff is collapsed.
Click to expand it.
radio/fhi_72/mplane/get-mplane.h
0 → 100644
View file @
06486645
/*
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under
* the OAI Public License, Version 1.1 (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.openairinterface.org/?page_id=698
*
* 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.
*-------------------------------------------------------------------------------
* For more information about the OpenAirInterface (OAI) Software Alliance:
* contact@openairinterface.org
*/
#ifndef GET_MPLANE_H
#define GET_MPLANE_H
#include "ru-mplane-api.h"
bool
get_mplane
(
ru_session_t
*
ru_session
,
char
**
answer
);
#endif
/* GET_MPLANE_H */
This diff is collapsed.
Click to expand it.
radio/fhi_72/mplane/init-mplane.c
View file @
06486645
...
...
@@ -21,6 +21,7 @@
#include "init-mplane.h"
#include "radio/fhi_72/oran-params.h"
#include "get-mplane.h"
#include <libyang/libyang.h>
#include <nc_client.h>
...
...
@@ -129,3 +130,16 @@ bool init_mplane(ru_session_list_t *ru_session_list)
return
true
;
}
bool
manage_ru
(
ru_session_t
*
ru_session
,
const
openair0_config_t
*
oai
,
const
size_t
num_rus
)
{
bool
success
=
false
;
char
*
operational_ds
=
NULL
;
success
=
get_mplane
(
ru_session
,
&
operational_ds
);
AssertError
(
success
,
return
false
,
"[MPLANE] Unable to continue: could not get RU answer via get_mplane().
\n
"
);
free
(
operational_ds
);
return
true
;
}
This diff is collapsed.
Click to expand it.
radio/fhi_72/mplane/init-mplane.h
View file @
06486645
...
...
@@ -27,4 +27,6 @@
bool
init_mplane
(
ru_session_list_t
*
ru_session_list
);
bool
manage_ru
(
ru_session_t
*
ru_session
,
const
openair0_config_t
*
oai
,
const
size_t
num_rus
);
#endif
/* OAI_MPLANE_H */
This diff is collapsed.
Click to expand it.
radio/fhi_72/oran_isolate.c
View file @
06486645
...
...
@@ -302,6 +302,7 @@ __attribute__((__visibility__("default"))) int transport_init(openair0_device *d
if
(
!
ru_configured
[
i
])
{
continue
;
}
ru_configured
[
i
]
=
manage_ru
(
ru_session
,
openair0_cfg
,
ru_session_list
.
num_rus
);
}
#else
success
=
get_xran_config
(
openair0_cfg
,
&
fh_init
,
fh_config
);
...
...
This diff is collapsed.
Click to expand it.
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