diff options
author | vrvarma <vv8305@att.com> | 2019-12-13 10:24:55 -0500 |
---|---|---|
committer | vrvarma <vv8305@att.com> | 2019-12-13 10:29:45 -0500 |
commit | 430153e1a9489a86cf0ff7942eceb0bf5f1c170c (patch) | |
tree | b22090b80d11761a24d9cbeaa6348704cce2de83 /test/functest | |
parent | 34ba229b31758c38a299a163de0007848b5921be (diff) |
osdf rearchitecture into apps and libs
Change-Id: I2db2f8e252bd5e60807b2ffabf5a5b193a789f7a
Signed-off-by: vrvarma <vv8305@att.com>
Issue-ID: OPTFRA-637
Diffstat (limited to 'test/functest')
13 files changed, 147 insertions, 38 deletions
diff --git a/test/functest/simulators/policy/response-payloads/pdp-has-vcpe-good/Affinity_vCPE_1.json b/test/functest/simulators/policy/response-payloads/pdp-has-vcpe-good/Affinity_vCPE_1.json index 6f0ecb3..2953589 100644 --- a/test/functest/simulators/policy/response-payloads/pdp-has-vcpe-good/Affinity_vCPE_1.json +++ b/test/functest/simulators/policy/response-payloads/pdp-has-vcpe-good/Affinity_vCPE_1.json @@ -1,7 +1,7 @@ { - "service": "zone", - "policyName": "OSDF_R2.Affinity_vCPE_1", - "description": "Optimization query policy for vCPE", + "service": "affinityPolicy", + "policyName": "OSDF_DUBLIN.Affinity_vCPE_1", + "description": "Zone policy for vCPE", "templateVersion": "OpenSource.version.1", "version": "test1", "priority": "3", diff --git a/test/functest/simulators/policy/response-payloads/pdp-has-vcpe-good/Capacity_vGMuxInfra.json b/test/functest/simulators/policy/response-payloads/pdp-has-vcpe-good/Capacity_vGMuxInfra.json index 2578544..010cf3f 100644 --- a/test/functest/simulators/policy/response-payloads/pdp-has-vcpe-good/Capacity_vGMuxInfra.json +++ b/test/functest/simulators/policy/response-payloads/pdp-has-vcpe-good/Capacity_vGMuxInfra.json @@ -1,6 +1,6 @@ { "service": "vim_fit", - "policyName": "OSDF_R2.Capacity_vGMuxInfra", + "policyName": "OSDF_DUBLIN.Capacity_vGMuxInfra", "description": "Capacity policy for vGMuxInfra", "templateVersion": "OpenSource.version.1", "version": "test1", diff --git a/test/functest/simulators/policy/response-payloads/pdp-has-vcpe-good/Capacity_vG_1.json b/test/functest/simulators/policy/response-payloads/pdp-has-vcpe-good/Capacity_vG_1.json index c1682fa..fedcc4f 100644 --- a/test/functest/simulators/policy/response-payloads/pdp-has-vcpe-good/Capacity_vG_1.json +++ b/test/functest/simulators/policy/response-payloads/pdp-has-vcpe-good/Capacity_vG_1.json @@ -1,6 +1,6 @@ { "service": "vim_fit", - "policyName": "OSDF_R2.Capacity_vG_1", + "policyName": "OSDF_DUBLIN.Capacity_vG_1", "description": "Capacity policy for vG", "templateVersion": "OpenSource.version.1", "version": "test1", diff --git a/test/functest/simulators/policy/response-payloads/pdp-has-vcpe-good/Distance_vGMuxInfra_1.json b/test/functest/simulators/policy/response-payloads/pdp-has-vcpe-good/Distance_vGMuxInfra_1.json index 61ec500..e3ba83c 100644 --- a/test/functest/simulators/policy/response-payloads/pdp-has-vcpe-good/Distance_vGMuxInfra_1.json +++ b/test/functest/simulators/policy/response-payloads/pdp-has-vcpe-good/Distance_vGMuxInfra_1.json @@ -1,6 +1,6 @@ { - "service": "distance_to_location", - "policyName": "OSDF_R2.Distance_vGMuxInfra", + "service": "distancePolicy", + "policyName": "OSDF_DUBLIN.Distance_vGMuxInfra", "description": "Distance Policy for vGMuxInfra", "templateVersion": "OpenSource.version.1", "version": "test1", @@ -10,13 +10,13 @@ "guard": "False", "content": { "distanceProperties": { - "locationInfo": "customer_location", + "locationInfo": "customer_loc", "distance": { "value": "500", "operator": "<", "unit": "km" } }, "identity": "distance-vGMuxInfra", "resources": ["vGMuxInfra"], "policyScope": ["vCPE", "US", "INTERNATIONAL", "ip", "vGMuxInfra"], - "policyType": "distancePolicy", + "policyType": "distance_to_location", "applicableResources": "any" } } diff --git a/test/functest/simulators/policy/response-payloads/pdp-has-vcpe-good/Distance_vG_1.json b/test/functest/simulators/policy/response-payloads/pdp-has-vcpe-good/Distance_vG_1.json index 06c3ada..c498c7a 100644 --- a/test/functest/simulators/policy/response-payloads/pdp-has-vcpe-good/Distance_vG_1.json +++ b/test/functest/simulators/policy/response-payloads/pdp-has-vcpe-good/Distance_vG_1.json @@ -1,6 +1,6 @@ { - "service": "distance_to_location", - "policyName": "OSDF_R2.Distance_vG_1", + "service": "distancePolicy", + "policyName": "OSDF_DUBLIN.Distance_vG_1", "description": "Distance Policy for vG", "templateVersion": "OpenSource.version.1", "version": "test1", @@ -10,13 +10,13 @@ "guard": "False", "content": { "distanceProperties": { - "locationInfo": "customer_location", + "locationInfo": "customer_loc", "distance": { "value": "1500", "operator": "<", "unit": "km" } }, "identity": "distance-vG", "resources": ["vG"], "policyScope": ["vCPE", "US", "INTERNATIONAL", "ip", "vG"], - "policyType": "distancePolicy", + "policyType": "distance_to_location", "applicableResources": "any" } } diff --git a/test/functest/simulators/policy/response-payloads/pdp-has-vcpe-good/Placement_Optimization_1.json b/test/functest/simulators/policy/response-payloads/pdp-has-vcpe-good/Placement_Optimization_1.json index ab3c586..9b062b0 100644 --- a/test/functest/simulators/policy/response-payloads/pdp-has-vcpe-good/Placement_Optimization_1.json +++ b/test/functest/simulators/policy/response-payloads/pdp-has-vcpe-good/Placement_Optimization_1.json @@ -1,6 +1,6 @@ { - "service": "placementOptimization", - "policyName": "OSDF_R2.Placement_Optimization_1", + "service": "optimizationPolicy", + "policyName": "OSDF_DUBLIN.Placement_Optimization_1", "description": "Placement Optimization Policy for vGMuxInfra", "templateVersion": "OpenSource.version.1", "version": "test1", @@ -30,13 +30,26 @@ "parameter": "hpa_score", "weight": "200", "operator": "product" + }, + { + "resources": ["vFW"], + "customerLocationInfo": "customer_loc", + "parameter": "distance", + "weight": "100", + "operator": "product" + }, + { + "resources": ["vFW"], + "parameter": "hpa_score", + "weight": "200", + "operator": "product" } ], "operator": "sum" }, "identity": "optimization", "policyScope": ["vCPE", "US", "INTERNATIONAL", "ip", "vGMuxInfra", "vG"], - "policyType": "placementOptimization", + "policyType": "placement_optimization", "objective": "minimize" } } diff --git a/test/functest/simulators/policy/response-payloads/pdp-has-vcpe-good/QueryPolicy_vCPE.json b/test/functest/simulators/policy/response-payloads/pdp-has-vcpe-good/QueryPolicy_vCPE.json index 27f49d2..5097964 100644 --- a/test/functest/simulators/policy/response-payloads/pdp-has-vcpe-good/QueryPolicy_vCPE.json +++ b/test/functest/simulators/policy/response-payloads/pdp-has-vcpe-good/QueryPolicy_vCPE.json @@ -1,7 +1,7 @@ { - "service": "optimizationQueryPolicy", - "policyName": "OSDF_R2.QueryPolicy_vCPE", - "description": "Optimization query policy for vCPE", + "service": "queryPolicy", + "policyName": "OSDF_DUBLIN.QueryPolicy_vCPE", + "description": "Query policy for vCPE", "templateVersion": "OpenSource.version.1", "version": "test1", "priority": "3", @@ -14,7 +14,7 @@ {"attribute":"customerLongitude", "attribute_location": "customerLongitude"} ], "policyScope": ["vCPE", "US", "INTERNATIONAL", "ip", "vGMuxInfra", "vG"], - "policyType": "optimizationQueryPolicy", + "policyType": "request_param_query", "serviceName": "vCPE", "identity": "vCPE_Query_Policy" } diff --git a/test/functest/simulators/policy/response-payloads/pdp-has-vcpe-good/QueryPolicy_vCPE_2.json b/test/functest/simulators/policy/response-payloads/pdp-has-vcpe-good/QueryPolicy_vCPE_2.json index 7f1db83..e398f39 100644 --- a/test/functest/simulators/policy/response-payloads/pdp-has-vcpe-good/QueryPolicy_vCPE_2.json +++ b/test/functest/simulators/policy/response-payloads/pdp-has-vcpe-good/QueryPolicy_vCPE_2.json @@ -1,10 +1,10 @@ { - "service": "optimizationQueryPolicy", - "policyName": "oofBeijing.queryPolicy_vCPE", - "description": "Optimization query policy for vCPE", - "templateVersion": "0.0.1", - "version": "oofBeijing", - "priority": "5", + "service": "queryPolicy", + "policyName": "OSDF_DUBLIN.queryPolicy_vCPE", + "description": "Query policy for vCPE", + "templateVersion": "OpenSource.version.1", + "version": "test1", + "priority": "3", "riskType": "test", "riskLevel": "2", "guard": "False", @@ -17,7 +17,8 @@ {"attribute":"customerLongitude", "attribute_location": "customerLongitude", "value": 2.2} ], "serviceName": "vCPE", - "policyScope": ["vCPE", "US", "INTERNATIONAL", "ip", "vGMuxInfra", "vG", "optimizationQueryPolicy"], - "policyType": "optimizationQueryPolicy" + "policyScope": ["vCPE", "US", "INTERNATIONAL", "ip", "vGMuxInfra", "vG"], + "policyType": "request_param_query", + "identity": "vCPE_Query_Policy" } } diff --git a/test/functest/simulators/policy/response-payloads/pdp-has-vcpe-good/hpa_policy_vGMuxInfra_1.json b/test/functest/simulators/policy/response-payloads/pdp-has-vcpe-good/hpa_policy_vGMuxInfra_1.json index ce0b7e3..690f5dc 100644 --- a/test/functest/simulators/policy/response-payloads/pdp-has-vcpe-good/hpa_policy_vGMuxInfra_1.json +++ b/test/functest/simulators/policy/response-payloads/pdp-has-vcpe-good/hpa_policy_vGMuxInfra_1.json @@ -1,6 +1,6 @@ { "service": "hpaPolicy", - "policyName": "OSDF_R2.hpa_policy_vGMuxInfra_1", + "policyName": "OSDF_DUBLIN.hpa_policy_vGMuxInfra_1", "description": "HPA policy for vGMuxInfra", "templateVersion": "OpenSource.version.1", "version": "test1", @@ -9,10 +9,10 @@ "riskLevel": "2", "guard": "False", "content": { - "resources": "vGMuxInfra", - "identity": "hpaPolicy_vGMuxInfra", + "resources": ["vGMuxInfra"], + "identity": "hpa-vGMuxInfra", "policyScope": ["vCPE", "US", "INTERNATIONAL", "ip", "vGMuxInfra"], - "policyType": "hpaPolicy", + "policyType": "hpa", "flavorFeatures": [ { "id": "vgmux_1", diff --git a/test/functest/simulators/policy/response-payloads/pdp-has-vcpe-good/hpa_policy_vG_1.json b/test/functest/simulators/policy/response-payloads/pdp-has-vcpe-good/hpa_policy_vG_1.json index 5d2499f..b29c67d 100644 --- a/test/functest/simulators/policy/response-payloads/pdp-has-vcpe-good/hpa_policy_vG_1.json +++ b/test/functest/simulators/policy/response-payloads/pdp-has-vcpe-good/hpa_policy_vG_1.json @@ -1,6 +1,6 @@ { "service": "hpaPolicy", - "policyName": "OSDF_R2.hpa_policy_vG_1", + "policyName": "OSDF_DUBLIN.hpa_policy_vG_1", "description": "HPA policy for vG", "templateVersion": "OpenSource.version.1", "version": "test1", @@ -9,10 +9,10 @@ "riskLevel": "2", "guard": "False", "content": { - "resources": "vG", - "identity": "hpaPolicy_vG", + "resources": ["vG"], + "identity": "hpa-vG", "policyScope": ["vCPE", "US", "INTERNATIONAL", "ip", "vG"], - "policyType": "hpaPolicy", + "policyType": "hpa", "flavorFeatures": [ { "id": "vg_1", diff --git a/test/functest/simulators/policy/response-payloads/pdp-has-vcpe-good/vnfPolicy_vG.json b/test/functest/simulators/policy/response-payloads/pdp-has-vcpe-good/vnfPolicy_vG.json index d215078..b047686 100644 --- a/test/functest/simulators/policy/response-payloads/pdp-has-vcpe-good/vnfPolicy_vG.json +++ b/test/functest/simulators/policy/response-payloads/pdp-has-vcpe-good/vnfPolicy_vG.json @@ -1,6 +1,6 @@ { "service": "vnfPolicy", - "policyName": "OSDF_R2.vnfPolicy_vG", + "policyName": "OSDF_DUBLIN.vnfPolicy_vG", "description": "vnfPolicy", "templateVersion": "OpenSource.version.1", "version": "test1", diff --git a/test/functest/simulators/policy/response-payloads/pdp-has-vcpe-good/vnfPolicy_vGMuxInfra.json b/test/functest/simulators/policy/response-payloads/pdp-has-vcpe-good/vnfPolicy_vGMuxInfra.json index 6849105..45d67f6 100644 --- a/test/functest/simulators/policy/response-payloads/pdp-has-vcpe-good/vnfPolicy_vGMuxInfra.json +++ b/test/functest/simulators/policy/response-payloads/pdp-has-vcpe-good/vnfPolicy_vGMuxInfra.json @@ -1,6 +1,6 @@ { "service": "vnfPolicy", - "policyName": "OSDF_R2.vnfPolicy_vGMuxInfra", + "policyName": "OSDF_DUBLIN.vnfPolicy_vGMuxInfra", "description": "vnfPolicy", "templateVersion": "OpenSource.version.1", "version": "test1", diff --git a/test/functest/simulators/simulated-config/log.yml b/test/functest/simulators/simulated-config/log.yml new file mode 100644 index 0000000..0b8815f --- /dev/null +++ b/test/functest/simulators/simulated-config/log.yml @@ -0,0 +1,95 @@ +version: 1 +disable_existing_loggers: True + +loggers: + error: + handlers: [error_handler] + level: "WARN" + propagate: True + debug: + handlers: [debug_handler] + level: "DEBUG" + propagate: True + metrics: + handlers: [metrics_handler] + level: "INFO" + propagate: True + audit: + handlers: [audit_handler] + level: "INFO" + propagate: True +handlers: + debug_handler: + level: "DEBUG" + class: "logging.handlers.TimedRotatingFileHandler" + filename: "logs/debug.log" + formatter: "debugFormat" + when: midnight + interval: 1 + utc: True + delay: False + backupCount: 10 + error_handler: + level: "WARN" + class: "logging.handlers.TimedRotatingFileHandler" + filename: "logs/error.log" + formatter: "errorFormat" + when: midnight + interval: 1 + utc: True + delay: False + backupCount: 10 + metrics_handler: + level: "INFO" + class: "logging.handlers.TimedRotatingFileHandler" + filename: "logs/metrics.log" + formatter: "metricsFormat" + when: midnight + interval: 1 + utc: True + delay: False + backupCount: 10 + audit_handler: + level: "INFO" + class: "logging.handlers.TimedRotatingFileHandler" + filename: "logs/audit.log" + formatter: "auditFormat" + when: midnight + interval: 1 + utc: True + delay: False + backupCount: 10 +formatters: + standard: + format: "%(asctime)s|||||%(name)s||%(thread)||%(funcName)s||%(levelname)s||%(message)s" + debugFormat: + format: "%(asctime)s|||||%(name)s||%(thread)s||%(funcName)s||%(levelname)s||%(message)s||||%(mdc)s" + mdcfmt: "{requestID} {threadID} {serverName} {serviceName} {instanceUUID} {upperLogLevel} {severity} {serverIPAddress} {server} {IPAddress} {className} {timer} {detailMessage}" + datefmt: "%Y-%m-%d %H:%M:%S" + (): onaplogging.mdcformatter.MDCFormatter + errorFormat: + format: "%(asctime)s|||||%(name)s||%(thread)s||%(funcName)s||%(levelname)s||%(message)s||||%(mdc)s" + mdcfmt: "{requestID} {threadID} {serviceName} {partnerName} {targetEntity} {targetServiceName} {errorCode} {errorDescription} {detailMessage}" + datefmt: "%Y-%m-%d %H:%M:%S" + (): onaplogging.mdcformatter.MDCFormatter + auditFormat: + format: "%(asctime)s|||||%(name)s||%(thread)s||%(funcName)s||%(levelname)s||%(message)s||||%(mdc)s" + mdcfmt: "{requestID} {serviceInstanceID} {threadID} {serverName} {serviceName} {partnerName} {statusCode} {responseCode} {responseDescription} {instanceUUID} {upperLogLevel} {severity} \ + {serverIPAddress} {timer} {server} {IPAddress} {className} {unused} {processKey} {customField1} {customField2} {customField3} {customField4} {detailMessage}" + datefmt: "%Y-%m-%d %H:%M:%S" + (): onaplogging.mdcformatter.MDCFormatter + metricsFormat: + format: "%(asctime)s|||||%(name)s||%(thread)s||%(funcName)s||%(levelname)s||%(message)s||||%(mdc)s" + mdcfmt: "{requestID} {serviceInstanceID} {threadID} {serverName} {serviceName} {partnerName} \ + {targetEntity} {targetServiceName} {statusCode} {responseCode} {responseDescription} \ + {instanceUUID} {upperLogLevel} {severity} {serverIPAddress} {timer} {server} {IPAddress} \ + {className} {unused} {processKey} {targetVirtualEntity} {customField1} {customField2} \ + {customField3} {customField4} {detailMessage}" + datefmt: "%Y-%m-%d %H:%M:%S" + (): onaplogging.mdcformatter.MDCFormatter + + mdcFormat: + format: "%(asctime)s|||||%(name)s||%(thread)s||%(funcName)s||%(levelname)s||%(message)s||||%(mdc)s" + mdcfmt: "{requestID} {invocationID} {serviceName} {serviceIP}" + datefmt: "%Y-%m-%d %H:%M:%S" + (): onaplogging.mdcformatter.MDCFormatter |