Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OpenXG-NRF
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
0
Merge Requests
0
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-NRF
Commits
a64c3a77
Commit
a64c3a77
authored
Jan 11, 2021
by
Tien-Thinh Nguyen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update cmd
parent
7dc8e2f7
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
5 deletions
+10
-5
src/nrf_app/nrf_app.cpp
src/nrf_app/nrf_app.cpp
+2
-1
test/cmd.txt
test/cmd.txt
+8
-4
No files found.
src/nrf_app/nrf_app.cpp
View file @
a64c3a77
...
@@ -312,7 +312,7 @@ void nrf_app::handle_get_nf_instances(
...
@@ -312,7 +312,7 @@ void nrf_app::handle_get_nf_instances(
std
::
string
instance_uri
;
std
::
string
instance_uri
;
std
::
vector
<
struct
in_addr
>
profile_addresses
=
{};
std
::
vector
<
struct
in_addr
>
profile_addresses
=
{};
profile
.
get
()
->
get_nf_ipv4_addresses
(
profile_addresses
);
profile
.
get
()
->
get_nf_ipv4_addresses
(
profile_addresses
);
//use the first IP addr
//
TODO:
use the first IP addr
if
(
profile_addresses
.
size
()
>
0
)
{
if
(
profile_addresses
.
size
()
>
0
)
{
instance_uri
=
std
::
string
(
inet_ntoa
(
*
((
struct
in_addr
*
)
&
profile_addresses
[
0
])));
instance_uri
=
std
::
string
(
inet_ntoa
(
*
((
struct
in_addr
*
)
&
profile_addresses
[
0
])));
uris
.
push_back
(
instance_uri
);
uris
.
push_back
(
instance_uri
);
...
@@ -321,6 +321,7 @@ void nrf_app::handle_get_nf_instances(
...
@@ -321,6 +321,7 @@ void nrf_app::handle_get_nf_instances(
}
}
}
}
//------------------------------------------------------------------------------
void
nrf_app
::
handle_get_nf_instance
(
const
std
::
string
&
nf_instance_id
,
void
nrf_app
::
handle_get_nf_instance
(
const
std
::
string
&
nf_instance_id
,
std
::
shared_ptr
<
nrf_profile
>
&
profile
,
std
::
shared_ptr
<
nrf_profile
>
&
profile
,
int
&
http_code
,
const
uint8_t
http_version
,
int
&
http_code
,
const
uint8_t
http_version
,
...
...
test/cmd.txt
View file @
a64c3a77
#Registration
curl -X PUT -H "Content-Type: application/json" -d @amf_registration.json http://192.168.1.23/nnrf-nfm/v1/nf-instances/343a924e-6494-4927-860b-d45692c95c2d
curl -X PUT -H "Content-Type: application/json" -d @amf_registration.json http://192.168.1.23/nnrf-nfm/v1/nf-instances/343a924e-6494-4927-860b-d45692c95c2d
#NFListRetrieval
curl -X GET "http://192.168.1.23/nnrf-nfm/v1/nf-instances?nf-type="serviceId1"&limit=100"
curl -X GET "http://192.168.1.23/nnrf-nfm/v1/nf-instances?nf-type="serviceId1"&limit=100"
#NFProfileRetrieval
curl -X GET "http://192.168.1.23/nnrf-nfm/v1/nf-instances/
#Update
curl -X PATCH -H "Content-Type: application/json" http://192.168.1.23/nnrf-nfm/v1/nf-instances/343a924e-6494-4927-860b-d45692c95c2d -d '[{"op":"replace","path":"/nfInstanceName", "value": "NEW NAME"}]'
curl -X PATCH -H "Content-Type: application/json" http://192.168.1.23/nnrf-nfm/v1/nf-instances/343a924e-6494-4927-860b-d45692c95c2d -d '[{"op":"replace","path":"/nfInstanceName", "value": "NEW NAME"}]'
curl -X POST http://192.168.1.23/nnrf-nfm/v1/subscriptions -d '{"nfStatusNotificationUri":"http://192.168.1.23/nnrf-nfm/v1/nf-instances/343a924e-6494-4927-860b-d45692c95c2d", "subscrCond": {"NfTypeCond": {"nfType":"AMF"} } }'
curl -X POST http://192.168.1.23/nnrf-nfm/v1/subscriptions -d '{"nfStatusNotificationUri":"http://192.168.1.23/nnrf-nfm/v1/nf-instances/343a924e-6494-4927-860b-d45692c95c2d", "subscrCond": {"NfTypeCond": {"nfType":"AMF"} } }'
curl -X POST http://192.168.1.23/nnrf-nfm/v1/subscriptions -d '{"nfStatusNotificationUri":"http://192.168.1.23/nnrf-nfm/v1/nf-instances/343a924e-6494-4927-860b-d45692c95c2d", "subscrCond": {"NfInstanceIdCond": {"nfInstanceId":"AMF"} } }'
curl -X POST http://192.168.1.23/nnrf-nfm/v1/subscriptions -d '{"nfStatusNotificationUri":"http://192.168.1.23/nnrf-nfm/v1/nf-instances/343a924e-6494-4927-860b-d45692c95c2d", "subscrCond": {"NfInstanceIdCond": {"nfInstanceId":"AMF"} } }'
curl -X POST http://192.168.1.23/nnrf-nfm/v1/subscriptions -d '{"nfStatusNotificationUri":"http://192.168.1.23/nnrf-nfm/v1/nf-instances/343a924e-6494-4927-860b-d45692c95c2d", "subscrCond": {"NfTypeCond": {"nfType":"AMF"} } }'
curl -X POST http://192.168.1.23/nnrf-nfm/v1/subscriptions -d '{"nfStatusNotificationUri":"http://192.168.1.23/nnrf-nfm/v1/nf-instances/343a924e-6494-4927-860b-d45692c95c2d", "subscrCond": {"NfTypeCond": {"nfType":"AMF"} } }'
curl -X POST -H "Content-Type: application/json" "http://192.168.1.23/nnrf-nfm/v1/subscriptions" -d '{"nfStatusNotificationUri":"http://192.168.1.23/nnrf-nfm/v1/nf-instances/343a924e-6494-4927-860b-d45692c95c2d", "subscrCond": {"NfTypeCond": {"nfType":"AMF"}}, "reqNotifEvents":["NF_REGISTERED", "NF_DEREGISTERED"], "validityTime":"20020131T235959" }'
curl -X POST -H "Content-Type: application/json" "http://192.168.1.23/nnrf-nfm/v1/subscriptions" -d '{"nfStatusNotificationUri":"http://192.168.1.23/nnrf-nfm/v1/nf-instances/343a924e-6494-4927-860b-d45692c95c2d", "subscrCond": {"NfTypeCond": {"nfType":"AMF"}}, "reqNotifEvents":["NF_REGISTERED", "NF_DEREGISTERED"], "validityTime":"20020131T235959" }'
curl -X PATCH -H "Content-Type: application/json" http://192.168.1.23/nnrf-nfm/v1/subscriptions/1 -d '[{"op":"replace","path":"/validityTime", "value": "20201231T235959"}]'
curl -X PATCH -H "Content-Type: application/json" http://192.168.1.23/nnrf-nfm/v1/subscriptions/1 -d '[{"op":"replace","path":"/validityTime", "value": "20201231T235959"}]'
#Discovery
curl -X GET "http://192.168.1.23/nnrf-disc/v1/
/nf-instances?target-nf-type="A
MF"&requester-nf-type="AMF""
curl -X GET "http://192.168.1.23/nnrf-disc/v1/
nf-instances?target-nf-type="S
MF"&requester-nf-type="AMF""
#Access Token
#Access Token
curl -d "grant_type=client_credentials&nfInstanceId=343a924e-6494-4927-860b-d45692c95c2d&scope=nsmf-pdusession" -H "Content-Type: application/x-www-form-urlencoded" -X POST http://192.168.1.23/oauth2/token
curl -d "grant_type=client_credentials&nfInstanceId=343a924e-6494-4927-860b-d45692c95c2d&scope=nsmf-pdusession" -H "Content-Type: application/x-www-form-urlencoded" -X POST http://192.168.1.23/oauth2/token
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