examples icon indicating copy to clipboard operation
examples copied to clipboard

Clean-up Policy files in examples

Open t-fine opened this issue 2 years ago • 5 comments

A message from Glen... "It is unfortunate that the examples in the open-horizon/examples repo inconsistently use the horizon subdirectory and the policy subdirectory. I had forgotten how bad this was but today I am trying to write up something about how to use pattern and policy and I wanted to point at the examples repo but then rediscovered the inconsistency there."

The original reason for having two sets of policy files in the horizon and policy directories was to have one that the exchangePublish.sh script uses when populating a new exchange (the horizon dir), and one set for users to leverage when walking through the "Creating your own ..." README flow so there wouldn't be two agreements that deploy the helloworld service possible causing confusion as well.

t-fine avatar Mar 01 '22 14:03 t-fine

Hello @t-fine,
I would like to work on this issue. Could this be assigned to me ?

Also, can you guide me a little wrt what needs to be done here.

saurav1004 avatar Feb 03 '23 10:02 saurav1004

Sorry about the delay here @saurav1004 have at it! :)

t-fine avatar Feb 13 '23 17:02 t-fine

No issues. I will take a look. Could you guide me a little wrt what needs to be done here, to avoid the confusion

saurav1004 avatar Feb 23 '23 07:02 saurav1004

@saurav1004 Take a look at our newer example services for a good pattern or example to follow regarding files living in a single folder rather than "horizon" or "policy" directories:

  • https://github.com/open-horizon-services/web-helloworld-python
  • https://github.com/open-horizon-services/service-restcam
  • https://github.com/open-horizon-services/service-homeassistant

joewxboy avatar Feb 23 '23 20:02 joewxboy

@saurav1004 in regards to the files in policy/ ... perhaps their creation could be worked into the steps of the "Creating Your Own Hello World Edge Service" so there is no actual file to save ... just thinking

t-fine avatar Feb 27 '23 15:02 t-fine