Alexis,
Are you using CDT? What is your setup? I ran this fine in the past from Postman:
{
"input": {
"common-header": {
"timestamp": "{{serverDate}}",
"api-ver": "2.05",
"originator-id": "{{orginatorId}}",
"request-id": "Postman",
"sub-request-id": "Postman",
"flags": {
"mode": "NORMAL",
"force": "TRUE",
"ttl": 36000
}
},
"action": "Restart",
"action-identifiers": {
"vnf-id": "{{vnf-id}}",
"vserver-id":"{{vserver-id}}"
},
"payload": "{\"vm-id\":\"{{vm-id}}\"}"
}
}
I have a pre-request script like this:
// Get the current DateTime
var moment = require('moment');
var date = new Date().toISOString();
var newdate = moment(date).subtract(80, 'minutes').toISOString();
var serverDate = moment(newdate).format('YYYY-MM-DDTHH:mm:ss.SS');
pm.globals.set("serverDate", serverDate+'Z');
//Get UUID
var uuid = require('uuid');
var orginatorId = uuid.v4();
pm.globals.set("orginatorId",orginatorId);
//Set IDs and payload values
pm.globals.set("vm-id","http://x.y.z.com:8774/v2/3f2aaef74ecb4b19b35e26d0849fe9a2/servers/e7f1db09-ff78-44fc-b256-69095c5556fb");
pm.globals.set("vserver-id","e7f1db09-ff78-44fc-b256-69095c5556fb");
pm.globals.set("vnf-id","17044ef4-e7f3-46a1-af03-e2aa562f23ac");
Marco
From: <[email protected]> on behalf of Alexis de Talhouet
<[email protected]>
Reply-To: "[email protected]" <[email protected]>,
"[email protected]" <[email protected]>
Date: Thursday, May 16, 2019 at 11:03 AM
To: BRIAN FREEMAN <[email protected]>
Cc: onap-discuss <[email protected]>,
"[email protected]"
<[email protected]>, "CHO, TAKAMUNE" <[email protected]>
Subject: Re: APPC -> RE: [onap-discuss] #appc Unable to execute stop lcm
operation from APPC
Yes, agreed. Using Casablanca 3.0.1-ONAP version of APPC
On May 16, 2019, at 11:01 AM, FREEMAN, BRIAN D
<[email protected]<mailto:[email protected]>> wrote:
Alexis,
Agree you shouldnt have to tweak the DG. Seems like the decoding before calling
the DG isnt firing quite right for some reason in your Casablanca instance.
Brian
From: Alexis de Talhouët
<[email protected]<mailto:[email protected]>>
Sent: Thursday, May 16, 2019 10:59 AM
To: FREEMAN, BRIAN D <[email protected]<mailto:[email protected]>>
Cc: onap-discuss
<[email protected]<mailto:[email protected]>>;
[email protected]<mailto:[email protected]>;
CHO, TAKAMUNE <[email protected]<mailto:[email protected]>>
Subject: Re: APPC -> RE: [onap-discuss] #appc Unable to execute stop lcm
operation from APPC
Taka, I understand you ran testing, I would need to look into that. Also, note,
I’m using Casablanca.
Attribute (input.common-header.api-ver), value (2.00)
Attribute (input.action-identifiers.service-instance-id), value ()
Attribute (input.action-identifiers.vserver-id), value
(c82153dc-8d84-4e69-9673-5e0a60030779)
Attribute (input.common-header.sub-request-id), value ()
Attribute (input.common-header.request-id), value
(873aacdf-1d85-4e07-8deb-7815776bbd35)
Attribute (input.common-header.timestamp), value (2019-05-16T14:00:43.177Z)
Attribute (input.payload), value ({"vm-id":
"http://10.195.194.213:8774/v2.1/7320ec4a5b9d4589ba7c4412ccfd290f/servers/c82153dc-8d84-4e69-9673-5e0a60030779<https://urldefense.proofpoint.com/v2/url?u=http-3A__10.195.194.213-3A8774_v2.1_7320ec4a5b9d4589ba7c4412ccfd290f_servers_c82153dc-2D8d84-2D4e69-2D9673-2D5e0a60030779&d=DwMFaQ&c=LFYZ-o9_HUMeMTSQicvjIg&r=e3d1ehx3DI5AoMgDmi2Fzw&m=CaLRZEYuCPO4aPg9KDm2xryvAJvxWt9jLlBr9EQh4Jw&s=7vbWQDZc7Nt_7paMGBEtfuZzEvmJvmB1ixM94GVQsGw&e=>"})
Attribute (currentGraph), value (SvcLogicGraph [module=APPC, rpc=VM_Start,
mode=sync, version=2.0.0, md5sum=1cd3041dc9487e5abf527ee778af1bdc])
Attribute (input.action-identifiers.vnf-id), value (VNF_demo_steve)
Attribute (input.action-identifiers.vnfc-name), value ()
Attribute (input.action), value (Start)
Attribute (input.action-identifiers.vf-module-id), value ()
Attribute (input.common-header.originator-id), value (appc)
Attribute (isBwcMode), value (false)
It looks like `input.payload`, which is a JSON, isn’t converted to SLI ctx.
`vm-id` that is looked for
2019-05-16 14:00:45,820 | DEBUG | ppc-dispatcher-6 | ExecuteNodeExecutor
| 222 - org.onap.ccsdk.sli.core.sli-provider - 0.3.3 | Parameter
org.onap.appc.instance.url = (atom<CONTEXT_VAR> (variable-term vm-id)) resolves
to
isn’t within the context at all. I tweaked the DG to run a jsonStringToCtx
using `input.payload` and then it worked. I also had to change vm-id to the
output of jsonStringToCtx.vm-id…
But if there is a recipe I missed, I’d love to hear about it.
Thanks,
Alexis
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#17091): https://lists.onap.org/g/onap-discuss/message/17091
Mute This Topic: https://lists.onap.org/mt/31641303/21656
Mute #appc: https://lists.onap.org/mk?hashtag=appc&subid=2740164
Group Owner: [email protected]
Unsubscribe: https://lists.onap.org/g/onap-discuss/unsub
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-