{"id":20588709,"url":"https://github.com/ciscodevnet/yangsuite","last_synced_at":"2025-05-15T08:05:23.314Z","repository":{"id":37621380,"uuid":"310252630","full_name":"CiscoDevNet/yangsuite","owner":"CiscoDevNet","description":"Cisco YANG Suite provides a set of tools and plugins to learn, test, and adopt YANG programmable interfaces such as NETCONF, RESTCONF, gNMI and more.","archived":false,"fork":false,"pushed_at":"2025-04-08T21:13:42.000Z","size":79174,"stargazers_count":266,"open_issues_count":16,"forks_count":79,"subscribers_count":25,"default_branch":"main","last_synced_at":"2025-04-14T13:08:38.373Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/CiscoDevNet.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2020-11-05T09:41:41.000Z","updated_at":"2025-04-08T21:13:47.000Z","dependencies_parsed_at":"2023-02-10T12:15:53.281Z","dependency_job_id":"8534d8e1-60f0-4ea1-a17c-602cf966b584","html_url":"https://github.com/CiscoDevNet/yangsuite","commit_stats":{"total_commits":87,"total_committers":15,"mean_commits":5.8,"dds":0.6206896551724138,"last_synced_commit":"9a41ee1852049086343b128311bfb2ade7ccf01c"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CiscoDevNet%2Fyangsuite","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CiscoDevNet%2Fyangsuite/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CiscoDevNet%2Fyangsuite/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CiscoDevNet%2Fyangsuite/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/CiscoDevNet","download_url":"https://codeload.github.com/CiscoDevNet/yangsuite/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254301431,"owners_count":22047904,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-16T07:26:02.958Z","updated_at":"2025-05-15T08:05:23.299Z","avatar_url":"https://github.com/CiscoDevNet.png","language":"Shell","readme":"Copyright 2024 Cisco Systems, Inc\n\nCisco YANG Suite\n==========\n\nYANG Suite core Django application.\n\nCapable of dynamic discovery of installed application plugins.\nProvides common library APIs for logging, filesystem access,\nGUI appearance and behavior, and client-server communication.\n\n- Authors:  Members of the Cisco YANG Suite development team.\n- Supports: Python 3.9+ with recommended Python 3.10\n  \nYANG Suite can be installed as a Docker container or through Python\npackage management.  Docker-compose is the recommended install.\n\nYANG Suite requires about 3.5GB of memory to load large Cisco native models.\n\n## YANG Suite Resources\n\nDevNet YANG Suite landing page: [developer.cisco.com/yangsuite](https://developer.cisco.com/yangsuite)\n\nDocumentation: [developer.cisco.com/docs/yangsuite](https://developer.cisco.com/docs/yangsuite)\n\nHands-on [Learning Lab](https://developer.cisco.com/learning/labs/intro-yangsuite/introduction-launching-yang-suite/)\n![](./imgs/learning_lab.png)\n\n[YANG Suite TDM PDF](https://pubhub.devnetcloud.com/media/yang-suite/docs/YANGSuite%20TDM%20-%20Communities.pdf)\n----------------------------\nThis PDF document has technical details of all capabilites of the YANG Suite tool, including installation, setup, and use of all plugins and features. It is a very detailed document that can be refered to for using the tool and examples for each plugin.\n\n\n\n# YANG Suite Installation: Docker or PIP? You decide\n\n| Feature         | Docker                          | PIP (Python version 3.9+ rec: 3.10)         |\n| -------------   | -------------                   | ------------- |\n| Prerequisites   | Install docker \u0026 docker compose | Install Python \u0026 PIP|\n| Security        | HTTPS                           | HTTP         |\n| YS GUI Ports    | 80 forwarded to 8443            | 8480 directly (no exposed ports) |\n| Telemetry Ports | 57344 - 57345                   | Any unused \u0026 unprivileged TCP port |\n\n## Prerequisites for Docker\n\nTo use the resources in this repository, you must install Docker on the system where you want to run YANG Suite. In addition, since this YANG Suite repository uses Docker Compose, your system needs Docker Compose. Docker Desktop for Mac and Docker Desktop for Windows installations include Compose and you can install those using instructions at https://docs.docker.com/install. For Linux, follow [these specific instructions to install Docker Compose on Linux systems](https://docs.docker.com/compose/install/#install-compose-on-linux-systems).\n\n## Quick Start with Docker:\n\n\u003e [!NOTE]\n\u003e For quick exploring, see the [one-container-alternative](/one-container-alternative/) directory where you can find an alternative way to install YANG Suite using a single container with no user input required.\n\n1. Clone this repository\n\n2. Run start_yang_suite.sh or, \n\n3. Run docker compose up if you have already ran the start_yang_suite.sh\n\n4. Access the tool at http://localhost or https://localhost:8443\n\n```\ngit clone https://github.com/CiscoDevNet/yangsuite\ncd yangsuite/docker/ ; bash ./start_yang_suite.sh\n    or\ncd yangsuite/docker/ ; docker compose up\n    or\ncd yangsuite/docker/ ; docker-compose up\n```\n\nThe output should look similar to the image below:\n\n![](./imgs/git_clone_setup.png)\n\nThe start_yang_suite.sh will ask to set the username, password, e-mail address, and for the certificate details. The output will look similar to the below, be sure to enter certificate details in the red hilight area:\n\n![](./imgs/setup_ys.png)\n\nOnce YANG Suite is ready for use the following will be seen:\n\n![](./imgs/ys_ready.png)\n\nNow you can access the YANG Suite at http://localhost\n\n\n\nDocker-based YANG Suite Installation\n------------------------------------\n\nThe yangsuite/docker/start_yang_suite.sh script performs the following:\n\n- Prompts for username, password, and email which will be the superuser to yangsuite.\n- Gives the choice of creating test SSL/TLS certificate and key.\n- Creates an environment file needed for the yangsuite docker container install.\n- Runs docker-compose up.\n\nSelf-signed Certificate for testing\n-----------------------------------\n\nThe SSL/TLS certificates installed with the nginx container should be obtained or generated using a trusted\ncertificate authority.  As a convenience, the yangsuite/docker/start_yang_suite.sh script will\ngenerate a self-signed certificate/key to get you going quickly.\n\n**WARNING:** Official SSL/TLS certificate/key should be obtained and copied to yangsuite/docker/nginx directory rather than using the test SSL/TLS certificate/key generated by the start_yang_suite.sh script.\n\nCustomization\n-------------\n\nThe yangsuite/docker/yangsuite/production.py file contains Django settings.  The possible settings are extensive and information can found at https://www.djangoproject.com/.\n\nAdding/Updating plugins can be done through the Admin--\u003eManage plugins page or by copying\nthe plugin wheels into the yangsuite/docker/yangsuite/ directory, uncomment the appropriate\nlines in the yangsuite/docker/yangsuite/dockerfile, and run:\n\n    docker-compose up --build\n\n\nExample yangsuite.ini for external access\n-------------------------------------------------\n\n- The \"allowed_host\" variable sets which IP is allowed in to access the YANG Suite tool. In this example the host 0.0.0.0 is set but really I think only the star (\"*\") is needed because for this example all and every host should be allowed into the tool to allow it's use.\n \n\n```\n[DEFAULT]\ndata_path = /home/yangsuite/ys-data\nport = 8480\nallowed_hosts = 0.0.0.0 *\nsecret_key = justalongbunchofnumbersandstuffwashereokbyejeremywashereonafridayyo\nstatic_root = /home/yangsuite/.local/share/yangsuite/static\nsettings_module = yangsuite.settings.dev.develop\neula_agreement = accepted\ndna_advantage = detect\n```\n\n\nAccess YANG Suite Docker Install with web browser\n-------------------------------------------------\n\n- The nginx container redirects port 80 to port 8443 which is used to interface with the yangsuite core.  Connect to http://localhost or https://localhost:8443. **NOTE:** A complaint about the certificate will appear if it was generated using \"start_yang_suite.sh\".\n- The yangsuite-restconf plugin uses port 443 to communicate to your Cisco device so enable RESTCONF in the YANG Suite Device profile page for devices that support that protocol.\n- If port 8443 is not available for use on the server, change the port number in the docker-compose.yml file and the nginx.conf file.\n- If port 443 is not available for use on the server, change the port number in the docker-compose.yml file, configure the new RESTCONF port on the Cisco device, and configure the correct RESTCONF port in the YANG Suite Device profile.\n- Login using username set during install.\n\nQuick Start with PIP Install on MacOS\n------------------------------\n\nWe recommend installing Homebrew to manage the Python installation on your mac.\n\nCreate a new directory. In the examples below, we'll call this directory `yangsuitevenv`\n\n```\nmkdir yangsuitevenv\n```\n\nRefer to the [HomeBrew website](https://brew.sh) for details on how to install HomeBrew on your Mac, or, follow the command below to install HomeBrew:\n\n```\n/bin/bash -c \"$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)\"\n```\n\nUse brew to install pyenv\n\n```\nbrew install pyenv\n```\n\nOnce pyenv is installed, install Python version 3.10\n\n```\npyenv install 3.10.0\n```\n\nNow that the correct and YANG Suite-supported version of Python 3.10 is installed, create and activate the virtual environment. Note: you may need to change \"3.10.0\" below with the version of Python 3.10 that you installed\n\n```\n~/.pyenv/versions/3.10.0/bin/python -m venv yangsuitevenv\nsource yangsuitevenv/bin/activate\n```\n\nNext, install the YANG Suite tool within the virutal evnrionment using pip:\n\n```\npip install pip wheel setuptools --upgrade\npip install yangsuite\n```\n\nNow that YANG Suite is installed, it can be started up. The credentials and settings will be configured on the first run:\n\n```\nyangsuite\n```\n\nOnce started the tool can be access on the default port http://localhost:8480\n\nSee a full example of installing pre-requisites and configuring YANG Suite below:\n![](imgs/yangsuite-pip-install-short.gif)\n\nPIP install using Linux in Windows\n----------------------------\n**NOTE** For Linux to run YANG Suite, a virtual environment is required\n\nHere is an example installation flow on a Windows machine using Ubuntu 20.04 on Windows Subsystem Linux (WSL)\n\nInstall Ubuntu 20.04\n```\nwsl --install Ubuntu-20.04\n\nInstalling, this may take a few minutes...\nPlease create a default UNIX user account. The username does not need to match your Windows username.\nFor more information visit: https://aka.ms/wslusers\nEnter new UNIX username: user\nNew password:\nRetype new password:\npasswd: password updated successfully\nInstallation successful!\nTo run a command as administrator (user \"root\"), use \"sudo \u003ccommand\u003e\".\nSee \"man sudo_root\" for details.\n\nWelcome to Ubuntu 20.04.3 LTS (GNU/Linux 5.15.79.1-microsoft-standard-WSL2 x86_64)\n\n * Documentation:  https://help.ubuntu.com\n * Management:     https://landscape.canonical.com\n * Support:        https://ubuntu.com/advantage\n\n  System information as of Tue Jan 10 15:53:15 PST 2023\n\n  System load:  0.22                Processes:             9\n  Usage of /:   0.1% of 1006.85GB   Users logged in:       0\n  Memory usage: 14%                 IPv4 address for eth0: 172.28.133.196\n  Swap usage:   0%\n\n1 update can be applied immediately.\nTo see these additional updates run: apt list --upgradable\n\n\nThe list of available updates is more than a week old.\nTo check for new updates run: sudo apt update\n\n\nThis message is shown once a day. To disable it please create the\n/home/user/.hushlogin file.\n```\n\nEnsure DNS is set up properly\n```\nwsl -s Ubuntu-20.04\nwsl\ncat /etc/resolv.conf\n```\n\nValidate python3 already part of Ubuntu-20.04 image\n```\nsudo apt update\nsudo apt upgrade\nwhich python3\n```\n\nInstall python3 packages\n```\nsudo apt install python3-pip python3-lxml python3-venv\t\t\n```\n\nInstall yangsuite prerequisites for Ubuntu \n```\nsudo apt install git openssh-client iputils-ping sqlite3 snmp\n```\n\nCreate a new directory and virtual environment\n```\nmkdir testing\ncd testing\nmkdir yangsuite\ncd yangsuite\n```\n\nSet Up YANG Suite with setup_yangsuite.sh. Note: Skip docker install and move forward with pip installation method instead\n```\nsudo ./setup_yangsuite.sh\nSKIP\t\t\t\t\t\t\t\t\t\t\t\t\t\npython3 -m venv .venv\t\t\t\t\t\t\t\t\t\t\t\nsource .venv/bin/activate\npip install -U pip setuptools wheel\npip install yangsuite\n```\n\nInstall yangsuite plugins\n```\npip install yangsuite-restconf yangsuite-coverage yangsuite-gnmi yangsuite-grpc-telemetry\t\t\npip freeze \u003e requirements.txt\n```\n\nRun yangsuite. When doing this for the first time, setup script stored to yangsuite.ini for future runs, see detailed output below\n```\nyangsuite\t\t\t\t\t\t\t\t\t\t\t\n\n**********************************************************************\nEntering interactive configuration mode\n**********************************************************************\nYANG Suite stores user specific data (YANG modules, device profiles, etc.)\nSet new path or use: [] /home/user/testing/yangsuite\nWhat port number should YANG Suite listen on? [8480]\n**********************************************************************\nYANG Suite can be accessed remotely over the network.\n**********************************************************************\nAllow remote access? [n] y\n**********************************************************************\nDefine hosts/IPs that YANG Suite will accept connections as.\nExamples:\n        CSCO-W-PF392JHY.cisco.com\n        127.0.0.1\n        CSCO-W-PF392JHY\n        127.0.1.1\nIf the IP is not routable and you are behind NAT, use the public NAT address.\n**********************************************************************\nEnter a hostname, FQDN, or address [127.0.0.1]\nEntries so far: ['0.0.0.0']\nAdd another entry? [n]\n**********************************************************************\nInteractive configuration complete\n**********************************************************************\nSave this configuration to\n/home/user/.config/yangsuite/yangsuite.ini\nso YANG Suite can automatically use it next time you start YANG Suite? [y]\n**********************************************************************\nUpdating YANG Suite preferences file (/home/user/.config/yangsuite/yangsuite.ini)\n**********************************************************************\n2023-01-10 16:32:42,140 - yangsuite.ysgnmi.gnmi: WARNING: Install yangsuite-testmanager for opfield verification\n2023-01-10 16:32:42,211 - yangsuite.paths: INFO: Creating new 'filename' directory path /home/user/testing/yangsuite/logs/\nRemoving database for upgrade.\nNo changes detected in app 'yscoverage'\nNo changes detected in app 'yangsuite'\nNo changes detected in app 'ysdevices'\nNo changes detected in app 'ysgnmi'\nNo changes detected in app 'ysrestconf'\nMigrations for 'ysyangtree':\n  .venv/lib/python3.8/site-packages/ysyangtree/migrations/0001_initial.py\n    - Create model YangSetJSON\n    - Create model YangSetTree\nNo changes detected in app 'ysnetconf'\nNo changes detected in app 'ysfilemanager'\nNo changes detected in app 'ysgrpctelemetry'\nOperations to perform:\n  Apply all migrations: admin, auth, contenttypes, django_registration, sessions, ysyangtree\nRunning migrations:\n  Applying contenttypes.0001_initial... OK\n  Applying auth.0001_initial... OK\n  Applying admin.0001_initial... OK\n  Applying admin.0002_logentry_remove_auto_add... OK\n  Applying admin.0003_logentry_add_action_flag_choices... OK\n  Applying contenttypes.0002_remove_content_type_name... OK\n  Applying auth.0002_alter_permission_name_max_length... OK\n  Applying auth.0003_alter_user_email_max_length... OK\n  Applying auth.0004_alter_user_username_opts... OK\n  Applying auth.0005_alter_user_last_login_null... OK\n  Applying auth.0006_require_contenttypes_0002... OK\n  Applying auth.0007_alter_validators_add_error_messages... OK\n  Applying auth.0008_alter_user_username_max_length... OK\n  Applying auth.0009_alter_user_last_name_max_length... OK\n  Applying auth.0010_alter_group_name_max_length... OK\n  Applying auth.0011_update_proxy_permissions... OK\n  Applying django_registration.0001_initial... OK\n  Applying sessions.0001_initial... OK\n  Applying ysyangtree.0001_initial... OK\n**********************************************************************\nCreating static storage directory /home/user/.local/share/yangsuite/static\n**********************************************************************\n\n884 static files copied to '/home/user/.local/share/yangsuite/static'.\n**********************************************************************\nYour input is required to define an admin user\n**********************************************************************\nUsername (leave blank to use 'user'): admin\t\t\t\t\t\t\t\nEmail address: yangsuite@gmail.com\nPassword:\nPassword (again):\nThe password is too similar to the username.\nThis password is too short. It must contain at least 8 characters.\nThis password is too common.\nBypass password validation and create user anyway? [y/N]: y\nSuperuser created successfully.\n**********************************************************************\nYANG Suite data is stored at /home/user/testing/yangsuite. Be sure to back up this directory!\n**********************************************************************\nPerforming system checks...\n\nSystem check identified no issues (0 silenced).\nJanuary 11, 2023 - 00:34:02\nDjango version 2.2.28, using settings 'yangsuite.settings.production'\nStarting development server at http://0.0.0.0:8480/\nQuit the server with CONTROL-C.\n```\n\nRe-configuring yangsuite Server\n----------------------------\n\n- Activate the virtual environment\n- Type yangsuite -h\n\nCreate an automated test environment using PyATS\n----------------------------\nSee the PyATS Docs: https://developer.cisco.com/docs/pyats-getting-started/\n\n\nPre Release Versions\n----------------------------\nManually specify pre-release version when using pip like in the example below to access the pre release and bug fix versions of yang suite and plugins:\n\n```\ndocker container exec -it \u003cyangsuite container ID\u003e bash\npip install --upgrade --pre yangsuite-devices\nexit\n\npip\nsource \u003cyour yangsuite venv\u003e/bin/activate\npip install --upgrade --pre yangsuite-devices\n```\n\nUpdate all Plugins to Latest Release\n----------------------------\n```\npip3 install --upgrade yangsuite yangsuite-devices yangsuite-filemanager yangsuite-yangtree yangsuite-coverage yangsuite-gnmi yangsuite-grpc-telemetry yangsuite-netconf yangsuite-restconf\n```\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fciscodevnet%2Fyangsuite","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fciscodevnet%2Fyangsuite","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fciscodevnet%2Fyangsuite/lists"}