# this is used by CI jobs to apply a tag when it builds the image
---
-tag: '1.0.2'
+tag: '1.0.3'
| **Date** | **Ver.** | **Author** | **Comment** |
| | | | |
+--------------------+--------------------+--------------------+--------------------+
-| 2020-21-05 | 1.0.2 | Shraboni Jana | Second draft |
+| 2020-21-05 | 1.0.3 | Shraboni Jana | Third draft |
| | | | |
+--------------------+--------------------+--------------------+--------------------+
"image": {
"registry": "nexus3.o-ran-sc.org:10002",
"name": "o-ran-sc/ric-app-hw",
- "tag": "1.0.2"
+ "tag": "1.0.3"
}
}
],
"rxMessages": [
"RIC_SUB_RESP",
"A1_POLICY_REQ", "RIC_HEALTH_CHECK_REQ"
- ]
+ ],
+ "policies": [1]
}
}
mdclog_write(MDCLOG_ERR, "Error : %s, %d:: Could not extract policy type id from %s\n", __FILE__, __LINE__, message);
return false;
}
- helper.policy_type_id = ref2->GetString();
+ //helper.policy_type_id = ref2->GetString();
+ helper.policy_type_id = to_string(ref2->GetInt());
- // Extract policy instance id
+ // Extract policy instance id
rapidjson::Pointer temp("/policy_instance_id");
rapidjson::Value * ref = temp.Get(doc);
if (ref == NULL){
int32_t message_type;
int32_t state;
int32_t payload_length;
- unsigned char sid[RMR_MAX_SID]; //sender ID for return to sender needs.(ACKS required)[RMR_MAX_SID]
- unsigned char src[RMR_MAX_SRC]; //name of the sender (source)[RMR_MAX_SRC]
+ unsigned char sid[RMR_MAX_SID]; //Subscription ID.
+ unsigned char src[RMR_MAX_SRC]; //Xapp Name
unsigned char meid[RMR_MAX_MEID]={};
} xapp_rmr_header;
template <class MessageProcessor>
void xapp_rmr_receive(MessageProcessor&&, XappRmr *parent);
- template <class MessageProcessor>
- void xapp_test_receiver(MessageProcessor&&, XappRmr *parent);
bool xapp_rmr_send(xapp_rmr_header*, void*);
bool rmr_header(xapp_rmr_header*);
msgproc(this->_xapp_received_buff, resend);
if(*resend){
- //mdclog_write(MDCLOG_INFO,"RMR Return to Sender Message of Type: %d",this->_xapp_received_buff->mtype);
- //mdclog_write(MDCLOG_INFO,"RMR Return to Sender Message: %s",(char*)this->_xapp_received_buff->payload);
+ mdclog_write(MDCLOG_INFO,"RMR Return to Sender Message of Type: %d",this->_xapp_received_buff->mtype);
+ mdclog_write(MDCLOG_INFO,"RMR Return to Sender Message: %s",(char*)this->_xapp_received_buff->payload);
rmr_rts_msg(rmr_context, this->_xapp_received_buff );
sleep(1);
*resend = false;
int policy_id = HELLOWORLD_POLICY_ID;
- std::string policy_query = "{\"policy_id\":" + std::to_string(policy_id) + "}";
+ std::string policy_query = "{\"policy_type_id\":" + std::to_string(policy_id) + "}";
unsigned char * message = (unsigned char *)calloc(policy_query.length(), sizeof(unsigned char));
memcpy(message, policy_query.c_str(), policy_query.length());
xapp_rmr_header header;
TEST(Xapp, A1HealthCheck){
//Read the json file and send it using rmr.
- string json = "{\"policy_type_id\": \"1\",\"policy_instance_id\":\"3d2157af-6a8f-4a7c-810f-38c2f824bf12\",\"operation\": \"CREATE\"}";
+ //string json = "{\"policy_type_id\": \"1\",\"policy_instance_id\":\"3d2157af-6a8f-4a7c-810f-38c2f824bf12\",\"operation\": \"CREATE\"}";
+ string json = "{\"operation\": \"CREATE\", \"policy_type_id\": 1, \"policy_instance_id\": \"hwpolicy321\", \"payload\": {\"threshold\": 5}}";
int n = json.length();
char strMsg[n + 1];
strcpy(strMsg, json.c_str());