@itentialopensource/adapter-viptela 0.10.3 → 0.10.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,4 +1,20 @@
1
1
 
2
+ ## 0.10.5 [04-06-2023]
3
+
4
+ * Added new calls
5
+
6
+ See merge request itentialopensource/adapters/sd-wan/adapter-viptela!23
7
+
8
+ ---
9
+
10
+ ## 0.10.4 [03-28-2023]
11
+
12
+ * Added new calls
13
+
14
+ See merge request itentialopensource/adapters/sd-wan/adapter-viptela!23
15
+
16
+ ---
17
+
2
18
  ## 0.10.3 [05-18-2022]
3
19
 
4
20
  * Fix systemName
package/adapter.js CHANGED
@@ -43506,6 +43506,344 @@ class Viptela extends AdapterBaseCl {
43506
43506
  return callback(null, errorObj);
43507
43507
  }
43508
43508
  }
43509
+
43510
+ /**
43511
+ * @function getVEdgePolicyDetails
43512
+ * @pronghornType method
43513
+ * @name getVEdgePolicyDetails
43514
+ * @summary Get policy details
43515
+ *
43516
+ * @param {getCallback} callback - a callback function to return the result
43517
+ * @return {object} results - An object containing the response of the action
43518
+ *
43519
+ * @route {GET} /getVEdgePolicyDetails
43520
+ * @roles admin
43521
+ * @task true
43522
+ */
43523
+ /* YOU CAN CHANGE THE PARAMETERS YOU TAKE IN HERE AND IN THE pronghorn.json FILE */
43524
+ getVEdgePolicyDetails(callback) {
43525
+ const meth = 'adapter-getVEdgePolicyDetails';
43526
+ const origin = `${this.id}-${meth}`;
43527
+ log.trace(origin);
43528
+
43529
+ if (this.suspended && this.suspendMode === 'error') {
43530
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
43531
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
43532
+ return callback(null, errorObj);
43533
+ }
43534
+
43535
+ /* HERE IS WHERE YOU VALIDATE DATA */
43536
+
43537
+ /* HERE IS WHERE YOU SET THE DATA TO PASS INTO REQUEST */
43538
+ // set up the request object - payload, uriPathVars, uriQuery, uriOptions, addlHeaders
43539
+ const reqObj = null;
43540
+
43541
+ try {
43542
+ // Make the call -
43543
+ // identifyRequest(entity, action, requestObj, returnDataFlag, callback)
43544
+ return this.requestHandlerInst.identifyRequest('ConfigurationVEdgeTemplatePolicy', 'getVEdgePolicyDetails', reqObj, true, (irReturnData, irReturnError) => {
43545
+ // if we received an error or their is no response on the results
43546
+ // return an error
43547
+ if (irReturnError) {
43548
+ /* HERE IS WHERE YOU CAN ALTER THE ERROR MESSAGE */
43549
+ return callback(null, irReturnError);
43550
+ }
43551
+ if (!Object.hasOwnProperty.call(irReturnData, 'response')) {
43552
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Invalid Response', ['getVEdgePolicyDetails'], null, null, null);
43553
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
43554
+ return callback(null, errorObj);
43555
+ }
43556
+
43557
+ /* HERE IS WHERE YOU CAN ALTER THE RETURN DATA */
43558
+ // return the response
43559
+ return callback(irReturnData, null);
43560
+ });
43561
+ } catch (ex) {
43562
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Caught Exception', null, null, null, ex);
43563
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
43564
+ return callback(null, errorObj);
43565
+ }
43566
+ }
43567
+
43568
+ /**
43569
+ * @function getVEdgeTemplate
43570
+ * @pronghornType method
43571
+ * @name getVEdgeTemplate
43572
+ * @summary Get vEdge template details
43573
+ *
43574
+ * @param {string} policyId - Id of policy
43575
+ * @param {getCallback} callback - a callback function to return the result
43576
+ * @return {object} results - An object containing the response of the action
43577
+ *
43578
+ * @route {GET} /getVEdgeTemplate
43579
+ * @roles admin
43580
+ * @task true
43581
+ */
43582
+ /* YOU CAN CHANGE THE PARAMETERS YOU TAKE IN HERE AND IN THE pronghorn.json FILE */
43583
+ getVEdgeTemplate(policyId, callback) {
43584
+ const meth = 'adapter-getVEdgeTemplate';
43585
+ const origin = `${this.id}-${meth}`;
43586
+ log.trace(origin);
43587
+
43588
+ if (this.suspended && this.suspendMode === 'error') {
43589
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
43590
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
43591
+ return callback(null, errorObj);
43592
+ }
43593
+
43594
+ /* HERE IS WHERE YOU VALIDATE DATA */
43595
+ if (policyId === undefined || policyId === null || policyId === '') {
43596
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['policyId'], null, null, null);
43597
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
43598
+ return callback(null, errorObj);
43599
+ }
43600
+
43601
+ /* HERE IS WHERE YOU SET THE DATA TO PASS INTO REQUEST */
43602
+ // set up the request object - payload, uriPathVars, uriQuery, uriOptions, addlHeaders
43603
+ const queryParamsAvailable = {};
43604
+ const queryParams = {};
43605
+ const pathVars = [policyId];
43606
+ const bodyVars = {};
43607
+
43608
+ // loop in template. long callback arg name to avoid identifier conflicts
43609
+ Object.keys(queryParamsAvailable).forEach((thisKeyInQueryParamsAvailable) => {
43610
+ if (queryParamsAvailable[thisKeyInQueryParamsAvailable] !== undefined && queryParamsAvailable[thisKeyInQueryParamsAvailable] !== null
43611
+ && queryParamsAvailable[thisKeyInQueryParamsAvailable] !== '') {
43612
+ queryParams[thisKeyInQueryParamsAvailable] = queryParamsAvailable[thisKeyInQueryParamsAvailable];
43613
+ }
43614
+ });
43615
+
43616
+ // set up the request object - payload, uriPathVars, uriQuery, uriOptions, addlHeaders
43617
+ const reqObj = {
43618
+ payload: bodyVars,
43619
+ uriPathVars: pathVars,
43620
+ uriQuery: queryParams
43621
+ };
43622
+
43623
+ try {
43624
+ // Make the call -
43625
+ // identifyRequest(entity, action, requestObj, returnDataFlag, callback)
43626
+ return this.requestHandlerInst.identifyRequest('ConfigurationVEdgeTemplatePolicy', 'getVEdgeTemplate', reqObj, true, (irReturnData, irReturnError) => {
43627
+ // if we received an error or their is no response on the results
43628
+ // return an error
43629
+ if (irReturnError) {
43630
+ /* HERE IS WHERE YOU CAN ALTER THE ERROR MESSAGE */
43631
+ return callback(null, irReturnError);
43632
+ }
43633
+ if (!Object.hasOwnProperty.call(irReturnData, 'response')) {
43634
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Invalid Response', ['getVEdgeTemplate'], null, null, null);
43635
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
43636
+ return callback(null, errorObj);
43637
+ }
43638
+
43639
+ /* HERE IS WHERE YOU CAN ALTER THE RETURN DATA */
43640
+ // return the response
43641
+ return callback(irReturnData, null);
43642
+ });
43643
+ } catch (ex) {
43644
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Caught Exception', null, null, null, ex);
43645
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
43646
+ return callback(null, errorObj);
43647
+ }
43648
+ }
43649
+
43650
+ /**
43651
+ * @function getDeviceListByPolicy
43652
+ * @pronghornType method
43653
+ * @name getDeviceListByPolicy
43654
+ * @summary Get vEdge device list by policy
43655
+ *
43656
+ * @param {string} policyId - Id of policy
43657
+ * @param {getCallback} callback - a callback function to return the result
43658
+ * @return {object} results - An object containing the response of the action
43659
+ *
43660
+ * @route {GET} /getDeviceListByPolicy
43661
+ * @roles admin
43662
+ * @task true
43663
+ */
43664
+ /* YOU CAN CHANGE THE PARAMETERS YOU TAKE IN HERE AND IN THE pronghorn.json FILE */
43665
+ getDeviceListByPolicy(policyId, callback) {
43666
+ const meth = 'adapter-getDeviceListByPolicy';
43667
+ const origin = `${this.id}-${meth}`;
43668
+ log.trace(origin);
43669
+
43670
+ if (this.suspended && this.suspendMode === 'error') {
43671
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
43672
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
43673
+ return callback(null, errorObj);
43674
+ }
43675
+
43676
+ /* HERE IS WHERE YOU VALIDATE DATA */
43677
+ if (policyId === undefined || policyId === null || policyId === '') {
43678
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['policyId'], null, null, null);
43679
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
43680
+ return callback(null, errorObj);
43681
+ }
43682
+
43683
+ /* HERE IS WHERE YOU SET THE DATA TO PASS INTO REQUEST */
43684
+ // set up the request object - payload, uriPathVars, uriQuery, uriOptions, addlHeaders
43685
+ const queryParamsAvailable = {};
43686
+ const queryParams = {};
43687
+ const pathVars = [policyId];
43688
+ const bodyVars = {};
43689
+
43690
+ // loop in template. long callback arg name to avoid identifier conflicts
43691
+ Object.keys(queryParamsAvailable).forEach((thisKeyInQueryParamsAvailable) => {
43692
+ if (queryParamsAvailable[thisKeyInQueryParamsAvailable] !== undefined && queryParamsAvailable[thisKeyInQueryParamsAvailable] !== null
43693
+ && queryParamsAvailable[thisKeyInQueryParamsAvailable] !== '') {
43694
+ queryParams[thisKeyInQueryParamsAvailable] = queryParamsAvailable[thisKeyInQueryParamsAvailable];
43695
+ }
43696
+ });
43697
+
43698
+ // set up the request object - payload, uriPathVars, uriQuery, uriOptions, addlHeaders
43699
+ const reqObj = {
43700
+ payload: bodyVars,
43701
+ uriPathVars: pathVars,
43702
+ uriQuery: queryParams
43703
+ };
43704
+
43705
+ try {
43706
+ // Make the call -
43707
+ // identifyRequest(entity, action, requestObj, returnDataFlag, callback)
43708
+ return this.requestHandlerInst.identifyRequest('ConfigurationVEdgeTemplatePolicy', 'getDeviceListByPolicy', reqObj, true, (irReturnData, irReturnError) => {
43709
+ // if we received an error or their is no response on the results
43710
+ // return an error
43711
+ if (irReturnError) {
43712
+ /* HERE IS WHERE YOU CAN ALTER THE ERROR MESSAGE */
43713
+ return callback(null, irReturnError);
43714
+ }
43715
+ if (!Object.hasOwnProperty.call(irReturnData, 'response')) {
43716
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Invalid Response', ['getDeviceListByPolicy'], null, null, null);
43717
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
43718
+ return callback(null, errorObj);
43719
+ }
43720
+
43721
+ /* HERE IS WHERE YOU CAN ALTER THE RETURN DATA */
43722
+ // return the response
43723
+ return callback(irReturnData, null);
43724
+ });
43725
+ } catch (ex) {
43726
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Caught Exception', null, null, null, ex);
43727
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
43728
+ return callback(null, errorObj);
43729
+ }
43730
+ }
43731
+
43732
+ /**
43733
+ * @function getPolicyDataPrefixList
43734
+ * @pronghornType method
43735
+ * @name getPolicyDataPrefixList
43736
+ * @summary Get policy lists
43737
+ *
43738
+ * @param {getCallback} callback - a callback function to return the result
43739
+ * @return {object} results - An object containing the response of the action
43740
+ *
43741
+ * @route {GET} /getPolicyDataPrefixList
43742
+ * @roles admin
43743
+ * @task true
43744
+ */
43745
+ /* YOU CAN CHANGE THE PARAMETERS YOU TAKE IN HERE AND IN THE pronghorn.json FILE */
43746
+ getPolicyDataPrefixList(callback) {
43747
+ const meth = 'adapter-getPolicyDataPrefixList';
43748
+ const origin = `${this.id}-${meth}`;
43749
+ log.trace(origin);
43750
+
43751
+ if (this.suspended && this.suspendMode === 'error') {
43752
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
43753
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
43754
+ return callback(null, errorObj);
43755
+ }
43756
+
43757
+ /* HERE IS WHERE YOU VALIDATE DATA */
43758
+
43759
+ /* HERE IS WHERE YOU SET THE DATA TO PASS INTO REQUEST */
43760
+ // set up the request object - payload, uriPathVars, uriQuery, uriOptions, addlHeaders
43761
+ const reqObj = null;
43762
+
43763
+ try {
43764
+ // Make the call -
43765
+ // identifyRequest(entity, action, requestObj, returnDataFlag, callback)
43766
+ return this.requestHandlerInst.identifyRequest('ConfigurationPolicyDataPrefixListBuilder', 'getPolicyDataPrefixList', reqObj, true, (irReturnData, irReturnError) => {
43767
+ // if we received an error or their is no response on the results
43768
+ // return an error
43769
+ if (irReturnError) {
43770
+ /* HERE IS WHERE YOU CAN ALTER THE ERROR MESSAGE */
43771
+ return callback(null, irReturnError);
43772
+ }
43773
+ if (!Object.hasOwnProperty.call(irReturnData, 'response')) {
43774
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Invalid Response', ['getPolicyDataPrefixList'], null, null, null);
43775
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
43776
+ return callback(null, errorObj);
43777
+ }
43778
+
43779
+ /* HERE IS WHERE YOU CAN ALTER THE RETURN DATA */
43780
+ // return the response
43781
+ return callback(irReturnData, null);
43782
+ });
43783
+ } catch (ex) {
43784
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Caught Exception', null, null, null, ex);
43785
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
43786
+ return callback(null, errorObj);
43787
+ }
43788
+ }
43789
+
43790
+ /**
43791
+ * @function getVEdgePolicyRouteDefinition
43792
+ * @pronghornType method
43793
+ * @name getVEdgePolicyRouteDefinition
43794
+ * @summary Get policy definitions
43795
+ *
43796
+ * @param {getCallback} callback - a callback function to return the result
43797
+ * @return {object} results - An object containing the response of the action
43798
+ *
43799
+ * @route {GET} /getVEdgePolicyRouteDefinition
43800
+ * @roles admin
43801
+ * @task true
43802
+ */
43803
+ /* YOU CAN CHANGE THE PARAMETERS YOU TAKE IN HERE AND IN THE pronghorn.json FILE */
43804
+ getVEdgePolicyRouteDefinition(callback) {
43805
+ const meth = 'adapter-getVEdgePolicyRouteDefinition';
43806
+ const origin = `${this.id}-${meth}`;
43807
+ log.trace(origin);
43808
+
43809
+ if (this.suspended && this.suspendMode === 'error') {
43810
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
43811
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
43812
+ return callback(null, errorObj);
43813
+ }
43814
+
43815
+ /* HERE IS WHERE YOU VALIDATE DATA */
43816
+
43817
+ /* HERE IS WHERE YOU SET THE DATA TO PASS INTO REQUEST */
43818
+ // set up the request object - payload, uriPathVars, uriQuery, uriOptions, addlHeaders
43819
+ const reqObj = null;
43820
+
43821
+ try {
43822
+ // Make the call -
43823
+ // identifyRequest(entity, action, requestObj, returnDataFlag, callback)
43824
+ return this.requestHandlerInst.identifyRequest('ConfigurationPolicyVEdgeRouteDefinitionBuilder', 'getVEdgePolicyRouteDefinition', reqObj, true, (irReturnData, irReturnError) => {
43825
+ // if we received an error or their is no response on the results
43826
+ // return an error
43827
+ if (irReturnError) {
43828
+ /* HERE IS WHERE YOU CAN ALTER THE ERROR MESSAGE */
43829
+ return callback(null, irReturnError);
43830
+ }
43831
+ if (!Object.hasOwnProperty.call(irReturnData, 'response')) {
43832
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Invalid Response', ['getVEdgePolicyRouteDefinition'], null, null, null);
43833
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
43834
+ return callback(null, errorObj);
43835
+ }
43836
+
43837
+ /* HERE IS WHERE YOU CAN ALTER THE RETURN DATA */
43838
+ // return the response
43839
+ return callback(irReturnData, null);
43840
+ });
43841
+ } catch (ex) {
43842
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Caught Exception', null, null, null, ex);
43843
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
43844
+ return callback(null, errorObj);
43845
+ }
43846
+ }
43509
43847
  }
