Add an NF
/rest/{versionId}/inventory/nf-mgmt/nfs
Request
Response
200 Response
400 Response
401 Response
403 Response
404 Response
409 Response
500 Response
Examples
Examples of Accessing the API
See Authenticate page to acquire a token.
The following example shows how to use curl to add an NF.
curl -X POST \
-d @request.json \
-H @auth_header.txt \
"https://<tenant-url>/<tenant-name>/osdmc/ums/rest/<versionId>/inventory/nf-mgmt/nfs"The following example shows how to use Python to add an NF.
import requests
import json
headers = {
"Accept": "application/json",
"Authorization": "Bearer <auth-token>"
}
with open("request.json") as f: data = json.load(f)
url = "https://<tenant-url>/<tenant-name>/osdmc/ums/rest/<versionId>/inventory/nf-mgmt/nfs"
resp = requests.post(url, headers=headers, data=data)Example of the Request Body
The following shows an example of the contents of the request file sent as the request body.
{
"name": "ME-6-NEW",
"parentGroupFullName": "Home",
"associatedSiteName": "local",
"nfCategory": {
"name": "Session Monitor",
"product": "Monitoring",
"vendor": "Oracle"
},
"nfType": {
"name": "Mediation Engine"
},
"parameters": [
{
"name": "primary.ip",
"value": "192.0.2.10"
},
{
"name": "token",
"value": "admin;5f9c64f2cb6e48682ed21c1a4b"
}
]
}
Example of the Response Body
The following example shows the contents of the response body.
{
"children": [
{
"id": "42",
"ipAddress": "192.0.2.10",
"name": "ME-6-NEW",
"parentGroupFullName": "Home/ME-6-NEW",
"parentGroupId": "62"
}
],
"groupType": "DEVICE",
"id": "62",
"name": "ME-6-NEW",
"nfCategory": {
"id": "3",
"name": "Session Monitor",
"product": "Monitoring",
"vendor": "Oracle"
},
"nfType": {
"name": "Mediation Engine"
},
"parentGroupFullName": "Home",
"parentGroupId": "1"
}
Example 2 of Accessing this API
This example shows adding a Session Border Controller and including addDeviceToConfigMgr.
curl -X POST \
-d @request.json \
-H @auth_header.txt \
"https://<tenant-url>/<tenant-name>/osdmc/ums/rest/<versionId>/inventory/nf-mgmt/nfs"The following shows an example of the request body.
{
"name": "sbc28",
"parentGroupFullName": "Home",
"associatedSiteName": "local",
"addDeviceToConfigMgr": "True",
"nfCategory": {
"name": "SP Edge & Core",
"product": "Session Delivery",
"vendor": "Oracle"
},
"nfType": {
"name": "Device"
},
"parameters": [
{
"name": "primary.ip",
"value": "192.0.2.10"
},
{
"name": "snmp.community.name",
"value": "abhisikj"
},
{
"name": "snmp.port",
"value": "161"
},
{
"name": "username",
"value": "admin"
},
{
"name": "snmp.mode",
"value": "v1v2"
},
{
"name": "password",
"value": "****"
}
]
}
The following shows an example response.
{
"children": [
{
"id": "6",
"ipAddress": "192.0.2.10",
"name": "osdmc-vsbc28",
"parentGroupFullName": "Home/sbc28",
"parentGroupId": "26"
}
],
"groupType": "DEVICE",
"id": "26",
"name": "sbc28",
"nfCategory": {
"id": "1",
"name": "SP Edge & Core",
"product": "Session Delivery",
"vendor": "Oracle"
},
"nfType": {
"name": "Device"
},
"parentGroupFullName": "Home",
"parentGroupId": "1"
}
Example 3 of Accessing this API
This example shows adding an HA pair of Enterprise Session Border Controllers.
curl -X POST \
-d @request.json \
-H @auth_header.txt \
"https://<tenant-url>/<tenant-name>/osdmc/ums/rest/<versionId>/inventory/nf-mgmt/nfs"The following shows an example of the request body.
{
"name": "esbcHAPair_21_22",
"parentGroupFullName": "Home",
"associatedSiteName": "local",
"nfCategory": {
"name": "Enterprise Edge & Core",
"product": "ESBC/ECB",
"vendor": "Oracle"
},
"nfType": {
"name": "ESBC"
},
"parameters": [
{
"name": "primary.ip",
"value": "192.0.2.10"
},
{
"name": "secondary.ip",
"value": "192.0.2.10"
},
{
"name": "snmp.community.name",
"value": "abhisikj"
},
{
"name": "snmp.port",
"value": "161"
},
{
"name": "username",
"value": "admin"
},
{
"name": "password",
"value": "****"
}
]
}
The following shows an example response.
{
"children": [
{
"id": "13",
"ipAddress": "192.0.2.10",
"name": "OSDMC-SBC-20",
"parentGroupFullName": "Home/esbcHAPair_21_22",
"parentGroupId": "49"
},
{
"id": "14",
"ipAddress": "192.0.2.10",
"name": "OSDMC-SBC-21",
"parentGroupFullName": "Home/esbcHAPair_21_22",
"parentGroupId": "49"
}
],
"groupType": "DEVICE",
"id": "49",
"name": "esbcHAPair_21_22",
"nfCategory": {
"id": "2",
"name": "Enterprise Edge & Core",
"product": "ESBC/ECB",
"vendor": "Oracle"
},
"nfType": {
"name": "ESBC"
},
"parentGroupFullName": "Home",
"parentGroupId": "1"
}