This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # SCRIPT BODY app.py | |
| from ncclient import manager | |
| import logging | |
| # logging.basicConfig( | |
| # level=logging.DEBUG, | |
| # ) | |
| with manager.connect(host='172.17.14.102', port=830, username='admin', password='admin', | |
| device_params={'name': 'alu'}, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="utf-8"> | |
| <meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1"> | |
| <!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags --> | |
| <meta name="description" content="NokDoc"> | |
| <meta name="author" content="Roman Dodin"> | |
| <link rel="shortcut icon" href="https://cdn.rawgit.com/hellt/nokdoc/82132b04b6ff4e5281e73787a4014231c67dbdf6/template/favicon.ico"> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from ncclient import manager | |
| import logging | |
| # logging.basicConfig( | |
| # level=logging.DEBUG, | |
| # ) | |
| with manager.connect(host='172.17.14.242', port=830, username='admin', password='admin', | |
| device_params={'name': 'alu'}, | |
| hostkey_verify=False) as m: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 2017-08-04T08:29:52.501Z| vmx| I120: Log for VMware ESX pid=36421 version=6.0.0 build=build-3620759 option=Release | |
| 2017-08-04T08:29:52.501Z| vmx| I120: The process is 64-bit. | |
| 2017-08-04T08:29:52.501Z| vmx| I120: Host codepage=UTF-8 encoding=UTF-8 | |
| 2017-08-04T08:29:52.501Z| vmx| I120: Host is VMkernel 6.0.0 | |
| 2017-08-04T08:29:52.483Z| vmx| I120: VTHREAD initialize main thread 0 "vmx" pid 36421 | |
| 2017-08-04T08:29:52.484Z| vmx| I120: Msg_SetLocaleEx: HostLocale=UTF-8 UserLocale=NULL | |
| 2017-08-04T08:29:52.486Z| vmx| I120: DictionaryLoad: Cannot open file "/usr/lib/vmware/config": No such file or directory. | |
| 2017-08-04T08:29:52.486Z| vmx| I120: ConfigDB: Failed to load /usr/lib/vmware/config | |
| 2017-08-04T08:29:52.486Z| vmx| I120: DictionaryLoad: Cannot open file "//.vmware/config": No such file or directory. | |
| 2017-08-04T08:29:52.487Z| vmx| I120: ConfigDB: Failed to load ~/.vmware/config |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import os | |
| import sys | |
| import json | |
| import io | |
| here = os.path.dirname(os.path.realpath(__file__)) | |
| sys.path.append(os.path.join(here, "vendored")) | |
| # now it is allowed to add a non-std package | |
| from pycatj import pycatj |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="utf-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> | |
| <meta http-equiv="x-ua-compatible" content="ie=edge"> | |
| <title>Material Design Bootstrap</title> | |
| <!-- Font Awesome --> | |
| <link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.8.2/css/all.css"> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $(function () { | |
| $('#convert_btn').click(function () { | |
| var data = {} // object to hold the user input data | |
| // store user data in a data["pycatj_data"] | |
| if ($('#yaml_switch').prop("checked")) { | |
| data["pycatj_data"] = $('#in_form').val() // in case of YAML data - store it as a string | |
| } else { | |
| data["pycatj_data"] = JSON.parse($('#in_form').val()) // in case of JSON data - store it as an object | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <data> | |
| <state xmlns="urn:nokia.com:sros:ns:yang:sr:state"> | |
| <router> | |
| <router-name>Base</router-name> | |
| <isis> | |
| <isis-instance>0</isis-instance> | |
| <oper-system-id>0110.1101.1011</oper-system-id> | |
| <oper-router-id>11.11.11.11</oper-router-id> | |
| <db-export-igp-asn>0</db-export-igp-asn> | |
| <oper-state>up</oper-state> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "response": { | |
| "data": { | |
| "network": { | |
| "UUID_1": { | |
| "key1": "val1", | |
| "key2":{ | |
| "UUID_3": { | |
| "key3": "val3" | |
| } |
OlderNewer