Skip to content

Instantly share code, notes, and snippets.


Marcel Wiget mwiget

View GitHub Profile
View xmlproxyd_krt.yang
* Example yang for generating OC equivalent of internal meta tree
save as "xmlproxyd_krtState.yang" on router.
cli : show krt state
module krtState {
yang-version 1;
namespace "";
mwiget / xmlproxyd_sysusers.yang
Last active Mar 4, 2018
User-defined Junos Telemetry Interface YANG file to stream 'show system users'
View xmlproxyd_sysusers.yang
Example yang for generating OC equivalent of show system users
Junos Openconfig and na telemetry packages loaded:
- junos-openconfig-x86-32-
- network-agent-x86-32-17.4R1.16-C1.tgz
1) Load this file in Junos (17.3R1 or newer) with
mwiget /
Created Feb 22, 2018
Launch Docker containers like native apps with current directory (rw) mounted
name=$(basename $0)
if [ $name == "launch-docker-container" ]; then
cat <<EOF
please link this script to the container image you like to run
e.g. to launch latest alpine image with the current working directory mounted:
mwiget /
Created Aug 11, 2017
getconfig via grpc response limit
__author__ = ""
__copyright__ = "Copyright (c) 2017 Juniper Networks, Inc."
import os
from grpc.beta import implementations
import op.protos.authentication_service_pb2 as authentication_service_pb2
import op.protos.openconfig_service_pb2 as openconfig_service_pb2
import common.app_globals
import json
mwiget /
Last active May 18, 2017
fetch Junos op script from URL at startup
Configure script in Junos:
set system scripts op file
set system scripts language python
Create an event-policy that gets triggered during startup to fetch me:
set event-options policy fetch-my-scripts events JTASK_TASK_BEGIN
set event-options policy fetch-my-scripts then execute-commands commands "request system scripts refresh-from op file url"
You can’t perform that action at this time.