Merging reg a to reg b
This commit is contained in:
@@ -171,12 +171,15 @@ mergingNetworks(){
|
|||||||
echo "Merging Registry A to Registry B"
|
echo "Merging Registry A to Registry B"
|
||||||
read -p "Enter Registry A URL: " registry_a_url
|
read -p "Enter Registry A URL: " registry_a_url
|
||||||
read -p "Enter Registry B URL: " registry_b_url
|
read -p "Enter Registry B URL: " registry_b_url
|
||||||
response1=$(curl -s -H 'ACCEPT: application/json' -H 'CONTENT-TYPE: application/json' "$registry_a_url" -d '{}')
|
response=$(curl -X -H 'Accept: application/json' -H 'Content-Type: application/json' "$registry_b_url"+/subscribers/lookup -d '{}') &&
|
||||||
response2=$(curl -s -H 'ACCEPT: application/json' -H 'CONTENT-TYPE: application/json' "$registry_b_url" -d '{}')
|
combined_response="${response}"
|
||||||
combined_response="${response1}${response2}"
|
for element in $(echo "$combined_response" | jq -c '.[]'); do
|
||||||
echo "$combined_response"
|
curl --location "$registry_a_url"+/subscribers/register \
|
||||||
# Need to to know how to send data to registry B , facing issues in authorization
|
--header 'Content-Type: application/json' \
|
||||||
echo "Merging Two Different Registries"
|
--data "$element"
|
||||||
|
echo
|
||||||
|
done
|
||||||
|
echo "Merging Two Different Registries Done ..."
|
||||||
elif [[ $merging_network == 2 ]]; then
|
elif [[ $merging_network == 2 ]]; then
|
||||||
urls=()
|
urls=()
|
||||||
while true; do
|
while true; do
|
||||||
|
|||||||
Reference in New Issue
Block a user