Merge pull request #92 from Mishalabdullah/feature/merging_networks
Merging Networks CLI Feature
This commit is contained in:
@@ -8,11 +8,41 @@ Experience the convenience and efficiency of Beckn-ONIX as you embark on your jo
|
||||
|
||||
| Version | Release Date |
|
||||
| -------------------------------------------- | ------------ |
|
||||
| [v0.4.1](#beckn-onix-version-041-2024-06-22) | 2024-06-22 |
|
||||
| [v0.4.0](#beckn-onix-version-040-2024-05-06) | 2024-05-06 |
|
||||
| [v0.3.0](#beckn-onix-version-030-2024-03-20) | 2024-03-20 |
|
||||
| [v0.2.0](#beckn-onix-version-020-2024-03-01) | 2024-03-01 |
|
||||
| [v0.1.0](#beckn-onix-version-010-2024-02-16) | 2024-02-16 |
|
||||
|
||||
## Beckn-ONIX Version 0.4.1 (2024-06-22)
|
||||
|
||||
- This release adds a new feature for in CLI where its will be able to merge multiple registries.
|
||||
|
||||
### New Features
|
||||
|
||||
- Merging registry A to registry B
|
||||
- Creting a new super-registry from multiple registries.
|
||||
|
||||
### Enhancements
|
||||
|
||||
- None
|
||||
|
||||
### Bug fixes
|
||||
|
||||
- None
|
||||
|
||||
### Limitations
|
||||
|
||||
- None
|
||||
|
||||
### Upcoming Version
|
||||
|
||||
- GUI support for the Merging feature.
|
||||
|
||||
### Release date
|
||||
|
||||
2024-06-22
|
||||
|
||||
## Beckn-ONIX Version 0.4.0 (2024-05-06)
|
||||
|
||||
- This release adds a new browser based GUI for installing Beckn network components
|
||||
@@ -156,8 +186,7 @@ This release is specifically tailored for deployment on Linux machines, encompas
|
||||
|
||||
### Limitations
|
||||
|
||||
- The current installer is tested only for Linux (Ubuntu), it might support other flavors also.
|
||||
- The current version installs all the components with the default configurations.
|
||||
- None
|
||||
|
||||
### Upcoming Version
|
||||
|
||||
|
||||
@@ -162,6 +162,61 @@ install_bpp_protocol_server(){
|
||||
echo "Protocol server BPP installation successful"
|
||||
}
|
||||
|
||||
mergingNetworks(){
|
||||
echo -e "1. Merge Two Different Registries \n2. Merge Multiple Registries into a Super Registry"
|
||||
read -p "Enter your choice: " merging_network
|
||||
urls=()
|
||||
if [ "$merging_network" = "2" ]; then
|
||||
while true; do
|
||||
read -p "Enter registry URL (or 'N' to stop): " url
|
||||
if [[ $url == 'N' ]]; then
|
||||
break
|
||||
else
|
||||
urls+=("$url")
|
||||
fi
|
||||
done
|
||||
read -p "Enter the Super Registry URL: " registry_super_url
|
||||
else
|
||||
read -p "Enter A registry URL: " registry_a_url
|
||||
read -p "Enter B registry URL: " registry_b_url
|
||||
urls+=("$registry_a_url")
|
||||
|
||||
fi
|
||||
if [[ ${#urls[@]} -gt 0 ]]; then
|
||||
echo "Entered registry URLs:"
|
||||
all_responses=""
|
||||
for url in "${urls[@]}"; do
|
||||
response=$(curl -s -H 'ACCEPT: application/json' -H 'CONTENT-TYPE: application/json' "$url"+/subscribers/lookup -d '{}')
|
||||
all_responses+="$response"
|
||||
done
|
||||
for element in $(echo "$all_responses" | jq -c '.[]'); do
|
||||
if [ "$merging_network" -eq 1 ]; then
|
||||
curl --location "$registry_b_url"+/subscribers/register \
|
||||
--header 'Content-Type: application/json' \
|
||||
--data "$element"
|
||||
echo
|
||||
else
|
||||
curl --location "$registry_super_url"+/subscribers/register \
|
||||
--header 'Content-Type: application/json' \
|
||||
--data "$element"
|
||||
echo
|
||||
fi
|
||||
done
|
||||
echo "Merging Multiple Registries into a Super Registry Done ..."
|
||||
else
|
||||
echo "No registry URLs entered."
|
||||
fi
|
||||
|
||||
if [ "$merging_network" = "2" ]; then
|
||||
echo "Merging Multiple Registries into a Super Registry"
|
||||
else
|
||||
echo "Invalid option. Please restart the script and select a valid option."
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
|
||||
# Function to install BPP Protocol Server with Sandbox
|
||||
install_bpp_protocol_server_with_sandbox(){
|
||||
start_support_services
|
||||
@@ -290,7 +345,6 @@ read -p "Enter your choice: " choice
|
||||
|
||||
boldGreen="\e[1m\e[92m"
|
||||
reset="\e[0m"
|
||||
|
||||
if [[ $choice -eq 3 ]]; then
|
||||
echo "Installing all components on the local machine"
|
||||
install_package
|
||||
@@ -298,6 +352,9 @@ if [[ $choice -eq 3 ]]; then
|
||||
install_gateway
|
||||
install_bap_protocol_server
|
||||
install_bpp_protocol_server_with_sandbox
|
||||
elif [[ $choice -eq 4 ]]; then
|
||||
echo "Determining the platforms available based on the initial choice"
|
||||
mergingNetworks
|
||||
else
|
||||
# Determine the platforms available based on the initial choice
|
||||
platforms=("Gateway" "BAP" "BPP")
|
||||
@@ -324,3 +381,6 @@ fi
|
||||
echo "Process complete. Thank you for using Beckn-ONIX!"
|
||||
|
||||
|
||||
echo "Process complete. Thank you for using Beckn-ONIX!"
|
||||
|
||||
|
||||
|
||||
@@ -42,7 +42,6 @@ Contributions are welcome! If you'd like to contribute to the beckn-onix-gui pro
|
||||
|
||||
The beckn-onix-gui project is licensed under the MIT License. See the LICENSE file for more information.
|
||||
|
||||
|
||||
## Contact
|
||||
|
||||
If you have any questions or issues with the beckn-onix-gui project, please don't hesitate to reach out.
|
||||
@@ -50,8 +49,8 @@ If you have any questions or issues with the beckn-onix-gui project, please don'
|
||||
### Made with ❤️
|
||||
|
||||
built by the [Mulearn Team](https://mulearn.org/)
|
||||
|
||||
1. [Mishal Abdullah](https://github.com/Mishalabdullah/)
|
||||
2. [Aswin Asok](https://github.com/AswinAsok)
|
||||
3. [Viraj Prabhu ](https://github.com/viraka)
|
||||
4. [Adasrsh](https://adarshmohanks.framer.website/)
|
||||
|
||||
4. [Adarsh Mohan](https://www.linkedin.com/in/adarshmohanks/)
|
||||
|
||||
Reference in New Issue
Block a user