Hi Alexis, Correct. Here are the right contents:
[cid:image001.jpg@01D40267.5CE8E180] Taka From: Alexis de Talhouët [mailto:adetalhoue...@gmail.com] Sent: Tuesday, June 12, 2018 2:28 PM To: CHO, TAKAMUNE <tc0...@att.com> Cc: onap-discuss <onap-discuss@lists.onap.org> Subject: Re: [onap-discuss] [APP-C][CDT] - What is the expected payload for ANSIBLE? Sorry if this is going in many direction. I just confirm that the change I’ve made to the GENERATE_CONFIG_DG column is not required, this can remain NULL instead of Generic_AnsibleDG. On Jun 12, 2018, at 2:15 PM, Alexis de Talhouët <adetalhoue...@gmail.com<mailto:adetalhoue...@gmail.com>> wrote: Actually, I also tweaked to DB tables, to have GENERATE_CONFIG_DG be Generic_AnsibleDG and DOWNLOAD_CONFIG_DG be ansible-adapter-1.0 In sdnctl.CONFIGURE_ACTION_DG | CONFIGURE_ACTION_DG_ID | VNF_TYPE | ACTION | GENERATE_CONFIG_DG | DOWNLOAD_CONFIG_DG | | 19 | vlns/vmx 0 | ConfigModify | Generic_AnsibleDG | ansible-adapter-1.0 | And in sdnctl.DOWNLOAD_DG_REFERENCE | DOWNLOAD_DG_REFERENCE_ID | PROTOCOL | DOWNLOAD_CONFIG_DG | | 2 | ANSIBLE | ansible-adapter-1.0 | Is this necessary? On Jun 12, 2018, at 1:39 PM, Alexis de Talhouët <adetalhoue...@gmail.com<mailto:adetalhoue...@gmail.com>> wrote: Taka, Thanks for the answer. I was able to call my ansible playbook after doing the following: 1. Add the XYZ.ANSIBLE.ConfigModify.url = http://172.19.22.13:1234/Dispatch<https://urldefense.proofpoint.com/v2/url?u=http-3A__172.19.22.13-3A1234_Dispatch&d=DwMFaQ&c=LFYZ-o9_HUMeMTSQicvjIg&r=i5VHNTZ3SDPgIii87sudZA&m=K9RZO_dZ7vPyFzlI1CkyzL0eezZVIEEbBkHmwFNex58&s=qAZ54RP7Ulw-fOTDfngJ48qqX701f_jK1xvYfRQGulo&e=> in /opt/appc/data/properties/appc_southbound.properties 2. Define a template with the following payload: {"PlaybookName": "$playbook}”} 3. Send the LCM RPC request using this payload: "payload": "{\"configuration-parameters\":{\"operations_timeout\":\"3600\",\"playbook\":\"playbook1\"}}" Question, is there a way to pass the agent url as argument of the LCM RPC input in some ways? Like we do for NETCONF configure action with vnf-host-ip-address? Thanks, Alexis On Jun 12, 2018, at 12:04 PM, CHO, TAKAMUNE <tc0...@att.com<mailto:tc0...@att.com>> wrote: Hi Alexis, The payload for ConfigModify that you used is not correct. AgentUrl has to be present in Device Authentication Table rather than in the Payload. Below is one sample: "payload": "{\"request-parameters\":{\"vnf-name\":\"xxxxxxxxxxx\",\"vnf-host-ip-address\":\"https://xx.xxx.xx.xx:5000/Dispatch\"},\"configuration-parameters\":{\"vnf_name\":\”XYZ\",\"operations_timeout\":\"3600\<https://urldefense.proofpoint.com/v2/url?u=https-3A__xx.xxx.xx.xx-3A5000_Dispatch_-2522-257d-2C_-2522configuration-2Dparameters_-2522-3A-257b_-2522vnf-5Fname_-2522-3A_-25E2-2580-259DXYZ_-2522-2C_-2522operations-5Ftimeout_-2522-3A_-25223600_&d=DwMFaQ&c=LFYZ-o9_HUMeMTSQicvjIg&r=i5VHNTZ3SDPgIii87sudZA&m=K9RZO_dZ7vPyFzlI1CkyzL0eezZVIEEbBkHmwFNex58&s=GDNlG7-tImf7gQv4rmAj2w0fgpESnglb4ZemqZEL1ic&e=>"}}" To Answer your next question for CDT’s PD. Here is the sample for PD: kind: "Property Definition" version: V1 vnf-parameter-list: - name: vnf_name type: null description: null required: null default: null source: Manual rule-type: null request-keys: null response-keys: null and one payload for Anisble: { "PlaybookName": "comx/latest/ansible/modify/site.yml", "EnvParameters": {"vnf_instance": "${vnf_name}"}, "Timeout": 3600 } -Taka From: onap-discuss-boun...@lists.onap.org<mailto:onap-discuss-boun...@lists.onap.org> [mailto:onap-discuss-boun...@lists.onap.org] On Behalf Of Alexis de Talhouët Sent: Monday, June 11, 2018 4:56 PM To: onap-discuss <onap-discuss@lists.onap.org<mailto:onap-discuss@lists.onap.org>> Subject: [onap-discuss] [APP-C][CDT] - What is the expected payload for ANSIBLE? Greetings team, I’m trying to use the ConfigModify action using the ANSIBLE “device protocol” within CDT. I’m trying to execute my REST API from Postman to APP-C. I’m using the bellow payload. I cannot get around this error: org.onap.ccsdk.sli.core.sli.SvcLogicException: Error constructing request for execution of playbook due to missing mandatory parameters. Reason = Ansible: Mandatory AnsibleAdapter key AgentUrl not found in parameters provided by calling agent ! I do see AnsibleMessageParser#reqMessage is enforcing few parameters, final String[] mandatoryTestParams = {AGENT_URL_KEY,PLAYBOOK_NAME_KEY, USER_KEY, PASS_KEY}; but I don’t know how to input them... Can you help me understand what’s the expected payload for this REST API? On another note, what is the expected template and parameter definition when using Ansible within CDT? Thanks, Alexis { "input": { "common-header": { "timestamp": "2018-06-11T17:42:14.227Z", "api-ver": "2.00", "originator-id": "ALEX", "request-id": "TEST-6", "sub-request-id": "TEST-2", "flags": { "force": "TRUE", "ttl": 12000 } }, "action": "ConfigModify", "action-identifiers": { "vnf-id": "8ef725b6-f94a-4596-89b1-d6810ca9d6f0" }, "payload": "{\"AgentUrl\":\"10m\",\"request-parameters\":{\"AgentUrl\":\"10m\",\"vf-module-id\": \"fc8c4122-42a7-4657-9561-5adb2aa34f57\",\"vnf-host-ip-address\":\"10.195.198.22\",\"controller-template-id\": \"vlns\"},\"configuration-parameters\":{\"AgentUrl\":\"10m\"}}" } }
_______________________________________________ onap-discuss mailing list onap-discuss@lists.onap.org https://lists.onap.org/mailman/listinfo/onap-discuss