+func nbGetAllXappsDefCfg(session *C.sr_session_ctx_t, parent **C.char) {
+ var xappNameList []string
+ var xappCfgList []string
+
+ //Get the default config of all deployed xapps from appgmr using rest api
+ xappNameList, xappCfgList = sbiClient.GetAllDeployedXappsConfig()
+ if xappCfgList == nil || len(xappCfgList) == 0 {
+ log.Error("GetAllDeployedXappsConfig() Failure")
+ return
+ }
+ log.Info("GetAllDeployedXappsConfig Success, recvd xapp config")
+
+ //Loop thru the list of recvd xapps for config
+ for i, xappCfg := range xappCfgList {
+ path := fmt.Sprintf("/o-ran-sc-ric-xapp-desc-v1:ric/configuration/xapps/xapp[name='%s']", xappNameList[i])
+ nbiClient.CreateNewElement(session, parent, path, "name", xappNameList[i])
+ nbiClient.CreateNewElement(session, parent, path, "config", xappCfg)
+ }
+}
+