Commit fe89c48b authored by Andrea Sgambelluri's avatar Andrea Sgambelluri
Browse files

Bugs Fixed in Running Agents

parent 265a2f46
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -41,7 +41,7 @@
                        "action": 1,
                        "custom": {
                            "resource_key": "_connect/address",
                            "resource_value": "10.0.2.15"
                            "resource_value": "10.0.2.4"
                        }
                    },
                    {
+1 −1
Original line number Diff line number Diff line
@@ -41,7 +41,7 @@
                        "action": 1,
                        "custom": {
                            "resource_key": "_connect/address",
                            "resource_value": "10.0.2.15"
                            "resource_value": "10.0.2.4"
                        }
                    },
                    {
+1 −1
Original line number Diff line number Diff line
@@ -107,7 +107,7 @@
                        "action": 1,
                        "custom": {
                            "resource_key": "_connect/address",
                            "resource_value": "10.0.2.15"
                            "resource_value": "10.0.2.4"
                        }
                    },
                    {
+1 −1
Original line number Diff line number Diff line
@@ -108,7 +108,7 @@
                        "action": 1,
                        "custom": {
                            "resource_key": "_connect/address",
                            "resource_value": "10.0.2.15"
                            "resource_value": "10.0.2.4"
                        }
                    },
                    {
+28 −18
Original line number Diff line number Diff line
@@ -13,22 +13,32 @@
# See the License for the specific language governing permissions and
# limitations under the License.

DOCKER_CONTAINER=$1
DOCKER_PORT=$2

if [ -n "$DOCKER_CONTAINER" ] && [ -n "$DOCKER_PORT" ];then
      sudo docker stop "$DOCKER_CONTAINER" -t 1
      sudo docker rm "$DOCKER_CONTAINER"

      echo "Creating TPs"
      screen -dmS t1 -T xterm sh -c "docker run -p 10.0.2.15:"$DOCKER_PORT":2022 -v ~/tfs-ctrl/tempOC/files:/files --name $DOCKER_CONTAINER -it asgamb1/oc23bgp.img:latest"
      sleep  2 
      if [ "$( docker container  inspect -f '{{.State.Running}}' "$DOCKER_CONTAINER")" = "true" ]; then 
            docker exec  "$DOCKER_CONTAINER"  cp /files/demoECOC21_4.xml demoECOC21.xml
            docker exec "$DOCKER_CONTAINER" /confd/examples.confd/OC23/startNetconfAgent.sh 
         



screen -dmS t1 -T xterm sh -c "docker run -p 10.0.2.4:2023:2022 -v ~/tfs-ctrl/src/tests/ofc24/tempOC/files:/files --name na1 -it asgamb1/oc23bgp.img:latest bash"
screen -dmS t2 -T xterm sh -c "docker run -p 10.0.2.4:2024:2022 -v ~/tfs-ctrl/src/tests/ofc24/tempOC/files:/files --name na2 -it asgamb1/oc23bgp.img:latest bash"



sleep 4
echo "starting transponder1 "

if [ "$( docker container  inspect -f '{{.State.Running}}' na1)" = "true" ]; then 
        docker exec  na1 sh -c  " cp /files/platform_t1.xml demoECOC21.xml ; 
                                 /confd/examples.confd/OC23/startNetconfAgent.sh;"
       
else 
            echo "your container is not running yet"
        echo "na1 container is not running yet"
fi

echo "starting transponder2 "

if [ "$( docker container  inspect -f '{{.State.Running}}' na2)" = "true" ]; then 
        docker exec  na2 sh -c " cp /files/platform_t2.xml demoECOC21.xml;
                                  /confd/examples.confd/OC23/startNetconfAgent.sh  "

else 
   echo "Please define the docker container name and port"
        echo "na2 container is not running yet"
fi
 No newline at end of file
Loading