Archive

标签为 ‘netconf’的文章

Install Yangsuite by Docker

Install

docker pull dockerhub.cisco.com/yang-tools-release-docker/yangsuite:latest
docker run -it -p 8480:8480 \
      --mount type=bind,source=/xxx/Documents/Yangsuite_data,target=/home/docker/data \
      dockerhub.cisco.com/yang-tools-release-docker/yangsuite:latest

Detail info:

xxxxx:~ xxxxx$ docker pull dockerhub.cisco.com/yang-tools-release-docker/yangsuite:latest
latest: Pulling from yang-tools-release-docker/yangsuite
4ccdce43d1e0: Already exists 
c95f13c88d92: Already exists 
82656eee95ad: Already exists 
78ff727be57a: Already exists 
448bb314afa5: Already exists 
15677038ac69: Already exists 
22da8daab8e7: Already exists 
9c3a638e7094: Already exists 
2952d6a1d978: Already exists 
bd8c0fd10ad7: Already exists 
680c72e6e1fc: Already exists 
Digest: sha256:31136ac8bca600e0a2a1696ed6798b277e6e7f05652dc1c1f2fd36415b85e930
Status: Image is up to date for dockerhub.cisco.com/yang-tools-release-docker/yangsuite:latest

xxxxx:~ xxxxx$ docker run -it -p 8480:8480 \
>       --mount type=bind,source=/Users/xxxxx/Documents/Yangsuite_data,target=/home/docker/data \
>       dockerhub.cisco.com/yang-tools-release-docker/yangsuite:latest
2018-12-17 01:26:10,395 - yangsuite.paths: INFO: Creating new 'filename' directory path /home/docker/data/logs/
Operations to perform:
  Apply all migrations: admin, auth, contenttypes, sessions
Running migrations:
  Applying contenttypes.0001_initial... OK
  Applying auth.0001_initial... OK
  Applying admin.0001_initial... OK
  Applying admin.0002_logentry_remove_auto_add... OK
  Applying contenttypes.0002_remove_content_type_name... OK
  Applying auth.0002_alter_permission_name_max_length... OK
  Applying auth.0003_alter_user_email_max_length... OK
  Applying auth.0004_alter_user_username_opts... OK
  Applying auth.0005_alter_user_last_login_null... OK
  Applying auth.0006_require_contenttypes_0002... OK
  Applying auth.0007_alter_validators_add_error_messages... OK
  Applying auth.0008_alter_user_username_max_length... OK
  Applying auth.0009_alter_user_last_name_max_length... OK
  Applying sessions.0001_initial... OK
**********************************************************************
Your input is required to define an admin user
**********************************************************************
Username (leave blank to use 'root'): 
Email address: 
Password: 
Password (again): 
The password is too similar to the email address.
This password is too short. It must contain at least 8 characters.
Password: 
Password (again): 
The password is too similar to the email address.
Password: 
Password (again): 
Superuser created successfully.
**********************************************************************
YANG Suite data is stored at /home/docker/data. Be sure to back up this directory!
**********************************************************************
Performing system checks...

System check identified no issues (0 silenced).
December 17, 2018 - 01:26:58
Django version 2.0.8, using settings 'yangsuite.settings.develop'
Starting development server at http://0.0.0.0:8480/

Check Status

xxx:~ xxx$ docker ps -a
CONTAINER ID        IMAGE                                                            COMMAND             CREATED             STATUS                     PORTS                    NAMES
xxxxxxxxxxxx        dockerhub.cisco.com/yang-tools-release-docker/yangsuite:latest   "yangsuite"         6 minutes ago       Up 3 minutes        0.0.0.0:8480->8480/tcp   frosty_wiles

Open Yangsuit

http://0.0.0.0:8480

or

http://127.0.0.1:8480
0

How to get correct Yang configuration on ASR9k

Now some customer test netconf-yang on our XR platform. And frequency to check how to get correct yang config(XML), then they test the yang config by their controller to touch with our devices. Now there are several ways to achieve that, summed up to facilitate review:

 

  • We can ssh 830 to asr9k paltform, then get the configuration, that should correct yang config, you can reference attachment at test-xml-by-ssh.txt
ssh cisco@10.75.49.25 -p 830 -s netconf
  • We can build Netconf NED by pioneer in NSO, then sync-from devices, and “devices device 9001-A compare-config outformat xml”, that should correct yang config
  • After install NSO, we can use follow tools to achieve that function too
netconf-console -u cisco -p cisco --host 10.75.49.53 --port 831 --get-config

 

Btw, please attention “-” and “–” that maybe cause command issue.

0