Re: vFW Closed Loop - Operational Policy issues in Beijing #policy #usecaseui #kubernetes #install #drools


Cristina Precup
 

Hello,

Thank you for the reference. I did do the onboarding step mentioned here, making sure to replace the field with the correct PG model-invariant-id in the posh-policies.sh script. However, I don't think this script actually does the onboarding in my case:

kubectl exec -it scapula-pap-5bf5f48d7b-v7fld -c pap -n onap -- bash -c "export PRELOAD_POLICIES=true; /home/policy/push-policies.sh"
Upload BRMS Param Template
--2018-09-11 11:32:53-- https://git.onap.org/policy/drools-applications/plain/controlloop/templates/archetype-cl-amsterdam/src/main/resources/archetype-resources/src/main/resources/__closedLoopControlName__.drl
Resolving git.onap.org (git.onap.org)... 198.145.29.92
Connecting to git.onap.org (git.onap.org)|198.145.29.92|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 58366 (57K) [text/plain]
Saving to: 'cl-amsterdam-template.drl'

100%[==============================================================================>] 58,366 193KB/s in 0.3s

2018-09-11 11:32:54 (193 KB/s) - 'cl-amsterdam-template.drl' saved [58366/58366]

* Hostname was NOT found in DNS cache
* Trying 10.42.10.50...
* Connected to pdp (10.42.10.50) port 8081 (#0)
POST /pdp/api/policyEngineImport HTTP/1.1
User-Agent: curl/7.35.0
Host: pdp:8081
Accept: text/plain
ClientAuth: cHl0aG9uOnRlc3Q=
Authorization: Basic dGVzdHBkcDphbHBoYTEyMw==
Environment: TEST
Content-Length: 58757
Expect: 100-continue
Content-Type: multipart/form-data; boundary=------------------------110622b19dc01d62
* Connection #0 to host pdp left intact
PPRELOAD_POLICIES is true
Create BRMSParam Operational Policies
Create BRMSParamvFirewall Policy
* Hostname was NOT found in DNS cache
* Trying 10.42.10.50...
* Connected to pdp (10.42.10.50) port 8081 (#0)
PUT /pdp/api/createPolicy HTTP/1.1
User-Agent: curl/7.35.0
Host: pdp:8081
Content-Type: application/json
Accept: text/html
ClientAuth: cHl0aG9uOnRlc3Q=
Authorization: Basic dGVzdHBkcDphbHBoYTEyMw==
Environment: TEST
Content-Length: 1309
Expect: 100-continue
* Connection #0 to host pdp left intact
PCreate BRMSParamvDNS Policy
* Hostname was NOT found in DNS cache
* Trying 10.42.10.50...
* Connected to pdp (10.42.10.50) port 8081 (#0)
PUT /pdp/api/createPolicy HTTP/1.1
User-Agent: curl/7.35.0
Host: pdp:8081
Content-Type: application/json
Accept: text/html
ClientAuth: cHl0aG9uOnRlc3Q=
Authorization: Basic dGVzdHBkcDphbHBoYTEyMw==
Environment: TEST
Content-Length: 1148
Expect: 100-continue
* Connection #0 to host pdp left intact
PCreate BRMSParamVOLTE Policy
* Hostname was NOT found in DNS cache
* Trying 10.42.10.50...
* Connected to pdp (10.42.10.50) port 8081 (#0)
PUT /pdp/api/createPolicy HTTP/1.1
User-Agent: curl/7.35.0
Host: pdp:8081
Content-Type: application/json
Accept: text/html
ClientAuth: cHl0aG9uOnRlc3Q=
Authorization: Basic dGVzdHBkcDphbHBoYTEyMw==
Environment: TEST
Content-Length: 1140
Expect: 100-continue
* Connection #0 to host pdp left intact
PCreate BRMSParamvCPE Policy
* Hostname was NOT found in DNS cache
* Trying 10.42.10.50...
* Connected to pdp (10.42.10.50) port 8081 (#0)
PUT /pdp/api/createPolicy HTTP/1.1
User-Agent: curl/7.35.0
Host: pdp:8081
Content-Type: application/json
Accept: text/html
ClientAuth: cHl0aG9uOnRlc3Q=
Authorization: Basic dGVzdHBkcDphbHBoYTEyMw==
Environment: TEST
Content-Length: 1139
Expect: 100-continue
* Connection #0 to host pdp left intact
PCreate MicroService Config Policies
Create MicroServicevFirewall Policy
* Hostname was NOT found in DNS cache
* Trying 10.42.10.50...
* Connected to pdp (10.42.10.50) port 8081 (#0)
PUT /pdp/api/createPolicy HTTP/1.1
User-Agent: curl/7.35.0
Host: pdp:8081
Content-Type: application/json
Accept: text/plain
ClientAuth: cHl0aG9uOnRlc3Q=
Authorization: Basic dGVzdHBkcDphbHBoYTEyMw==
Environment: TEST
Content-Length: 1689
Expect: 100-continue
* Connection #0 to host pdp left intact
PCreate MicroServicevDNS Policy
* Hostname was NOT found in DNS cache
* Trying 10.42.10.50...
* Connected to pdp (10.42.10.50) port 8081 (#0)
PUT /pdp/api/createPolicy HTTP/1.1
User-Agent: curl/7.35.0
Host: pdp:8081
Content-Type: application/json
Accept: text/plain
ClientAuth: cHl0aG9uOnRlc3Q=
Authorization: Basic dGVzdHBkcDphbHBoYTEyMw==
Environment: TEST
Content-Length: 1306
Expect: 100-continue
* Connection #0 to host pdp left intact
PCreate MicroServicevCPE Policy
* Hostname was NOT found in DNS cache
* Trying 10.42.10.50...
* Connected to pdp (10.42.10.50) port 8081 (#0)
PUT /pdp/api/createPolicy HTTP/1.1
User-Agent: curl/7.35.0
Host: pdp:8081
Content-Type: application/json
Accept: text/plain
ClientAuth: cHl0aG9uOnRlc3Q=
Authorization: Basic dGVzdHBkcDphbHBoYTEyMw==
Environment: TEST
Content-Length: 1640
Expect: 100-continue
* Connection #0 to host pdp left intact
PCreating Decision Guard policy
* Hostname was NOT found in DNS cache
* Trying 10.42.10.50...
* Connected to pdp (10.42.10.50) port 8081 (#0)
PUT /pdp/api/createPolicy HTTP/1.1
User-Agent: curl/7.35.0
Host: pdp:8081
Content-Type: application/json
Accept: text/plain
ClientAuth: cHl0aG9uOnRlc3Q=
Authorization: Basic dGVzdHBkcDphbHBoYTEyMw==
Environment: TEST
Content-Length: 463
* upload completely sent off: 463 out of 463 bytes
* Connection #0 to host pdp left intact
PPush Decision policy
* Hostname was NOT found in DNS cache
* Trying 10.42.10.50...
* Connected to pdp (10.42.10.50) port 8081 (#0)
PUT /pdp/api/pushPolicy HTTP/1.1
User-Agent: curl/7.35.0
Host: pdp:8081
Content-Type: application/json
Accept: text/plain
ClientAuth: cHl0aG9uOnRlc3Q=
Authorization: Basic dGVzdHBkcDphbHBoYTEyMw==
Environment: TEST
Content-Length: 97
* upload completely sent off: 97 out of 97 bytes
* Connection #0 to host pdp left intact
PPushing BRMSParam Operational policies
pushPolicy : PUT : com.BRMSParamvFirewall
* Hostname was NOT found in DNS cache
* Trying 10.42.10.50...
* Connected to pdp (10.42.10.50) port 8081 (#0)
PUT /pdp/api/pushPolicy HTTP/1.1
User-Agent: curl/7.35.0
Host: pdp:8081
Content-Type: application/json
Accept: text/plain
ClientAuth: cHl0aG9uOnRlc3Q=
Authorization: Basic dGVzdHBkcDphbHBoYTEyMw==
Environment: TEST
Content-Length: 99
* upload completely sent off: 99 out of 99 bytes
* Connection #0 to host pdp left intact
PpushPolicy : PUT : com.BRMSParamvDNS
* Hostname was NOT found in DNS cache
* Trying 10.42.10.50...
* Connected to pdp (10.42.10.50) port 8081 (#0)
PUT /pdp/api/pushPolicy HTTP/1.1
User-Agent: curl/7.35.0
Host: pdp:8081
Content-Type: application/json
Accept: text/plain
ClientAuth: cHl0aG9uOnRlc3Q=
Authorization: Basic dGVzdHBkcDphbHBoYTEyMw==
Environment: TEST
Content-Length: 94
* upload completely sent off: 94 out of 94 bytes
* Connection #0 to host pdp left intact
PpushPolicy : PUT : com.BRMSParamVOLTE
* Hostname was NOT found in DNS cache
* Trying 10.42.10.50...
* Connected to pdp (10.42.10.50) port 8081 (#0)
PUT /pdp/api/pushPolicy HTTP/1.1
User-Agent: curl/7.35.0
Host: pdp:8081
Content-Type: application/json
Accept: text/plain
ClientAuth: cHl0aG9uOnRlc3Q=
Authorization: Basic dGVzdHBkcDphbHBoYTEyMw==
Environment: TEST
Content-Length: 95
* upload completely sent off: 95 out of 95 bytes
* Connection #0 to host pdp left intact
PpushPolicy : PUT : com.BRMSParamvCPE
* Hostname was NOT found in DNS cache
* Trying 10.42.10.50...
* Connected to pdp (10.42.10.50) port 8081 (#0)
PUT /pdp/api/pushPolicy HTTP/1.1
User-Agent: curl/7.35.0
Host: pdp:8081
Content-Type: application/json
Accept: text/plain
ClientAuth: cHl0aG9uOnRlc3Q=
Authorization: Basic dGVzdHBkcDphbHBoYTEyMw==
Environment: TEST
Content-Length: 94
* upload completely sent off: 94 out of 94 bytes
* Connection #0 to host pdp left intact
PPushing MicroService Config policies
pushPolicy : PUT : com.MicroServicevFirewall
* Hostname was NOT found in DNS cache
* Trying 10.42.10.50...
* Connected to pdp (10.42.10.50) port 8081 (#0)
PUT /pdp/api/pushPolicy HTTP/1.1
User-Agent: curl/7.35.0
Host: pdp:8081
Content-Type: application/json
Accept: text/plain
ClientAuth: cHl0aG9uOnRlc3Q=
Authorization: Basic dGVzdHBkcDphbHBoYTEyMw==
Environment: TEST
Content-Length: 104
* upload completely sent off: 104 out of 104 bytes
* Connection #0 to host pdp left intact
PpushPolicy : PUT : com.MicroServicevDNS
* Hostname was NOT found in DNS cache
* Trying 10.42.10.50...
* Connected to pdp (10.42.10.50) port 8081 (#0)
PUT /pdp/api/pushPolicy HTTP/1.1
User-Agent: curl/7.35.0
Host: pdp:8081
Content-Type: application/json
Accept: text/plain
ClientAuth: cHl0aG9uOnRlc3Q=
Authorization: Basic dGVzdHBkcDphbHBoYTEyMw==
Environment: TEST
Content-Length: 99
* upload completely sent off: 99 out of 99 bytes
* Connection #0 to host pdp left intact
PpushPolicy : PUT : com.MicroServicevCPE
* Hostname was NOT found in DNS cache
* Trying 10.42.10.50...
* Connected to pdp (10.42.10.50) port 8081 (#0)
PUT /pdp/api/pushPolicy HTTP/1.1
User-Agent: curl/7.35.0
Host: pdp:8081
Content-Type: application/json
Accept: text/plain
ClientAuth: cHl0aG9uOnRlc3Q=
Authorization: Basic dGVzdHBkcDphbHBoYTEyMw==
Environment: TEST
Content-Length: 99
* upload completely sent off: 99 out of 99 bytes
* Connection #0 to host pdp left intact

Checking further on PAP if there are any policies configured gives me nothing:

policy@scapula-pap-5bf5f48d7b-v7fld:/tmp/policy-install$ curl --silent -X POST --header 'Content-Type: application/json --header 'Accept: application/json' --header 'ClientAuth: cHl0aG9uOnRlc3Q=' --header 'Authorization: Basic dGVzdHBkcDphbHBoYTEyMw==' --header 'Environment: TEST' -d '{"policyName": ".*vFirewall.*"}' http://pdp:8081/pdp/api/getConfig

policy@scapula-pap-5bf5f48d7b-v7fld:/tmp/policy-install$ curl --silent -X POST --header 'Content-Type: application/json' --header 'Accept: application/json' --header 'ClientAuth: cHl0aG9uOnRlc3Q=' --header 'Authorization: Basic dGVzdHBkcDphbHBoYTEyMw==' --header 'Environment: TEST' -d '{"policyName": "*"}' http://pdp:8081/pdp/api/getConfig


Best regards,
--
Cristina Precup

Join onap-discuss@lists.onap.org to automatically receive all group messages.