From dbecba3a4baffacf9f2da82592b3e3a9e2929f21 Mon Sep 17 00:00:00 2001 From: Saravanan A Date: Mon, 10 Sep 2018 17:31:33 +0530 Subject: Add implementation for OOF PCI use case Receive DMaaP message from PCI-Handler MS with PCI Config change recommendations through DCAE_CL_OUTPUT topic. Trigger SDN-R (if allowed by policy) by sending DMaaP request through SDNR-CL topic. When the response is received from SDNR through SDNR-CL-RSP topic, just parse and print. Code review comments addressed Change-Id: If340a23ae18367b7f98e31fe79c09a09e645b2ad Issue-ID: POLICY-1089 Signed-off-by: Saravanan A --- .../src/files/bin/push-policies-casablanca | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'controlloop/packages/basex-controlloop/src/files/bin/push-policies-casablanca') diff --git a/controlloop/packages/basex-controlloop/src/files/bin/push-policies-casablanca b/controlloop/packages/basex-controlloop/src/files/bin/push-policies-casablanca index 5bd23f49b..180cdff2d 100644 --- a/controlloop/packages/basex-controlloop/src/files/bin/push-policies-casablanca +++ b/controlloop/packages/basex-controlloop/src/files/bin/push-policies-casablanca @@ -113,6 +113,19 @@ curl --silent --user @1b3rt:31nst31n -X PUT --header 'Content-Type: text/plain' }' "http://localhost:9696/policy/pdp/engine/topics/sources/ueb/${BRMSGW_TOPIC}/events" | python -m json.tool sleep 2 +echo +echo "Inserting vPCI Policy..." +curl --silent --user @1b3rt:31nst31n -X PUT --header 'Content-Type: text/plain' -d '{ + "closedLoopControlName": "ControlLoop-vPCI-fb41f388-a5f2-11e8-98d0-529269fb1459", + "controlLoopYaml": "controlLoop%3A%0D%0A++version%3A+3.0.0%0D%0A++controlLoopName%3A+ControlLoop-vPCI-fb41f388-a5f2-11e8-98d0-529269fb1459%0D%0A++trigger_policy%3A+unique-policy-id-123-modifyconfig%0D%0A++timeout%3A+1200%0D%0A++abatement%3A+false%0D%0A+%0D%0Apolicies%3A%0D%0A++-+id%3A+unique-policy-id-123-modifyconfig%0D%0A++++name%3A+modify+PCI+config%0D%0A++++description%3A%0D%0A++++actor%3A+SDNR%0D%0A++++recipe%3A+ModifyConfig%0D%0A++++target%3A%0D%0A++++++%23+These+fields+are+not+used%0D%0A++++++resourceID%3A+Eace933104d443b496b8.nodes.heat.vpg%0D%0A++++++type%3A+VNF%0D%0A++++retry%3A+0%0D%0A++++timeout%3A+300%0D%0A++++success%3A+final_success%0D%0A++++failure%3A+final_failure%0D%0A++++failure_timeout%3A+final_failure_timeout%0D%0A++++failure_retries%3A+final_failure_retries%0D%0A++++failure_exception%3A+final_failure_exception%0D%0A++++failure_guard%3A+final_failure_guard", + "policyName": "vpci", + "policyScope": "DCAE", + "policyVersion": "1.2.0" +}' "http://localhost:9696/policy/pdp/engine/topics/sources/ueb/${BRMSGW_TOPIC}/events" | python -m json.tool + +sleep 2 + + echo echo "Policy insertions completed." -- cgit 1.2.3-korg