OSM Client Installation Fix
[osm/devops.git] / installers / full_install_osm.sh
index 04605da..eb92ba2 100755 (executable)
@@ -220,7 +220,7 @@ function uninstall_lightweight() {
             remove_stack osm_elk
         fi
         echo "Now osm docker images and volumes will be deleted"
-       # TODO: clean-up of images should take into account if other tags were used for specific modules
+        # TODO: clean-up of images should take into account if other tags were used for specific modules
         newgrp docker << EONG
 for module in ro lcm keystone nbi mon pol pla osmclient; do
     docker image rm ${DOCKER_REGISTRY_URL}${DOCKER_USER}/${module}:${OSM_DOCKER_TAG}
@@ -339,6 +339,13 @@ function install_osmclient(){
     sudo -H LC_ALL=C python3 -m pip install -U pip
     sudo -H LC_ALL=C python3 -m pip install -U python-magic pyangbind verboselogs
     sudo apt-get install -y python3-osm-im python3-osmclient
+    if [ -f /usr/lib/python3/dist-packages/osm_im/requirements.txt ]; then
+        sudo -H LC_ALL=C python3 -m pip install -r /usr/lib/python3/dist-packages/osm_im/requirements.txt
+    fi
+    if [ -f /usr/lib/python3/dist-packages/osmclient/requirements.txt ]; then
+        sudo apt-get install -y libcurl4-openssl-dev libssl-dev
+        sudo -H LC_ALL=C python3 -m pip install -r /usr/lib/python3/dist-packages/osmclient/requirements.txt
+    fi
     #sed 's,OSM_SOL005=[^$]*,OSM_SOL005=True,' -i ${HOME}/.bashrc
     #echo 'export OSM_HOSTNAME=localhost' >> ${HOME}/.bashrc
     #echo 'export OSM_SOL005=True' >> ${HOME}/.bashrc
@@ -578,11 +585,11 @@ function generate_docker_images() {
             if [ $module == "PLA" -a ! -n "$INSTALL_PLA" ]; then
                 continue
             fi
-           module_tag="${OSM_DOCKER_TAG}"
+            module_tag="${OSM_DOCKER_TAG}"
             if [ -n "${MODULE_DOCKER_TAG}" ] && echo $TO_REBUILD | grep -q $module ; then
                 module_tag="${MODULE_DOCKER_TAG}"
             fi
-           echo "Pulling ${DOCKER_REGISTRY_URL}${DOCKER_USER}/${module_lower}:${module_tag} docker image"
+            echo "Pulling ${DOCKER_REGISTRY_URL}${DOCKER_USER}/${module_lower}:${module_tag} docker image"
             sg docker -c "docker pull ${DOCKER_REGISTRY_URL}${DOCKER_USER}/${module_lower}:${module_tag}" || FATAL "cannot pull $module docker image"
         done
     else