Skip to content

Instantly share code, notes, and snippets.

View krishnaprasanthg's full-sized avatar
🏠
Working from home

Prasanth Guttula krishnaprasanthg

🏠
Working from home
  • Hyderabad
View GitHub Profile
@krishnaprasanthg
krishnaprasanthg / Snmp-vendor.py
Created January 1, 2023 13:45
Get vendor information from snmp
# Install the pysnmp library:
# pip install pysnmp
from pysnmp.hlapi import *
# Define the SNMP parameters for the device:
IP_ADDRESS = '192.168.1.1'
SNMP_PORT = 161
COMMUNITY_STRING = 'public'
@krishnaprasanthg
krishnaprasanthg / netbrain.http
Created September 17, 2021 13:13
Netbrain API Usage
### https://github.com/NetBrainAPI/NetBrain-REST-API-V10/blob/master/REST%20APIs%20Documentation/Authentication%20and%20Authorization/Login%20API.md
### Login to the Netbrain, Get the access token. authentication_id is when auth is not local i.e external tacacs/ad
POST https://{{host}}/ServicesAPI/API/V1/Session
Accept: application/json
Content-Type: application/json
{
"username": "{{username}}",
"password": "{{password}}",
@krishnaprasanthg
krishnaprasanthg / cisco-api.py
Created August 16, 2021 12:25
Cisco services api usage
import os
from itertools import chain
import requests
from dotenv import load_dotenv
load_dotenv()
class CiscoAPIConsole(object):
@krishnaprasanthg
krishnaprasanthg / git-unversioned.md
Created December 27, 2018 09:28
Associate local unversioned code to git remote repository?

15

I would commit your working directory to ensure that it exists in history before fetching. (ensure you are in the projects root folder)

git init
git add -A
git commit -m "my latest'

now we have it