43510
43848
 
43511
43849
  module.exports = Viptela;
@@ -0,0 +1,25 @@
1
+ {
2
+ "actions": [
3
+ {
4
+ "name": "getPolicyDataPrefixList",
5
+ "protocol": "REST",
6
+ "method": "GET",
7
+ "entitypath": "{base_path}/{version}/template/policy/list/dataprefix?{query}",
8
+ "requestSchema": "schema.json",
9
+ "responseSchema": "schema.json",
10
+ "timeout": 0,
11
+ "sendEmpty": false,
12
+ "sendGetBody": false,
13
+ "requestDatatype": "JSON",
14
+ "responseDatatype": "JSON",
15
+ "headers": {},
16
+ "responseObjects": [
17
+ {
18
+ "type": "default",
19
+ "key": "",
20
+ "mockFile": ""
21
+ }
22
+ ]
23
+ }
24
+ ]
25
+ }
@@ -0,0 +1,17 @@
1
+ {
2
+ "$id": "schema.json",
3
+ "type": "object",
4
+ "schema": "http://json-schema.org/draft-07/schema#",
5
+ "translate": false,
6
+ "dynamicfields": true,
7
+ "properties": {
8
+ "ph_request_type": {
9
+ "type": "string",
10
+ "description": "type of request (internal to adapter)",
11
+ "default": "",
12
+ "enum": ["getPolicyDataPrefixList"],
13
+ "external_name": "ph_request_type"
14
+ }
15
+ },
16
+ "definitions": {}
17
+ }
@@ -0,0 +1,25 @@
1
+ {
2
+ "actions": [
3
+ {
4
+ "name": "getVEdgePolicyRouteDefinition",
5
+ "protocol": "REST",
6
+ "method": "GET",
7
+ "entitypath": "{base_path}/{version}/template/policy/definition/vedgeroute?{query}",
8
+ "requestSchema": "schema.json",
9
+ "responseSchema": "schema.json",
10
+ "timeout": 0,
11
+ "sendEmpty": false,
12
+ "sendGetBody": false,
13
+ "requestDatatype": "JSON",
14
+ "responseDatatype": "JSON",
15
+ "headers": {},
16
+ "responseObjects": [
17
+ {
18
+ "type": "default",
19
+ "key": "",
20
+ "mockFile": ""
21
+ }
22
+ ]
23
+ }
24
+ ]
25
+ }
@@ -0,0 +1,17 @@
1
+ {
2
+ "$id": "schema.json",
3
+ "type": "object",
4
+ "schema": "http://json-schema.org/draft-07/schema#",
5
+ "translate": false,
6
+ "dynamicfields": true,
7
+ "properties": {
8
+ "ph_request_type": {
9
+ "type": "string",
10
+ "description": "type of request (internal to adapter)",
11
+ "default": "",
12
+ "enum": ["getVEdgePolicyRouteDefinition"],
13
+ "external_name": "ph_request_type"
14
+ }
15
+ },
16
+ "definitions": {}
17
+ }
@@ -0,0 +1,67 @@
1
+ {
2
+ "actions" : [
3
+ {
4
+ "name": "getVEdgePolicyDetails",
5
+ "protocol": "REST",
6
+ "method": "GET",
7
+ "entitypath": "{base_path}/{version}/template/policy/vedge?{query}",
8
+ "requestSchema": "schema.json",
9
+ "responseSchema": "schema.json",
10
+ "timeout": 0,
11
+ "sendEmpty": false,
12
+ "sendGetBody": false,
13
+ "requestDatatype": "JSON",
14
+ "responseDatatype": "JSON",
15
+ "headers": {},
16
+ "responseObjects": [
17
+ {
18
+ "type": "default",
19
+ "key": "",
20
+ "mockFile": ""
21
+ }
22
+ ]
23
+ },
24
+ {
25
+ "name": "getVEdgeTemplate",
26
+ "protocol": "REST",
27
+ "method": "GET",
28
+ "entitypath": "{base_path}/{version}/template/policy/vedge/definition/{pathv1}?{query}",
29
+ "requestSchema": "schema.json",
30
+ "responseSchema": "schema.json",
31
+ "timeout": 0,
32
+ "sendEmpty": false,
33
+ "sendGetBody": false,
34
+ "requestDatatype": "JSON",
35
+ "responseDatatype": "JSON",
36
+ "headers": {},
37
+ "responseObjects": [
38
+ {
39
+ "type": "default",
40
+ "key": "",
41
+ "mockFile": "mockdatafiles/getVEdgeTemplate-default.json"
42
+ }
43
+ ]
44
+ },
45
+ {
46
+ "name": "getDeviceListByPolicy",
47
+ "protocol": "REST",
48
+ "method": "GET",
49
+ "entitypath": "{base_path}/{version}/template/policy/vedge/devices/{pathv1}?{query}",
50
+ "requestSchema": "schema.json",
51
+ "responseSchema": "schema.json",
52
+ "timeout": 0,
53
+ "sendEmpty": false,
54
+ "sendGetBody": false,
55
+ "requestDatatype": "JSON",
56
+ "responseDatatype": "JSON",
57
+ "headers": {},
58
+ "responseObjects": [
59
+ {
60
+ "type": "default",
61
+ "key": "",
62
+ "mockFile": "mockdatafiles/getDeviceListByPolicy-default.json"
63
+ }
64
+ ]
65
+ }
66
+ ]
67
+ }
@@ -0,0 +1,34 @@
1
+ {
2
+ "data": [
3
+ {
4
+ "mastersAttached": 0,
5
+ "lastUpdatedBy": "admin",
6
+ "policyName": "AppVisibility",
7
+ "policyDefinition": "policy\n app-visibility\n flow-visibility\n!\n",
8
+ "policyDefinitionEdit": "policy\n app-visibility\n flow-visibility\n!\n",
9
+ "createdOn": 1505676829880,
10
+ "policyDescription": "Application Visibility Only",
11
+ "@rid": 481,
12
+ "policyId": "0b860b3a-9446-4c19-86f4-49699f4ed2c7",
13
+ "createdBy": "admin",
14
+ "devicesAttached": 0,
15
+ "lastUpdatedOn": 1505676829880,
16
+ "policyType": "cli"
17
+ },
18
+ {
19
+ "mastersAttached": 1,
20
+ "lastUpdatedBy": "admin",
21
+ "policyName": "BaselinePolicy",
22
+ "policyDefinition": "{\"assembly\":[{\"definitionId\":\"48a7a27a-54e9-443b-a254-cc87ef13f3f5\",\"type\":\"qosMap\"},{\"definitionId\":\"dfe3891d-ee1f-44e1-ba84-caa2e5e9f128\",\"type\":\"acl\"},{\"definitionId\":\"7bdedee2-f87d-4f26-855b-4338b14716a1\",\"type\":\"acl\"},{\"definitionId\":\"e4b25c74-f594-49db-b78b-61bbb41464ba\",\"type\":\"acl\"},{\"definitionId\":\"b628d664-d4ec-428f-831c-aff2b688c54c\",\"type\":\"vedgeRoute\"}],\"settings\":{\"appVisibility\":true,\"cloudQos\":true,\"cloudQosServiceSide\":true,\"flowVisibility\":true,\"logFrequency\":10}}",
23
+ "policyDefinitionEdit": "{\"assembly\":[{\"definitionId\":\"48a7a27a-54e9-443b-a254-cc87ef13f3f5\",\"type\":\"qosMap\"},{\"definitionId\":\"dfe3891d-ee1f-44e1-ba84-caa2e5e9f128\",\"type\":\"acl\"},{\"definitionId\":\"7bdedee2-f87d-4f26-855b-4338b14716a1\",\"type\":\"acl\"},{\"definitionId\":\"e4b25c74-f594-49db-b78b-61bbb41464ba\",\"type\":\"acl\"},{\"definitionId\":\"b628d664-d4ec-428f-831c-aff2b688c54c\",\"type\":\"vedgeRoute\"}],\"settings\":{\"appVisibility\":true,\"cloudQos\":true,\"cloudQosServiceSide\":true,\"flowVisibility\":true,\"logFrequency\":10}}",
24
+ "createdOn": 1548341101877,
25
+ "policyDescription": "Baseline dCloud Policy for all WAN Edge",
26
+ "@rid": 2095,
27
+ "policyId": "f73b285f-72eb-4f6d-865f-eae0e453bd8e",
28
+ "createdBy": "admin",
29
+ "devicesAttached": 2,
30
+ "policyType": "feature",
31
+ "lastUpdatedOn": 1548341101877
32
+ }
33
+ ]
34
+ }
@@ -0,0 +1,21 @@
1
+ {
2
+ "$id": "schema.json",
3
+ "type": "object",
4
+ "schema": "http://json-schema.org/draft-07/schema#",
5
+ "translate": false,
6
+ "dynamicfields": true,
7
+ "properties": {
8
+ "ph_request_type": {
9
+ "type": "string",
10
+ "description": "type of request (internal to adapter)",
11
+ "default": "getVEdgePolicyDetails",
12
+ "enum": [
13
+ "getVEdgePolicyDetails",
14
+ "getVEdgeTemplate",
15
+ "getDeviceListByPolicy"
16
+ ],
17
+ "external_name": "ph_request_type"
18
+ }
19
+ },
20
+ "definitions": {}
21
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@itentialopensource/adapter-viptela",
3
- "version": "0.10.3",
3
+ "version": "0.10.5",
4
4
  "description": "This adapter integrates with system Viptela",
5
5
  "main": "adapter.js",
6
6
  "systemName": "Cisco Viptela",
@@ -53,7 +53,7 @@
53
53
  "author": "Itential",
54
54
  "homepage": "https://gitlab.com/itentialopensource/adapters/sd-wan/adapter-viptela#readme",
55
55
  "dependencies": {
56
- "@itentialopensource/adapter-utils": "^4.45.5",
56
+ "@itentialopensource/adapter-utils": "^4.48.10",
57
57
  "ajv": "^6.12.0",
58
58
  "axios": "^0.21.0",
59
59
  "commander": "^2.20.0",
package/pronghorn.json CHANGED
@@ -18903,6 +18903,143 @@
18903
18903
  "path": "/diffTwoConfigs"
18904
18904
  },
18905
18905
  "task": true
18906
+ },
18907
+ {
18908
+ "name": "getVEdgePolicyDetails",
18909
+ "summary": "Get vEdge policy details",
18910
+ "description": "Get vEdge policy details",
18911
+ "input": [],
18912
+ "output": {
18913
+ "name": "result",
18914
+ "type": "object",
18915
+ "description": "A JSON Object containing status, code and the result",
18916
+ "schema": {
18917
+ "title": "result",
18918
+ "type": "object"
18919
+ }
18920
+ },
18921
+ "roles": [
18922
+ "admin"
18923
+ ],
18924
+ "route": {
18925
+ "verb": "GET",
18926
+ "path": "/getVEdgePolicyDetails"
18927
+ },
18928
+ "task": true
18929
+ },
18930
+ {
18931
+ "name": "getVEdgeTemplate",
18932
+ "summary": "Get template",
18933
+ "description": "Get template",
18934
+ "input": [
18935
+ {
18936
+ "name": "policyId",
18937
+ "type": "string",
18938
+ "info": "policy id",
18939
+ "required": true,
18940
+ "schema": {
18941
+ "title": "policyId",
18942
+ "type": "string"
18943
+ }
18944
+ }
18945
+ ],
18946
+ "output": {
18947
+ "name": "result",
18948
+ "type": "object",
18949
+ "description": "A JSON Object containing status, code and the result",
18950
+ "schema": {
18951
+ "title": "result",
18952
+ "type": "object"
18953
+ }
18954
+ },
18955
+ "roles": [
18956
+ "admin"
18957
+ ],
18958
+ "route": {
18959
+ "verb": "GET",
18960
+ "path": "/getVEdgeTemplate"
18961
+ },
18962
+ "task": true
18963
+ },
18964
+ {
18965
+ "name": "getDeviceListByPolicy",
18966
+ "summary": "Get device list by policy id",
18967
+ "description": "Get device list by policy id",
18968
+ "input": [
18969
+ {
18970
+ "name": "policyId",
18971
+ "type": "string",
18972
+ "info": "policy id",
18973
+ "required": true,
18974
+ "schema": {
18975
+ "title": "policyId",
18976
+ "type": "string"
18977
+ }
18978
+ }
18979
+ ],
18980
+ "output": {
18981
+ "name": "result",
18982
+ "type": "object",
18983
+ "description": "A JSON Object containing status, code and the result",
18984
+ "schema": {
18985
+ "title": "result",
18986
+ "type": "object"
18987
+ }
18988
+ },
18989
+ "roles": [
18990
+ "admin"
18991
+ ],
18992
+ "route": {
18993
+ "verb": "GET",
18994
+ "path": "/getDeviceListByPolicy"
18995
+ },
18996
+ "task": true
18997
+ },
18998
+ {
18999
+ "name": "getVEdgePolicyRouteDefinition",
19000
+ "summary": "Get vEdge policy definition",
19001
+ "description": "Get vEdge policy definition",
19002
+ "input": [],
19003
+ "output": {
19004
+ "name": "result",
19005
+ "type": "object",
19006
+ "description": "A JSON Object containing status, code and the result",
19007
+ "schema": {
19008
+ "title": "result",
19009
+ "type": "object"
19010
+ }
19011
+ },
19012
+ "roles": [
19013
+ "admin"
19014
+ ],
19015
+ "route": {
19016
+ "verb": "GET",
19017
+ "path": "/getVEdgePolicyRouteDefinition"
19018
+ },
19019
+ "task": true
19020
+ },
19021
+ {
19022
+ "name": "getPolicyDataPrefixList",
19023
+ "summary": "Get policy data prefix list",
19024
+ "description": "Get policy data prefix list",
19025
+ "input": [],
19026
+ "output": {
19027
+ "name": "result",
19028
+ "type": "object",
19029
+ "description": "A JSON Object containing status, code and the result",
19030
+ "schema": {
19031
+ "title": "result",
19032
+ "type": "object"
19033
+ }
19034
+ },
19035
+ "roles": [
19036
+ "admin"
19037
+ ],
19038
+ "route": {
19039
+ "verb": "GET",
19040
+ "path": "/getPolicyDataPrefixList"
19041
+ },
19042
+ "task": true
18906
19043
  }
18907
19044
  ]
18908
19045
  }
Binary file