Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OpenXG-AMF
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
1
Issues
1
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-AMF
Commits
3e39da3e
Commit
3e39da3e
authored
Nov 09, 2022
by
Tien Thinh NGUYEN
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add api for receiving PDU status from SMF
parent
3afd143e
Changes
15
Hide whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
856 additions
and
2 deletions
+856
-2
src/itti/itti_msg.hpp
src/itti/itti_msg.hpp
+1
-0
src/itti/msgs/itti_msg_n2.hpp
src/itti/msgs/itti_msg_n2.hpp
+1
-1
src/itti/msgs/itti_msg_sbi.hpp
src/itti/msgs/itti_msg_sbi.hpp
+32
-1
src/sbi/amf_server/api/NFStatusNotifyApi.cpp
src/sbi/amf_server/api/NFStatusNotifyApi.cpp
+96
-0
src/sbi/amf_server/api/NFStatusNotifyApi.h
src/sbi/amf_server/api/NFStatusNotifyApi.h
+77
-0
src/sbi/amf_server/impl/NFStatusNotifyApiImpl.cpp
src/sbi/amf_server/impl/NFStatusNotifyApiImpl.cpp
+130
-0
src/sbi/amf_server/impl/NFStatusNotifyApiImpl.h
src/sbi/amf_server/impl/NFStatusNotifyApiImpl.h
+83
-0
src/sbi/amf_server/model/Cause.cpp
src/sbi/amf_server/model/Cause.cpp
+45
-0
src/sbi/amf_server/model/Cause.h
src/sbi/amf_server/model/Cause.h
+62
-0
src/sbi/amf_server/model/ResourceStatus.cpp
src/sbi/amf_server/model/ResourceStatus.cpp
+36
-0
src/sbi/amf_server/model/ResourceStatus.h
src/sbi/amf_server/model/ResourceStatus.h
+51
-0
src/sbi/amf_server/model/SmContextStatusNotification.cpp
src/sbi/amf_server/model/SmContextStatusNotification.cpp
+46
-0
src/sbi/amf_server/model/SmContextStatusNotification.h
src/sbi/amf_server/model/SmContextStatusNotification.h
+60
-0
src/sbi/amf_server/model/StatusInfo.cpp
src/sbi/amf_server/model/StatusInfo.cpp
+66
-0
src/sbi/amf_server/model/StatusInfo.h
src/sbi/amf_server/model/StatusInfo.h
+70
-0
No files found.
src/itti/itti_msg.hpp
View file @
3e39da3e
...
...
@@ -96,6 +96,7 @@ typedef enum {
SBI_N1_MESSAGE_NOTIFICATION
,
SBI_N1N2_MESSAGE_SUBSCRIBE
,
SBI_N1N2_MESSAGE_UNSUBSCRIBE
,
SBI_PDU_SESSION_RELEASE_NOTIF
,
HANDOVER_REQUIRED_MSG
,
HANDOVER_REQUEST_ACK
,
HANDOVER_NOTIFY
,
...
...
src/itti/msgs/itti_msg_n2.hpp
View file @
3e39da3e
...
...
@@ -327,7 +327,7 @@ class itti_ue_context_release_command : public itti_msg_n2 {
public:
uint32_t
ran_ue_ngap_id
;
long
amf_ue_ngap_id
;
Cause
cause
;
ngap
::
Cause
cause
;
};
class
itti_ue_context_release_complete
:
public
itti_msg_n2
{
...
...
src/itti/msgs/itti_msg_sbi.hpp
View file @
3e39da3e
...
...
@@ -30,7 +30,7 @@
#include "amf_profile.hpp"
#include "bstrlib.h"
#include "itti_msg.hpp"
//#include "pistache/http.h"
#include <SmContextStatusNotification.h>
extern
"C"
{
#include "dynamic_memory_check.h"
...
...
@@ -543,4 +543,35 @@ class itti_sbi_update_amf_configuration : public itti_sbi_msg {
nlohmann
::
json
configuration
;
};
//-----------------------------------------------------------------------------
class
itti_sbi_pdu_session_release_notif
:
public
itti_sbi_msg
{
public:
itti_sbi_pdu_session_release_notif
(
const
task_id_t
orig
,
const
task_id_t
dest
,
uint32_t
pid
)
:
itti_sbi_msg
(
SBI_PDU_SESSION_RELEASE_NOTIF
,
orig
,
dest
),
http_version
(
1
),
promise_id
(
pid
),
smContextStatusNotification
()
{}
itti_sbi_pdu_session_release_notif
(
const
itti_sbi_pdu_session_release_notif
&
i
)
:
itti_sbi_msg
(
i
),
http_version
(
1
),
promise_id
(),
smContextStatusNotification
(
i
.
smContextStatusNotification
)
{}
itti_sbi_pdu_session_release_notif
(
const
itti_sbi_pdu_session_release_notif
&
i
,
const
task_id_t
orig
,
const
task_id_t
dest
)
:
itti_sbi_msg
(
i
,
orig
,
dest
),
http_version
(
i
.
http_version
),
promise_id
(
i
.
promise_id
),
smContextStatusNotification
(
i
.
smContextStatusNotification
)
{}
virtual
~
itti_sbi_pdu_session_release_notif
(){};
const
char
*
get_msg_name
()
{
return
"SBI_PDU_SESSION_RELEASE_NOTIF"
;
};
uint8_t
http_version
;
uint32_t
promise_id
;
oai
::
amf
::
model
::
SmContextStatusNotification
smContextStatusNotification
;
};
#endif
/* ITTI_MSG_SBI_HPP_INCLUDED_ */
src/sbi/amf_server/api/NFStatusNotifyApi.cpp
0 → 100644
View file @
3e39da3e
/*
* 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 "NFStatusNotifyApi.h"
#include "Helpers.h"
#include "amf_config.hpp"
#include "SmContextStatusNotification.h"
extern
config
::
amf_config
amf_cfg
;
namespace
oai
{
namespace
amf
{
namespace
api
{
using
namespace
oai
::
amf
::
helpers
;
using
namespace
oai
::
amf
::
model
;
NFStatusNotifyApi
::
NFStatusNotifyApi
(
std
::
shared_ptr
<
Pistache
::
Rest
::
Router
>
rtr
)
{
router
=
rtr
;
}
void
NFStatusNotifyApi
::
init
()
{
setupRoutes
();
}
void
NFStatusNotifyApi
::
setupRoutes
()
{
using
namespace
Pistache
::
Rest
;
Routes
::
Post
(
*
router
,
base
+
amf_cfg
.
sbi_api_version
+
"/pdu-session-release/callback/:ueContextId/:pduSessionId"
,
Routes
::
bind
(
&
NFStatusNotifyApi
::
notify_pdu_session_status_handler
,
this
));
// Default handler, called when a route is not found
router
->
addCustomHandler
(
Routes
::
bind
(
&
NFStatusNotifyApi
::
notify_nf_status_default_handler
,
this
));
}
void
NFStatusNotifyApi
::
notify_pdu_session_status_handler
(
const
Pistache
::
Rest
::
Request
&
request
,
Pistache
::
Http
::
ResponseWriter
response
)
{
// Get SUPI
auto
ueContextId
=
request
.
param
(
":ueContextId"
).
as
<
std
::
string
>
();
// Get PDU Session ID
auto
pduSessionId
=
request
.
param
(
":pduSessionId"
).
as
<
std
::
string
>
();
// Getting the body param
SmContextStatusNotification
statusNotification
;
try
{
nlohmann
::
json
::
parse
(
request
.
body
()).
get_to
(
statusNotification
);
this
->
receive_pdu_session_status_notification
(
ueContextId
,
pduSessionId
,
statusNotification
,
response
);
}
catch
(
nlohmann
::
detail
::
exception
&
e
)
{
// send a 400 error
response
.
send
(
Pistache
::
Http
::
Code
::
Bad_Request
,
e
.
what
());
return
;
}
catch
(
Pistache
::
Http
::
HttpError
&
e
)
{
response
.
send
(
static_cast
<
Pistache
::
Http
::
Code
>
(
e
.
code
()),
e
.
what
());
return
;
}
catch
(
std
::
exception
&
e
)
{
// send a 500 error
response
.
send
(
Pistache
::
Http
::
Code
::
Internal_Server_Error
,
e
.
what
());
return
;
}
}
void
NFStatusNotifyApi
::
notify_nf_status_default_handler
(
const
Pistache
::
Rest
::
Request
&
,
Pistache
::
Http
::
ResponseWriter
response
)
{
response
.
send
(
Pistache
::
Http
::
Code
::
Not_Found
,
"The requested method does not exist"
);
}
}
// namespace api
}
// namespace amf
}
// namespace oai
src/sbi/amf_server/api/NFStatusNotifyApi.h
0 → 100644
View file @
3e39da3e
/*
* 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
*/
/*
* NFStatusNotifyApi.h
*
*
*/
#ifndef NFStatusNotifyApi_H_
#define NFStatusNotifyApi_H_
#include <pistache/http.h>
#include <pistache/router.h>
#include <pistache/http_headers.h>
#include <pistache/optional.h>
#include <SmContextStatusNotification.h>
namespace
oai
::
amf
::
api
{
using
namespace
oai
::
amf
::
model
;
class
NFStatusNotifyApi
{
public:
NFStatusNotifyApi
(
std
::
shared_ptr
<
Pistache
::
Rest
::
Router
>
);
virtual
~
NFStatusNotifyApi
()
{}
void
init
();
const
std
::
string
base
=
"/namf-status-notify/"
;
private:
void
setupRoutes
();
void
notify_pdu_session_status_handler
(
const
Pistache
::
Rest
::
Request
&
request
,
Pistache
::
Http
::
ResponseWriter
response
);
void
notify_nf_status_default_handler
(
const
Pistache
::
Rest
::
Request
&
request
,
Pistache
::
Http
::
ResponseWriter
response
);
std
::
shared_ptr
<
Pistache
::
Rest
::
Router
>
router
;
/// <summary>
///
/// </summary>
/// <remarks>
///
/// </remarks>
/// <param name="NotificationData"></param>
virtual
void
receive_pdu_session_status_notification
(
const
std
::
string
&
ueContextId
,
const
std
::
string
&
pduSessionId
,
const
SmContextStatusNotification
&
statusNotification
,
Pistache
::
Http
::
ResponseWriter
&
response
)
=
0
;
};
}
// namespace oai::amf::api
#endif
/* NFStatusNotifyApi_H_ */
src/sbi/amf_server/impl/NFStatusNotifyApiImpl.cpp
0 → 100644
View file @
3e39da3e
/**
* Nsmf_EventExposure
* Session Management Event Exposure Service. © 2019, 3GPP Organizational
* Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved.
*
* The version of the OpenAPI document: 1.1.0.alpha-1
*
*
* NOTE: This class is auto generated by OpenAPI Generator
* (https://openapi-generator.tech). https://openapi-generator.tech Do not edit
* the class manually.
*/
/*
* 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 "NFStatusNotifyApiImpl.h"
#include "3gpp_29.500.h"
#include "logger.hpp"
#include "itti_msg_sbi.hpp"
itti_mw
*
itti_inst
=
nullptr
;
namespace
oai
{
namespace
amf
{
namespace
api
{
using
namespace
oai
::
amf
::
model
;
NFStatusNotifyApiImpl
::
NFStatusNotifyApiImpl
(
std
::
shared_ptr
<
Pistache
::
Rest
::
Router
>
rtr
,
amf_application
::
amf_app
*
amf_app_inst
,
std
::
string
address
)
:
NFStatusNotifyApi
(
rtr
),
m_amf_app
(
amf_app_inst
),
m_address
(
address
)
{}
void
NFStatusNotifyApiImpl
::
receive_pdu_session_status_notification
(
const
std
::
string
&
ueContextId
,
const
std
::
string
&
pduSessionId
,
const
SmContextStatusNotification
&
statusNotification
,
Pistache
::
Http
::
ResponseWriter
&
response
)
{
Logger
::
amf_server
().
debug
(
"Receive PDU Session Release notification, handling..."
);
// Generate a promise and associate this promise to the ITTI message
uint32_t
promise_id
=
m_amf_app
->
generate_promise_id
();
Logger
::
amf_n1
().
debug
(
"Promise ID generated %d"
,
promise_id
);
boost
::
shared_ptr
<
boost
::
promise
<
nlohmann
::
json
>>
p
=
boost
::
make_shared
<
boost
::
promise
<
nlohmann
::
json
>>
();
boost
::
shared_future
<
nlohmann
::
json
>
f
=
p
->
get_future
();
m_amf_app
->
add_promise
(
promise_id
,
p
);
// Handle the PDU Session Release in amf_app
std
::
shared_ptr
<
itti_sbi_pdu_session_release_notif
>
itti_msg
=
std
::
make_shared
<
itti_sbi_pdu_session_release_notif
>
(
TASK_AMF_SBI
,
TASK_AMF_APP
,
promise_id
);
itti_msg
->
http_version
=
1
;
itti_msg
->
promise_id
=
promise_id
;
itti_msg
->
smContextStatusNotification
=
statusNotification
;
int
ret
=
itti_inst
->
send_msg
(
itti_msg
);
if
(
0
!=
ret
)
{
Logger
::
amf_server
().
error
(
"Could not send ITTI message %s to task TASK_AMF_APP"
,
itti_msg
->
get_msg_name
());
}
boost
::
future_status
status
;
// wait for timeout or ready
status
=
f
.
wait_for
(
boost
::
chrono
::
milliseconds
(
FUTURE_STATUS_TIMEOUT_MS
));
if
(
status
==
boost
::
future_status
::
ready
)
{
assert
(
f
.
is_ready
());
assert
(
f
.
has_value
());
assert
(
!
f
.
has_exception
());
// Wait for the result from APP
// result includes json content and http response code
nlohmann
::
json
result
=
f
.
get
();
Logger
::
amf_server
().
debug
(
"Got result for promise ID %d"
,
promise_id
);
// process data
uint32_t
http_response_code
=
0
;
nlohmann
::
json
json_data
=
{};
if
(
result
.
find
(
"httpResponseCode"
)
!=
result
.
end
())
{
http_response_code
=
result
[
"httpResponseCode"
].
get
<
int
>
();
}
if
(
static_cast
<
http_response_codes_e
>
(
http_response_code
)
==
http_response_codes_e
::
HTTP_RESPONSE_CODE_200_OK
)
{
if
(
result
.
find
(
"content"
)
!=
result
.
end
())
{
json_data
=
result
[
"content"
];
}
response
.
headers
().
add
<
Pistache
::
Http
::
Header
::
ContentType
>
(
Pistache
::
Http
::
Mime
::
MediaType
(
"application/json"
));
response
.
send
(
Pistache
::
Http
::
Code
::
Ok
,
json_data
.
dump
().
c_str
());
}
else
{
// Problem details
if
(
result
.
find
(
"ProblemDetails"
)
!=
result
.
end
())
{
json_data
=
result
[
"ProblemDetails"
];
}
response
.
headers
().
add
<
Pistache
::
Http
::
Header
::
ContentType
>
(
Pistache
::
Http
::
Mime
::
MediaType
(
"application/problem+json"
));
response
.
send
(
Pistache
::
Http
::
Code
(
http_response_code
),
json_data
.
dump
().
c_str
());
}
}
}
}
// namespace api
}
// namespace amf
}
// namespace oai
src/sbi/amf_server/impl/NFStatusNotifyApiImpl.h
0 → 100644
View file @
3e39da3e
/**
* Nsmf_EventExposure
* Session Management Event Exposure Service. © 2019, 3GPP Organizational
* Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved.
*
* The version of the OpenAPI document: 1.1.0.alpha-1
*
*
* NOTE: This class is auto generated by OpenAPI Generator
* (https://openapi-generator.tech). https://openapi-generator.tech Do not edit
* the class manually.
*/
/*
* NFStatusNotifyApiImpl.h
*
*
*/
/*
* 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 NF_STATUS_NOTIFY_API_IMPL_H_
#define NF_STATUS_NOTIFY_API_IMPL_H_
#include <pistache/endpoint.h>
#include <pistache/http.h>
#include <pistache/router.h>
#include <memory>
#include <NFStatusNotifyApi.h>
#include <pistache/optional.h>
#include "ProblemDetails.h"
#include "amf_app.hpp"
namespace
oai
{
namespace
amf
{
namespace
api
{
using
namespace
oai
::
amf
::
model
;
class
NFStatusNotifyApiImpl
:
public
oai
::
amf
::
api
::
NFStatusNotifyApi
{
public:
NFStatusNotifyApiImpl
(
std
::
shared_ptr
<
Pistache
::
Rest
::
Router
>
,
amf_application
::
amf_app
*
amf_app_inst
,
std
::
string
address
);
~
NFStatusNotifyApiImpl
()
{}
void
receive_pdu_session_status_notification
(
const
std
::
string
&
ueContextId
,
const
std
::
string
&
pduSessionId
,
const
SmContextStatusNotification
&
statusNotification
,
Pistache
::
Http
::
ResponseWriter
&
response
);
private:
amf_application
::
amf_app
*
m_amf_app
;
std
::
string
m_address
;
};
}
// namespace api
}
// namespace amf
}
// namespace oai
#endif
src/sbi/amf_server/model/Cause.cpp
0 → 100644
View file @
3e39da3e
/**
* Nsmf_PDUSession
* SMF PDU Session Service. © 2019, 3GPP Organizational Partners (ARIB, ATIS,
* CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved.
*
* The version of the OpenAPI document: 1.1.0.alpha-1
*
*
* NOTE: This class is auto generated by OpenAPI Generator
* (https://openapi-generator.tech). https://openapi-generator.tech Do not edit
* the class manually.
*/
#include "Cause.h"
namespace
oai
{
namespace
amf
{
namespace
model
{
Cause
::
Cause
()
{}
Cause
::~
Cause
()
{}
void
Cause
::
validate
()
{
// TODO: implement validation
}
std
::
string
Cause
::
getValue
()
const
{
return
cause
;
}
void
Cause
::
setValue
(
const
std
::
string
&
value
)
{
cause
=
value
;
}
void
to_json
(
nlohmann
::
json
&
j
,
const
Cause
&
o
)
{
j
=
nlohmann
::
json
();
}
void
from_json
(
const
nlohmann
::
json
&
j
,
Cause
&
o
)
{
j
.
get_to
(
o
.
cause
);
}
}
// namespace model
}
// namespace amf
}
// namespace oai
src/sbi/amf_server/model/Cause.h
0 → 100644
View file @
3e39da3e
/**
* Nsmf_PDUSession
* SMF PDU Session Service. © 2019, 3GPP Organizational Partners (ARIB, ATIS,
* CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved.
*
* The version of the OpenAPI document: 1.1.0.alpha-1
*
*
* NOTE: This class is auto generated by OpenAPI Generator
* (https://openapi-generator.tech). https://openapi-generator.tech Do not edit
* the class manually.
*/
/*
* Cause.h
*
* Possible values are - REL_DUE_TO_HO - EPS_FALLBACK - REL_DUE_TO_UP_SEC -
* DNN_CONGESTION - S_NSSAI_CONGESTION - REL_DUE_TO_REACTIVATION -
* 5G_AN_NOT_RESPONDING - REL_DUE_TO_SLICE_NOT_AVAILABLE -
* REL_DUE_TO_DUPLICATE_SESSION_ID - PDU_SESSION_STATUS_MISMATCH - HO_FAILURE -
* INSUFFICIENT_UP_RESOURCES - PDU_SESSION_HANDED_OVER
*/
#ifndef Cause_H_
#define Cause_H_
#include <nlohmann/json.hpp>
namespace
oai
{
namespace
amf
{
namespace
model
{
/// <summary>
/// Possible values are - REL_DUE_TO_HO - EPS_FALLBACK - REL_DUE_TO_UP_SEC -
/// DNN_CONGESTION - S_NSSAI_CONGESTION - REL_DUE_TO_REACTIVATION -
/// 5G_AN_NOT_RESPONDING - REL_DUE_TO_SLICE_NOT_AVAILABLE -
/// REL_DUE_TO_DUPLICATE_SESSION_ID - PDU_SESSION_STATUS_MISMATCH - HO_FAILURE -
/// INSUFFICIENT_UP_RESOURCES - PDU_SESSION_HANDED_OVER
/// </summary>
class
Cause
{
public:
Cause
();
virtual
~
Cause
();
void
validate
();
/////////////////////////////////////////////
/// Cause members
std
::
string
getValue
()
const
;
void
setValue
(
const
std
::
string
&
value
);
friend
void
to_json
(
nlohmann
::
json
&
j
,
const
Cause
&
o
);
friend
void
from_json
(
const
nlohmann
::
json
&
j
,
Cause
&
o
);
protected:
std
::
string
cause
;
};
}
// namespace model
}
// namespace amf
}
// namespace oai
#endif
/* Cause_H_ */
src/sbi/amf_server/model/ResourceStatus.cpp
0 → 100644
View file @
3e39da3e
/**
* Nsmf_PDUSession
* SMF PDU Session Service. © 2019, 3GPP Organizational Partners (ARIB, ATIS,
* CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved.
*
* The version of the OpenAPI document: 1.1.0.alpha-1
*
*
* NOTE: This class is auto generated by OpenAPI Generator
* (https://openapi-generator.tech). https://openapi-generator.tech Do not edit
* the class manually.
*/
#include "ResourceStatus.h"
namespace
oai
{
namespace
amf
{
namespace
model
{
ResourceStatus
::
ResourceStatus
()
{}
ResourceStatus
::~
ResourceStatus
()
{}
void
ResourceStatus
::
validate
()
{
// TODO: implement validation
}
void
to_json
(
nlohmann
::
json
&
j
,
const
ResourceStatus
&
o
)
{
j
=
nlohmann
::
json
();
}
void
from_json
(
const
nlohmann
::
json
&
j
,
ResourceStatus
&
o
)
{}
}
// namespace model
}
// namespace amf
}
// namespace oai
src/sbi/amf_server/model/ResourceStatus.h
0 → 100644
View file @
3e39da3e
/**
* Nsmf_PDUSession
* SMF PDU Session Service. © 2019, 3GPP Organizational Partners (ARIB, ATIS,
* CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved.
*
* The version of the OpenAPI document: 1.1.0.alpha-1
*
*
* NOTE: This class is auto generated by OpenAPI Generator
* (https://openapi-generator.tech). https://openapi-generator.tech Do not edit
* the class manually.
*/
/*
* ResourceStatus.h
*
* Possible values are - RELEASED
*/
#ifndef ResourceStatus_H_
#define ResourceStatus_H_
#include <nlohmann/json.hpp>
namespace
oai
{
namespace
amf
{
namespace
model
{
/// <summary>
/// Possible values are - RELEASED
/// </summary>
class
ResourceStatus
{
public:
ResourceStatus
();
virtual
~
ResourceStatus
();
void
validate
();
/////////////////////////////////////////////
/// ResourceStatus members
friend
void
to_json
(
nlohmann
::
json
&
j
,
const
ResourceStatus
&
o
);
friend
void
from_json
(
const
nlohmann
::
json
&
j
,
ResourceStatus
&
o
);
protected:
};
}
// namespace model
}
// namespace amf
}
// namespace oai
#endif
/* ResourceStatus_H_ */
src/sbi/amf_server/model/SmContextStatusNotification.cpp
0 → 100644
View file @
3e39da3e
/**
* Nsmf_PDUSession
* SMF PDU Session Service. © 2019, 3GPP Organizational Partners (ARIB, ATIS,
* CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved.
*
* The version of the OpenAPI document: 1.1.0.alpha-1
*
*
* NOTE: This class is auto generated by OpenAPI Generator
* (https://openapi-generator.tech). https://openapi-generator.tech Do not edit
* the class manually.
*/
#include "SmContextStatusNotification.h"
namespace
oai
{
namespace
amf
{
namespace
model
{
SmContextStatusNotification
::
SmContextStatusNotification
()
{}
SmContextStatusNotification
::~
SmContextStatusNotification
()
{}
void
SmContextStatusNotification
::
validate
()
{
// TODO: implement validation
}
void
to_json
(
nlohmann
::
json
&
j
,
const
SmContextStatusNotification
&
o
)
{
j
=
nlohmann
::
json
();
j
[
"statusInfo"
]
=
o
.
m_StatusInfo
;
}
void
from_json
(
const
nlohmann
::
json
&
j
,
SmContextStatusNotification
&
o
)
{
j
.
at
(
"statusInfo"
).
get_to
(
o
.
m_StatusInfo
);
}
StatusInfo
SmContextStatusNotification
::
getStatusInfo
()
const
{
return
m_StatusInfo
;
}
void
SmContextStatusNotification
::
setStatusInfo
(
StatusInfo
const
&
value
)
{
m_StatusInfo
=
value
;
}
}
// namespace model
}
// namespace amf
}
// namespace oai
src/sbi/amf_server/model/SmContextStatusNotification.h
0 → 100644
View file @
3e39da3e
/**
* Nsmf_PDUSession
* SMF PDU Session Service. © 2019, 3GPP Organizational Partners (ARIB, ATIS,
* CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved.
*
* The version of the OpenAPI document: 1.1.0.alpha-1
*
*
* NOTE: This class is auto generated by OpenAPI Generator
* (https://openapi-generator.tech). https://openapi-generator.tech Do not edit
* the class manually.
*/
/*
* SmContextStatusNotification.h
*
*
*/
#ifndef SmContextStatusNotification_H_
#define SmContextStatusNotification_H_
#include "StatusInfo.h"
#include <nlohmann/json.hpp>
namespace
oai
{
namespace
amf
{
namespace
model
{
/// <summary>
///
/// </summary>
class
SmContextStatusNotification
{
public:
SmContextStatusNotification
();
virtual
~
SmContextStatusNotification
();
void
validate
();
/////////////////////////////////////////////
/// SmContextStatusNotification members
/// <summary>
///
/// </summary>
StatusInfo
getStatusInfo
()
const
;
void
setStatusInfo
(
StatusInfo
const
&
value
);
friend
void
to_json
(
nlohmann
::
json
&
j
,
const
SmContextStatusNotification
&
o
);
friend
void
from_json
(
const
nlohmann
::
json
&
j
,
SmContextStatusNotification
&
o
);
protected:
StatusInfo
m_StatusInfo
;
};
}
// namespace model
}
// namespace amf
}
// namespace oai
#endif
/* SmContextStatusNotification_H_ */
src/sbi/amf_server/model/StatusInfo.cpp
0 → 100644
View file @
3e39da3e
/**
* Nsmf_PDUSession
* SMF PDU Session Service. © 2019, 3GPP Organizational Partners (ARIB, ATIS,
* CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved.
*
* The version of the OpenAPI document: 1.1.0.alpha-1
*
*
* NOTE: This class is auto generated by OpenAPI Generator
* (https://openapi-generator.tech). https://openapi-generator.tech Do not edit
* the class manually.
*/
#include "StatusInfo.h"
namespace
oai
{
namespace
amf
{
namespace
model
{
StatusInfo
::
StatusInfo
()
{
m_CauseIsSet
=
false
;
}
StatusInfo
::~
StatusInfo
()
{}
void
StatusInfo
::
validate
()
{
// TODO: implement validation
}
void
to_json
(
nlohmann
::
json
&
j
,
const
StatusInfo
&
o
)
{
j
=
nlohmann
::
json
();
j
[
"resourceStatus"
]
=
o
.
m_ResourceStatus
;
if
(
o
.
causeIsSet
())
j
[
"cause"
]
=
o
.
m_Cause
;
}
void
from_json
(
const
nlohmann
::
json
&
j
,
StatusInfo
&
o
)
{
j
.
at
(
"resourceStatus"
).
get_to
(
o
.
m_ResourceStatus
);
if
(
j
.
find
(
"cause"
)
!=
j
.
end
())
{
j
.
at
(
"cause"
).
get_to
(
o
.
m_Cause
);
o
.
m_CauseIsSet
=
true
;
}
}
ResourceStatus
StatusInfo
::
getResourceStatus
()
const
{
return
m_ResourceStatus
;
}
void
StatusInfo
::
setResourceStatus
(
ResourceStatus
const
&
value
)
{
m_ResourceStatus
=
value
;
}
Cause
StatusInfo
::
getCause
()
const
{
return
m_Cause
;
}
void
StatusInfo
::
setCause
(
Cause
const
&
value
)
{
m_Cause
=
value
;
m_CauseIsSet
=
true
;
}
bool
StatusInfo
::
causeIsSet
()
const
{
return
m_CauseIsSet
;
}
void
StatusInfo
::
unsetCause
()
{
m_CauseIsSet
=
false
;
}
}
// namespace model
}
// namespace amf
}
// namespace oai
src/sbi/amf_server/model/StatusInfo.h
0 → 100644
View file @
3e39da3e
/**
* Nsmf_PDUSession
* SMF PDU Session Service. © 2019, 3GPP Organizational Partners (ARIB, ATIS,
* CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved.
*
* The version of the OpenAPI document: 1.1.0.alpha-1
*
*
* NOTE: This class is auto generated by OpenAPI Generator
* (https://openapi-generator.tech). https://openapi-generator.tech Do not edit
* the class manually.
*/
/*
* StatusInfo.h
*
*
*/
#ifndef StatusInfo_H_
#define StatusInfo_H_
#include "Cause.h"
#include "ResourceStatus.h"
#include <nlohmann/json.hpp>
namespace
oai
{
namespace
amf
{
namespace
model
{
/// <summary>
///
/// </summary>
class
StatusInfo
{
public:
StatusInfo
();
virtual
~
StatusInfo
();
void
validate
();
/////////////////////////////////////////////
/// StatusInfo members
/// <summary>
///
/// </summary>
ResourceStatus
getResourceStatus
()
const
;
void
setResourceStatus
(
ResourceStatus
const
&
value
);
/// <summary>
///
/// </summary>
Cause
getCause
()
const
;
void
setCause
(
Cause
const
&
value
);
bool
causeIsSet
()
const
;
void
unsetCause
();
friend
void
to_json
(
nlohmann
::
json
&
j
,
const
StatusInfo
&
o
);
friend
void
from_json
(
const
nlohmann
::
json
&
j
,
StatusInfo
&
o
);
protected:
ResourceStatus
m_ResourceStatus
;
Cause
m_Cause
;
bool
m_CauseIsSet
;
};
}
// namespace model
}
// namespace amf
}
// namespace oai
#endif
/* StatusInfo_H_ */
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