Loading sample_ee_vnf/helm-charts/eechart/source/playbook.yaml→sample_ee_vnf/helm-charts/eechart/source/ansible/playbook.yaml +0 −0 File moved. View file sample_ee_vnf/helm-charts/eechart/source/install.sh +3 −8 Original line number Diff line number Diff line Loading @@ -22,15 +22,10 @@ apt-get install -y software-properties-common apt-add-repository --yes --update ppa:ansible/ansible apt install -y ansible # Install library to execute command remotely by ssh echo "Installing asynssh" python3 -m pip install asyncssh # Install ping system command apt install -y iputils-ping # Install HTTP python library python3 -m pip install requests # Install libraries from requirementsy to execute command remotely by ssh echo "Installing requirements" python3 -m pip install -r requirements.txt # Install MySQL library python3 -m pip install mysql-connector-python sample_ee_vnf/helm-charts/eechart/source/mysql/__init__.py 0 → 100644 +0 −0 Empty file added. sample_ee_vnf/helm-charts/eechart/source/mylib.py→sample_ee_vnf/helm-charts/eechart/source/mysql/mysql_utils.py +1 −22 Original line number Diff line number Diff line Loading @@ -22,35 +22,14 @@ import logging import asyncio import asyncssh import time from mysql.connector import connect, Error logger = logging.getLogger("osm_ee.vnf") async def ssh_exec(host: str, user: str, command: str ) -> (int, str): """ Execute a remote command via SSH. """ try: async with asyncssh.connect(host, username=user, known_hosts=None) as conn: logger.debug("Executing command '{}'".format(command)) result = await conn.run(command) logger.debug("Result: {}".format(result)) return result.exit_status, result.stderr except Exception as e: logger.error("Error: {}".format(repr(e))) return -1, str(e) def mysql_query(host: str, user: str, password: str, retries: int, query: str async def mysql_query(host: str, user: str, password: str, retries: int, query: str ) -> (int, str): """ Execute a query to a MySQL database. Loading sample_ee_vnf/helm-charts/eechart/source/requirements-dev.txt 0 → 100644 +1 −0 Original line number Diff line number Diff line osm_ee @ git+https://osm.etsi.org/gitlab/vnf-onboarding/docker-api-fe.git@master#egg=version_subpkg&subdirectory=osm_ee Loading
sample_ee_vnf/helm-charts/eechart/source/playbook.yaml→sample_ee_vnf/helm-charts/eechart/source/ansible/playbook.yaml +0 −0 File moved. View file
sample_ee_vnf/helm-charts/eechart/source/install.sh +3 −8 Original line number Diff line number Diff line Loading @@ -22,15 +22,10 @@ apt-get install -y software-properties-common apt-add-repository --yes --update ppa:ansible/ansible apt install -y ansible # Install library to execute command remotely by ssh echo "Installing asynssh" python3 -m pip install asyncssh # Install ping system command apt install -y iputils-ping # Install HTTP python library python3 -m pip install requests # Install libraries from requirementsy to execute command remotely by ssh echo "Installing requirements" python3 -m pip install -r requirements.txt # Install MySQL library python3 -m pip install mysql-connector-python
sample_ee_vnf/helm-charts/eechart/source/mylib.py→sample_ee_vnf/helm-charts/eechart/source/mysql/mysql_utils.py +1 −22 Original line number Diff line number Diff line Loading @@ -22,35 +22,14 @@ import logging import asyncio import asyncssh import time from mysql.connector import connect, Error logger = logging.getLogger("osm_ee.vnf") async def ssh_exec(host: str, user: str, command: str ) -> (int, str): """ Execute a remote command via SSH. """ try: async with asyncssh.connect(host, username=user, known_hosts=None) as conn: logger.debug("Executing command '{}'".format(command)) result = await conn.run(command) logger.debug("Result: {}".format(result)) return result.exit_status, result.stderr except Exception as e: logger.error("Error: {}".format(repr(e))) return -1, str(e) def mysql_query(host: str, user: str, password: str, retries: int, query: str async def mysql_query(host: str, user: str, password: str, retries: int, query: str ) -> (int, str): """ Execute a query to a MySQL database. Loading
sample_ee_vnf/helm-charts/eechart/source/requirements-dev.txt 0 → 100644 +1 −0 Original line number Diff line number Diff line osm_ee @ git+https://osm.etsi.org/gitlab/vnf-onboarding/docker-api-fe.git@master#egg=version_subpkg&subdirectory=osm_ee