Thanks Sebastien for help. Here's the policy:
{
"tca_policy": {
"domain": "measurementsForVfScaling",
"metricsPerEventName": [
{
"policyScope": "testPolicyScope",
"thresholds": [
{
"version": "1",
"severity": "CRITICAL",
"thresholdValue": 30,
"closedLoopEventStatus": "ONSET",
"closedLoopControlName": "LOOP_lg-aa-loop-50",
"direction": "LESS",
"fieldPath":
"$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedTotalPacketsDelta"
}
],
"eventName": "vFirewallBroadcastPackets",
"policyVersion": "1.0.0",
"controlLoopSchemaType": "VM",
"policyName": "testPolicyScope"
}
]
}
}
As a note, we had something similar working in Dublin, now I'm trying to "map
it" to Frankfurt. Not sure about all the fields though, I'm not that familiar
with ctrl-loops to be honest.
BTW. Is there any way for me to understand what's the problem with this policy?
Asking Policy team each time doesn't seem too optimal ;) Maybe there's some log
or something that I can check?
Regards
-Lukasz
________________________________
Od: Determe, Sebastien <[email protected]>
Wysłane: piątek, 29 maja 2020 15:55
Do: [email protected] <[email protected]>; Grech, Lukasz
(Nokia - PL/Wroclaw) <[email protected]>
Temat: RE: [CLAMP][POLICY] Error when submitting to Policy Engine #clamp #policy
Lukasz,
Policy rejects the TCA monitoring policy
(onap.policies.monitoring.cdap.tca.hi.lo.app, APP box in clamp).
It means there is an issue with the configuration of it,
Could you copy paste the JSON config you have (click on the monitoring policy
box and then click on the button EDIT JSON at the very top of the dialog)? so
that may be someone from policy can have a look
Thanks,
Seb
From: [email protected] <[email protected]> On Behalf Of
Grech, Lukasz (Nokia - PL/Wroclaw)
Sent: Friday, May 29, 2020 3:24 PM
To: [email protected]
Subject: [onap-discuss] [CLAMP][POLICY] Error when submitting to Policy Engine
#clamp #policy
Hi
I have a ctrl-loop created in CLAMP. I get an error when submitting policies to
Policy Engine:
------------------------------------------------------------------------------------------------------------
SUBMIT request failed, Error reported:
org.apache.camel.http.common.HttpOperationFailedException: HTTP operation
failed invoking
https://policy-api.onap:6969/policy/api/v1/policytypes/onap.policies.monitoring.cdap.tca.hi.lo.app/versions/1.0.0/policies?connectionTimeToLive=5000<https://urldefense.proofpoint.com/v2/url?u=https-3A__policy-2Dapi.onap-3A6969_policy_api_v1_policytypes_onap.policies.monitoring.cdap.tca.hi.lo.app_versions_1.0.0_policies-3FconnectionTimeToLive-3D5000&d=DwQFBA&c=LFYZ-o9_HUMeMTSQicvjIg&r=zwceF46ESLyNVseh8BvkF2DZfq1KdUHuJhDK-s-uR2g&m=ASSza3uzGGGQ19KWgtv_4qDxTwayAYUfhb_GMyg96Jc&s=7Rfo7WCPpYCUtBsyEp3Iq2bb5Ma7JpSh8rpArvErp5I&e=>
with statusCode: 406 - Body: {"code":"NOT_ACCEPTABLE","error":"\n***validation
of model failed***\nPfConceptKey(name=ToscaServiceTemplateSimple,
version=1.0.0):org.onap.policy.models.tosca.simple.concepts.JpaToscaServiceTemplate:INVALID:no
policy types are defined on the service template for the policies in the
topology
template\n********************************","details":["\n***validation of
model failed***\nPfConceptKey(name=ToscaServiceTemplateSimple,
version=1.0.0):org.onap.policy.models.tosca.simple.concepts.JpaToscaServiceTemplate:INVALID:no
policy types are defined on the service template for the policies in the
topology template\n********************************"]}
------------------------------------------------------------------------------------------------------------
I looked for this message "no policy types are defined..." in Policy code and
it seems it comes from service template validation
(JpaToscaServiceTemplate.validatePolicyTypesInPolicies()). And it seems it's
raised when there are no policy types defined in the template (if I get this
right). However I looked in to the template generated by SDC and it looks like
policy types are imported there. I'm attaching CSAR exported from SDC.
Could you give me a hint what might be wrong?
Thanks
-Lukasz
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#21213): https://lists.onap.org/g/onap-discuss/message/21213
Mute This Topic: https://lists.onap.org/mt/74601785/21656
Mute #clamp: https://lists.onap.org/mk?hashtag=clamp&subid=2740164
Mute #policy: https://lists.onap.org/mk?hashtag=policy&subid=2740164
Group Owner: [email protected]
Unsubscribe: https://lists.onap.org/g/onap-discuss/unsub
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-