From 27fb783ccc2ecf6e7d2418eabc1d23c040b57d95 Mon Sep 17 00:00:00 2001 From: "stark, steven" Date: Mon, 11 Jan 2021 09:46:00 -0800 Subject: [VVP] Consolidate api calls in OC Issue-ID: VVP-504 Signed-off-by: stark, steven Change-Id: Idf1f656a836b65447b11a342ed5639589daf83e3 --- .../etc/payloads/add_vsp_contributer.jinja | 6 +++++- .../etc/payloads/catalog_vnf_input_single.jinja | 22 ++++++++++++++++++++++ .../catalog_vnf_policy_property_single.jinja | 22 ++++++++++++++++++++++ .../etc/payloads/catalog_vnf_property_single.jinja | 18 ++++++++++++++++++ 4 files changed, 67 insertions(+), 1 deletion(-) create mode 100644 onap-client/onap_client/etc/payloads/catalog_vnf_input_single.jinja create mode 100644 onap-client/onap_client/etc/payloads/catalog_vnf_policy_property_single.jinja create mode 100644 onap-client/onap_client/etc/payloads/catalog_vnf_property_single.jinja (limited to 'onap-client/onap_client/etc/payloads') diff --git a/onap-client/onap_client/etc/payloads/add_vsp_contributer.jinja b/onap-client/onap_client/etc/payloads/add_vsp_contributer.jinja index ac75634..2ab8f3b 100644 --- a/onap-client/onap_client/etc/payloads/add_vsp_contributer.jinja +++ b/onap-client/onap_client/etc/payloads/add_vsp_contributer.jinja @@ -1 +1,5 @@ -{"removedUsersIds":[],"addedUsersIds":["{{user_id}}"]} \ No newline at end of file +{% if user_id is string %} +{"removedUsersIds":[],"addedUsersIds":["{{user_id}}"]} +{% else %} +{"removedUsersIds":[],"addedUsersIds": {{user_id|tojson}} } +{% endif %} diff --git a/onap-client/onap_client/etc/payloads/catalog_vnf_input_single.jinja b/onap-client/onap_client/etc/payloads/catalog_vnf_input_single.jinja new file mode 100644 index 0000000..e883489 --- /dev/null +++ b/onap-client/onap_client/etc/payloads/catalog_vnf_input_single.jinja @@ -0,0 +1,22 @@ +{ +"defaultValue": "{{input_default_value}}", +"description": null, +"name": "{{input_name}}", +"parentUniqueId": "{{input_parent_unique_id}}", +"password": false, +"required": false, +"schema": { + "property": {} +}, +"type": "string", +"uniqueId": "{{input_unique_id}}", +"value": null, +"definition": false, +"getInputValues": null, +"instanceUniqueId": null, +"propertyId": null, +"properties": null, +"inputs": null, +"ownerId": "{{input_owner_id}}", +"inputPath": null +} diff --git a/onap-client/onap_client/etc/payloads/catalog_vnf_policy_property_single.jinja b/onap-client/onap_client/etc/payloads/catalog_vnf_policy_property_single.jinja new file mode 100644 index 0000000..5d54c9a --- /dev/null +++ b/onap-client/onap_client/etc/payloads/catalog_vnf_policy_property_single.jinja @@ -0,0 +1,22 @@ +{ +"defaultValue": null, +"description": "{{description}}", +"name": "{{property_name}}", +"parentUniqueId": null, +"password": false, +"required": true, +"schema": { + "property": {} +}, +"schemaType": null, +"type": "{{property_type}}", +"uniqueId": "{{unique_id}}", +"value": "{{property_default_value}}", +"definition": true, +"getInputValues": null, +"parentPropertyType": null, +"subPropertyInputPath": null, +"getPolicyValues": null, +"inputPath": null, +"ownerId": null +} diff --git a/onap-client/onap_client/etc/payloads/catalog_vnf_property_single.jinja b/onap-client/onap_client/etc/payloads/catalog_vnf_property_single.jinja new file mode 100644 index 0000000..bcdfb86 --- /dev/null +++ b/onap-client/onap_client/etc/payloads/catalog_vnf_property_single.jinja @@ -0,0 +1,18 @@ +{ +"constraints": [], +"name": "{{property_name}}", +"parentUniqueId": "{{parent_unique_id}}", +"password": false, +"required": false, +"schema": {"property": {}}, +{% if schema_type != "" %} +"schemaType": "{{schema_type}}", +{% endif %} +"type": "{{property_type}}", +"uniqueId": "{{unique_id}}", +"value": "{{property_default_value}}", +"definition": false, +"toscaPresentation": { + "ownerId": "{{owner_id}}" +} +} -- cgit 1.2.3-korg