Latish,

The payload has to have this format:

"payload": "{\"vm-id\":\"{{vm-id}}\"}"

See example below (it is for modify config but you can customize it):

"payload": "{\"request-parameters\":{\"vnf-host-ip-address\":\"10.0.60.2\"}, 
\"configuration-parameters\": {\"active-streams\":\"7\"}}"

Also, for OpenStack action you can either use the VM ID or the selflink to the 
vServer in AAI.

Marco

From: <[email protected]> on behalf of BRIAN FREEMAN <[email protected]>
Reply-To: "[email protected]" <[email protected]>, BRIAN 
FREEMAN <[email protected]>
Date: Thursday, April 25, 2019 at 9:00 AM
To: "[email protected]" <[email protected]>, 
"[email protected]" <[email protected]>, Lathish 
<[email protected]>
Subject: Re: [onap-discuss] #appc Unable to execute stop lcm operation from APPC

***Security Advisory: This Message Originated Outside of AT&T ***
Reference http://cso.att.com/EmailSecurity/IDSP.html for more information.


Isnt payload a json encoded string ?


https://gerrit.onap.org/r/gitweb?p=ccsdk/sli/northbound.git;a=blob;f=lcm/model/src/main/yang/lcm.yang;h=a03fff60754adaa8feff2ab182d96373baf7f541;hb=refs/heads/casablanca<https://urldefense.proofpoint.com/v2/url?u=https-3A__gerrit.onap.org_r_gitweb-3Fp-3Dccsdk_sli_northbound.git-3Ba-3Dblob-3Bf-3Dlcm_model_src_main_yang_lcm.yang-3Bh-3Da03fff60754adaa8feff2ab182d96373baf7f541-3Bhb-3Drefs_heads_casablanca&d=DwQGaQ&c=LFYZ-o9_HUMeMTSQicvjIg&r=KgFIQiUJzSC0gUhJaQxg8eC3w16GC3sKgWIcs4iIee0&m=tN6dEpsQF0gm5f2qLvYtabjpFIdon6M1gjYVn8wXPg8&s=FtwcyusausxZnxVetby1ORWlvAlItW6ws8ryqw2gdLA&e=>

  78     typedef payload {
  79            type string ;
  80            description "The payload can be any valid JSON string value. 
Json escape characters need to be added when required to include an inner json 
within the payload to make it a valid json string value";
  81     }
  82

From: [email protected] <[email protected]> On Behalf Of 
Gopigiri, Sirisha via Lists.Onap.Org
Sent: Thursday, April 25, 2019 5:09 AM
To: Lathish <[email protected]>; [email protected]
Subject: Re: [onap-discuss] #appc Unable to execute stop lcm operation from APPC

Hi Brian,

Except Ansible Server pod all the other pods are running. I am able to execute 
the mysql commands in the DB pod. I redeployed appc still facing the same 
issue.And the sequence of the pods are appc-db, appc and then ansible pod.  Not 
sure what failed.

Hi Lathish,

There are no entries in VNF_DG_MAPPING table, I have inserted manually. And now 
I could see the same Invalid URL error in both of my setups which has 
underlying VIM as https and http.

Hi Steve,

I am trying to execute restart LCM operation and it is supported by both 
VNF/VM. And according to the doc there should be vm-id sent in payload. But 
when I send the vm-id in the payload I could see that request is not being 
accepted with schema error and 400 error response code.

Here is the request payload I am using for restart appc

{
  "input": {
    "common-header": {
      "timestamp": "2019-04-25T06:05:04.244Z",
      "api-ver": "2.00",
      "originator-id": "664be3d2-6c12-4f4b-a3e7-c349acced200",
      "request-id": "664be3d2-6c12-4f4b-a3e7-c349acced200",
      "sub-request-id": "1",
      "flags": {
          "force" : "TRUE",
          "ttl" : 60000
      }
    },
    "action": "Restart",
    "action-identifiers": {
      "vnf-id":"d86f68e7-9cb2-48cc-b82d-ffd54602b91b"
    },
    "payload":{
       
"vm-id":"http://x.x.x.x:yyyy/v2.1/servers/88b65041-81d6-41bc-b6ff-3785e461541e<https://urldefense.proofpoint.com/v2/url?u=http-3A__x.x.x.x-3Ayyyy_v2.1_servers_88b65041-2D81d6-2D41bc-2Db6ff-2D3785e461541e&d=DwQFaQ&c=LFYZ-o9_HUMeMTSQicvjIg&r=e3d1ehx3DI5AoMgDmi2Fzw&m=kKrjSEHprbnIx2qqrwfLgdBnMWh3y2f5D5NdkOUX8wk&s=1f0L7wQRlmyhU35skw7FG5HPlv7UCI-g9xiq4ONZABQ&e=>"
    }
  }
}

And here is the error message I see when I send payload field in request.

{
 "errors": {
   "error": [
     {
       "error-type": "protocol",
       "error-tag": "malformed-message",
       "error-message": "Error parsing input: Schema node with name vm-id was 
not found under (org:onap:appc:lcm?revision=2016-01-08)payload.",
       "error-info": "Schema node with name vm-id was not found under 
(org:onap:appc:lcm?revision=2016-01-08)payload."
     }
   ]
 }
}

Without payload field in the request payload I get Invalid URL error in APPC 
logs.

Am I missing anything in the request payload that is sent to APPC?

Thank you in advance!

Regards
Sirisha Gopigiri


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#16724): https://lists.onap.org/g/onap-discuss/message/16724
Mute This Topic: https://lists.onap.org/mt/31222663/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]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to