beckn / beckn-onix

beckn onix
MIT License
49 stars 27 forks source link

Add Layer 2 config prompt back to installation #222

Closed vbabuEM closed 1 month ago

vbabuEM commented 2 months ago

Problem When Beckn-ONIX was first demonstrated, it had the following prompt:

"Paste the URL of the network configuration here (or press Enter to skip)"

At that time, this was not linked to anything and so on a review comment, we had removed this prompt.

Subsequently, now we mandatorily need layer 2 config for BAP and BPP. The behaviour of layer 2 for Registry and Gateway is still not defined. So we can re-add this prompt to the installation of BAP and BPP.

Solution

  1. During the installation of the BAP and BPP after asking the user for registry, subscriber_id, subscriber_url and webhook_url(for BPP), prompt the user to enter the layer 2 configuration. "Paste the URL of the Layer 2 configuration here (or press Enter to skip)"
  2. If the user gave a web url, store it in a variable.
  3. Continue with the installation including the successful message (Installation success must be separate from download success).
  4. Now if the user had given a value, then call the "../layer2/download_layer_2_config_bap.sh" with the path (The shell file might have to be modified to take command line params) for the BAP. Use the download_layer_2_config_bpp.sh for BPP.
  5. If the user has not given a value, show the message BAP - "Use the download_layer_2_config_bap.sh file in the ../layer2 folder to download your required layer 2 config files" BPP - "Use the download_layer_2_config_bpp.sh file in the ../layer2 folder to download your required layer 2 config files"
vbabuEM commented 2 months ago

Related to #210

prasad-takale-eminds commented 2 months ago

I connected with @vbabuEM and discussed the approach I was following. He approved it but mentioned that we need to make additional changes to the shell script.

prasad-takale-eminds commented 2 months ago

I’ve made the necessary changes to the script for the Layer2 configuration during the BAP installation. Below are the screenshots showing the test cases:

  1. Screenshot with correct Layer2 Configuration URL:

    Correct Layer2 Configuration URL

  2. Screenshot showing the error when the Layer2 Configuration URL is incorrect or the download fails:

    Incorrect Layer2 Configuration URL

  3. Screenshot if the user skips entering the Layer2 Configuration URL:

    User Skips Layer2 Configuration URL

I will replicate the same for the BPP installation.

vbabuEM commented 2 months ago

This sounds fine Prasad. Please go ahead. @prasad-takale-eminds

prasad-takale-eminds commented 2 months ago

I’ve made the necessary changes to the script for the Layer2 configuration during the BPP installation. Below are the screenshots showing the test cases:

  1. Screenshot with correct Layer2 Configuration URL:

    Correct Layer2 Configuration URL

  2. Screenshot showing the error when the Layer2 Configuration URL is incorrect or the download fails:

    Incorrect Layer2 Configuration URL

  3. Screenshot if the user skips entering the Layer2 Configuration URL:

    User Skips Layer2 Configuration URL

prasad-takale-eminds commented 2 months ago

PR for layer 2 config installation. https://github.com/beckn/beckn-onix/pull/227

emmayank commented 1 month ago

Review Completed