host# chmod +x HelloWorld.py
host# scp HelloWorld.py admin@<switch>:/mnt/flash/HelloWorld
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
package main | |
import ( | |
"fmt" | |
"github.com/aristanetworks/goeapi" | |
) | |
type ShowRibRouteIp struct { | |
RibRoutesByProtocol map[string]Protocol |
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
! **Make sure to change the common-name to match your environment** | |
security pki certificate generate self-signed switch.crt key switch.key generate rsa 2048 validity 30000 parameters common-name myswitch.lab.lan | |
! | |
configure | |
! | |
management security | |
ssl profile SELFSIGNED | |
certificate switch.crt key switch.key | |
! | |
management api gnmi |
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
# -*- coding: utf-8 -*- | |
# Copyright (c) 2017 Arista Networks, Inc. All rights reserved. | |
# Arista Networks, Inc. Confidential and Proprietary. | |
""" | |
Example: | |
>>> sess = ssh.Session() | |
>>> sess.open("ck327", auth=("admin", "")) | |
>>> print(sess.send("show ver")) |
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
# Example: | |
# | |
# source ceoslab.rc | |
# | |
# run-netc ceos1-net | |
# run-netc ceos2-net | |
# | |
# for i in `seq 1 16` | |
# do | |
# link-netc ceos1-net ceos2-net eth${i} eth${i} |
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
package main | |
import ( | |
"fmt" | |
"net" | |
"github.com/aristanetworks/goeapi" | |
) | |
type ShowIsisDatabase struct { |
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 python3 | |
# -*- coding: utf-8 -*- | |
# Copyright (c) 2020 Arista Networks, Inc. All rights reserved. | |
# Arista Networks, Inc. Confidential and Proprietary. | |
"""Simple EAPI Client | |
API Usage: | |
import eapiclient |
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
// +build go1.10 | |
// Demo listening on a socket inside an network namespace | |
package main | |
import ( | |
"bufio" | |
"fmt" | |
"net" |
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
// Copyright (c) 2019 Arista Networks, Inc. | |
// Use of this source code is governed by the Apache License 2.0 | |
// that can be found in the COPYING file. | |
package main | |
import ( | |
"fmt" | |
"io/ioutil" | |
"log" |
NewerOlder