Configuring SNIRO Emulator for vCPE Testing
The SNIRO Emulator is a mock application that accepts a homing request from SO when the service request has a homing solution setting of "sniro".
The mock class accepts with a HTTP 200 and then calls SO back with the pay load.
There is a great wiki page on the SNIRO Emulator SNIRO Emulator.
To configure the sniro emulator you need to base64 encode the payload and submit it as a POST to the emulator http://[k8shost]:30288/__admin/mappings
You can view the results via a GET to the same url.
The base64 encoding/decoding can be done on any of the online encoder/decoders.
base64Body before base64 encoding:
{"requestState": "complete", "transactionId": "111-111-1112", "solutionInfo": {"placementInfo": [{"assignmentInfo": [{"variableName": "cloudOwner", "variableValue": "CloudOwner"}, {"variableName": "vnfHostName", "variableValue": "vnfHostName"}], "cloudRegionId": "RegionOne", "isRehome": "False", "resourceModuleName": "vcpear_tunnelxconn_1103a 0", "serviceResourceId": "TUNNEL-RESOURCE-ID-REPLACE", "inventoryType": "service", "serviceInstanceId": "26f3c6d4-f07f-4384-a15f-f0a7064fc567"}, {"assignmentInfo": [{"variableName": "cloudOwner", "variableValue": "CloudOwner"}, {"variableName": "vnfHostName", "variableValue": "vnfHostName"}], "cloudRegionId": "RegionOne", "isRehome": "False", "resourceModuleName": "vcpevsp_vgw 0", "serviceResourceId": "VGW-RESOURCE-ID-REPLACE", "inventoryType": "cloud", "serviceInstanceId": "vG-service-instance-id"}, {"assignmentInfo": [{"variableName": "cloudOwner", "variableValue": "CloudOwner"}, {"variableName": "vnfHostName", "variableValue": "vnfHostName"}], "cloudRegionId": "RegionOne", "isRehome": "False", "resourceModuleName": "vcpear_brg_1103a 0", "serviceResourceId": "BRG-RESOURCE-ID-REPLACE", "inventoryType": "service", "serviceInstanceId": "59e031f0-92ce-4c72-8498-b7c317b84509"}]}, "statusMessage": "", "requestId": "111-111-1111"}
Full POST body with base64Body encoded
{
"id": "6c35f1db-887e-4881-acf8-5e65afdf8eb1",
"request": {
"urlPath": "/sniro/api/v2/placement",
"method": "POST"
},
"response": {
"status": 202,
"body": "{\"requestId\": \"1111-111-11\"}"
},
"uuid": "6c35f1db-887e-4881-acf8-5e65afdf8eb1",
"postServeActions": {
"webhook": {
"headers": {
"Content-Type": "application/json"
},
"method": "POST",
"base64Body": "eyJyZXF1ZXN0U3RhdGUiOiAiY29tcGxldGUiLCAidHJhbnNhY3Rpb25JZCI6ICIxMTEtMTExLTExMTIiLCAic29sdXRpb25JbmZvIjogeyJwbGFjZW1lbnRJbmZvIjogW3siYXNzaWdubWVudEluZm8iOiBbeyJ2YXJpYWJsZU5hbWUiOiAiY2xvdWRPd25lciIsICJ2YXJpYWJsZVZhbHVlIjogIkNsb3VkT3duZXIifSwgeyJ2YXJpYWJsZU5hbWUiOiAidm5mSG9zdE5hbWUiLCAidmFyaWFibGVWYWx1ZSI6ICJ2bmZIb3N0TmFtZSJ9XSwgImNsb3VkUmVnaW9uSWQiOiAiUmVnaW9uT25lIiwgImlzUmVob21lIjogIkZhbHNlIiwgInJlc291cmNlTW9kdWxlTmFtZSI6ICJ2Y3BlYXJfdHVubmVseGNvbm5fMTEwM2EgMCIsICJzZXJ2aWNlUmVzb3VyY2VJZCI6ICJUVU5ORUwtUkVTT1VSQ0UtSUQtUkVQTEFDRSIsICJpbnZlbnRvcnlUeXBlIjogInNlcnZpY2UiLCAic2VydmljZUluc3RhbmNlSWQiOiAiMjZmM2M2ZDQtZjA3Zi00Mzg0LWExNWYtZjBhNzA2NGZjNTY3In0sIHsiYXNzaWdubWVudEluZm8iOiBbeyJ2YXJpYWJsZU5hbWUiOiAiY2xvdWRPd25lciIsICJ2YXJpYWJsZVZhbHVlIjogIkNsb3VkT3duZXIifSwgeyJ2YXJpYWJsZU5hbWUiOiAidm5mSG9zdE5hbWUiLCAidmFyaWFibGVWYWx1ZSI6ICJ2bmZIb3N0TmFtZSJ9XSwgImNsb3VkUmVnaW9uSWQiOiAiUmVnaW9uT25lIiwgImlzUmVob21lIjogIkZhbHNlIiwgInJlc291cmNlTW9kdWxlTmFtZSI6ICJ2Y3BldnNwX3ZndyAwIiwgInNlcnZpY2VSZXNv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