Hi Pamela

Implementing this feature will surely solve the bug in the best possible way. 
The problem is it's a feature for Dublin.

Until then no one is able to run Closed Loop with action combined of multiple 
words.

I've checked APPC LCM API and there is plenty of them. It looks like usage of 
cases I've describe previously is a convention in all of them.

That's why I've proposed solution. This is not hardcoding actions in Policy 
it's just adapting them to current convention.

Can we discuss it on today control loop meeting?


Br,

Adam Krysiak
Software Engineer
MN MANO RD&Pz ONAP-UI-ML DEVOPS WRO 2 SG
Nokia
Contact number: +48691441316
________________________________
From: DRAGOSH, PAMELA L (PAM) <[email protected]>
Sent: Tuesday, August 28, 2018 2:50:20 PM
To: Krysiak, Adam (Nokia - PL/Wroclaw); [email protected]
Cc: MAHER, RANDA
Subject: Re: [control-loop][policy][appc] Control loop problem


Adam,



So this is why we need to standardize and simplify the outgoing actions from 
Policy to the controllers. This effort should eliminate these problems:



https://wiki.onap.org/display/DW/Event+based+Common+Notification+messaging+format+for+Control+Loop+Operations



Once I have this vetted out we bring this to the Architecture Sub Committee for 
approval.



I want to eliminate the need for Policy to have to implement all these various 
API’s in the controllers, orchestrators and internal applications that can be 
involved in Control Loop loop. There shouldn’t be any need for that. The 
controllers/orchestrators/applications just provide a specification on the 
recipes that are available and the notification messages can be dynamically 
created and sent to them. The work is on their end to implement their recipes, 
which is always necessary anyway.



Thanks,



Pam





From: "Krysiak, Adam (Nokia - PL/Wroclaw)" <[email protected]>
Date: Tuesday, August 28, 2018 at 3:40 AM
To: "[email protected]" <[email protected]>
Cc: "MAHER, RANDA" <[email protected]>, "DRAGOSH, PAMELA L (PAM)" 
<[email protected]>
Subject: [control-loop][policy][appc] Control loop problem



Hi,



During latest researches in control loop scenario we've identified a problem 
with recipe names.

Generally the problem exists when configuring Closed Loop in clamp and choose 
in HealthCheck as action that should be performed after threshold is exceeded. 
Everything is fine until Policy is trying to perform action and then it fails 
with exception.



We've investigated it a bit deeper. Outcome is that when choosing action/recipe 
combined from 2 words (like HealthCheck) clamp creates yaml with this action 
and sends it to configure drools rule template. Then when drools tries to 
perform action using APPC it takes recipe from yaml and uses it to create lcm 
request. In request action name is used both in URL:

/restconf/operations/appc-provider-lcm:health-check

and in body:

{

...

"action": "HealthCheck"

...

}

In current solution for health check clamp sends 'healthCheck' as recipe in 
yaml file.

When policy creates request in function  
AppcLcmActorServiceProvider.constructRequest(...) to format URL it uses 
lowercase recipe and for body it capitalizes it.

That causes situation where we get URL:

/restconf/operations/appc-provider-lcm:healthcheck

and body

{

...

"action": "Healthcheck"

...

}

That causes an error in APPC:



Invalid value 'Healthcheck' for enum type. Allowed values are: [Restart, 
Rebuild, Migrate, Evacuate, Snapshot, Rollback, Sync, Audit, Stop, Start, 
Terminate, SoftwareUpload, HealthCheck, LiveUpgrade, Lock, Unlock, Test, 
CheckLock, Configure, ConfigModify, ConfigScaleOut, ConfigRestore, 
ConfigBackup, ConfigBackupDelete, ConfigExport, StopApplication, 
StartApplication, QuiesceTraffic, ResumeTraffic, UpgradePreCheck, 
UpgradeSoftware, UpgradePostCheck, UpgradeBackup, UpgradeBackout, ActionStatus, 
Query, Reboot, AttachVolume, DetachVolume]





This bug will also be observed when we try to use ConfigModify (not available 
by default but can be added in properties) in CLAMP and all other actions 
combined of two words.

>From my current observations multi-word actions are dash case in URL and camel 
>case in body. So proposition for the solution for this bug is to:

  1.  standardize way those kind of actions are send from CLAMP
  2.  change request construction in 
AppcLcmActorServiceProvider.constructRequest(..) in Policy



We can take care of that bug. What we need is:

  *   an approve that our theory about cases is fine and proposed solution will 
work for other scenarios
  *   an approve from community



Br,

Adam Krysiak
Software Engineer
MN MANO RD&Pz ONAP-UI-ML DEVOPS WRO 2 SG
Nokia
Contact number: +48691441316

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#12116): https://lists.onap.org/g/onap-discuss/message/12116
Mute This Topic: https://lists.onap.org/mt/25037780/21656
Group Owner: [email protected]
Unsubscribe: https://lists.onap.org/g/onap-discuss/unsub  
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to