This file contains 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
# TiMOS-B-14.0.R4 both/i386 Nokia 7750 SR Copyright (c) 2000-2016 Nokia. | |
# All rights reserved. All use subject to applicable license agreements. | |
# Built on Thu Jul 28 17:26:53 PDT 2016 by builder in /rel14.0/b1/R4/panos/main | |
# Generated SUN MAR 13 06:28:52 2016 UTC | |
exit all | |
configure | |
#-------------------------------------------------- | |
echo "System Configuration" |
This file contains 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 paramiko | |
import time | |
def wait_for_ssh_to_be_ready(host, port, timeout, retry_interval): | |
client = paramiko.client.SSHClient() | |
client.set_missing_host_key_policy(paramiko.AutoAddPolicy()) | |
retry_interval = float(retry_interval) | |
timeout = int(timeout) | |
timeout_start = time.time() |
This file contains 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
{ | |
"_preamble": { | |
"header": { | |
"generated-by": "SRLINUX", | |
"name": "", | |
"comment": "", | |
"created": "2023-09-04T07:13:09.479Z", | |
"release": "v23.7.1", | |
"enabled-yang-features": ["srl_nokia-features:acl-policer-resource-utilization", "srl_nokia-features:admin-user-roles", "srl_nokia-features:anycast-gw", "srl_nokia-features:arp-nd-datapath-programming", "srl_nokia-features:bgp-add-paths", "srl_nokia-features:bgp-auth-password", "srl_nokia-features:bgp-cfg-afi-safi-list", "srl_nokia-features:bgp-graceful-restart-gaps", "srl_nokia-features:bgp-ipv6-next-hop-tunnel-resolution", "srl_nokia-features:bgp-local-as-container-iso-list", "srl_nokia-features:bgp-max-ecmp-hash-buckets", "srl_nokia-features:bgp-mtu-discovery", "srl_nokia-features:bgp-prefix-limit", "srl_nokia-features:bgp-restart-max-wait", "srl_nokia-features:bgp-rib-afi-safi-list", "srl_nokia-features:bgp-rib-afi-safi-route", "srl_nokia-features:bgp-single-hop-connected-check", "srl_nokia-features:bgp-unnumbered-peers", |
This file contains 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
#!/usr/bin/env bash | |
# Copyright 2023 Nokia | |
# Licensed under the BSD 3-Clause License. | |
# SPDX-License-Identifier: BSD-3-Clause | |
# this is an example of a bash script that can be used to introduce network impairments | |
set -o errexit | |
set -o pipefail |
This file contains 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
project_name: containerlab | |
release: | |
github: | |
owner: srl-wim | |
name: container-lab | |
name_template: '{{.Tag}}' | |
milestones: | |
- repo: | |
owner: srl-wim | |
name: container-lab |
This file contains 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
configure { | |
router "Base" { | |
static-routes { | |
route 192.168.200.200/32 route-type unicast { | |
next-hop "192.168.0.1" { | |
admin-state enable | |
} | |
} | |
} | |
} |
This file contains 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
--- | |
default: | |
driver-type: "network" | |
privilege-levels: | |
configuration: | |
name: "configuration" | |
pattern: '(?im)^[\w.\-@/:]{1,63}>\s*$' | |
previous-priv: "" | |
deescalate: "" | |
escalate: "" |
This file contains 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
--- | |
kind: ClusterRole | |
apiVersion: rbac.authorization.k8s.io/v1 | |
metadata: | |
name: kindnet | |
rules: | |
- apiGroups: | |
- "" | |
resources: | |
- nodes |
This file contains 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 subprocess | |
import json | |
# connect to the remote VM and list all running labs in JSON format | |
s = subprocess.Popen("ssh {user}@{host} {cmd}".format(user="root", host="12.32.123.3", cmd='clab inspect --all --format json'), shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE).communicate() | |
all_containers = json.loads(s[0]) | |
baseConfig = json.dumps({ | |
"Objects": [ | |
{ |
This file contains 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
#!/bin/bash | |
# usage ~/vifmove.sh <virsh_domain_name/id> <interface_name> <new_bridge_name> | |
tmpxml=$(mktemp /tmp/ifcfg.XXX) | |
macaddr="$(virsh domiflist $1 | awk "/$2\s/ {print \$NF}")" | |
cat > "$tmpxml" <<EOF | |
<interface type='bridge'> | |
<mac address='$macaddr'/> | |
<source bridge='$3'/> | |
<model type='virtio'/> | |
</interface> |
NewerOlder